@anhth2/spec-driven-dev-plugin 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +243 -0
- package/bin/build.js +230 -0
- package/bin/index.js +311 -0
- package/commands/debug.md +374 -0
- package/commands/debug.tmpl +77 -0
- package/commands/define-product.md +451 -0
- package/commands/define-product.tmpl +154 -0
- package/commands/fix-bug.md +379 -0
- package/commands/fix-bug.tmpl +82 -0
- package/commands/generate-bdd.md +591 -0
- package/commands/generate-bdd.tmpl +294 -0
- package/commands/generate-code.md +395 -0
- package/commands/generate-code.tmpl +98 -0
- package/commands/generate-prd.md +488 -0
- package/commands/generate-prd.tmpl +191 -0
- package/commands/generate-tech-docs.md +362 -0
- package/commands/generate-tech-docs.tmpl +65 -0
- package/commands/generate-tests.md +377 -0
- package/commands/generate-tests.tmpl +80 -0
- package/commands/refine-prd.md +408 -0
- package/commands/refine-prd.tmpl +111 -0
- package/commands/review-code.md +354 -0
- package/commands/review-code.tmpl +57 -0
- package/commands/review-context.md +646 -0
- package/commands/review-context.tmpl +349 -0
- package/commands/review-tech-docs.md +518 -0
- package/commands/review-tech-docs.tmpl +221 -0
- package/commands/run-tests.md +343 -0
- package/commands/run-tests.tmpl +46 -0
- package/commands/setup-ai-first.md +278 -0
- package/commands/setup-ai-first.tmpl +197 -0
- package/commands/smoke-test.md +366 -0
- package/commands/smoke-test.tmpl +69 -0
- package/commands/validate-traces.md +529 -0
- package/commands/validate-traces.tmpl +232 -0
- package/core/FRAMEWORK_VERSION +1 -0
- package/core/commands/debug.md +374 -0
- package/core/commands/define-product.md +451 -0
- package/core/commands/fix-bug.md +379 -0
- package/core/commands/generate-bdd.md +591 -0
- package/core/commands/generate-code.md +395 -0
- package/core/commands/generate-prd.md +488 -0
- package/core/commands/generate-tech-docs.md +362 -0
- package/core/commands/generate-tests.md +377 -0
- package/core/commands/refine-prd.md +408 -0
- package/core/commands/review-code.md +354 -0
- package/core/commands/review-context.md +646 -0
- package/core/commands/review-tech-docs.md +518 -0
- package/core/commands/run-tests.md +343 -0
- package/core/commands/setup-ai-first.md +278 -0
- package/core/commands/smoke-test.md +366 -0
- package/core/commands/validate-traces.md +529 -0
- package/core/hooks/data-guard.js +141 -0
- package/core/hooks/settings.json +18 -0
- package/core/modules/angular/architecture-snippets/component-patterns.md +187 -0
- package/core/modules/angular/module.yaml +6 -0
- package/core/modules/angular/stack-profile.yaml +38 -0
- package/core/modules/context-engineering/architecture-snippets/context-design.md +119 -0
- package/core/modules/context-engineering/module.yaml +9 -0
- package/core/modules/context-engineering/stack-profile.yaml +61 -0
- package/core/modules/dotnet/architecture-snippets/clean-arch.md +160 -0
- package/core/modules/dotnet/module.yaml +6 -0
- package/core/modules/dotnet/stack-profile.yaml +50 -0
- package/core/modules/golang/architecture-snippets/domain-layout.md +283 -0
- package/core/modules/golang/module.yaml +6 -0
- package/core/modules/golang/stack-profile.yaml +40 -0
- package/core/modules/java-spring/architecture-snippets/layered-arch.md +201 -0
- package/core/modules/java-spring/module.yaml +15 -0
- package/core/modules/java-spring/stack-profile.yaml +28 -0
- package/core/modules/nextjs/architecture-snippets/app-router-patterns.md +269 -0
- package/core/modules/nextjs/module.yaml +14 -0
- package/core/modules/nextjs/stack-profile.yaml +74 -0
- package/core/modules/php-laravel/architecture-snippets/service-repository.md +302 -0
- package/core/modules/php-laravel/module.yaml +15 -0
- package/core/modules/php-laravel/stack-profile.yaml +56 -0
- package/core/modules/react/architecture-snippets/hooks-query-patterns.md +254 -0
- package/core/modules/react/module.yaml +14 -0
- package/core/modules/react/stack-profile.yaml +63 -0
- package/core/rules/data-protection.md +80 -0
- package/core/rules/workflow.md +44 -0
- package/core/skills/code/SKILL.md +526 -0
- package/core/skills/debug/SKILL.md +584 -0
- package/core/skills/discovery/SKILL.md +363 -0
- package/core/skills/prd/SKILL.md +456 -0
- package/core/skills/setup-ai-first/SKILL.md +160 -0
- package/core/skills/spec/SKILL.md +361 -0
- package/core/skills/test/SKILL.md +862 -0
- package/core/steps/context-loader.md +163 -0
- package/core/steps/gate.md +81 -0
- package/core/steps/report-footer.md +53 -0
- package/core/steps/spawn-agent.md +123 -0
- package/core/templates/architecture.template.md +113 -0
- package/core/templates/feature.template +259 -0
- package/core/templates/platform-guide.template.md +145 -0
- package/core/templates/prd.template.md +312 -0
- package/core/templates/product-definition.template.md +168 -0
- package/core/templates/project-context.yaml +78 -0
- package/hooks/data-guard.js +141 -0
- package/hooks/settings.json +18 -0
- package/modules/angular/architecture-snippets/component-patterns.md +187 -0
- package/modules/angular/module.yaml +6 -0
- package/modules/angular/stack-profile.yaml +38 -0
- package/modules/context-engineering/architecture-snippets/context-design.md +119 -0
- package/modules/context-engineering/module.yaml +9 -0
- package/modules/context-engineering/stack-profile.yaml +61 -0
- package/modules/dotnet/architecture-snippets/clean-arch.md +160 -0
- package/modules/dotnet/module.yaml +6 -0
- package/modules/dotnet/stack-profile.yaml +50 -0
- package/modules/golang/architecture-snippets/domain-layout.md +283 -0
- package/modules/golang/module.yaml +6 -0
- package/modules/golang/stack-profile.yaml +40 -0
- package/modules/java-spring/architecture-snippets/layered-arch.md +201 -0
- package/modules/java-spring/module.yaml +15 -0
- package/modules/java-spring/stack-profile.yaml +28 -0
- package/modules/nextjs/architecture-snippets/app-router-patterns.md +269 -0
- package/modules/nextjs/module.yaml +14 -0
- package/modules/nextjs/stack-profile.yaml +74 -0
- package/modules/php-laravel/architecture-snippets/service-repository.md +302 -0
- package/modules/php-laravel/module.yaml +15 -0
- package/modules/php-laravel/stack-profile.yaml +56 -0
- package/modules/react/architecture-snippets/hooks-query-patterns.md +254 -0
- package/modules/react/module.yaml +14 -0
- package/modules/react/stack-profile.yaml +63 -0
- package/package.json +42 -0
- package/rules/data-protection.md +80 -0
- package/rules/workflow.md +44 -0
- package/scripts/init.sh +49 -0
- package/scripts/upgrade.sh +94 -0
- package/skills/code/SKILL.md +526 -0
- package/skills/code/SKILL.tmpl +176 -0
- package/skills/debug/SKILL.md +584 -0
- package/skills/debug/SKILL.tmpl +262 -0
- package/skills/discovery/SKILL.md +363 -0
- package/skills/discovery/SKILL.tmpl +147 -0
- package/skills/prd/SKILL.md +456 -0
- package/skills/prd/SKILL.tmpl +188 -0
- package/skills/setup-ai-first/SKILL.md +160 -0
- package/skills/setup-ai-first/SKILL.tmpl +107 -0
- package/skills/spec/SKILL.md +361 -0
- package/skills/spec/SKILL.tmpl +174 -0
- package/skills/test/SKILL.md +862 -0
- package/skills/test/SKILL.tmpl +296 -0
- package/steps/context-loader.md +163 -0
- package/steps/gate.md +81 -0
- package/steps/report-footer.md +53 -0
- package/steps/spawn-agent.md +123 -0
- package/templates/architecture.template.md +113 -0
- package/templates/feature.template +259 -0
- package/templates/platform-guide.template.md +145 -0
- package/templates/prd.template.md +312 -0
- package/templates/product-definition.template.md +168 -0
- package/templates/project-context.yaml +78 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
# /review-code — Read-Only Code Review
|
|
2
|
+
|
|
3
|
+
**CAUTION: READ-ONLY. Report only, do NOT make changes.**
|
|
4
|
+
|
|
5
|
+
## Gate
|
|
6
|
+
# Gate — Universal Entry Procedure
|
|
7
|
+
|
|
8
|
+
Every command must execute this gate before proceeding with its specific logic.
|
|
9
|
+
|
|
10
|
+
## Step 0 — Sub-Agent Mode Check
|
|
11
|
+
|
|
12
|
+
Before anything else, check if `$ARGUMENTS` is a JSON payload from an orchestrator:
|
|
13
|
+
|
|
14
|
+
1. Attempt to parse `$ARGUMENTS` as JSON.
|
|
15
|
+
2. If it parses successfully **and** contains `"_agent_mode": true`:
|
|
16
|
+
- **Skip Steps 1, 2, and 3 of this Gate entirely.**
|
|
17
|
+
- Set target file = `payload.target_file`
|
|
18
|
+
- Set loaded context = `payload.context` (do NOT run context-loader.md)
|
|
19
|
+
- Set UC scope = `payload.uc_id` (process only this UC)
|
|
20
|
+
- Set line range = `payload.uc_section` (read only that PRD section)
|
|
21
|
+
- Proceed directly to the command-specific logic.
|
|
22
|
+
3. If `$ARGUMENTS` is not JSON or `_agent_mode` is absent → continue to Step 1 (normal mode).
|
|
23
|
+
|
|
24
|
+
## Step 0-B — Model Check
|
|
25
|
+
|
|
26
|
+
*Skip this step if `_agent_mode: true` (sub-agent — orchestrator already validated).*
|
|
27
|
+
|
|
28
|
+
Complex generation and review commands require strong reasoning.
|
|
29
|
+
Using a smaller model risks missed edge cases, incomplete spec analysis, and architecture violations.
|
|
30
|
+
|
|
31
|
+
Display and wait for response:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
⚙️ MODEL CHECK
|
|
35
|
+
──────────────────────────────────────────────────────────────────
|
|
36
|
+
Recommended : claude-opus-4-5 (or claude-opus-4)
|
|
37
|
+
Why needed : Spec analysis, architecture review, code generation
|
|
38
|
+
require deep reasoning. Smaller models miss edge cases.
|
|
39
|
+
|
|
40
|
+
To switch in Claude Code:
|
|
41
|
+
• Settings → Model → select "claude-opus"
|
|
42
|
+
• or: /model → choose claude-opus
|
|
43
|
+
|
|
44
|
+
Running on claude-opus?
|
|
45
|
+
Y — yes, on claude-opus → proceed
|
|
46
|
+
S — skip check (I accept lower quality risk with current model)
|
|
47
|
+
──────────────────────────────────────────────────────────────────
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- "Y" → proceed to Step 1.
|
|
51
|
+
- "S" → proceed to Step 1 (user accepts risk, add ⚠️ to final report).
|
|
52
|
+
- "N" or anything else → **STOP.** Output: "Please switch to claude-opus, then re-run this command."
|
|
53
|
+
|
|
54
|
+
## Step 1 — Resolve Target File
|
|
55
|
+
|
|
56
|
+
1. If `$ARGUMENTS` is provided and points to an existing file → use it directly as the target.
|
|
57
|
+
2. If `$ARGUMENTS` is a UC-ID, ticket ID, or partial name → search for matching files in the relevant directory.
|
|
58
|
+
3. If `$ARGUMENTS` is empty or no match found:
|
|
59
|
+
- List files in the relevant directory for this command (e.g., `specs/prd/**/*.md` for PRD commands, `specs/bdd/**/*.feature` for BDD commands).
|
|
60
|
+
- Present the list to the user and ask: "Which file do you want to work with? (Enter number or filename)"
|
|
61
|
+
- Wait for user selection before continuing.
|
|
62
|
+
|
|
63
|
+
## Step 2 — Execute Context Loader
|
|
64
|
+
|
|
65
|
+
Load all project context by following the procedure in `steps/context-loader.md`.
|
|
66
|
+
Store all loaded context in memory for use throughout this command session.
|
|
67
|
+
|
|
68
|
+
## Step 3 — CHECKPOINT
|
|
69
|
+
|
|
70
|
+
After completing Steps 1 and 2, display a summary and wait for confirmation:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
CHECKPOINT
|
|
74
|
+
-----------
|
|
75
|
+
Target : {resolved file path}
|
|
76
|
+
Project : {project.name from project-context.yaml}
|
|
77
|
+
Tech stack : {language} / {framework}
|
|
78
|
+
Module : {module if set, else "not configured"}
|
|
79
|
+
Domains : {comma-separated domain list}
|
|
80
|
+
|
|
81
|
+
Proceed? (Y/N)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Wait for explicit "Y" or "N" from the user before continuing.
|
|
85
|
+
- "Y" → proceed to the command-specific steps below.
|
|
86
|
+
- "N" → stop and ask what the user wants to change.
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
*Note: For this command, the target in Step 1 is a UC-ID, file path, or current branch name. Skip to context loading immediately after resolving the target.*
|
|
90
|
+
|
|
91
|
+
## Context
|
|
92
|
+
# Context Loader — Load All Project Context
|
|
93
|
+
|
|
94
|
+
Execute these steps in order. Store everything in memory for the duration of the command session.
|
|
95
|
+
|
|
96
|
+
**Priority guide (anti-lost-in-middle):**
|
|
97
|
+
- Steps 1–2 are PROJECT-CONFIG — loaded first, resolve all paths and metadata.
|
|
98
|
+
- Step 3 is CRITICAL — architecture + coding standards, the highest-priority facts for generation.
|
|
99
|
+
- Step 4 is SAFETY — data protection rules, enforced silently for the entire session.
|
|
100
|
+
- Steps 5–6 are DOMAIN KNOWLEDGE — terminology and entity definitions.
|
|
101
|
+
- Step 7 is the WORKING MEMORY RECAP — locks critical facts into the top of working memory.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Step 1 — [PROJECT-CONFIG] Load project-context.yaml
|
|
106
|
+
|
|
107
|
+
Read `.agent/project-context.yaml`. Extract and store:
|
|
108
|
+
|
|
109
|
+
**Tech Stack:**
|
|
110
|
+
- `tech_stack.language` → active language (e.g., Java 17, TypeScript, C#, Go)
|
|
111
|
+
- `tech_stack.framework` → active framework (e.g., Spring Boot 3.2, Angular 17, .NET 8)
|
|
112
|
+
- `tech_stack.build_tool` → build tool (e.g., Maven, npm, dotnet, go)
|
|
113
|
+
- `tech_stack.test_framework` → test framework (e.g., JUnit 5 + Mockito, Jest, xUnit)
|
|
114
|
+
- `tech_stack.database` → database (e.g., PostgreSQL, MySQL, MongoDB)
|
|
115
|
+
- `tech_stack.module` → active module profile (e.g., java-spring, angular, dotnet, golang, context-engineering)
|
|
116
|
+
|
|
117
|
+
**Conventions:**
|
|
118
|
+
- `conventions.build_command` → how to compile/build
|
|
119
|
+
- `conventions.test_command` → how to run tests
|
|
120
|
+
- `conventions.service_run` → how to start the service
|
|
121
|
+
- `conventions.ticket_prefix` → ticket ID prefix (e.g., PROJ, FEAT, UC)
|
|
122
|
+
|
|
123
|
+
**Domains:**
|
|
124
|
+
- `domains` → list of active business domains
|
|
125
|
+
|
|
126
|
+
**Paths (if present):**
|
|
127
|
+
- `paths.specs_dir` → BDD specs root
|
|
128
|
+
- `paths.prd_dir` → PRD documents root
|
|
129
|
+
- `paths.refinement_dir` → findings/review output dir
|
|
130
|
+
- `paths.product_definitions_dir` → product definitions root
|
|
131
|
+
- `paths.domain_knowledge_dir` → domain knowledge root
|
|
132
|
+
- `paths.business_dictionary` → path to business-dictionary.md
|
|
133
|
+
- `paths.core_entities` → path to core-entities.md
|
|
134
|
+
- `paths.tech_docs_dir` → technical documentation root
|
|
135
|
+
- `paths.trace_dir` → trace state directory
|
|
136
|
+
|
|
137
|
+
If `paths` section is absent, use these defaults:
|
|
138
|
+
- `specs_dir` = `specs/bdd`
|
|
139
|
+
- `prd_dir` = `specs/prd`
|
|
140
|
+
- `refinement_dir` = `.agent/review`
|
|
141
|
+
- `product_definitions_dir` = `specs/product-definition`
|
|
142
|
+
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
143
|
+
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
144
|
+
- `core_entities` = `specs/domain-knowledge/core-entities.md`
|
|
145
|
+
- `tech_docs_dir` = `tech-docs`
|
|
146
|
+
- `trace_dir` = `.trace`
|
|
147
|
+
|
|
148
|
+
If `tech_stack.module` is set, also load `.agent/modules/{module}/stack-profile.yaml` if it exists.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Step 2 — [PROJECT-CONFIG] Load module stack profile (conditional)
|
|
153
|
+
|
|
154
|
+
If `tech_stack.module` is set, read `.agent/modules/{module}/stack-profile.yaml`.
|
|
155
|
+
Merge framework-specific conventions (layer patterns, test patterns, naming rules) into the loaded context.
|
|
156
|
+
If the file does not exist → skip silently.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Step 3 — [CRITICAL] Load CLAUDE.md
|
|
161
|
+
|
|
162
|
+
*This is the highest-priority context — it defines HOW to write code and documents for this project.*
|
|
163
|
+
|
|
164
|
+
Read `CLAUDE.md`. Extract and store:
|
|
165
|
+
|
|
166
|
+
- **§1 Project Overview** → project name, language, framework, build/test commands, domains
|
|
167
|
+
- **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules
|
|
168
|
+
- **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns
|
|
169
|
+
- **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name
|
|
170
|
+
- **§7 Git Conventions** → branch naming pattern, commit message format
|
|
171
|
+
|
|
172
|
+
If `CLAUDE.md` does not exist → note it as missing and continue with project-context.yaml data only.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Step 4 — [SAFETY] Load Data Protection Rules
|
|
177
|
+
|
|
178
|
+
Read `.agent/rules/data-protection.md` (or `rules/data-protection.md` from the framework installation).
|
|
179
|
+
|
|
180
|
+
Store the sensitive file patterns — you must **never** read, write, display, or reference content from files matching those patterns for the entire session.
|
|
181
|
+
|
|
182
|
+
If neither file exists → apply built-in defaults: never access `.env*`, `*.key`, `*.pem`, `*secret*`, `*password*`, `*credential*`.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Step 5 — [DOMAIN] Load Business Dictionary (conditional)
|
|
187
|
+
|
|
188
|
+
Check if the business dictionary file exists (use `paths.business_dictionary` resolved in Step 1).
|
|
189
|
+
|
|
190
|
+
If it exists, read it and extract:
|
|
191
|
+
- **Canonical Terms** → complete list of approved terms and their definitions
|
|
192
|
+
- **Banned Terms** → complete list of banned terms and their canonical replacements
|
|
193
|
+
- **Status / Enum Registry** → allowed enum values per entity
|
|
194
|
+
|
|
195
|
+
Store the banned terms list for **active enforcement** throughout the command session:
|
|
196
|
+
- When generating any text (PRD, BDD, code comments, tech docs), verify no banned terms appear
|
|
197
|
+
- Replace banned terms with their canonical equivalents automatically
|
|
198
|
+
|
|
199
|
+
If the file does not exist → skip silently. Do not warn or block.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Step 6 — [DOMAIN] Load Core Entities (conditional)
|
|
204
|
+
|
|
205
|
+
Check if the core entities file exists at `paths.core_entities` (resolved in Step 1).
|
|
206
|
+
Default path: `specs/domain-knowledge/core-entities.md`.
|
|
207
|
+
|
|
208
|
+
If it exists, read it and store:
|
|
209
|
+
- **Entity catalog** → for each entity: its name, purpose, owner service, key fields (name + type), business invariants, and relationships
|
|
210
|
+
- **Field name registry** → canonical field names to use in generated code and documents
|
|
211
|
+
- **Relationship map** → how entities relate to each other (1:N, N:N, embedded, etc.)
|
|
212
|
+
|
|
213
|
+
**How to use this catalog:**
|
|
214
|
+
- When generating code: use the field names, types, and relationships defined here — do NOT infer from existing code
|
|
215
|
+
- When generating PRD/BDD: reference entity names from this catalog for consistency
|
|
216
|
+
- When generating tech-docs: use this catalog as the source-of-truth for entity definitions
|
|
217
|
+
|
|
218
|
+
If the file does not exist → skip silently.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Step 7 — [RECAP] Working Memory Recap (anti-lost-in-middle)
|
|
223
|
+
|
|
224
|
+
After loading all context, synthesize and output a compact summary block.
|
|
225
|
+
This recap ensures the most critical facts are stated at the END of context loading
|
|
226
|
+
(recency effect — freshest in working memory when the task begins).
|
|
227
|
+
|
|
228
|
+
Output exactly this block:
|
|
229
|
+
```
|
|
230
|
+
[CTX LOADED]
|
|
231
|
+
Stack : {language} / {framework} / {database}
|
|
232
|
+
Layers : {layer order from CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
|
|
233
|
+
Ticket : {ticket_prefix}-
|
|
234
|
+
Dict : {loaded — N canonical terms, M banned terms | missing}
|
|
235
|
+
Entities : {loaded — EntityA, EntityB, EntityC | missing}
|
|
236
|
+
Status : {FULL | PARTIAL — missing: CLAUDE.md / business-dict / core-entities | MINIMAL}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
If any CRITICAL file is missing (CLAUDE.md), flag it clearly so the user can decide whether to proceed.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Context Load Complete
|
|
244
|
+
|
|
245
|
+
After completing all steps, you have loaded:
|
|
246
|
+
- Project identity, tech stack, module conventions
|
|
247
|
+
- Architecture rules and layer order ← **[CRITICAL — hold in working memory]**
|
|
248
|
+
- Coding standards and naming conventions ← **[CRITICAL — hold in working memory]**
|
|
249
|
+
- Data protection rules (sensitive file patterns to never access)
|
|
250
|
+
- Terminology rules with banned-term list ← **[DOMAIN — apply to every generated word]**
|
|
251
|
+
- Entity catalog (field names, types, invariants) ← **[DOMAIN — use for code generation]**
|
|
252
|
+
- All configured paths
|
|
253
|
+
|
|
254
|
+
Proceed to the next step of the calling command.
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Review Dimensions
|
|
260
|
+
|
|
261
|
+
### 1. Traceability
|
|
262
|
+
- [ ] Every controller endpoint has `@trace.implements` tag?
|
|
263
|
+
- [ ] Every test file has `@trace.verifies` tag?
|
|
264
|
+
- [ ] No `@trace` tags on wrong layers?
|
|
265
|
+
- [ ] `{paths.trace_dir}/{UC-ID}.tsv` up to date?
|
|
266
|
+
|
|
267
|
+
### 2. Layer Architecture (from CLAUDE.md §2)
|
|
268
|
+
- [ ] Each class in the correct layer?
|
|
269
|
+
- [ ] Layer dependencies flow in correct direction?
|
|
270
|
+
- [ ] No layer bypassed?
|
|
271
|
+
|
|
272
|
+
### 3. Coding Standards (from CLAUDE.md §3)
|
|
273
|
+
- [ ] Naming conventions followed?
|
|
274
|
+
- [ ] Response wrapper used consistently?
|
|
275
|
+
- [ ] Exceptions thrown (not swallowed)?
|
|
276
|
+
- [ ] No magic numbers, no sensitive data in logs?
|
|
277
|
+
- [ ] Transaction annotations correct?
|
|
278
|
+
|
|
279
|
+
### 4. Spec Compliance
|
|
280
|
+
- [ ] Every scenario in .feature has an implementation?
|
|
281
|
+
- [ ] No undocumented endpoints (code not backed by spec)?
|
|
282
|
+
|
|
283
|
+
## Output
|
|
284
|
+
|
|
285
|
+
# Report Footer — Standard Command Output Format
|
|
286
|
+
|
|
287
|
+
Every command report must end with this standard footer section.
|
|
288
|
+
|
|
289
|
+
## Status Badge
|
|
290
|
+
|
|
291
|
+
Choose one based on outcome:
|
|
292
|
+
- `✅ Complete` — all steps succeeded, no issues found
|
|
293
|
+
- `❌ Failed` — command could not complete due to a blocking error
|
|
294
|
+
- `⚠️ Warnings` — completed with non-blocking issues that should be reviewed
|
|
295
|
+
|
|
296
|
+
## Output Artifacts
|
|
297
|
+
|
|
298
|
+
List every file created or modified by this command:
|
|
299
|
+
```
|
|
300
|
+
Output Artifacts:
|
|
301
|
+
{created|updated} {file-path} ({brief description})
|
|
302
|
+
{created|updated} {file-path} ({brief description})
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
If no files were written (e.g., review or analysis commands) → write `Output Artifacts: none (read-only)`.
|
|
306
|
+
|
|
307
|
+
## Next Command Suggestion
|
|
308
|
+
|
|
309
|
+
Suggest the logical next command based on workflow phase:
|
|
310
|
+
|
|
311
|
+
| Current command | Suggest next |
|
|
312
|
+
|-------------------------|-----------------------------------------------|
|
|
313
|
+
| /define-product | `/generate-prd {product-definition-file}` |
|
|
314
|
+
| /generate-prd | `/refine-prd {prd-file}` then `/review-context {prd-file}` |
|
|
315
|
+
| /refine-prd | Open Review Board → update PRD → `/review-context {prd-file}` |
|
|
316
|
+
| /review-context (PRD) | `/generate-bdd {prd-file}` if APPROVED; fix PRD if NEEDS_FIX |
|
|
317
|
+
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
318
|
+
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
319
|
+
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
320
|
+
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
321
|
+
| /generate-code | `/generate-tests {UC-ID}` |
|
|
322
|
+
| /generate-tests | `/run-tests {UC-ID}` |
|
|
323
|
+
| /run-tests (passing) | `/review-code {UC-ID}` |
|
|
324
|
+
| /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
325
|
+
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
326
|
+
| /smoke-test | Create PR and link to ticket |
|
|
327
|
+
| /validate-traces | `/generate-code {UC-ID}` for gaps |
|
|
328
|
+
| /fix-bug | Create PR and link to ticket |
|
|
329
|
+
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
330
|
+
|
|
331
|
+
Format the footer as:
|
|
332
|
+
```
|
|
333
|
+
---
|
|
334
|
+
Status : {badge}
|
|
335
|
+
{Output Artifacts block}
|
|
336
|
+
Next : {suggested command with example arguments}
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
/review-code Report — {UC-ID}
|
|
342
|
+
Critical: {X} | Major: {Y} | Minor: {Z}
|
|
343
|
+
|
|
344
|
+
### Critical
|
|
345
|
+
| # | File | Line | Issue | Suggested Fix |
|
|
346
|
+
|
|
347
|
+
### Major
|
|
348
|
+
| # | File | Line | Issue | Suggested Fix |
|
|
349
|
+
|
|
350
|
+
### Minor
|
|
351
|
+
| # | File | Line | Issue | Suggested Fix |
|
|
352
|
+
|
|
353
|
+
Verdict: APPROVED ✅ | NEEDS_FIX ❌
|
|
354
|
+
```
|