@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.
Files changed (256) hide show
  1. package/LICENSE +38 -0
  2. package/README.md +851 -0
  3. package/agents/dgs-codebase-cross-analyzer.md +183 -0
  4. package/agents/dgs-codebase-mapper.md +782 -0
  5. package/agents/dgs-codebase-synthesizer.md +156 -0
  6. package/agents/dgs-debugger.md +1256 -0
  7. package/agents/dgs-executor.md +550 -0
  8. package/agents/dgs-integration-checker.md +481 -0
  9. package/agents/dgs-nyquist-auditor.md +178 -0
  10. package/agents/dgs-phase-researcher.md +563 -0
  11. package/agents/dgs-phase-verifier.md +450 -0
  12. package/agents/dgs-plan-checker.md +708 -0
  13. package/agents/dgs-planner.md +1324 -0
  14. package/agents/dgs-project-researcher.md +631 -0
  15. package/agents/dgs-research-synthesizer.md +249 -0
  16. package/agents/dgs-roadmapper.md +652 -0
  17. package/agents/dgs-verifier.md +607 -0
  18. package/bin/install.js +2073 -0
  19. package/commands/dgs/add-doc.md +45 -0
  20. package/commands/dgs/add-idea.md +38 -0
  21. package/commands/dgs/add-phase.md +43 -0
  22. package/commands/dgs/add-repo.md +54 -0
  23. package/commands/dgs/add-tests.md +41 -0
  24. package/commands/dgs/add-todo.md +47 -0
  25. package/commands/dgs/approve-spec.md +38 -0
  26. package/commands/dgs/audit-milestone.md +36 -0
  27. package/commands/dgs/audit-phase.md +37 -0
  28. package/commands/dgs/cancel-job.md +23 -0
  29. package/commands/dgs/capture-principle.md +143 -0
  30. package/commands/dgs/check-todos.md +45 -0
  31. package/commands/dgs/cleanup.md +18 -0
  32. package/commands/dgs/complete-milestone.md +136 -0
  33. package/commands/dgs/complete-project.md +70 -0
  34. package/commands/dgs/consolidate-ideas.md +50 -0
  35. package/commands/dgs/create-milestone-job.md +37 -0
  36. package/commands/dgs/debug.md +164 -0
  37. package/commands/dgs/develop-idea.md +53 -0
  38. package/commands/dgs/discuss-idea.md +41 -0
  39. package/commands/dgs/discuss-phase.md +83 -0
  40. package/commands/dgs/execute-phase.md +41 -0
  41. package/commands/dgs/fast.md +38 -0
  42. package/commands/dgs/find-related-ideas.md +43 -0
  43. package/commands/dgs/health.md +28 -0
  44. package/commands/dgs/help.md +22 -0
  45. package/commands/dgs/import-spec.md +36 -0
  46. package/commands/dgs/init-product.md +28 -0
  47. package/commands/dgs/insert-phase.md +32 -0
  48. package/commands/dgs/join-discord.md +18 -0
  49. package/commands/dgs/list-docs.md +40 -0
  50. package/commands/dgs/list-ideas.md +42 -0
  51. package/commands/dgs/list-jobs.md +22 -0
  52. package/commands/dgs/list-phase-assumptions.md +46 -0
  53. package/commands/dgs/list-projects.md +57 -0
  54. package/commands/dgs/list-specs.md +40 -0
  55. package/commands/dgs/map-codebase.md +92 -0
  56. package/commands/dgs/new-milestone.md +44 -0
  57. package/commands/dgs/new-project.md +42 -0
  58. package/commands/dgs/node-repair.md +26 -0
  59. package/commands/dgs/overlap-check.md +20 -0
  60. package/commands/dgs/pause-work.md +38 -0
  61. package/commands/dgs/plan-milestone-gaps.md +34 -0
  62. package/commands/dgs/plan-phase.md +44 -0
  63. package/commands/dgs/progress.md +24 -0
  64. package/commands/dgs/quick.md +41 -0
  65. package/commands/dgs/reactivate-project.md +70 -0
  66. package/commands/dgs/reapply-patches.md +110 -0
  67. package/commands/dgs/refine-spec.md +38 -0
  68. package/commands/dgs/reject-idea.md +43 -0
  69. package/commands/dgs/remove-doc.md +44 -0
  70. package/commands/dgs/remove-phase.md +31 -0
  71. package/commands/dgs/remove-repo.md +69 -0
  72. package/commands/dgs/research-idea.md +43 -0
  73. package/commands/dgs/research-phase.md +189 -0
  74. package/commands/dgs/restore-idea.md +45 -0
  75. package/commands/dgs/resume-work.md +40 -0
  76. package/commands/dgs/rollback-job.md +24 -0
  77. package/commands/dgs/run-job.md +35 -0
  78. package/commands/dgs/search.md +40 -0
  79. package/commands/dgs/set-profile.md +34 -0
  80. package/commands/dgs/settings.md +38 -0
  81. package/commands/dgs/switch-project.md +58 -0
  82. package/commands/dgs/undo-consolidation.md +42 -0
  83. package/commands/dgs/update-idea.md +44 -0
  84. package/commands/dgs/update.md +37 -0
  85. package/commands/dgs/validate-phase.md +35 -0
  86. package/commands/dgs/verify-work.md +39 -0
  87. package/commands/dgs/write-spec.md +49 -0
  88. package/deliver-great-systems/.planning/phases/09-backend-wiring-and-error-handling/09-01-SUMMARY.md +84 -0
  89. package/deliver-great-systems/.planning/phases/09-backend-wiring-and-error-handling/09-02-SUMMARY.md +86 -0
  90. package/deliver-great-systems/.planning/phases/10-v1-to-v2-migration-flow/10-01-SUMMARY.md +85 -0
  91. package/deliver-great-systems/bin/dgs-tools.cjs +1444 -0
  92. package/deliver-great-systems/bin/lib/auto-test.cjs +1365 -0
  93. package/deliver-great-systems/bin/lib/commands.cjs +570 -0
  94. package/deliver-great-systems/bin/lib/config.cjs +417 -0
  95. package/deliver-great-systems/bin/lib/conflict-agent.cjs +1063 -0
  96. package/deliver-great-systems/bin/lib/conflict-agent.test.cjs +554 -0
  97. package/deliver-great-systems/bin/lib/context.cjs +929 -0
  98. package/deliver-great-systems/bin/lib/context.test.cjs +693 -0
  99. package/deliver-great-systems/bin/lib/core.cjs +744 -0
  100. package/deliver-great-systems/bin/lib/core.test.cjs +822 -0
  101. package/deliver-great-systems/bin/lib/docs.cjs +919 -0
  102. package/deliver-great-systems/bin/lib/docs.test.cjs +211 -0
  103. package/deliver-great-systems/bin/lib/execution.cjs +705 -0
  104. package/deliver-great-systems/bin/lib/execution.test.cjs +1472 -0
  105. package/deliver-great-systems/bin/lib/frontmatter.cjs +324 -0
  106. package/deliver-great-systems/bin/lib/ideas.cjs +1406 -0
  107. package/deliver-great-systems/bin/lib/ideas.test.cjs +1417 -0
  108. package/deliver-great-systems/bin/lib/identity.cjs +125 -0
  109. package/deliver-great-systems/bin/lib/init.cjs +1114 -0
  110. package/deliver-great-systems/bin/lib/init.test.cjs +1271 -0
  111. package/deliver-great-systems/bin/lib/jobs.cjs +2015 -0
  112. package/deliver-great-systems/bin/lib/jobs.test.cjs +2619 -0
  113. package/deliver-great-systems/bin/lib/merge-conflicts.cjs +654 -0
  114. package/deliver-great-systems/bin/lib/merge-conflicts.test.cjs +370 -0
  115. package/deliver-great-systems/bin/lib/migration.cjs +352 -0
  116. package/deliver-great-systems/bin/lib/migration.test.cjs +582 -0
  117. package/deliver-great-systems/bin/lib/milestone.cjs +243 -0
  118. package/deliver-great-systems/bin/lib/overlap.cjs +437 -0
  119. package/deliver-great-systems/bin/lib/overlap.test.cjs +747 -0
  120. package/deliver-great-systems/bin/lib/path-audit.test.cjs +384 -0
  121. package/deliver-great-systems/bin/lib/paths.cjs +144 -0
  122. package/deliver-great-systems/bin/lib/paths.test.cjs +486 -0
  123. package/deliver-great-systems/bin/lib/phase.cjs +910 -0
  124. package/deliver-great-systems/bin/lib/projects.cjs +691 -0
  125. package/deliver-great-systems/bin/lib/projects.test.cjs +871 -0
  126. package/deliver-great-systems/bin/lib/repos.cjs +1432 -0
  127. package/deliver-great-systems/bin/lib/repos.test.cjs +1882 -0
  128. package/deliver-great-systems/bin/lib/roadmap.cjs +305 -0
  129. package/deliver-great-systems/bin/lib/search.cjs +570 -0
  130. package/deliver-great-systems/bin/lib/specs.cjs +1303 -0
  131. package/deliver-great-systems/bin/lib/state.cjs +893 -0
  132. package/deliver-great-systems/bin/lib/template.cjs +228 -0
  133. package/deliver-great-systems/bin/lib/test-helpers.cjs +291 -0
  134. package/deliver-great-systems/bin/lib/verify.cjs +796 -0
  135. package/deliver-great-systems/references/checkpoints.md +776 -0
  136. package/deliver-great-systems/references/conflict-resolution.md +66 -0
  137. package/deliver-great-systems/references/context-tiers.md +166 -0
  138. package/deliver-great-systems/references/continuation-format.md +249 -0
  139. package/deliver-great-systems/references/decimal-phase-calculation.md +67 -0
  140. package/deliver-great-systems/references/git-integration.md +250 -0
  141. package/deliver-great-systems/references/git-planning-commit.md +40 -0
  142. package/deliver-great-systems/references/model-profile-resolution.md +36 -0
  143. package/deliver-great-systems/references/model-profiles.md +95 -0
  144. package/deliver-great-systems/references/phase-argument-parsing.md +61 -0
  145. package/deliver-great-systems/references/planning-config.md +224 -0
  146. package/deliver-great-systems/references/questioning.md +162 -0
  147. package/deliver-great-systems/references/spec-review-loop.md +177 -0
  148. package/deliver-great-systems/references/tdd.md +265 -0
  149. package/deliver-great-systems/references/ui-brand.md +160 -0
  150. package/deliver-great-systems/references/verification-patterns.md +612 -0
  151. package/deliver-great-systems/templates/DEBUG.md +166 -0
  152. package/deliver-great-systems/templates/UAT.md +251 -0
  153. package/deliver-great-systems/templates/VALIDATION.md +95 -0
  154. package/deliver-great-systems/templates/claude-md.md +74 -0
  155. package/deliver-great-systems/templates/codebase/architecture.md +257 -0
  156. package/deliver-great-systems/templates/codebase/concerns.md +312 -0
  157. package/deliver-great-systems/templates/codebase/conventions.md +309 -0
  158. package/deliver-great-systems/templates/codebase/integrations.md +282 -0
  159. package/deliver-great-systems/templates/codebase/stack.md +188 -0
  160. package/deliver-great-systems/templates/codebase/structure.md +287 -0
  161. package/deliver-great-systems/templates/codebase/testing.md +482 -0
  162. package/deliver-great-systems/templates/config.json +38 -0
  163. package/deliver-great-systems/templates/context.md +354 -0
  164. package/deliver-great-systems/templates/continue-here.md +80 -0
  165. package/deliver-great-systems/templates/debug-subagent-prompt.md +93 -0
  166. package/deliver-great-systems/templates/discovery.md +148 -0
  167. package/deliver-great-systems/templates/milestone-archive.md +125 -0
  168. package/deliver-great-systems/templates/milestone.md +117 -0
  169. package/deliver-great-systems/templates/phase-prompt.md +615 -0
  170. package/deliver-great-systems/templates/planner-subagent-prompt.md +119 -0
  171. package/deliver-great-systems/templates/project.md +186 -0
  172. package/deliver-great-systems/templates/requirements.md +233 -0
  173. package/deliver-great-systems/templates/research-project/ARCHITECTURE.md +206 -0
  174. package/deliver-great-systems/templates/research-project/FEATURES.md +149 -0
  175. package/deliver-great-systems/templates/research-project/PITFALLS.md +202 -0
  176. package/deliver-great-systems/templates/research-project/STACK.md +122 -0
  177. package/deliver-great-systems/templates/research-project/SUMMARY.md +172 -0
  178. package/deliver-great-systems/templates/research.md +554 -0
  179. package/deliver-great-systems/templates/retrospective.md +54 -0
  180. package/deliver-great-systems/templates/roadmap.md +204 -0
  181. package/deliver-great-systems/templates/state.md +178 -0
  182. package/deliver-great-systems/templates/summary-complex.md +59 -0
  183. package/deliver-great-systems/templates/summary-minimal.md +41 -0
  184. package/deliver-great-systems/templates/summary-standard.md +48 -0
  185. package/deliver-great-systems/templates/summary.md +253 -0
  186. package/deliver-great-systems/templates/user-setup.md +313 -0
  187. package/deliver-great-systems/templates/verification-report.md +324 -0
  188. package/deliver-great-systems/workflows/add-doc.md +151 -0
  189. package/deliver-great-systems/workflows/add-idea.md +96 -0
  190. package/deliver-great-systems/workflows/add-phase.md +120 -0
  191. package/deliver-great-systems/workflows/add-tests.md +359 -0
  192. package/deliver-great-systems/workflows/add-todo.md +162 -0
  193. package/deliver-great-systems/workflows/approve-spec.md +194 -0
  194. package/deliver-great-systems/workflows/audit-milestone.md +364 -0
  195. package/deliver-great-systems/workflows/audit-phase.md +462 -0
  196. package/deliver-great-systems/workflows/cancel-job.md +108 -0
  197. package/deliver-great-systems/workflows/check-todos.md +181 -0
  198. package/deliver-great-systems/workflows/cleanup.md +247 -0
  199. package/deliver-great-systems/workflows/codereview.md +526 -0
  200. package/deliver-great-systems/workflows/complete-milestone.md +1298 -0
  201. package/deliver-great-systems/workflows/consolidate-ideas.md +365 -0
  202. package/deliver-great-systems/workflows/create-milestone-job.md +177 -0
  203. package/deliver-great-systems/workflows/develop-idea.md +544 -0
  204. package/deliver-great-systems/workflows/diagnose-issues.md +231 -0
  205. package/deliver-great-systems/workflows/discovery-phase.md +301 -0
  206. package/deliver-great-systems/workflows/discuss-idea.md +263 -0
  207. package/deliver-great-systems/workflows/discuss-phase.md +733 -0
  208. package/deliver-great-systems/workflows/execute-phase.md +571 -0
  209. package/deliver-great-systems/workflows/execute-plan.md +592 -0
  210. package/deliver-great-systems/workflows/find-related-ideas.md +271 -0
  211. package/deliver-great-systems/workflows/health.md +173 -0
  212. package/deliver-great-systems/workflows/help.md +997 -0
  213. package/deliver-great-systems/workflows/import-spec.md +381 -0
  214. package/deliver-great-systems/workflows/init-product.md +767 -0
  215. package/deliver-great-systems/workflows/insert-phase.md +138 -0
  216. package/deliver-great-systems/workflows/list-docs.md +119 -0
  217. package/deliver-great-systems/workflows/list-ideas.md +154 -0
  218. package/deliver-great-systems/workflows/list-jobs.md +89 -0
  219. package/deliver-great-systems/workflows/list-phase-assumptions.md +192 -0
  220. package/deliver-great-systems/workflows/list-specs.md +101 -0
  221. package/deliver-great-systems/workflows/map-codebase.md +621 -0
  222. package/deliver-great-systems/workflows/new-milestone.md +591 -0
  223. package/deliver-great-systems/workflows/new-project.md +1113 -0
  224. package/deliver-great-systems/workflows/node-repair.md +94 -0
  225. package/deliver-great-systems/workflows/overlap-check.md +86 -0
  226. package/deliver-great-systems/workflows/pause-work.md +134 -0
  227. package/deliver-great-systems/workflows/plan-milestone-gaps.md +306 -0
  228. package/deliver-great-systems/workflows/plan-phase.md +698 -0
  229. package/deliver-great-systems/workflows/progress.md +386 -0
  230. package/deliver-great-systems/workflows/quick.md +845 -0
  231. package/deliver-great-systems/workflows/refine-spec.md +275 -0
  232. package/deliver-great-systems/workflows/reject-idea.md +109 -0
  233. package/deliver-great-systems/workflows/remove-doc.md +117 -0
  234. package/deliver-great-systems/workflows/remove-phase.md +163 -0
  235. package/deliver-great-systems/workflows/research-idea.md +325 -0
  236. package/deliver-great-systems/workflows/research-phase.md +81 -0
  237. package/deliver-great-systems/workflows/restore-idea.md +101 -0
  238. package/deliver-great-systems/workflows/resume-project.md +311 -0
  239. package/deliver-great-systems/workflows/rollback-job.md +130 -0
  240. package/deliver-great-systems/workflows/run-job.md +498 -0
  241. package/deliver-great-systems/workflows/search.md +130 -0
  242. package/deliver-great-systems/workflows/set-profile.md +83 -0
  243. package/deliver-great-systems/workflows/settings.md +470 -0
  244. package/deliver-great-systems/workflows/transition.md +563 -0
  245. package/deliver-great-systems/workflows/undo-consolidation.md +155 -0
  246. package/deliver-great-systems/workflows/update-idea.md +157 -0
  247. package/deliver-great-systems/workflows/update.md +242 -0
  248. package/deliver-great-systems/workflows/validate-phase.md +177 -0
  249. package/deliver-great-systems/workflows/verify-phase.md +253 -0
  250. package/deliver-great-systems/workflows/verify-work.md +671 -0
  251. package/deliver-great-systems/workflows/write-spec.md +450 -0
  252. package/hooks/dist/dgs-check-update.js +62 -0
  253. package/hooks/dist/dgs-context-monitor.js +141 -0
  254. package/hooks/dist/dgs-statusline.js +115 -0
  255. package/package.json +60 -0
  256. package/scripts/build-hooks.js +43 -0
