@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,325 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Subagent-driven research workflow that investigates an idea's feasibility and technical landscape across five adaptive dimensions. Claude acts as an analyst -- purposeful and efficient, adapting depth to what the idea actually needs rather than running a checklist.
|
|
3
|
+
|
|
4
|
+
Produces a structured research document at `${project_root}/docs/ideas/pending/{slug}-research.md` and appends a Research Log entry to the idea file. Commits both files together and suggests the next step based on findings.
|
|
5
|
+
|
|
6
|
+
When re-researching a previously-researched idea, the document is overwritten with a "Changes from Prior Research" section highlighting what shifted. Each re-research appends a fresh Research Log entry.
|
|
7
|
+
</purpose>
|
|
8
|
+
|
|
9
|
+
<context_tier>planning</context_tier>
|
|
10
|
+
|
|
11
|
+
<required_reading>
|
|
12
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
13
|
+
</required_reading>
|
|
14
|
+
|
|
15
|
+
<process>
|
|
16
|
+
|
|
17
|
+
<step name="initialize" priority="first">
|
|
18
|
+
Load planning context:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
INIT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs init milestone-op)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Extract: `project_root` as needed by the workflow.
|
|
25
|
+
|
|
26
|
+
Load planning-tier context files:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
TIER_FILES=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" context load-tier planning --raw 2>/dev/null)
|
|
30
|
+
```
|
|
31
|
+
</step>
|
|
32
|
+
|
|
33
|
+
<step name="parse_arguments">
|
|
34
|
+
Parse `$ARGUMENTS` for an idea ID.
|
|
35
|
+
|
|
36
|
+
- First positional argument: treat as idea ID (e.g., `/dgs:research-idea 5` -> id=5)
|
|
37
|
+
- Named flag: `--id N` (e.g., `/dgs:research-idea --id 5` -> id=5)
|
|
38
|
+
|
|
39
|
+
If no ID provided, list pending ideas and prompt for selection:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
PENDING=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs ideas list --state pending --raw)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Parse the JSON `ideas` array.
|
|
46
|
+
|
|
47
|
+
**If empty:**
|
|
48
|
+
```
|
|
49
|
+
No pending ideas to research. Run /dgs:add-idea to capture one.
|
|
50
|
+
```
|
|
51
|
+
Exit workflow.
|
|
52
|
+
|
|
53
|
+
**If ideas exist:** Display them as a numbered list showing ID, title, and tags. Ask the user which idea they would like to research and extract the selected idea's ID.
|
|
54
|
+
</step>
|
|
55
|
+
|
|
56
|
+
<step name="load_idea">
|
|
57
|
+
Load the full idea content by ID:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
LIST=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs ideas list --raw)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Find the idea in the JSON by matching `id`. If not found:
|
|
64
|
+
```
|
|
65
|
+
Idea #${id} not found.
|
|
66
|
+
```
|
|
67
|
+
Exit workflow.
|
|
68
|
+
|
|
69
|
+
Read the idea file directly using the `path` from the list result to get the full content including Discussion Log, Research Log, Notes, and body.
|
|
70
|
+
|
|
71
|
+
Set variables from the parsed content:
|
|
72
|
+
- `id` -- idea ID
|
|
73
|
+
- `title` -- idea title
|
|
74
|
+
- `body` -- idea body/problem statement
|
|
75
|
+
- `tags` -- tags array
|
|
76
|
+
- `notes` -- Notes section content (if any)
|
|
77
|
+
- `state` -- current state (pending, done, rejected)
|
|
78
|
+
- `filename` -- file name
|
|
79
|
+
- `path` -- file path
|
|
80
|
+
- `discussionLog` -- Discussion Log section content (if any)
|
|
81
|
+
- `researchLog` -- Research Log section content (if any)
|
|
82
|
+
|
|
83
|
+
Also check for prior research document:
|
|
84
|
+
```bash
|
|
85
|
+
# Derive slug from filename (strip id prefix and .md suffix)
|
|
86
|
+
SLUG=$(echo "${filename}" | sed 's/^[0-9]*-//' | sed 's/\.md$//')
|
|
87
|
+
RESEARCH_DOC="${project_root}/docs/ideas/pending/${SLUG}-research.md"
|
|
88
|
+
```
|
|
89
|
+
If the research document file exists, read it for prior research context.
|
|
90
|
+
|
|
91
|
+
**Load idea supporting documents:**
|
|
92
|
+
|
|
93
|
+
Derive the idea's docs directory path from the idea's file path:
|
|
94
|
+
```bash
|
|
95
|
+
IDEA_DIR=$(dirname "${path}")
|
|
96
|
+
IDEA_DOCS_DIR="${IDEA_DIR}/docs"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
If a flat structure is used (ideas stored as files, not directories), derive from the filename:
|
|
100
|
+
```bash
|
|
101
|
+
IDEA_DOCS_DIR="${project_root}/docs/ideas/pending/${SLUG}"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Check both paths. Use whichever exists.
|
|
105
|
+
|
|
106
|
+
If the docs/ directory exists, list its contents:
|
|
107
|
+
```bash
|
|
108
|
+
ls "${IDEA_DOCS_DIR}/" 2>/dev/null
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
For each file found, apply the standard docs/ loading pattern:
|
|
112
|
+
- **Text files** (.md, .txt, .json, .yaml, .yml): Read using the Read tool.
|
|
113
|
+
- **Image files** (.png, .jpg, .jpeg, .gif, .svg, .webp): Read using the Read tool directly for multimodal context. Cap at 5 images per idea.
|
|
114
|
+
- **PDF files** (.pdf): Prefer .txt sidecar (same directory, same basename with .txt extension). If sidecar exists, read it. If no sidecar, read up to 5 pages via Read tool with `pages` parameter.
|
|
115
|
+
- **Other files**: Skip silently.
|
|
116
|
+
|
|
117
|
+
If the docs/ directory does not exist: silent skip -- no docs is normal, do not mention it.
|
|
118
|
+
If any file is unreadable: skip silently -- do not mention files that cannot be read.
|
|
119
|
+
|
|
120
|
+
Store loaded docs content as `ideaDocs` for use in the research.
|
|
121
|
+
|
|
122
|
+
Also check for REPOS.md:
|
|
123
|
+
```bash
|
|
124
|
+
cat ${project_root}/REPOS.md 2>/dev/null
|
|
125
|
+
```
|
|
126
|
+
If REPOS.md exists and has entries, this is a multi-repo project -- research should be partitioned by repo where relevant.
|
|
127
|
+
</step>
|
|
128
|
+
|
|
129
|
+
<step name="research_context">
|
|
130
|
+
Assess the idea and decide research strategy:
|
|
131
|
+
|
|
132
|
+
1. **Announce focus**: Print one line explaining which dimensions matter most for this idea and why. E.g.: "Focusing on landscape survey and codebase analysis -- this idea involves integrating with existing patterns."
|
|
133
|
+
|
|
134
|
+
2. **Read Discussion Log** if present -- use discussion insights (refined problem, approach, open questions) to guide research focus areas.
|
|
135
|
+
|
|
136
|
+
3. **Read prior research** if present -- note what was found before. On re-research, Claude will overwrite the document but should note what changed.
|
|
137
|
+
|
|
138
|
+
4. **Read supporting documents** if `ideaDocs` is not empty -- review loaded text files, diagrams, and other supporting materials. These may reveal additional context about the idea's scope, architecture requirements, or prior art that inform the research focus areas.
|
|
139
|
+
|
|
140
|
+
5. **Determine repo scope**: If REPOS.md exists, identify which repos are relevant to this idea. If no REPOS.md, treat as single-repo research.
|
|
141
|
+
</step>
|
|
142
|
+
|
|
143
|
+
<step name="web_search">
|
|
144
|
+
**Dimension 1: Web Search**
|
|
145
|
+
|
|
146
|
+
Announce: "Searching web for prior art and technical landscape..."
|
|
147
|
+
|
|
148
|
+
Use WebSearch and WebFetch to investigate:
|
|
149
|
+
- How others have solved similar problems
|
|
150
|
+
- Existing libraries, tools, or frameworks relevant to the idea
|
|
151
|
+
- Common patterns and anti-patterns
|
|
152
|
+
- Recent discussions or blog posts
|
|
153
|
+
|
|
154
|
+
Adapt depth to what the idea needs -- a well-understood problem gets a quick scan, a novel idea gets broader exploration. If web search yields little, note the gap and move on.
|
|
155
|
+
|
|
156
|
+
Web search is best-effort -- search what's findable, note gaps, move on. Don't burn time on thin topics.
|
|
157
|
+
</step>
|
|
158
|
+
|
|
159
|
+
<step name="codebase_analysis">
|
|
160
|
+
**Dimension 2: Codebase Analysis**
|
|
161
|
+
|
|
162
|
+
Announce: "Analyzing codebase for related implementations..."
|
|
163
|
+
|
|
164
|
+
Use Grep and Glob to examine:
|
|
165
|
+
- Existing code that relates to the idea's domain
|
|
166
|
+
- Patterns already established that would apply
|
|
167
|
+
- Potential conflicts or integration points
|
|
168
|
+
- Code that would need to change
|
|
169
|
+
|
|
170
|
+
For multi-repo projects: analyze each relevant repo separately, noting repo-specific patterns and concerns.
|
|
171
|
+
</step>
|
|
172
|
+
|
|
173
|
+
<step name="landscape_survey">
|
|
174
|
+
**Dimension 3: Landscape Survey**
|
|
175
|
+
|
|
176
|
+
Announce: "Surveying technical landscape..."
|
|
177
|
+
|
|
178
|
+
Build comparison information for relevant tools/libraries/approaches:
|
|
179
|
+
- For obvious choices (one clear winner): brief verdict with reasoning
|
|
180
|
+
- For genuine tradeoffs: table with pros, cons, license, maintenance status, compatibility
|
|
181
|
+
- Per repo stack for multi-repo projects
|
|
182
|
+
|
|
183
|
+
Recommend when clear -- strong recommendation when one option is clearly better, present options neutrally when it's genuinely a toss-up.
|
|
184
|
+
</step>
|
|
185
|
+
|
|
186
|
+
<step name="approaches">
|
|
187
|
+
**Dimension 4: Approaches & Patterns**
|
|
188
|
+
|
|
189
|
+
Announce: "Identifying approaches and patterns..."
|
|
190
|
+
|
|
191
|
+
Identify how similar problems have been solved:
|
|
192
|
+
- Architectural patterns that apply
|
|
193
|
+
- Implementation strategies
|
|
194
|
+
- Sequencing (what to build first)
|
|
195
|
+
- What to avoid and why
|
|
196
|
+
</step>
|
|
197
|
+
|
|
198
|
+
<step name="feasibility">
|
|
199
|
+
**Dimension 5: Feasibility Assessment**
|
|
200
|
+
|
|
201
|
+
Announce: "Assessing feasibility..."
|
|
202
|
+
|
|
203
|
+
Assess:
|
|
204
|
+
- **Stack fit**: How well does this fit the existing technology stack?
|
|
205
|
+
- **Effort estimate**: T-shirt size (S/M/L/XL) + approximate phase count
|
|
206
|
+
- **Key risks**: What could go wrong? What are the unknowns?
|
|
207
|
+
- **New dependencies**: Any new libraries, services, or external integrations needed?
|
|
208
|
+
- **Recommendation**: Overall go/no-go/conditional assessment
|
|
209
|
+
</step>
|
|
210
|
+
|
|
211
|
+
<step name="write_document">
|
|
212
|
+
Create (or overwrite) the research document.
|
|
213
|
+
|
|
214
|
+
Ensure directory exists:
|
|
215
|
+
```bash
|
|
216
|
+
mkdir -p ${project_root}/docs/ideas/pending
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Write the research document to `${project_root}/docs/ideas/pending/${SLUG}-research.md` using the Write tool.
|
|
220
|
+
|
|
221
|
+
**Document structure:**
|
|
222
|
+
```markdown
|
|
223
|
+
---
|
|
224
|
+
type: research
|
|
225
|
+
idea_id: {id}
|
|
226
|
+
idea_title: "{title}"
|
|
227
|
+
date: "{YYYY-MM-DD}"
|
|
228
|
+
repos_analysed: ["{repo1}", "{repo2}"]
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
# Research: {title}
|
|
232
|
+
|
|
233
|
+
{If re-research and meaningful changes exist:}
|
|
234
|
+
## Changes from Prior Research
|
|
235
|
+
|
|
236
|
+
{Bullet list of what's new, updated, or contradicted vs prior findings. Include when there are meaningful differences from prior research, skip when findings are similar.}
|
|
237
|
+
|
|
238
|
+
## Web Search Findings
|
|
239
|
+
|
|
240
|
+
{Findings from Dimension 1}
|
|
241
|
+
|
|
242
|
+
## Codebase Analysis
|
|
243
|
+
|
|
244
|
+
{Findings from Dimension 2. For multi-repo: subsections per repo.}
|
|
245
|
+
|
|
246
|
+
## Landscape Survey
|
|
247
|
+
|
|
248
|
+
{Findings from Dimension 3. Comparison tables where applicable.}
|
|
249
|
+
|
|
250
|
+
## Approaches & Patterns
|
|
251
|
+
|
|
252
|
+
{Findings from Dimension 4}
|
|
253
|
+
|
|
254
|
+
## Feasibility Assessment
|
|
255
|
+
|
|
256
|
+
**Stack Fit:** {assessment}
|
|
257
|
+
**Effort:** {T-shirt size} -- {phase count estimate}
|
|
258
|
+
**Key Risks:**
|
|
259
|
+
{bullet list}
|
|
260
|
+
**New Dependencies:**
|
|
261
|
+
{bullet list or "None"}
|
|
262
|
+
**Recommendation:** {go / no-go / conditional with conditions}
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
*Researched: {YYYY-MM-DD}*
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
For multi-repo projects, the Codebase Analysis and Landscape Survey sections should have `### {repo-name}` subsections.
|
|
269
|
+
|
|
270
|
+
If repos_analysed is empty (no REPOS.md), omit the field from frontmatter or use an empty array.
|
|
271
|
+
</step>
|
|
272
|
+
|
|
273
|
+
<step name="save_research_log">
|
|
274
|
+
Save the Research Log entry to the idea file via the CLI command.
|
|
275
|
+
|
|
276
|
+
Build the entry JSON:
|
|
277
|
+
```json
|
|
278
|
+
{
|
|
279
|
+
"date": "YYYY-MM-DD",
|
|
280
|
+
"summary": "{Actionable summary paragraph -- findings, recommendation, key risks. Enough to act on without opening the full document.}",
|
|
281
|
+
"keyFindings": "- {finding 1}\n- {finding 2}\n- {finding 3}",
|
|
282
|
+
"recommendation": "{Strong recommendation or neutral options presentation}",
|
|
283
|
+
"documentLink": "${project_root}/docs/ideas/pending/${SLUG}-research.md",
|
|
284
|
+
"outcome": "{Recommended next step: 'Ready for spec', 'Needs more discussion', 'Not feasible', etc.}"
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Call:
|
|
289
|
+
```bash
|
|
290
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs ideas research-save --id "${id}" --entry '${entryJson}'
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Parse the JSON result to confirm success.
|
|
294
|
+
</step>
|
|
295
|
+
|
|
296
|
+
<step name="git_commit">
|
|
297
|
+
Commit both the research document and the updated idea file:
|
|
298
|
+
```bash
|
|
299
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs commit "docs: research idea #${id} -- ${title}" --files ${project_root}/docs/ideas/pending/${SLUG}-research.md ${project_root}/ideas/${state}/${filename}
|
|
300
|
+
```
|
|
301
|
+
</step>
|
|
302
|
+
|
|
303
|
+
<step name="suggest_next">
|
|
304
|
+
Display the key finding and recommendation inline, then suggest the next action based on findings.
|
|
305
|
+
|
|
306
|
+
- **Key Finding:** {the single most important finding}
|
|
307
|
+
- **Recommendation:** {the overall recommendation}
|
|
308
|
+
|
|
309
|
+
Suggest next step based on outcome:
|
|
310
|
+
- **"Ready for spec"**: "Run `/dgs:write-spec` to create a formal spec from this idea."
|
|
311
|
+
- **"Needs more discussion"**: "Run `/dgs:discuss-idea ${id}` to explore open questions before specifying."
|
|
312
|
+
- **"Not feasible"**: "Consider `/dgs:reject-idea ${id}` or `/dgs:discuss-idea ${id}` to explore alternatives."
|
|
313
|
+
- **Other**: "Run `/dgs:develop-idea ${id}` for a combined discussion-then-research flow."
|
|
314
|
+
</step>
|
|
315
|
+
|
|
316
|
+
</process>
|
|
317
|
+
|
|
318
|
+
<success_criteria>
|
|
319
|
+
- [ ] Idea loaded with full context (body, tags, notes, discussion log, research log)
|
|
320
|
+
- [ ] Research dimensions executed with progress announcements
|
|
321
|
+
- [ ] Research document created at `${project_root}/docs/ideas/pending/{slug}-research.md` with frontmatter
|
|
322
|
+
- [ ] Research Log entry saved to idea file via research-save CLI
|
|
323
|
+
- [ ] Both files committed together
|
|
324
|
+
- [ ] Key finding + recommendation + next step displayed
|
|
325
|
+
</success_criteria>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Research how to implement a phase. Spawns dgs-phase-researcher with phase context.
|
|
3
|
+
|
|
4
|
+
Standalone research command. For most workflows, use `/dgs:plan-phase` which integrates research automatically.
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<context_tier>planning</context_tier>
|
|
8
|
+
|
|
9
|
+
<process>
|
|
10
|
+
|
|
11
|
+
## Step 0: Resolve Model Profile
|
|
12
|
+
|
|
13
|
+
@~/.claude/deliver-great-systems/references/model-profile-resolution.md
|
|
14
|
+
|
|
15
|
+
Resolve model for:
|
|
16
|
+
- `dgs-phase-researcher`
|
|
17
|
+
|
|
18
|
+
## Step 1: Normalize and Validate Phase
|
|
19
|
+
|
|
20
|
+
@~/.claude/deliver-great-systems/references/phase-argument-parsing.md
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
PHASE_INFO=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs roadmap get-phase "${PHASE}")
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If `found` is false: Error and exit.
|
|
27
|
+
|
|
28
|
+
## Step 2: Check Existing Research
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
ls ${phase_dir}/*-RESEARCH.md 2>/dev/null
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If exists: Offer update/view/skip options.
|
|
35
|
+
|
|
36
|
+
## Step 3: Gather Phase Context
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
INIT=$(node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs init phase-op "${PHASE}")
|
|
40
|
+
# Extract: phase_dir, padded_phase, phase_number, state_path, requirements_path, context_path
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Load planning-tier context files:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
TIER_FILES=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" context load-tier planning --raw 2>/dev/null)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Step 4: Spawn Researcher
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Task(
|
|
53
|
+
prompt="<objective>
|
|
54
|
+
Research implementation approach for Phase {phase}: {name}
|
|
55
|
+
</objective>
|
|
56
|
+
|
|
57
|
+
<files_to_read>
|
|
58
|
+
- {context_path} (USER DECISIONS from /dgs:discuss-phase)
|
|
59
|
+
- {requirements_path} (Project requirements)
|
|
60
|
+
- {state_path} (Project decisions and history)
|
|
61
|
+
</files_to_read>
|
|
62
|
+
|
|
63
|
+
<additional_context>
|
|
64
|
+
Phase description: {description}
|
|
65
|
+
</additional_context>
|
|
66
|
+
|
|
67
|
+
<output>
|
|
68
|
+
Write to: ${phase_dir}/${padded_phase}-RESEARCH.md
|
|
69
|
+
</output>",
|
|
70
|
+
subagent_type="dgs-phase-researcher",
|
|
71
|
+
model="{researcher_model}"
|
|
72
|
+
)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Step 5: Handle Return
|
|
76
|
+
|
|
77
|
+
- `## RESEARCH COMPLETE` — Display summary, offer: Plan/Dig deeper/Review/Done
|
|
78
|
+
- `## CHECKPOINT REACHED` — Present to user, spawn continuation
|
|
79
|
+
- `## RESEARCH INCONCLUSIVE` — Show attempts, offer: Add context/Try different mode/Manual
|
|
80
|
+
|
|
81
|
+
</process>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Restore a rejected, done, or consolidated idea back to pending state for reconsideration. For consolidated ideas, the consolidated_into field is automatically removed. Confirmation is always required. Rejection reasons are preserved in the file as history (not removed on restore).
|
|
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="parse_arguments">
|
|
24
|
+
Extract idea ID from arguments (first positional arg).
|
|
25
|
+
|
|
26
|
+
If no ID provided, list rejected, done, and consolidated ideas and prompt user to select one:
|
|
27
|
+
```bash
|
|
28
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs ideas list --all --raw
|
|
29
|
+
```
|
|
30
|
+
Parse JSON result and display rejected, done, and consolidated ideas only. Use AskUserQuestion to let user pick an idea by ID.
|
|
31
|
+
</step>
|
|
32
|
+
|
|
33
|
+
<step name="find_and_display_idea">
|
|
34
|
+
Find the idea by ID across all states:
|
|
35
|
+
```bash
|
|
36
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs ideas list
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Parse the JSON result and locate the idea matching the provided ID.
|
|
40
|
+
|
|
41
|
+
Determine the idea's current state:
|
|
42
|
+
- If found in **rejected**, **done**, or **consolidated**: proceed with restore
|
|
43
|
+
- If found in **pending**: error and stop:
|
|
44
|
+
```
|
|
45
|
+
Idea #${id} is already pending.
|
|
46
|
+
```
|
|
47
|
+
- If not found at all: error and stop:
|
|
48
|
+
```
|
|
49
|
+
Idea #${id} not found in rejected, done, or consolidated ideas. Only rejected, done, and consolidated ideas can be restored.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Read the idea file to get its title, current state, and any rejection reason:
|
|
53
|
+
```bash
|
|
54
|
+
cat ${path}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Display the idea title, current state, and rejection reason (if any) so the user has full context.
|
|
58
|
+
</step>
|
|
59
|
+
|
|
60
|
+
<step name="confirm">
|
|
61
|
+
Confirmation is always required.
|
|
62
|
+
|
|
63
|
+
Use AskUserQuestion:
|
|
64
|
+
- header: "Restore Idea #${id}?"
|
|
65
|
+
- question: "Restore '${title}' from ${state} to pending?"
|
|
66
|
+
- options: "Yes, restore it", "No, cancel"
|
|
67
|
+
|
|
68
|
+
For consolidated ideas, add context: "Note: the consolidated_into reference will be removed from this idea."
|
|
69
|
+
|
|
70
|
+
If user selects "No, cancel":
|
|
71
|
+
Output: `Cancelled.`
|
|
72
|
+
Stop execution.
|
|
73
|
+
</step>
|
|
74
|
+
|
|
75
|
+
<step name="execute_restore">
|
|
76
|
+
Execute the restore via dgs-tools:
|
|
77
|
+
```bash
|
|
78
|
+
node ~/.claude/deliver-great-systems/bin/dgs-tools.cjs ideas restore --id "${id}"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
The ideas.cjs module handles:
|
|
82
|
+
- Moving the file from rejected/, done/, or consolidated/ to pending/ via git mv
|
|
83
|
+
- For consolidated ideas, removing the consolidated_into field from frontmatter
|
|
84
|
+
- Creating an auto-commit for the state transition
|
|
85
|
+
- Rejection reason is NOT removed from the file -- it is kept as history per project convention
|
|
86
|
+
</step>
|
|
87
|
+
|
|
88
|
+
<step name="confirm_output">
|
|
89
|
+
Output: `Idea #${id} restored to pending.`
|
|
90
|
+
</step>
|
|
91
|
+
|
|
92
|
+
</process>
|
|
93
|
+
|
|
94
|
+
<success_criteria>
|
|
95
|
+
- [ ] Confirmation required before restore
|
|
96
|
+
- [ ] File moved from rejected/, done/, or consolidated/ to pending/ via git mv
|
|
97
|
+
- [ ] For consolidated ideas, consolidated_into field removed from frontmatter
|
|
98
|
+
- [ ] Rejection reason preserved in file (not removed)
|
|
99
|
+
- [ ] Git commit created automatically for the state transition
|
|
100
|
+
- [ ] Handles "already pending" and "not found" errors gracefully
|
|
101
|
+
</success_criteria>
|