@karthikrajkumar.kannan/get-things-done 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/LICENSE +21 -0
- package/README.md +237 -0
- package/agents/backward/gtd-accuracy-verifier.md +198 -0
- package/agents/backward/gtd-api-doc-writer.md +130 -0
- package/agents/backward/gtd-api-extractor.md +128 -0
- package/agents/backward/gtd-architecture-analyzer.md +144 -0
- package/agents/backward/gtd-capacity-writer.md +123 -0
- package/agents/backward/gtd-codebase-mapper.md +274 -0
- package/agents/backward/gtd-completeness-auditor.md +129 -0
- package/agents/backward/gtd-data-flow-tracer.md +104 -0
- package/agents/backward/gtd-dependency-analyzer.md +98 -0
- package/agents/backward/gtd-diagram-generator.md +152 -0
- package/agents/backward/gtd-hld-writer.md +123 -0
- package/agents/backward/gtd-lld-writer.md +126 -0
- package/agents/backward/gtd-pattern-detector.md +111 -0
- package/agents/backward/gtd-performance-profiler.md +93 -0
- package/agents/backward/gtd-runbook-writer.md +126 -0
- package/agents/backward/gtd-security-scanner.md +106 -0
- package/agents/backward/gtd-sysdesign-writer.md +137 -0
- package/agents/backward/gtd-tdd-writer.md +125 -0
- package/agents/forward/gtd-code-reviewer.md +130 -0
- package/agents/forward/gtd-debugger.md +133 -0
- package/agents/forward/gtd-deployer.md +110 -0
- package/agents/forward/gtd-executor.md +110 -0
- package/agents/forward/gtd-phase-researcher.md +114 -0
- package/agents/forward/gtd-plan-checker.md +132 -0
- package/agents/forward/gtd-planner.md +136 -0
- package/agents/forward/gtd-project-researcher.md +106 -0
- package/agents/forward/gtd-research-synthesizer.md +99 -0
- package/agents/forward/gtd-roadmapper.md +126 -0
- package/agents/forward/gtd-test-runner.md +119 -0
- package/agents/forward/gtd-verifier.md +115 -0
- package/agents/sync/gtd-alignment-auditor.md +222 -0
- package/agents/sync/gtd-drift-detector.md +222 -0
- package/agents/sync/gtd-reconciliation-planner.md +194 -0
- package/bin/gtd-tools.cjs +89 -0
- package/bin/install.js +164 -0
- package/commands/gtd/backward/analyze.md +42 -0
- package/commands/gtd/backward/create-all.md +32 -0
- package/commands/gtd/backward/create-api-docs.md +33 -0
- package/commands/gtd/backward/create-capacity.md +33 -0
- package/commands/gtd/backward/create-hld.md +33 -0
- package/commands/gtd/backward/create-lld.md +33 -0
- package/commands/gtd/backward/create-runbook.md +33 -0
- package/commands/gtd/backward/create-sysdesign.md +33 -0
- package/commands/gtd/backward/create-tdd.md +33 -0
- package/commands/gtd/backward/diff.md +22 -0
- package/commands/gtd/backward/doc-status.md +24 -0
- package/commands/gtd/backward/review-docs.md +22 -0
- package/commands/gtd/backward/scan.md +32 -0
- package/commands/gtd/backward/update-docs.md +30 -0
- package/commands/gtd/backward/verify-docs.md +28 -0
- package/commands/gtd/forward/add-phase.md +28 -0
- package/commands/gtd/forward/autonomous.md +28 -0
- package/commands/gtd/forward/code-review.md +28 -0
- package/commands/gtd/forward/complete-milestone.md +28 -0
- package/commands/gtd/forward/debug.md +28 -0
- package/commands/gtd/forward/discuss-phase.md +29 -0
- package/commands/gtd/forward/execute-phase.md +28 -0
- package/commands/gtd/forward/fast.md +28 -0
- package/commands/gtd/forward/new-milestone.md +28 -0
- package/commands/gtd/forward/new-project.md +29 -0
- package/commands/gtd/forward/next.md +28 -0
- package/commands/gtd/forward/plan-phase.md +29 -0
- package/commands/gtd/forward/progress.md +28 -0
- package/commands/gtd/forward/quick.md +28 -0
- package/commands/gtd/forward/ship.md +28 -0
- package/commands/gtd/forward/verify-work.md +28 -0
- package/commands/gtd/sync/audit.md +27 -0
- package/commands/gtd/sync/drift.md +27 -0
- package/commands/gtd/sync/reconcile.md +27 -0
- package/commands/gtd/sync/sync.md +27 -0
- package/commands/gtd/utility/health.md +53 -0
- package/commands/gtd/utility/help.md +61 -0
- package/commands/gtd/utility/map-codebase.md +27 -0
- package/commands/gtd/utility/settings.md +65 -0
- package/commands/gtd/utility/status.md +57 -0
- package/contexts/analysis.md +26 -0
- package/contexts/execution.md +35 -0
- package/contexts/planning.md +33 -0
- package/contexts/research.md +26 -0
- package/contexts/review.md +27 -0
- package/contexts/writing.md +29 -0
- package/hooks/gtd-check-update.js +37 -0
- package/hooks/gtd-context-monitor.js +32 -0
- package/hooks/gtd-prompt-guard.js +35 -0
- package/hooks/gtd-statusline.js +32 -0
- package/lib/agent-skills.cjs +130 -0
- package/lib/analysis.cjs +242 -0
- package/lib/config.cjs +255 -0
- package/lib/deploy.cjs +222 -0
- package/lib/diff-engine.cjs +245 -0
- package/lib/docs.cjs +243 -0
- package/lib/drift-engine.cjs +202 -0
- package/lib/file-ops.cjs +106 -0
- package/lib/frontmatter.cjs +100 -0
- package/lib/git.cjs +137 -0
- package/lib/init.cjs +370 -0
- package/lib/installer-core.cjs +197 -0
- package/lib/installers/augment.cjs +62 -0
- package/lib/installers/claude.cjs +89 -0
- package/lib/installers/cline.cjs +96 -0
- package/lib/installers/codex.cjs +63 -0
- package/lib/installers/copilot.cjs +62 -0
- package/lib/installers/cursor.cjs +62 -0
- package/lib/installers/gemini.cjs +62 -0
- package/lib/installers/opencode.cjs +62 -0
- package/lib/installers/windsurf.cjs +62 -0
- package/lib/phase.cjs +206 -0
- package/lib/roadmap.cjs +156 -0
- package/lib/scale-adapter.cjs +192 -0
- package/lib/security.cjs +243 -0
- package/lib/state.cjs +320 -0
- package/lib/template.cjs +218 -0
- package/lib/test-runner.cjs +202 -0
- package/package.json +76 -0
- package/references/agent-contracts.md +157 -0
- package/references/analysis-patterns.md +138 -0
- package/references/context-budget.md +148 -0
- package/references/diagram-conventions.md +88 -0
- package/references/document-standards.md +60 -0
- package/references/framework-signatures.md +609 -0
- package/references/gate-prompts.md +239 -0
- package/references/language-analyzers.md +227 -0
- package/references/planning-config.md +125 -0
- package/references/questioning.md +142 -0
- package/references/verification-patterns.md +67 -0
- package/templates/backward/api-docs/standard.md +42 -0
- package/templates/backward/capacity/standard.md +50 -0
- package/templates/backward/formats/compliance-guide.md +45 -0
- package/templates/backward/hld/standard.md +62 -0
- package/templates/backward/lld/standard.md +63 -0
- package/templates/backward/runbook/standard.md +50 -0
- package/templates/backward/system-design/standard.md +64 -0
- package/templates/backward/tdd/compliance.md +146 -0
- package/templates/backward/tdd/enterprise.md +134 -0
- package/templates/backward/tdd/standard.md +88 -0
- package/templates/backward/tdd/startup.md +51 -0
- package/templates/forward/context.md +65 -0
- package/templates/forward/phase-prompt.md +109 -0
- package/templates/forward/project.md +71 -0
- package/templates/forward/requirements.md +74 -0
- package/templates/forward/research/ARCHITECTURE.md +118 -0
- package/templates/forward/research/FEATURES.md +95 -0
- package/templates/forward/research/PITFALLS.md +106 -0
- package/templates/forward/research/STACK.md +80 -0
- package/templates/forward/research/SUMMARY.md +86 -0
- package/templates/forward/roadmap.md +72 -0
- package/workflows/backward/analyze-codebase.md +123 -0
- package/workflows/backward/create-all.md +53 -0
- package/workflows/backward/generate-document.md +182 -0
- package/workflows/backward/incremental-update.md +71 -0
- package/workflows/backward/review-document.md +102 -0
- package/workflows/backward/scan-codebase.md +111 -0
- package/workflows/backward/verify-document.md +79 -0
- package/workflows/forward/add-phase.md +29 -0
- package/workflows/forward/autonomous.md +62 -0
- package/workflows/forward/code-review.md +78 -0
- package/workflows/forward/complete-milestone.md +45 -0
- package/workflows/forward/debug.md +78 -0
- package/workflows/forward/deploy-local.md +51 -0
- package/workflows/forward/discuss-phase.md +89 -0
- package/workflows/forward/execute-phase.md +138 -0
- package/workflows/forward/fast.md +64 -0
- package/workflows/forward/new-milestone.md +61 -0
- package/workflows/forward/new-project.md +126 -0
- package/workflows/forward/next.md +49 -0
- package/workflows/forward/plan-phase.md +100 -0
- package/workflows/forward/progress.md +37 -0
- package/workflows/forward/quick.md +65 -0
- package/workflows/forward/ship.md +40 -0
- package/workflows/forward/test-phase.md +47 -0
- package/workflows/forward/verify-work.md +52 -0
- package/workflows/sync/audit.md +110 -0
- package/workflows/sync/detect-drift.md +122 -0
- package/workflows/sync/reconcile.md +113 -0
- package/workflows/sync/sync.md +150 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Run accuracy verification and completeness audit on a generated document.
|
|
3
|
+
Spawns both verification agents and produces a combined report.
|
|
4
|
+
</purpose>
|
|
5
|
+
|
|
6
|
+
<available_agent_types>
|
|
7
|
+
- gtd-accuracy-verifier — Cross-references claims against codebase
|
|
8
|
+
- gtd-completeness-auditor — Checks template and component coverage
|
|
9
|
+
</available_agent_types>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
<step name="initialize">
|
|
14
|
+
```bash
|
|
15
|
+
INIT=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" init verify-document "$DOC_TYPE" "$ARGUMENTS")
|
|
16
|
+
```
|
|
17
|
+
Parse: project_root, docs_root, config, state, args.
|
|
18
|
+
Extract: doc_type from args, --strict flag.
|
|
19
|
+
|
|
20
|
+
Locate the document to verify:
|
|
21
|
+
1. Check drafts/<TYPE>-DRAFT.md (verify draft before finalization)
|
|
22
|
+
2. Check documents/<TYPE>.md (verify finalized document)
|
|
23
|
+
3. Error if neither exists
|
|
24
|
+
</step>
|
|
25
|
+
|
|
26
|
+
<step name="spawn_verifiers">
|
|
27
|
+
**Spawn accuracy verifier:**
|
|
28
|
+
```
|
|
29
|
+
Verify the document at: {doc_path}
|
|
30
|
+
Project root: {project_root}
|
|
31
|
+
Codebase map: {docs_root}/CODEBASE-MAP.md
|
|
32
|
+
Write report to: {docs_root}/verification/{DOC_FILENAME}-VERIFICATION.md
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Spawn completeness auditor:**
|
|
36
|
+
```
|
|
37
|
+
Audit completeness of: {doc_path}
|
|
38
|
+
Codebase map: {docs_root}/CODEBASE-MAP.md
|
|
39
|
+
Analysis directory: {docs_root}/analysis/
|
|
40
|
+
Template type: {doc_type}
|
|
41
|
+
Write report to: {docs_root}/verification/{DOC_FILENAME}-COMPLETENESS.md
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Run both agents (sequentially or in parallel per config).
|
|
45
|
+
</step>
|
|
46
|
+
|
|
47
|
+
<step name="aggregate_results">
|
|
48
|
+
Read both reports. Produce combined summary:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
📋 Verification Results: {Doc Type}
|
|
52
|
+
|
|
53
|
+
Accuracy:
|
|
54
|
+
✓ Verified: {N} claims
|
|
55
|
+
✗ Inaccurate: {N} claims
|
|
56
|
+
? Unverifiable: {N} claims
|
|
57
|
+
Confidence: {score}%
|
|
58
|
+
|
|
59
|
+
Completeness:
|
|
60
|
+
Sections: {complete}/{total}
|
|
61
|
+
Components: {documented}/{total}
|
|
62
|
+
Overall: {score}%
|
|
63
|
+
|
|
64
|
+
{#if inaccurate > 0}
|
|
65
|
+
⚠ Corrections needed:
|
|
66
|
+
{list of inaccuracies with corrections}
|
|
67
|
+
{/if}
|
|
68
|
+
|
|
69
|
+
{#if gaps > 0}
|
|
70
|
+
📝 Documentation gaps:
|
|
71
|
+
{list of missing components/sections}
|
|
72
|
+
{/if}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
If --strict and (accuracy < 90% or completeness < 100%):
|
|
76
|
+
Display: "STRICT MODE: Verification failed. Fix issues before finalizing."
|
|
77
|
+
</step>
|
|
78
|
+
|
|
79
|
+
</process>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Add a new phase to the existing roadmap without disrupting current progress.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<process>
|
|
6
|
+
|
|
7
|
+
<step name="initialize">
|
|
8
|
+
```bash
|
|
9
|
+
INIT=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" init add-phase "$ARGUMENTS")
|
|
10
|
+
```
|
|
11
|
+
Parse: docs_root, roadmap, args (phase description).
|
|
12
|
+
</step>
|
|
13
|
+
|
|
14
|
+
<step name="determine_position">
|
|
15
|
+
Read ROADMAP.md → determine next phase number.
|
|
16
|
+
Ask user: insert at position N or append to end?
|
|
17
|
+
</step>
|
|
18
|
+
|
|
19
|
+
<step name="create_phase">
|
|
20
|
+
Create phase directory: .planning/phases/{padded}-{slug}/
|
|
21
|
+
Update ROADMAP.md with new phase entry (status: pending).
|
|
22
|
+
Link requirements if provided.
|
|
23
|
+
</step>
|
|
24
|
+
|
|
25
|
+
<step name="report">
|
|
26
|
+
Display: "Phase {N} added: {name}. Run /gtd-discuss-phase {N} to begin."
|
|
27
|
+
</step>
|
|
28
|
+
|
|
29
|
+
</process>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Run phases N through M unattended. Loops through each phase from current to target, executing the full pipeline (discuss, plan, execute, verify) with auto-approved gates. Stops on any abort gate.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<process>
|
|
6
|
+
|
|
7
|
+
<step name="initialize">
|
|
8
|
+
```bash
|
|
9
|
+
INIT=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" init autonomous "$ARGUMENTS")
|
|
10
|
+
```
|
|
11
|
+
Parse: docs_root, state, roadmap, config.
|
|
12
|
+
Parse flags: --from N (default: current phase), --to M (required).
|
|
13
|
+
Validate: phase range exists in ROADMAP.md.
|
|
14
|
+
</step>
|
|
15
|
+
|
|
16
|
+
<step name="configure_auto_mode">
|
|
17
|
+
Set auto-approve for all human gates within the loop.
|
|
18
|
+
Record original state so it can be restored on abort.
|
|
19
|
+
Track progress: phases_completed, phases_remaining, errors.
|
|
20
|
+
</step>
|
|
21
|
+
|
|
22
|
+
<step name="loop_phases">
|
|
23
|
+
For each phase from {start} to {target}:
|
|
24
|
+
|
|
25
|
+
1. **Discuss** (auto): run discuss-phase with --auto flag, skip interactive prompts
|
|
26
|
+
2. **Plan**: run plan-phase for the current phase
|
|
27
|
+
3. **Execute**: run execute-phase for the current phase
|
|
28
|
+
4. **Verify**: run verify-work for the current phase
|
|
29
|
+
|
|
30
|
+
After each sub-step:
|
|
31
|
+
- Check result status — if abort gate triggered, stop immediately
|
|
32
|
+
- Update progress tracker
|
|
33
|
+
- Log: "Phase {N}/{M}: {sub_step} complete"
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
node "$GTD_TOOLS_PATH/gtd-tools.cjs" state update forward.current_phase "$PHASE"
|
|
37
|
+
```
|
|
38
|
+
</step>
|
|
39
|
+
|
|
40
|
+
<step name="report">
|
|
41
|
+
Display:
|
|
42
|
+
```
|
|
43
|
+
Autonomous run complete
|
|
44
|
+
|
|
45
|
+
Phases completed: {count}/{total}
|
|
46
|
+
Total commits: {commit_count}
|
|
47
|
+
Duration: {elapsed}
|
|
48
|
+
Status: {success|aborted at Phase N step}
|
|
49
|
+
|
|
50
|
+
Next: /gtd-ship (create PR)
|
|
51
|
+
/gtd-deploy-local (test locally)
|
|
52
|
+
```
|
|
53
|
+
</step>
|
|
54
|
+
|
|
55
|
+
</process>
|
|
56
|
+
|
|
57
|
+
<error_handling>
|
|
58
|
+
- Abort gate triggered → stop loop, preserve state, report which phase/step failed
|
|
59
|
+
- Executor crash → retry phase once, then abort with report
|
|
60
|
+
- Verification failure → attempt debug loop (3 tries), then abort if unresolved
|
|
61
|
+
- Ctrl+C / interrupt → save progress, report partial completion
|
|
62
|
+
</error_handling>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Code quality review. Spawns a gtd-code-reviewer agent on the current phase's changes. Produces REVIEW.md with findings categorized as critical, major, minor, or suggestion.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<available_agent_types>
|
|
6
|
+
- gtd-code-reviewer — Reviews code for quality, correctness, and style
|
|
7
|
+
</available_agent_types>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
<step name="initialize">
|
|
12
|
+
```bash
|
|
13
|
+
INIT=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" init code-review "$ARGUMENTS")
|
|
14
|
+
```
|
|
15
|
+
Parse: phase_number (optional, defaults to current phase), docs_root, config, state.
|
|
16
|
+
Determine diff scope: phase branch vs main, or staged changes.
|
|
17
|
+
</step>
|
|
18
|
+
|
|
19
|
+
<step name="collect_changes">
|
|
20
|
+
Gather the changeset for review:
|
|
21
|
+
```bash
|
|
22
|
+
DIFF=$(git diff main...HEAD --stat)
|
|
23
|
+
FILES=$(git diff main...HEAD --name-only)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If no phase specified, review all uncommitted + committed changes since last milestone.
|
|
27
|
+
Read project conventions from PROJECT.md if available.
|
|
28
|
+
</step>
|
|
29
|
+
|
|
30
|
+
<step name="spawn_reviewer">
|
|
31
|
+
Spawn gtd-code-reviewer agent:
|
|
32
|
+
```
|
|
33
|
+
Review these changes for code quality:
|
|
34
|
+
|
|
35
|
+
Changed files:
|
|
36
|
+
{file_list}
|
|
37
|
+
|
|
38
|
+
Project context:
|
|
39
|
+
PROJECT.md: {path}
|
|
40
|
+
REQUIREMENTS.md: {path}
|
|
41
|
+
|
|
42
|
+
Review criteria:
|
|
43
|
+
- Correctness: bugs, logic errors, edge cases
|
|
44
|
+
- Security: vulnerabilities, input validation
|
|
45
|
+
- Performance: inefficiencies, N+1 queries
|
|
46
|
+
- Maintainability: readability, naming, complexity
|
|
47
|
+
- Style: consistency with project conventions
|
|
48
|
+
|
|
49
|
+
Categorize each finding as: critical / major / minor / suggestion
|
|
50
|
+
Write: {phase_dir}/REVIEW.md
|
|
51
|
+
```
|
|
52
|
+
</step>
|
|
53
|
+
|
|
54
|
+
<step name="display">
|
|
55
|
+
Display summary:
|
|
56
|
+
```
|
|
57
|
+
Code Review — Phase {N}
|
|
58
|
+
|
|
59
|
+
Files reviewed: {count}
|
|
60
|
+
Critical: {count}
|
|
61
|
+
Major: {count}
|
|
62
|
+
Minor: {count}
|
|
63
|
+
Suggestions: {count}
|
|
64
|
+
|
|
65
|
+
Full report: {phase_dir}/REVIEW.md
|
|
66
|
+
|
|
67
|
+
Next: /gtd-debug (fix critical issues)
|
|
68
|
+
/gtd-next (continue if clean)
|
|
69
|
+
```
|
|
70
|
+
</step>
|
|
71
|
+
|
|
72
|
+
</process>
|
|
73
|
+
|
|
74
|
+
<error_handling>
|
|
75
|
+
- No changes to review → inform user: "No changes found. Nothing to review."
|
|
76
|
+
- Phase not found → review current working tree changes instead
|
|
77
|
+
- Reviewer timeout → produce partial review from completed files
|
|
78
|
+
</error_handling>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Close the current milestone — verify all phases complete, generate summary, archive.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<process>
|
|
6
|
+
|
|
7
|
+
<step name="initialize">
|
|
8
|
+
```bash
|
|
9
|
+
INIT=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" init complete-milestone "$ARGUMENTS")
|
|
10
|
+
```
|
|
11
|
+
Parse: state, roadmap.
|
|
12
|
+
</step>
|
|
13
|
+
|
|
14
|
+
<step name="verify_all_complete">
|
|
15
|
+
Check ROADMAP.md: are all phases marked complete?
|
|
16
|
+
If not: display which phases remain, ask to proceed anyway or complete them first.
|
|
17
|
+
</step>
|
|
18
|
+
|
|
19
|
+
<step name="generate_summary">
|
|
20
|
+
Create .planning/milestones/{milestone-name}-SUMMARY.md:
|
|
21
|
+
- Phases completed, tasks executed, tests passed
|
|
22
|
+
- Requirements coverage
|
|
23
|
+
- Timeline and cost metrics
|
|
24
|
+
</step>
|
|
25
|
+
|
|
26
|
+
<step name="archive">
|
|
27
|
+
Archive current milestone state.
|
|
28
|
+
Update STATE.md: reset forward.current_phase.
|
|
29
|
+
Optionally trigger backward pipeline: /gtd-create-all (generate fresh docs for the completed milestone).
|
|
30
|
+
</step>
|
|
31
|
+
|
|
32
|
+
<step name="report">
|
|
33
|
+
Display:
|
|
34
|
+
```
|
|
35
|
+
✓ Milestone {name} complete!
|
|
36
|
+
|
|
37
|
+
Phases: {count}
|
|
38
|
+
Requirements: {covered}/{total}
|
|
39
|
+
|
|
40
|
+
Next: /gtd-new-milestone (start next milestone)
|
|
41
|
+
/gtd-create-all (generate documentation)
|
|
42
|
+
```
|
|
43
|
+
</step>
|
|
44
|
+
|
|
45
|
+
</process>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Diagnose and fix issues. Spawns a gtd-debugger agent with error context. Accepts error output, stack trace, or "last command failed" as input. Agent reads code, identifies root cause, applies fix, and verifies.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<available_agent_types>
|
|
6
|
+
- gtd-debugger — Diagnoses failures, reads code, applies fixes
|
|
7
|
+
</available_agent_types>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
<step name="initialize">
|
|
12
|
+
```bash
|
|
13
|
+
INIT=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" init debug "$ARGUMENTS")
|
|
14
|
+
```
|
|
15
|
+
Parse: docs_root, config, state, error_context from arguments.
|
|
16
|
+
Accept input as: raw error text, --file path/to/error.log, or --last (re-read last command output).
|
|
17
|
+
</step>
|
|
18
|
+
|
|
19
|
+
<step name="gather_context">
|
|
20
|
+
Collect debugging context:
|
|
21
|
+
- Error message or stack trace from input
|
|
22
|
+
- Current phase and recent changes (git log --oneline -10)
|
|
23
|
+
- Relevant source files mentioned in the error
|
|
24
|
+
- Test output if available
|
|
25
|
+
|
|
26
|
+
If --last flag: retrieve the most recent command output from shell history or logs.
|
|
27
|
+
</step>
|
|
28
|
+
|
|
29
|
+
<step name="spawn_debugger">
|
|
30
|
+
Spawn gtd-debugger agent:
|
|
31
|
+
```
|
|
32
|
+
Diagnose and fix this issue:
|
|
33
|
+
|
|
34
|
+
Error context:
|
|
35
|
+
{error_output}
|
|
36
|
+
|
|
37
|
+
Recent changes:
|
|
38
|
+
{git_log}
|
|
39
|
+
|
|
40
|
+
Relevant files:
|
|
41
|
+
{file_list}
|
|
42
|
+
|
|
43
|
+
Project docs:
|
|
44
|
+
PROJECT.md: {path}
|
|
45
|
+
REQUIREMENTS.md: {path}
|
|
46
|
+
|
|
47
|
+
Steps:
|
|
48
|
+
1. Identify root cause
|
|
49
|
+
2. Apply minimal fix
|
|
50
|
+
3. Verify fix resolves the error
|
|
51
|
+
4. Commit with message: "fix: {short description}"
|
|
52
|
+
```
|
|
53
|
+
</step>
|
|
54
|
+
|
|
55
|
+
<step name="report">
|
|
56
|
+
Display:
|
|
57
|
+
```
|
|
58
|
+
Debug complete
|
|
59
|
+
|
|
60
|
+
Root cause: {description}
|
|
61
|
+
Fix applied: {files_changed}
|
|
62
|
+
Commit: {short_sha}
|
|
63
|
+
Verification: {pass|fail}
|
|
64
|
+
|
|
65
|
+
Next: /gtd-next (continue pipeline)
|
|
66
|
+
/gtd-debug (if issue persists)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If fix failed after 3 attempts: report unresolved, suggest manual intervention.
|
|
70
|
+
</step>
|
|
71
|
+
|
|
72
|
+
</process>
|
|
73
|
+
|
|
74
|
+
<error_handling>
|
|
75
|
+
- No error context provided → prompt user: "Paste the error or use --last"
|
|
76
|
+
- Debugger cannot identify cause → report findings, suggest files to inspect manually
|
|
77
|
+
- Fix introduces new failures → revert fix, report both original and new errors
|
|
78
|
+
</error_handling>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Deploy the project locally — detect method, build, start, health check.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<available_agent_types>
|
|
6
|
+
- gtd-deployer — Local deployment orchestration
|
|
7
|
+
</available_agent_types>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
<step name="initialize">
|
|
12
|
+
```bash
|
|
13
|
+
INIT=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" init deploy-local "$ARGUMENTS")
|
|
14
|
+
DEPLOY=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" deploy detect)
|
|
15
|
+
```
|
|
16
|
+
Parse: method, port, config.deploy settings.
|
|
17
|
+
</step>
|
|
18
|
+
|
|
19
|
+
<step name="pre_deploy">
|
|
20
|
+
Check port availability:
|
|
21
|
+
```bash
|
|
22
|
+
PORT_CHECK=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" deploy check-port "$PORT")
|
|
23
|
+
```
|
|
24
|
+
If port in use: warn user, offer to use different port or kill existing process.
|
|
25
|
+
</step>
|
|
26
|
+
|
|
27
|
+
<step name="spawn_deployer">
|
|
28
|
+
Spawn gtd-deployer agent with project context and deployment info.
|
|
29
|
+
Agent handles: dependency install → build → start → health check.
|
|
30
|
+
Produces: DEPLOY-REPORT.md
|
|
31
|
+
</step>
|
|
32
|
+
|
|
33
|
+
<step name="update_state">
|
|
34
|
+
```bash
|
|
35
|
+
node "$GTD_TOOLS_PATH/gtd-tools.cjs" state update forward.status deployed
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Display:
|
|
39
|
+
```
|
|
40
|
+
✓ Deployed locally
|
|
41
|
+
|
|
42
|
+
Method: {method}
|
|
43
|
+
URL: http://localhost:{port}
|
|
44
|
+
Health: {healthy|unhealthy}
|
|
45
|
+
|
|
46
|
+
Next: /gtd-test-phase {N} (run tests)
|
|
47
|
+
/gtd-verify-work {N} (full verification)
|
|
48
|
+
```
|
|
49
|
+
</step>
|
|
50
|
+
|
|
51
|
+
</process>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Capture user's implementation preferences and decisions for a specific phase before research and planning. Eliminates gray areas that cause the AI to guess during execution.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
@references/questioning.md
|
|
7
|
+
</required_reading>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
<step name="initialize">
|
|
12
|
+
```bash
|
|
13
|
+
INIT=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" init discuss-phase "$ARGUMENTS")
|
|
14
|
+
```
|
|
15
|
+
Parse: phase_number, docs_root, config, state, roadmap, phase_context.
|
|
16
|
+
|
|
17
|
+
Load ROADMAP.md → get phase description and requirements.
|
|
18
|
+
Check if {phase}-CONTEXT.md already exists → load prior decisions to avoid re-asking.
|
|
19
|
+
</step>
|
|
20
|
+
|
|
21
|
+
<step name="scout_codebase">
|
|
22
|
+
If code already exists (brownfield or previous phases completed):
|
|
23
|
+
Read relevant source files to understand current state.
|
|
24
|
+
Identify gray areas based on what's already implemented vs what's needed.
|
|
25
|
+
</step>
|
|
26
|
+
|
|
27
|
+
<step name="identify_gray_areas">
|
|
28
|
+
Analyze phase scope and identify decision points:
|
|
29
|
+
|
|
30
|
+
| Category | Example Decisions |
|
|
31
|
+
|----------|-------------------|
|
|
32
|
+
| Visual/UI | Layout, density, interactions, empty states |
|
|
33
|
+
| API/CLI | Response format, pagination, error handling |
|
|
34
|
+
| Data | Schema design, relationships, indexing |
|
|
35
|
+
| Organization | File structure, naming conventions |
|
|
36
|
+
| Integration | Third-party services, auth flow |
|
|
37
|
+
| Performance | Caching strategy, pagination limits |
|
|
38
|
+
|
|
39
|
+
Filter out decisions already made in prior CONTEXT.md files.
|
|
40
|
+
</step>
|
|
41
|
+
|
|
42
|
+
<step name="ask_questions">
|
|
43
|
+
If NOT --auto mode:
|
|
44
|
+
Present gray areas grouped by category.
|
|
45
|
+
For each, offer options with recommendations.
|
|
46
|
+
Use --batch flag for grouped Q&A.
|
|
47
|
+
|
|
48
|
+
If --auto mode:
|
|
49
|
+
Auto-select recommended defaults for all gray areas.
|
|
50
|
+
</step>
|
|
51
|
+
|
|
52
|
+
<step name="write_context">
|
|
53
|
+
Write decisions to .planning/phases/{phase}/{phase}-CONTEXT.md:
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
---
|
|
57
|
+
phase: {number}
|
|
58
|
+
timestamp: {ISO 8601}
|
|
59
|
+
mode: {guided|auto}
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
# Phase {N} Context: {Phase Name}
|
|
63
|
+
|
|
64
|
+
## Decisions
|
|
65
|
+
| # | Area | Decision | Rationale |
|
|
66
|
+
|---|------|----------|-----------|
|
|
67
|
+
| 1 | ... | ... | ... |
|
|
68
|
+
|
|
69
|
+
## Preferences
|
|
70
|
+
...
|
|
71
|
+
|
|
72
|
+
## Open Questions (deferred)
|
|
73
|
+
...
|
|
74
|
+
```
|
|
75
|
+
</step>
|
|
76
|
+
|
|
77
|
+
<step name="report">
|
|
78
|
+
Display:
|
|
79
|
+
```
|
|
80
|
+
✓ Phase {N} discussion complete
|
|
81
|
+
|
|
82
|
+
Decisions captured: {count}
|
|
83
|
+
Open questions deferred: {count}
|
|
84
|
+
|
|
85
|
+
Next: /gtd-plan-phase {N} (research + create execution plan)
|
|
86
|
+
```
|
|
87
|
+
</step>
|
|
88
|
+
|
|
89
|
+
</process>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Execute all plans in a phase using wave-based parallel execution. Orchestrator stays lean — delegates plan execution to executor subagents. Each executor gets a fresh context window.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
@references/agent-contracts.md
|
|
7
|
+
@references/context-budget.md
|
|
8
|
+
@references/gate-prompts.md
|
|
9
|
+
</required_reading>
|
|
10
|
+
|
|
11
|
+
<available_agent_types>
|
|
12
|
+
- gtd-executor — Executes plan tasks, writes code, commits
|
|
13
|
+
- gtd-verifier — Verifies phase completion against requirements
|
|
14
|
+
- gtd-debugger — Diagnoses and fixes failures
|
|
15
|
+
</available_agent_types>
|
|
16
|
+
|
|
17
|
+
<process>
|
|
18
|
+
|
|
19
|
+
<step name="initialize">
|
|
20
|
+
```bash
|
|
21
|
+
INIT=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" init execute-phase "$ARGUMENTS")
|
|
22
|
+
```
|
|
23
|
+
Parse: phase_number, docs_root, config, state, roadmap, plans, git.
|
|
24
|
+
Also parse optional flags: --wave N (execute specific wave only), --sequential (force sequential).
|
|
25
|
+
|
|
26
|
+
Verify:
|
|
27
|
+
- Phase exists in ROADMAP.md
|
|
28
|
+
- Plans exist in phases/{phase}/ directory
|
|
29
|
+
- State is "planned" (ready for execution)
|
|
30
|
+
</step>
|
|
31
|
+
|
|
32
|
+
<step name="discover_plans">
|
|
33
|
+
```bash
|
|
34
|
+
PLANS=$(node "$GTD_TOOLS_PATH/gtd-tools.cjs" phase plans "$PHASE_NUMBER")
|
|
35
|
+
```
|
|
36
|
+
Parse plan list. If no plans → Error: "No plans found. Run /gtd-plan-phase first."
|
|
37
|
+
|
|
38
|
+
Analyze dependencies between plans (from plan frontmatter or naming).
|
|
39
|
+
Group into execution waves using `groupIntoWaves()`.
|
|
40
|
+
|
|
41
|
+
Display:
|
|
42
|
+
```
|
|
43
|
+
Phase {N}: {name}
|
|
44
|
+
Plans: {count}
|
|
45
|
+
Waves: {wave_count}
|
|
46
|
+
Wave 1: {plan_names} (parallel)
|
|
47
|
+
Wave 2: {plan_names} (depends on wave 1)
|
|
48
|
+
...
|
|
49
|
+
```
|
|
50
|
+
</step>
|
|
51
|
+
|
|
52
|
+
<step name="execute_waves">
|
|
53
|
+
For each wave (or single wave if --wave flag):
|
|
54
|
+
|
|
55
|
+
**If parallelization enabled AND runtime supports Task spawning:**
|
|
56
|
+
Spawn one gtd-executor agent per plan in the wave (concurrent).
|
|
57
|
+
Each executor runs in a worktree (if config.execution.use_worktrees is true).
|
|
58
|
+
|
|
59
|
+
**Otherwise (sequential):**
|
|
60
|
+
Execute plans one at a time in order.
|
|
61
|
+
|
|
62
|
+
Each executor receives:
|
|
63
|
+
```
|
|
64
|
+
Execute the plan at: {plan_path}
|
|
65
|
+
|
|
66
|
+
Project context:
|
|
67
|
+
PROJECT.md: {docs_root}/PROJECT.md
|
|
68
|
+
REQUIREMENTS.md: {docs_root}/REQUIREMENTS.md
|
|
69
|
+
CONTEXT.md: {phase_dir}/{phase}-CONTEXT.md
|
|
70
|
+
RESEARCH.md: {phase_dir}/{phase}-RESEARCH.md
|
|
71
|
+
|
|
72
|
+
Git commit after each task.
|
|
73
|
+
Write completion to: {phase_dir}/{plan}-SUMMARY.md
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Wait for all executors in this wave to complete.
|
|
77
|
+
Verify each produced a SUMMARY.md.
|
|
78
|
+
</step>
|
|
79
|
+
|
|
80
|
+
<step name="integration_checkpoint">
|
|
81
|
+
After each wave completes:
|
|
82
|
+
1. Check all SUMMARY.md files — any failures?
|
|
83
|
+
2. Run integration test suite (if available)
|
|
84
|
+
3. If failures: spawn gtd-debugger to investigate
|
|
85
|
+
4. If debug succeeds: continue to next wave
|
|
86
|
+
5. If debug fails after 3 attempts: pause and present to user
|
|
87
|
+
</step>
|
|
88
|
+
|
|
89
|
+
<step name="post_execution_verification">
|
|
90
|
+
After all waves complete:
|
|
91
|
+
Spawn gtd-verifier agent:
|
|
92
|
+
```
|
|
93
|
+
Verify Phase {N} execution.
|
|
94
|
+
|
|
95
|
+
SUMMARY files: {list of all SUMMARY.md paths}
|
|
96
|
+
REQUIREMENTS.md: {path}
|
|
97
|
+
ROADMAP.md: {path}
|
|
98
|
+
|
|
99
|
+
Check: requirements coverage, test results, regression.
|
|
100
|
+
Write: {phase_dir}/VERIFICATION.md
|
|
101
|
+
```
|
|
102
|
+
</step>
|
|
103
|
+
|
|
104
|
+
<step name="update_state">
|
|
105
|
+
```bash
|
|
106
|
+
node "$GTD_TOOLS_PATH/gtd-tools.cjs" state update forward.status executing
|
|
107
|
+
node "$GTD_TOOLS_PATH/gtd-tools.cjs" state update forward.current_phase "$PHASE_NUMBER"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
After verification:
|
|
111
|
+
```bash
|
|
112
|
+
node "$GTD_TOOLS_PATH/gtd-tools.cjs" state update forward.status verified
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Display:
|
|
116
|
+
```
|
|
117
|
+
✓ Phase {N} execution complete
|
|
118
|
+
|
|
119
|
+
Plans executed: {count}
|
|
120
|
+
Tasks completed: {total}
|
|
121
|
+
Commits: {commit_count}
|
|
122
|
+
Verification: {pass_count}/{total_reqs} requirements verified
|
|
123
|
+
|
|
124
|
+
Next: /gtd-deploy-local (test locally)
|
|
125
|
+
/gtd-ship (create PR)
|
|
126
|
+
/gtd-next (auto-advance)
|
|
127
|
+
```
|
|
128
|
+
</step>
|
|
129
|
+
|
|
130
|
+
</process>
|
|
131
|
+
|
|
132
|
+
<error_handling>
|
|
133
|
+
- Executor timeout → check filesystem for partial SUMMARY.md, treat completed tasks as done
|
|
134
|
+
- Executor crash → retry plan once, then mark as failed
|
|
135
|
+
- Test failure during execution → executor's internal debug loop (3 attempts)
|
|
136
|
+
- Integration test failure → spawn debugger agent
|
|
137
|
+
- All plans failed → abort, preserve state, report to user
|
|
138
|
+
</error_handling>
|