@accelerationguy/accel 1.0.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/CLAUDE.md +19 -0
- package/LICENSE +33 -0
- package/README.md +275 -0
- package/bin/install.js +661 -0
- package/docs/getting-started.md +164 -0
- package/docs/module-guide.md +139 -0
- package/modules/drive/LICENSE +21 -0
- package/modules/drive/PAUL-VS-GSD.md +171 -0
- package/modules/drive/README.md +555 -0
- package/modules/drive/assets/terminal.svg +67 -0
- package/modules/drive/bin/install.js +210 -0
- package/modules/drive/integration.js +76 -0
- package/modules/drive/package.json +38 -0
- package/modules/drive/src/commands/add-phase.md +36 -0
- package/modules/drive/src/commands/apply.md +83 -0
- package/modules/drive/src/commands/assumptions.md +37 -0
- package/modules/drive/src/commands/audit.md +57 -0
- package/modules/drive/src/commands/complete-milestone.md +36 -0
- package/modules/drive/src/commands/config.md +175 -0
- package/modules/drive/src/commands/consider-issues.md +41 -0
- package/modules/drive/src/commands/discover.md +48 -0
- package/modules/drive/src/commands/discuss-milestone.md +33 -0
- package/modules/drive/src/commands/discuss.md +34 -0
- package/modules/drive/src/commands/flows.md +73 -0
- package/modules/drive/src/commands/handoff.md +201 -0
- package/modules/drive/src/commands/help.md +525 -0
- package/modules/drive/src/commands/init.md +54 -0
- package/modules/drive/src/commands/map-codebase.md +34 -0
- package/modules/drive/src/commands/milestone.md +34 -0
- package/modules/drive/src/commands/pause.md +44 -0
- package/modules/drive/src/commands/plan-fix.md +216 -0
- package/modules/drive/src/commands/plan.md +36 -0
- package/modules/drive/src/commands/progress.md +138 -0
- package/modules/drive/src/commands/register.md +29 -0
- package/modules/drive/src/commands/remove-phase.md +37 -0
- package/modules/drive/src/commands/research-phase.md +209 -0
- package/modules/drive/src/commands/research.md +47 -0
- package/modules/drive/src/commands/resume.md +49 -0
- package/modules/drive/src/commands/status.md +78 -0
- package/modules/drive/src/commands/unify.md +87 -0
- package/modules/drive/src/commands/verify.md +60 -0
- package/modules/drive/src/references/checkpoints.md +234 -0
- package/modules/drive/src/references/context-management.md +219 -0
- package/modules/drive/src/references/git-strategy.md +206 -0
- package/modules/drive/src/references/loop-phases.md +254 -0
- package/modules/drive/src/references/plan-format.md +263 -0
- package/modules/drive/src/references/quality-principles.md +152 -0
- package/modules/drive/src/references/research-quality-control.md +247 -0
- package/modules/drive/src/references/sonarqube-integration.md +244 -0
- package/modules/drive/src/references/specialized-workflow-integration.md +186 -0
- package/modules/drive/src/references/subagent-criteria.md +179 -0
- package/modules/drive/src/references/tdd.md +219 -0
- package/modules/drive/src/references/work-units.md +161 -0
- package/modules/drive/src/rules/commands.md +108 -0
- package/modules/drive/src/rules/references.md +107 -0
- package/modules/drive/src/rules/style.md +123 -0
- package/modules/drive/src/rules/templates.md +51 -0
- package/modules/drive/src/rules/workflows.md +133 -0
- package/modules/drive/src/templates/CONTEXT.md +88 -0
- package/modules/drive/src/templates/DEBUG.md +164 -0
- package/modules/drive/src/templates/DISCOVERY.md +148 -0
- package/modules/drive/src/templates/HANDOFF.md +77 -0
- package/modules/drive/src/templates/ISSUES.md +93 -0
- package/modules/drive/src/templates/MILESTONES.md +167 -0
- package/modules/drive/src/templates/PLAN.md +328 -0
- package/modules/drive/src/templates/PROJECT.md +219 -0
- package/modules/drive/src/templates/RESEARCH.md +130 -0
- package/modules/drive/src/templates/ROADMAP.md +328 -0
- package/modules/drive/src/templates/SPECIAL-FLOWS.md +70 -0
- package/modules/drive/src/templates/STATE.md +210 -0
- package/modules/drive/src/templates/SUMMARY.md +221 -0
- package/modules/drive/src/templates/UAT-ISSUES.md +139 -0
- package/modules/drive/src/templates/codebase/architecture.md +259 -0
- package/modules/drive/src/templates/codebase/concerns.md +329 -0
- package/modules/drive/src/templates/codebase/conventions.md +311 -0
- package/modules/drive/src/templates/codebase/integrations.md +284 -0
- package/modules/drive/src/templates/codebase/stack.md +190 -0
- package/modules/drive/src/templates/codebase/structure.md +287 -0
- package/modules/drive/src/templates/codebase/testing.md +484 -0
- package/modules/drive/src/templates/config.md +181 -0
- package/modules/drive/src/templates/milestone-archive.md +236 -0
- package/modules/drive/src/templates/milestone-context.md +190 -0
- package/modules/drive/src/templates/paul-json.md +147 -0
- package/modules/drive/src/vector-config/PAUL +26 -0
- package/modules/drive/src/vector-config/PAUL.manifest +11 -0
- package/modules/drive/src/workflows/apply-phase.md +393 -0
- package/modules/drive/src/workflows/audit-plan.md +344 -0
- package/modules/drive/src/workflows/complete-milestone.md +479 -0
- package/modules/drive/src/workflows/configure-special-flows.md +283 -0
- package/modules/drive/src/workflows/consider-issues.md +172 -0
- package/modules/drive/src/workflows/create-milestone.md +268 -0
- package/modules/drive/src/workflows/debug.md +292 -0
- package/modules/drive/src/workflows/discovery.md +187 -0
- package/modules/drive/src/workflows/discuss-milestone.md +245 -0
- package/modules/drive/src/workflows/discuss-phase.md +231 -0
- package/modules/drive/src/workflows/init-project.md +698 -0
- package/modules/drive/src/workflows/map-codebase.md +459 -0
- package/modules/drive/src/workflows/pause-work.md +259 -0
- package/modules/drive/src/workflows/phase-assumptions.md +181 -0
- package/modules/drive/src/workflows/plan-phase.md +385 -0
- package/modules/drive/src/workflows/quality-gate.md +263 -0
- package/modules/drive/src/workflows/register-manifest.md +107 -0
- package/modules/drive/src/workflows/research.md +241 -0
- package/modules/drive/src/workflows/resume-project.md +200 -0
- package/modules/drive/src/workflows/roadmap-management.md +334 -0
- package/modules/drive/src/workflows/transition-phase.md +368 -0
- package/modules/drive/src/workflows/unify-phase.md +290 -0
- package/modules/drive/src/workflows/verify-work.md +241 -0
- package/modules/forge/README.md +281 -0
- package/modules/forge/bin/install.js +200 -0
- package/modules/forge/package.json +32 -0
- package/modules/forge/skillsmith/rules/checklists-rules.md +42 -0
- package/modules/forge/skillsmith/rules/context-rules.md +43 -0
- package/modules/forge/skillsmith/rules/entry-point-rules.md +44 -0
- package/modules/forge/skillsmith/rules/frameworks-rules.md +43 -0
- package/modules/forge/skillsmith/rules/tasks-rules.md +52 -0
- package/modules/forge/skillsmith/rules/templates-rules.md +43 -0
- package/modules/forge/skillsmith/skillsmith.md +82 -0
- package/modules/forge/skillsmith/tasks/audit.md +277 -0
- package/modules/forge/skillsmith/tasks/discover.md +145 -0
- package/modules/forge/skillsmith/tasks/distill.md +276 -0
- package/modules/forge/skillsmith/tasks/scaffold.md +349 -0
- package/modules/forge/specs/checklists.md +193 -0
- package/modules/forge/specs/context.md +223 -0
- package/modules/forge/specs/entry-point.md +320 -0
- package/modules/forge/specs/frameworks.md +228 -0
- package/modules/forge/specs/rules.md +245 -0
- package/modules/forge/specs/tasks.md +344 -0
- package/modules/forge/specs/templates.md +335 -0
- package/modules/forge/terminal.svg +70 -0
- package/modules/ignition/README.md +245 -0
- package/modules/ignition/bin/install.js +184 -0
- package/modules/ignition/checklists/planning-quality.md +55 -0
- package/modules/ignition/data/application/config.md +21 -0
- package/modules/ignition/data/application/guide.md +51 -0
- package/modules/ignition/data/application/skill-loadout.md +11 -0
- package/modules/ignition/data/campaign/config.md +18 -0
- package/modules/ignition/data/campaign/guide.md +36 -0
- package/modules/ignition/data/campaign/skill-loadout.md +10 -0
- package/modules/ignition/data/client/config.md +18 -0
- package/modules/ignition/data/client/guide.md +36 -0
- package/modules/ignition/data/client/skill-loadout.md +11 -0
- package/modules/ignition/data/utility/config.md +18 -0
- package/modules/ignition/data/utility/guide.md +31 -0
- package/modules/ignition/data/utility/skill-loadout.md +8 -0
- package/modules/ignition/data/workflow/config.md +19 -0
- package/modules/ignition/data/workflow/guide.md +41 -0
- package/modules/ignition/data/workflow/skill-loadout.md +10 -0
- package/modules/ignition/integration.js +54 -0
- package/modules/ignition/package.json +35 -0
- package/modules/ignition/seed.md +81 -0
- package/modules/ignition/tasks/add-type.md +164 -0
- package/modules/ignition/tasks/graduate.md +182 -0
- package/modules/ignition/tasks/ideate.md +221 -0
- package/modules/ignition/tasks/launch.md +137 -0
- package/modules/ignition/tasks/status.md +71 -0
- package/modules/ignition/templates/planning-application.md +193 -0
- package/modules/ignition/templates/planning-campaign.md +138 -0
- package/modules/ignition/templates/planning-client.md +149 -0
- package/modules/ignition/templates/planning-utility.md +112 -0
- package/modules/ignition/templates/planning-workflow.md +125 -0
- package/modules/ignition/terminal.svg +74 -0
- package/modules/mission-control/CONTEXT-CONTINUITY-SPEC.md +293 -0
- package/modules/mission-control/CONTEXT-ENGINEERING-GUIDE.md +282 -0
- package/modules/mission-control/README.md +91 -0
- package/modules/mission-control/assets/terminal.svg +80 -0
- package/modules/mission-control/examples/entities.example.json +133 -0
- package/modules/mission-control/examples/projects.example.json +318 -0
- package/modules/mission-control/examples/state.example.json +183 -0
- package/modules/mission-control/examples/vector.example.json +245 -0
- package/modules/mission-control/mission-control/checklists/install-verification.md +46 -0
- package/modules/mission-control/mission-control/frameworks/framework-registry.md +83 -0
- package/modules/mission-control/mission-control/mission-control.md +83 -0
- package/modules/mission-control/mission-control/tasks/insights.md +73 -0
- package/modules/mission-control/mission-control/tasks/install.md +194 -0
- package/modules/mission-control/mission-control/tasks/status.md +125 -0
- package/modules/mission-control/schemas/entities.schema.json +89 -0
- package/modules/mission-control/schemas/projects.schema.json +221 -0
- package/modules/mission-control/schemas/state.schema.json +108 -0
- package/modules/mission-control/schemas/vector.schema.json +200 -0
- package/modules/momentum/README.md +678 -0
- package/modules/momentum/bin/install.js +563 -0
- package/modules/momentum/integration.js +131 -0
- package/modules/momentum/package.json +42 -0
- package/modules/momentum/schemas/entities.schema.json +89 -0
- package/modules/momentum/schemas/projects.schema.json +221 -0
- package/modules/momentum/schemas/state.schema.json +108 -0
- package/modules/momentum/src/commands/audit-claude-md.md +31 -0
- package/modules/momentum/src/commands/audit.md +33 -0
- package/modules/momentum/src/commands/groom.md +35 -0
- package/modules/momentum/src/commands/history.md +27 -0
- package/modules/momentum/src/commands/pulse.md +33 -0
- package/modules/momentum/src/commands/scaffold.md +33 -0
- package/modules/momentum/src/commands/status.md +28 -0
- package/modules/momentum/src/commands/surface-convert.md +35 -0
- package/modules/momentum/src/commands/surface-create.md +34 -0
- package/modules/momentum/src/commands/surface-list.md +27 -0
- package/modules/momentum/src/commands/vector-hygiene.md +33 -0
- package/modules/momentum/src/framework/context/momentum-principles.md +71 -0
- package/modules/momentum/src/framework/frameworks/audit-strategies.md +53 -0
- package/modules/momentum/src/framework/frameworks/satellite-registration.md +44 -0
- package/modules/momentum/src/framework/tasks/audit-claude-md.md +68 -0
- package/modules/momentum/src/framework/tasks/audit.md +64 -0
- package/modules/momentum/src/framework/tasks/groom.md +164 -0
- package/modules/momentum/src/framework/tasks/history.md +34 -0
- package/modules/momentum/src/framework/tasks/pulse.md +83 -0
- package/modules/momentum/src/framework/tasks/scaffold.md +202 -0
- package/modules/momentum/src/framework/tasks/status.md +35 -0
- package/modules/momentum/src/framework/tasks/surface-convert.md +143 -0
- package/modules/momentum/src/framework/tasks/surface-create.md +184 -0
- package/modules/momentum/src/framework/tasks/surface-list.md +42 -0
- package/modules/momentum/src/framework/tasks/vector-hygiene.md +160 -0
- package/modules/momentum/src/framework/templates/workspace-json.md +96 -0
- package/modules/momentum/src/hooks/_template.py +129 -0
- package/modules/momentum/src/hooks/active-hook.py +178 -0
- package/modules/momentum/src/hooks/backlog-hook.py +115 -0
- package/modules/momentum/src/hooks/mission-control-insights.py +169 -0
- package/modules/momentum/src/hooks/momentum-pulse-check.py +351 -0
- package/modules/momentum/src/hooks/operator.py +53 -0
- package/modules/momentum/src/hooks/psmm-injector.py +67 -0
- package/modules/momentum/src/hooks/satellite-detection.py +248 -0
- package/modules/momentum/src/packages/momentum-mcp/index.js +119 -0
- package/modules/momentum/src/packages/momentum-mcp/package.json +10 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/entities.js +226 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/operator.js +106 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/projects.js +322 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/psmm.js +206 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/state.js +199 -0
- package/modules/momentum/src/packages/momentum-mcp/tools/surfaces.js +404 -0
- package/modules/momentum/src/skill/momentum.md +111 -0
- package/modules/momentum/src/tasks/groom.md +164 -0
- package/modules/momentum/src/templates/operator.json +66 -0
- package/modules/momentum/src/templates/workspace.json +111 -0
- package/modules/momentum/terminal.svg +77 -0
- package/modules/radar/README.md +1552 -0
- package/modules/radar/commands/audit.md +233 -0
- package/modules/radar/commands/guardrails.md +194 -0
- package/modules/radar/commands/init.md +207 -0
- package/modules/radar/commands/playbook.md +176 -0
- package/modules/radar/commands/remediate.md +156 -0
- package/modules/radar/commands/report.md +172 -0
- package/modules/radar/commands/resume.md +176 -0
- package/modules/radar/commands/status.md +148 -0
- package/modules/radar/commands/transform.md +205 -0
- package/modules/radar/commands/validate.md +177 -0
- package/modules/radar/docs/ARCHITECTURE.md +336 -0
- package/modules/radar/docs/GETTING-STARTED.md +287 -0
- package/modules/radar/docs/standards/agents.md +197 -0
- package/modules/radar/docs/standards/commands.md +250 -0
- package/modules/radar/docs/standards/domains.md +191 -0
- package/modules/radar/docs/standards/personas.md +211 -0
- package/modules/radar/docs/standards/rules.md +218 -0
- package/modules/radar/docs/standards/runtime.md +445 -0
- package/modules/radar/docs/standards/schemas.md +269 -0
- package/modules/radar/docs/standards/tools.md +273 -0
- package/modules/radar/docs/standards/workflows.md +254 -0
- package/modules/radar/docs/terminal.svg +72 -0
- package/modules/radar/docs/validation/convention-compliance-report.md +183 -0
- package/modules/radar/docs/validation/cross-reference-report.md +195 -0
- package/modules/radar/docs/validation/validation-summary.md +118 -0
- package/modules/radar/docs/validation/version-manifest.yaml +363 -0
- package/modules/radar/install.sh +711 -0
- package/modules/radar/integration.js +53 -0
- package/modules/radar/src/core/agents/architect.md +25 -0
- package/modules/radar/src/core/agents/compliance-officer.md +25 -0
- package/modules/radar/src/core/agents/data-engineer.md +25 -0
- package/modules/radar/src/core/agents/devils-advocate.md +22 -0
- package/modules/radar/src/core/agents/performance-engineer.md +25 -0
- package/modules/radar/src/core/agents/principal-engineer.md +23 -0
- package/modules/radar/src/core/agents/reality-gap-analyst.md +22 -0
- package/modules/radar/src/core/agents/security-engineer.md +25 -0
- package/modules/radar/src/core/agents/senior-app-engineer.md +25 -0
- package/modules/radar/src/core/agents/sre.md +25 -0
- package/modules/radar/src/core/agents/staff-engineer.md +23 -0
- package/modules/radar/src/core/agents/test-engineer.md +25 -0
- package/modules/radar/src/core/personas/architect.md +111 -0
- package/modules/radar/src/core/personas/compliance-officer.md +104 -0
- package/modules/radar/src/core/personas/data-engineer.md +113 -0
- package/modules/radar/src/core/personas/devils-advocate.md +105 -0
- package/modules/radar/src/core/personas/performance-engineer.md +119 -0
- package/modules/radar/src/core/personas/principal-engineer.md +119 -0
- package/modules/radar/src/core/personas/reality-gap-analyst.md +111 -0
- package/modules/radar/src/core/personas/security-engineer.md +108 -0
- package/modules/radar/src/core/personas/senior-app-engineer.md +111 -0
- package/modules/radar/src/core/personas/sre.md +117 -0
- package/modules/radar/src/core/personas/staff-engineer.md +109 -0
- package/modules/radar/src/core/personas/test-engineer.md +109 -0
- package/modules/radar/src/core/workflows/disagreement-resolution.md +183 -0
- package/modules/radar/src/core/workflows/phase-0-context.md +148 -0
- package/modules/radar/src/core/workflows/phase-1-reconnaissance.md +169 -0
- package/modules/radar/src/core/workflows/phase-2-domain-audits.md +190 -0
- package/modules/radar/src/core/workflows/phase-3-cross-domain.md +177 -0
- package/modules/radar/src/core/workflows/phase-4-adversarial-review.md +165 -0
- package/modules/radar/src/core/workflows/phase-5-report.md +189 -0
- package/modules/radar/src/core/workflows/phase-checkpoint.md +222 -0
- package/modules/radar/src/core/workflows/session-handoff.md +152 -0
- package/modules/radar/src/domains/00-context.md +201 -0
- package/modules/radar/src/domains/01-architecture.md +248 -0
- package/modules/radar/src/domains/02-data.md +224 -0
- package/modules/radar/src/domains/03-correctness.md +230 -0
- package/modules/radar/src/domains/04-security.md +274 -0
- package/modules/radar/src/domains/05-compliance.md +228 -0
- package/modules/radar/src/domains/06-testing.md +228 -0
- package/modules/radar/src/domains/07-reliability.md +246 -0
- package/modules/radar/src/domains/08-performance.md +247 -0
- package/modules/radar/src/domains/09-maintainability.md +271 -0
- package/modules/radar/src/domains/10-operability.md +250 -0
- package/modules/radar/src/domains/11-change-risk.md +246 -0
- package/modules/radar/src/domains/12-team-risk.md +221 -0
- package/modules/radar/src/domains/13-risk-synthesis.md +202 -0
- package/modules/radar/src/rules/agent-boundaries.md +78 -0
- package/modules/radar/src/rules/disagreement-protocol.md +76 -0
- package/modules/radar/src/rules/epistemic-hygiene.md +78 -0
- package/modules/radar/src/schemas/confidence.md +185 -0
- package/modules/radar/src/schemas/disagreement.md +238 -0
- package/modules/radar/src/schemas/finding.md +287 -0
- package/modules/radar/src/schemas/report-section.md +150 -0
- package/modules/radar/src/schemas/signal.md +108 -0
- package/modules/radar/src/tools/checkov.md +463 -0
- package/modules/radar/src/tools/git-history.md +581 -0
- package/modules/radar/src/tools/gitleaks.md +447 -0
- package/modules/radar/src/tools/grype.md +611 -0
- package/modules/radar/src/tools/semgrep.md +378 -0
- package/modules/radar/src/tools/sonarqube.md +550 -0
- package/modules/radar/src/tools/syft.md +539 -0
- package/modules/radar/src/tools/trivy.md +439 -0
- package/modules/radar/src/transform/agents/change-risk-modeler.md +24 -0
- package/modules/radar/src/transform/agents/execution-validator.md +24 -0
- package/modules/radar/src/transform/agents/guardrail-generator.md +24 -0
- package/modules/radar/src/transform/agents/pedagogy-agent.md +24 -0
- package/modules/radar/src/transform/agents/remediation-architect.md +24 -0
- package/modules/radar/src/transform/personas/change-risk-modeler.md +95 -0
- package/modules/radar/src/transform/personas/execution-validator.md +95 -0
- package/modules/radar/src/transform/personas/guardrail-generator.md +103 -0
- package/modules/radar/src/transform/personas/pedagogy-agent.md +105 -0
- package/modules/radar/src/transform/personas/remediation-architect.md +95 -0
- package/modules/radar/src/transform/rules/change-risk-rules.md +87 -0
- package/modules/radar/src/transform/rules/safety-governance.md +87 -0
- package/modules/radar/src/transform/schemas/change-risk.md +139 -0
- package/modules/radar/src/transform/schemas/intervention-level.md +207 -0
- package/modules/radar/src/transform/schemas/playbook.md +205 -0
- package/modules/radar/src/transform/schemas/verification-plan.md +134 -0
- package/modules/radar/src/transform/workflows/phase-6-remediation.md +148 -0
- package/modules/radar/src/transform/workflows/phase-7-risk-validation.md +161 -0
- package/modules/radar/src/transform/workflows/phase-8-execution-planning.md +159 -0
- package/modules/radar/src/transform/workflows/transform-safety.md +158 -0
- package/modules/vector/.vector-template/sessions/.gitkeep +0 -0
- package/modules/vector/.vector-template/vector.json +72 -0
- package/modules/vector/AUDIT-CLAUDEMD.md +154 -0
- package/modules/vector/INSTALL.md +185 -0
- package/modules/vector/LICENSE +21 -0
- package/modules/vector/README.md +409 -0
- package/modules/vector/VECTOR-BLOCK.md +57 -0
- package/modules/vector/assets/terminal.svg +68 -0
- package/modules/vector/bin/install.js +455 -0
- package/modules/vector/bin/migrate-v1-to-v2.sh +492 -0
- package/modules/vector/commands/help.md +46 -0
- package/modules/vector/hooks/vector-hook.py +775 -0
- package/modules/vector/mcp/index.js +118 -0
- package/modules/vector/mcp/package.json +10 -0
- package/modules/vector/mcp/tools/decisions.js +269 -0
- package/modules/vector/mcp/tools/domains.js +361 -0
- package/modules/vector/mcp/tools/staging.js +252 -0
- package/modules/vector/mcp/tools/vector-json.js +647 -0
- package/modules/vector/package.json +38 -0
- package/modules/vector/schemas/vector.schema.json +237 -0
- package/package.json +39 -0
- package/shared/branding/branding.js +70 -0
- package/shared/config/defaults.json +59 -0
- package/shared/events/README.md +175 -0
- package/shared/events/event-bus.js +134 -0
- package/shared/events/event_bus.py +255 -0
- package/shared/events/integrations.js +161 -0
- package/shared/events/schemas/audit-complete.schema.json +21 -0
- package/shared/events/schemas/phase-progress.schema.json +23 -0
- package/shared/events/schemas/plan-created.schema.json +21 -0
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Orchestrate parallel Explore agents to analyze codebase and produce structured documents in .drive/codebase/
|
|
3
|
+
|
|
4
|
+
Each agent has fresh context and focuses on specific aspects. Output is concise and actionable for planning.
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<philosophy>
|
|
8
|
+
**Why parallel agents:**
|
|
9
|
+
- Fresh context per domain (no token contamination)
|
|
10
|
+
- Thorough analysis without context exhaustion
|
|
11
|
+
- Each agent optimized for its domain (tech vs organization vs quality vs issues)
|
|
12
|
+
- Faster execution (agents run simultaneously)
|
|
13
|
+
|
|
14
|
+
**Document quality over length:**
|
|
15
|
+
Include enough detail to be useful as reference. Prioritize practical examples (especially code patterns) over arbitrary brevity. A 200-line TESTING.md with real patterns is more valuable than a 74-line summary.
|
|
16
|
+
|
|
17
|
+
**Always include file paths:**
|
|
18
|
+
Documents are reference material for Claude when planning/executing. Vague descriptions like "UserService handles users" are not actionable. Always include actual file paths formatted with backticks: `src/services/user.ts`. This allows Claude to navigate directly to relevant code without re-searching. Do NOT include line numbers (they go stale), just file paths.
|
|
19
|
+
</philosophy>
|
|
20
|
+
|
|
21
|
+
<references>
|
|
22
|
+
@src/templates/codebase/stack.md
|
|
23
|
+
@src/templates/codebase/architecture.md
|
|
24
|
+
@src/templates/codebase/structure.md
|
|
25
|
+
@src/templates/codebase/conventions.md
|
|
26
|
+
@src/templates/codebase/testing.md
|
|
27
|
+
@src/templates/codebase/integrations.md
|
|
28
|
+
@src/templates/codebase/concerns.md
|
|
29
|
+
</references>
|
|
30
|
+
|
|
31
|
+
<process>
|
|
32
|
+
|
|
33
|
+
<step name="check_existing" priority="first">
|
|
34
|
+
Check if .drive/codebase/ already exists:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
ls -la .drive/codebase/ 2>/dev/null
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**If exists:**
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
.drive/codebase/ already exists with these documents:
|
|
44
|
+
[List files found]
|
|
45
|
+
|
|
46
|
+
What's next?
|
|
47
|
+
1. Refresh - Delete existing and remap codebase
|
|
48
|
+
2. Update - Keep existing, only update specific documents
|
|
49
|
+
3. Skip - Use existing codebase map as-is
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Wait for user response.
|
|
53
|
+
|
|
54
|
+
If "Refresh": Delete .drive/codebase/, continue to create_structure
|
|
55
|
+
If "Update": Ask which documents to update, continue to spawn_agents (filtered)
|
|
56
|
+
If "Skip": Exit workflow
|
|
57
|
+
|
|
58
|
+
**If doesn't exist:**
|
|
59
|
+
Continue to create_structure.
|
|
60
|
+
</step>
|
|
61
|
+
|
|
62
|
+
<step name="create_structure">
|
|
63
|
+
Create .drive/codebase/ directory:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
mkdir -p .drive/codebase
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Expected output files:**
|
|
70
|
+
- STACK.md (from stack.md template)
|
|
71
|
+
- ARCHITECTURE.md (from architecture.md template)
|
|
72
|
+
- STRUCTURE.md (from structure.md template)
|
|
73
|
+
- CONVENTIONS.md (from conventions.md template)
|
|
74
|
+
- TESTING.md (from testing.md template)
|
|
75
|
+
- INTEGRATIONS.md (from integrations.md template)
|
|
76
|
+
- CONCERNS.md (from concerns.md template)
|
|
77
|
+
|
|
78
|
+
Continue to spawn_agents.
|
|
79
|
+
</step>
|
|
80
|
+
|
|
81
|
+
<step name="spawn_agents">
|
|
82
|
+
Spawn 4 parallel Explore agents to analyze codebase.
|
|
83
|
+
|
|
84
|
+
Use Task tool with `subagent_type="Explore"` and `run_in_background=true` for parallel execution.
|
|
85
|
+
|
|
86
|
+
**Agent 1: Stack + Integrations (Technology Focus)**
|
|
87
|
+
|
|
88
|
+
Task tool parameters:
|
|
89
|
+
```
|
|
90
|
+
subagent_type: "Explore"
|
|
91
|
+
run_in_background: true
|
|
92
|
+
description: "Analyze technology stack and integrations"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Prompt:
|
|
96
|
+
```
|
|
97
|
+
Analyze this codebase for technology stack and external integrations.
|
|
98
|
+
|
|
99
|
+
IMPORTANT: Always include actual file paths in your findings. Use backtick formatting like `src/config/database.ts`. This makes the output actionable for planning.
|
|
100
|
+
|
|
101
|
+
Focus areas:
|
|
102
|
+
1. Languages (check file extensions, package manifests)
|
|
103
|
+
2. Runtime environment (Node.js, Python, etc. - check .nvmrc, .python-version, engines field)
|
|
104
|
+
3. Package manager and lockfiles
|
|
105
|
+
4. Frameworks (web, testing, build tools)
|
|
106
|
+
5. Key dependencies (critical packages for functionality)
|
|
107
|
+
6. External services (APIs, databases, auth providers)
|
|
108
|
+
7. Third-party integrations (payment, analytics, etc.)
|
|
109
|
+
8. Configuration approach (.env, config files)
|
|
110
|
+
|
|
111
|
+
Search for:
|
|
112
|
+
- package.json / requirements.txt / Cargo.toml / go.mod
|
|
113
|
+
- .env files, .env.example
|
|
114
|
+
- Config files (vite.config, webpack.config, tsconfig.json)
|
|
115
|
+
- API client code, database connection code
|
|
116
|
+
- Import statements for major libraries
|
|
117
|
+
|
|
118
|
+
Output findings for populating these sections:
|
|
119
|
+
- STACK.md: Languages, Runtime, Frameworks, Dependencies, Configuration
|
|
120
|
+
- INTEGRATIONS.md: External APIs, Services, Third-party tools
|
|
121
|
+
|
|
122
|
+
For each finding, include the file path where you found it. Example:
|
|
123
|
+
- "TypeScript 5.3 - `package.json`"
|
|
124
|
+
- "Supabase client - `src/lib/supabase.ts`"
|
|
125
|
+
- "Stripe integration - `src/services/stripe.ts`, `src/webhooks/stripe.ts`"
|
|
126
|
+
|
|
127
|
+
If something is not found, note "Not detected" for that category.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Agent 2: Architecture + Structure (Organization Focus)**
|
|
131
|
+
|
|
132
|
+
Task tool parameters:
|
|
133
|
+
```
|
|
134
|
+
subagent_type: "Explore"
|
|
135
|
+
run_in_background: true
|
|
136
|
+
description: "Analyze architecture patterns and directory structure"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Prompt:
|
|
140
|
+
```
|
|
141
|
+
Analyze this codebase architecture and directory structure.
|
|
142
|
+
|
|
143
|
+
IMPORTANT: Always include actual file paths in your findings. Use backtick formatting like `src/index.ts`. This makes the output actionable for planning.
|
|
144
|
+
|
|
145
|
+
Focus areas:
|
|
146
|
+
1. Overall architectural pattern (monolith, microservices, layered, etc.)
|
|
147
|
+
2. Conceptual layers (API, service, data, utility)
|
|
148
|
+
3. Data flow and request lifecycle
|
|
149
|
+
4. Key abstractions and patterns (services, controllers, repositories)
|
|
150
|
+
5. Entry points (main files, server files, CLI entry)
|
|
151
|
+
6. Directory organization and purposes
|
|
152
|
+
7. Module boundaries
|
|
153
|
+
8. Naming conventions for directories and files
|
|
154
|
+
|
|
155
|
+
Search for:
|
|
156
|
+
- Entry points: index.ts, main.ts, server.ts, app.ts, cli.ts
|
|
157
|
+
- Directory structure patterns (src/, lib/, components/, services/)
|
|
158
|
+
- Import patterns (what imports what)
|
|
159
|
+
- Recurring code patterns (base classes, interfaces, common abstractions)
|
|
160
|
+
|
|
161
|
+
Output findings for populating these sections:
|
|
162
|
+
- ARCHITECTURE.md: Pattern, Layers, Data Flow, Abstractions, Entry Points
|
|
163
|
+
- STRUCTURE.md: Directory layout, Organization, Key locations
|
|
164
|
+
|
|
165
|
+
For each finding, include the file path. Examples:
|
|
166
|
+
- "CLI entry point: `bin/install.js`"
|
|
167
|
+
- "Service layer: `src/services/*.ts` (UserService, ProjectService)"
|
|
168
|
+
- "API routes: `src/routes/api/*.ts`"
|
|
169
|
+
|
|
170
|
+
If something is not clear, provide best-guess interpretation based on code structure.
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Agent 3: Conventions + Testing (Quality Focus)**
|
|
174
|
+
|
|
175
|
+
Task tool parameters:
|
|
176
|
+
```
|
|
177
|
+
subagent_type: "Explore"
|
|
178
|
+
run_in_background: true
|
|
179
|
+
description: "Analyze coding conventions and test patterns"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Prompt:
|
|
183
|
+
```
|
|
184
|
+
Analyze this codebase for coding conventions and testing practices.
|
|
185
|
+
|
|
186
|
+
IMPORTANT: Always include actual file paths in your findings. Use backtick formatting like `vitest.config.ts`. This makes the output actionable for planning.
|
|
187
|
+
|
|
188
|
+
Focus areas:
|
|
189
|
+
1. Code style (indentation, quotes, semicolons, formatting)
|
|
190
|
+
2. File naming conventions (kebab-case, PascalCase, etc.)
|
|
191
|
+
3. Function/variable naming patterns
|
|
192
|
+
4. Comment and documentation style
|
|
193
|
+
5. Test framework and structure
|
|
194
|
+
6. Test organization (unit, integration, e2e)
|
|
195
|
+
7. Test coverage approach
|
|
196
|
+
8. Linting and formatting tools
|
|
197
|
+
|
|
198
|
+
Search for:
|
|
199
|
+
- Config files: .eslintrc, .prettierrc, tsconfig.json
|
|
200
|
+
- Test files: *.test.*, *.spec.*, __tests__/
|
|
201
|
+
- Test setup: vitest.config, jest.config
|
|
202
|
+
- Code patterns across multiple files
|
|
203
|
+
- README or CONTRIBUTING docs
|
|
204
|
+
|
|
205
|
+
Output findings for populating these sections:
|
|
206
|
+
- CONVENTIONS.md: Code Style, Naming, Patterns, Documentation
|
|
207
|
+
- TESTING.md: Framework, Structure, Coverage, Tools
|
|
208
|
+
|
|
209
|
+
For each finding, include file paths. Examples:
|
|
210
|
+
- "Prettier config: `.prettierrc`"
|
|
211
|
+
- "Test pattern: `src/**/*.test.ts` (co-located with source)"
|
|
212
|
+
- "Example of naming convention: `src/services/user-service.ts`"
|
|
213
|
+
|
|
214
|
+
Look at actual code files to infer conventions if config files are missing.
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Agent 4: Concerns (Issues Focus)**
|
|
218
|
+
|
|
219
|
+
Task tool parameters:
|
|
220
|
+
```
|
|
221
|
+
subagent_type: "Explore"
|
|
222
|
+
run_in_background: true
|
|
223
|
+
description: "Identify technical debt and areas of concern"
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Prompt:
|
|
227
|
+
```
|
|
228
|
+
Analyze this codebase for technical debt, known issues, and areas of concern.
|
|
229
|
+
|
|
230
|
+
CRITICAL: Always include actual file paths in your findings. Use backtick formatting like `src/auth/login.ts`. Concerns without file paths are not actionable. For each issue found, specify exactly where it is.
|
|
231
|
+
|
|
232
|
+
Focus areas:
|
|
233
|
+
1. TODO and FIXME comments
|
|
234
|
+
2. Complex or hard-to-understand code
|
|
235
|
+
3. Missing error handling (try/catch, error checks)
|
|
236
|
+
4. Security patterns (hardcoded secrets, unsafe operations)
|
|
237
|
+
5. Outdated dependencies (check versions against current)
|
|
238
|
+
6. Missing tests for critical code
|
|
239
|
+
7. Duplicate code patterns
|
|
240
|
+
8. Performance concerns (N+1 queries, inefficient loops)
|
|
241
|
+
9. Documentation gaps (complex code without comments)
|
|
242
|
+
|
|
243
|
+
Search for:
|
|
244
|
+
- TODO, FIXME, HACK, XXX comments
|
|
245
|
+
- Large functions or files (>200 lines)
|
|
246
|
+
- Repeated code patterns
|
|
247
|
+
- Missing .env.example when .env is used
|
|
248
|
+
- Dependencies with known vulnerabilities (check versions)
|
|
249
|
+
- Error-prone patterns (no validation, no error handling)
|
|
250
|
+
|
|
251
|
+
Output findings for populating:
|
|
252
|
+
- CONCERNS.md: Technical Debt, Issues, Security, Performance, Documentation
|
|
253
|
+
|
|
254
|
+
For EVERY concern, include file paths. Examples:
|
|
255
|
+
- "Direct DB queries in components: `src/pages/Dashboard.tsx`, `src/pages/Profile.tsx`"
|
|
256
|
+
- "Missing error handling: `src/api/webhook.ts` (Stripe webhook has no try/catch)"
|
|
257
|
+
- "TODO: 'fix race condition' in `src/services/subscription.ts`"
|
|
258
|
+
|
|
259
|
+
Be constructive - focus on actionable concerns, not nitpicks.
|
|
260
|
+
If codebase is clean, note that rather than inventing problems.
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Continue to collect_results.
|
|
264
|
+
</step>
|
|
265
|
+
|
|
266
|
+
<step name="collect_results">
|
|
267
|
+
Wait for all 4 agents to complete.
|
|
268
|
+
|
|
269
|
+
Use TaskOutput tool to collect results from each agent. Since agents were run with `run_in_background=true`, retrieve their output.
|
|
270
|
+
|
|
271
|
+
**Collection pattern:**
|
|
272
|
+
|
|
273
|
+
For each agent, use TaskOutput tool to get the full exploration findings.
|
|
274
|
+
|
|
275
|
+
**Aggregate findings by document:**
|
|
276
|
+
|
|
277
|
+
From Agent 1 output, extract:
|
|
278
|
+
- STACK.md sections: Languages, Runtime, Frameworks, Dependencies, Configuration, Platform
|
|
279
|
+
- INTEGRATIONS.md sections: External APIs, Services, Authentication, Webhooks
|
|
280
|
+
|
|
281
|
+
From Agent 2 output, extract:
|
|
282
|
+
- ARCHITECTURE.md sections: Pattern Overview, Layers, Data Flow, Key Abstractions, Entry Points
|
|
283
|
+
- STRUCTURE.md sections: Directory Layout, Key Locations, Organization
|
|
284
|
+
|
|
285
|
+
From Agent 3 output, extract:
|
|
286
|
+
- CONVENTIONS.md sections: Code Style, Naming Conventions, Common Patterns, Documentation Style
|
|
287
|
+
- TESTING.md sections: Framework, Structure, Coverage, Tools
|
|
288
|
+
|
|
289
|
+
From Agent 4 output, extract:
|
|
290
|
+
- CONCERNS.md sections: Technical Debt, Known Issues, Security, Performance, Missing
|
|
291
|
+
|
|
292
|
+
**Handling missing findings:**
|
|
293
|
+
|
|
294
|
+
If an agent didn't find information for a section, use placeholder:
|
|
295
|
+
- "Not detected" (for infrastructure/tools that may not exist)
|
|
296
|
+
- "Not applicable" (for patterns that don't apply to this codebase)
|
|
297
|
+
- "No significant concerns" (for CONCERNS.md if codebase is clean)
|
|
298
|
+
|
|
299
|
+
Continue to write_documents.
|
|
300
|
+
</step>
|
|
301
|
+
|
|
302
|
+
<step name="write_documents">
|
|
303
|
+
Write all 7 codebase documents using templates and agent findings.
|
|
304
|
+
|
|
305
|
+
**Template filling process:**
|
|
306
|
+
|
|
307
|
+
For each document:
|
|
308
|
+
|
|
309
|
+
1. **Reference template file** from `src/templates/codebase/{name}.md`
|
|
310
|
+
2. **Extract the "File Template" section** - this is the markdown code block containing the actual document structure
|
|
311
|
+
3. **Fill template placeholders** with agent findings:
|
|
312
|
+
- Replace `[YYYY-MM-DD]` with current date
|
|
313
|
+
- Replace `[Placeholder text]` with specific findings from agents
|
|
314
|
+
- If agent found nothing for a section, use appropriate placeholder:
|
|
315
|
+
- "Not detected" for optional infrastructure
|
|
316
|
+
- "Not applicable" for patterns that don't fit this codebase
|
|
317
|
+
- "No significant concerns" for clean codebase areas
|
|
318
|
+
4. **Write to .drive/codebase/{NAME}.md** (uppercase filename)
|
|
319
|
+
|
|
320
|
+
**Example filling pattern:**
|
|
321
|
+
|
|
322
|
+
Template placeholder:
|
|
323
|
+
```
|
|
324
|
+
**Primary:**
|
|
325
|
+
- [Language] [Version] - [Where used: e.g., "all application code"]
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Agent finding:
|
|
329
|
+
```
|
|
330
|
+
Found: TypeScript 5.3 used in all .ts files throughout src/
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Filled result:
|
|
334
|
+
```
|
|
335
|
+
**Primary:**
|
|
336
|
+
- TypeScript 5.3 - All application code
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
**Document writing order:**
|
|
340
|
+
|
|
341
|
+
1. **STACK.md** (from stack.md template + Agent 1 findings)
|
|
342
|
+
2. **INTEGRATIONS.md** (from integrations.md template + Agent 1 findings)
|
|
343
|
+
3. **ARCHITECTURE.md** (from architecture.md template + Agent 2 findings)
|
|
344
|
+
4. **STRUCTURE.md** (from structure.md template + Agent 2 findings)
|
|
345
|
+
5. **CONVENTIONS.md** (from conventions.md template + Agent 3 findings)
|
|
346
|
+
6. **TESTING.md** (from testing.md template + Agent 3 findings)
|
|
347
|
+
7. **CONCERNS.md** (from concerns.md template + Agent 4 findings)
|
|
348
|
+
|
|
349
|
+
After all documents written, continue to verify_output.
|
|
350
|
+
</step>
|
|
351
|
+
|
|
352
|
+
<step name="verify_output">
|
|
353
|
+
Verify all documents created successfully:
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
ls -la .drive/codebase/
|
|
357
|
+
wc -l .drive/codebase/*.md
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**Verification checklist:**
|
|
361
|
+
- All 7 documents exist
|
|
362
|
+
- No empty documents
|
|
363
|
+
- Templates populated with findings
|
|
364
|
+
|
|
365
|
+
If any checks fail, report issues to user.
|
|
366
|
+
|
|
367
|
+
Continue to commit_codebase_map.
|
|
368
|
+
</step>
|
|
369
|
+
|
|
370
|
+
<step name="commit_codebase_map">
|
|
371
|
+
Commit the codebase map:
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
git add .drive/codebase/*.md
|
|
375
|
+
git commit -m "$(cat <<'EOF'
|
|
376
|
+
docs: map existing codebase
|
|
377
|
+
|
|
378
|
+
- STACK.md - Technologies and dependencies
|
|
379
|
+
- ARCHITECTURE.md - System design and patterns
|
|
380
|
+
- STRUCTURE.md - Directory layout
|
|
381
|
+
- CONVENTIONS.md - Code style and patterns
|
|
382
|
+
- TESTING.md - Test structure
|
|
383
|
+
- INTEGRATIONS.md - External services
|
|
384
|
+
- CONCERNS.md - Technical debt and issues
|
|
385
|
+
|
|
386
|
+
Co-Authored-By: Claude <noreply@anthropic.com>
|
|
387
|
+
EOF
|
|
388
|
+
)"
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
Continue to update_state.
|
|
392
|
+
</step>
|
|
393
|
+
|
|
394
|
+
<step name="update_state">
|
|
395
|
+
If .drive/STATE.md exists, note that codebase has been mapped.
|
|
396
|
+
|
|
397
|
+
Add to Accumulated Context section:
|
|
398
|
+
```
|
|
399
|
+
### Codebase Mapped
|
|
400
|
+
Date: [current date]
|
|
401
|
+
Documents: .drive/codebase/ (7 files)
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
Continue to offer_next.
|
|
405
|
+
</step>
|
|
406
|
+
|
|
407
|
+
<step name="offer_next">
|
|
408
|
+
Present completion summary and next steps.
|
|
409
|
+
|
|
410
|
+
**Output format:**
|
|
411
|
+
|
|
412
|
+
```
|
|
413
|
+
Codebase mapping complete.
|
|
414
|
+
|
|
415
|
+
Created .drive/codebase/:
|
|
416
|
+
- STACK.md ([N] lines) - Technologies and dependencies
|
|
417
|
+
- ARCHITECTURE.md ([N] lines) - System design and patterns
|
|
418
|
+
- STRUCTURE.md ([N] lines) - Directory layout and organization
|
|
419
|
+
- CONVENTIONS.md ([N] lines) - Code style and patterns
|
|
420
|
+
- TESTING.md ([N] lines) - Test structure and practices
|
|
421
|
+
- INTEGRATIONS.md ([N] lines) - External services and APIs
|
|
422
|
+
- CONCERNS.md ([N] lines) - Technical debt and issues
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## ▶ Next Up
|
|
428
|
+
|
|
429
|
+
**Initialize Drive project** — use codebase context for planning
|
|
430
|
+
|
|
431
|
+
`/drive:init`
|
|
432
|
+
|
|
433
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
**Also available:**
|
|
438
|
+
- Re-run mapping: `/drive:map-codebase`
|
|
439
|
+
- Review specific file: `cat .drive/codebase/STACK.md`
|
|
440
|
+
- Edit any document before proceeding
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
End workflow.
|
|
446
|
+
</step>
|
|
447
|
+
|
|
448
|
+
</process>
|
|
449
|
+
|
|
450
|
+
<success_criteria>
|
|
451
|
+
- .drive/codebase/ directory created
|
|
452
|
+
- 4 parallel Explore agents spawned with run_in_background=true
|
|
453
|
+
- Agent prompts are specific and actionable
|
|
454
|
+
- TaskOutput used to collect all agent results
|
|
455
|
+
- All 7 codebase documents written using template filling
|
|
456
|
+
- Documents follow template structure with actual findings
|
|
457
|
+
- Clear completion summary with line counts
|
|
458
|
+
- User offered clear next steps
|
|
459
|
+
</success_criteria>
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Create HANDOFF.md file and update STATE.md when pausing work mid-session. Enables seamless resumption in fresh session with full context restoration.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<when_to_use>
|
|
6
|
+
- Before ending a session (planned or context limit approaching)
|
|
7
|
+
- Switching to different project
|
|
8
|
+
- Context window at DEEP or CRITICAL bracket
|
|
9
|
+
- User explicitly pauses work
|
|
10
|
+
</when_to_use>
|
|
11
|
+
|
|
12
|
+
<loop_context>
|
|
13
|
+
Any position in PLAN/APPLY/UNIFY loop. Captures state regardless of where loop is.
|
|
14
|
+
</loop_context>
|
|
15
|
+
|
|
16
|
+
<required_reading>
|
|
17
|
+
@.drive/STATE.md
|
|
18
|
+
@.drive/PROJECT.md
|
|
19
|
+
</required_reading>
|
|
20
|
+
|
|
21
|
+
<references>
|
|
22
|
+
@~/.claude/drive-framework/references/context-management.md
|
|
23
|
+
@~/.claude/drive-framework/templates/HANDOFF.md
|
|
24
|
+
</references>
|
|
25
|
+
|
|
26
|
+
<process>
|
|
27
|
+
|
|
28
|
+
<step name="detect_position" priority="first">
|
|
29
|
+
1. Read `.drive/STATE.md` to get:
|
|
30
|
+
- Current phase and plan
|
|
31
|
+
- Loop position (PLAN/APPLY/UNIFY markers)
|
|
32
|
+
- Last activity
|
|
33
|
+
2. Identify current working directory:
|
|
34
|
+
```bash
|
|
35
|
+
ls -t .drive/phases/*/PLAN*.md 2>/dev/null | head -1
|
|
36
|
+
```
|
|
37
|
+
</step>
|
|
38
|
+
|
|
39
|
+
<step name="gather_session_context">
|
|
40
|
+
**Collect complete state for handoff:**
|
|
41
|
+
|
|
42
|
+
Ask user (or infer from conversation):
|
|
43
|
+
1. **Work completed this session** - What got done?
|
|
44
|
+
2. **Work in progress** - What's partially done?
|
|
45
|
+
3. **Decisions made** - Key choices and rationale
|
|
46
|
+
4. **Blockers/issues** - Anything stuck?
|
|
47
|
+
5. **Mental context** - The approach, what you were thinking
|
|
48
|
+
|
|
49
|
+
If user doesn't provide, summarize from:
|
|
50
|
+
- Recent file modifications (`git status`)
|
|
51
|
+
- Conversation history
|
|
52
|
+
- STATE.md changes
|
|
53
|
+
</step>
|
|
54
|
+
|
|
55
|
+
<step name="create_handoff">
|
|
56
|
+
**Create HANDOFF file:**
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Generate filename
|
|
60
|
+
TIMESTAMP=$(date +%Y-%m-%d)
|
|
61
|
+
HANDOFF_FILE=".drive/HANDOFF-${TIMESTAMP}.md"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Write content (NOT from template, populate directly):**
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
# Drive Handoff
|
|
68
|
+
|
|
69
|
+
**Date:** [current timestamp]
|
|
70
|
+
**Status:** [paused/blocked/context-limit]
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## READ THIS FIRST
|
|
75
|
+
|
|
76
|
+
You have no prior context. This document tells you everything.
|
|
77
|
+
|
|
78
|
+
**Project:** [from PROJECT.md]
|
|
79
|
+
**Core value:** [from PROJECT.md]
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Current State
|
|
84
|
+
|
|
85
|
+
**Version:** [from STATE.md]
|
|
86
|
+
**Phase:** [N] of [total] — [phase name]
|
|
87
|
+
**Plan:** [plan-id] — [status]
|
|
88
|
+
|
|
89
|
+
**Loop Position:**
|
|
90
|
+
```
|
|
91
|
+
PLAN ──▶ APPLY ──▶ UNIFY
|
|
92
|
+
[✓/○] [✓/○] [✓/○]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## What Was Done
|
|
98
|
+
|
|
99
|
+
- [Accomplishment 1]
|
|
100
|
+
- [Accomplishment 2]
|
|
101
|
+
- [Accomplishment 3]
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## What's In Progress
|
|
106
|
+
|
|
107
|
+
- [In-progress item with status]
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## What's Next
|
|
112
|
+
|
|
113
|
+
**Immediate:** [specific next action]
|
|
114
|
+
|
|
115
|
+
**After that:** [following action]
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Key Files
|
|
120
|
+
|
|
121
|
+
| File | Purpose |
|
|
122
|
+
|------|---------|
|
|
123
|
+
| `.drive/STATE.md` | Live project state |
|
|
124
|
+
| `.drive/ROADMAP.md` | Phase overview |
|
|
125
|
+
| [current plan path] | [plan purpose] |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Resume Instructions
|
|
130
|
+
|
|
131
|
+
1. Read `.drive/STATE.md` for latest position
|
|
132
|
+
2. Check loop position
|
|
133
|
+
3. Run `/drive:resume` or `/drive:progress`
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
*Handoff created: [timestamp]*
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Be specific enough for a fresh Claude to understand immediately.
|
|
141
|
+
</step>
|
|
142
|
+
|
|
143
|
+
<step name="update_state">
|
|
144
|
+
**Update `.drive/STATE.md` Session Continuity section:**
|
|
145
|
+
|
|
146
|
+
```markdown
|
|
147
|
+
## Session Continuity
|
|
148
|
+
|
|
149
|
+
Last session: [timestamp]
|
|
150
|
+
Stopped at: [what was happening]
|
|
151
|
+
Next action: [clear directive]
|
|
152
|
+
Resume file: .drive/HANDOFF-[date].md
|
|
153
|
+
Resume context:
|
|
154
|
+
- [bullet 1 - key context]
|
|
155
|
+
- [bullet 2 - key context]
|
|
156
|
+
- [bullet 3 - key context]
|
|
157
|
+
```
|
|
158
|
+
</step>
|
|
159
|
+
|
|
160
|
+
<step name="optional_commit">
|
|
161
|
+
**If git repo, offer WIP commit with explicit two-question flow:**
|
|
162
|
+
|
|
163
|
+
**Question 1 — Commit WIP?**
|
|
164
|
+
```
|
|
165
|
+
────────────────────────────────────────
|
|
166
|
+
Would you like to commit your work-in-progress?
|
|
167
|
+
|
|
168
|
+
This saves a checkpoint you can return to.
|
|
169
|
+
────────────────────────────────────────
|
|
170
|
+
[yes] / [no]
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**If no:** Skip to confirm step.
|
|
174
|
+
|
|
175
|
+
**If yes — Question 2 — Branch choice:**
|
|
176
|
+
```
|
|
177
|
+
────────────────────────────────────────
|
|
178
|
+
Where should this WIP commit go?
|
|
179
|
+
|
|
180
|
+
[1] main — Commit directly to main branch
|
|
181
|
+
[2] feature branch — Create feature/{phase-name} branch first
|
|
182
|
+
|
|
183
|
+
Note: Feature branch is useful if work isn't ready for main.
|
|
184
|
+
────────────────────────────────────────
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**If main (option 1):**
|
|
188
|
+
```bash
|
|
189
|
+
git add .drive/ src/
|
|
190
|
+
git commit -m "wip({phase}): paused at {plan}
|
|
191
|
+
|
|
192
|
+
Co-Authored-By: Claude <noreply@anthropic.com>"
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**If feature branch (option 2):**
|
|
196
|
+
```bash
|
|
197
|
+
# Create and switch to feature branch
|
|
198
|
+
git checkout -b feature/{phase-name}
|
|
199
|
+
|
|
200
|
+
# Commit to feature branch
|
|
201
|
+
git add .drive/ src/
|
|
202
|
+
git commit -m "wip({phase}): paused at {plan}
|
|
203
|
+
|
|
204
|
+
Co-Authored-By: Claude <noreply@anthropic.com>"
|
|
205
|
+
|
|
206
|
+
# Record branch strategy in STATE.md for transition-phase
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**Update STATE.md Session Continuity with branch info:**
|
|
210
|
+
```markdown
|
|
211
|
+
Git strategy: {main|feature/{phase-name}}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
This enables transition-phase.md to know the branch strategy when reconciling.
|
|
215
|
+
</step>
|
|
216
|
+
|
|
217
|
+
<step name="confirm">
|
|
218
|
+
**Display confirmation:**
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
════════════════════════════════════════
|
|
222
|
+
Drive SESSION PAUSED
|
|
223
|
+
════════════════════════════════════════
|
|
224
|
+
|
|
225
|
+
Handoff created: .drive/HANDOFF-[date].md
|
|
226
|
+
|
|
227
|
+
Current State:
|
|
228
|
+
Phase: [N] of [M]
|
|
229
|
+
Plan: [status]
|
|
230
|
+
Loop: [PLAN/APPLY/UNIFY position]
|
|
231
|
+
|
|
232
|
+
To resume later:
|
|
233
|
+
/drive:resume
|
|
234
|
+
|
|
235
|
+
════════════════════════════════════════
|
|
236
|
+
```
|
|
237
|
+
</step>
|
|
238
|
+
|
|
239
|
+
</process>
|
|
240
|
+
|
|
241
|
+
<output>
|
|
242
|
+
- HANDOFF-{date}.md created in .drive/
|
|
243
|
+
- STATE.md updated with session continuity
|
|
244
|
+
- Optional WIP commit with branch choice (main or feature/{phase})
|
|
245
|
+
- Git strategy recorded in STATE.md for transition-phase
|
|
246
|
+
- User knows how to resume
|
|
247
|
+
</output>
|
|
248
|
+
|
|
249
|
+
<error_handling>
|
|
250
|
+
**No .drive/ directory:**
|
|
251
|
+
- "No Drive project found. Nothing to pause."
|
|
252
|
+
|
|
253
|
+
**STATE.md missing or corrupted:**
|
|
254
|
+
- Create minimal handoff from available context
|
|
255
|
+
- Note the gap in handoff file
|
|
256
|
+
|
|
257
|
+
**Git not available:**
|
|
258
|
+
- Skip commit step, still create handoff
|
|
259
|
+
</error_handling>
|