@@ -0,0 +1,66 @@
1
+ # Conflict Resolution Protocol
2
+
3
+ Reference document for automated merge conflict resolution during milestone completion.
4
+
5
+ ## Resolution Flow
6
+
7
+ When `git merge` (squash or no-ff) returns non-zero exit code:
8
+
9
+ 1. **Detect** -- Run `dgs-tools conflict-agent run --phase-dir <phase-dir>` to get conflict inventory and attempt automated resolution
10
+ 2. **Assess** -- Parse the agent's JSON output: `resolved_count`, `escalated_count`, `verified`, `semantic_warnings`
11
+ 3. **Escalate** -- For each escalated (LOW-confidence) conflict, present to user for approval
12
+ 4. **Verify** -- After all resolutions applied, run post-resolution verification
13
+ 5. **Record** -- Resolution report committed as part of merge commit (atomic with resolution)
14
+ 6. **Continue** -- Complete the merge commit and proceed to next branch (if phase strategy)
15
+
16
+ ## Escalation Protocol
17
+
18
+ When the agent flags a conflict as LOW confidence or escalated:
19
+
20
+ 1. Show the user:
21
+ - The conflict diff (ours vs theirs)
22
+ - Plan context for both sides (what each branch intended)
23
+ - The agent's proposed resolution (if any)
24
+ - Confidence assessment and reasoning
25
+
26
+ 2. User actions:
27
+ - **Accept** -- Apply the proposed resolution as-is
28
+ - **Reject with hint** -- User provides guidance text; agent retries with that context
29
+ - **Abort this file** -- Leave this file's conflicts unresolved; abort this specific branch merge, continue with remaining branches
30
+
31
+ 3. Retry limit: Maximum 2 retries with user guidance per file. After 2 failed retries, abort that branch merge and move to the next.
32
+
33
+ ## Cascading Context
34
+
35
+ For phase branching strategy with sequential merges:
36
+
37
+ - After each branch merge, extract learnings (files resolved, strategies used, domain changes)
38
+ - Pass accumulated learnings to the next branch's resolution
39
+ - If a conflict involves a file already resolved in a previous merge, boost confidence using prior resolution context
40
+
41
+ ## Semantic Warnings
42
+
43
+ After all conflict markers are resolved (including clean merges):
44
+
45
+ - Check which files were modified by both branches without conflict markers
46
+ - Flag files where both branches touched the same domain/function area
47
+ - Emit warnings in the resolution report -- advisory only, does not block the merge
48
+
49
+ ## Confidence Levels
50
+
51
+ | Level | Meaning | Action |
52
+ |-------|---------|--------|
53
+ | HIGH | One-sided addition, clear structural combine, plan context confirms | Silent -- resolve automatically |
54
+ | MEDIUM | Superset pattern, partial plan context, cascading boost | Silent -- resolve automatically, note in report |
55
+ | LOW | Divergent changes, contradictory intent, no clear winner | Escalate -- present to user for approval |
56
+
57
+ ## Summary Output
58
+
59
+ After all merges complete, show:
60
+ ```
61
+ Conflict Resolution Summary:
62
+ - {N} files resolved ({H} HIGH, {M} MEDIUM, {L} LOW)
63
+ - {E} files escalated to user
64
+ - {S} semantic warnings
65
+ - Report: {path to RESOLUTION-REPORT.md}
66
+ ```
@@ -0,0 +1,166 @@
1
+ # Context Tiers
2
+
3
+ > Machine-readable tier definitions for the DGS context loading system.
4
+ > Parsed at runtime by `bin/lib/context.cjs` -- YAML code blocks are the source of truth.
5
+
6
+ ## Tier 0: none
7
+
8
+ No context loaded. Used by stateless utility commands that need no project awareness.
9
+
10
+ ```yaml
11
+ tier: none
12
+ includes_tier: null
13
+ files: []
14
+ dynamic: []
15
+ scope_flags: {}
16
+ ```
17
+
18
+ ## Tier 1: lite
19
+
20
+ Minimal "where am I" context. Project identity, current state, and configuration.
21
+
22
+ ```yaml
23
+ tier: lite
24
+ includes_tier: null
25
+ files:
26
+ - path: "PROJECT.md"
27
+ category: "project"
28
+ - path: "STATE.md"
29
+ category: "state"
30
+ - path: "config.json"
31
+ category: "config"
32
+ scope_flags: {}
33
+ ```
34
+
35
+ ## Tier 2: planning
36
+
37
+ Full planning awareness. Inherits lite tier and adds roadmap, requirements, repo registry, and all codebase analysis documents.
38
+
39
+ ```yaml
40
+ tier: planning
41
+ includes_tier: lite
42
+ files:
43
+ - path: "ROADMAP.md"
44
+ category: "roadmap"
45
+ - path: "REQUIREMENTS.md"
46
+ category: "requirements"
47
+ - path: "REPOS.md"
48
+ category: "repos"
49
+ dynamic:
50
+ - type: "glob"
51
+ pattern: "codebase/**/*.md"
52
+ category: "codebase"
53
+ scope_flags:
54
+ idea:
55
+ - path: "ideas/{idea_file}"
56
+ category: "idea"
57
+ - path: "ideas/{idea_dir}/docs/**"
58
+ category: "idea-docs"
59
+ spec:
60
+ - path: "specs/{spec_file}"
61
+ category: "spec"
62
+ - path: "specs/{spec_dir}/docs/**"
63
+ category: "spec-docs"
64
+ ```
65
+
66
+ ## Tier 3: execution
67
+
68
+ Phase-aware context for plan execution. Inherits planning tier and adds phase-specific files via the `--phase` flag.
69
+
70
+ ```yaml
71
+ tier: execution
72
+ includes_tier: planning
73
+ files: []
74
+ dynamic: []
75
+ scope_flags:
76
+ phase:
77
+ - path: "phases/{phase_dir}/CONTEXT.md"
78
+ category: "phase"
79
+ - path: "phases/{phase_dir}/RESEARCH.md"
80
+ category: "phase"
81
+ - path: "phases/{phase_dir}/*-PLAN.md"
82
+ category: "phase-plan"
83
+ - path: "phases/{phase_dir}/*-SUMMARY.md"
84
+ category: "phase-summary"
85
+ - path: "milestone-summaries"
86
+ category: "milestone-summary"
87
+ description: "All SUMMARY.md files from completed phases in the current milestone"
88
+ idea:
89
+ - path: "ideas/{idea_file}"
90
+ category: "idea"
91
+ - path: "ideas/{idea_dir}/docs/**"
92
+ category: "idea-docs"
93
+ spec:
94
+ - path: "specs/{spec_file}"
95
+ category: "spec"
96
+ - path: "specs/{spec_dir}/docs/**"
97
+ category: "spec-docs"
98
+ ```
99
+
100
+ ## Tier 4: verification
101
+
102
+ Full context for verification and UAT. Inherits execution tier and adds verification artifacts.
103
+
104
+ ```yaml
105
+ tier: verification
106
+ includes_tier: execution
107
+ files:
108
+ - path: "phases/{phase_dir}/VERIFICATION.md"
109
+ category: "verification"
110
+ dynamic:
111
+ - type: "glob"
112
+ pattern: "UAT*.md"
113
+ category: "uat"
114
+ scope_flags:
115
+ phase:
116
+ - path: "phases/{phase_dir}/CONTEXT.md"
117
+ category: "phase"
118
+ - path: "phases/{phase_dir}/RESEARCH.md"
119
+ category: "phase"
120
+ - path: "phases/{phase_dir}/*-PLAN.md"
121
+ category: "phase-plan"
122
+ - path: "phases/{phase_dir}/*-SUMMARY.md"
123
+ category: "phase-summary"
124
+ - path: "milestone-summaries"
125
+ category: "milestone-summary"
126
+ description: "All SUMMARY.md files from completed phases in the current milestone"
127
+ idea:
128
+ - path: "ideas/{idea_file}"
129
+ category: "idea"
130
+ - path: "ideas/{idea_dir}/docs/**"
131
+ category: "idea-docs"
132
+ spec:
133
+ - path: "specs/{spec_file}"
134
+ category: "spec"
135
+ - path: "specs/{spec_dir}/docs/**"
136
+ category: "spec-docs"
137
+ ```
138
+
139
+ ## Workflow-to-Tier Mapping
140
+
141
+ Informational reference for which workflows use which tier.
142
+
143
+ ### Tier 0 -- none (5 workflows)
144
+
145
+ help, node-repair, set-profile, sync-upstream, update
146
+
147
+ ### Tier 1 -- lite (24 workflows)
148
+
149
+ add-doc, add-idea, add-todo, cancel-job, check-todos, cleanup, create-milestone-job, health, init-product, list-docs, list-ideas, list-jobs, list-specs, overlap-check, pause-work, progress, reject-idea, remove-doc, restore-idea, resume-project, search, settings, undo-consolidation, update-idea
150
+
151
+ ### Tier 2 -- planning (22 workflows)
152
+
153
+ add-phase, add-tests, approve-spec, consolidate-ideas, develop-idea, discuss-idea, discuss-phase, find-related-ideas, import-spec, insert-phase, list-phase-assumptions, map-codebase, new-milestone, new-project, plan-milestone-gaps, plan-phase, quick, refine-spec, remove-phase, research-idea, research-phase, write-spec
154
+
155
+ ### Tier 3 -- execution (7 workflows)
156
+
157
+ audit-phase, diagnose-issues, discovery-phase, execute-phase, execute-plan, run-job, transition
158
+
159
+ ### Tier 4 -- verification (5 workflows)
160
+
161
+ audit-milestone, complete-milestone, validate-phase, verify-phase, verify-work
162
+
163
+ ---
164
+
165
+ *Context tiers defined for v15.0 Improved Context Loading*
166
+ *Parsed by: deliver-great-systems/bin/lib/context.cjs*
@@ -0,0 +1,249 @@
1
+ # Continuation Format
2
+
3
+ Standard format for presenting next steps after completing a command or workflow.
4
+
5
+ ## Core Structure
6
+
7
+ ```
8
+ ---
9
+
10
+ ## â–¶ Next Up
11
+
12
+ **{identifier}: {name}** — {one-line description}
13
+
14
+ `{command to copy-paste}`
15
+
16
+ <sub>`/clear` first → fresh context window</sub>
17
+
18
+ ---
19
+
20
+ **Also available:**
21
+ - `{alternative option 1}` — description
22
+ - `{alternative option 2}` — description
23
+
24
+ ---
25
+ ```
26
+
27
+ ## Format Rules
28
+
29
+ 1. **Always show what it is** — name + description, never just a command path
30
+ 2. **Pull context from source** — ROADMAP.md for phases, PLAN.md `<objective>` for plans
31
+ 3. **Command in inline code** — backticks, easy to copy-paste, renders as clickable link
32
+ 4. **`/clear` explanation** — always include, keeps it concise but explains why
33
+ 5. **"Also available" not "Other options"** — sounds more app-like
34
+ 6. **Visual separators** — `---` above and below to make it stand out
35
+
36
+ ## Variants
37
+
38
+ ### Execute Next Plan
39
+
40
+ ```
41
+ ---
42
+
43
+ ## â–¶ Next Up
44
+
45
+ **02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry
46
+
47
+ `/dgs:execute-phase 2`
48
+
49
+ <sub>`/clear` first → fresh context window</sub>
50
+
51
+ ---
52
+
53
+ **Also available:**
54
+ - Review plan before executing
55
+ - `/dgs:list-phase-assumptions 2` — check assumptions
56
+
57
+ ---
58
+ ```
59
+
60
+ ### Execute Final Plan in Phase
61
+
62
+ Add note that this is the last plan and what comes after:
63
+
64
+ ```
65
+ ---
66
+
67
+ ## â–¶ Next Up
68
+
69
+ **02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry
70
+ <sub>Final plan in Phase 2</sub>
71
+
72
+ `/dgs:execute-phase 2`
73
+
74
+ <sub>`/clear` first → fresh context window</sub>
75
+
76
+ ---
77
+
78
+ **After this completes:**
79
+ - Phase 2 → Phase 3 transition
80
+ - Next: **Phase 3: Core Features** — User dashboard and settings
81
+
82
+ ---
83
+ ```
84
+
85
+ ### Plan a Phase
86
+
87
+ ```
88
+ ---
89
+
90
+ ## â–¶ Next Up
91
+
92
+ **Phase 2: Authentication** — JWT login flow with refresh tokens
93
+
94
+ `/dgs:plan-phase 2`
95
+
96
+ <sub>`/clear` first → fresh context window</sub>
97
+
98
+ ---
99
+
100
+ **Also available:**
101
+ - `/dgs:discuss-phase 2` — gather context first
102
+ - `/dgs:research-phase 2` — investigate unknowns
103
+ - Review roadmap
104
+
105
+ ---
106
+ ```
107
+
108
+ ### Phase Complete, Ready for Next
109
+
110
+ Show completion status before next action:
111
+
112
+ ```
113
+ ---
114
+
115
+ ## ✓ Phase 2 Complete
116
+
117
+ 3/3 plans executed
118
+
119
+ ## â–¶ Next Up
120
+
121
+ **Phase 3: Core Features** — User dashboard, settings, and data export
122
+
123
+ `/dgs:plan-phase 3`
124
+
125
+ <sub>`/clear` first → fresh context window</sub>
126
+
127
+ ---
128
+
129
+ **Also available:**
130
+ - `/dgs:discuss-phase 3` — gather context first
131
+ - `/dgs:research-phase 3` — investigate unknowns
132
+ - Review what Phase 2 built
133
+
134
+ ---
135
+ ```
136
+
137
+ ### Multiple Equal Options
138
+
139
+ When there's no clear primary action:
140
+
141
+ ```
142
+ ---
143
+
144
+ ## â–¶ Next Up
145
+
146
+ **Phase 3: Core Features** — User dashboard, settings, and data export
147
+
148
+ **To plan directly:** `/dgs:plan-phase 3`
149
+
150
+ **To discuss context first:** `/dgs:discuss-phase 3`
151
+
152
+ **To research unknowns:** `/dgs:research-phase 3`
153
+
154
+ <sub>`/clear` first → fresh context window</sub>
155
+
156
+ ---
157
+ ```
158
+
159
+ ### Milestone Complete
160
+
161
+ ```
162
+ ---
163
+
164
+ ## 🎉 Milestone v1.0 Complete
165
+
166
+ All 4 phases shipped
167
+
168
+ ## â–¶ Next Up
169
+
170
+ **Start v1.1** — questioning → research → requirements → roadmap
171
+
172
+ `/dgs:new-milestone`
173
+
174
+ <sub>`/clear` first → fresh context window</sub>
175
+
176
+ ---
177
+ ```
178
+
179
+ ## Pulling Context
180
+
181
+ ### For phases (from ROADMAP.md):
182
+
183
+ ```markdown
184
+ ### Phase 2: Authentication
185
+ **Goal**: JWT login flow with refresh tokens
186
+ ```
187
+
188
+ Extract: `**Phase 2: Authentication** — JWT login flow with refresh tokens`
189
+
190
+ ### For plans (from ROADMAP.md):
191
+
192
+ ```markdown
193
+ Plans:
194
+ - [ ] 02-03: Add refresh token rotation
195
+ ```
196
+
197
+ Or from PLAN.md `<objective>`:
198
+
199
+ ```xml
200
+ <objective>
201
+ Add refresh token rotation with sliding expiry window.
202
+
203
+ Purpose: Extend session lifetime without compromising security.
204
+ </objective>
205
+ ```
206
+
207
+ Extract: `**02-03: Refresh Token Rotation** — Add /api/auth/refresh with sliding expiry`
208
+
209
+ ## Anti-Patterns
210
+
211
+ ### Don't: Command-only (no context)
212
+
213
+ ```
214
+ ## To Continue
215
+
216
+ Run `/clear`, then paste:
217
+ /dgs:execute-phase 2
218
+ ```
219
+
220
+ User has no idea what 02-03 is about.
221
+
222
+ ### Don't: Missing /clear explanation
223
+
224
+ ```
225
+ `/dgs:plan-phase 3`
226
+
227
+ Run /clear first.
228
+ ```
229
+
230
+ Doesn't explain why. User might skip it.
231
+
232
+ ### Don't: "Other options" language
233
+
234
+ ```
235
+ Other options:
236
+ - Review roadmap
237
+ ```
238
+
239
+ Sounds like an afterthought. Use "Also available:" instead.
240
+
241
+ ### Don't: Fenced code blocks for commands
242
+
243
+ ```
244
+ ```
245
+ /dgs:plan-phase 3
246
+ ```
247
+ ```
248
+
249
+ Fenced blocks inside templates create nesting ambiguity. Use inline backticks instead.
@@ -0,0 +1,67 @@
1
+ # Decimal Phase Calculation
2
+
3
+ > **v2 Multi-Project:** Always use init output variables (`${project_root}`, `${phase_dir}`, `${phases_dir}`) instead of hardcoded paths in workflows. In v2 setups, these resolve to `<project-slug>/phases/` within the planning root.
4
+
5
+ Calculate the next decimal phase number for urgent insertions.
6
+
7
+ ## Using dgs-tools
8
+
9
+ ```bash
10
+ # Get next decimal phase after phase 6
11
+ node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" phase next-decimal 6
12
+ ```
13
+
14
+ Output:
15
+ ```json
16
+ {
17
+ "found": true,
18
+ "base_phase": "06",
19
+ "next": "06.1",
20
+ "existing": []
21
+ }
22
+ ```
23
+
24
+ With existing decimals:
25
+ ```json
26
+ {
27
+ "found": true,
28
+ "base_phase": "06",
29
+ "next": "06.3",
30
+ "existing": ["06.1", "06.2"]
31
+ }
32
+ ```
33
+
34
+ ## Extract Values
35
+
36
+ ```bash
37
+ DECIMAL_INFO=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" phase next-decimal "${AFTER_PHASE}")
38
+ DECIMAL_PHASE=$(printf '%s\n' "$DECIMAL_INFO" | jq -r '.next')
39
+ BASE_PHASE=$(printf '%s\n' "$DECIMAL_INFO" | jq -r '.base_phase')
40
+ ```
41
+
42
+ Or with --raw flag:
43
+ ```bash
44
+ DECIMAL_PHASE=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" phase next-decimal "${AFTER_PHASE}" --raw)
45
+ # Returns just: 06.1
46
+ ```
47
+
48
+ ## Examples
49
+
50
+ | Existing Phases | Next Phase |
51
+ |-----------------|------------|
52
+ | 06 only | 06.1 |
53
+ | 06, 06.1 | 06.2 |
54
+ | 06, 06.1, 06.2 | 06.3 |
55
+ | 06, 06.1, 06.3 (gap) | 06.4 |
56
+
57
+ ## Directory Naming
58
+
59
+ Decimal phase directories use the full decimal number:
60
+
61
+ ```bash
62
+ SLUG=$(node "$HOME/.claude/deliver-great-systems/bin/dgs-tools.cjs" generate-slug "$DESCRIPTION" --raw)
63
+ PHASE_DIR="${phases_dir}/${DECIMAL_PHASE}-${SLUG}"
64
+ mkdir -p "$PHASE_DIR"
65
+ ```
66
+
67
+ Example: `${phases_dir}/06.1-fix-critical-auth-bug/`