@ktpartners/dgs-platform 2.6.2
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 +38 -0
- package/README.md +851 -0
- package/agents/dgs-codebase-cross-analyzer.md +183 -0
- package/agents/dgs-codebase-mapper.md +782 -0
- package/agents/dgs-codebase-synthesizer.md +156 -0
- package/agents/dgs-debugger.md +1256 -0
- package/agents/dgs-executor.md +550 -0
- package/agents/dgs-integration-checker.md +481 -0
- package/agents/dgs-nyquist-auditor.md +178 -0
- package/agents/dgs-phase-researcher.md +563 -0
- package/agents/dgs-phase-verifier.md +450 -0
- package/agents/dgs-plan-checker.md +708 -0
- package/agents/dgs-planner.md +1324 -0
- package/agents/dgs-project-researcher.md +631 -0
- package/agents/dgs-research-synthesizer.md +249 -0
- package/agents/dgs-roadmapper.md +652 -0
- package/agents/dgs-verifier.md +607 -0
- package/bin/install.js +2073 -0
- package/commands/dgs/add-doc.md +45 -0
- package/commands/dgs/add-idea.md +38 -0
- package/commands/dgs/add-phase.md +43 -0
- package/commands/dgs/add-repo.md +54 -0
- package/commands/dgs/add-tests.md +41 -0
- package/commands/dgs/add-todo.md +47 -0
- package/commands/dgs/approve-spec.md +38 -0
- package/commands/dgs/audit-milestone.md +36 -0
- package/commands/dgs/audit-phase.md +37 -0
- package/commands/dgs/cancel-job.md +23 -0
- package/commands/dgs/capture-principle.md +143 -0
- package/commands/dgs/check-todos.md +45 -0
- package/commands/dgs/cleanup.md +18 -0
- package/commands/dgs/complete-milestone.md +136 -0
- package/commands/dgs/complete-project.md +70 -0
- package/commands/dgs/consolidate-ideas.md +50 -0
- package/commands/dgs/create-milestone-job.md +37 -0
- package/commands/dgs/debug.md +164 -0
- package/commands/dgs/develop-idea.md +53 -0
- package/commands/dgs/discuss-idea.md +41 -0
- package/commands/dgs/discuss-phase.md +83 -0
- package/commands/dgs/execute-phase.md +41 -0
- package/commands/dgs/fast.md +38 -0
- package/commands/dgs/find-related-ideas.md +43 -0
- package/commands/dgs/health.md +28 -0
- package/commands/dgs/help.md +22 -0
- package/commands/dgs/import-spec.md +36 -0
- package/commands/dgs/init-product.md +28 -0
- package/commands/dgs/insert-phase.md +32 -0
- package/commands/dgs/join-discord.md +18 -0
- package/commands/dgs/list-docs.md +40 -0
- package/commands/dgs/list-ideas.md +42 -0
- package/commands/dgs/list-jobs.md +22 -0
- package/commands/dgs/list-phase-assumptions.md +46 -0
- package/commands/dgs/list-projects.md +57 -0
- package/commands/dgs/list-specs.md +40 -0
- package/commands/dgs/map-codebase.md +92 -0
- package/commands/dgs/new-milestone.md +44 -0
- package/commands/dgs/new-project.md +42 -0
- package/commands/dgs/node-repair.md +26 -0
- package/commands/dgs/overlap-check.md +20 -0
- package/commands/dgs/pause-work.md +38 -0
- package/commands/dgs/plan-milestone-gaps.md +34 -0
- package/commands/dgs/plan-phase.md +44 -0
- package/commands/dgs/progress.md +24 -0
- package/commands/dgs/quick.md +41 -0
- package/commands/dgs/reactivate-project.md +70 -0
- package/commands/dgs/reapply-patches.md +110 -0
- package/commands/dgs/refine-spec.md +38 -0
- package/commands/dgs/reject-idea.md +43 -0
- package/commands/dgs/remove-doc.md +44 -0
- package/commands/dgs/remove-phase.md +31 -0
- package/commands/dgs/remove-repo.md +69 -0
- package/commands/dgs/research-idea.md +43 -0
- package/commands/dgs/research-phase.md +189 -0
- package/commands/dgs/restore-idea.md +45 -0
- package/commands/dgs/resume-work.md +40 -0
- package/commands/dgs/rollback-job.md +24 -0
- package/commands/dgs/run-job.md +35 -0
- package/commands/dgs/search.md +40 -0
- package/commands/dgs/set-profile.md +34 -0
- package/commands/dgs/settings.md +38 -0
- package/commands/dgs/switch-project.md +58 -0
- package/commands/dgs/undo-consolidation.md +42 -0
- package/commands/dgs/update-idea.md +44 -0
- package/commands/dgs/update.md +37 -0
- package/commands/dgs/validate-phase.md +35 -0
- package/commands/dgs/verify-work.md +39 -0
- package/commands/dgs/write-spec.md +49 -0
- package/deliver-great-systems/.planning/phases/09-backend-wiring-and-error-handling/09-01-SUMMARY.md +84 -0
- package/deliver-great-systems/.planning/phases/09-backend-wiring-and-error-handling/09-02-SUMMARY.md +86 -0
- package/deliver-great-systems/.planning/phases/10-v1-to-v2-migration-flow/10-01-SUMMARY.md +85 -0
- package/deliver-great-systems/bin/dgs-tools.cjs +1444 -0
- package/deliver-great-systems/bin/lib/auto-test.cjs +1365 -0
- package/deliver-great-systems/bin/lib/commands.cjs +570 -0
- package/deliver-great-systems/bin/lib/config.cjs +417 -0
- package/deliver-great-systems/bin/lib/conflict-agent.cjs +1063 -0
- package/deliver-great-systems/bin/lib/conflict-agent.test.cjs +554 -0
- package/deliver-great-systems/bin/lib/context.cjs +929 -0
- package/deliver-great-systems/bin/lib/context.test.cjs +693 -0
- package/deliver-great-systems/bin/lib/core.cjs +744 -0
- package/deliver-great-systems/bin/lib/core.test.cjs +822 -0
- package/deliver-great-systems/bin/lib/docs.cjs +919 -0
- package/deliver-great-systems/bin/lib/docs.test.cjs +211 -0
- package/deliver-great-systems/bin/lib/execution.cjs +705 -0
- package/deliver-great-systems/bin/lib/execution.test.cjs +1472 -0
- package/deliver-great-systems/bin/lib/frontmatter.cjs +324 -0
- package/deliver-great-systems/bin/lib/ideas.cjs +1406 -0
- package/deliver-great-systems/bin/lib/ideas.test.cjs +1417 -0
- package/deliver-great-systems/bin/lib/identity.cjs +125 -0
- package/deliver-great-systems/bin/lib/init.cjs +1114 -0
- package/deliver-great-systems/bin/lib/init.test.cjs +1271 -0
- package/deliver-great-systems/bin/lib/jobs.cjs +2015 -0
- package/deliver-great-systems/bin/lib/jobs.test.cjs +2619 -0
- package/deliver-great-systems/bin/lib/merge-conflicts.cjs +654 -0
- package/deliver-great-systems/bin/lib/merge-conflicts.test.cjs +370 -0
- package/deliver-great-systems/bin/lib/migration.cjs +352 -0
- package/deliver-great-systems/bin/lib/migration.test.cjs +582 -0
- package/deliver-great-systems/bin/lib/milestone.cjs +243 -0
- package/deliver-great-systems/bin/lib/overlap.cjs +437 -0
- package/deliver-great-systems/bin/lib/overlap.test.cjs +747 -0
- package/deliver-great-systems/bin/lib/path-audit.test.cjs +384 -0
- package/deliver-great-systems/bin/lib/paths.cjs +144 -0
- package/deliver-great-systems/bin/lib/paths.test.cjs +486 -0
- package/deliver-great-systems/bin/lib/phase.cjs +910 -0
- package/deliver-great-systems/bin/lib/projects.cjs +691 -0
- package/deliver-great-systems/bin/lib/projects.test.cjs +871 -0
- package/deliver-great-systems/bin/lib/repos.cjs +1432 -0
- package/deliver-great-systems/bin/lib/repos.test.cjs +1882 -0
- package/deliver-great-systems/bin/lib/roadmap.cjs +305 -0
- package/deliver-great-systems/bin/lib/search.cjs +570 -0
- package/deliver-great-systems/bin/lib/specs.cjs +1303 -0
- package/deliver-great-systems/bin/lib/state.cjs +893 -0
- package/deliver-great-systems/bin/lib/template.cjs +228 -0
- package/deliver-great-systems/bin/lib/test-helpers.cjs +291 -0
- package/deliver-great-systems/bin/lib/verify.cjs +796 -0
- package/deliver-great-systems/references/checkpoints.md +776 -0
- package/deliver-great-systems/references/conflict-resolution.md +66 -0
- package/deliver-great-systems/references/context-tiers.md +166 -0
- package/deliver-great-systems/references/continuation-format.md +249 -0
- package/deliver-great-systems/references/decimal-phase-calculation.md +67 -0
- package/deliver-great-systems/references/git-integration.md +250 -0
- package/deliver-great-systems/references/git-planning-commit.md +40 -0
- package/deliver-great-systems/references/model-profile-resolution.md +36 -0
- package/deliver-great-systems/references/model-profiles.md +95 -0
- package/deliver-great-systems/references/phase-argument-parsing.md +61 -0
- package/deliver-great-systems/references/planning-config.md +224 -0
- package/deliver-great-systems/references/questioning.md +162 -0
- package/deliver-great-systems/references/spec-review-loop.md +177 -0
- package/deliver-great-systems/references/tdd.md +265 -0
- package/deliver-great-systems/references/ui-brand.md +160 -0
- package/deliver-great-systems/references/verification-patterns.md +612 -0
- package/deliver-great-systems/templates/DEBUG.md +166 -0
- package/deliver-great-systems/templates/UAT.md +251 -0
- package/deliver-great-systems/templates/VALIDATION.md +95 -0
- package/deliver-great-systems/templates/claude-md.md +74 -0
- package/deliver-great-systems/templates/codebase/architecture.md +257 -0
- package/deliver-great-systems/templates/codebase/concerns.md +312 -0
- package/deliver-great-systems/templates/codebase/conventions.md +309 -0
- package/deliver-great-systems/templates/codebase/integrations.md +282 -0
- package/deliver-great-systems/templates/codebase/stack.md +188 -0
- package/deliver-great-systems/templates/codebase/structure.md +287 -0
- package/deliver-great-systems/templates/codebase/testing.md +482 -0
- package/deliver-great-systems/templates/config.json +38 -0
- package/deliver-great-systems/templates/context.md +354 -0
- package/deliver-great-systems/templates/continue-here.md +80 -0
- package/deliver-great-systems/templates/debug-subagent-prompt.md +93 -0
- package/deliver-great-systems/templates/discovery.md +148 -0
- package/deliver-great-systems/templates/milestone-archive.md +125 -0
- package/deliver-great-systems/templates/milestone.md +117 -0
- package/deliver-great-systems/templates/phase-prompt.md +615 -0
- package/deliver-great-systems/templates/planner-subagent-prompt.md +119 -0
- package/deliver-great-systems/templates/project.md +186 -0
- package/deliver-great-systems/templates/requirements.md +233 -0
- package/deliver-great-systems/templates/research-project/ARCHITECTURE.md +206 -0
- package/deliver-great-systems/templates/research-project/FEATURES.md +149 -0
- package/deliver-great-systems/templates/research-project/PITFALLS.md +202 -0
- package/deliver-great-systems/templates/research-project/STACK.md +122 -0
- package/deliver-great-systems/templates/research-project/SUMMARY.md +172 -0
- package/deliver-great-systems/templates/research.md +554 -0
- package/deliver-great-systems/templates/retrospective.md +54 -0
- package/deliver-great-systems/templates/roadmap.md +204 -0
- package/deliver-great-systems/templates/state.md +178 -0
- package/deliver-great-systems/templates/summary-complex.md +59 -0
- package/deliver-great-systems/templates/summary-minimal.md +41 -0
- package/deliver-great-systems/templates/summary-standard.md +48 -0
- package/deliver-great-systems/templates/summary.md +253 -0
- package/deliver-great-systems/templates/user-setup.md +313 -0
- package/deliver-great-systems/templates/verification-report.md +324 -0
- package/deliver-great-systems/workflows/add-doc.md +151 -0
- package/deliver-great-systems/workflows/add-idea.md +96 -0
- package/deliver-great-systems/workflows/add-phase.md +120 -0
- package/deliver-great-systems/workflows/add-tests.md +359 -0
- package/deliver-great-systems/workflows/add-todo.md +162 -0
- package/deliver-great-systems/workflows/approve-spec.md +194 -0
- package/deliver-great-systems/workflows/audit-milestone.md +364 -0
- package/deliver-great-systems/workflows/audit-phase.md +462 -0
- package/deliver-great-systems/workflows/cancel-job.md +108 -0
- package/deliver-great-systems/workflows/check-todos.md +181 -0
- package/deliver-great-systems/workflows/cleanup.md +247 -0
- package/deliver-great-systems/workflows/codereview.md +526 -0
- package/deliver-great-systems/workflows/complete-milestone.md +1298 -0
- package/deliver-great-systems/workflows/consolidate-ideas.md +365 -0
- package/deliver-great-systems/workflows/create-milestone-job.md +177 -0
- package/deliver-great-systems/workflows/develop-idea.md +544 -0
- package/deliver-great-systems/workflows/diagnose-issues.md +231 -0
- package/deliver-great-systems/workflows/discovery-phase.md +301 -0
- package/deliver-great-systems/workflows/discuss-idea.md +263 -0
- package/deliver-great-systems/workflows/discuss-phase.md +733 -0
- package/deliver-great-systems/workflows/execute-phase.md +571 -0
- package/deliver-great-systems/workflows/execute-plan.md +592 -0
- package/deliver-great-systems/workflows/find-related-ideas.md +271 -0
- package/deliver-great-systems/workflows/health.md +173 -0
- package/deliver-great-systems/workflows/help.md +997 -0
- package/deliver-great-systems/workflows/import-spec.md +381 -0
- package/deliver-great-systems/workflows/init-product.md +767 -0
- package/deliver-great-systems/workflows/insert-phase.md +138 -0
- package/deliver-great-systems/workflows/list-docs.md +119 -0
- package/deliver-great-systems/workflows/list-ideas.md +154 -0
- package/deliver-great-systems/workflows/list-jobs.md +89 -0
- package/deliver-great-systems/workflows/list-phase-assumptions.md +192 -0
- package/deliver-great-systems/workflows/list-specs.md +101 -0
- package/deliver-great-systems/workflows/map-codebase.md +621 -0
- package/deliver-great-systems/workflows/new-milestone.md +591 -0
- package/deliver-great-systems/workflows/new-project.md +1113 -0
- package/deliver-great-systems/workflows/node-repair.md +94 -0
- package/deliver-great-systems/workflows/overlap-check.md +86 -0
- package/deliver-great-systems/workflows/pause-work.md +134 -0
- package/deliver-great-systems/workflows/plan-milestone-gaps.md +306 -0
- package/deliver-great-systems/workflows/plan-phase.md +698 -0
- package/deliver-great-systems/workflows/progress.md +386 -0
- package/deliver-great-systems/workflows/quick.md +845 -0
- package/deliver-great-systems/workflows/refine-spec.md +275 -0
- package/deliver-great-systems/workflows/reject-idea.md +109 -0
- package/deliver-great-systems/workflows/remove-doc.md +117 -0
- package/deliver-great-systems/workflows/remove-phase.md +163 -0
- package/deliver-great-systems/workflows/research-idea.md +325 -0
- package/deliver-great-systems/workflows/research-phase.md +81 -0
- package/deliver-great-systems/workflows/restore-idea.md +101 -0
- package/deliver-great-systems/workflows/resume-project.md +311 -0
- package/deliver-great-systems/workflows/rollback-job.md +130 -0
- package/deliver-great-systems/workflows/run-job.md +498 -0
- package/deliver-great-systems/workflows/search.md +130 -0
- package/deliver-great-systems/workflows/set-profile.md +83 -0
- package/deliver-great-systems/workflows/settings.md +470 -0
- package/deliver-great-systems/workflows/transition.md +563 -0
- package/deliver-great-systems/workflows/undo-consolidation.md +155 -0
- package/deliver-great-systems/workflows/update-idea.md +157 -0
- package/deliver-great-systems/workflows/update.md +242 -0
- package/deliver-great-systems/workflows/validate-phase.md +177 -0
- package/deliver-great-systems/workflows/verify-phase.md +253 -0
- package/deliver-great-systems/workflows/verify-work.md +671 -0
- package/deliver-great-systems/workflows/write-spec.md +450 -0
- package/hooks/dist/dgs-check-update.js +62 -0
- package/hooks/dist/dgs-context-monitor.js +141 -0
- package/hooks/dist/dgs-statusline.js +115 -0
- package/package.json +60 -0
- package/scripts/build-hooks.js +43 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
# Verification Report Template
|
|
2
|
+
|
|
3
|
+
Template for `phases/XX-name/{phase_num}-VERIFICATION.md` (in planning root) — phase goal verification results.
|
|
4
|
+
|
|
5
|
+
> **Layout-agnostic:** Workflows resolve the phase directory path via `${phase_dir}` from init output. Works in both standard and root layouts.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## File Template
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
---
|
|
13
|
+
phase: XX-name
|
|
14
|
+
verified: YYYY-MM-DDTHH:MM:SSZ
|
|
15
|
+
status: passed | gaps_found | human_needed
|
|
16
|
+
score: N/M must-haves verified
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Phase {X}: {Name} Verification Report
|
|
20
|
+
|
|
21
|
+
**Phase Goal:** {goal from ROADMAP.md}
|
|
22
|
+
**Verified:** {timestamp}
|
|
23
|
+
**Status:** {passed | gaps_found | human_needed}
|
|
24
|
+
|
|
25
|
+
## Goal Achievement
|
|
26
|
+
|
|
27
|
+
### Observable Truths
|
|
28
|
+
|
|
29
|
+
| # | Truth | Status | Evidence |
|
|
30
|
+
|---|-------|--------|----------|
|
|
31
|
+
| 1 | {truth from must_haves} | ✓ VERIFIED | {what confirmed it} |
|
|
32
|
+
| 2 | {truth from must_haves} | ✗ FAILED | {what's wrong} |
|
|
33
|
+
| 3 | {truth from must_haves} | ? UNCERTAIN | {why can't verify} |
|
|
34
|
+
|
|
35
|
+
**Score:** {N}/{M} truths verified
|
|
36
|
+
|
|
37
|
+
### Required Artifacts
|
|
38
|
+
|
|
39
|
+
| Artifact | Expected | Status | Details |
|
|
40
|
+
|----------|----------|--------|---------|
|
|
41
|
+
| `src/components/Chat.tsx` | Message list component | ✓ EXISTS + SUBSTANTIVE | Exports ChatList, renders Message[], no stubs |
|
|
42
|
+
| `src/app/api/chat/route.ts` | Message CRUD | ✗ STUB | File exists but POST returns placeholder |
|
|
43
|
+
| `prisma/schema.prisma` | Message model | ✓ EXISTS + SUBSTANTIVE | Model defined with all fields |
|
|
44
|
+
|
|
45
|
+
**Artifacts:** {N}/{M} verified
|
|
46
|
+
|
|
47
|
+
### Key Link Verification
|
|
48
|
+
|
|
49
|
+
| From | To | Via | Status | Details |
|
|
50
|
+
|------|----|----|--------|---------|
|
|
51
|
+
| Chat.tsx | /api/chat | fetch in useEffect | ✓ WIRED | Line 23: `fetch('/api/chat')` with response handling |
|
|
52
|
+
| ChatInput | /api/chat POST | onSubmit handler | ✗ NOT WIRED | onSubmit only calls console.log |
|
|
53
|
+
| /api/chat POST | database | prisma.message.create | ✗ NOT WIRED | Returns hardcoded response, no DB call |
|
|
54
|
+
|
|
55
|
+
**Wiring:** {N}/{M} connections verified
|
|
56
|
+
|
|
57
|
+
## Requirements Coverage
|
|
58
|
+
|
|
59
|
+
| Requirement | Status | Blocking Issue |
|
|
60
|
+
|-------------|--------|----------------|
|
|
61
|
+
| {REQ-01}: {description} | ✓ SATISFIED | - |
|
|
62
|
+
| {REQ-02}: {description} | ✗ BLOCKED | API route is stub |
|
|
63
|
+
| {REQ-03}: {description} | ? NEEDS HUMAN | Can't verify WebSocket programmatically |
|
|
64
|
+
|
|
65
|
+
**Coverage:** {N}/{M} requirements satisfied
|
|
66
|
+
|
|
67
|
+
## Anti-Patterns Found
|
|
68
|
+
|
|
69
|
+
| File | Line | Pattern | Severity | Impact |
|
|
70
|
+
|------|------|---------|----------|--------|
|
|
71
|
+
| src/app/api/chat/route.ts | 12 | `// TODO: implement` | ⚠️ Warning | Indicates incomplete |
|
|
72
|
+
| src/components/Chat.tsx | 45 | `return <div>Placeholder</div>` | 🛑 Blocker | Renders no content |
|
|
73
|
+
| src/hooks/useChat.ts | - | File missing | 🛑 Blocker | Expected hook doesn't exist |
|
|
74
|
+
|
|
75
|
+
**Anti-patterns:** {N} found ({blockers} blockers, {warnings} warnings)
|
|
76
|
+
|
|
77
|
+
## Human Verification Required
|
|
78
|
+
|
|
79
|
+
{If no human verification needed:}
|
|
80
|
+
None — all verifiable items checked programmatically.
|
|
81
|
+
|
|
82
|
+
{If human verification needed:}
|
|
83
|
+
|
|
84
|
+
### 1. {Test Name}
|
|
85
|
+
**Test:** {What to do}
|
|
86
|
+
**Expected:** {What should happen}
|
|
87
|
+
**Why human:** {Why can't verify programmatically}
|
|
88
|
+
|
|
89
|
+
### 2. {Test Name}
|
|
90
|
+
**Test:** {What to do}
|
|
91
|
+
**Expected:** {What should happen}
|
|
92
|
+
**Why human:** {Why can't verify programmatically}
|
|
93
|
+
|
|
94
|
+
## Gaps Summary
|
|
95
|
+
|
|
96
|
+
{If no gaps:}
|
|
97
|
+
**No gaps found.** Phase goal achieved. Ready to proceed.
|
|
98
|
+
|
|
99
|
+
{If gaps found:}
|
|
100
|
+
|
|
101
|
+
### Critical Gaps (Block Progress)
|
|
102
|
+
|
|
103
|
+
1. **{Gap name}**
|
|
104
|
+
- Missing: {what's missing}
|
|
105
|
+
- Impact: {why this blocks the goal}
|
|
106
|
+
- Fix: {what needs to happen}
|
|
107
|
+
|
|
108
|
+
2. **{Gap name}**
|
|
109
|
+
- Missing: {what's missing}
|
|
110
|
+
- Impact: {why this blocks the goal}
|
|
111
|
+
- Fix: {what needs to happen}
|
|
112
|
+
|
|
113
|
+
### Non-Critical Gaps (Can Defer)
|
|
114
|
+
|
|
115
|
+
1. **{Gap name}**
|
|
116
|
+
- Issue: {what's wrong}
|
|
117
|
+
- Impact: {limited impact because...}
|
|
118
|
+
- Recommendation: {fix now or defer}
|
|
119
|
+
|
|
120
|
+
## Recommended Fix Plans
|
|
121
|
+
|
|
122
|
+
{If gaps found, generate fix plan recommendations:}
|
|
123
|
+
|
|
124
|
+
### {phase}-{next}-PLAN.md: {Fix Name}
|
|
125
|
+
|
|
126
|
+
**Objective:** {What this fixes}
|
|
127
|
+
|
|
128
|
+
**Tasks:**
|
|
129
|
+
1. {Task to fix gap 1}
|
|
130
|
+
2. {Task to fix gap 2}
|
|
131
|
+
3. {Verification task}
|
|
132
|
+
|
|
133
|
+
**Estimated scope:** {Small / Medium}
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### {phase}-{next+1}-PLAN.md: {Fix Name}
|
|
138
|
+
|
|
139
|
+
**Objective:** {What this fixes}
|
|
140
|
+
|
|
141
|
+
**Tasks:**
|
|
142
|
+
1. {Task}
|
|
143
|
+
2. {Task}
|
|
144
|
+
|
|
145
|
+
**Estimated scope:** {Small / Medium}
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Verification Metadata
|
|
150
|
+
|
|
151
|
+
**Verification approach:** Goal-backward (derived from phase goal)
|
|
152
|
+
**Must-haves source:** {PLAN.md frontmatter | derived from ROADMAP.md goal}
|
|
153
|
+
**Automated checks:** {N} passed, {M} failed
|
|
154
|
+
**Human checks required:** {N}
|
|
155
|
+
**Total verification time:** {duration}
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
*Verified: {timestamp}*
|
|
159
|
+
*Verifier: Claude (subagent)*
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Guidelines
|
|
165
|
+
|
|
166
|
+
**Status values:**
|
|
167
|
+
- `passed` — All must-haves verified, no blockers
|
|
168
|
+
- `gaps_found` — One or more critical gaps found
|
|
169
|
+
- `human_needed` — Automated checks pass but human verification required
|
|
170
|
+
|
|
171
|
+
**Evidence types:**
|
|
172
|
+
- For EXISTS: "File at path, exports X"
|
|
173
|
+
- For SUBSTANTIVE: "N lines, has patterns X, Y, Z"
|
|
174
|
+
- For WIRED: "Line N: code that connects A to B"
|
|
175
|
+
- For FAILED: "Missing because X" or "Stub because Y"
|
|
176
|
+
|
|
177
|
+
**Severity levels:**
|
|
178
|
+
- 🛑 Blocker: Prevents goal achievement, must fix
|
|
179
|
+
- ⚠️ Warning: Indicates incomplete but doesn't block
|
|
180
|
+
- ℹ️ Info: Notable but not problematic
|
|
181
|
+
|
|
182
|
+
**Fix plan generation:**
|
|
183
|
+
- Only generate if gaps_found
|
|
184
|
+
- Group related fixes into single plans
|
|
185
|
+
- Keep to 2-3 tasks per plan
|
|
186
|
+
- Include verification task in each plan
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Example
|
|
191
|
+
|
|
192
|
+
```markdown
|
|
193
|
+
---
|
|
194
|
+
phase: 03-chat
|
|
195
|
+
verified: 2025-01-15T14:30:00Z
|
|
196
|
+
status: gaps_found
|
|
197
|
+
score: 2/5 must-haves verified
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
# Phase 3: Chat Interface Verification Report
|
|
201
|
+
|
|
202
|
+
**Phase Goal:** Working chat interface where users can send and receive messages
|
|
203
|
+
**Verified:** 2025-01-15T14:30:00Z
|
|
204
|
+
**Status:** gaps_found
|
|
205
|
+
|
|
206
|
+
## Goal Achievement
|
|
207
|
+
|
|
208
|
+
### Observable Truths
|
|
209
|
+
|
|
210
|
+
| # | Truth | Status | Evidence |
|
|
211
|
+
|---|-------|--------|----------|
|
|
212
|
+
| 1 | User can see existing messages | ✗ FAILED | Component renders placeholder, not message data |
|
|
213
|
+
| 2 | User can type a message | ✓ VERIFIED | Input field exists with onChange handler |
|
|
214
|
+
| 3 | User can send a message | ✗ FAILED | onSubmit handler is console.log only |
|
|
215
|
+
| 4 | Sent message appears in list | ✗ FAILED | No state update after send |
|
|
216
|
+
| 5 | Messages persist across refresh | ? UNCERTAIN | Can't verify - send doesn't work |
|
|
217
|
+
|
|
218
|
+
**Score:** 1/5 truths verified
|
|
219
|
+
|
|
220
|
+
### Required Artifacts
|
|
221
|
+
|
|
222
|
+
| Artifact | Expected | Status | Details |
|
|
223
|
+
|----------|----------|--------|---------|
|
|
224
|
+
| `src/components/Chat.tsx` | Message list component | ✗ STUB | Returns `<div>Chat will be here</div>` |
|
|
225
|
+
| `src/components/ChatInput.tsx` | Message input | ✓ EXISTS + SUBSTANTIVE | Form with input, submit button, handlers |
|
|
226
|
+
| `src/app/api/chat/route.ts` | Message CRUD | ✗ STUB | GET returns [], POST returns { ok: true } |
|
|
227
|
+
| `prisma/schema.prisma` | Message model | ✓ EXISTS + SUBSTANTIVE | Message model with id, content, userId, createdAt |
|
|
228
|
+
|
|
229
|
+
**Artifacts:** 2/4 verified
|
|
230
|
+
|
|
231
|
+
### Key Link Verification
|
|
232
|
+
|
|
233
|
+
| From | To | Via | Status | Details |
|
|
234
|
+
|------|----|----|--------|---------|
|
|
235
|
+
| Chat.tsx | /api/chat GET | fetch | ✗ NOT WIRED | No fetch call in component |
|
|
236
|
+
| ChatInput | /api/chat POST | onSubmit | ✗ NOT WIRED | Handler only logs, doesn't fetch |
|
|
237
|
+
| /api/chat GET | database | prisma.message.findMany | ✗ NOT WIRED | Returns hardcoded [] |
|
|
238
|
+
| /api/chat POST | database | prisma.message.create | ✗ NOT WIRED | Returns { ok: true }, no DB call |
|
|
239
|
+
|
|
240
|
+
**Wiring:** 0/4 connections verified
|
|
241
|
+
|
|
242
|
+
## Requirements Coverage
|
|
243
|
+
|
|
244
|
+
| Requirement | Status | Blocking Issue |
|
|
245
|
+
|-------------|--------|----------------|
|
|
246
|
+
| CHAT-01: User can send message | ✗ BLOCKED | API POST is stub |
|
|
247
|
+
| CHAT-02: User can view messages | ✗ BLOCKED | Component is placeholder |
|
|
248
|
+
| CHAT-03: Messages persist | ✗ BLOCKED | No database integration |
|
|
249
|
+
|
|
250
|
+
**Coverage:** 0/3 requirements satisfied
|
|
251
|
+
|
|
252
|
+
## Anti-Patterns Found
|
|
253
|
+
|
|
254
|
+
| File | Line | Pattern | Severity | Impact |
|
|
255
|
+
|------|------|---------|----------|--------|
|
|
256
|
+
| src/components/Chat.tsx | 8 | `<div>Chat will be here</div>` | 🛑 Blocker | No actual content |
|
|
257
|
+
| src/app/api/chat/route.ts | 5 | `return Response.json([])` | 🛑 Blocker | Hardcoded empty |
|
|
258
|
+
| src/app/api/chat/route.ts | 12 | `// TODO: save to database` | ⚠️ Warning | Incomplete |
|
|
259
|
+
|
|
260
|
+
**Anti-patterns:** 3 found (2 blockers, 1 warning)
|
|
261
|
+
|
|
262
|
+
## Human Verification Required
|
|
263
|
+
|
|
264
|
+
None needed until automated gaps are fixed.
|
|
265
|
+
|
|
266
|
+
## Gaps Summary
|
|
267
|
+
|
|
268
|
+
### Critical Gaps (Block Progress)
|
|
269
|
+
|
|
270
|
+
1. **Chat component is placeholder**
|
|
271
|
+
- Missing: Actual message list rendering
|
|
272
|
+
- Impact: Users see "Chat will be here" instead of messages
|
|
273
|
+
- Fix: Implement Chat.tsx to fetch and render messages
|
|
274
|
+
|
|
275
|
+
2. **API routes are stubs**
|
|
276
|
+
- Missing: Database integration in GET and POST
|
|
277
|
+
- Impact: No data persistence, no real functionality
|
|
278
|
+
- Fix: Wire prisma calls in route handlers
|
|
279
|
+
|
|
280
|
+
3. **No wiring between frontend and backend**
|
|
281
|
+
- Missing: fetch calls in components
|
|
282
|
+
- Impact: Even if API worked, UI wouldn't call it
|
|
283
|
+
- Fix: Add useEffect fetch in Chat, onSubmit fetch in ChatInput
|
|
284
|
+
|
|
285
|
+
## Recommended Fix Plans
|
|
286
|
+
|
|
287
|
+
### 03-04-PLAN.md: Implement Chat API
|
|
288
|
+
|
|
289
|
+
**Objective:** Wire API routes to database
|
|
290
|
+
|
|
291
|
+
**Tasks:**
|
|
292
|
+
1. Implement GET /api/chat with prisma.message.findMany
|
|
293
|
+
2. Implement POST /api/chat with prisma.message.create
|
|
294
|
+
3. Verify: API returns real data, POST creates records
|
|
295
|
+
|
|
296
|
+
**Estimated scope:** Small
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
### 03-05-PLAN.md: Implement Chat UI
|
|
301
|
+
|
|
302
|
+
**Objective:** Wire Chat component to API
|
|
303
|
+
|
|
304
|
+
**Tasks:**
|
|
305
|
+
1. Implement Chat.tsx with useEffect fetch and message rendering
|
|
306
|
+
2. Wire ChatInput onSubmit to POST /api/chat
|
|
307
|
+
3. Verify: Messages display, new messages appear after send
|
|
308
|
+
|
|
309
|
+
**Estimated scope:** Small
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Verification Metadata
|
|
314
|
+
|
|
315
|
+
**Verification approach:** Goal-backward (derived from phase goal)
|
|
316
|
+
**Must-haves source:** 03-01-PLAN.md frontmatter
|
|
317
|
+
**Automated checks:** 2 passed, 8 failed
|
|
318
|
+
**Human checks required:** 0 (blocked by automated failures)
|
|
319
|
+
**Total verification time:** 2 min
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
*Verified: 2025-01-15T14:30:00Z*
|
|
323
|
+
*Verifier: Claude (subagent)*
|
|
324
|
+
```
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Add a supporting document (PDF, image, spreadsheet, etc.) to a scoped docs/ directory. Handles source detection (local file or conversation attachment), scope inference, file size validation, duplicate checking, document storage with text extraction, git commit, and markdown link output. URLs are not supported.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<context_tier>lite</context_tier>
|
|
6
|
+
|
|
7
|
+
<required_reading>
|
|
8
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
9
|
+
</required_reading>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
<step name="load_context" priority="first">
|
|
14
|
+
Load project context via tier system:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
TIER_FILES=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" context load-tier lite --raw 2>/dev/null)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Use `TIER_FILES` JSON `files` array for project context (PROJECT.md, STATE.md, config.json).
|
|
21
|
+
</step>
|
|
22
|
+
|
|
23
|
+
<step name="detect_source">
|
|
24
|
+
Determine the document source from `$ARGUMENTS` and conversation context.
|
|
25
|
+
|
|
26
|
+
**Local file path:**
|
|
27
|
+
- If `$ARGUMENTS` contains what looks like a file path, verify it exists:
|
|
28
|
+
```bash
|
|
29
|
+
ls "$source_path" 2>/dev/null
|
|
30
|
+
```
|
|
31
|
+
- If file exists: set `source_path` to that path
|
|
32
|
+
|
|
33
|
+
**Conversation attachment:**
|
|
34
|
+
- If user provided a conversation attachment (file pasted or dragged into chat): save it to a temp location, set `source_path` to the saved path
|
|
35
|
+
|
|
36
|
+
**URL detected:**
|
|
37
|
+
- If `$ARGUMENTS` contains a URL (http:// or https://): output error and stop:
|
|
38
|
+
```
|
|
39
|
+
URL fetching is not supported. Please provide a local file path.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Neither:**
|
|
43
|
+
- If no file path and no attachment detected: prompt with AskUserQuestion:
|
|
44
|
+
- question: "Provide a file path or paste/attach a file"
|
|
45
|
+
- Process the response (file path or attachment)
|
|
46
|
+
</step>
|
|
47
|
+
|
|
48
|
+
<step name="determine_scope">
|
|
49
|
+
Determine the target scope for the document.
|
|
50
|
+
|
|
51
|
+
**From arguments:**
|
|
52
|
+
- Parse `$ARGUMENTS` for `--scope <product|idea|spec>` and `--scope-id <id>`
|
|
53
|
+
- If both provided, use them directly
|
|
54
|
+
|
|
55
|
+
**From conversation context (if not in arguments):**
|
|
56
|
+
- If currently discussing an idea (e.g., recent /dgs commands touched an idea file): set scope = `idea`, infer scope_id from the idea slug
|
|
57
|
+
- If currently discussing a spec: set scope = `spec`, infer scope_id from the spec slug
|
|
58
|
+
- Otherwise: default to `product` scope
|
|
59
|
+
|
|
60
|
+
**Missing scope-id:**
|
|
61
|
+
- If scope is `idea` or `spec` but no scope-id available: prompt with AskUserQuestion:
|
|
62
|
+
- question: "Which {scope} should this document be attached to? (provide the slug or ID)"
|
|
63
|
+
|
|
64
|
+
**Validate scope target exists:**
|
|
65
|
+
- For `product`: verify planning directory exists
|
|
66
|
+
- For `idea`: verify the idea file exists in `ideas/` (relative from planning root)
|
|
67
|
+
- For `spec`: verify the spec directory exists in `specs/` (relative from planning root)
|
|
68
|
+
|
|
69
|
+
If scope target does not exist: output error "Scope target '{scope}/{scope_id}' not found." and stop.
|
|
70
|
+
</step>
|
|
71
|
+
|
|
72
|
+
<step name="check_size">
|
|
73
|
+
Validate file size does not exceed 10MB limit.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
FILE_SIZE=$(stat -f%z "$source_path" 2>/dev/null || stat -c%s "$source_path" 2>/dev/null)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
If file size > 10485760 bytes (10MB):
|
|
80
|
+
- Calculate actual size in MB: `$(( FILE_SIZE / 1048576 ))`
|
|
81
|
+
- Output error and stop:
|
|
82
|
+
```
|
|
83
|
+
File exceeds 10MB limit ({actual_size}MB). Document not added.
|
|
84
|
+
```
|
|
85
|
+
</step>
|
|
86
|
+
|
|
87
|
+
<step name="check_duplicate">
|
|
88
|
+
Check for an existing document with the same slug in the target scope.
|
|
89
|
+
|
|
90
|
+
Derive slug from the source filename (slugified version preserving extension).
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs docs check-duplicate --scope "$scope" --scope-id "$scope_id" --slug "$slug"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Parse JSON result. If `exists: true`:
|
|
97
|
+
- Ask user with AskUserQuestion:
|
|
98
|
+
- question: "A document named '{slug}' already exists in {scope}. Overwrite? (yes/no)"
|
|
99
|
+
- If user says no: output "Cancelled." and stop
|
|
100
|
+
- If user says yes: continue (overwrite will happen in next step)
|
|
101
|
+
</step>
|
|
102
|
+
|
|
103
|
+
<step name="add_document">
|
|
104
|
+
Add the document via dgs-tools CLI.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs docs add --source "$source_path" --scope "$scope" --scope-id "$scope_id"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Parse the JSON result for:
|
|
111
|
+
- `slug`: the slugified filename
|
|
112
|
+
- `extraction_status`: success, failed, or skipped
|
|
113
|
+
- `relative_link`: markdown-formatted relative link to the document
|
|
114
|
+
- `files_created`: list of all files created/modified (document, sidecars, INDEX.md)
|
|
115
|
+
</step>
|
|
116
|
+
|
|
117
|
+
<step name="git_commit">
|
|
118
|
+
Commit the document and all sidecars.
|
|
119
|
+
|
|
120
|
+
Per CONTEXT.md: one file per invocation, each gets its own commit. Commit the document file + any sidecars (.extracted.txt, .summary.txt) + INDEX.md.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "docs: add ${slug} to ${scope}" --files <all files from files_created list>
|
|
124
|
+
```
|
|
125
|
+
</step>
|
|
126
|
+
|
|
127
|
+
<step name="confirm">
|
|
128
|
+
Output the result in this format:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Document added: {original_name} -> {slug}
|
|
132
|
+
Scope: {scope}{scope_id ? '/' + scope_id : ''}
|
|
133
|
+
Extraction: {extraction_status}
|
|
134
|
+
|
|
135
|
+
Markdown link: {relative_link}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The markdown link line enables easy copy-paste into ideas and specs.
|
|
139
|
+
</step>
|
|
140
|
+
|
|
141
|
+
</process>
|
|
142
|
+
|
|
143
|
+
<success_criteria>
|
|
144
|
+
- [ ] Document source detected (local file or attachment; URLs rejected)
|
|
145
|
+
- [ ] Scope determined (from args, context, or user prompt)
|
|
146
|
+
- [ ] File size validated (under 10MB)
|
|
147
|
+
- [ ] Duplicate check performed with user confirmation if needed
|
|
148
|
+
- [ ] Document stored with extraction sidecars via dgs-tools
|
|
149
|
+
- [ ] Git commit created for document + sidecars + INDEX.md + .names.json
|
|
150
|
+
- [ ] Markdown link output displayed for copy-paste
|
|
151
|
+
</success_criteria>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Capture a new idea into the DGS ideas system. Two modes: interactive (prompts for each field sequentially) and auto (Claude extracts from freeform text). Enables quick idea capture without breaking flow.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<context_tier>lite</context_tier>
|
|
6
|
+
|
|
7
|
+
<required_reading>
|
|
8
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
9
|
+
</required_reading>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
<step name="parse_arguments">
|
|
14
|
+
Check `$ARGUMENTS` for the `--auto` flag.
|
|
15
|
+
|
|
16
|
+
- If `--auto "some freeform text"` detected: set `mode = auto`, extract the freeform text after `--auto`
|
|
17
|
+
- Otherwise: set `mode = interactive`
|
|
18
|
+
|
|
19
|
+
Examples:
|
|
20
|
+
- `/dgs:add-idea` → interactive mode
|
|
21
|
+
- `/dgs:add-idea --auto "We should auto-review PRs when specs change"` → auto mode
|
|
22
|
+
</step>
|
|
23
|
+
|
|
24
|
+
<step name="init_context">
|
|
25
|
+
```bash
|
|
26
|
+
INIT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs init milestone-op)
|
|
27
|
+
TIER_FILES=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" context load-tier lite --raw 2>/dev/null)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Extract from init JSON: `project_root`, `commit_docs`.
|
|
31
|
+
Use `TIER_FILES` JSON `files` array for project context (PROJECT.md, STATE.md, config.json).
|
|
32
|
+
</step>
|
|
33
|
+
|
|
34
|
+
<step name="ensure_directories">
|
|
35
|
+
```bash
|
|
36
|
+
mkdir -p ${project_root}/ideas/pending ${project_root}/ideas/done ${project_root}/ideas/rejected
|
|
37
|
+
```
|
|
38
|
+
</step>
|
|
39
|
+
|
|
40
|
+
<step name="interactive_capture" condition="mode = interactive">
|
|
41
|
+
Prompt one question at a time using AskUserQuestion:
|
|
42
|
+
|
|
43
|
+
1. **Title**: "What's the idea?" (required, 3-10 words preferred)
|
|
44
|
+
2. **Body**: "Describe the problem or opportunity" (required, freeform)
|
|
45
|
+
3. **Tags**: "Any tags? (comma-separated, or skip)" (optional, can be skipped)
|
|
46
|
+
|
|
47
|
+
All three fields are prompted. Tags can be skipped by the user.
|
|
48
|
+
|
|
49
|
+
Set variables:
|
|
50
|
+
- `title` = user's response to prompt 1
|
|
51
|
+
- `body` = user's response to prompt 2
|
|
52
|
+
- `tags` = user's response to prompt 3 (or empty string if skipped)
|
|
53
|
+
</step>
|
|
54
|
+
|
|
55
|
+
<step name="auto_capture" condition="mode = auto">
|
|
56
|
+
Claude reads the freeform text and intelligently extracts:
|
|
57
|
+
|
|
58
|
+
- `title`: concise 3-10 word title capturing the core idea
|
|
59
|
+
- `body`: the problem or opportunity described, expanded if needed for clarity
|
|
60
|
+
- `tags`: any relevant tags inferred from the text (comma-separated string)
|
|
61
|
+
|
|
62
|
+
No interactive prompts in auto mode.
|
|
63
|
+
</step>
|
|
64
|
+
|
|
65
|
+
<step name="create_idea">
|
|
66
|
+
```bash
|
|
67
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs ideas create --title "$title" --body "$body" --tags "$tags"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Parse the JSON result to get `id`, `filename`, `path`.
|
|
71
|
+
</step>
|
|
72
|
+
|
|
73
|
+
<step name="git_commit">
|
|
74
|
+
```bash
|
|
75
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "ideas: add #${id} - ${title}" --files ${project_root}/ideas/pending/${filename} ${project_root}/ideas/manifest.json
|
|
76
|
+
```
|
|
77
|
+
</step>
|
|
78
|
+
|
|
79
|
+
<step name="confirm">
|
|
80
|
+
Minimal confirmation only. Output exactly:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Idea #${id} created.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Nothing else -- no file path, no tags display, no next steps.
|
|
87
|
+
</step>
|
|
88
|
+
|
|
89
|
+
</process>
|
|
90
|
+
|
|
91
|
+
<success_criteria>
|
|
92
|
+
- [ ] Idea file exists in `ideas/pending/` with correct frontmatter
|
|
93
|
+
- [ ] Manifest updated with incremented next_id
|
|
94
|
+
- [ ] Git commit created
|
|
95
|
+
- [ ] Minimal confirmation displayed
|
|
96
|
+
</success_criteria>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Add a new integer phase to the end of the current milestone in the roadmap. Automatically calculates next phase number, creates phase directory, and updates roadmap structure.
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<context_tier>planning</context_tier>
|
|
6
|
+
|
|
7
|
+
<required_reading>
|
|
8
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
9
|
+
</required_reading>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
<step name="parse_arguments">
|
|
14
|
+
Parse the command arguments:
|
|
15
|
+
- All arguments become the phase description
|
|
16
|
+
- Example: `/dgs:add-phase Add authentication` → description = "Add authentication"
|
|
17
|
+
- Example: `/dgs:add-phase Fix critical performance issues` → description = "Fix critical performance issues"
|
|
18
|
+
|
|
19
|
+
If no arguments provided:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
ERROR: Phase description required
|
|
23
|
+
Usage: /dgs:add-phase <description>
|
|
24
|
+
Example: /dgs:add-phase Add authentication system
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Exit.
|
|
28
|
+
</step>
|
|
29
|
+
|
|
30
|
+
<step name="init_context">
|
|
31
|
+
Load phase operation context:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
INIT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" init phase-op "0")
|
|
35
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Load planning-tier context files:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
TIER_FILES=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" context load-tier planning --raw 2>/dev/null)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Check `roadmap_exists` from init JSON. If false:
|
|
45
|
+
```
|
|
46
|
+
ERROR: No roadmap found (${roadmap_path})
|
|
47
|
+
Run /dgs:new-project to initialize.
|
|
48
|
+
```
|
|
49
|
+
Exit.
|
|
50
|
+
</step>
|
|
51
|
+
|
|
52
|
+
<step name="add_phase">
|
|
53
|
+
**Delegate the phase addition to dgs-tools:**
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
RESULT=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" phase add "${description}")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The CLI handles:
|
|
60
|
+
- Finding the highest existing integer phase number
|
|
61
|
+
- Calculating next phase number (max + 1)
|
|
62
|
+
- Generating slug from description
|
|
63
|
+
- Creating the phase directory (`${phases_dir}/{NN}-{slug}/`)
|
|
64
|
+
- Inserting the phase entry into ROADMAP.md with Goal, Depends on, and Plans sections
|
|
65
|
+
|
|
66
|
+
Extract from result: `phase_number`, `padded`, `name`, `slug`, `directory`.
|
|
67
|
+
</step>
|
|
68
|
+
|
|
69
|
+
<step name="update_project_state">
|
|
70
|
+
Update STATE.md to reflect the new phase:
|
|
71
|
+
|
|
72
|
+
1. Read STATE.md (via `${state_path}` from init)
|
|
73
|
+
2. Under "## Accumulated Context" → "### Roadmap Evolution" add entry:
|
|
74
|
+
```
|
|
75
|
+
- Phase {N} added: {description}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
If "Roadmap Evolution" section doesn't exist, create it.
|
|
79
|
+
</step>
|
|
80
|
+
|
|
81
|
+
<step name="completion">
|
|
82
|
+
Present completion summary:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
Phase {N} added to current milestone:
|
|
86
|
+
- Description: {description}
|
|
87
|
+
- Directory: ${phases_dir}/{phase-num}-{slug}/
|
|
88
|
+
- Status: Not planned yet
|
|
89
|
+
|
|
90
|
+
Roadmap updated: ${roadmap_path}
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## ▶ Next Up
|
|
95
|
+
|
|
96
|
+
**Phase {N}: {description}**
|
|
97
|
+
|
|
98
|
+
`/dgs:plan-phase {N}`
|
|
99
|
+
|
|
100
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
**Also available:**
|
|
105
|
+
- `/dgs:add-phase <description>` — add another phase
|
|
106
|
+
- Review roadmap
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
```
|
|
110
|
+
</step>
|
|
111
|
+
|
|
112
|
+
</process>
|
|
113
|
+
|
|
114
|
+
<success_criteria>
|
|
115
|
+
- [ ] `dgs-tools phase add` executed successfully
|
|
116
|
+
- [ ] Phase directory created
|
|
117
|
+
- [ ] Roadmap updated with new phase entry
|
|
118
|
+
- [ ] STATE.md updated with roadmap evolution note
|
|
119
|
+
- [ ] User informed of next steps
|
|
120
|
+
</success_criteria>
|