devspec 0.1.2__tar.gz → 0.2.0__tar.gz

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 (186) hide show
  1. {devspec-0.1.2 → devspec-0.2.0}/.agents/rules/devspec-workflow.md +2 -2
  2. devspec-0.2.0/.agents/skills/devspec-changerequest.md +13 -0
  3. devspec-0.2.0/.agents/skills/devspec-diagram.md +17 -0
  4. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-extract.md +1 -1
  5. devspec-0.2.0/.claude/skills/devspec-changerequest/SKILL.md +14 -0
  6. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-diagram/SKILL.md +2 -2
  7. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-extract/SKILL.md +1 -1
  8. {devspec-0.1.2 → devspec-0.2.0}/.cursor/rules/devspec-workflow.mdc +1 -1
  9. devspec-0.2.0/.gemini/commands/devspec/changerequest.toml +13 -0
  10. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/diagram.toml +1 -1
  11. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/extract.toml +1 -1
  12. devspec-0.2.0/.github/agents/devspec.changerequest.agent.md +34 -0
  13. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.clarify.agent.md +7 -3
  14. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.diagram.agent.md +23 -17
  15. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.extract.agent.md +12 -12
  16. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.finalize.agent.md +5 -3
  17. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.implement-task.agent.md +11 -5
  18. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.review.agent.md +8 -2
  19. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.story.agent.md +7 -3
  20. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.tasks.agent.md +5 -3
  21. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/PATTERNS.md +183 -48
  22. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/README.md +14 -10
  23. devspec-0.2.0/.github/prompts/devspec.changerequest.prompt.md +11 -0
  24. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.clarify.prompt.md +2 -0
  25. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.diagram.prompt.md +4 -4
  26. devspec-0.2.0/.github/prompts/devspec.extract.prompt.md +11 -0
  27. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.finalize.prompt.md +2 -0
  28. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.implement.prompt.md +2 -0
  29. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.review.prompt.md +2 -0
  30. devspec-0.2.0/.github/prompts/devspec.story.prompt.md +11 -0
  31. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.tasks.prompt.md +2 -0
  32. {devspec-0.1.2 → devspec-0.2.0}/AGENTS.md +3 -3
  33. {devspec-0.1.2 → devspec-0.2.0}/GEMINI.md +2 -1
  34. {devspec-0.1.2 → devspec-0.2.0}/PKG-INFO +56 -239
  35. devspec-0.2.0/README.md +117 -0
  36. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/antigravity.md +2 -1
  37. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/claude-code.md +2 -1
  38. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/codex.md +1 -1
  39. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/command-registry.md +10 -8
  40. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/gemini-cli.md +2 -1
  41. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/validation-flows.md +42 -2
  42. devspec-0.2.0/devspec/architecture/_template/architecture-diagram.svg +220 -0
  43. {devspec-0.1.2 → devspec-0.2.0}/devspec/architecture/_template/artifact-queue.md +3 -3
  44. devspec-0.2.0/devspec/architecture/_template/diagram.html +117 -0
  45. {devspec-0.1.2 → devspec-0.2.0}/devspec/architecture/_template/diagram.md +21 -8
  46. devspec-0.2.0/devspec/architecture/_template/domain-model-diagram.svg +156 -0
  47. devspec-0.2.0/devspec/architecture/_template/journey-map-diagram.svg +175 -0
  48. devspec-0.2.0/devspec/architecture/_template/mindmap-diagram.svg +157 -0
  49. {devspec-0.1.2/devspec/architecture → devspec-0.2.0/devspec/architecture/_template}/overview.md +1 -1
  50. devspec-0.2.0/devspec/architecture/_template/process-flow-diagram.svg +294 -0
  51. devspec-0.2.0/devspec/architecture/_template/quadrant-analysis-diagram.svg +126 -0
  52. devspec-0.2.0/devspec/architecture/_template/sequence-diagram.svg +175 -0
  53. devspec-0.2.0/devspec/architecture/_template/state-lifecycle-diagram.svg +175 -0
  54. devspec-0.2.0/devspec/architecture/_template/timeline-plan-diagram.svg +157 -0
  55. {devspec-0.1.2 → devspec-0.2.0}/devspec/architecture/artifact-queue.md +3 -3
  56. {devspec-0.1.2 → devspec-0.2.0}/devspec/architecture/diagrams/README.md +9 -9
  57. devspec-0.2.0/devspec/architecture/html/README.md +20 -0
  58. {devspec-0.1.2 → devspec-0.2.0}/devspec/architecture/images/README.md +4 -4
  59. {devspec-0.1.2/devspec/architecture/_template → devspec-0.2.0/devspec/architecture}/overview.md +1 -1
  60. {devspec-0.1.2/devspec/foundation → devspec-0.2.0/devspec/foundation/_template}/extraction-state.md +4 -1
  61. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/_template/provider-integrations.md +1 -0
  62. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/provider-integrations.md +1 -0
  63. {devspec-0.1.2 → devspec-0.2.0}/devspec/glossary.md +11 -0
  64. {devspec-0.1.2 → devspec-0.2.0}/devspec/work-items/_template/clarify.md +8 -5
  65. devspec-0.2.0/devspec/work-items/_template/diagrams.md +56 -0
  66. {devspec-0.1.2 → devspec-0.2.0}/devspec/work-items/_template/finalize.md +14 -11
  67. {devspec-0.1.2 → devspec-0.2.0}/devspec/work-items/_template/implement.md +7 -4
  68. {devspec-0.1.2 → devspec-0.2.0}/devspec/work-items/_template/meta.md +5 -2
  69. {devspec-0.1.2 → devspec-0.2.0}/devspec/work-items/_template/review.md +8 -3
  70. {devspec-0.1.2 → devspec-0.2.0}/devspec/work-items/_template/story.md +17 -6
  71. {devspec-0.1.2 → devspec-0.2.0}/devspec/work-items/_template/tasks.md +9 -6
  72. devspec-0.2.0/docs/assets/command-flow-existing-repository.svg +62 -0
  73. devspec-0.2.0/docs/assets/command-flow-new-repository.svg +56 -0
  74. devspec-0.2.0/docs/assets/command-flow-work-item-lifecycle.svg +81 -0
  75. devspec-0.2.0/docs/assets/command-flow-work-item-selection.svg +41 -0
  76. {devspec-0.1.2 → devspec-0.2.0}/docs/how-to/README.md +189 -39
  77. {devspec-0.1.2 → devspec-0.2.0}/docs/how-to/setup/README.md +9 -5
  78. {devspec-0.1.2 → devspec-0.2.0}/docs/how-to/setup/homebrew.md +66 -21
  79. devspec-0.2.0/docs/how-to/setup/manual-copy.md +93 -0
  80. {devspec-0.1.2 → devspec-0.2.0}/docs/how-to/setup/uv.md +82 -10
  81. {devspec-0.1.2 → devspec-0.2.0}/docs/how-to/setup/winget.md +73 -21
  82. {devspec-0.1.2 → devspec-0.2.0}/packaging/homebrew/devspec.rb +6 -6
  83. {devspec-0.1.2 → devspec-0.2.0}/packaging/homebrew/tap/Formula/devspec.rb +6 -6
  84. devspec-0.2.0/packaging/winget/manifests/s/SpecLabs/Devspec/0.1.3/SpecLabs.Devspec.installer.yaml +12 -0
  85. devspec-0.2.0/packaging/winget/manifests/s/SpecLabs/Devspec/0.1.3/SpecLabs.Devspec.locale.en-US.yaml +22 -0
  86. devspec-0.2.0/packaging/winget/manifests/s/SpecLabs/Devspec/0.1.3/SpecLabs.Devspec.yaml +6 -0
  87. devspec-0.2.0/packaging/winget/manifests/s/SpecLabs/Devspec/0.2.0/SpecLabs.Devspec.installer.yaml +12 -0
  88. devspec-0.2.0/packaging/winget/manifests/s/SpecLabs/Devspec/0.2.0/SpecLabs.Devspec.locale.en-US.yaml +21 -0
  89. devspec-0.2.0/packaging/winget/manifests/s/SpecLabs/Devspec/0.2.0/SpecLabs.Devspec.yaml +6 -0
  90. {devspec-0.1.2 → devspec-0.2.0}/pyproject.toml +10 -5
  91. {devspec-0.1.2 → devspec-0.2.0}/src/devspec_installer/__init__.py +1 -1
  92. {devspec-0.1.2 → devspec-0.2.0}/src/devspec_installer/cli.py +4 -0
  93. {devspec-0.1.2 → devspec-0.2.0}/tests/test_cli.py +68 -6
  94. devspec-0.1.2/.agents/skills/devspec-diagram.md +0 -16
  95. devspec-0.1.2/.github/prompts/devspec.extract.prompt.md +0 -11
  96. devspec-0.1.2/.github/prompts/devspec.story.prompt.md +0 -11
  97. devspec-0.1.2/.github/workflows/homebrew-package-publish.yml +0 -54
  98. devspec-0.1.2/.github/workflows/python-package-ci.yml +0 -42
  99. devspec-0.1.2/.github/workflows/python-package-publish.yml +0 -69
  100. devspec-0.1.2/.github/workflows/winget-package-publish.yml +0 -111
  101. devspec-0.1.2/README.md +0 -301
  102. devspec-0.1.2/devspec/architecture/_template/architecture-diagram.svg +0 -165
  103. devspec-0.1.2/devspec/architecture/_template/process-flow-diagram.svg +0 -269
  104. devspec-0.1.2/devspec/work-items/_template/diagrams.md +0 -47
  105. devspec-0.1.2/docs/how-to/setup/manual-copy.md +0 -153
  106. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-clarify.md +0 -0
  107. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-codebase-structure.md +0 -0
  108. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-coding-standards.md +0 -0
  109. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-finalize.md +0 -0
  110. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-implement.md +0 -0
  111. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-projectcontext.md +0 -0
  112. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-review.md +0 -0
  113. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-rules.md +0 -0
  114. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-story.md +0 -0
  115. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-tasks.md +0 -0
  116. {devspec-0.1.2 → devspec-0.2.0}/.agents/skills/devspec-techstack.md +0 -0
  117. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-clarify/SKILL.md +0 -0
  118. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-codebase-structure/SKILL.md +0 -0
  119. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-coding-standards/SKILL.md +0 -0
  120. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-finalize/SKILL.md +0 -0
  121. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-implement/SKILL.md +0 -0
  122. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-projectcontext/SKILL.md +0 -0
  123. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-review/SKILL.md +0 -0
  124. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-rules/SKILL.md +0 -0
  125. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-story/SKILL.md +0 -0
  126. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-tasks/SKILL.md +0 -0
  127. {devspec-0.1.2 → devspec-0.2.0}/.claude/skills/devspec-techstack/SKILL.md +0 -0
  128. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/clarify.toml +0 -0
  129. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/codebase-structure.toml +0 -0
  130. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/coding-standards.toml +0 -0
  131. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/finalize.toml +0 -0
  132. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/implement.toml +0 -0
  133. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/projectcontext.toml +0 -0
  134. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/review.toml +0 -0
  135. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/rules.toml +0 -0
  136. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/story.toml +0 -0
  137. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/tasks.toml +0 -0
  138. {devspec-0.1.2 → devspec-0.2.0}/.gemini/commands/devspec/techstack.toml +0 -0
  139. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.codebase-structure.agent.md +0 -0
  140. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.coding-standards.agent.md +0 -0
  141. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.projectcontext.agent.md +0 -0
  142. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.rules.agent.md +0 -0
  143. {devspec-0.1.2 → devspec-0.2.0}/.github/agents/devspec.techstack.agent.md +0 -0
  144. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.codebase-structure.prompt.md +0 -0
  145. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.coding-standards.prompt.md +0 -0
  146. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.projectcontext.prompt.md +0 -0
  147. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.rules.prompt.md +0 -0
  148. {devspec-0.1.2 → devspec-0.2.0}/.github/prompts/devspec.techstack.prompt.md +0 -0
  149. {devspec-0.1.2 → devspec-0.2.0}/.github/skills/exploration-recovery/SKILL.md +0 -0
  150. {devspec-0.1.2 → devspec-0.2.0}/.gitignore +0 -0
  151. {devspec-0.1.2 → devspec-0.2.0}/LICENSE +0 -0
  152. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/README.md +0 -0
  153. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/codex-skills/devspec-workflow/SKILL.md +0 -0
  154. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/compatibility-matrix.md +0 -0
  155. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/copilot.md +0 -0
  156. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/cursor.md +0 -0
  157. {devspec-0.1.2 → devspec-0.2.0}/devspec/adapters/enterprise-governance.md +0 -0
  158. {devspec-0.1.2 → devspec-0.2.0}/devspec/architecture/_template/decision.md +0 -0
  159. {devspec-0.1.2 → devspec-0.2.0}/devspec/constitution.md +0 -0
  160. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/_template/codebase-structure.md +0 -0
  161. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/_template/coding-standards.md +0 -0
  162. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/_template/discovery-exclusions.md +0 -0
  163. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/_template/exploration-state.md +0 -0
  164. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/_template/project-context.md +0 -0
  165. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/_template/rules.md +0 -0
  166. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/_template/tech-stack.md +0 -0
  167. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/codebase-structure.md +0 -0
  168. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/coding-standards.md +0 -0
  169. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/discovery-exclusions.md +0 -0
  170. {devspec-0.1.2/devspec/foundation/_template → devspec-0.2.0/devspec/foundation}/extraction-state.md +0 -0
  171. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/project-context.md +0 -0
  172. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/rules.md +0 -0
  173. {devspec-0.1.2 → devspec-0.2.0}/devspec/foundation/tech-stack.md +0 -0
  174. {devspec-0.1.2 → devspec-0.2.0}/devspec/work-items/_template/decisions.md +0 -0
  175. {devspec-0.1.2 → devspec-0.2.0}/devspec/work-items/_template/notes.md +0 -0
  176. {devspec-0.1.2 → devspec-0.2.0}/packaging/devspec-profiles.json +0 -0
  177. {devspec-0.1.2 → devspec-0.2.0}/packaging/homebrew/tap/README.md +0 -0
  178. {devspec-0.1.2 → devspec-0.2.0}/packaging/winget/manifests/s/SpecLabs/Devspec/0.1.1/SpecLabs.Devspec.installer.yaml +0 -0
  179. {devspec-0.1.2 → devspec-0.2.0}/packaging/winget/manifests/s/SpecLabs/Devspec/0.1.1/SpecLabs.Devspec.locale.en-US.yaml +0 -0
  180. {devspec-0.1.2 → devspec-0.2.0}/packaging/winget/manifests/s/SpecLabs/Devspec/0.1.1/SpecLabs.Devspec.yaml +0 -0
  181. {devspec-0.1.2 → devspec-0.2.0}/packaging/winget/manifests/s/SpecLabs/Devspec/0.1.2/SpecLabs.Devspec.installer.yaml +0 -0
  182. {devspec-0.1.2 → devspec-0.2.0}/packaging/winget/manifests/s/SpecLabs/Devspec/0.1.2/SpecLabs.Devspec.locale.en-US.yaml +0 -0
  183. {devspec-0.1.2 → devspec-0.2.0}/packaging/winget/manifests/s/SpecLabs/Devspec/0.1.2/SpecLabs.Devspec.yaml +0 -0
  184. {devspec-0.1.2 → devspec-0.2.0}/scripts/test-local-install.ps1 +0 -0
  185. {devspec-0.1.2 → devspec-0.2.0}/scripts/test-local-install.sh +0 -0
  186. {devspec-0.1.2 → devspec-0.2.0}/src/devspec_installer/__main__.py +0 -0
