|
| 1 | +# Optional Beads execution queue |
| 2 | + |
| 3 | +[Beads](https://github.com/steveyegge/beads) is an open-source |
| 4 | +dependency-aware issue tracker designed for AI coding agents — it gives an |
| 5 | +agent a local ready/blocked view of work, a dependency graph, and restart-safe |
| 6 | +task claims that GitHub Issues alone do not. |
| 7 | + |
| 8 | +This document is **optional and additive**. The base harness does not assume |
| 9 | +Beads; if your team has no agent or multi-actor execution concern, GitHub |
| 10 | +Issues plus the PR template is sufficient and you can skip this doc entirely. |
| 11 | +Beads is recommended specifically when you are coordinating an LLM agent (or |
| 12 | +several) against this repo and want dependency planning the public issue |
| 13 | +tracker does not provide. The README and `docs/HARNESS.md` references describe |
| 14 | +Beads as optional infrastructure, not part of the standard contributor flow. |
| 15 | + |
| 16 | +Wherever Beads is used, GitHub Issues remain the external source of truth and |
| 17 | +the authority for issue closure. |
| 18 | + |
| 19 | +## Review of existing GitHub issue guidance |
| 20 | + |
| 21 | +The current harness already treats GitHub as the public planning and merge |
| 22 | +record: |
| 23 | + |
| 24 | +- `.github/ISSUE_TEMPLATE/bug.md`, `feature.md`, and `eval-regression.md` |
| 25 | + define the supported intake paths, and blank issues are disabled in |
| 26 | + `.github/ISSUE_TEMPLATE/config.yml`. |
| 27 | +- `CONTRIBUTING.md` requires one issue per branch, short-lived branches named |
| 28 | + `<type>/<issue-number>-<kebab-title>`, and green CI plus review before merge. |
| 29 | +- `.github/pull_request_template.md` requires What & why, Test plan, |
| 30 | + Invariants affected, supply-chain surface, Screenshots when relevant, and a |
| 31 | + linked issue. |
| 32 | +- `CLAUDE.md` and `docs/DEVELOPMENT.md` describe the same one-issue, |
| 33 | + one-branch, `develop` to `main` release flow for agent and human operators. |
| 34 | +- `docs/TASKS.md` is a project-local planning map cross-referenced with GitHub |
| 35 | + issues and the project board. |
| 36 | + |
| 37 | +There is no Beads-specific policy in the base harness today. Any Beads addition |
| 38 | +must therefore be additive and must not make GitHub issue state ambiguous. |
| 39 | + |
| 40 | +## GitHub Issues vs Beads |
| 41 | + |
| 42 | +| System | Owns | Does not own | |
| 43 | +|---|---|---| |
| 44 | +| GitHub Issues | Public backlog, user-facing requirements, labels, project board state, discussion, acceptance criteria, links from PRs, and final issue closure. | Local agent claims, transient execution notes, or dependency scheduling that would be noisy in the public issue. | |
| 45 | +| Beads | Local execution queue, ready/blocked views, dependency graph, implementation notes, reviewer handoff notes, and restart-safe task claims. | The canonical requirement, public status, release notes, or authority to close a GitHub issue. | |
| 46 | + |
| 47 | +The rule is simple: **GitHub answers what work exists and whether it is |
| 48 | +externally done; Beads answers what the local execution system should pick up |
| 49 | +next.** |
| 50 | + |
| 51 | +## Sync contract |
| 52 | + |
| 53 | +When using Beads with this harness: |
| 54 | + |
| 55 | +1. Create or confirm the GitHub issue first. |
| 56 | +2. Mirror the issue into Beads with an immutable external reference: |
| 57 | + - GitHub repository owner/name. |
| 58 | + - GitHub issue number. |
| 59 | + - GitHub issue URL. |
| 60 | + - Original issue title. |
| 61 | +3. Use Beads for local status only: `ready`, `in_progress`, `blocked`, |
| 62 | + `review`, or `done` are execution states, not replacements for the GitHub |
| 63 | + issue state. |
| 64 | +4. Put the Bead id in local notes, branch notes, or PR body when useful, but |
| 65 | + keep `Closes #<issue>` pointing at the GitHub issue. |
| 66 | +5. Do not close a GitHub issue because a Bead is marked done. Close only after |
| 67 | + the PR is merged, required checks are green, any required manual or browser |
| 68 | + validation is recorded, and a human-readable note has been added to the |
| 69 | + issue or PR. |
| 70 | + |
| 71 | +If the GitHub issue changes after import, update the Bead from GitHub before |
| 72 | +continuing. GitHub wins on scope, acceptance criteria, and user-visible status. |
| 73 | + |
| 74 | +## Recommended Bead fields |
| 75 | + |
| 76 | +A Bead should carry enough information for a new agent or contributor to resume |
| 77 | +without reopening every browser tab: |
| 78 | + |
| 79 | +| Field | Purpose | |
| 80 | +|---|---| |
| 81 | +| `external_ref` | GitHub issue URL, for example `https://github.com/owner/repo/issues/123`. | |
| 82 | +| `github_issue` | Numeric issue id used by branches and PRs. | |
| 83 | +| `acceptance` | The current acceptance criteria copied or summarized from GitHub. | |
| 84 | +| `dependencies` | Other Beads or GitHub issues that must land first. | |
| 85 | +| `status` | Local execution state. | |
| 86 | +| `owner` | Optional local agent or human claim. | |
| 87 | +| `evidence` | Paths or URLs for test output, review notes, screenshots, or deploy checks. | |
| 88 | +| `closeout` | Merge SHA, PR URL, and verification notes once complete. | |
| 89 | + |
| 90 | +A short YAML example: |
| 91 | + |
| 92 | +```yaml |
| 93 | +external_ref: https://github.com/owner/repo/issues/123 |
| 94 | +github_issue: 123 |
| 95 | +acceptance: | |
| 96 | + /api/v1/echo rejects payloads >1KiB with HTTP 413. |
| 97 | +dependencies: [122] # other Bead ids or GitHub issues |
| 98 | +status: ready |
| 99 | +owner: agent-a |
| 100 | +evidence: |
| 101 | + - tests/test_api.py::test_echo_size_cap |
| 102 | +closeout: null |
| 103 | +``` |
| 104 | +
|
| 105 | +Avoid storing secrets, tokens, credentials, private customer data, or raw |
| 106 | +production payloads in Beads. Treat Beads data as local operational metadata. |
| 107 | +Note that `.beads/` is gitignored, so anything Beads stores locally — including |
| 108 | +agent-action audit logs — is wiped by `git clean -fdx`; commit deliberate |
| 109 | +summaries to the repo if you need them to survive workspace resets. |
| 110 | + |
| 111 | +## PR discipline when Beads are used |
| 112 | + |
| 113 | +The existing PR template still applies. Add Beads information without deleting |
| 114 | +any required section: |
| 115 | + |
| 116 | +- `Linked issue` remains `Closes #<issue>`. |
| 117 | +- Mention the Bead id or local queue reference under `What & why` or the |
| 118 | + optional Beads section. |
| 119 | +- Include Beads-derived evidence paths in `Test plan` only when they are useful |
| 120 | + to a reviewer. |
| 121 | +- If the Bead changed scope, update the GitHub issue before asking for review. |
| 122 | +- If the Bead was blocked by an external dependency, note that in the PR or |
| 123 | + issue rather than hiding it in the local queue. |
| 124 | + |
| 125 | +## Local artifact hygiene |
| 126 | + |
| 127 | +Beads state is usually local execution metadata. Do not commit raw Beads |
| 128 | +databases, scratch exports, or agent logs by default. Commit only intentional |
| 129 | +summaries or docs that reviewers need. |
| 130 | + |
| 131 | +If a downstream project decides to version Beads state, document that policy in |
| 132 | +that project and make sure secret scanning, review, and retention expectations |
| 133 | +are explicit. |
| 134 | + |
| 135 | +## Closure checklist |
| 136 | + |
| 137 | +The PR-merge and issue-closure gates already live in |
| 138 | +`.github/pull_request_template.md` and `CONTRIBUTING.md` — don't duplicate them |
| 139 | +here. The Bead-specific closure rule is narrower: |
| 140 | + |
| 141 | +- Do not mark a Bead done until the GitHub issue's closure conditions (per the |
| 142 | + PR template and `CONTRIBUTING.md`) are met. Beads track the local execution |
| 143 | + state of work GitHub already authorised; they don't grant new closure |
| 144 | + authority. |
| 145 | +- If the Bead and the GitHub issue disagree on scope, acceptance, or status, |
| 146 | + stop and reconcile against GitHub before continuing. |
| 147 | + |
| 148 | +Beads improve local throughput only if they reduce ambiguity. If a Bead and a |
| 149 | +GitHub issue disagree, the GitHub issue wins. |
0 commit comments