diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 7b109a7b..6a380cf0 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -9,14 +9,24 @@ {"id":"oh-my-opencode-beads-0ls.7","title":"Update docs for beads-driven planning/execution across surfaces","description":"Update docs to describe beads-first orchestration and remove plan-file/TodoWrite/TaskCreate guidance from operator and contributor documentation.","design":"Target docs grouped: docs/features.md, docs/orchestration-guide.md, docs/task-system.md, docs/guide/* plus any migration notes referenced by templates/hooks. Checklist: update workflow examples to bd ready/show/update/close, document dependency DAG semantics and session-close expectations, include migration troubleshooting for legacy-mode gates.","acceptance_criteria":"Acceptance: audited docs no longer present plan markdown or TodoWrite/TaskCreate as default orchestration workflow; docs cross-link to conventions and migrated command/hook behavior. Test impact files: docs lint/link checks and any snapshot tests validating embedded examples.","notes":"Should land after implementation streams so docs match shipped behavior.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-02-14T13:04:24.08943527+02:00","created_by":"max","updated_at":"2026-02-14T22:32:12.089002692+02:00","closed_at":"2026-02-14T22:32:12.089002692+02:00","close_reason":"Acceptance satisfied: docs migration is substantially complete and now reflects beads-first orchestration while removing plan-file/TodoWrite/TaskCreate default guidance.","dependencies":[{"issue_id":"oh-my-opencode-beads-0ls.7","depends_on_id":"oh-my-opencode-beads-0ls","type":"parent-child","created_at":"2026-02-14T13:04:24.090403635+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.7","depends_on_id":"oh-my-opencode-beads-0ls.1","type":"blocks","created_at":"2026-02-14T13:04:42.39001567+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.7","depends_on_id":"oh-my-opencode-beads-0ls.2","type":"blocks","created_at":"2026-02-14T13:08:02.808977083+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.7","depends_on_id":"oh-my-opencode-beads-0ls.3","type":"blocks","created_at":"2026-02-14T13:08:02.913443339+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.7","depends_on_id":"oh-my-opencode-beads-0ls.4","type":"blocks","created_at":"2026-02-14T13:08:03.018626071+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.7","depends_on_id":"oh-my-opencode-beads-0ls.5","type":"blocks","created_at":"2026-02-14T13:08:03.123139857+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.7","depends_on_id":"oh-my-opencode-beads-0ls.8","type":"blocks","created_at":"2026-02-14T13:08:03.229567676+02:00","created_by":"max"}]} {"id":"oh-my-opencode-beads-0ls.8","title":"Beads-mode compatibility shim cleanup and command discovery dedup","description":"Remove or gate legacy plan-path compatibility shims after migration streams land, and deduplicate command discovery language so users consistently get beads-first guidance.","design":"Target files: src/hooks/prometheus-md-only/*, write-existing-file-guard .sisyphus exception touchpoints, src/hooks/compaction-todo-preserver/* (disable/remove in beads mode), command discovery wording touchpoints in src/features/builtin-commands/templates/* and src/tools/slashcommand/* where duplicate/legacy prompts remain. Checklist: identify residual legacy gates, remove or isolate under explicit legacy mode, normalize command discovery/help text to single beads-first contract.","acceptance_criteria":"Acceptance: beads mode has no unconditional .sisyphus markdown exceptions/preservers, legacy compatibility is explicit and gated, and command discovery/help text is deduplicated and consistent with 0ls.1 conventions. Test impact files: tests/hooks/** for gating behavior and tests/features/tests/tools snapshots for command help wording.","notes":"Explore audit scope captured.\n\n1) Target files grouped by subsystem\n- Legacy exception paths to remove/gate\n - src/hooks/prometheus-md-only/*\n - src/hooks/write-existing-file-guard/*\n - src/hooks/compaction-todo-preserver/*\n - Any remaining .sisyphus/boulder exception touchpoints in hooks and command helpers\n- Command-discovery dedup surfaces\n - src/features/builtin-commands/templates/*\n - src/tools/slashcommand/*\n - Any duplicate command-discovery text paths discovered during migration streams\n\n2) Migration checklist items\n- [ ] Remove or explicitly gate legacy .sisyphus/boulder exception paths for beads mode\n- [ ] Eliminate unconditional markdown-preserver behavior in beads mode\n- [ ] Deduplicate command-discovery/help text to one canonical beads-first wording path\n- [ ] Verify no duplicate guidance blocks across templates/slashcommand layers\n- [ ] Confirm compatibility gates are explicit, minimal, and documented\n\n3) Acceptance criteria\n- Beads mode has no unconditional legacy markdown exception/preserver behavior.\n- Legacy compatibility remains only behind explicit gates.\n- Command discovery/help text is deduplicated and consistent across audited surfaces.\n\n4) Test files expected to change\n- tests/hooks/** (gating behavior for prometheus-md-only, write-existing-file-guard, compaction-preserver)\n- tests/features/builtin-commands/templates/** (deduped command text assertions)\n- tests/tools/slashcommand/** (command-discovery wording consistency)\n\n5) Residuals moved from implementation closures (0ls.2/0ls.3/0ls.4/0ls.5)\n- From 0ls.2 (subagents): remaining compatibility cleanup around Momus/plan-path legacy fallback handling; keep implementation prompts beads-first while centralizing fallback hardening/removal here.\n- From 0ls.3 (hooks): remaining legacy shim cleanup across write-existing-file-guard .sisyphus exceptions and compaction-todo-preserver gating/removal; continuation/status hooks already shifted to active-work-aware behavior.\n- From 0ls.4 (slash/templates): final command-discovery/help-text dedup across template and slashcommand layers to ensure one canonical beads-first wording path.\n- From 0ls.5 (start-work+boulder): residual boulder compatibility surfaces (legacy plan scanning constants/helpers and fallback APIs) to be removed or explicitly gated once no longer required.\n\n6) Verification context snapshot\n- Focused migration suites passing: 229 tests, 0 failures.\n- Prometheus md-only reminder trigger now on drafts path (not plans path), reducing plan-path coupling.","status":"closed","priority":1,"issue_type":"task","created_at":"2026-02-14T13:08:02.075066762+02:00","created_by":"max","updated_at":"2026-02-14T22:32:02.815713065+02:00","closed_at":"2026-02-14T22:32:02.815713065+02:00","close_reason":"Acceptance satisfied: compatibility cleanup completed with .sisyphus write-exception removal and compaction-todo-preserver gated to task_system mode, leaving beads mode without unconditional legacy markdown preservation paths.","dependencies":[{"issue_id":"oh-my-opencode-beads-0ls.8","depends_on_id":"oh-my-opencode-beads-0ls","type":"parent-child","created_at":"2026-02-14T13:08:02.075863132+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.8","depends_on_id":"oh-my-opencode-beads-0ls.3","type":"blocks","created_at":"2026-02-14T13:08:02.390046868+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.8","depends_on_id":"oh-my-opencode-beads-0ls.4","type":"blocks","created_at":"2026-02-14T13:08:02.494117563+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.8","depends_on_id":"oh-my-opencode-beads-0ls.5","type":"blocks","created_at":"2026-02-14T13:08:02.600728428+02:00","created_by":"max"}]} {"id":"oh-my-opencode-beads-0ls.9","title":"Estimate prompt token savings from beads migration","description":"Estimate prompt token savings from migrating planning execution to beads-driven workflows across subagents, hooks, and slash commands.","design":"Method: compare before/after prompt text for migrated files and estimate token deltas using a consistent tokenizer approximation (chars/4) and line-level diffs. Report per-surface and total savings.","acceptance_criteria":"Provide a concise estimate table by surface (subagents/hooks/slash/templates), total net token delta, assumptions, and caveats. Add estimate to final validation summary.","notes":"Token estimate complete against origin/dev baseline for 20 migrated prompt/template files using approx tokenizer chars/4. Total baseline: 42,152 tokens; current: 42,401; net delta: +249 (+0.59%). Atlas default vs GPT current: 2,885 vs 2,807 tokens (GPT is 78 tokens smaller, ~2.70%). Major savings came from Sisyphus (-471) and Hephaestus (-286); major increases from Momus (+244), Prometheus plan-template (+163), refactor template (+118), verification reminders (+94). Caveat: this is prompt-layer estimate only, not runtime session token usage.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-02-14T13:36:30.881670355+02:00","created_by":"max","updated_at":"2026-02-14T22:34:47.006616551+02:00","closed_at":"2026-02-14T22:34:47.006616551+02:00","close_reason":"Estimated token deltas documented with assumptions and caveats","dependencies":[{"issue_id":"oh-my-opencode-beads-0ls.9","depends_on_id":"oh-my-opencode-beads-0ls","type":"parent-child","created_at":"2026-02-14T13:36:30.88252503+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.9","depends_on_id":"oh-my-opencode-beads-0ls.6","type":"blocks","created_at":"2026-02-14T13:36:52.355769761+02:00","created_by":"max"},{"issue_id":"oh-my-opencode-beads-0ls.9","depends_on_id":"oh-my-opencode-beads-0ls.7","type":"blocks","created_at":"2026-02-14T13:36:52.455295821+02:00","created_by":"max"}]} +{"id":"oh-my-opencode-beads-1fn","title":"Make /start-work epic activation only","description":"Update start-work template/hook/tests to persist active epic and remove issue-centric flows.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T18:13:22.884886994+02:00","created_by":"maximhar","updated_at":"2026-02-15T18:37:43.327770169+02:00","closed_at":"2026-02-15T18:37:43.327770169+02:00","close_reason":"Closed"} +{"id":"oh-my-opencode-beads-23p","title":"Inline --deps in issue creation examples","description":"Update repository examples/prompts so dependency links are shown inline via --deps during bd create instead of separate bd dep add follow-up.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T18:58:14.09717079+02:00","created_by":"maximhar","updated_at":"2026-02-15T19:05:24.826846562+02:00","closed_at":"2026-02-15T19:05:24.826846562+02:00","close_reason":"Closed"} {"id":"oh-my-opencode-beads-6k6","title":"Fix Atlas asking user to pick issue after planning handoff","description":"Investigate and fix planner-to-executor handoff prompt so Atlas does not ask user to choose issue and instead auto-selects from bd ready.","status":"closed","priority":1,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T04:18:07.428863992+02:00","created_by":"maximhar","updated_at":"2026-02-15T04:18:53.766638516+02:00","closed_at":"2026-02-15T04:18:53.766638516+02:00","close_reason":"Updated /start-work template to auto-select ready issues instead of asking user to pick one."} +{"id":"oh-my-opencode-beads-6ls","title":"Fix literal typos in prompts","description":"Review recently edited prompt files and correct literal typos/wording mistakes.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T20:00:32.405279327+02:00","created_by":"maximhar","updated_at":"2026-02-15T20:01:40.886092531+02:00","closed_at":"2026-02-15T20:01:40.886092531+02:00","close_reason":"Closed"} {"id":"oh-my-opencode-beads-7sg","title":"Add GPT-optimized Sisyphus prompt with GPT-5.2/5.3 guidance","description":"Create a GPT-optimized Sisyphus prompt variant inspired by Atlas GPT and informed by official GPT-5.2/5.3 Codex prompting guidance. Preserve behavioral invariants and beads workflow; add model-based prompt routing; validate with tests.","design":"Approach: 1) add Sisyphus prompt-source routing (default vs gpt), 2) implement compact GPT scaffold sections (verbosity/scope/ambiguity/tool-rules/user-updates), 3) preserve dynamic section inserts for tools/agents/skills and core execution constraints, 4) keep default prompt unchanged for non-GPT. Validate with utils + targeted agent tests.","acceptance_criteria":"Sisyphus GPT models use a distinct prompt containing explicit GPT control sections; default models keep existing prompt. Existing behavior constraints remain (beads tracking/delegation/verification/completion). Tests pass for prompt routing and model config.","notes":"Refactored Sisyphus to Atlas-like structure: split into src/agents/sisyphus/{agent.ts,default.ts,gpt.ts,index.ts}. Moved prompt content builders into builder.ts for shared section reuse and kept model-based routing in agent.ts. Verified exports/imports from ./sisyphus and ../sisyphus resolve, GPT route returns scaffold prompt, non-GPT route returns default prompt. LSP diagnostics clean for new routing files.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-02-14T22:40:24.526533886+02:00","created_by":"max","updated_at":"2026-02-14T23:07:53.847482894+02:00","closed_at":"2026-02-14T23:07:53.847482894+02:00","close_reason":"Atlas-style file structure implemented for Sisyphus prompts with GPT/default split and routing verified"} {"id":"oh-my-opencode-beads-apz","title":"Require beads issue descriptions in agent prompts","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T02:21:46.728171491+02:00","created_by":"maximhar","updated_at":"2026-02-15T02:25:04.872492078+02:00","closed_at":"2026-02-15T02:25:04.872492078+02:00","close_reason":"Updated agent prompt examples to include --description on bd create and strengthened issue-quality guidance."} +{"id":"oh-my-opencode-beads-av9","title":"Switch active work state to epic-only","description":"Replace active_issue fields with active_epic fields and update storage/tests.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T18:13:18.35925013+02:00","created_by":"maximhar","updated_at":"2026-02-15T18:37:43.881138881+02:00","closed_at":"2026-02-15T18:37:43.881138881+02:00","close_reason":"Closed"} +{"id":"oh-my-opencode-beads-d64","title":"Adopt optimal beads flow in execution agents","description":"Use beads best-practice flow from Ian Bull article to refine orchestration/execution prompts and guidance.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T18:48:53.467333045+02:00","created_by":"maximhar","updated_at":"2026-02-15T18:55:18.884983831+02:00","closed_at":"2026-02-15T18:55:18.884983831+02:00","close_reason":"Closed"} {"id":"oh-my-opencode-beads-eag","title":"Make /start-work continue automatically on blockers","description":"Adjust /start-work instructions so Atlas continues autonomously by resolving blockers when no ready issues exist, instead of reporting blockers and waiting for user input.","status":"closed","priority":1,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T12:53:42.332377172+02:00","created_by":"maximhar","updated_at":"2026-02-15T12:54:08.38852895+02:00","closed_at":"2026-02-15T12:54:08.38852895+02:00","close_reason":"Updated /start-work template to enter unblock mode automatically when no ready issues exist."} {"id":"oh-my-opencode-beads-ebs","title":"Enforce assigned issue ID and dependency linkage in Atlas/Junior","description":"Require Atlas to pass explicit ASSIGNED_ISSUE_ID in delegations and require Junior to link newly created issues back to assigned issue.","status":"closed","priority":1,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T02:39:39.35310188+02:00","created_by":"maximhar","updated_at":"2026-02-15T02:41:19.158519289+02:00","closed_at":"2026-02-15T02:41:19.158519289+02:00","close_reason":"Enforced ASSIGNED_ISSUE_ID delegation in Atlas and mandatory dependency linkage for Junior-created issues."} +{"id":"oh-my-opencode-beads-f0m","title":"Adjust Prometheus gate and reminder hook targeting","description":"Ask new-vs-continue only when incomplete epics exist; extend inline-deps reminder to Atlas/Prometheus for non-epic creates.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T19:32:38.373320206+02:00","created_by":"maximhar","updated_at":"2026-02-15T19:36:04.712018295+02:00","closed_at":"2026-02-15T19:36:04.712018295+02:00","close_reason":"Closed"} {"id":"oh-my-opencode-beads-gi2","title":"Align planner prompts with /start-work handoff","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T02:17:22.785049283+02:00","created_by":"maximhar","updated_at":"2026-02-15T02:19:22.993855823+02:00","closed_at":"2026-02-15T02:19:22.993855823+02:00","close_reason":"Updated Prometheus planner handoff wording to /start-work and removed lingering bd-ready-first transition phrasing."} {"id":"oh-my-opencode-beads-krk","title":"Remove legacy task system and experimental task_system flag","notes":"Continued cleanup of legacy task-system flags. Removed experimental.task_system/new_task_system_enabled references from src + generated schema, removed agent-config forwarding of task-system toggle, and updated related tests/fixtures/docs. Verification: focused suite passed (tool-config-handler + tasks-todowrite-disabler + create-continuation-hooks + tool-registry). Broader suites still not runnable in this environment due missing runtime dependencies (e.g., zod, @opencode-ai/plugin/tool).","status":"in_progress","priority":1,"issue_type":"task","created_at":"2026-02-14T23:11:24.5066522+02:00","created_by":"max","updated_at":"2026-02-14T23:59:18.613978404+02:00"} +{"id":"oh-my-opencode-beads-lam","title":"Enforce Prometheus new-vs-continue epic gate","description":"Add mandatory plan mode question, epic creation/validation gate, and strict parent-child dependency enforcement in Prometheus prompts.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T19:16:37.845120893+02:00","created_by":"maximhar","updated_at":"2026-02-15T19:17:00.098217711+02:00","closed_at":"2026-02-15T19:17:00.098217711+02:00","close_reason":"Closed"} {"id":"oh-my-opencode-beads-mgh","title":"Relax Atlas global closure rule and add issue-link reminder hook","description":"Relax Atlas global-open-issues verification wording and add a post-tool reminder hook that nudges subagents to link newly created beads issues to ASSIGNED_ISSUE_ID.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T02:44:20.484176479+02:00","created_by":"maximhar","updated_at":"2026-02-15T02:48:32.32497848+02:00","closed_at":"2026-02-15T02:48:32.32497848+02:00","close_reason":"Relaxed Atlas scope checks to assigned issue context and added hook-based reminder for linking newly created delegated issues."} {"id":"oh-my-opencode-beads-pei","title":"Add acceptance-criteria guidance to Atlas orchestration","description":"Update Atlas prompts to require acceptance criteria when creating beads issues and to verify delegated output against acceptance criteria during QA.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T02:26:53.211073694+02:00","created_by":"maximhar","updated_at":"2026-02-15T02:29:53.400318543+02:00","closed_at":"2026-02-15T02:29:53.400318543+02:00","close_reason":"Added acceptance criteria guidance to Atlas issue creation and delegated-work verification checklist."} +{"id":"oh-my-opencode-beads-qvl","title":"Make continuation enforcement epic-status based","description":"Update continuation hooks/session todo status/tests to use active epic status.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T18:13:23.107589283+02:00","created_by":"maximhar","updated_at":"2026-02-15T18:37:43.770097671+02:00","closed_at":"2026-02-15T18:37:43.770097671+02:00","close_reason":"Closed"} {"id":"oh-my-opencode-beads-rbk","title":"Enforce assigned issue linkage in Atlas and Sisyphus-Junior prompts","status":"closed","priority":1,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T02:38:55.898536894+02:00","created_by":"maximhar","updated_at":"2026-02-15T02:39:19.84797666+02:00","closed_at":"2026-02-15T02:39:19.84797666+02:00","close_reason":"Exploratory prompt review only; no implementation started in this step."} +{"id":"oh-my-opencode-beads-s9k","title":"Align Atlas/Prometheus/Sisyphus prompts to active epic","description":"Update agent prompts and atlas reminders/event hooks for epic-scoped execution.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T18:13:22.996236183+02:00","created_by":"maximhar","updated_at":"2026-02-15T18:37:43.54818313+02:00","closed_at":"2026-02-15T18:37:43.54818313+02:00","close_reason":"Closed"} +{"id":"oh-my-opencode-beads-t9k","title":"Fix prompt typos and command examples","description":"Correct prompt typos/erroneous beads commands in Atlas and Prometheus prompt files.","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T19:58:32.180179101+02:00","created_by":"maximhar","updated_at":"2026-02-15T19:58:50.460169934+02:00","closed_at":"2026-02-15T19:58:50.460169934+02:00","close_reason":"Closed"} {"id":"oh-my-opencode-beads-ynx","title":"Remove legacy fallback references from agent prompts","status":"closed","priority":2,"issue_type":"task","owner":"maxim.harizanov@gmail.com","created_at":"2026-02-15T02:09:37.029875473+02:00","created_by":"maximhar","updated_at":"2026-02-15T02:11:40.582180657+02:00","closed_at":"2026-02-15T02:11:40.582180657+02:00","close_reason":"Removed legacy fallback plan-file wording from agent prompts and aligned Momus/Prometheus guidance to beads-only references."} diff --git a/docs/guide/understanding-orchestration-system.md b/docs/guide/understanding-orchestration-system.md index 2578f1a7..1ebbb490 100644 --- a/docs/guide/understanding-orchestration-system.md +++ b/docs/guide/understanding-orchestration-system.md @@ -162,7 +162,7 @@ The legacy approach used `.sisyphus/plans/*.md` files and `boulder.json` for sta | Aspect | Legacy Plan Files | Beads | |--------|------------------|-------| | **State** | `boulder.json` (fragile) | `.beads/` (git-synced) | -| **Dependencies** | Implicit task ordering | Explicit `bd dep add` | +| **Dependencies** | Implicit task ordering | Explicit `bd create ... --deps ...` | | **Resumability** | `/start-work` reads boulder | `bd ready` shows unblocked work | | **Visibility** | Read plan file manually | `bd ready`, `bd blocked`, `bd stats` | | **Granularity** | Monolithic plan | Individual issues with metadata | @@ -189,11 +189,8 @@ flowchart LR ```bash bd create --title="Build frontend" --type=task # beads-001 bd create --title="Build backend" --type=task # beads-002 -bd create --title="Integration tests" --type=task # beads-003 -bd create --title="Deploy" --type=task # beads-004 -bd dep add beads-003 beads-001 # tests depend on frontend -bd dep add beads-003 beads-002 # tests depend on backend -bd dep add beads-004 beads-003 # deploy depends on tests +bd create --title="Integration tests" --type=task --deps blocks:beads-001,blocks:beads-002 # beads-003 +bd create --title="Deploy" --type=task --deps blocks:beads-003 # beads-004 ``` --- diff --git a/docs/orchestration-guide.md b/docs/orchestration-guide.md index 915972f5..7ae3cb84 100644 --- a/docs/orchestration-guide.md +++ b/docs/orchestration-guide.md @@ -109,9 +109,7 @@ Monday 2:00 PM (NEW SESSION) ```bash bd create --title="Build frontend" --type=task # beads-001 bd create --title="Build backend" --type=task # beads-002 -bd create --title="Integration tests" --type=task # beads-003 -bd dep add beads-003 beads-001 # tests depend on frontend -bd dep add beads-003 beads-002 # tests depend on backend +bd create --title="Integration tests" --type=task --deps blocks:beads-001,blocks:beads-002 # beads-003 bd ready # Shows beads-001, beads-002 (no blockers) bd blocked # Shows beads-003 (blocked by 001, 002) @@ -122,7 +120,7 @@ bd blocked # Shows beads-003 (blocked by 001, 002) | Aspect | Legacy Plan Files | Beads | |--------|------------------|-------| | **Persistence** | `.sisyphus/plans/*.md` + `boulder.json` | `.beads/` directory, git-synced | -| **Dependencies** | Implicit (task ordering) | Explicit (`bd dep add`) | +| **Dependencies** | Implicit (task ordering) | Explicit (`bd create ... --deps ...`) | | **Cross-session** | `boulder.json` state | Issue status persists naturally | | **Visibility** | Read plan file manually | `bd ready`, `bd blocked`, `bd stats` | | **Granularity** | Monolithic plan file | Individual trackable issues | @@ -292,7 +290,7 @@ Prometheus starts in **interview mode** by default. Instead of immediately creat When the user requests "Make it a plan", plan generation begins. 1. **Metis Consultation**: Confirms any missed requirements or risk factors. -2. **Plan Creation**: Writes a plan document and decomposes work into beads issues via `bd create`, with dependencies established via `bd dep add`. +2. **Plan Creation**: Writes a plan document and decomposes work into beads issues via `bd create --deps ...` for inline dependency wiring. 3. **Handoff**: Once issues are created, guides user to begin execution with `bd ready`. ### Phase 3: Execution @@ -372,7 +370,7 @@ You can control related features in `oh-my-opencode.json`. 2. **Granular Issues**: Decompose work into small, independently-completable beads issues. Each issue should be achievable in a single focused session. -3. **Use Dependencies**: Establish `bd dep add` relationships to ensure correct execution order. `bd ready` automatically surfaces unblocked work. +3. **Use Dependencies**: Declare dependencies inline with `bd create --deps ...` to ensure correct execution order. `bd ready` automatically surfaces unblocked work. 4. **Trust Beads Continuity**: Don't worry about session interruptions. `bd ready` will always show remaining work with correct dependency resolution. diff --git a/docs/task-system.md b/docs/task-system.md index 1ca13de4..afe1a355 100644 --- a/docs/task-system.md +++ b/docs/task-system.md @@ -15,7 +15,7 @@ Beads provides a git-synced issue graph with full dependency tracking. Issues pe | `bd show ` | View issue details and dependencies | | `bd update --status in_progress` | Claim work | | `bd close ` | Mark issue complete | -| `bd dep add ` | Add dependency | +| `bd create --title="..." --type=task --deps blocks:` | Create issue with dependency | | `bd blocked` | Show all blocked issues | | `bd stats` | Project statistics | | `bd sync` | Sync with git | @@ -29,7 +29,7 @@ Issues support these fields: - **type**: `task`, `bug`, `feature` - **priority**: 0–4 (0=critical, 4=backlog) - **status**: `open`, `in_progress`, `closed` -- **dependencies**: Explicit via `bd dep add` +- **dependencies**: Explicit via `bd create --deps ...` - **notes/design/description**: Rich metadata ### Dependencies and Execution Order @@ -48,9 +48,7 @@ Issues support these fields: ```bash bd create --title="Build frontend" --type=task # beads-001 bd create --title="Build backend" --type=task # beads-002 -bd create --title="Run integration tests" --type=task # beads-003 -bd dep add beads-003 beads-001 # tests depend on frontend -bd dep add beads-003 beads-002 # tests depend on backend +bd create --title="Run integration tests" --type=task --deps blocks:beads-001,blocks:beads-002 # beads-003 ``` ```bash diff --git a/src/agents/atlas/agent.ts b/src/agents/atlas/agent.ts index 92e5f655..2c1d2020 100644 --- a/src/agents/atlas/agent.ts +++ b/src/agents/atlas/agent.ts @@ -1,7 +1,7 @@ /** * Atlas - Master Orchestrator Agent * - * Orchestrates work via task() to complete ALL beads issues until fully done. + * Orchestrates work via task() to complete the active epic until fully done. * You are the conductor of a symphony of specialized agents. * * Routing: @@ -100,7 +100,7 @@ export function createAtlasAgent(ctx: OrchestratorContext): AgentConfig { const baseConfig = { description: - "Orchestrates work via task() to complete ALL beads issues until fully done. (Atlas - OhMyOpenCode)", + "Orchestrates work via task() to complete the active epic until fully done. (Atlas - OhMyOpenCode)", mode: MODE, ...(ctx.model ? { model: ctx.model } : {}), temperature: 0.1, @@ -120,7 +120,7 @@ export const atlasPromptMetadata: AgentPromptMetadata = { triggers: [ { domain: "Beads issue orchestration", - trigger: "Complete ALL beads issues in the issue graph with verification", + trigger: "Complete the active epic with verification", }, { domain: "Multi-agent coordination", @@ -138,5 +138,5 @@ export const atlasPromptMetadata: AgentPromptMetadata = { "When user wants to execute tasks manually", ], keyTrigger: - "Beads issues provided OR multiple beads issues requiring multi-agent orchestration", + "Active epic provided OR multiple epic-scoped issues requiring multi-agent orchestration", } diff --git a/src/agents/atlas/default.ts b/src/agents/atlas/default.ts index 103b02d9..8c107e8b 100644 --- a/src/agents/atlas/default.ts +++ b/src/agents/atlas/default.ts @@ -19,7 +19,7 @@ You never write code yourself. You orchestrate specialists who do. -Complete ALL assigned beads issues via \`task()\` until fully done. +Complete the ACTIVE EPIC only via \`task()\` until the epic is closed. One task per delegation. Parallel when independent. Verify everything. @@ -62,7 +62,7 @@ Every \`task()\` prompt MUST include ALL 6 sections: \`\`\`markdown ## 1. TASK -[Quote EXACT beads issue title/id. Include ASSIGNED_ISSUE_ID=. One issue per delegation.] +[Quote EXACT beads issue title/id. Include ASSIGNED_EPIC_ID= and ASSIGNED_ISSUE_ID=. One issue per delegation.] ## 2. EXPECTED OUTCOME - [ ] Files created/modified: [exact paths] @@ -78,8 +78,8 @@ Every \`task()\` prompt MUST include ALL 6 sections: - Follow pattern in [reference file:lines] - Write tests for [specific cases] - Append findings to notepad (never overwrite) -- If subagent creates new issues, require \ - \`bd dep add \` +- If subagent creates new issues, require inline deps at creation (example): \ + \`bd create --title="..." --type=task --priority=2 --deps parent-child:,discovered-from:\` ## 5. MUST NOT DO - Do NOT modify files outside [scope] @@ -88,7 +88,7 @@ Every \`task()\` prompt MUST include ALL 6 sections: ## 6. CONTEXT ### Notepad Paths -- READ: .sisyphus/notepads/{plan-name}/*.md +- READ: .sisyphus/notepads/{active-epic-id}/*.md - WRITE: Append to appropriate category ### Inherited Wisdom @@ -105,15 +105,15 @@ Every \`task()\` prompt MUST include ALL 6 sections: ## Step 0: Register Tracking \`\`\`bash -bd create --title="Orchestrate remaining beads issues" --description="Coordinate ready issues, blockers, and delegation order for this session." --acceptance="1) Ready queue analyzed 2) Delegation order defined 3) Remaining blockers documented" --type=task --priority=1 +bd create --title="Orchestrate active epic execution" --description="Coordinate ready issues, blockers, and delegation order inside the active epic for this session." --acceptance="1) Active epic analyzed 2) Delegation order defined 3) Remaining blockers documented" --type=task --priority=1 bd update --status in_progress \`\`\` -## Step 1: Analyze Issue Graph +## Step 1: Analyze Active Epic Graph -1. Inspect open/in-progress/blocked issue queues -2. Identify ready issues and dependency blockers -3. Extract parallelizability info from each issue +1. Inspect open/in-progress/blocked issues in the active epic +2. Identify ready active-epic issues and dependency blockers +3. Extract parallelizability info from each active-epic issue 4. Build parallelization map: - Which tasks can run simultaneously? - Which have dependencies? @@ -121,12 +121,30 @@ bd update --status in_progress Use: \`\`\`bash -bd list --status=open -bd list --status=in_progress +bd show +bd show --json bd blocked -bd ready +bd ready --json \`\`\` +**Ground truth rule**: \`bd ready --json\` is the execution source of truth. Prefer it over ad-hoc queue scanning. + +## Step 1.5: Think -> Create -> Act (Beads Loop) + +For each active-epic cycle: +1. **Think**: Select the highest-priority unblocked issue from \`bd ready --json\`. +2. **Create**: If you discover follow-up work (>2 minutes), file it immediately. +3. **Act**: Execute and close the current issue before moving to the next. + +Dependency types are mandatory and explicit: +- \`blocks\`: hard prerequisite (affects ready state) +- \`parent-child\`: decomposition under epic/sub-epic (affects ready state) +- \`related\`: contextual linkage only +- \`discovered-from\`: discovery audit trail for newly found work + +When discovered work emerges, file and link immediately (example): +\`bd create --title="..." --type=task --priority=2 --deps parent-child:,discovered-from:\` + Output: \`\`\` TASK ANALYSIS: @@ -138,12 +156,12 @@ TASK ANALYSIS: ## Step 2: Initialize Notepad \`\`\`bash -mkdir -p .sisyphus/notepads/{plan-name} +mkdir -p .sisyphus/notepads/{active-epic-id} \`\`\` Structure: \`\`\` -.sisyphus/notepads/{plan-name}/ +.sisyphus/notepads/{active-epic-id}/ learnings.md # Conventions, patterns decisions.md # Architectural choices issues.md # Problems, gotchas @@ -166,9 +184,9 @@ If sequential: **MANDATORY: Read notepad first** \`\`\` -glob(".sisyphus/notepads/{plan-name}/*.md") -Read(".sisyphus/notepads/{plan-name}/learnings.md") -Read(".sisyphus/notepads/{plan-name}/issues.md") +glob(".sisyphus/notepads/{active-epic-id}/*.md") +Read(".sisyphus/notepads/{active-epic-id}/learnings.md") +Read(".sisyphus/notepads/{active-epic-id}/issues.md") \`\`\` Extract wisdom and include in prompt. @@ -223,9 +241,9 @@ After EVERY delegation, complete ALL of these steps — no shortcuts: After verification, check assigned issue and direct blockers/dependencies: \`\`\`bash bd show -bd ready +bd ready --json \`\`\` -Review assigned-scope status. Do not require global issue closure for delegated work. +Review assigned-scope status. Do not require full active-epic closure for delegated work. #### E. Validate Against Acceptance Criteria (MANDATORY) 1. Read assigned issue via \`bd show \` @@ -279,14 +297,26 @@ If task fails: ### 3.6 Loop Until Done -Repeat Step 3 until all tasks complete. +Repeat Step 3 until the active epic is complete. + +### 3.7 Session Bookends (MANDATORY) + +Start each execution cycle: +- Run \`bd ready --json\` +- Run \`bd show --json\` +- Ensure selected issue is \`in_progress\` before delegation + +End each execution cycle/session: +- Close completed issue immediately: \`bd close \` +- Sync beads state before handoff: \`bd sync\` +- If session ends, land the plane and ensure changes are pushed ## Step 4: Final Report \`\`\` ORCHESTRATION COMPLETE -ISSUE TRACKING: [epic/issue ids] +EPIC TRACKING: [active epic id + delegated issue ids] COMPLETED: [N/N] FAILED: [count] @@ -349,8 +379,8 @@ task(category="quick", load_skills=[], run_in_background=false, prompt="Task 4.. \`\`\` **Path convention**: -- Work Item: beads issue id/title (READ ONLY) -- Notepad: \`.sisyphus/notepads/{work-item}/\` (READ/APPEND) +- Work Item: active epic id/title (READ ONLY) +- Notepad: \`.sisyphus/notepads/{active-epic-id}/\` (READ/APPEND) @@ -365,7 +395,7 @@ You are the QA gate. Subagents lie. Verify EVERYTHING. 3. Run test suite → ALL pass 4. **\`Read\` EVERY changed file line by line** → logic matches requirements 5. **Cross-check**: subagent's claims vs actual code — do they match? -6. **Check issue status**: \`bd list --status=open\` and \`bd ready\`, confirm remaining work +6. **Check epic status**: \`bd show --json\` and \`bd ready --json\`, confirm remaining work **Evidence required**: | Action | Evidence | @@ -374,7 +404,7 @@ You are the QA gate. Subagents lie. Verify EVERYTHING. | Build | Exit code 0 | | Tests | All pass | | Logic correct | You read the code and can explain what it does | -| Issue status | \`bd list --status=open\` confirms progress | +| Epic status | \`bd show --json\` + \`bd ready --json\` confirms progress | **No evidence = not complete. Skipping manual review = rubber-stamping broken work.** @@ -386,7 +416,7 @@ You are the QA gate. Subagents lie. Verify EVERYTHING. - Read files (for context, verification) - Run commands (for verification) - Use lsp_diagnostics, grep, glob -- Manage beads issues (bd create/update/close/list/ready) +- Manage active-epic execution (bd create/update/close/list/ready/show/sync) - Coordinate and verify **YOU DELEGATE**: diff --git a/src/agents/atlas/gpt.ts b/src/agents/atlas/gpt.ts index 91ffc65e..935d8341 100644 --- a/src/agents/atlas/gpt.ts +++ b/src/agents/atlas/gpt.ts @@ -24,7 +24,7 @@ You DELEGATE, COORDINATE, and VERIFY. You NEVER write code yourself. -Complete ALL assigned beads issues via \`task()\` until fully done. +Complete the ACTIVE EPIC only via \`task()\` until the epic is closed. - One task per delegation - Parallel when independent - Verify everything @@ -97,7 +97,7 @@ Every \`task()\` prompt MUST include ALL 6 sections: \`\`\`markdown ## 1. TASK -[Quote EXACT beads issue title/id. Include ASSIGNED_ISSUE_ID=. One issue per delegation.] +[Quote EXACT beads issue title/id. Include ASSIGNED_EPIC_ID= and ASSIGNED_ISSUE_ID=. One issue per delegation.] ## 2. EXPECTED OUTCOME - [ ] Files created/modified: [exact paths] @@ -113,8 +113,8 @@ Every \`task()\` prompt MUST include ALL 6 sections: - Follow pattern in [reference file:lines] - Write tests for [specific cases] - Append findings to notepad (never overwrite) -- If subagent creates new issues, require \ - \`bd dep add \` +- If subagent creates new issues, require inline deps at creation (example): \ + \`bd create --title="..." --type=task --priority=2 --deps parent-child:,discovered-from:\` ## 5. MUST NOT DO - Do NOT modify files outside [scope] @@ -123,7 +123,7 @@ Every \`task()\` prompt MUST include ALL 6 sections: ## 6. CONTEXT ### Notepad Paths -- READ: .sisyphus/notepads/{plan-name}/*.md +- READ: .sisyphus/notepads/{active-epic-id}/*.md - WRITE: Append to appropriate category ### Inherited Wisdom @@ -140,24 +140,42 @@ Every \`task()\` prompt MUST include ALL 6 sections: ## Step 0: Register Tracking \`\`\`bash -bd create --title="Orchestrate remaining beads issues" --description="Coordinate ready issues, blockers, and delegation order for this session." --acceptance="1) Ready queue analyzed 2) Delegation order defined 3) Remaining blockers documented" --type=task --priority=1 +bd create --title="Orchestrate active epic execution" --description="Coordinate ready issues, blockers, and delegation order inside the active epic for this session." --acceptance="1) Active epic analyzed 2) Delegation order defined 3) Remaining blockers documented" --type=task --priority=1 bd update --status in_progress \`\`\` -## Step 1: Analyze Issue Graph +## Step 1: Analyze Active Epic Graph -1. Inspect open/in-progress/blocked issue queues -2. Identify ready issues and dependency blockers +1. Inspect open/in-progress/blocked issues in the active epic +2. Identify ready active-epic issues and dependency blockers 3. Build parallelization map Use: \`\`\`bash -bd list --status=open -bd list --status=in_progress +bd show +bd show --json bd blocked -bd ready +bd ready --json \`\`\` +**Ground truth rule**: \`bd ready --json\` is the execution source of truth. Prefer it over ad-hoc queue scanning. + +## Step 1.5: Think -> Create -> Act (Beads Loop) + +For each active-epic cycle: +1. **Think**: Select the highest-priority unblocked issue from \`bd ready --json\`. +2. **Create**: If you discover follow-up work (>2 minutes), file it immediately. +3. **Act**: Execute and close the current issue before moving to the next. + +Dependency types are mandatory and explicit: +- \`blocks\`: hard prerequisite (affects ready state) +- \`parent-child\`: decomposition under epic/sub-epic (affects ready state) +- \`related\`: contextual linkage only +- \`discovered-from\`: discovery audit trail for newly found work + +When discovered work emerges, file and link immediately (example): +\`bd create --title="..." --type=task --priority=2 --deps parent-child:,discovered-from:\` + Output format: \`\`\` TASK ANALYSIS: @@ -169,7 +187,7 @@ TASK ANALYSIS: ## Step 2: Initialize Notepad \`\`\`bash -mkdir -p .sisyphus/notepads/{plan-name} +mkdir -p .sisyphus/notepads/{active-epic-id} \`\`\` Structure: learnings.md, decisions.md, issues.md, problems.md @@ -182,8 +200,8 @@ Structure: learnings.md, decisions.md, issues.md, problems.md ### 3.2 Pre-Delegation (MANDATORY) \`\`\` -Read(".sisyphus/notepads/{plan-name}/learnings.md") -Read(".sisyphus/notepads/{plan-name}/issues.md") +Read(".sisyphus/notepads/{active-epic-id}/learnings.md") +Read(".sisyphus/notepads/{active-epic-id}/issues.md") \`\`\` Extract wisdom → include in prompt. @@ -230,9 +248,9 @@ After EVERY delegation, complete ALL steps — no shortcuts: After verification, check assigned issue and direct blockers/dependencies: \`\`\`bash bd show -bd ready +bd ready --json \`\`\` -Review assigned-scope status. Do not require global issue closure for delegated work. +Review assigned-scope status. Do not require full active-epic closure for delegated work. #### E. Validate Against Acceptance Criteria (MANDATORY) 1. Read assigned issue via \`bd show \` @@ -259,13 +277,25 @@ task(session_id="ses_xyz789", load_skills=[...], prompt="FAILED: {error}. Fix by ### 3.6 Loop Until Done -Repeat Step 3 until all tasks complete. +Repeat Step 3 until the active epic is complete. + +### 3.7 Session Bookends (MANDATORY) + +Start each execution cycle: +- Run \`bd ready --json\` +- Run \`bd show --json\` +- Ensure selected issue is \`in_progress\` before delegation + +End each execution cycle/session: +- Close completed issue immediately: \`bd close \` +- Sync beads state before handoff: \`bd sync\` +- If session ends, land the plane and ensure changes are pushed ## Step 4: Final Report \`\`\` ORCHESTRATION COMPLETE -ISSUE TRACKING: [epic/issue ids] +EPIC TRACKING: [active epic id + delegated issue ids] COMPLETED: [N/N] FAILED: [count] @@ -312,8 +342,8 @@ task(category="quick", load_skills=[], run_in_background=false, prompt="Task 3.. - Instruct subagent to append findings (never overwrite) **Paths**: -- Work Item: beads issue id/title (READ ONLY) -- Notepad: \`.sisyphus/notepads/{work-item}/\` (READ/APPEND) +- Work Item: active epic id/title (READ ONLY) +- Notepad: \`.sisyphus/notepads/{active-epic-id}/\` (READ/APPEND) @@ -328,7 +358,7 @@ You are the QA gate. Subagents lie. Verify EVERYTHING. | 3 | \`Bash("bun test")\` | all pass | | 4 | \`Read\` EVERY changed file | logic matches requirements | | 5 | Cross-check claims vs code | subagent's report matches reality | -| 6 | \`bd list --status=open\` | issue status confirmed | +| 6 | \`bd show --json\` + \`bd ready --json\` | epic status confirmed | **Manual code review (Step 4) is NON-NEGOTIABLE:** - Read every line of every changed file @@ -343,7 +373,7 @@ You are the QA gate. Subagents lie. Verify EVERYTHING. - Read files (context, verification) - Run commands (verification) - Use lsp_diagnostics, grep, glob -- Manage beads issues (bd create/update/close/list/ready) +- Manage active-epic execution (bd create/update/close/list/ready/show/sync) - Coordinate and verify **YOU DELEGATE**: diff --git a/src/agents/hephaestus.ts b/src/agents/hephaestus.ts index 87007c54..0b2de183 100644 --- a/src/agents/hephaestus.ts +++ b/src/agents/hephaestus.ts @@ -40,7 +40,7 @@ function buildTodoDisciplineSection(_useTaskSystem: boolean): string { 2. **Before each step**: \`bd update --status in_progress\` (ONE at a time) 3. **After each step**: \`bd close \` IMMEDIATELY (NEVER batch) 4. **Scope changes**: Create/update issues BEFORE proceeding -5. **Dependencies**: \`bd dep add \` when issues block each other +5. **Dependencies**: declare inline when creating: \`bd create ... --deps blocks:\` when issues block each other ### Why This Matters diff --git a/src/agents/prometheus/behavioral-summary.ts b/src/agents/prometheus/behavioral-summary.ts index 9125f9e1..30ab3052 100644 --- a/src/agents/prometheus/behavioral-summary.ts +++ b/src/agents/prometheus/behavioral-summary.ts @@ -30,7 +30,7 @@ Draft cleaned up: .sisyphus/drafts/{name}.md (deleted) To begin execution handoff, run: /start-work -(After handoff, Atlas uses beads issue flow: \`bd ready\`, \`bd update\`, \`bd close\`.) +(After handoff, /start-work first checks incomplete epics via \`bd list --type epic --status=in_progress --json\` then \`bd list --type epic --status=open --json\`, activates the target epic, and Atlas executes only inside that epic.) To begin execution: Atlas will orchestrate the issue graph, or work issues individually. @@ -47,7 +47,7 @@ To begin execution: | **Interview Mode** | Default state | Consult, research, discuss. Run clearance check after each turn. | CREATE & UPDATE continuously | | **Auto-Transition** | Clearance check passes OR explicit trigger | Summon Metis (auto) → Create beads issues → Present summary → Offer choice | READ draft for context | | **Momus Loop** | User chooses "High Accuracy Review" | Loop through Momus until OKAY | REFERENCE draft content | -| **Handoff** | User chooses "Start Work" (or Momus approved) | Tell user to run \`/start-work\` for execution handoff | DELETE draft file | +| **Handoff** | User chooses "Start Work" (or Momus approved) | Tell user to run \`/start-work\` to activate epic and hand off execution | DELETE draft file | ## Key Principles diff --git a/src/agents/prometheus/identity-constraints.ts b/src/agents/prometheus/identity-constraints.ts index fda67626..c6ad4773 100644 --- a/src/agents/prometheus/identity-constraints.ts +++ b/src/agents/prometheus/identity-constraints.ts @@ -49,7 +49,7 @@ This is not a suggestion. This is your fundamental identity constraint. **YOUR ONLY OUTPUTS:** - Questions to clarify requirements - Research via explore/librarian agents -- Work plans recorded as beads issues (\`bd create/update/dep add\`) with design and notes +- Work plans recorded as beads issues (\`bd create --deps ...\` + \`bd update\`) with design and notes - Drafts saved to \`.sisyphus/drafts/*.md\` (working memory during interview) ### When User Seems to Want Direct Work @@ -66,7 +66,7 @@ Here's why planning matters: 3. Enables parallel work and delegation 4. Ensures nothing is forgotten -Let me quickly interview you to create a focused plan as beads issues. Then Atlas will orchestrate execution immediately. +Let me quickly interview you to create a focused plan as beads issues. Then /start-work will check in-progress/open epics, activate the target epic, and Atlas will orchestrate execution inside that epic. This takes 2-3 minutes but saves hours of debugging. \`\`\` @@ -115,9 +115,10 @@ This constraint is enforced by the prometheus-md-only hook. Non-.md writes will **Plans are recorded as beads issues, NOT as files.** **ALLOWED OUTPUTS:** -- Beads issues: \`bd create --title="..." --description="..." --type=task|feature --priority=N\` +- Parent epic: \`bd create --title="..." --description="..." --type=epic --priority=N\` +- Child issues: \`bd create --title="..." --description="..." --type=task|feature --priority=N --deps parent-child:[,blocks:]\` - Issue metadata: \`bd update --description/--design/--notes\` -- Dependencies: \`bd dep add \` +- Dependencies: inline on create, always include \`parent-child:\`; add \`blocks:\` only when needed for execution order - Drafts (working memory only): \`.sisyphus/drafts/{name}.md\` **FORBIDDEN OUTPUTS:** @@ -140,7 +141,7 @@ Your plan-of-record is the beads issue graph. Drafts are temporary working memor - Say "this is too big, let's break it into multiple planning sessions" **ALWAYS:** -- Create ALL tasks as beads issues with proper dependencies (\`bd dep add\`) +- Create ALL tasks as beads issues with proper dependencies (inline \`--deps\` on \`bd create\`) - If the work is large, the issue graph simply has more nodes - Include the COMPLETE scope of what user requested in ONE planning session - Trust that the executor (Atlas) can handle large issue graphs @@ -159,10 +160,13 @@ Your plan-of-record is the beads issue graph. Drafts are temporary working memor **Beads issues are your plan-of-record. Each task = one issue.** **MANDATORY PROTOCOL:** -1. **Create ALL issues for the plan using \`bd create\`** -2. **Add dependencies between issues using \`bd dep add\`** -3. **Record design context on the parent/epic issue using \`bd update --design\`** -4. **Record working notes using \`bd update --notes\`** +1. **Ask and resolve plan mode first: NEW plan vs CONTINUE existing epic** +2. **If NEW**: create parent epic first using \`bd create --type=epic\`. +3. **If CONTINUE**: require epic id and validate via \`bd show --json\` before creating child issues. +4. **Create ALL child issues with strict parent link using \`--deps parent-child:\`** +5. **Add \`blocks:\` dependencies only when execution order requires it** +6. **Record design context on the parent/epic issue using \`bd update --design\`** +7. **Record working notes using \`bd update --notes\`** **EACH ISSUE MUST INCLUDE:** - Clear title describing the task @@ -173,15 +177,18 @@ Your plan-of-record is the beads issue graph. Drafts are temporary working memor **FOR COMPLEX PLANS:** \`\`\` -✅ bd create --title="Setup auth module" --description="Create module scaffold and interfaces for auth flows." --type=task --priority=1 -✅ bd create --title="Implement JWT tokens" --description="Add token issuance and verification paths used by auth module." --type=task --priority=1 -✅ bd dep add # JWT depends on auth setup -✅ bd update --design="Pattern: follow src/services/auth.ts..." +✅ bd create --title="Auth modernization epic" --description="Plan-level context for auth rollout." --type=epic --priority=1 +✅ bd create --title="Setup auth module" --description="Create module scaffold and interfaces for auth flows." --type=task --priority=1 --deps parent-child: +✅ bd create --title="Implement JWT tokens" --description="Add token issuance and verification paths used by auth module." --type=task --priority=1 --deps parent-child:,blocks: +✅ bd update --design="Pattern: follow src/services/auth.ts..." \`\`\` **SELF-CHECK after creating issues:** +- [ ] Plan mode captured explicitly (NEW or CONTINUE)? +- [ ] Parent epic exists (created or validated)? - [ ] Every task from the plan has a corresponding beads issue? -- [ ] Dependencies correctly express execution order? +- [ ] Every non-epic issue has \`parent-child:\`? +- [ ] \`blocks\` dependencies correctly express execution order? - [ ] Design context recorded on relevant issues? @@ -277,7 +284,7 @@ CLEARANCE CHECKLIST: | **Presenting Metis findings + questions** | "Metis identified these gaps. [questions]" | | **High accuracy question** | "Do you need high accuracy mode with Momus review?" | | **Momus loop in progress** | "Momus rejected. Fixing issues and resubmitting..." | -| **Plan complete + execution guidance** | "Plan recorded as beads issues. Run \`/start-work\` to transition to execution." | +| **Plan complete + execution guidance** | "Plan recorded as beads issues. Run \`/start-work\` to activate the epic and transition to execution." | ### Enforcement Checklist (MANDATORY) diff --git a/src/agents/prometheus/interview-mode.ts b/src/agents/prometheus/interview-mode.ts index 978dda0b..fbf05f4f 100644 --- a/src/agents/prometheus/interview-mode.ts +++ b/src/agents/prometheus/interview-mode.ts @@ -33,6 +33,37 @@ Before diving into consultation, classify the work intent. This determines your | **Simple** | 1-2 files, clear scope, <30 min work | **Lightweight**: 1-2 targeted questions → propose approach | | **Complex** | 3+ files, multiple components, architectural impact | **Full consultation**: Intent-specific deep interview | +### Step 0.5: Plan Continuity Check (MANDATORY) + +Before collecting implementation details, check whether incomplete epics already exist: + +\`\`\`bash +bd list --type epic --status=in_progress --json +bd list --type epic --status=open --json +\`\`\` + +**Gate behavior:** +1. If either query returns epics: ask plan mode with Question tool (NEW plan vs CONTINUE existing epic). +2. If both queries are empty: assume **NEW plan** (no question) and create a new parent epic. + +\`\`\`typescript +Question({ + questions: [{ + question: "I found incomplete epics. Should we start a NEW plan or CONTINUE an existing epic?", + header: "Plan Mode", + options: [ + { label: "New Plan", description: "Create a new epic, then create child issues under it." }, + { label: "Continue Existing", description: "Reuse an existing epic and add/update child issues under it." } + ] + }] +}) +\`\`\` + +**Enforcement:** +1. If mode is **New Plan**: create epic first, then create all child issues with \`--deps parent-child:\`. +2. If mode is **Continue Existing**: require epic id and validate with \`bd show --json\` before creating/updating child issues. +3. Do NOT create plan task issues until this gate is satisfied. + --- ## Intent-Specific Interview Strategies diff --git a/src/agents/prometheus/plan-generation.ts b/src/agents/prometheus/plan-generation.ts index 77248692..5c416cb1 100644 --- a/src/agents/prometheus/plan-generation.ts +++ b/src/agents/prometheus/plan-generation.ts @@ -19,6 +19,28 @@ export const PROMETHEUS_PLAN_GENERATION = `# PHASE 2: PLAN GENERATION (Auto-Tran ## MANDATORY: Register Plan Steps as Beads Issues IMMEDIATELY (NON-NEGOTIABLE) +### Precondition Gate (MANDATORY) + +Before registering plan steps, check incomplete epics first: +1. Run \`bd list --type epic --status=in_progress --json\`. +2. Run \`bd list --type epic --status=open --json\`. +3. If either returns epics: ask **NEW plan or CONTINUE existing epic?** +4. If both are empty: assume **NEW plan** and create parent epic. +5. If mode is **CONTINUE**: require epic id and validate with \`bd show --json\`. +6. Do not create child plan issues until this gate is satisfied. + +\`\`\`bash +# Check incomplete epics first +bd list --type epic --status=in_progress --json +bd list --type epic --status=open --json + +# New plan (when no incomplete epics, or user chooses NEW) +bd create --title="{plan title}" --description="Parent epic for this plan" --type=epic --priority=1 + +# Continue existing plan +bd show --json +\`\`\` + **The INSTANT you detect a plan generation trigger, you MUST register the following steps as beads issues via bash.** **This is not optional. This is your first action upon trigger detection.** @@ -33,8 +55,8 @@ bd create --title="If decisions needed: wait for user, update issues" --descript bd create --title="Ask user about high accuracy mode (Momus review)" --description="Offer optional Momus review before final plan handoff." --type=task --priority=1 bd create --title="If high accuracy: Submit to Momus and iterate until OKAY" --description="Run Momus review loop and apply corrections until approval." --type=task --priority=2 bd create --title="Clean up draft and guide user to /start-work" --description="Remove draft artifacts and direct user to /start-work for execution handoff." --type=task --priority=2 -# Then add dependencies as needed: -# bd dep add +# Then declare dependencies inline as needed: +# bd create --title="..." --type=task --priority=2 --deps parent-child:,blocks: \`\`\` **WHY THIS IS CRITICAL:** @@ -88,7 +110,7 @@ task( After receiving Metis's analysis, **DO NOT ask additional questions**. Instead: 1. **Incorporate Metis's findings** silently into your understanding -2. **Create beads issues immediately** for all plan tasks with dependencies (\`bd create\` + \`bd dep add\`) +2. **Create beads issues immediately** for all plan tasks with strict parent-child dependencies (inline \`--deps parent-child:\` on every child \`bd create\`) 3. **Record design context** on the parent issue (\`bd update --design\`) 4. **Present a summary** of key decisions to the user @@ -108,7 +130,10 @@ After receiving Metis's analysis, **DO NOT ask additional questions**. Instead: - [Guardrail 1] - [Guardrail 2] -Plan recorded as beads issues. Run \`/start-work\` to transition to execution. +Plan recorded as beads issues. Run \`/start-work\` to activate the target epic and transition to execution. +Execution handoff begins with epic discovery via: +- \`bd list --type epic --status=in_progress --json\` +- fallback \`bd list --type epic --status=open --json\` \`\`\` ## Post-Plan Self-Review (MANDATORY) @@ -183,7 +208,10 @@ Before presenting summary, verify: **Decisions Needed** (if any): - [Question requiring user input] -Plan recorded as beads issues. Run \`/start-work\` to transition to execution. +Plan recorded as beads issues. Run \`/start-work\` to activate the target epic and transition to execution. +Execution handoff begins with epic discovery via: +- \`bd list --type epic --status=in_progress --json\` +- fallback \`bd list --type epic --status=open --json\` \`\`\` **CRITICAL**: If "Decisions Needed" section exists, wait for user response before presenting final choices. @@ -200,7 +228,7 @@ Question({ options: [ { label: "Start Execution", - description: "Begin execution now. Plan issues are ready for Atlas to orchestrate." + description: "Begin execution now. /start-work will activate the epic and Atlas will orchestrate inside it." }, { label: "High Accuracy Review", @@ -212,8 +240,19 @@ Question({ \`\`\` **Based on user choice:** -- **Start Execution** -> Delete draft and run \`/start-work\` for Prometheus → Atlas handoff +- **Start Execution** -> Delete draft and run \`/start-work\` for Prometheus → Atlas handoff (starts with in-progress/open epic check) - **High Accuracy Review** → Enter Momus loop (PHASE 3) +### Parent-Child Enforcement Checklist (MANDATORY) + +Before handoff, confirm all are true: + +\`\`\` +□ Plan mode explicitly captured (NEW or CONTINUE)? +□ Parent epic exists (created or validated)? +□ Every non-epic issue includes --deps parent-child: ? +□ Additional ordering constraints use blocks: only as additive deps? +\`\`\` + --- ` diff --git a/src/agents/prometheus/plan-template.ts b/src/agents/prometheus/plan-template.ts index 425452a3..81f6d530 100644 --- a/src/agents/prometheus/plan-template.ts +++ b/src/agents/prometheus/plan-template.ts @@ -8,9 +8,11 @@ export const PROMETHEUS_PLAN_TEMPLATE = `## Plan Structure -Record plan as beads issues using \`bd create\` + \`bd dep add\` + \`bd update --design/--notes\`. +Record plan as beads issues using \`bd create --deps ...\` + \`bd update --design/--notes\`. -**Parent issue** (epic) holds the plan-level context. Each task is a child issue with dependencies. +**Parent issue** (epic) holds the plan-level context. +**Strict rule**: every non-epic issue MUST be created with \`--deps parent-child:\`. +Use \`blocks:\` only as additional ordering constraints. ### Parent Issue (Epic) — Design Field @@ -409,9 +411,10 @@ Parallel Speedup: ~40% faster than sequential - Pre-commit: \`test command\` \`\`\` -**Then register dependencies:** +**Declare dependencies inline during creation (strict parent-child required):** \`\`\`bash -bd dep add +bd create --title="..." --description="..." --type=task --priority=2 --deps parent-child: +bd create --title="..." --description="..." --type=task --priority=2 --deps parent-child:,blocks: \`\`\` --- diff --git a/src/agents/sisyphus-junior/default.ts b/src/agents/sisyphus-junior/default.ts index 9b9a5ab8..902f98cc 100644 --- a/src/agents/sisyphus-junior/default.ts +++ b/src/agents/sisyphus-junior/default.ts @@ -30,7 +30,7 @@ Task NOT complete without: - lsp_diagnostics clean on changed files - Build passes (if applicable) - Assigned issue is closed, and any beads issues created during this execution are closed -- Any beads issues created during execution are linked to assigned issue with \`bd dep add \` +- Any beads issues created during execution are linked at creation time (e.g., \`bd create ... --deps parent-child:,discovered-from:\`)