@@ -13,12 +13,12 @@ Follow these rules:
13
13
  - Preserve the original intent of the canonical Copilot prompt and agent files named in the registry.
14
14
  - Use Git-tracked `devspec/` artifacts for recovery before relying on chat history, Antigravity artifacts, memory, or task lists.
15
15
  - Preserve required inputs, output artifacts, status values, gates, handoff order, and recovery behavior.
16
- - Preserve structured question behavior from `.github/prompts/PATTERNS.md#interactive-question-pattern`; if clickable options are unavailable, render the same option labels as text and preserve the recommended option.
16
+ - Preserve structured question behavior from `.github/prompts/PATTERNS.md#interactive-question-pattern`: show interactive multiple-choice options when Antigravity can render them, otherwise render the identical options as text; include an example for every option and `Custom Answer`; ask one question at a time; and preserve the recommendation with its justification.
17
17
  - Use `devspec/glossary.md` for status values.
18
18
  - Use `devspec/foundation/codebase-structure.md` for repository access requirements.
19
19
  - Keep product context in `devspec/foundation/project-context.md`, durable principles in `devspec/constitution.md`, and operational governance, compliance rules, enforcement details, and delivery gates in `devspec/foundation/rules.md`.
20
20
  - Use `devspec/adapters/validation-flows.md` for enterprise acceptance checks.
21
- - For `/devspec.diagram`, keep Mermaid as the default output and treat `format=svg` or `format=mermaid+svg` as canonical command input, not a separate workflow.
21
+ - For `/devspec.diagram`, keep SVG as the default output and treat any non-duplicated `format=` combination of `svg`, `html`, and `mermaid` as canonical command input. Example: `format=svg`, `format=html`, `format=mermaid`, `format=svg+html`, `format=svg+mermaid`, `format=svg+html+mermaid`, `format=html+mermaid`.
22
22
  - Keep provider credentials, tokens, user settings, and secrets outside prompt, rule, skill, and artifact files.
23
23
  - Record unsupported Antigravity behavior as a limitation instead of changing workflow semantics.
24
24
 
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: devspec-changerequest
3
+ description: Run /devspec.changerequest using the canonical devspec command registry and Copilot reference contract.
4
+ ---
5
+
6
+ Execute canonical command `/devspec.changerequest`.
7
+
8
+ - Read `devspec/adapters/command-registry.md` for the command contract.
9
+ - Read `.github/prompts/devspec.changerequest.prompt.md` and `.github/agents/devspec.changerequest.agent.md` as the source of intent.
10
+ - Preserve required inputs, artifact outputs, status values, gates, handoff order, and recovery behavior.
11
+ - Use Git-tracked `devspec/` artifacts for recovery before relying on chat history or Antigravity artifacts.
12
+ - Append accepted `CR-###` scope to existing work-item artifacts; do not create a CR-specific Markdown file or rewrite baseline history.
13
+ - Treat unsupported Antigravity behavior as an adapter limitation, not a workflow change.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: devspec-diagram
3
+ description: Run /devspec.diagram using the canonical devspec command registry and Copilot reference contract.
4
+ ---
5
+
6
+ Execute canonical command `/devspec.diagram`.
7
+
8
+ - Read `devspec/adapters/command-registry.md` for the command contract.
9
+ - Read `.github/prompts/devspec.diagram.prompt.md` and `.github/agents/devspec.diagram.agent.md` as the source of intent.
10
+ - Preserve SVG as the default output. Pass through any non-duplicated `format=` combination of `svg`, `html`, and `mermaid`; examples include `format=svg`, `format=html`, `format=mermaid`, `format=svg+html`, `format=svg+mermaid`, `format=svg+html+mermaid`, and `format=html+mermaid`.
11
+ - For SVG output, select the matching template from `.github/prompts/PATTERNS.md#svg-output-pattern`, including architecture, process-flow, sequence, state/lifecycle, domain-model, journey-map, timeline-plan, quadrant-analysis, and mindmap templates. Durable targets stay under `devspec/architecture/images/`, and validation follows `.github/prompts/PATTERNS.md#svg-output-pattern`.
12
+ - Keep every generated SVG and HTML diagram on the shared dark architecture-style visual contract from `.github/prompts/PATTERNS.md#svg-output-pattern`, including custom smaller SVGs. Do not produce white/default/simple diagram styling unless the user explicitly requests a light or custom theme.
13
+ - Preserve required inputs, output artifacts, status values, gates, handoff order, and recovery behavior.
14
+ - Use Git-tracked `devspec/` artifacts for recovery before relying on chat history or Antigravity artifacts.
15
+ - Treat unsupported Antigravity behavior as an adapter limitation, not a workflow change.
16
+
17
+ Command input comes from the user's current message.
@@ -8,7 +8,7 @@ Execute canonical command `/devspec.extract`.
8
8
  - Read `devspec/adapters/command-registry.md` for the command contract.
9
9
  - Read `.github/prompts/devspec.extract.prompt.md` and `.github/agents/devspec.extract.agent.md` as the source of intent.
10
10
  - Treat constitution changes as confirmation-gated candidates; route operational governance, compliance procedures, enforcement details, and delivery gates to `devspec/foundation/rules.md`.
11
- - Preserve `format=svg` and `format=mermaid+svg` as diagram generation preferences in queue notes; extraction remains queue-first and may generate at most one approved diagram artifact set only after the canonical approval gate.
11
+ - Preserve any non-duplicated diagram `format=` combination of `svg`, `html`, and `mermaid` in queue notes; extraction remains queue-first and may generate at most one approved diagram artifact set only after the canonical approval gate.
12
12
  - Preserve required inputs, output artifacts, status values, gates, handoff order, and recovery behavior.
13
13
  - Use Git-tracked `devspec/` artifacts for recovery before relying on chat history or Antigravity artifacts.
14
14
  - Treat unsupported Antigravity behavior as an adapter limitation, not a workflow change.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: devspec-changerequest
3
+ description: Run /devspec.changerequest using the canonical devspec command registry. Records one missed related requirement for a finalized work item without rewriting baseline history.
4
+ ---
5
+
6
+ Execute canonical command `/devspec.changerequest`.
7
+
8
+ 1. Read `AGENTS.md` for canonical workflow, no-intent-drift, cross-tool recovery, and structured question rules.
9
+ 2. Read `devspec/adapters/command-registry.md` for this command's required input, outputs, mutation level, and next handoff.
10
+ 3. Read `.github/prompts/devspec.changerequest.prompt.md` and `.github/agents/devspec.changerequest.agent.md` as the authoritative source of command intent and behavior.
11
+ 4. Apply `.github/prompts/PATTERNS.md` for shared behavior: interactive questions, prerequisite validation, session recovery, and output closure.
12
+ 5. Preserve baseline rows and prior evidence; append accepted `CR-###` scope only to existing work-item artifacts.
13
+
14
+ Command input comes from the user's current message.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: devspec-diagram
3
- description: Run /devspec.diagram using the canonical devspec command registry. Generates evidence-backed diagrams, defaulting to Mermaid with opt-in SVG output, for architecture, workflows, journeys, sequences, states, timelines, and planning views. Supports mono-repo and multi-repo workspaces. Works across GitHub Copilot, Claude Code, OpenAI Codex, Cursor, and other AI agents.
3
+ description: Run /devspec.diagram using the canonical devspec command registry. Generates evidence-backed diagrams, defaulting to SVG with optional Mermaid and HTML output, for architecture, workflows, journeys, sequences, states, timelines, and planning views. Supports mono-repo and multi-repo workspaces. Works across GitHub Copilot, Claude Code, OpenAI Codex, Cursor, and other AI agents.
4
4
  ---
