@zigrivers/scaffold 2.1.2 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +505 -119
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +94 -14
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/build.test.js +30 -5
- package/dist/cli/commands/build.test.js.map +1 -1
- package/dist/cli/commands/check.d.ts +12 -0
- package/dist/cli/commands/check.d.ts.map +1 -0
- package/dist/cli/commands/check.js +311 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/check.test.d.ts +2 -0
- package/dist/cli/commands/check.test.d.ts.map +1 -0
- package/dist/cli/commands/check.test.js +412 -0
- package/dist/cli/commands/check.test.js.map +1 -0
- package/dist/cli/commands/complete.d.ts +12 -0
- package/dist/cli/commands/complete.d.ts.map +1 -0
- package/dist/cli/commands/complete.js +101 -0
- package/dist/cli/commands/complete.js.map +1 -0
- package/dist/cli/commands/complete.test.d.ts +2 -0
- package/dist/cli/commands/complete.test.d.ts.map +1 -0
- package/dist/cli/commands/complete.test.js +133 -0
- package/dist/cli/commands/complete.test.js.map +1 -0
- package/dist/cli/commands/dashboard.d.ts.map +1 -1
- package/dist/cli/commands/dashboard.js +12 -8
- package/dist/cli/commands/dashboard.js.map +1 -1
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/info.js +4 -0
- package/dist/cli/commands/info.js.map +1 -1
- package/dist/cli/commands/knowledge.d.ts.map +1 -1
- package/dist/cli/commands/knowledge.js +6 -2
- package/dist/cli/commands/knowledge.js.map +1 -1
- package/dist/cli/commands/knowledge.test.js +16 -11
- package/dist/cli/commands/knowledge.test.js.map +1 -1
- package/dist/cli/commands/next.d.ts.map +1 -1
- package/dist/cli/commands/next.js +41 -13
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/next.test.js +3 -0
- package/dist/cli/commands/next.test.js.map +1 -1
- package/dist/cli/commands/reset.d.ts +1 -0
- package/dist/cli/commands/reset.d.ts.map +1 -1
- package/dist/cli/commands/reset.js +179 -67
- package/dist/cli/commands/reset.js.map +1 -1
- package/dist/cli/commands/reset.test.js +360 -0
- package/dist/cli/commands/reset.test.js.map +1 -1
- package/dist/cli/commands/rework.d.ts +20 -0
- package/dist/cli/commands/rework.d.ts.map +1 -0
- package/dist/cli/commands/rework.js +332 -0
- package/dist/cli/commands/rework.js.map +1 -0
- package/dist/cli/commands/rework.test.d.ts +2 -0
- package/dist/cli/commands/rework.test.d.ts.map +1 -0
- package/dist/cli/commands/rework.test.js +297 -0
- package/dist/cli/commands/rework.test.js.map +1 -0
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +59 -31
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/run.test.js +288 -6
- package/dist/cli/commands/run.test.js.map +1 -1
- package/dist/cli/commands/skill.d.ts +12 -0
- package/dist/cli/commands/skill.d.ts.map +1 -0
- package/dist/cli/commands/skill.js +123 -0
- package/dist/cli/commands/skill.js.map +1 -0
- package/dist/cli/commands/skill.test.d.ts +2 -0
- package/dist/cli/commands/skill.test.d.ts.map +1 -0
- package/dist/cli/commands/skill.test.js +297 -0
- package/dist/cli/commands/skill.test.js.map +1 -0
- package/dist/cli/commands/skip.d.ts +1 -1
- package/dist/cli/commands/skip.d.ts.map +1 -1
- package/dist/cli/commands/skip.js +123 -57
- package/dist/cli/commands/skip.js.map +1 -1
- package/dist/cli/commands/skip.test.js +91 -0
- package/dist/cli/commands/skip.test.js.map +1 -1
- package/dist/cli/commands/status.d.ts +1 -0
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +57 -10
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/status.test.js +81 -0
- package/dist/cli/commands/status.test.js.map +1 -1
- package/dist/cli/commands/update.test.js +252 -0
- package/dist/cli/commands/update.test.js.map +1 -1
- package/dist/cli/commands/version.test.js +171 -1
- package/dist/cli/commands/version.test.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +8 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/adapters/adapter.d.ts +14 -0
- package/dist/core/adapters/adapter.d.ts.map +1 -1
- package/dist/core/adapters/adapter.js.map +1 -1
- package/dist/core/adapters/adapter.test.js +10 -0
- package/dist/core/adapters/adapter.test.js.map +1 -1
- package/dist/core/adapters/claude-code.d.ts.map +1 -1
- package/dist/core/adapters/claude-code.js +47 -10
- package/dist/core/adapters/claude-code.js.map +1 -1
- package/dist/core/adapters/claude-code.test.js +41 -20
- package/dist/core/adapters/claude-code.test.js.map +1 -1
- package/dist/core/adapters/codex.d.ts.map +1 -1
- package/dist/core/adapters/codex.js +5 -1
- package/dist/core/adapters/codex.js.map +1 -1
- package/dist/core/adapters/codex.test.js +5 -0
- package/dist/core/adapters/codex.test.js.map +1 -1
- package/dist/core/adapters/universal.d.ts.map +1 -1
- package/dist/core/adapters/universal.js +0 -1
- package/dist/core/adapters/universal.js.map +1 -1
- package/dist/core/adapters/universal.test.js +5 -0
- package/dist/core/adapters/universal.test.js.map +1 -1
- package/dist/core/assembly/context-gatherer.d.ts.map +1 -1
- package/dist/core/assembly/context-gatherer.js +5 -2
- package/dist/core/assembly/context-gatherer.js.map +1 -1
- package/dist/core/assembly/engine.d.ts.map +1 -1
- package/dist/core/assembly/engine.js +10 -2
- package/dist/core/assembly/engine.js.map +1 -1
- package/dist/core/assembly/engine.test.js +19 -0
- package/dist/core/assembly/engine.test.js.map +1 -1
- package/dist/core/assembly/knowledge-loader.d.ts +25 -0
- package/dist/core/assembly/knowledge-loader.d.ts.map +1 -1
- package/dist/core/assembly/knowledge-loader.js +75 -2
- package/dist/core/assembly/knowledge-loader.js.map +1 -1
- package/dist/core/assembly/knowledge-loader.test.js +388 -1
- package/dist/core/assembly/knowledge-loader.test.js.map +1 -1
- package/dist/core/assembly/meta-prompt-loader.d.ts +6 -0
- package/dist/core/assembly/meta-prompt-loader.d.ts.map +1 -1
- package/dist/core/assembly/meta-prompt-loader.js +41 -25
- package/dist/core/assembly/meta-prompt-loader.js.map +1 -1
- package/dist/core/assembly/preset-loader.d.ts +10 -0
- package/dist/core/assembly/preset-loader.d.ts.map +1 -1
- package/dist/core/assembly/preset-loader.js +26 -1
- package/dist/core/assembly/preset-loader.js.map +1 -1
- package/dist/core/assembly/preset-loader.test.js +65 -1
- package/dist/core/assembly/preset-loader.test.js.map +1 -1
- package/dist/core/assembly/update-mode.d.ts.map +1 -1
- package/dist/core/assembly/update-mode.js +10 -4
- package/dist/core/assembly/update-mode.js.map +1 -1
- package/dist/core/assembly/update-mode.test.js +47 -0
- package/dist/core/assembly/update-mode.test.js.map +1 -1
- package/dist/core/dependency/dependency.d.ts.map +1 -1
- package/dist/core/dependency/dependency.js +3 -2
- package/dist/core/dependency/dependency.js.map +1 -1
- package/dist/core/dependency/dependency.test.js +2 -0
- package/dist/core/dependency/dependency.test.js.map +1 -1
- package/dist/core/dependency/eligibility.js +3 -3
- package/dist/core/dependency/eligibility.js.map +1 -1
- package/dist/core/dependency/eligibility.test.js +2 -0
- package/dist/core/dependency/eligibility.test.js.map +1 -1
- package/dist/core/dependency/graph.d.ts.map +1 -1
- package/dist/core/dependency/graph.js +4 -0
- package/dist/core/dependency/graph.js.map +1 -1
- package/dist/core/dependency/graph.test.d.ts +2 -0
- package/dist/core/dependency/graph.test.d.ts.map +1 -0
- package/dist/core/dependency/graph.test.js +262 -0
- package/dist/core/dependency/graph.test.js.map +1 -0
- package/dist/core/rework/phase-selector.d.ts +24 -0
- package/dist/core/rework/phase-selector.d.ts.map +1 -0
- package/dist/core/rework/phase-selector.js +98 -0
- package/dist/core/rework/phase-selector.js.map +1 -0
- package/dist/core/rework/phase-selector.test.d.ts +2 -0
- package/dist/core/rework/phase-selector.test.d.ts.map +1 -0
- package/dist/core/rework/phase-selector.test.js +138 -0
- package/dist/core/rework/phase-selector.test.js.map +1 -0
- package/dist/dashboard/generator.d.ts +48 -17
- package/dist/dashboard/generator.d.ts.map +1 -1
- package/dist/dashboard/generator.js +75 -5
- package/dist/dashboard/generator.js.map +1 -1
- package/dist/dashboard/generator.test.js +213 -5
- package/dist/dashboard/generator.test.js.map +1 -1
- package/dist/dashboard/template.d.ts +1 -1
- package/dist/dashboard/template.d.ts.map +1 -1
- package/dist/dashboard/template.js +755 -114
- package/dist/dashboard/template.js.map +1 -1
- package/dist/e2e/knowledge.test.js +4 -3
- package/dist/e2e/knowledge.test.js.map +1 -1
- package/dist/e2e/pipeline.test.js +2 -0
- package/dist/e2e/pipeline.test.js.map +1 -1
- package/dist/e2e/rework.test.d.ts +6 -0
- package/dist/e2e/rework.test.d.ts.map +1 -0
- package/dist/e2e/rework.test.js +226 -0
- package/dist/e2e/rework.test.js.map +1 -0
- package/dist/index.js +0 -0
- package/dist/project/adopt.test.js +2 -0
- package/dist/project/adopt.test.js.map +1 -1
- package/dist/project/claude-md.js +2 -2
- package/dist/project/claude-md.js.map +1 -1
- package/dist/project/claude-md.test.js +4 -4
- package/dist/project/claude-md.test.js.map +1 -1
- package/dist/project/detector.d.ts.map +1 -1
- package/dist/project/detector.js +4 -1
- package/dist/project/detector.js.map +1 -1
- package/dist/project/frontmatter.d.ts.map +1 -1
- package/dist/project/frontmatter.js +54 -15
- package/dist/project/frontmatter.js.map +1 -1
- package/dist/project/frontmatter.test.js +2 -2
- package/dist/project/frontmatter.test.js.map +1 -1
- package/dist/state/rework-manager.d.ts +16 -0
- package/dist/state/rework-manager.d.ts.map +1 -0
- package/dist/state/rework-manager.js +126 -0
- package/dist/state/rework-manager.js.map +1 -0
- package/dist/state/rework-manager.test.d.ts +2 -0
- package/dist/state/rework-manager.test.d.ts.map +1 -0
- package/dist/state/rework-manager.test.js +191 -0
- package/dist/state/rework-manager.test.js.map +1 -0
- package/dist/state/state-manager.d.ts +13 -0
- package/dist/state/state-manager.d.ts.map +1 -1
- package/dist/state/state-manager.js +39 -2
- package/dist/state/state-manager.js.map +1 -1
- package/dist/state/state-manager.test.js +74 -1
- package/dist/state/state-manager.test.js.map +1 -1
- package/dist/state/state-migration.d.ts +23 -0
- package/dist/state/state-migration.d.ts.map +1 -0
- package/dist/state/state-migration.js +144 -0
- package/dist/state/state-migration.js.map +1 -0
- package/dist/state/state-migration.test.d.ts +2 -0
- package/dist/state/state-migration.test.d.ts.map +1 -0
- package/dist/state/state-migration.test.js +451 -0
- package/dist/state/state-migration.test.js.map +1 -0
- package/dist/types/assembly.d.ts +2 -0
- package/dist/types/assembly.d.ts.map +1 -1
- package/dist/types/dependency.d.ts +2 -2
- package/dist/types/dependency.d.ts.map +1 -1
- package/dist/types/frontmatter.d.ts +100 -7
- package/dist/types/frontmatter.d.ts.map +1 -1
- package/dist/types/frontmatter.js +89 -1
- package/dist/types/frontmatter.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/lock.d.ts +1 -1
- package/dist/types/lock.d.ts.map +1 -1
- package/dist/types/rework.d.ts +36 -0
- package/dist/types/rework.d.ts.map +1 -0
- package/dist/types/rework.js +2 -0
- package/dist/types/rework.js.map +1 -0
- package/dist/utils/errors.d.ts +1 -0
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +8 -0
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/fs.d.ts +6 -0
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/fs.js +13 -0
- package/dist/utils/fs.js.map +1 -1
- package/dist/validation/config-validator.test.d.ts +2 -0
- package/dist/validation/config-validator.test.d.ts.map +1 -0
- package/dist/validation/config-validator.test.js +210 -0
- package/dist/validation/config-validator.test.js.map +1 -0
- package/dist/validation/dependency-validator.test.d.ts +2 -0
- package/dist/validation/dependency-validator.test.d.ts.map +1 -0
- package/dist/validation/dependency-validator.test.js +215 -0
- package/dist/validation/dependency-validator.test.js.map +1 -0
- package/dist/validation/frontmatter-validator.test.d.ts +2 -0
- package/dist/validation/frontmatter-validator.test.d.ts.map +1 -0
- package/dist/validation/frontmatter-validator.test.js +371 -0
- package/dist/validation/frontmatter-validator.test.js.map +1 -0
- package/dist/validation/state-validator.test.d.ts +2 -0
- package/dist/validation/state-validator.test.d.ts.map +1 -0
- package/dist/validation/state-validator.test.js +325 -0
- package/dist/validation/state-validator.test.js.map +1 -0
- package/dist/wizard/suggestion.test.d.ts +2 -0
- package/dist/wizard/suggestion.test.d.ts.map +1 -0
- package/dist/wizard/suggestion.test.js +115 -0
- package/dist/wizard/suggestion.test.js.map +1 -0
- package/dist/wizard/wizard.d.ts.map +1 -1
- package/dist/wizard/wizard.js +34 -1
- package/dist/wizard/wizard.js.map +1 -1
- package/knowledge/core/adr-craft.md +57 -0
- package/knowledge/core/ai-memory-management.md +246 -0
- package/knowledge/core/api-design.md +8 -0
- package/knowledge/core/automated-review-tooling.md +203 -0
- package/knowledge/core/claude-md-patterns.md +254 -0
- package/knowledge/core/coding-conventions.md +246 -0
- package/knowledge/core/database-design.md +8 -0
- package/knowledge/core/design-system-tokens.md +469 -0
- package/knowledge/core/dev-environment.md +223 -0
- package/knowledge/core/domain-modeling.md +8 -0
- package/knowledge/core/eval-craft.md +1008 -0
- package/knowledge/core/git-workflow-patterns.md +200 -0
- package/knowledge/core/multi-model-review-dispatch.md +250 -0
- package/knowledge/core/operations-runbook.md +40 -225
- package/knowledge/core/project-structure-patterns.md +231 -0
- package/knowledge/core/review-step-template.md +247 -0
- package/knowledge/core/{security-review.md → security-best-practices.md} +9 -1
- package/knowledge/core/system-architecture.md +5 -1
- package/knowledge/core/task-decomposition.md +174 -36
- package/knowledge/core/task-tracking.md +225 -0
- package/knowledge/core/tech-stack-selection.md +214 -0
- package/knowledge/core/testing-strategy.md +63 -70
- package/knowledge/core/user-stories.md +69 -60
- package/knowledge/core/user-story-innovation.md +70 -0
- package/knowledge/core/ux-specification.md +18 -148
- package/knowledge/execution/enhancement-workflow.md +201 -0
- package/knowledge/execution/task-claiming-strategy.md +130 -0
- package/knowledge/execution/tdd-execution-loop.md +172 -0
- package/knowledge/execution/worktree-management.md +205 -0
- package/knowledge/finalization/apply-fixes-and-freeze.md +177 -14
- package/knowledge/finalization/developer-onboarding.md +4 -0
- package/knowledge/finalization/implementation-playbook.md +83 -5
- package/knowledge/product/gap-analysis.md +5 -1
- package/knowledge/product/prd-craft.md +55 -34
- package/knowledge/product/prd-innovation.md +12 -0
- package/knowledge/product/vision-craft.md +213 -0
- package/knowledge/review/review-adr.md +44 -0
- package/knowledge/review/{review-api-contracts.md → review-api-design.md} +47 -1
- package/knowledge/review/{review-database-schema.md → review-database-design.md} +40 -1
- package/knowledge/review/review-domain-modeling.md +38 -1
- package/knowledge/review/review-implementation-tasks.md +108 -1
- package/knowledge/review/review-methodology.md +11 -0
- package/knowledge/review/review-operations.md +67 -0
- package/knowledge/review/review-prd.md +46 -0
- package/knowledge/review/review-security.md +65 -0
- package/knowledge/review/review-system-architecture.md +32 -2
- package/knowledge/review/review-testing-strategy.md +62 -0
- package/knowledge/review/review-user-stories.md +65 -0
- package/knowledge/review/{review-ux-spec.md → review-ux-specification.md} +50 -2
- package/knowledge/review/review-vision.md +255 -0
- package/knowledge/tools/release-management.md +222 -0
- package/knowledge/tools/session-analysis.md +215 -0
- package/knowledge/tools/version-strategy.md +200 -0
- package/knowledge/validation/critical-path-analysis.md +1 -1
- package/knowledge/validation/cross-phase-consistency.md +12 -0
- package/knowledge/validation/decision-completeness.md +13 -1
- package/knowledge/validation/dependency-validation.md +12 -0
- package/knowledge/validation/scope-management.md +12 -0
- package/knowledge/validation/traceability.md +12 -0
- package/methodology/README.md +37 -0
- package/methodology/custom-defaults.yml +44 -4
- package/methodology/deep.yml +43 -3
- package/methodology/mvp.yml +43 -3
- package/package.json +4 -3
- package/pipeline/architecture/review-architecture.md +36 -13
- package/pipeline/architecture/system-architecture.md +24 -9
- package/pipeline/build/multi-agent-resume.md +245 -0
- package/pipeline/build/multi-agent-start.md +236 -0
- package/pipeline/build/new-enhancement.md +456 -0
- package/pipeline/build/quick-task.md +381 -0
- package/pipeline/build/single-agent-resume.md +210 -0
- package/pipeline/build/single-agent-start.md +207 -0
- package/pipeline/consolidation/claude-md-optimization.md +76 -0
- package/pipeline/consolidation/workflow-audit.md +77 -0
- package/pipeline/decisions/adrs.md +21 -7
- package/pipeline/decisions/review-adrs.md +32 -11
- package/pipeline/environment/ai-memory-setup.md +76 -0
- package/pipeline/environment/automated-pr-review.md +76 -0
- package/pipeline/environment/design-system.md +75 -0
- package/pipeline/environment/dev-env-setup.md +68 -0
- package/pipeline/environment/git-workflow.md +73 -0
- package/pipeline/finalization/apply-fixes-and-freeze.md +17 -6
- package/pipeline/finalization/developer-onboarding-guide.md +23 -9
- package/pipeline/finalization/implementation-playbook.md +43 -14
- package/pipeline/foundation/beads.md +71 -0
- package/pipeline/foundation/coding-standards.md +71 -0
- package/pipeline/foundation/project-structure.md +73 -0
- package/pipeline/foundation/tdd.md +64 -0
- package/pipeline/foundation/tech-stack.md +74 -0
- package/pipeline/integration/add-e2e-testing.md +80 -0
- package/pipeline/modeling/domain-modeling.md +23 -8
- package/pipeline/modeling/review-domain-modeling.md +35 -11
- package/pipeline/parity/platform-parity-review.md +90 -0
- package/pipeline/planning/implementation-plan-review.md +67 -0
- package/pipeline/planning/implementation-plan.md +110 -0
- package/pipeline/pre/create-prd.md +34 -10
- package/pipeline/pre/innovate-prd.md +46 -15
- package/pipeline/pre/innovate-user-stories.md +47 -14
- package/pipeline/pre/review-prd.md +29 -8
- package/pipeline/pre/review-user-stories.md +34 -8
- package/pipeline/pre/user-stories.md +23 -8
- package/pipeline/quality/create-evals.md +106 -0
- package/pipeline/quality/operations.md +46 -17
- package/pipeline/quality/review-operations.md +32 -11
- package/pipeline/quality/review-security.md +34 -12
- package/pipeline/quality/review-testing.md +37 -14
- package/pipeline/quality/security.md +36 -10
- package/pipeline/quality/story-tests.md +75 -0
- package/pipeline/specification/api-contracts.md +28 -8
- package/pipeline/specification/database-schema.md +29 -8
- package/pipeline/specification/review-api.md +32 -11
- package/pipeline/specification/review-database.md +32 -11
- package/pipeline/specification/review-ux.md +34 -12
- package/pipeline/specification/ux-spec.md +35 -13
- package/pipeline/validation/critical-path-walkthrough.md +45 -11
- package/pipeline/validation/cross-phase-consistency.md +45 -11
- package/pipeline/validation/decision-completeness.md +45 -11
- package/pipeline/validation/dependency-graph-validation.md +46 -11
- package/pipeline/validation/implementability-dry-run.md +46 -11
- package/pipeline/validation/scope-creep-check.md +46 -11
- package/pipeline/validation/traceability-matrix.md +51 -11
- package/pipeline/vision/create-vision.md +267 -0
- package/pipeline/vision/innovate-vision.md +157 -0
- package/pipeline/vision/review-vision.md +149 -0
- package/skills/multi-model-dispatch/SKILL.md +326 -0
- package/skills/scaffold-pipeline/SKILL.md +210 -0
- package/skills/scaffold-runner/SKILL.md +619 -0
- package/pipeline/planning/implementation-tasks.md +0 -57
- package/pipeline/planning/review-tasks.md +0 -38
- package/pipeline/quality/testing-strategy.md +0 -42
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: multi-agent-resume
|
|
3
|
+
description: Resume multi-agent work after a break
|
|
4
|
+
summary: "Verifies the worktree, syncs with main, reconciles completed tasks, and resumes the agent's TDD loop from the previous session."
|
|
5
|
+
phase: "build"
|
|
6
|
+
order: 1540
|
|
7
|
+
dependencies: [implementation-playbook]
|
|
8
|
+
outputs: []
|
|
9
|
+
conditional: null
|
|
10
|
+
stateless: true
|
|
11
|
+
category: pipeline
|
|
12
|
+
knowledge-base: [tdd-execution-loop, task-claiming-strategy, worktree-management]
|
|
13
|
+
reads: [coding-standards, tdd, git-workflow]
|
|
14
|
+
argument-hint: "<agent-name>"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Purpose
|
|
18
|
+
Resume a named agent's implementation work in its worktree after a break.
|
|
19
|
+
Recovers session context by verifying the worktree environment, syncing with
|
|
20
|
+
main, reconciling task status and open PRs, then continuing the TDD execution
|
|
21
|
+
loop from where the agent left off.
|
|
22
|
+
|
|
23
|
+
## Inputs
|
|
24
|
+
- $ARGUMENTS (required) — the agent name (e.g., "alpha", "beta", "agent-1")
|
|
25
|
+
- CLAUDE.md (required) — project conventions, key commands, workflow
|
|
26
|
+
- docs/implementation-playbook.md (required if exists) — primary task execution reference
|
|
27
|
+
- docs/implementation-plan.md (fallback) — task list when no playbook exists
|
|
28
|
+
- docs/onboarding-guide.md (optional) — project context for orientation
|
|
29
|
+
- docs/coding-standards.md (required) — code conventions, naming, patterns
|
|
30
|
+
- docs/tdd-standards.md (required) — test categories, mocking strategy
|
|
31
|
+
- docs/project-structure.md (required) — where files live
|
|
32
|
+
- tests/acceptance/ (optional) — TDD test skeletons
|
|
33
|
+
- tests/evals/ (optional) — project eval checks for quality gates
|
|
34
|
+
- tasks/lessons.md (optional) — previous lessons learned
|
|
35
|
+
- .beads/ (conditional) — Beads task tracking if configured
|
|
36
|
+
|
|
37
|
+
## Expected Outputs
|
|
38
|
+
- Completed in-progress work from previous session
|
|
39
|
+
- Continued task implementation with passing tests
|
|
40
|
+
- Pull requests for each completed task
|
|
41
|
+
- Updated task status in playbook/plan or Beads
|
|
42
|
+
|
|
43
|
+
## Quality Criteria
|
|
44
|
+
- (mvp) Worktree environment is verified before resuming
|
|
45
|
+
- (mvp) In-progress work is identified and completed before starting new tasks
|
|
46
|
+
- (mvp) Merged PRs are reconciled with task status
|
|
47
|
+
- (mvp) Each task follows red-green-refactor TDD cycle
|
|
48
|
+
- (deep) Full sync with origin/main before resuming
|
|
49
|
+
- (deep) Beads actor identity is verified and task states are reconciled
|
|
50
|
+
- (deep) Between-task cleanup ensures no state leakage
|
|
51
|
+
|
|
52
|
+
## Methodology Scaling
|
|
53
|
+
- **deep**: Full worktree verification, Beads actor check, rebase on latest
|
|
54
|
+
main, reconcile all open PRs, review onboarding guide, consult lessons.md,
|
|
55
|
+
eval gates, detailed PR descriptions, between-task cleanup.
|
|
56
|
+
- **mvp**: Verify worktree, check branch state, finish in-progress work or
|
|
57
|
+
pick next task, TDD loop, make check, create PR.
|
|
58
|
+
- **custom:depth(1-5)**: Depth 1-2: check branch and continue. Depth 3: add
|
|
59
|
+
PR reconciliation, lessons.md review, sync with origin. Depth 4: add
|
|
60
|
+
rebase, eval gates, between-task cleanup. Depth 5: full state audit with
|
|
61
|
+
actor verification and branch cleanup.
|
|
62
|
+
|
|
63
|
+
## Mode Detection
|
|
64
|
+
This is a stateless execution command. No document is created or updated.
|
|
65
|
+
- Always operates in RESUME MODE.
|
|
66
|
+
- If there is no prior work for this agent (no feature branches, no task
|
|
67
|
+
progress), redirect to `/scaffold:multi-agent-start $ARGUMENTS` instead.
|
|
68
|
+
|
|
69
|
+
## Update Mode Specifics
|
|
70
|
+
Not applicable — this is a stateless execution command that does not produce
|
|
71
|
+
a persistent document.
|
|
72
|
+
|
|
73
|
+
## Instructions
|
|
74
|
+
|
|
75
|
+
You are **$ARGUMENTS**.
|
|
76
|
+
|
|
77
|
+
### Worktree Verification
|
|
78
|
+
|
|
79
|
+
Before doing anything else, confirm the environment:
|
|
80
|
+
|
|
81
|
+
1. **Worktree confirmation**
|
|
82
|
+
- `git rev-parse --git-dir` — output should contain `/worktrees/` (confirms you are in a worktree)
|
|
83
|
+
- If NOT in a worktree, stop and instruct the user to set one up or navigate to the correct directory
|
|
84
|
+
|
|
85
|
+
2. **Beads identity** (if `.beads/` exists)
|
|
86
|
+
- `echo $BD_ACTOR` — should show `$ARGUMENTS`
|
|
87
|
+
- If not set, the worktree setup may be incomplete
|
|
88
|
+
|
|
89
|
+
### State Recovery
|
|
90
|
+
|
|
91
|
+
Recover your context by checking the current state of work:
|
|
92
|
+
|
|
93
|
+
1. **Read project context**
|
|
94
|
+
- Read `CLAUDE.md` for project conventions and key commands
|
|
95
|
+
- Read `docs/onboarding-guide.md` if it exists (refresh project context)
|
|
96
|
+
- Read `tasks/lessons.md` for relevant anti-patterns
|
|
97
|
+
|
|
98
|
+
2. **Git state assessment**
|
|
99
|
+
- `git branch --show-current` — determine if you are on a feature branch (in-progress work) or a workspace branch
|
|
100
|
+
- `git status` — check for uncommitted changes or staged files
|
|
101
|
+
- `git stash list` — check for stashed work
|
|
102
|
+
- `git log --oneline -5` — review recent commits for context
|
|
103
|
+
|
|
104
|
+
3. **PR reconciliation**
|
|
105
|
+
- `gh pr list --author="@me"` — check for open PRs from this agent
|
|
106
|
+
- For each open PR, check if it has been merged: `gh pr view <number> --json state`
|
|
107
|
+
- If a PR was merged while you were away, reconcile the task status (see below)
|
|
108
|
+
|
|
109
|
+
4. **Sync with remote**
|
|
110
|
+
- `git fetch origin --prune` — get latest remote state and clean stale references
|
|
111
|
+
|
|
112
|
+
### Beads Recovery
|
|
113
|
+
|
|
114
|
+
**If Beads is configured** (`.beads/` exists):
|
|
115
|
+
- `bd list --actor $ARGUMENTS` — check for tasks with `in_progress` status owned by this agent
|
|
116
|
+
- If a PR shows as merged, close the corresponding task: `bd close <id> && bd sync`
|
|
117
|
+
- If there is in-progress work, finish it (see "Resume In-Progress Work" below)
|
|
118
|
+
- Otherwise, clean up and start fresh:
|
|
119
|
+
- `git fetch origin --prune && git clean -fd`
|
|
120
|
+
- Run the install command from CLAUDE.md Key Commands
|
|
121
|
+
- `bd ready` to find the next available task
|
|
122
|
+
- Continue working until `bd ready` shows no available tasks
|
|
123
|
+
|
|
124
|
+
**Without Beads:**
|
|
125
|
+
- Read `docs/implementation-playbook.md` as the primary task reference.
|
|
126
|
+
Fall back to `docs/implementation-plan.md` when no playbook is present.
|
|
127
|
+
- If a PR shows as merged, mark the corresponding task as complete in the plan/playbook
|
|
128
|
+
- If there is in-progress work on your current branch, finish it
|
|
129
|
+
- Otherwise, clean up and pick the next task:
|
|
130
|
+
- `git fetch origin --prune && git clean -fd`
|
|
131
|
+
- Run the install command from CLAUDE.md Key Commands
|
|
132
|
+
- Pick the next uncompleted task with no unfinished dependencies
|
|
133
|
+
|
|
134
|
+
### Resume In-Progress Work
|
|
135
|
+
|
|
136
|
+
If you are on a feature branch with changes:
|
|
137
|
+
|
|
138
|
+
1. **Assess the state**
|
|
139
|
+
- `git diff --stat` — what files have been changed?
|
|
140
|
+
- `git log --oneline origin/main..HEAD` — what commits exist on this branch?
|
|
141
|
+
- Read the task description to understand what was being worked on
|
|
142
|
+
|
|
143
|
+
2. **Rebase on latest main**
|
|
144
|
+
- `git fetch origin && git rebase origin/main`
|
|
145
|
+
- Resolve any conflicts, re-run tests
|
|
146
|
+
|
|
147
|
+
3. **Check test state**
|
|
148
|
+
- Run the project's test suite
|
|
149
|
+
- If tests pass: you may be in the refactor phase or ready for PR
|
|
150
|
+
- If tests fail: determine if these are your in-progress test cases (red phase) or regressions
|
|
151
|
+
|
|
152
|
+
4. **Continue the TDD loop**
|
|
153
|
+
- Pick up where the previous session left off
|
|
154
|
+
- Follow the same Red-Green-Refactor cycle as in `/scaffold:multi-agent-start`
|
|
155
|
+
|
|
156
|
+
### Continue to Next Task
|
|
157
|
+
|
|
158
|
+
Once in-progress work is complete (or if there was none):
|
|
159
|
+
|
|
160
|
+
1. **Quality gates**
|
|
161
|
+
- Run `make check` (or equivalent from CLAUDE.md Key Commands)
|
|
162
|
+
- If `tests/evals/` exists, run `make eval` (or equivalent eval command)
|
|
163
|
+
|
|
164
|
+
2. **Create PR** (if not already created for in-progress work)
|
|
165
|
+
- Push the branch: `git push -u origin HEAD`
|
|
166
|
+
- Create a pull request: `gh pr create`
|
|
167
|
+
- Include agent name in PR description for traceability
|
|
168
|
+
|
|
169
|
+
3. **Between-task cleanup**
|
|
170
|
+
- `git fetch origin --prune && git clean -fd`
|
|
171
|
+
- Run the install command from CLAUDE.md Key Commands
|
|
172
|
+
|
|
173
|
+
4. **Claim next task**
|
|
174
|
+
- Branch from remote: `git fetch origin && git checkout -b <branch-name> origin/main`
|
|
175
|
+
- Pick the next task following the same process as `/scaffold:multi-agent-start`
|
|
176
|
+
- Continue the TDD execution loop
|
|
177
|
+
|
|
178
|
+
### Recovery Procedures
|
|
179
|
+
|
|
180
|
+
**Worktree not found or corrupted:**
|
|
181
|
+
- Check `git worktree list` from the main repo to see if the worktree exists
|
|
182
|
+
- If missing: `scripts/setup-agent-worktree.sh $ARGUMENTS` to recreate
|
|
183
|
+
- If corrupted: `git worktree remove <path>` then recreate
|
|
184
|
+
|
|
185
|
+
**Uncommitted changes on a feature branch:**
|
|
186
|
+
- Review the changes: `git diff`
|
|
187
|
+
- If the changes look intentional, stage and continue implementation
|
|
188
|
+
- If the changes look broken or experimental, stash them: `git stash`
|
|
189
|
+
|
|
190
|
+
**Stale feature branch (main has diverged significantly):**
|
|
191
|
+
- `git fetch origin && git rebase origin/main`
|
|
192
|
+
- If conflicts are extensive, consider starting the task fresh from origin/main
|
|
193
|
+
- Re-run full test suite after rebase
|
|
194
|
+
|
|
195
|
+
**PR was rejected or has requested changes:**
|
|
196
|
+
- `gh pr view <number>` — read the review comments
|
|
197
|
+
- Address the feedback on the existing branch
|
|
198
|
+
- Push updates and re-request review
|
|
199
|
+
|
|
200
|
+
**Task was completed by another agent:**
|
|
201
|
+
- If Beads: `bd sync` will show updated task states
|
|
202
|
+
- Without Beads: check the plan/playbook for recently completed tasks and open PRs
|
|
203
|
+
- Skip to the next available task
|
|
204
|
+
|
|
205
|
+
**`git checkout main` fails:**
|
|
206
|
+
- This is expected in a worktree. Use `git fetch origin && git checkout -b <branch> origin/main` instead.
|
|
207
|
+
|
|
208
|
+
**Dependency install fails after cleanup:**
|
|
209
|
+
- `git clean -fd` may have removed generated files — re-run the full install sequence
|
|
210
|
+
- If persistent, check if another agent's merge changed the dependency file
|
|
211
|
+
|
|
212
|
+
### Process Rules
|
|
213
|
+
|
|
214
|
+
1. **Verify worktree first** — Never resume work without confirming the worktree environment.
|
|
215
|
+
2. **Recover state before new work** — Check for in-progress tasks and merged PRs first.
|
|
216
|
+
3. **Branch from remote, not local** — Always use `origin/main` as the branch point.
|
|
217
|
+
4. **Clean between tasks** — Run cleanup after each task to prevent state leakage.
|
|
218
|
+
5. **TDD is not optional** — Continue the red-green-refactor cycle for any in-progress work.
|
|
219
|
+
6. **Quality gates before PR** — Never create a PR with failing checks.
|
|
220
|
+
7. **Follow CLAUDE.md** — It is the authority on project conventions and commands.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## After This Step
|
|
225
|
+
|
|
226
|
+
When this step is complete (all tasks done or session ending), tell the user:
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
**Agent $ARGUMENTS resume session complete.**
|
|
230
|
+
|
|
231
|
+
**Session summary:**
|
|
232
|
+
- Recovered state: [in-progress task or "clean start"]
|
|
233
|
+
- Tasks completed this session: [list task IDs/titles]
|
|
234
|
+
- PRs created: [list PR numbers]
|
|
235
|
+
- Remaining tasks: [count or "none"]
|
|
236
|
+
|
|
237
|
+
**If resuming again later:** Run `/scaffold:multi-agent-resume $ARGUMENTS` again.
|
|
238
|
+
|
|
239
|
+
**If all tasks are done:**
|
|
240
|
+
- Review `tasks/lessons.md` and add any patterns learned during implementation.
|
|
241
|
+
- Consider running `/scaffold:version-bump` for a release.
|
|
242
|
+
|
|
243
|
+
**Pipeline reference:** `/scaffold:prompt-pipeline`
|
|
244
|
+
|
|
245
|
+
---
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: multi-agent-start
|
|
3
|
+
description: Start multi-agent execution loop in a worktree
|
|
4
|
+
summary: "Sets up a named agent in an isolated git worktree so multiple agents can implement tasks simultaneously without file conflicts, each following the same TDD loop."
|
|
5
|
+
phase: "build"
|
|
6
|
+
order: 1530
|
|
7
|
+
dependencies: [implementation-playbook]
|
|
8
|
+
outputs: []
|
|
9
|
+
conditional: null
|
|
10
|
+
stateless: true
|
|
11
|
+
category: pipeline
|
|
12
|
+
knowledge-base: [tdd-execution-loop, task-claiming-strategy, worktree-management]
|
|
13
|
+
reads: [coding-standards, tdd, git-workflow]
|
|
14
|
+
argument-hint: "<agent-name>"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Purpose
|
|
18
|
+
Start a named agent in a git worktree for parallel multi-agent execution.
|
|
19
|
+
Each agent operates in its own worktree, claims tasks independently, and
|
|
20
|
+
creates PRs that are merged back to main. This enables multiple agents to
|
|
21
|
+
work on different tasks simultaneously without stepping on each other.
|
|
22
|
+
|
|
23
|
+
## Inputs
|
|
24
|
+
- $ARGUMENTS (required) — the agent name (e.g., "alpha", "beta", "agent-1")
|
|
25
|
+
- CLAUDE.md (required) — project conventions, key commands, workflow
|
|
26
|
+
- docs/implementation-playbook.md (required if exists) — primary task execution reference
|
|
27
|
+
- docs/implementation-plan.md (fallback) — task list when no playbook exists
|
|
28
|
+
- docs/onboarding-guide.md (optional) — project context for orientation
|
|
29
|
+
- docs/coding-standards.md (required) — code conventions, naming, patterns
|
|
30
|
+
- docs/tdd-standards.md (required) — test categories, mocking strategy
|
|
31
|
+
- docs/project-structure.md (required) — where files live
|
|
32
|
+
- tests/acceptance/ (optional) — TDD test skeletons
|
|
33
|
+
- tests/evals/ (optional) — project eval checks for quality gates
|
|
34
|
+
- tasks/lessons.md (optional) — previous lessons learned
|
|
35
|
+
- .beads/ (conditional) — Beads task tracking if configured
|
|
36
|
+
|
|
37
|
+
## Expected Outputs
|
|
38
|
+
- Implemented features with passing tests from this agent's worktree
|
|
39
|
+
- Pull requests for each completed task
|
|
40
|
+
- Updated task status in playbook/plan or Beads
|
|
41
|
+
|
|
42
|
+
## Quality Criteria
|
|
43
|
+
- (mvp) Agent identity is established and verified (worktree environment confirmed)
|
|
44
|
+
- (mvp) Each task follows red-green-refactor TDD cycle
|
|
45
|
+
- (mvp) All quality gates pass before PR creation
|
|
46
|
+
- (mvp) Task claiming avoids conflicts with other agents
|
|
47
|
+
- (deep) Pre-flight verification confirms worktree isolation
|
|
48
|
+
- (deep) Between-task cleanup ensures no state leakage across tasks
|
|
49
|
+
- (deep) Beads actor identity is set correctly for task ownership tracking
|
|
50
|
+
|
|
51
|
+
## Methodology Scaling
|
|
52
|
+
- **deep**: Full pre-flight verification including worktree check, Beads actor
|
|
53
|
+
identity, onboarding guide review, lessons.md per task, eval gates, detailed
|
|
54
|
+
PR descriptions, between-task cleanup with dependency reinstall.
|
|
55
|
+
- **mvp**: Verify worktree, pick next task, TDD loop, make check, create PR.
|
|
56
|
+
Skip onboarding review and between-task reinstalls if not needed.
|
|
57
|
+
- **custom:depth(1-5)**: Depth 1-2: verify worktree, TDD loop, make check.
|
|
58
|
+
Depth 3: add lessons.md review and test skeleton usage. Depth 4: add
|
|
59
|
+
onboarding guide, eval gates, between-task cleanup. Depth 5: full
|
|
60
|
+
pre-flight suite, all quality gates, actor verification.
|
|
61
|
+
|
|
62
|
+
## Mode Detection
|
|
63
|
+
This is a stateless execution command. No document is created or updated.
|
|
64
|
+
- Always operates in EXECUTE MODE.
|
|
65
|
+
- If this agent already has in-progress work (feature branch with changes),
|
|
66
|
+
redirect to `/scaffold:multi-agent-resume $ARGUMENTS` instead.
|
|
67
|
+
|
|
68
|
+
## Update Mode Specifics
|
|
69
|
+
Not applicable — this is a stateless execution command that does not produce
|
|
70
|
+
a persistent document.
|
|
71
|
+
|
|
72
|
+
## Instructions
|
|
73
|
+
|
|
74
|
+
You are **$ARGUMENTS**.
|
|
75
|
+
|
|
76
|
+
### Pre-Flight Verification
|
|
77
|
+
|
|
78
|
+
Before writing any code, verify the worktree environment:
|
|
79
|
+
|
|
80
|
+
1. **Worktree confirmation**
|
|
81
|
+
- `git rev-parse --git-dir` — output should contain `/worktrees/` (confirms you are in a worktree, not the main repo)
|
|
82
|
+
- If NOT in a worktree, stop and instruct the user to set one up:
|
|
83
|
+
> Run `scripts/setup-agent-worktree.sh $ARGUMENTS` from the main repo to create a worktree for this agent.
|
|
84
|
+
|
|
85
|
+
2. **Git state check**
|
|
86
|
+
- `git status` — working tree should be clean
|
|
87
|
+
- `git branch --show-current` — note the current branch
|
|
88
|
+
- If on a feature branch with changes, redirect to `/scaffold:multi-agent-resume $ARGUMENTS`
|
|
89
|
+
|
|
90
|
+
3. **Beads identity** (if `.beads/` exists)
|
|
91
|
+
- `echo $BD_ACTOR` — should show `$ARGUMENTS`
|
|
92
|
+
- If not set, the worktree setup may be incomplete
|
|
93
|
+
|
|
94
|
+
4. **Dependency check**
|
|
95
|
+
- Run the install command from CLAUDE.md Key Commands
|
|
96
|
+
- Confirm dependencies are current in this worktree
|
|
97
|
+
|
|
98
|
+
5. **Test suite health**
|
|
99
|
+
- Run the project's check command from CLAUDE.md Key Commands
|
|
100
|
+
- If tests fail before you start, fix them or flag to the user
|
|
101
|
+
|
|
102
|
+
6. **Project orientation**
|
|
103
|
+
- Read `CLAUDE.md` for project conventions and key commands
|
|
104
|
+
- Read `docs/onboarding-guide.md` if it exists
|
|
105
|
+
- Read `tasks/lessons.md` for relevant anti-patterns
|
|
106
|
+
|
|
107
|
+
### Worktree-Specific Rules
|
|
108
|
+
|
|
109
|
+
These rules are critical for multi-agent operation:
|
|
110
|
+
|
|
111
|
+
- **Never run `git checkout main`** — it will fail because main is checked out in the main repo
|
|
112
|
+
- **Always branch from remote**: `git fetch origin && git checkout -b <branch-name> origin/main`
|
|
113
|
+
- **Between tasks, clean up**: `git fetch origin --prune && git clean -fd` then run the install command from CLAUDE.md Key Commands
|
|
114
|
+
- **Use unique branch names** — include the agent name or task ID to avoid conflicts with other agents
|
|
115
|
+
|
|
116
|
+
### Beads Detection
|
|
117
|
+
|
|
118
|
+
**If Beads is configured** (`.beads/` exists):
|
|
119
|
+
- Branch naming: `bd-<id>/<desc>`
|
|
120
|
+
- Run `bd ready` to see available tasks
|
|
121
|
+
- Pick the lowest-ID unblocked task
|
|
122
|
+
- Implement following the TDD workflow below
|
|
123
|
+
- After PR is merged: `bd close <id> && bd sync`
|
|
124
|
+
- Repeat with `bd ready` until no tasks remain
|
|
125
|
+
|
|
126
|
+
**Without Beads:**
|
|
127
|
+
- Branch naming: `<type>/<desc>` (e.g., `feat/add-auth`)
|
|
128
|
+
1. Read `docs/implementation-playbook.md` as the primary task execution reference.
|
|
129
|
+
Fall back to `docs/implementation-plan.md` when no playbook is present.
|
|
130
|
+
2. Pick the first uncompleted task that has no unfinished dependencies and is not being
|
|
131
|
+
worked on by another agent (check for open PRs or in-progress markers).
|
|
132
|
+
3. Implement following the TDD workflow below.
|
|
133
|
+
4. Mark the task complete in the plan/playbook.
|
|
134
|
+
5. Repeat in dependency order until all tasks are done.
|
|
135
|
+
|
|
136
|
+
### TDD Execution Loop
|
|
137
|
+
|
|
138
|
+
For each task:
|
|
139
|
+
|
|
140
|
+
1. **Claim the task**
|
|
141
|
+
- Create a feature branch from remote main:
|
|
142
|
+
`git fetch origin && git checkout -b <branch-name> origin/main`
|
|
143
|
+
- If Beads: use `bd-<id>/<desc>` naming
|
|
144
|
+
|
|
145
|
+
2. **Red phase — write failing tests**
|
|
146
|
+
- Check `tests/acceptance/` for existing test skeletons that correspond to the task
|
|
147
|
+
- If skeletons exist, use them as your starting point
|
|
148
|
+
- Otherwise, write test cases from the task's acceptance criteria
|
|
149
|
+
- Run the test suite — confirm the new tests FAIL (red)
|
|
150
|
+
|
|
151
|
+
3. **Green phase — implement**
|
|
152
|
+
- Write the minimum code to make the failing tests pass
|
|
153
|
+
- Follow conventions from `docs/coding-standards.md`
|
|
154
|
+
- Follow file placement from `docs/project-structure.md`
|
|
155
|
+
- Run tests after each meaningful change — stop when green
|
|
156
|
+
|
|
157
|
+
4. **Refactor phase — clean up**
|
|
158
|
+
- Refactor for clarity, DRY, and convention compliance
|
|
159
|
+
- Run the full test suite — confirm everything still passes
|
|
160
|
+
|
|
161
|
+
5. **Quality gates**
|
|
162
|
+
- Run `make check` (or equivalent from CLAUDE.md Key Commands)
|
|
163
|
+
- If `tests/evals/` exists, run `make eval` (or equivalent eval command)
|
|
164
|
+
- Fix any failures before proceeding
|
|
165
|
+
|
|
166
|
+
6. **Create PR**
|
|
167
|
+
- Push the branch: `git push -u origin HEAD`
|
|
168
|
+
- Create a pull request: `gh pr create`
|
|
169
|
+
- Include in the PR description: what was implemented, key decisions, files changed, agent name
|
|
170
|
+
- Follow the PR workflow from `docs/git-workflow.md` or CLAUDE.md
|
|
171
|
+
|
|
172
|
+
7. **Between-task cleanup**
|
|
173
|
+
- `git fetch origin --prune && git clean -fd`
|
|
174
|
+
- Run the install command from CLAUDE.md Key Commands
|
|
175
|
+
- This ensures a clean state before the next task
|
|
176
|
+
|
|
177
|
+
### Recovery Procedures
|
|
178
|
+
|
|
179
|
+
**Worktree not set up:**
|
|
180
|
+
- Instruct the user to run: `scripts/setup-agent-worktree.sh $ARGUMENTS`
|
|
181
|
+
- Or reference `docs/git-workflow.md` section 7 for manual worktree setup
|
|
182
|
+
|
|
183
|
+
**`git checkout main` fails:**
|
|
184
|
+
- This is expected in a worktree. Use `git fetch origin && git checkout -b <branch> origin/main` instead.
|
|
185
|
+
|
|
186
|
+
**Merge conflicts on PR:**
|
|
187
|
+
- `git fetch origin && git rebase origin/main`
|
|
188
|
+
- Resolve conflicts, re-run tests, force-push the branch
|
|
189
|
+
|
|
190
|
+
**Another agent claimed the same task:**
|
|
191
|
+
- If Beads: `bd sync` will reveal the conflict — pick a different task
|
|
192
|
+
- Without Beads: check open PRs (`gh pr list`) for overlapping work
|
|
193
|
+
- Move to the next available unblocked task
|
|
194
|
+
|
|
195
|
+
**Dependency install fails after cleanup:**
|
|
196
|
+
- `git clean -fd` may have removed generated files — re-run the full install sequence
|
|
197
|
+
- If persistent, check if another agent's merge changed the dependency file
|
|
198
|
+
|
|
199
|
+
**Tests fail after fetching latest origin:**
|
|
200
|
+
- Determine if failure is from your changes or recently merged work
|
|
201
|
+
- If from merged work: fix or flag before continuing
|
|
202
|
+
- If from your changes: debug and fix
|
|
203
|
+
|
|
204
|
+
### Process Rules
|
|
205
|
+
|
|
206
|
+
1. **Verify worktree first** — Never start implementation without confirming you are in a worktree.
|
|
207
|
+
2. **Branch from remote, not local** — Always use `origin/main` as the branch point.
|
|
208
|
+
3. **Clean between tasks** — Run cleanup after each task to prevent state leakage.
|
|
209
|
+
4. **TDD is not optional** — Write failing tests before implementation. No exceptions.
|
|
210
|
+
5. **Quality gates before PR** — Never create a PR with failing checks.
|
|
211
|
+
6. **Avoid task conflicts** — Check what other agents are working on before claiming.
|
|
212
|
+
7. **Follow CLAUDE.md** — It is the authority on project conventions and commands.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## After This Step
|
|
217
|
+
|
|
218
|
+
When this step is complete (all tasks done or session ending), tell the user:
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
**Agent $ARGUMENTS execution session complete.**
|
|
222
|
+
|
|
223
|
+
**Session summary:**
|
|
224
|
+
- Tasks completed: [list task IDs/titles]
|
|
225
|
+
- PRs created: [list PR numbers]
|
|
226
|
+
- Remaining tasks: [count or "none"]
|
|
227
|
+
|
|
228
|
+
**If resuming later:** Run `/scaffold:multi-agent-resume $ARGUMENTS` to pick up where this agent left off.
|
|
229
|
+
|
|
230
|
+
**If all tasks are done:**
|
|
231
|
+
- Review `tasks/lessons.md` and add any patterns learned during implementation.
|
|
232
|
+
- Consider running `/scaffold:version-bump` for a release.
|
|
233
|
+
|
|
234
|
+
**Pipeline reference:** `/scaffold:prompt-pipeline`
|
|
235
|
+
|
|
236
|
+
---
|