* feat(stats): add --no-blocked flag; fix Blocked:0 red render (be-nnqp, be-4b63)
- types.go: BlockedIssues int → *int (nil when --no-blocked skips computation)
- storage: add FastStatisticsStore interface + GetStatisticsNoBlocked to DoltStorage;
implement in DoltStore and EmbeddedDoltStore (ScanIssueCountsInTx only, no blocked traversal)
- status.go: --no-blocked flag (no short alias), BlockedCountSkipped bool in StatusOutput;
fast path calls GetStatisticsNoBlocked; human output renders "(skipped)" in muted style
- be-4b63: Blocked:0 now renders plain text; only Blocked:N>0 uses RenderFail (red)
- nil-guard BlockedIssues callers: getAssignedStatistics, status_test.go, queries_test.go,
examples/library-usage/main.go
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(cli): regen CLI reference for `bd status --no-blocked`
Regenerates docs/CLI_REFERENCE.md and the website CLI reference pages
(`website/docs/cli-reference/status.md` and the version-1.0.0 / 1.0.4
snapshots) from the live `bd help` output so the doc-flags freshness
check passes.
Picks up the new `--no-blocked` flag, the updated `--no-activity`
description ("Skip git activity summary"), and the matching example
lines added in ddf53438c.
Fixes the CI "Check doc flags freshness" failure on PR #4022.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: release gate PASS for be-nnqp+be-4b63 (bd stats --no-blocked)
* fix(stats): ReadyIssues *int, data-derived skip render, proxied-server warning
Address the adjudicated cross-vendor review on PR #4022:
- internal/types.Statistics.ReadyIssues is now *int, mirroring BlockedIssues:
nil when --no-blocked skips the computation (readiness needs the blocked
set), populated by all three backends' full GetStatistics, by
issueops.GetStatisticsInTx, and by buildAssignedStats. Left nil only in
the *NoBlocked fast-path variants. JSON now emits `"ready_issues": null`
instead of a fake 0 a CI consumer could misread as "nothing ready".
- renderStatus derives "(skipped)" rendering from the data itself
(stats.BlockedIssues/ReadyIssues == nil) instead of the noBlocked flag,
fixing the --assigned + --no-blocked contradiction where fully-recomputed
stats were mislabeled as skipped. The noBlocked parameter is gone from
renderStatus entirely; both call sites (status.go, status_proxied_server.go)
simplified accordingly.
- Proxied-server mode now prints a one-line stderr warning when --no-blocked
is passed but not honored, instead of silently discarding the flag; the
flag's help string documents the limitation.
Agent-Signature: claude-sonnet-medium on behalf of maphew
* test(stats): cover GetStatisticsNoBlocked nil semantics and renderStatus skip branch
- internal/storage/dolt: new TestGetStatisticsNoBlocked_LeavesBlockedAndReadyNil
asserts the --no-blocked fast path leaves BlockedIssues/ReadyIssues nil
while the full GetStatistics path on the same store populates both.
- cmd/bd: new TestGetStatisticsNoBlocked (storage-level, same assertion via
the CLI-facing store handle), TestRenderStatus_SkipJSONEmitsNullNotZero
(asserts blocked_count_skipped:true plus literal `"blocked_issues": null`
/ `"ready_issues": null` in the JSON envelope),
TestRenderStatus_SkipHumanRendersSkippedNotZero (asserts the "(skipped)"
human branch renders for both fields), and
TestRenderStatus_AssignedIgnoresSkipEvenWithNoBlockedFlag (guards the
--assigned + --no-blocked fix: fully-populated stats never render
"(skipped)").
- Update existing statistics assertions in
internal/storage/conformance/audit_search-counts-stats.go,
internal/storage/dolt/queries_test.go, and
internal/storage/domain/db/ready_helpers*_test.go for
ReadyIssues's int -> *int change.
Agent-Signature: claude-sonnet-medium on behalf of maphew
* docs(cli): drop --no-blocked doc lines from CLI_REFERENCE.md/status.md (pinned-generator policy)
CI's "Check doc flags freshness" job builds bd from the release pin in
docs/cli-docs.pin (currently v1.1.0) to regenerate docs/CLI_REFERENCE.md
and docs/cli-reference/status.md, not from this branch's HEAD. v1.1.0
predates --no-blocked entirely, so the pinned generator's output omits
every --no-blocked reference (use case bullet, both example lines, the
flag description) and also reverts the --no-activity flag description
wording, flagging both files as stale relative to it. Same trap PR #3920
hit for --mem-profile.
Applied the exact patch CI generated and uploaded as the
cli-docs-freshness-patch artifact on the failing job
(run 30063539327 / job 89390739992) verbatim to both files; the lines
will reappear automatically once the pin advances past a release that
includes --no-blocked.
Agent-Signature: claude-sonnet-medium on behalf of maphew
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: matt wilkie <maphew@gmail.com>
|
||
|---|---|---|
| .. | ||
| bash-agent | ||
| bd-example-extension-go | ||
| claude-desktop-mcp | ||
| compaction | ||
| contributor-workflow | ||
| formulas | ||
| library-usage | ||
| linear-workflow | ||
| multi-phase-development | ||
| multiple-personas | ||
| protected-branch | ||
| python-agent | ||
| startup-hooks | ||
| team-workflow | ||
| README.md | ||
Beads Examples
This directory contains examples of how to integrate bd with AI agents and workflows.
Examples
Agent Integration
- python-agent/ - Simple Python agent that discovers ready work and completes tasks
- bash-agent/ - Bash script showing the full agent workflow
- startup-hooks/ - Session startup scripts for automatic bd upgrade detection
- claude-desktop-mcp/ - MCP server for Claude Desktop integration
Tools & Utilities
- monitor-webui/ - Standalone web interface for real-time issue monitoring and visualization
- git-hooks/ - Pre-configured git hooks for automatic Dolt sync
Workflow Patterns
- contributor-workflow/ - OSS contributor setup with separate planning repo
- team-workflow/ - Team collaboration with shared repositories
- multi-phase-development/ - Organize large projects by phases (planning, MVP, iteration, polish)
- multiple-personas/ - Architect/implementer/reviewer role separation
- protected-branch/ - Protected branch workflow for team collaboration
Quick Start
# Try the Python agent example
cd python-agent
python agent.py
# Try the bash agent example
cd bash-agent
./agent.sh
# Install git hooks
cd git-hooks
./install.sh
# REMOVED (bd-4c74): branch-merge demo - hash IDs eliminate collision resolution
Creating Your Own Agent
The basic agent workflow:
- Find ready work:
bd ready --json --limit 1 - Claim the task:
bd update <id> --claim --json - Do the work: Execute the task
- Discover new issues:
bd create "Found bug" --json - Link discoveries:
bd dep add <new-id> <parent-id> --type discovered-from - Complete the task:
bd close <id> --reason "Done" --json
All commands support --json for easy parsing.