5
5
 
6
6
  Execute canonical command `/devspec.diagram`.
@@ -9,7 +9,7 @@ Execute canonical command `/devspec.diagram`.
9
9
  2. Read `devspec/adapters/command-registry.md` for this command's required input, outputs, mutation level, and next handoff.
10
10
  3. Read `.github/prompts/devspec.diagram.prompt.md` and `.github/agents/devspec.diagram.agent.md` as the authoritative source of command intent and behavior.
11
11
  4. Apply `.github/prompts/PATTERNS.md` for shared behavior: interactive questions, prerequisite validation, session recovery, discovery exclusions, and output closure, including `PATTERNS.md#diagram-extraction-consistency-pattern`, `PATTERNS.md#svg-output-pattern`, `PATTERNS.md#mermaid-internal-naming-and-readability-pattern`, `PATTERNS.md#mermaid-visual-quality-pattern`, `PATTERNS.md#process-flow-extraction-pattern`, and `PATTERNS.md#excluded-diagram-families`.
12
- 5. Treat Mermaid as the default output. Pass through `format=svg` for SVG-only output and `format=mermaid+svg` for both Mermaid and SVG; unsupported `format=` values require clarification.
12
+ 5. Treat SVG as the default output. Pass through any non-duplicated `format=` combination of `svg`, `html`, and `mermaid`; examples include `format=svg`, `format=html`, `format=mermaid`, `format=svg+html`, `format=svg+mermaid`, `format=svg+html+mermaid`, and `format=html+mermaid`. Unsupported or duplicated `format=` values require clarification.
13
13
  6. For every generated Mermaid `flowchart` or `stateDiagram-v2`: open with the dark theme init block, declare the semantic `classDef` palette for roles present, use role-appropriate node shapes, wrap boundaries of 3+ nodes in named `subgraph` blocks, draw cross-subgraph arrows after all `end` keywords, assign `classDef` classes in a batch block at the end, and verify node count stays within complexity guardrails. Never use an excluded family such as `architecture-beta`; substitute the documented portable alternative.
14
14
  7. For SVG output, use `devspec/architecture/_template/process-flow-diagram.svg` for process-flow rows or explicit process-flow SVG requests, otherwise use `devspec/architecture/_template/architecture-diagram.svg`. Write durable images under `devspec/architecture/images/`, and validate generated SVG as standalone XML with no scripts, iframes, foreignObject, external assets, secrets, or unresolved placeholders.
15
15
  8. Honor multi-repo boundaries: when `devspec/foundation/codebase-structure.md` records multiple repositories, scope diagram evidence to the correct repository boundary.
@@ -9,7 +9,7 @@ Execute canonical command `/devspec.extract`.
9
9
  2. Read `devspec/adapters/command-registry.md` for this command's required input, outputs, mutation level, and next handoff.
10
10
  3. Read `.github/prompts/devspec.extract.prompt.md` and `.github/agents/devspec.extract.agent.md` as the authoritative source of command intent and behavior.
11
11
  4. Apply `.github/prompts/PATTERNS.md` for shared behavior: interactive questions, prerequisite validation, session recovery, output closure, and specifically `PATTERNS.md#discovery-exclusion-pattern`, `PATTERNS.md#diagram-extraction-consistency-pattern`, `PATTERNS.md#svg-output-pattern`, and `PATTERNS.md#process-flow-extraction-pattern`. Do not queue diagram families listed in `PATTERNS.md#excluded-diagram-families` (such as `architecture-beta`) when seeding `devspec/architecture/artifact-queue.md`; use the documented portable alternative instead.
12
- 5. Preserve `format=svg` and `format=mermaid+svg` as diagram generation preferences in queue notes. Extraction remains queue-first and may generate at most one approved diagram artifact set only after the canonical approval gate.
12
+ 5. Preserve any non-duplicated diagram `format=` combination of `svg`, `html`, and `mermaid` in queue notes. Extraction remains queue-first and may generate at most one approved diagram artifact set only after the canonical approval gate.
13
13
  6. For multi-repo extraction: process each repository source in sequence, apply discovery exclusions from `devspec/foundation/discovery-exclusions.md`, record per-repo evidence and status in `devspec/foundation/extraction-state.md`, and seed diagram candidates per-repo in `devspec/architecture/artifact-queue.md`.
14
14
 
15
15
  Command input comes from the user's current message.
@@ -18,7 +18,7 @@ Follow these rules:
18
18
  - Use `devspec/glossary.md` for status values.
19
19
  - Use `devspec/foundation/codebase-structure.md` for repository access requirements.
20
20
  - Use `devspec/adapters/validation-flows.md` for enterprise acceptance checks.
21
- - For `/devspec.diagram`, keep Mermaid as the default output and treat `format=svg` or `format=mermaid+svg` as canonical command input, not a separate workflow.
21
+ - For `/devspec.diagram`, keep SVG as the default output and treat any non-duplicated `format=` combination of `svg`, `html`, and `mermaid` as canonical command input. Example: `format=svg`, `format=html`, `format=mermaid`, `format=svg+html`, `format=svg+mermaid`, `format=svg+html+mermaid`, `format=html+mermaid`.
22
22
  - Record unsupported platform behavior as a limitation instead of changing workflow semantics.
23
23
 
24
24
  Do not recommend unregistered commands such as `/devspec.plan`, `/devspec.architecture`, `/devspec.provider-integrations`, `/devspec.queue`, or `/devspec.decisions`.
@@ -0,0 +1,13 @@
1
+ description = "Run canonical /devspec.changerequest from Gemini CLI."
2
+ prompt = """
3
+ Execute canonical command `/devspec.changerequest`.
4
+
5
+ Before acting:
6
+ 1. Read `devspec/adapters/command-registry.md` and use the `/devspec.changerequest` row as the command contract.
7
+ 2. Read `.github/prompts/devspec.changerequest.prompt.md` and `.github/agents/devspec.changerequest.agent.md` as the protected source of intent.
8
+ 3. Follow `.github/prompts/PATTERNS.md` for shared workflow, recovery, output, and recommendation behavior.
9
+ 4. Recover from existing Git-tracked `devspec/` artifacts before relying on Gemini session memory.
10
+ 5. Preserve baseline history and append accepted `CR-###` scope only to existing work-item artifacts.
11
+ 6. Treat Gemini-specific command syntax as platform mechanics, not a workflow change.
12
+
13
+ The user's raw command input, if any, is appended below these instructions by Gemini CLI.
@@ -8,7 +8,7 @@ Before acting:
8
8
  3. Follow `.github/prompts/PATTERNS.md` for shared workflow, recovery, output, discovery, and recommendation behavior.
9
9
  4. Recover from existing Git-tracked `devspec/` artifacts before relying on Gemini session memory.
10
10
  5. Preserve required inputs, output artifacts, status values, gates, handoff order, and recovery behavior.
11
- 6. Preserve Mermaid as the default output, pass through `format=svg` for SVG-only output, and pass through `format=mermaid+svg` for both Mermaid and SVG.
11
+ 6. Preserve SVG as the default output. Pass through any non-duplicated `format=` combination of `svg`, `html`, and `mermaid`; examples include `format=svg`, `format=html`, `format=mermaid`, `format=svg+html`, `format=svg+mermaid`, `format=svg+html+mermaid`, and `format=html+mermaid`.
12
12
  7. For SVG output, use `devspec/architecture/_template/process-flow-diagram.svg` for process-flow rows or explicit process-flow SVG requests, otherwise use `devspec/architecture/_template/architecture-diagram.svg`. Durable targets stay under `devspec/architecture/images/`, and validation follows `.github/prompts/PATTERNS.md#svg-output-pattern`.
13
13
  8. Treat Gemini-specific command syntax as platform mechanics, not a workflow change.
14
14
 
@@ -8,7 +8,7 @@ Before acting:
8
8
  3. Follow `.github/prompts/PATTERNS.md` for shared workflow, recovery, output, discovery, and recommendation behavior.
9
9
  4. Recover from existing Git-tracked `devspec/` artifacts before relying on Gemini session memory.
10
10
  5. Preserve required inputs, output artifacts, status values, gates, handoff order, and recovery behavior.
11
- 6. Preserve `format=svg` and `format=mermaid+svg` as diagram generation preferences in queue notes; extraction remains queue-first and may generate at most one approved diagram artifact set only after the canonical approval gate.
11
+ 6. Preserve any non-duplicated diagram `format=` combination of `svg`, `html`, and `mermaid` in queue notes; extraction remains queue-first and may generate at most one approved diagram artifact set only after the canonical approval gate.
12
12
  7. Treat Gemini-specific command syntax as platform mechanics, not a workflow change.
13
13
 
14
14
  The user's raw command input, if any, is appended below these instructions by Gemini CLI.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: "devspec.changerequest"
3
+ description: "Use to append one missed related requirement to a finalized-or-later work item as an immutable change request."
4
+ tools: [read, edit, search, vscode/askQuestions]
5
+ model: ["GPT-5.4 (copilot)", "GPT-5.3-Codex (copilot)", "Claude Sonnet 4.6 (copilot)", "Claude Haiku 4.5 (copilot)"]
6
+ user-invocable: true
7
+ agents: []
8
+ handoffs:
9
+ - label: Continue to Finalize
10
+ agent: devspec.finalize
11
+ prompt: Create or update the readiness brief for the active change request.
12
+ - label: Create Linked Work Item
13
+ agent: devspec.story
14
+ prompt: Create the independently scoped linked work item selected during change-request intake.
15
+ ---
16
+ You append one missed, related completeness addition to an existing work item without rewriting baseline history.
17
+
18
+ ## Constraints
19
+ - Follow the [Work-Item Target Pattern](../prompts/PATTERNS.md#work-item-target-pattern), [Work-Item Change Request Pattern](../prompts/PATTERNS.md#work-item-change-request-pattern), [Session Recovery Pattern](../prompts/PATTERNS.md#session-recovery-pattern), [Prerequisite Validation Pattern](../prompts/PATTERNS.md#prerequisite-validation-pattern), [Interactive Question Pattern](../prompts/PATTERNS.md#interactive-question-pattern), [Question Basis Pattern](../prompts/PATTERNS.md#question-basis-pattern), and [Output Closure Pattern](../prompts/PATTERNS.md#output-closure-pattern).
20
+ - `meta.md` and `story.md` must exist, and the work-item status must be `finalized`, `tasks-planned`, `implementing`, `implemented`, `reviewing`, or `reviewed`.
21
+ - If the baseline is not finalized, do not create a change request; route missing baseline information to `/devspec.story`, or `/devspec.clarify` when an active blocker already records the question.
22
+ - Handle exactly one related completeness addition per run: missing description, acceptance criterion, functional requirement, nonfunctional requirement, or edge case for the same intended outcome.
23
+ - Append the next `CR-###` to `story.md#change-requests` and append CR-scoped rows such as `CR-001-AC-001`, `CR-001-FR-001`, `CR-001-NFR-001`, or `CR-001-EDGE-001` to the existing story tables.
24
+ - Do not create a dedicated change-request Markdown file. Use existing `meta.md`, `story.md`, and `decisions.md`; later lifecycle stages append their CR-scoped rows to existing `finalize.md`, `tasks.md`, `implement.md`, and `review.md`.
25
+ - Do not rewrite baseline `Summary`, `Description`, `AC-*`, `FR-*`, `NFR-*`, `EDGE-*`, planning signals, completed tasks, implementation evidence, or review evidence.
26
+ - If the request appears independent or unrelated, ask one structured `selection` question with `Append to the current work item` (example: add a missing invalid-input rule for an existing form), `Create a new linked work item` (example: add notifications to an implemented profile-edit story), and `Custom Answer` (example: explain another relationship). Show exactly one recommendation with its justification. Do not append a `CR-###` when a linked item is selected.
27
+ - Update `Workflow State` in `meta.md` and `Resume State` in `story.md` before asking a target, relationship, or requirement question.
28
+ - Keep any material change-request decision in `decisions.md`; do not duplicate the intake rows there.
29
+ - Ask one structured question at a time and hand off to `/devspec.finalize` after accepting a related change request.
30
+
31
+ ## Approach
32
+ 1. Locate the existing work item and read `meta.md`, `story.md`, `decisions.md`, and downstream artifacts when present.
33
+ 2. Reconcile `Resume State` and validate that the baseline is finalized or later.
34
+ 3. Classify the submitted omission as related completeness scope or potentially independent scope.
@@ -9,6 +9,9 @@ handoffs:
9
9
  - label: Back to Work-Item Intake
10
10
  agent: devspec.story
11
11
  prompt: Revise work-item intake from this clarification.
12
+ - label: Capture Post-Baseline Change Request
13
+ agent: devspec.changerequest
14
+ prompt: Record the missed related requirement without rewriting baseline history.
12
15
  - label: Continue to Finalize
13
16
  agent: devspec.finalize
14
17
  prompt: Create or update the implementation readiness brief.
@@ -16,13 +19,14 @@ handoffs:
16
19
  You create or update `devspec/work-items/<work-item-folder>/clarify.md`.
17
20
 
18
21
  ## Constraints
19
- - Follow the [Work-Item Target Pattern](../prompts/PATTERNS.md#work-item-target-pattern), [Session Recovery Pattern](../prompts/PATTERNS.md#session-recovery-pattern), [Prerequisite Validation Pattern](../prompts/PATTERNS.md#prerequisite-validation-pattern), [Interactive Question Pattern](../prompts/PATTERNS.md#interactive-question-pattern), [Question Basis Pattern](../prompts/PATTERNS.md#question-basis-pattern), [Token Stewardship Pattern](../prompts/PATTERNS.md#token-stewardship-pattern), and [Output Closure Pattern](../prompts/PATTERNS.md#output-closure-pattern).
22
+ - Follow the [Work-Item Target Pattern](../prompts/PATTERNS.md#work-item-target-pattern), [Work-Item Change Request Pattern](../prompts/PATTERNS.md#work-item-change-request-pattern), [Session Recovery Pattern](../prompts/PATTERNS.md#session-recovery-pattern), [Prerequisite Validation Pattern](../prompts/PATTERNS.md#prerequisite-validation-pattern), [Interactive Question Pattern](../prompts/PATTERNS.md#interactive-question-pattern), [Question Basis Pattern](../prompts/PATTERNS.md#question-basis-pattern), [Token Stewardship Pattern](../prompts/PATTERNS.md#token-stewardship-pattern), and [Output Closure Pattern](../prompts/PATTERNS.md#output-closure-pattern).
20
23
  - `story.md` must exist.
21
24
  - Update `Workflow State` in `meta.md` and `Resume State` in `clarify.md` before asking or resolving a blocking question.
22
25
  - Handle one independent blocker at a time.
23
26
  - Resolve the active blocker recorded in `story.md`, `finalize.md`, user input, or existing `clarify.md`; do not run the full Readiness Gap Scan in this command.
27
+ - Do not use clarification to introduce post-baseline scope. If user input for a work item in `finalized`, `tasks-planned`, `implementing`, `implemented`, `reviewing`, or `reviewed` status changes scope instead of resolving the active blocker, record the routing reason in `clarify.md`, leave baseline intake unchanged, and hand off to `/devspec.changerequest`.
24
28
  - Preserve and apply the Question Basis Pattern for the active blocker.
25
- - For structured clarification questions, provide 2-5 meaningful and mutually exclusive options when possible, exactly one recommended option with a short reason, and `Custom Answer`.
29
+ - For structured clarification questions, show interactive multiple-choice options or the identical text fallback; provide 2-5 meaningful and mutually exclusive context-specific options plus `Custom Answer`; when no two meaningful alternatives exist, offer `Provide the missing detail` plus `Custom Answer`; give every option a brief non-binding example; and identify exactly one recommended option with a clear justification.
26
30
  - Keep active and resolved blocker records only in `Clarification Log`; at most one row may be `open`.
27
31
  - Keep handoff and next-action state in `Resume State`, not in a separate outcome section.
28
32
  - When a resolved clarification changes intake, update the matching current `story.md` section (`Summary`, `Description`, `Acceptance Criteria`, `Functional Requirements`, `Nonfunctional Requirements`, `Edge Cases`, or `Planning Signals`) and reference that section in `Clarification Log`; do not recreate retired story sections or duplicate full intake content.
@@ -32,7 +36,7 @@ You create or update `devspec/work-items/<work-item-folder>/clarify.md`.
32
36
  1. Locate the target work item.
33
37
  2. Read `meta.md` when present, `story.md`, `finalize.md` when present, and existing `clarify.md`.
34
38
  3. Reconcile `Resume State`; keep any pending user question active and preserve the source artifact for the active blocker.
35
- 4. Ask or resolve the active structured `clarification` question, then update `clarify.md` with `Resume State` and `Clarification Log`.
39
+ 4. Classify user input against the active blocker; if it introduces post-baseline scope, route to `/devspec.changerequest`, otherwise ask or resolve the active structured `clarification` question and update `clarify.md` with `Resume State` and `Clarification Log`.
36
40
  5. When a blocker is answered, update its `Clarification Log` row to `resolved`, `superseded`, or `withdrawn`, record the answer and impacted artifacts, and update any impacted upstream artifact by reference instead of duplicating full intake or finalization content.
37
41
  6. When no blocker remains open, update next action toward `/devspec.finalize` unless the recorded source artifact requires returning to `/devspec.story`.
38
42
  7. Report per Output Format.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "devspec.diagram"
3
- description: "Use to generate or update one evidence-backed diagram, defaulting to Mermaid with opt-in SVG output, for architecture, workflows, journeys, sequences, states, timelines, planning views, or stable domain structures."
3
+ description: "Use to generate or update one evidence-backed diagram, defaulting to SVG with optional Mermaid and HTML output, for architecture, workflows, journeys, sequences, states, timelines, planning views, or stable domain structures."
4
4
  tools: [read, edit, search, vscode/askQuestions]
5
5
  model: ["GPT-5.4 (copilot)", "GPT-5.3-Codex (copilot)", "Claude Sonnet 4.6 (copilot)", "Claude Haiku 4.5 (copilot)"]
6
6
  user-invocable: true
@@ -16,14 +16,18 @@ handoffs:
16
16
  You generate or update one diagram for a requested architecture, module, feature workflow, user journey, sequence, state, timeline, planning view, or stable domain subject.
17
17
 
18
18
  ## Constraints
19
- - Follow the [Prerequisite Validation Pattern](../prompts/PATTERNS.md#prerequisite-validation-pattern), [Session Recovery Pattern](../prompts/PATTERNS.md#session-recovery-pattern), [Interactive Question Pattern](../prompts/PATTERNS.md#interactive-question-pattern), [Work-Item Target Pattern](../prompts/PATTERNS.md#work-item-target-pattern), [Multi-Repo Validation Pattern](../prompts/PATTERNS.md#multi-repo-validation-pattern), [Token Stewardship Pattern](../prompts/PATTERNS.md#token-stewardship-pattern), [Discovery Exclusion Pattern](../prompts/PATTERNS.md#discovery-exclusion-pattern), [Diagram Extraction Consistency Pattern](../prompts/PATTERNS.md#diagram-extraction-consistency-pattern), [SVG Output Pattern](../prompts/PATTERNS.md#svg-output-pattern), [Mermaid Internal Naming and Readability Pattern](../prompts/PATTERNS.md#mermaid-internal-naming-and-readability-pattern), [Mermaid Visual Quality Pattern](../prompts/PATTERNS.md#mermaid-visual-quality-pattern), [Process Flow Extraction Pattern](../prompts/PATTERNS.md#process-flow-extraction-pattern), [Exploration Recovery Pattern](../prompts/PATTERNS.md#exploration-recovery-pattern), and [Output Closure Pattern](../prompts/PATTERNS.md#output-closure-pattern).
19
+ - Follow the [Prerequisite Validation Pattern](../prompts/PATTERNS.md#prerequisite-validation-pattern), [Session Recovery Pattern](../prompts/PATTERNS.md#session-recovery-pattern), [Interactive Question Pattern](../prompts/PATTERNS.md#interactive-question-pattern), [Work-Item Target Pattern](../prompts/PATTERNS.md#work-item-target-pattern), [Multi-Repo Validation Pattern](../prompts/PATTERNS.md#multi-repo-validation-pattern), [Token Stewardship Pattern](../prompts/PATTERNS.md#token-stewardship-pattern), [Discovery Exclusion Pattern](../prompts/PATTERNS.md#discovery-exclusion-pattern), [Diagram Extraction Consistency Pattern](../prompts/PATTERNS.md#diagram-extraction-consistency-pattern), [Architecture Diagram Intake Pattern](../prompts/PATTERNS.md#architecture-diagram-intake-pattern), [Diagram Family Intake Pattern](../prompts/PATTERNS.md#diagram-family-intake-pattern), [SVG Output Pattern](../prompts/PATTERNS.md#svg-output-pattern), [Mermaid Internal Naming and Readability Pattern](../prompts/PATTERNS.md#mermaid-internal-naming-and-readability-pattern), [Mermaid Visual Quality Pattern](../prompts/PATTERNS.md#mermaid-visual-quality-pattern), [Process Flow Extraction Pattern](../prompts/PATTERNS.md#process-flow-extraction-pattern), [Exploration Recovery Pattern](../prompts/PATTERNS.md#exploration-recovery-pattern), and [Output Closure Pattern](../prompts/PATTERNS.md#output-closure-pattern).
20
20
  - Required user input is mandatory.
21
21
  - Apply the Work-Item Target Pattern only when the request is explicitly work-item-specific or clearly temporary for one work item, bug, or security issue.
22
- - Generate exactly one diagram artifact set per run unless the user continues through the queue or explicitly requests process-flow batch generation. A `format=mermaid+svg` request is one artifact set with two output files.
22
+ - Generate exactly one diagram artifact set per run unless the user continues through the queue or explicitly requests process-flow batch generation.
23
23
  - Treat a clear `/devspec.diagram` request as approval to generate one diagram; ask only when target location, diagram type, scope, evidence, overwrite behavior, or queue continuation is ambiguous, using the matching `selection`, `clarification`, `approval`, or `continuation` intent.
24
24
  - Treat `/devspec.diagram Generate all process-flow diagrams` or equivalent wording as explicit batch-generation approval for eligible process-flow rows in `devspec/architecture/artifact-queue.md`.
25
- - Parse optional output format tokens before generation. Supported tokens are `format=mermaid`, `format=svg`, and `format=mermaid+svg`; default to `mermaid` when absent. Ask one structured `clarification` question for any other `format=` value.
25
+ - Parse optional output format tokens before generation. Supported `format=` values contain one or more unique output types from `svg`, `html`, and `mermaid`, joined with `+`. Example: `format=svg`, `format=html`, `format=mermaid`, `format=svg+html`, `format=svg+mermaid`, `format=svg+html+mermaid`, `format=html+mermaid`. Default to `format=svg` when absent. Ask one structured `clarification` question for unknown or duplicated output types.
26
+ - Parse structured architecture-diagram input using `PATTERNS.md#architecture-diagram-intake-pattern`; fields such as `Application/System`, `Architecture style`, `Primary goal of diagram`, `Audience`, actors, components, stores, flows, boundaries, design rules, and output format are approved diagram input for one artifact set.
27
+ - Parse structured non-architecture diagram input using `PATTERNS.md#diagram-family-intake-pattern`; fields for sequence, state/lifecycle, domain model, journey, timeline/gantt, quadrant, and mindmap diagrams are approved diagram input for one artifact set when they match the selected diagram family.
28
+ - Treat editable SVG, SVG-only output, real SVG text, "Generate as SVG", "Generate this as SVG", or "not as a raster image" as the default `format=svg` unless the user explicitly requests an output combination containing `html` or `mermaid`.
26
29
  - Do not invent architecture, user behavior, service interactions, states, or dependencies; separate observed facts from assumptions.
30
+ - When structured input says not to add components not listed, treat listed actors, components, systems, and data stores as the complete visible node set unless a confirmed durable artifact conflict requires clarification.
27
31
  - Use the naming and layout guidance in `PATTERNS.md#diagram-extraction-consistency-pattern`, including the language-neutral default catalog when the request matches a catalog subject.
28
32
  - Use `PATTERNS.md#mermaid-internal-naming-and-readability-pattern` for Mermaid node ID, node label, edge label, class, method, layout, and anti-bloat rules.
29
33
  - Apply `PATTERNS.md#mermaid-visual-quality-pattern` fully (theme init, `classDef` palette, node shapes, subgraph boundaries, and guardrails) to every generated `flowchart` and `stateDiagram-v2`; apply complexity guardrails from that pattern to all other supported families.
@@ -33,44 +37,46 @@ You generate or update one diagram for a requested architecture, module, feature
33
37
  - Keep runtime communication and compile-time project dependencies in separate diagrams; default to runtime or logical data flow unless the user explicitly requests a project dependency graph.
34
38
  - For logical architecture diagrams, exclude SDLC actors, CI/CD, build artifacts, and source-code project files; enforce sensible C4-style system boundaries and keep owned application databases inside the system boundary.
35
39
  - Avoid API, Swagger, tech stack, version, library, hosting, and framework boilerplate details in flowchart nodes unless the requested diagram specifically needs startup, request-pipeline, infrastructure-layer, or physical deployment detail.
36
- - If the user asks for "only Mermaid", apply that restriction to the Mermaid content inside `Mermaid Diagram`; still preserve required devspec artifact metadata, source evidence, assumptions, and maintenance notes in the generated artifact.
37
- - If the user requests `format=svg`, create or update the Markdown diagram artifact for metadata, evidence, assumptions, maintenance notes, queue linkage, and SVG target reference, but omit the Mermaid block content. Create the SVG under `devspec/architecture/images/dia-NNN-<diagram-name>.svg` for durable diagrams or `devspec/work-items/<work-item-folder>/images/<diagram-name>.svg` for temporary work-item diagrams.
38
- - If the user requests `format=mermaid+svg`, create or update both the Markdown Mermaid diagram artifact and the SVG image file.
39
- - For SVG output, use `../../devspec/architecture/_template/process-flow-diagram.svg` when the request is explicitly a process-flow SVG or the matched queue row has `process-flow`, `business-process`, `user-journey`, `lifecycle-flow`, or `hybrid-user-to-data-operational-flow` tags. Use `../../devspec/architecture/_template/architecture-diagram.svg` for all other architecture, component, topology, dependency, domain, state, sequence companion, and general workflow SVGs.
40
+ - If the user asks for "only Mermaid", treat it as `format=mermaid` and apply that restriction to the Mermaid content inside the optional Markdown artifact.
41
+ - If the selected output set includes `svg`, create the SVG under `devspec/architecture/images/dia-NNN-<diagram-name>.svg` for durable diagrams or `devspec/work-items/<work-item-folder>/images/<diagram-name>.svg` for temporary work-item diagrams.
42
+ - If the selected output set includes `mermaid`, create or update the optional Mermaid Markdown diagram artifact for metadata, evidence, assumptions, maintenance notes, queue linkage, and Mermaid content.
43
+ - If the selected output set includes `html`, create or update the optional standalone HTML file under `devspec/architecture/html/dia-NNN-<diagram-name>.html` for durable diagrams or `devspec/work-items/<work-item-folder>/html/<diagram-name>.html` for temporary work-item diagrams.
44
+ - All generated SVG and HTML diagram visuals must follow the shared dark architecture-style visual contract from `PATTERNS.md#svg-output-pattern`: dark slate page, framed surface, subtle grid or dividers, monospace typography, semantic neon role colors, real text labels, arrows behind nodes, compact legends, and no white/default/simple styling unless the user explicitly requests a light or custom theme.
45
+ - For SVG output, select the template from `PATTERNS.md#svg-output-pattern`: `architecture-diagram.svg`, `process-flow-diagram.svg`, `sequence-diagram.svg`, `state-lifecycle-diagram.svg`, `domain-model-diagram.svg`, `journey-map-diagram.svg`, `timeline-plan-diagram.svg`, `quadrant-analysis-diagram.svg`, or `mindmap-diagram.svg`, using the most specific matching queue tags, explicit request, or diagram family.
40
46
  - Keep queue `Diagram type` as the logical diagram family. Choose the full Mermaid declaration for generated Mermaid content from queue notes, catalog guidance, or evidence, such as `flowchart LR`, `flowchart TD`, `flowchart BT`, `sequenceDiagram`, `stateDiagram-v2`, `erDiagram`, `gantt`, `quadrantChart`, `mindmap`, or `timeline`.
41
47
  - Prefer `flowchart LR` for relationship maps, dependency graphs, event flows, and pipelines; `flowchart TD` for context, topology, hierarchy, data movement, and risk grouping; `sequenceDiagram` for interactions over time; `journey` for user-facing flows; `stateDiagram-v2` for lifecycle behavior; `classDiagram` for stable domain or structural relationships; `erDiagram` for entity relationship models; `gantt` for sprint plans and release schedules; `timeline` for historical milestones and event sequences; `quadrantChart` for 2D priority or risk scoring; and `mindmap` for exploratory domain brainstorming when formal structure is not yet available.
42
48
  - Reuse matching queue metadata for subject, scope, diagram type, target location, evidence, and confidence instead of reclassifying from scratch unless the queued row is stale, contradicted, or incomplete.
43
- - Store stable system, module, feature workflow, user journey, sequence, state, class/domain, process-flow, and cross-feature diagrams under `devspec/architecture/diagrams/dia-NNN-<diagram-name>.md` by default.
49
+ - Store stable system, module, feature workflow, user journey, sequence, state, class/domain, process-flow, and cross-feature diagrams under `devspec/architecture/images/dia-NNN-<diagram-name>.svg` by default. Store optional Mermaid Markdown companions under `devspec/architecture/diagrams/dia-NNN-<diagram-name>.md` and optional HTML companions under `devspec/architecture/html/dia-NNN-<diagram-name>.html`.
44
50
  - Store work-item diagrams only for explicit requests or clearly temporary bug reproduction, migration path, security incident or threat flow, implementation plan, or experiment flows that should not become durable architecture.
45
51
  - Keep `devspec/architecture/overview.md` limited to architecture context, diagram references, decision references, and architecture gaps or blockers.
46
52
  - Use `devspec/architecture/artifact-queue.md` as the resumable diagram queue.
47
53
  - For durable diagram files, write status only to `devspec/architecture/artifact-queue.md`; do not mirror queue status in the generated diagram file.
48
- - For work-item `diagrams.md`, do not maintain a separate diagram index or status; write temporary work-item-specific diagram content under `Diagram Content` and keep diagram status from `devspec/glossary.md#artifact-status-values` in `devspec/architecture/artifact-queue.md`.
54
+ - For work-item diagrams, do not maintain a separate diagram index or status; write temporary SVG output under `images/`, optional Mermaid Markdown content under `Diagram Content`, optional HTML under `html/`, and keep diagram status from `devspec/glossary.md#artifact-status-values` in `devspec/architecture/artifact-queue.md`.
49
55
  - Update `Resume State` in the target diagram artifact, and `Workflow State` in `meta.md` only for work-item diagrams.
50
56
  - Update queue rows before asking for `confirmation`, `approval`, or `continuation`, after generation, or when evidence is missing.
51
- - For process-flow batch generation, select only rows where `Tags` includes `process-flow`, status is `proposed` or `confirmed`, confidence is `observed` or `high-confidence`, target location matches `devspec/architecture/diagrams/dia-NNN-<diagram-name>.md`, any recorded output format is valid, and `Next action or notes` records that duplicate check passed.
57
+ - For process-flow batch generation, select only rows where `Tags` includes `process-flow`, status is `proposed` or `confirmed`, confidence is `observed` or `high-confidence`, target location matches `devspec/architecture/images/dia-NNN-<diagram-name>.svg` unless a non-SVG output set is explicitly requested, any recorded output format is valid, and `Next action or notes` records that duplicate check passed.
52
58
  - Generate process-flow batch rows in `DIA-*` order, never renumber existing rows, mark generated rows `generated`, and leave low-confidence, blocked, ambiguous, or duplicate rows queued with notes.
53
59
  - Ensure generated process-flow diagrams are end-to-end business or operational flows, not module call graphs. The hybrid user-to-data operational flow must include user entry points, application boundaries, services, data stores, validations, operational states, and outcomes without becoming a pure infrastructure or database diagram.
54
60
  - For process-flow SVGs, keep the happy path visually obvious, use distinct roles for start/end, manual, automated, integration, decision, exception, and artifact steps, draw exception paths as labeled dashed rose arrows, label loop-backs or rework paths, and avoid dangling branches.
55
- - Before writing, check `devspec/architecture/diagrams/*.md`, `devspec/architecture/images/*.svg`, `devspec/architecture/overview.md`, `devspec/architecture/artifact-queue.md`, and relevant work-item `diagrams.md` and `images/*.svg` files for equivalent diagrams.
56
- - Use `../../devspec/architecture/_template/diagram.md` for detailed architecture diagrams and `../../devspec/work-items/_template/diagrams.md` only for explicit or temporary work-item diagrams.
57
- - Use the selected SVG template from `../../devspec/architecture/_template/architecture-diagram.svg` or `../../devspec/architecture/_template/process-flow-diagram.svg` as the starting point unless a documented constraint requires a smaller custom SVG.
61
+ - Before writing, check `devspec/architecture/images/*.svg`, `devspec/architecture/diagrams/*.md`, `devspec/architecture/html/*.html`, `devspec/architecture/overview.md`, `devspec/architecture/artifact-queue.md`, and relevant work-item `images/*.svg`, `diagrams.md`, and `html/*.html` files for equivalent diagrams.
62
+ - Use `../../devspec/architecture/_template/diagram.md` only when the selected output set includes `mermaid` for detailed architecture diagrams, `../../devspec/architecture/_template/diagram.html` only when the selected output set includes `html`, and `../../devspec/work-items/_template/diagrams.md` only when the selected output set includes `mermaid` for explicit or temporary work-item diagrams.
63
+ - Use the selected SVG template from `../../devspec/architecture/_template/` as the starting point unless a documented constraint requires a smaller custom SVG. A custom SVG must still preserve the shared dark visual contract.
58
64
  - Prefer existing devspec artifacts, queue rows, manifests, and targeted reads before broad search or Explore runs.
59
65
  - Never use an excluded diagram family from `PATTERNS.md#excluded-diagram-families`. If the user requests `architecture-beta`, `block`, `kanban`, `radar`, `sankey`, `venn`, `packet`, `zenuml`, `gitGraph`, `pie`, or `xychart-beta`, explain why it is excluded and offer the portable alternative in one sentence before proceeding with the alternative.
60
66
 
61
67
  ## Approach
62
- 1. Parse the requested subject, scope, audience, and diagram type.
68
+ 1. Parse the requested subject, scope, audience, diagram type, and any structured architecture or diagram-family intake fields.
63
69
  2. Read relevant architecture, foundation, queue, and work-item artifacts only when referenced.
64
70
  3. Reconcile `Resume State`, existing queue rows, discovery exclusions, and optional exploration state.
65
71
  4. Match the request to an existing queue row when possible, then reuse its scope, diagram type, subject, target location, evidence, and confidence.
66
72
  5. Classify scope as `architecture`, `module`, `feature`, `workflow`, `user-journey`, or `work-item` only when no usable queue row exists.
67
- 6. Select the output format, diagram type, and Mermaid declaration when Mermaid output is selected, or ask one structured `selection` question when the format, diagram type, declaration, or target location is ambiguous.
73
+ 6. Select the output format, diagram type, and Mermaid declaration when the selected output set includes `mermaid`, defaulting to `format=svg`, or ask one structured `selection` question when the format, diagram type, declaration, or target location is ambiguous.
68
74
  7. Gather evidence with targeted reads, search, or Explore.
69
75
  8. Check for an equivalent existing diagram before adding a queue row or writing output.
70
76
  9. Add or update queue rows with scope, diagram type, subject, target location, evidence, confidence, status, tags, and next action or notes that include the duplicate-check result.
71
77
  10. If the user requested process-flow batch generation, filter eligible process-flow rows and generate them in `DIA-*` order.
72
78
  11. Otherwise, ask one structured `clarification`, `approval`, or `continuation` question for clarification, overwrite approval, or queue continuation when needed.
73
- 12. Generate selected output: for Mermaid, follow the Mermaid internal naming and visual quality rules; for SVG, follow the SVG Output Pattern, use the SVG template, avoid external assets and forbidden elements, and validate the file as XML before reporting success. Then write `Diagram Metadata`, selected diagram sections, `Source Evidence and Assumptions`, and any `Maintenance Notes` to the Markdown target, write the SVG target when selected, add or update the `overview.md` `Diagram Reference Index` row when the diagram is durable, mark generated queue rows `generated`, `skipped`, or `blocked`, and report per Output Format.
79
+ 12. Generate selected output: for SVG, follow the SVG Output Pattern, use the SVG template, avoid external assets and forbidden elements, and validate the file as XML before reporting success; for Mermaid output, create the optional Markdown artifact and follow Mermaid internal naming and visual quality rules; for HTML output, use the HTML template and keep it standalone and static. Then write selected output targets, add or update the `overview.md` `Diagram Reference Index` row when the diagram is durable, mark generated queue rows `generated`, `skipped`, or `blocked`, and report per Output Format.
74
80
 
75
81
  ## Output Format
76
82
  - Diagram target location
@@ -15,10 +15,10 @@ You create or refresh devspec extraction artifacts from supported repository sou
15
15
  ## Constraints
16
16
  - Follow the [Prerequisite Validation Pattern](../prompts/PATTERNS.md#prerequisite-validation-pattern), [Session Recovery Pattern](../prompts/PATTERNS.md#session-recovery-pattern), [Interactive Question Pattern](../prompts/PATTERNS.md#interactive-question-pattern), [Next Action Selection Pattern](../prompts/PATTERNS.md#next-action-selection-pattern), [Extraction State Pattern](../prompts/PATTERNS.md#extraction-state-pattern), [Explore and Memory Pattern](../prompts/PATTERNS.md#explore-and-memory-pattern), [Token Stewardship Pattern](../prompts/PATTERNS.md#token-stewardship-pattern), [Artifact Content Pattern](../prompts/PATTERNS.md#artifact-content-pattern), [Discovery Exclusion Pattern](../prompts/PATTERNS.md#discovery-exclusion-pattern), [Diagram Extraction Consistency Pattern](../prompts/PATTERNS.md#diagram-extraction-consistency-pattern), [SVG Output Pattern](../prompts/PATTERNS.md#svg-output-pattern), [Mermaid Internal Naming and Readability Pattern](../prompts/PATTERNS.md#mermaid-internal-naming-and-readability-pattern), [Mermaid Visual Quality Pattern](../prompts/PATTERNS.md#mermaid-visual-quality-pattern), [Process Flow Extraction Pattern](../prompts/PATTERNS.md#process-flow-extraction-pattern), [Exploration Recovery Pattern](../prompts/PATTERNS.md#exploration-recovery-pattern), and [Output Closure Pattern](../prompts/PATTERNS.md#output-closure-pattern).
17
17
  - Source input is optional. When source input is omitted or blank, ask one structured `selection` question before extraction using these options:
18
- - `Use current project root`: extract from the active VS Code workspace or project root where the devspec command is being run. Recommend this when the user appears to be running devspec in the target repository.
19
- - `Enter repo paths`: ask for one repository URL or local path, or named multi-repo paths such as `UI - D:\repo-ui, API - D:\repo-api`.
20
- - `Cancel extraction`: stop extraction and record no artifact changes.
21
- - `Custom Answer`: handle through the Interactive Question Pattern.
18
+ - `Use current project root`: extract from the active VS Code workspace or project root where the devspec command is being run. Example: use `D:\code\my-app` when it is the opened target repository. Recommend this when the user appears to be running devspec in the target repository.
19
+ - `Enter repo paths`: ask for one repository URL or local path, or named multi-repo paths. Example: `UI - D:\repo-ui, API - D:\repo-api`.
20
+ - `Cancel extraction`: stop extraction and record no artifact changes. Example: the user wants to gather repository paths before starting extraction.
21
+ - `Custom Answer`: accept another source instruction. Example: `Use only D:\code\api and skip the UI repository`.
22
22
  - Accept only the confirmed current project root, GitHub, Azure DevOps, or GitLab repository URLs, or local repository folder paths.
23
23
  - Treat remote inputs as repository URLs only; reject issue, pull request, merge request, work item, wiki, release, and pipeline URLs.
24
24
  - Support a single repository, a monorepo root, or multiple named related repositories.
@@ -35,23 +35,23 @@ You create or refresh devspec extraction artifacts from supported repository sou
35
35
  - Before writing a confirmed constitution change, run a lightweight impact check against `devspec/foundation/project-context.md`, `devspec/foundation/rules.md`, affected prompts, agents, templates, adapter guidance, and validation docs; record unresolved follow-ups explicitly.
36
36
  - Maintain a single active confirmation gate; do not ask constitution, process-flow candidate, diagram candidate, diagram generation, coding-standards conflict, or repository-access confirmations in the same response.
37
37
  - Confirmation priority is: source or access questions, conflicting extracted evidence, constitution principle changes, process-flow candidate approval, diagram candidate approval, then continuation or handoff.
38
- - Use `Proceed`, `Skip`, and `Custom Answer` for queue, generated artifact, retry, and workflow-continuation decisions; use `Yes`, `No`, and `Custom Answer` for binary confirmations.
38
+ - Use `Proceed`, `Skip`, and `Custom Answer` for queue, generated artifact, retry, and workflow-continuation decisions; use `Yes`, `No`, and `Custom Answer` for binary confirmations. Present every option interactively when supported, attach a contextual example including one for `Custom Answer`, and show exactly one recommendation with its justification.
39
39
  - Create or update `devspec/foundation/extraction-state.md` from `devspec/foundation/_template/extraction-state.md` when extraction starts and is not canceled.
40
40
  - Process `devspec/foundation/extraction-state.md#extraction-queue` one row at a time in ID order. Keep exactly one row `active`, and update `Resume State`, the active row, and `Blockers and Confirmations` before asking, pausing, blocking, or handing off.
41
41
  - Use `devspec/foundation/extraction-state.md` only for the extraction queue, resume state, blockers, and confirmations. Keep extracted facts in target artifacts, reusable discovery methods in `devspec/foundation/exploration-state.md`, and diagram queue state in `devspec/architecture/artifact-queue.md`.
42
42
  - Write or update `devspec/architecture/overview.md` and relevant live `devspec/foundation/` files.
43
43
  - Use `devspec/architecture/_template/*.md` and `devspec/foundation/_template/*.md` as section contracts; initialize missing live files from templates, but do not overwrite existing live files from templates.
44
- - During the `process-flows` extraction row, seed business-centric end-to-end process-flow candidates in `devspec/architecture/artifact-queue.md` when they meet the process-flow rubric and pass the equivalent-diagram check. Preserve requested output format notes when input includes `format=svg` or `format=mermaid+svg`; default remains `format=mermaid`.
44
+ - During the `process-flows` extraction row, seed business-centric end-to-end process-flow candidates in `devspec/architecture/artifact-queue.md` when they meet the process-flow rubric and pass the equivalent-diagram check. Preserve requested output format notes when input includes supported diagram format tokens; default remains `format=svg`.
45
45
  - Include process-flow rows for business workflows, user journeys, lifecycle flows, cross-service process sequences, and the default `Hybrid User-to-Data Operational Flow` when evidence supports user entry points through application boundaries, services, integrations, data stores, validations, operational states, and outcomes.
46
46
  - During the `diagram-candidates` extraction row, seed non-process-flow architecture, module, feature workflow, sequence, state, class/domain, and user-journey candidates in `devspec/architecture/artifact-queue.md` only when they meet the diagram extraction rubric and pass the equivalent-diagram check.
47
47
  - Use the language-neutral default catalog in `PATTERNS.md#default-diagram-candidate-catalog` when selecting diagram candidates. Do not create language-, framework-, vendor-, or platform-specific default subjects.
48
48
  - Treat `/devspec.extract` as queue-first discovery seeding for diagram candidates; recommend `/devspec.diagram` as the normal follow-up for generation.
49
49
  - Add queued candidates in queue order with ID, scope, diagram type, subject, target location, evidence, confidence, status, tags, and next action or notes that include the duplicate-check result.
50
- - Use sequence-preserving naming for durable diagram candidates: `DIA-001` maps to subject `dia-001-<diagram-name>`, Markdown target `devspec/architecture/diagrams/dia-001-<diagram-name>.md`, and optional SVG target `devspec/architecture/images/dia-001-<diagram-name>.svg`. Never renumber existing `DIA-*` rows or generated `dia-NNN-*` files.
50
+ - Use sequence-preserving naming for durable diagram candidates: `DIA-001` maps to subject `dia-001-<diagram-name>`, default SVG target `devspec/architecture/images/dia-001-<diagram-name>.svg`, optional Mermaid Markdown target `devspec/architecture/diagrams/dia-001-<diagram-name>.md`, and optional HTML target `devspec/architecture/html/dia-001-<diagram-name>.html`. Never renumber existing `DIA-*` rows or generated `dia-NNN-*` files.
51
51
  - Tag process-flow rows with `process-flow`, plus narrower tags such as `business-process`, `user-journey`, `lifecycle-flow`, or `hybrid-user-to-data-operational-flow` when they apply.
52
- - Keep queue `Diagram type` limited to the logical diagram family. Record suggested Mermaid declarations such as `flowchart LR`, `flowchart TD`, or `sequenceDiagram`, plus output format tokens such as `format=svg` or `format=mermaid+svg`, in `Next action or notes` when they will help `/devspec.diagram`.
53
- - When queueing process-flow or diagram candidates, record in queue notes that future Mermaid generation must follow `PATTERNS.md#mermaid-internal-naming-and-readability-pattern` and `PATTERNS.md#mermaid-visual-quality-pattern`, and future SVG generation must follow `PATTERNS.md#svg-output-pattern`. For process-flow SVG candidates, note that `/devspec.diagram` must use `devspec/architecture/_template/process-flow-diagram.svg`; for other SVG candidates, use `devspec/architecture/_template/architecture-diagram.svg`. Do not queue diagram families listed in `PATTERNS.md#excluded-diagram-families` such as `architecture-beta`, `block`, or `xychart-beta`; use the documented portable alternative instead.
54
- - Ask one structured `approval` question before generating diagrams during extraction. Generate at most one confirmed diagram artifact set only if the user explicitly continues within the extraction run, update its queue status, then stop or ask one structured `continuation` question only when no higher-priority confirmation is pending. Honor `format=svg` and `format=mermaid+svg` only after this approval.
52
+ - Keep queue `Diagram type` limited to the logical diagram family. Record suggested Mermaid declarations such as `flowchart LR`, `flowchart TD`, or `sequenceDiagram` when the output set includes `mermaid`, plus requested output format tokens such as `format=svg`, `format=html`, `format=mermaid`, `format=svg+html`, `format=svg+mermaid`, `format=svg+html+mermaid`, or `format=html+mermaid`, in `Next action or notes` when they will help `/devspec.diagram`.
53
+ - When queueing process-flow or diagram candidates, record in queue notes that future Mermaid generation must follow `PATTERNS.md#mermaid-internal-naming-and-readability-pattern` and `PATTERNS.md#mermaid-visual-quality-pattern`, and future SVG generation must select the SVG template from `PATTERNS.md#svg-output-pattern`. Do not queue diagram families listed in `PATTERNS.md#excluded-diagram-families` such as `architecture-beta`, `block`, or `xychart-beta`; use the documented portable alternative instead.
54
+ - Ask one structured `approval` question before generating diagrams during extraction. Generate at most one confirmed diagram artifact set only if the user explicitly continues within the extraction run, update its queue status, then stop or ask one structured `continuation` question only when no higher-priority confirmation is pending. Honor requested diagram output formats only after this approval.
55
55
  - On rerun, resume `devspec/architecture/artifact-queue.md` before proposing duplicate candidates; when several queue items are pending, ask only about the next unresolved row.
56
56
  - Do not create ADR files unless the user explicitly asks and the decision has clear supporting evidence. When an ADR is needed, initialize it from `devspec/architecture/_template/decision.md` and create `devspec/architecture/decisions/` on demand.
57
57
  - For multi-repo inputs, produce an architecture overview, keep per-repository provenance visible, and use supplied labels as repository names and role candidates in `codebase-structure.md`.
@@ -74,8 +74,8 @@ You create or refresh devspec extraction artifacts from supported repository sou
74
74
  6. Use `Explore` only when targeted reads and search are insufficient for the active row.
75
75
  7. Update the active target artifact with compact evidence-backed records, preserving manual content.
76
76
  8. Record blockers, confirmations, or completion in `extraction-state.md` before asking, pausing, blocking, or moving to the next row.
77
- 9. For `process-flows`, update only `devspec/architecture/artifact-queue.md`; queue eligible process-flow rows with `process-flow` tags, `dia-NNN-*` subjects, and notes covering actor or trigger, business outcome, decisions or state changes, data touchpoints, integrations, duplicate-check result, output format when specified, Mermaid declaration guidance, Mermaid internal naming guidance, and process-flow SVG template guidance when requested.
78
- 10. For `diagram-candidates`, update only `devspec/architecture/artifact-queue.md`; include output format, Mermaid internal naming guidance, and SVG output guidance when requested in queue notes, and generate diagrams only through confirmed continuation or `/devspec.diagram`.
77
+ 9. For `process-flows`, update only `devspec/architecture/artifact-queue.md`; queue eligible process-flow rows with `process-flow` tags, `dia-NNN-*` subjects, and notes covering actor or trigger, business outcome, decisions or state changes, data touchpoints, integrations, duplicate-check result, output format when specified, Mermaid declaration and internal naming guidance when the output set includes `mermaid`, and process-flow SVG template guidance when the output set includes `svg`.
78
+ 10. For `diagram-candidates`, update only `devspec/architecture/artifact-queue.md`; include output format, Mermaid internal naming guidance when the output set includes `mermaid`, SVG output guidance when the output set includes `svg`, and HTML output guidance when the output set includes `html` in queue notes, and generate diagrams only through confirmed continuation or `/devspec.diagram`.
79
79
  11. For `constitution-candidates`, ask before writing principle-level changes; after confirmation, perform the constitution amendment impact check before updating the artifact.
80
80
  12. Continue one row at a time until blocked, waiting for user input, stopped, or complete.
81
81
  13. Report per Output Format.
@@ -16,9 +16,10 @@ handoffs:
16
16
  You create or update `devspec/work-items/<work-item-folder>/finalize.md`.
17
17
 
18
18
  ## Constraints
19
- - Follow the [Work-Item Target Pattern](../prompts/PATTERNS.md#work-item-target-pattern), [Session Recovery Pattern](../prompts/PATTERNS.md#session-recovery-pattern), [Interactive Question Pattern](../prompts/PATTERNS.md#interactive-question-pattern), [Question Basis Pattern](../prompts/PATTERNS.md#question-basis-pattern), [Prerequisite Validation Pattern](../prompts/PATTERNS.md#prerequisite-validation-pattern), [Readiness Gap Scan Pattern](../prompts/PATTERNS.md#readiness-gap-scan-pattern), [Explore and Memory Pattern](../prompts/PATTERNS.md#explore-and-memory-pattern), [Multi-Repo Validation Pattern](../prompts/PATTERNS.md#multi-repo-validation-pattern), [Token Stewardship Pattern](../prompts/PATTERNS.md#token-stewardship-pattern), [Discovery Exclusion Pattern](../prompts/PATTERNS.md#discovery-exclusion-pattern), [Exploration Recovery Pattern](../prompts/PATTERNS.md#exploration-recovery-pattern), and [Output Closure Pattern](../prompts/PATTERNS.md#output-closure-pattern).
20
- - Required upstream artifacts must exist before finalization; use `story.md#summary`, `story.md#description`, `story.md#acceptance-criteria`, `story.md#functional-requirements`, `story.md#nonfunctional-requirements`, `story.md#edge-cases`, and `story.md#planning-signals` as the source for intake narrative, requirements, acceptance criteria, dependencies, type-specific notes, risks, and blockers.
19
+ - Follow the [Work-Item Target Pattern](../prompts/PATTERNS.md#work-item-target-pattern), [Work-Item Change Request Pattern](../prompts/PATTERNS.md#work-item-change-request-pattern), [Session Recovery Pattern](../prompts/PATTERNS.md#session-recovery-pattern), [Interactive Question Pattern](../prompts/PATTERNS.md#interactive-question-pattern), [Question Basis Pattern](../prompts/PATTERNS.md#question-basis-pattern), [Prerequisite Validation Pattern](../prompts/PATTERNS.md#prerequisite-validation-pattern), [Readiness Gap Scan Pattern](../prompts/PATTERNS.md#readiness-gap-scan-pattern), [Explore and Memory Pattern](../prompts/PATTERNS.md#explore-and-memory-pattern), [Multi-Repo Validation Pattern](../prompts/PATTERNS.md#multi-repo-validation-pattern), [Token Stewardship Pattern](../prompts/PATTERNS.md#token-stewardship-pattern), [Discovery Exclusion Pattern](../prompts/PATTERNS.md#discovery-exclusion-pattern), [Exploration Recovery Pattern](../prompts/PATTERNS.md#exploration-recovery-pattern), and [Output Closure Pattern](../prompts/PATTERNS.md#output-closure-pattern).
20
+ - Required upstream artifacts must exist before finalization; use `story.md#summary`, `story.md#change-requests`, `story.md#description`, `story.md#acceptance-criteria`, `story.md#functional-requirements`, `story.md#nonfunctional-requirements`, `story.md#edge-cases`, and `story.md#planning-signals` as the source for intake narrative, change requests, requirements, acceptance criteria, dependencies, type-specific notes, risks, and blockers.
21
21
  - Read `decisions.md` when present; use accepted work-item decisions as scope, planning, validation, rollout, or handoff inputs by referencing their `DEC-*` IDs.
22
+ - When finalizing an accepted change request, set `Resume State` `Current item` to the active `CR-###` and append CR-scoped readiness, implementation brief, validation plan, and blocker rows. Preserve prior baseline and prior CR rows.
22
23
  - Run the Readiness Gap Scan before setting `finalize.md` to `ready`.
23
24
  - Set `Readiness Assessment` status to `ready` only when every required readiness gate is `ready` or `not applicable`; otherwise set it to `not ready`.
24
25
  - Mark the brief `not ready` while blockers remain or required repository access, foundation alignment, architecture alignment, compliance handling, or validation expectations are missing, ambiguous, conflicting, or unconfirmed.
@@ -29,6 +30,7 @@ You create or update `devspec/work-items/<work-item-folder>/finalize.md`.
29
30
  - Ensure every acceptance criterion, type-specific requirement, delivery gate, and material risk has validation coverage in `Validation Plan` or a blocking reason before marking `ready`.
30
31
  - For multi-repo work, record only repository readiness summary in `Implementation Brief`, including required repositories and whether access is confirmed, missing, or blocked; keep local paths and access requirement values in `../../devspec/foundation/codebase-structure.md`.
31
32
  - Do not invent missing requirements or silently change scope.
33
+ - Do not rewrite baseline readiness, implementation brief, validation plan, or blocker rows to fit later change-request scope.
32
34
  - Use `Explore` when implementation context, analogous behavior, or impact areas need quick discovery.
33
35
  - Use session memory only for transient notes; `finalize.md` remains canonical.
34
36
  - Update `Workflow State` in `meta.md` and `Resume State` in `finalize.md` before marking `not ready`, asking for clarification, or handing off.
@@ -47,7 +49,7 @@ You create or update `devspec/work-items/<work-item-folder>/finalize.md`.
47
49
  2. Read `meta.md` when present, `decisions.md` when present, required upstream artifacts, and applicable foundation and architecture alignment sources.
48
50
  3. Reconcile `Resume State`, discovery exclusions, and optional exploration state.
49
51
  4. Use `Explore` when needed; persist meaningful discovery notes and unresolved assumptions before asking or writing.
50
- 5. Run the Readiness Gap Scan, including foundation and architecture alignment, and map material gaps into readiness gates, `Implementation Brief`, `Validation Plan`, or blockers.
52
+ 5. Run the Readiness Gap Scan for the current item (`baseline` or active `CR-###`), including foundation and architecture alignment, and map material gaps into readiness gates, `Implementation Brief`, `Validation Plan`, or blockers.
51
53
  6. Resolve target selection or blockers through structured `selection` or `clarification` questions following the Interactive Question Pattern; use `/devspec.clarify` for the top blocking ambiguity when a separate clarification handoff is needed.
52
54
  7. Apply type-specific readiness gates and write `finalize.md` with `../../devspec/work-items/_template/finalize.md`.
53
55
  8. Report per Output Format.
@@ -11,34 +11,40 @@ handoffs:
11
11
  prompt: Review the current implementation.
12
12
  - label: Start Another Work Item
13
13
  agent: devspec.story
14
+ - label: Capture Post-Baseline Change Request
15
+ agent: devspec.changerequest
16
+ prompt: Record a missed related requirement without rewriting baseline history.
14
17
  prompt: Start or update another devspec work item.
15
18
  ---
16
19
  You implement the current work item and update `devspec/work-items/<work-item-folder>/implement.md`.
17
20
 
18
21
  ## Constraints
19
- - Follow [PATTERNS.md](../prompts/PATTERNS.md), especially: Work-Item Target, Session Recovery, Interactive Question, Question Basis, Prerequisite Validation, Multi-Repo Validation, Token Stewardship, Minimum Necessary Implementation, Task Quality Gate, Discovery Exclusion, Exploration Recovery, and Output Closure.
22
+ - Follow [PATTERNS.md](../prompts/PATTERNS.md), especially: Work-Item Target, Work-Item Change Request Pattern, Session Recovery, Interactive Question, Question Basis, Prerequisite Validation, Multi-Repo Validation, Token Stewardship, Minimum Necessary Implementation, Task Quality Gate, Discovery Exclusion, Exploration Recovery, and Output Closure.
20
23
  - `finalize.md` must be `ready` and `tasks.md` must exist.
21
24
  - Implement pending rows from `tasks.md#implementation-tasks` sequentially unless the user stops or skips.
25
+ - For change-request implementation, implement only pending rows whose `Scope` matches the active `CR-###` unless the user explicitly directs otherwise; preserve baseline and prior CR evidence.
22
26
  - Validate target repository path and access before changing code or running validation for multi-repo tasks.
23
27
  - Stop before implementation when target repository access is missing, ambiguous, or unconfirmed; direct the user to `/devspec.codebase-structure`.
28
+ - If newly discovered user scope is a missed related requirement after finalization, do not expand implementation silently; hand off to `devspec.changerequest`.
24
29
  - Do not edit repositories marked `reference-only`, `validation-only`, `release-coordination`, or `unavailable` without structured confirmation.
25
30
  - Do not run validation in repositories marked `reference-only`, `release-coordination`, or `unavailable` without structured confirmation.
26
31
  - Modify code when applicable and stay within finalized scope.
27
32
  - Keep the work item as the orchestration boundary and execute one repository-aware task checkpoint at a time.
28
33
  - For monorepos, distinguish tasks by target area, module, layer, or validation surface; for multi-repo work, every task must name target repository and access requirement.
29
34
  - Apply the Minimum Necessary Implementation Pattern before each task attempt, including confirming whether the task requires a code change.
30
- - Apply the Task Quality Gate Pattern before each task attempt, respecting `Depends on` and `Source refs` from `tasks.md`; record any task-quality blocker in `implement.md` and stop for the required structured question.
35
+ - Apply the Task Quality Gate Pattern before each task attempt, respecting `Scope`, `Depends on`, and `Source refs` from `tasks.md`; record any task-quality blocker in `implement.md` and stop for the required structured question.
31
36
  - Use targeted reads and searches from `tasks.md` target areas before broad discovery.
32
37
  - Resume a `paused` current task when prerequisites still hold; ask one structured `resume` question for `stopped` or ambiguous state.
33
38
  - Update `implement.md` using `../../devspec/work-items/_template/implement.md`.
34
39
  - Apply implementation requirements from `../../devspec/foundation/rules.md#work-item-handling-rules`.
35
- - After each completed task, report completed and pending counts and ask one structured `continuation` question with `Proceed`, `Skip`, and `Custom Answer`.
36
- - If the same task exceeds three implementation or repair attempts, stop, explain the loop, and ask one structured `retry` question with `Proceed`, `Skip`, and `Custom Answer`.
40
+ - After each completed task, report completed and pending counts and ask one structured `continuation` question with `Proceed` (example: continue to the next pending task), `Skip` (example: defer the next task with a recorded reason), and `Custom Answer` (example: stop after the current repository). Show exactly one recommendation with its justification.
41
+ - If the same task exceeds three implementation or repair attempts, stop, explain the loop, and ask one structured `retry` question with `Proceed` (example: retry with the recorded safer method), `Skip` (example: leave the task blocked for later investigation), and `Custom Answer` (example: supply a new validation command). Show exactly one recommendation with its justification.
37
42
  - Record task attempt failures with failed method, reason, retry condition, and next safer method.
38
43
  - Record token telemetry before implementation and after completion when available; otherwise record it as unavailable.
39
44
  - If code changes are not applicable in the configured target repository, record that clearly.
40
45
  - Keep `Implementation Task Ledger`, `Implementation Execution Log`, and `Resume State` current after each task, validation run, blocker, pause, stop, or retry escalation.
41
46
  - Keep `tasks.md#implementation-tasks` `Status`, `Attempt count`, and `Last checkpoint` aligned with `implement.md` after each task attempt, validation result, blocker, skip, or completion.
47
+ - Append implementation evidence and execution-log rows. Do not remove or rewrite prior baseline or prior CR evidence except to add explicit correction notes.
42
48
  - Keep `implement.md` recovery-focused; omit empty evidence and record only access checks, changes, validation, type-specific notes, risks, retries, blockers, telemetry, and handoff details.
43
49
  - Do not narrate rejected implementation options unless they explain a risk, blocker, retry, or review concern.
44
50
  - Record implementation progress in compact tables.
@@ -52,7 +58,7 @@ You implement the current work item and update `devspec/work-items/<work-item-fo
52
58
  5. Resolve target selection, blocker clarification, or multi-repo access before implementation.
53
59
  6. Record pre-run token telemetry or mark it unavailable.
54
60
  7. Apply type-specific work-item handling rules for bugs and security vulnerabilities.
55
- 8. Select the next paused or pending task; if none remain, update `implement.md`, mark completion, and notify the user.
61
+ 8. Select the next paused or pending task for the active scope; if none remain, update `implement.md`, mark completion, and notify the user.
56
62
  9. Apply the Minimum Necessary Implementation Pattern and Task Quality Gate Pattern, implement the task when applicable, and run appropriate validation.
57
63
  10. Record reusable search, helper-command, repair, or validation methods.
58
64
  11. Update `implement.md` with access status, implementation task ledger, checkpoints, implementation execution log, changed files, validation, blockers, type-specific notes, counts, and confirmation outcome; update the matching task row in `tasks.md` when its status, attempt count, or checkpoint changed.
@@ -11,17 +11,23 @@ handoffs:
11
11
  prompt: Address the review findings.
12
12
  - label: Start Another Work Item
13
13
  agent: devspec.story
14
+ - label: Capture Post-Baseline Change Request
15
+ agent: devspec.changerequest
16
+ prompt: Record a missed related requirement without rewriting baseline history.
14
17
  prompt: Start or update another devspec work item.
15
18
  ---
16
19
  You review the current work item and update `devspec/work-items/<work-item-folder>/review.md`.
17
20
 
18
21
  ## Constraints
19
- - Follow [PATTERNS.md](../prompts/PATTERNS.md), especially: Work-Item Target, Session Recovery, Interactive Question, Question Basis, Prerequisite Validation, Token Stewardship, Minimum Necessary Implementation, Task Quality Gate, Discovery Exclusion, Exploration Recovery, and Output Closure.
22
+ - If review reveals a missed related requirement rather than a defect in finalized scope, preserve the review record and hand off to `devspec.changerequest`.
23
+ - Follow [PATTERNS.md](../prompts/PATTERNS.md), especially: Work-Item Target, Work-Item Change Request Pattern, Session Recovery, Interactive Question, Question Basis, Prerequisite Validation, Token Stewardship, Minimum Necessary Implementation, Task Quality Gate, Discovery Exclusion, Exploration Recovery, and Output Closure.
20
24
  - `finalize.md`, `tasks.md`, and `implement.md` must exist.
21
25
  - Review against the finalized brief, `tasks.md`, `implement.md`, and implemented changes, not a new plan.
26
+ - For change-request review, review the active `CR-###` against its finalized rows, task rows, implementation evidence, and changed work while preserving prior baseline and prior CR review records.
22
27
  - Record findings with severity and required action when applicable.
23
28
  - Record task-quality, validation, scope, security, regression, and follow-up issues as `Review Findings`; use `Review Outcome` only for status, summary, scope alignment, validation coverage, task completion alignment, and type-specific summary notes.
24
29
  - Treat correctness, finalized scope, security, and validation coverage as primary review responsibilities; use the Minimum Necessary Implementation Pattern only to flag unnecessary dependencies, speculative abstractions, duplicated helper layers, oversized task outputs, or implementation not required by the finalized brief.
30
+ - Flag overwritten baseline task content, missing CR source refs, CR implementation without appended task rows, source-ref drift between CR rows and tasks, and rewritten prior implementation or review evidence when they affect close readiness.
25
31
  - Apply review expectations from `../../devspec/foundation/rules.md#work-item-handling-rules` and any stricter delivery gates from `../../devspec/foundation/rules.md#delivery-gate-catalog`.
26
32
  - Update `Workflow State` in `meta.md` and `Resume State` in `review.md` before recording findings, asking for clarification, or handing off.
27
33
 
@@ -30,7 +36,7 @@ You review the current work item and update `devspec/work-items/<work-item-folde
30
36
  2. Read `meta.md` when present, `finalize.md`, `tasks.md`, `implement.md`, existing `review.md`, and relevant code context.
31
37
  3. Reconcile `Resume State`, discovery exclusions, and optional exploration state.
32
38
  4. Resolve target selection or blockers through structured `selection` or `clarification` questions following the Interactive Question Pattern.
33
- 5. Check task completion alignment, source refs, scope adherence, bugs, regressions, security risks, validation gaps, missing tests, and unnecessary implementation complexity.
39
+ 5. Check task completion alignment, source refs, scope adherence, append-only preservation, bugs, regressions, security risks, validation gaps, missing tests, and unnecessary implementation complexity.
34
40
  6. Record reusable review discovery methods and write `review.md` with `../../devspec/work-items/_template/review.md`.
35
41
  7. Report per Output Format.
36
42