create-ai-project 1.23.4 → 1.24.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.
Files changed (94) hide show
  1. package/.claude/agents-en/acceptance-test-generator.md +8 -32
  2. package/.claude/agents-en/code-reviewer.md +24 -25
  3. package/.claude/agents-en/code-verifier.md +3 -32
  4. package/.claude/agents-en/codebase-analyzer.md +11 -79
  5. package/.claude/agents-en/document-reviewer.md +12 -58
  6. package/.claude/agents-en/integration-test-reviewer.md +6 -37
  7. package/.claude/agents-en/investigator.md +6 -59
  8. package/.claude/agents-en/quality-fixer-frontend.md +1 -5
  9. package/.claude/agents-en/quality-fixer.md +1 -5
  10. package/.claude/agents-en/requirement-analyzer.md +3 -14
  11. package/.claude/agents-en/rule-advisor.md +3 -16
  12. package/.claude/agents-en/scope-discoverer.md +5 -29
  13. package/.claude/agents-en/security-reviewer.md +2 -13
  14. package/.claude/agents-en/skill-creator.md +3 -6
  15. package/.claude/agents-en/skill-reviewer.md +7 -43
  16. package/.claude/agents-en/solver.md +9 -24
  17. package/.claude/agents-en/task-decomposer.md +39 -8
  18. package/.claude/agents-en/task-executor-frontend.md +29 -20
  19. package/.claude/agents-en/task-executor.md +29 -20
  20. package/.claude/agents-en/technical-designer-frontend.md +7 -12
  21. package/.claude/agents-en/technical-designer.md +4 -11
  22. package/.claude/agents-en/ui-analyzer.md +16 -115
  23. package/.claude/agents-en/ui-spec-designer.md +3 -3
  24. package/.claude/agents-en/verifier.md +9 -53
  25. package/.claude/agents-en/work-planner.md +27 -22
  26. package/.claude/agents-ja/acceptance-test-generator.md +10 -34
  27. package/.claude/agents-ja/code-reviewer.md +24 -25
  28. package/.claude/agents-ja/code-verifier.md +5 -34
  29. package/.claude/agents-ja/codebase-analyzer.md +11 -79
  30. package/.claude/agents-ja/document-reviewer.md +16 -62
  31. package/.claude/agents-ja/integration-test-reviewer.md +6 -37
  32. package/.claude/agents-ja/investigator.md +6 -59
  33. package/.claude/agents-ja/prd-creator.md +3 -3
  34. package/.claude/agents-ja/quality-fixer-frontend.md +2 -6
  35. package/.claude/agents-ja/quality-fixer.md +2 -6
  36. package/.claude/agents-ja/requirement-analyzer.md +3 -14
  37. package/.claude/agents-ja/rule-advisor.md +4 -17
  38. package/.claude/agents-ja/scope-discoverer.md +5 -29
  39. package/.claude/agents-ja/security-reviewer.md +3 -14
  40. package/.claude/agents-ja/skill-creator.md +3 -6
  41. package/.claude/agents-ja/skill-reviewer.md +7 -43
  42. package/.claude/agents-ja/solver.md +11 -26
  43. package/.claude/agents-ja/task-decomposer.md +40 -9
  44. package/.claude/agents-ja/task-executor-frontend.md +29 -20
  45. package/.claude/agents-ja/task-executor.md +29 -20
  46. package/.claude/agents-ja/technical-designer-frontend.md +8 -13
  47. package/.claude/agents-ja/technical-designer.md +5 -12
  48. package/.claude/agents-ja/ui-analyzer.md +17 -116
  49. package/.claude/agents-ja/ui-spec-designer.md +7 -7
  50. package/.claude/agents-ja/verifier.md +9 -53
  51. package/.claude/agents-ja/work-planner.md +51 -51
  52. package/.claude/commands-ja/build.md +1 -1
  53. package/.claude/commands-ja/design.md +1 -1
  54. package/.claude/commands-ja/diagnose.md +1 -1
  55. package/.claude/commands-ja/front-build.md +1 -1
  56. package/.claude/commands-ja/front-design.md +3 -3
  57. package/.claude/commands-ja/front-plan.md +2 -2
  58. package/.claude/commands-ja/implement.md +1 -1
  59. package/.claude/commands-ja/plan.md +2 -2
  60. package/.claude/commands-ja/prepare-implementation.md +4 -4
  61. package/.claude/commands-ja/reverse-engineer.md +1 -1
  62. package/.claude/commands-ja/review.md +1 -1
  63. package/.claude/commands-ja/task.md +2 -2
  64. package/.claude/commands-ja/update-doc.md +1 -1
  65. package/.claude/skills-en/documentation-criteria/references/design-template.md +5 -1
  66. package/.claude/skills-en/documentation-criteria/references/plan-template.md +17 -7
  67. package/.claude/skills-en/documentation-criteria/references/task-template.md +18 -0
  68. package/.claude/skills-en/documentation-criteria/references/ui-spec-template.md +1 -1
  69. package/.claude/skills-en/frontend-technical-spec/SKILL.md +4 -8
  70. package/.claude/skills-en/frontend-typescript-rules/SKILL.md +4 -2
  71. package/.claude/skills-en/frontend-typescript-testing/SKILL.md +5 -11
  72. package/.claude/skills-en/frontend-typescript-testing/references/e2e.md +1 -1
  73. package/.claude/skills-en/technical-spec/SKILL.md +4 -3
  74. package/.claude/skills-en/typescript-testing/SKILL.md +4 -4
  75. package/.claude/skills-ja/coding-standards/SKILL.md +4 -4
  76. package/.claude/skills-ja/coding-standards/references/security-checks.md +1 -1
  77. package/.claude/skills-ja/documentation-criteria/SKILL.md +1 -1
  78. package/.claude/skills-ja/documentation-criteria/references/design-template.md +10 -6
  79. package/.claude/skills-ja/documentation-criteria/references/plan-template.md +18 -8
  80. package/.claude/skills-ja/documentation-criteria/references/task-template.md +18 -0
  81. package/.claude/skills-ja/documentation-criteria/references/ui-spec-template.md +3 -3
  82. package/.claude/skills-ja/frontend-technical-spec/SKILL.md +4 -8
  83. package/.claude/skills-ja/frontend-typescript-rules/SKILL.md +5 -3
  84. package/.claude/skills-ja/frontend-typescript-testing/SKILL.md +5 -11
  85. package/.claude/skills-ja/frontend-typescript-testing/references/e2e.md +2 -2
  86. package/.claude/skills-ja/implementation-approach/SKILL.md +1 -1
  87. package/.claude/skills-ja/integration-e2e-testing/SKILL.md +1 -1
  88. package/.claude/skills-ja/integration-e2e-testing/references/e2e-environment-prerequisites.md +1 -1
  89. package/.claude/skills-ja/project-context/references/template.md +2 -2
  90. package/.claude/skills-ja/task-analyzer/references/skills-index.yaml +3 -3
  91. package/.claude/skills-ja/technical-spec/SKILL.md +4 -3
  92. package/.claude/skills-ja/typescript-testing/SKILL.md +4 -4
  93. package/CHANGELOG.md +19 -0
  94. package/package.json +1 -1
@@ -189,13 +189,13 @@ describe('[Feature Name] Integration Test', () => {
189
189
  })
190
190
  ```
191
191
 
192
- **Proof annotations** (apply to every skeleton, alongside the metadata above): each `it.todo` carries two comment lines that hand the proof contract to the test implementer and to integration-test-reviewer (these map to the task template's Proof Obligations fields):
192
+ **Proof annotations** (apply to every skeleton, alongside the metadata above): each `it.todo` carries two comment lines that hand the proof contract to the test implementer and the downstream review (these map to the task template's Proof Obligations fields):
193
193
  - `Primary failure mode`: the specific regression that turns this test red — the behavior the AC promises and would break
194
194
  - `Proof obligation`: what the implemented test must assert to prove the claim — the boundary to traverse, the observable state before/after for state-changing ACs, and which boundaries may be mocked and why. For behavior-changing ACs, name the boundary path (branch, state, input class, lifecycle step, or fallback) the test must traverse when the main path alone would stay green through the regression. Phrase it as design intent describing what to assert; the implementer writes the executable assertions and mock setup
195
195
 
196
196
  ### E2E Test Files
197
197
 
198
- Generate **separate files per lane**: `*.fixture-e2e.test.[ext]` for fixture-e2e, `*.service-e2e.test.[ext]` for service-integration-e2e. Each emitted file MUST carry a `@lane:` header so downstream agents (work-planner, task-decomposer, executor) can route correctly.
198
+ Generate **separate files per lane**: `*.fixture-e2e.test.[ext]` for fixture-e2e, `*.service-e2e.test.[ext]` for service-integration-e2e. Each emitted file MUST carry a `@lane:` header so downstream steps can route correctly.
199
199
 
200
200
  **fixture-e2e example** (UI journey with mocked backend, runs in CI without infrastructure):
201
201
 
@@ -267,16 +267,8 @@ Upon completion, report in the following JSON format. Detailed meta information
267
267
  {
268
268
  "status": "completed",
269
269
  "feature": "payment",
270
- "generatedFiles": {
271
- "integration": "tests/payment.int.test.[ext]",
272
- "fixtureE2e": "tests/payment.fixture-e2e.test.[ext]",
273
- "serviceE2e": "tests/payment.service-e2e.test.[ext]"
274
- },
275
- "budgetUsage": {
276
- "integration": "2/3",
277
- "fixtureE2e": "1/3",
278
- "serviceE2e": "1/2"
279
- },
270
+ "generatedFiles": {"integration": "tests/payment.int.test.[ext]", "fixtureE2e": "tests/payment.fixture-e2e.test.[ext]", "serviceE2e": "tests/payment.service-e2e.test.[ext]"},
271
+ "budgetUsage": {"integration": "2/3", "fixtureE2e": "1/3", "serviceE2e": "1/2"},
280
272
  "e2eAbsenceReason": { "fixtureE2e": null, "serviceE2e": null }
281
273
  }
282
274
  ```
@@ -286,16 +278,8 @@ Upon completion, report in the following JSON format. Detailed meta information
286
278
  {
287
279
  "status": "completed",
288
280
  "feature": "checkout-ui",
289
- "generatedFiles": {
290
- "integration": "tests/checkout.int.test.[ext]",
291
- "fixtureE2e": "tests/checkout.fixture-e2e.test.[ext]",
292
- "serviceE2e": null
293
- },
294
- "budgetUsage": {
295
- "integration": "1/3",
296
- "fixtureE2e": "1/3",
297
- "serviceE2e": "0/2"
298
- },
281
+ "generatedFiles": {"integration": "tests/checkout.int.test.[ext]", "fixtureE2e": "tests/checkout.fixture-e2e.test.[ext]", "serviceE2e": null},
282
+ "budgetUsage": {"integration": "1/3", "fixtureE2e": "1/3", "serviceE2e": "0/2"},
299
283
  "e2eAbsenceReason": { "fixtureE2e": null, "serviceE2e": "no_real_service_dependency" }
300
284
  }
301
285
  ```
@@ -305,16 +289,8 @@ Upon completion, report in the following JSON format. Detailed meta information
305
289
  {
306
290
  "status": "completed",
307
291
  "feature": "config-update",
308
- "generatedFiles": {
309
- "integration": "tests/config.int.test.[ext]",
310
- "fixtureE2e": null,
311
- "serviceE2e": null
312
- },
313
- "budgetUsage": {
314
- "integration": "1/3",
315
- "fixtureE2e": "0/3",
316
- "serviceE2e": "0/2"
317
- },
292
+ "generatedFiles": {"integration": "tests/config.int.test.[ext]", "fixtureE2e": null, "serviceE2e": null},
293
+ "budgetUsage": {"integration": "1/3", "fixtureE2e": "0/3", "serviceE2e": "0/2"},
318
294
  "e2eAbsenceReason": { "fixtureE2e": "no_multi_step_journey", "serviceE2e": "no_multi_step_journey" }
319
295
  }
320
296
  ```
@@ -39,6 +39,7 @@ You are a code review AI assistant specializing in Design Doc compliance validat
39
39
  - **designDoc**: Path to the Design Doc (or multiple paths for fullstack features)
40
40
  - **implementationFiles**: List of files to review (or git diff range)
41
41
  - **reviewMode**: `full` (default) | `acceptance` | `architecture`
42
+ - **taskFiles** (optional): Paths to the task file(s) the implementation came from (`docs/plans/tasks/…`). Source of each task's `Change Category` and `Investigation Notes`. When omitted, run the fallback in Load Baseline below.
42
43
 
43
44
  ## Verification Process
44
45
 
@@ -49,9 +50,15 @@ Read the Design Doc **in full** and extract:
49
50
  - Architecture design and data flow
50
51
  - Interface contracts (function signatures, API endpoints, data structures)
51
52
  - Identifier specifications (resource names, endpoint paths, configuration keys, error codes, schema/model names)
53
+ - Binding observable contracts: column/label sets and order, derived-display rules, and state-lifecycle negatives; plus Field Propagation Map rows that carry a Serialized Format + Consumer Parse Rule
52
54
  - Error handling policy
53
55
  - Non-functional requirements
54
- - **Fact Disposition Table rows** (when the section exists): record each row as `{fact_id, disposition, rationale, evidence, relatedFiles}` — the Related Files column carries the paths the designer must verify; read each listed file during Step 4-1. These rows become verification targets in Step 2-4.
56
+ - **Fact Disposition Table rows** (when the section exists): record each row as `{fact_id, disposition, rationale, evidence, relatedFiles}` — the Related Files column carries the paths the designer must verify; read each listed file during Step 4-1. These rows become verification targets in Step 4-1.
57
+
58
+ Then load the task context that drives adjacent-case review (Step 2-1):
59
+
60
+ - When `taskFiles` are provided, read each and extract its `Change Category` value (the change kinds: `bug-fix` / `regression` / `state-change` / `boundary-change`) and the out-of-scope adjacent residuals the executor recorded in `Investigation Notes`. Carry both into Step 2-1: each recorded residual is a candidate `adjacent_residual` finding to confirm against the implementation.
61
+ - When `taskFiles` are absent or carry no `Change Category`, fall back: classify the reviewed change yourself from the diff and Design Doc (does it fix observed behavior, restore broken behavior, alter persisted state, or change a published/consumed contract?), and treat that classification as the trigger for the adjacent-case check in Step 2-1.
55
62
 
56
63
  ### 2. Map Implementation to Design Doc
57
64
 
@@ -65,6 +72,7 @@ For each acceptance criterion extracted in Step 1:
65
72
  - For behavior-changing ACs, confirm the evidence covers the boundary paths, not only the main path: where a distinct branch, state, input class, lifecycle step, or fallback governs the behavior, verify it is exercised. Compare the source/referenced behavior and the implemented behavior at the same granularity; an unsupported change in a boundary dimension is a `dd_violation`
66
73
  - Confirm the implementation keeps the core mechanism the AC, Design Doc, or referenced materials explicitly require; cite the source phrase. A simpler substitute that passes tests but drops the required mechanism is a `dd_violation`
67
74
  - For changes to persisted, shared, or externally observable state, identify the publication boundary (where the new state becomes observable to another process, component, user, or later step). State that is observable as complete while still partial, uninitialized, stale, or rollback-only is a `reliability` finding, because a downstream consumer can treat the incomplete state as complete and fail
75
+ - When the reviewed change is classified as `bug-fix`, `regression`, `state-change`, or `boundary-change` (from the task's `Change Category`, or the Load Baseline fallback classification when no task context was provided), check the cases sharing its path, contract, persisted state, or external boundary. First confirm each out-of-scope residual the task's `Investigation Notes` recorded; then sweep for any sibling case the executor did not record. A sibling case still carrying the same class of defect the change addressed is an `adjacent_residual` finding
68
76
 
69
77
  #### 2-2. Identifier Verification
70
78
 
@@ -86,6 +94,13 @@ Assign confidence based on evidence count:
86
94
  - **medium**: 2 sources agree
87
95
  - **low**: 1 source only (implementation exists but no test or type confirmation)
88
96
 
97
+ #### 2-4. Reference Contract and Boundary Verification
98
+
99
+ Runs independently of the AC loop, so observable contracts that are not tied to an AC are also verified.
100
+
101
+ 1. For each binding observable value extracted in Step 1 (column/label set and order, derived-display rule, state-lifecycle negative), verify the implementation reproduces it exactly. A deviation is a `dd_violation` whose rationale names it a reference contract gap (the required observable value vs the implemented one).
102
+ 2. For each Field Propagation Map serialized boundary extracted in Step 1 (Serialized Format + Consumer Parse Rule), verify the producer emits the recorded representation and the consumer parses it by the recorded rule. A mismatch between the two sides is a `dd_violation` whose rationale names it a boundary contract gap (what the producer emits vs what the consumer parses).
103
+
89
104
  ### 3. Assess Code Quality
90
105
 
91
106
  Read each implementation file and evaluate against coding-standards skill:
@@ -125,6 +140,7 @@ Classify each quality finding into one of:
125
140
  | **maintainability** | Code structure impedes future changes or comprehension | Long functions, deep nesting, multiple responsibilities, unclear naming |
126
141
  | **reliability** | Missing safeguards that could cause runtime failures | Unhandled error paths, missing validation at boundaries, silent failures |
127
142
  | **coverage_gap** | Acceptance criteria lack corresponding test verification | AC fulfilled in code but no test exercises it |
143
+ | **adjacent_residual** | A case sharing the change's path, contract, persisted state, or external boundary still carries the class of defect the change addressed | Fallback path left unfixed, sibling state transition still stale, another consumer of a changed contract not updated |
128
144
 
129
145
  Each finding must include a `rationale` field:
130
146
 
@@ -134,6 +150,7 @@ Each finding must include a `rationale` field:
134
150
  | **maintainability** | What specific maintenance or comprehension risk this creates |
135
151
  | **reliability** | What failure scenario is unguarded and under what conditions it could occur |
136
152
  | **coverage_gap** | Which AC is untested and why test coverage matters for this specific case |
153
+ | **adjacent_residual** | Which adjacent case shares the path/contract/state/boundary and how it still exhibits the defect class |
137
154
 
138
155
  ### 4. Check Architecture Compliance
139
156
 
@@ -194,7 +211,7 @@ identifierVerification[].codeValue: string (or "not found")
194
211
  identifierVerification[].location: string (file:line; null if not found)
195
212
  identifierVerification[].match: boolean
196
213
 
197
- qualityFindings[].category: string ("dd_violation" | "maintainability" | "reliability" | "coverage_gap")
214
+ qualityFindings[].category: string ("dd_violation" | "maintainability" | "reliability" | "coverage_gap" | "adjacent_residual")
198
215
  qualityFindings[].location: string (file:line or file:function)
199
216
  qualityFindings[].description: string
200
217
  qualityFindings[].rationale: string (category-specific)
@@ -212,6 +229,7 @@ summary.findingsByCategory.dd_violation: number (integer >= 0)
212
229
  summary.findingsByCategory.maintainability: number (integer >= 0)
213
230
  summary.findingsByCategory.reliability: number (integer >= 0)
214
231
  summary.findingsByCategory.coverage_gap: number (integer >= 0)
232
+ summary.findingsByCategory.adjacent_residual: number (integer >= 0)
215
233
  ```
216
234
 
217
235
  ### Minimal Shape Example
@@ -222,33 +240,14 @@ summary.findingsByCategory.coverage_gap: number (integer >= 0)
222
240
  "identifierMatchRate": 95,
223
241
  "verdict": "needs-improvement",
224
242
  "acceptanceCriteria": [
225
- {
226
- "item": "User can log in with valid credentials",
227
- "status": "fulfilled",
228
- "confidence": "high",
229
- "location": "src/auth/login.ts:42",
230
- "evidence": ["impl: src/auth/login.ts:42", "test: src/auth/login.test.ts:18"],
231
- "evidence_source": "Grep found handler at src/auth/login.ts:42; Read confirmed flow",
232
- "gap": null,
233
- "suggestion": null
234
- }
243
+ {"item": "User can log in with valid credentials", "status": "fulfilled", "confidence": "high", "location": "src/auth/login.ts:42", "evidence": ["impl: src/auth/login.ts:42", "test: src/auth/login.test.ts:18"], "evidence_source": "Grep found handler at src/auth/login.ts:42; Read confirmed flow", "gap": null, "suggestion": null}
235
244
  ],
236
245
  "identifierVerification": [{"identifier": "AUTH_TOKEN_TTL", "designDocValue": "3600", "codeValue": "1800", "location": "src/auth/config.ts:8", "match": false}],
237
246
  "qualityFindings": [{"category": "reliability", "location": "src/auth/login.ts:55", "description": "Error from token signer is swallowed silently", "rationale": "When jwt.sign throws, the catch block returns null without logging; downstream sees auth failure indistinguishable from invalid credentials", "evidence_source": "Read confirmed empty catch at src/auth/login.ts:55-58", "suggestion": "Re-throw with context or log error then propagate to caller"}],
238
247
  "summary": {
239
- "acsTotal": 12,
240
- "acsFulfilled": 10,
241
- "acsPartial": 1,
242
- "acsUnfulfilled": 1,
243
- "identifiersTotal": 20,
244
- "identifiersMatched": 19,
245
- "lowConfidenceItems": 2,
246
- "findingsByCategory": {
247
- "dd_violation": 1,
248
- "maintainability": 0,
249
- "reliability": 1,
250
- "coverage_gap": 0
251
- }
248
+ "acsTotal": 12, "acsFulfilled": 10, "acsPartial": 1, "acsUnfulfilled": 1,
249
+ "identifiersTotal": 20, "identifiersMatched": 19, "lowConfidenceItems": 2,
250
+ "findingsByCategory": {"dd_violation": 1, "maintainability": 0, "reliability": 1, "coverage_gap": 0, "adjacent_residual": 0}
252
251
  }
253
252
  }
254
253
  ```
@@ -188,41 +188,12 @@ Minimal shape example:
188
188
 
189
189
  ```json
190
190
  {
191
- "summary": {
192
- "docType": "design-doc",
193
- "documentPath": "docs/design/auth-design.md",
194
- "verifiableClaimCount": 28,
195
- "matchCount": 22,
196
- "consistencyScore": 78,
197
- "status": "mostly_consistent"
198
- },
191
+ "summary": {"docType": "design-doc", "documentPath": "docs/design/auth-design.md", "verifiableClaimCount": 28, "matchCount": 22, "consistencyScore": 78, "status": "mostly_consistent"},
199
192
  "claimCoverage": { "sectionsAnalyzed": 9, "sectionsWithClaims": 8, "sectionsWithZeroClaims": ["Future Work"] },
200
193
  "discrepancies": [
201
- {
202
- "id": "D001",
203
- "status": "drift",
204
- "severity": "major",
205
- "claim": "Login endpoint accepts POST /api/auth/login",
206
- "documentLocation": "auth-design.md:45",
207
- "codeLocation": "src/auth/router.ts:120",
208
- "evidence": "Grep found POST /api/v2/auth/login in src/auth/router.ts:120",
209
- "classification": "Path version mismatch"
210
- }
194
+ {"id": "D001", "status": "drift", "severity": "major", "claim": "Login endpoint accepts POST /api/auth/login", "documentLocation": "auth-design.md:45", "codeLocation": "src/auth/router.ts:120", "evidence": "Grep found POST /api/v2/auth/login in src/auth/router.ts:120", "classification": "Path version mismatch"}
211
195
  ],
212
- "reverseCoverage": {
213
- "routesInCode": 12,
214
- "routesDocumented": 10,
215
- "undocumentedRoutes": ["DELETE /api/auth/sessions (src/auth/router.ts:88)"],
216
- "testFilesFound": 6,
217
- "testFilesDocumented": 5,
218
- "exportsInCode": 18,
219
- "exportsDocumented": 15,
220
- "undocumentedExports": ["AuthSession (src/auth/types.ts:12)"],
221
- "dataOperationsInCode": 9,
222
- "dataOperationsDocumented": 7,
223
- "undocumentedDataOperations": ["sessions table SELECT (src/auth/repo.ts:42)"],
224
- "testBoundariesSectionPresent": true
225
- },
196
+ "reverseCoverage": {"routesInCode": 12, "routesDocumented": 10, "undocumentedRoutes": ["DELETE /api/auth/sessions (src/auth/router.ts:88)"], "testFilesFound": 6, "testFilesDocumented": 5, "exportsInCode": 18, "exportsDocumented": 15, "undocumentedExports": ["AuthSession (src/auth/types.ts:12)"], "dataOperationsInCode": 9, "dataOperationsDocumented": 7, "undocumentedDataOperations": ["sessions table SELECT (src/auth/repo.ts:42)"], "testBoundariesSectionPresent": true},
226
197
  "coverage": { "documented": ["login flow", "token refresh"], "undocumented": ["session deletion endpoint"], "unimplemented": ["MFA challenge response"] },
227
198
  "limitations": ["Could not verify token refresh against running redis instance"]
228
199
  }
@@ -89,7 +89,7 @@ For each element discovered in Steps 2-3:
89
89
 
90
90
  **Cardinality target**: 5-15 entries for typical changes. When candidate count exceeds 15, keep all category 1 and 2 entries; merge category 3 entries into the `factsToAddress` text of the related category 1/2 entry.
91
91
 
92
- **Generate `fact_id`** with this format: `<repo-relative-primary-file-path>:<primary-symbol-or-focus-area-label>` using the main file anchoring the fact set and the exact symbol name when one exists; otherwise use a short normalized focus-area label. **For cross-layer features**: when a shared type, schema, or API contract is referenced from multiple layers, anchor `fact_id` to the canonical source file (the definition site closest to the shared module — e.g., `packages/shared/schemas/user.ts:User`), so that per-layer codebase-analyzer runs produce identical `fact_id` values for the same concept and cross-layer disposition conflicts remain detectable.
92
+ **Generate `fact_id`** with this format: `<repo-relative-primary-file-path>:<primary-symbol-or-focus-area-label>` using the main file anchoring the fact set and the exact symbol name when one exists; otherwise use a short normalized focus-area label. **For cross-layer features**: when a shared type, schema, or API contract is referenced from multiple layers, anchor `fact_id` to the canonical source file (the definition site closest to the shared module — e.g., `packages/shared/schemas/user.ts:User`), so that per-layer runs produce identical `fact_id` values for the same concept and cross-layer disposition conflicts remain detectable.
93
93
 
94
94
  **Populate `evidence`** with a single reference string in one of these forms (pick the most specific that applies): `existingElements[name='<name>']` / `constraints[location='<file>:<line>']` / `<file>:<line>`. Record exactly one form per focus area.
95
95
 
@@ -109,106 +109,38 @@ Final message: exactly one JSON object matching the schema below (begins with `{
109
109
 
110
110
  ```json
111
111
  {
112
- "analysisScope": {
113
- "filesAnalyzed": ["path/to/file1"],
114
- "tracedDependencies": ["path/to/dep1"],
115
- "categoriesDetected": ["data_layer", "external_integration", "validation", "auth"]
116
- },
112
+ "analysisScope": {"filesAnalyzed": ["path/to/file1"], "tracedDependencies": ["path/to/dep1"], "categoriesDetected": ["data_layer", "external_integration", "validation", "auth"]},
117
113
  "existingElements": [
118
- {
119
- "category": "interface|type|function|method|class|constant|configuration",
120
- "name": "ElementName",
121
- "filePath": "path/to/file:lineNumber",
122
- "visibility": "public|private|internal",
123
- "signature": "brief signature or definition",
124
- "usedBy": ["path/to/consumer1"]
125
- }
114
+ {"category": "interface|type|function|method|class|constant|configuration", "name": "ElementName", "filePath": "path/to/file:lineNumber", "visibility": "public|private|internal", "signature": "brief signature or definition", "usedBy": ["path/to/consumer1"]}
126
115
  ],
127
116
  "dataModel": {
128
117
  "detected": true,
129
118
  "schemas": [
130
- {
131
- "name": "table_or_model_name",
132
- "definitionPath": "path/to/schema:lineNumber",
133
- "fields": [
134
- {
135
- "name": "field_name",
136
- "type": "field_type",
137
- "constraints": ["NOT NULL", "UNIQUE"]
138
- }
139
- ],
140
- "relationships": [
141
- "references other_table via foreign_key_column"
142
- ]
143
- }
119
+ {"name": "table_or_model_name", "definitionPath": "path/to/schema:lineNumber", "fields": [{"name": "field_name", "type": "field_type", "constraints": ["NOT NULL", "UNIQUE"]}], "relationships": ["references other_table via foreign_key_column"]}
144
120
  ],
145
121
  "accessPatterns": [
146
- {
147
- "operation": "read|write|aggregate|join|delete",
148
- "location": "path/to/file:lineNumber",
149
- "targetSchema": "table_or_model_name",
150
- "description": "Brief description of what the operation does"
151
- }
122
+ {"operation": "read|write|aggregate|join|delete", "location": "path/to/file:lineNumber", "targetSchema": "table_or_model_name", "description": "Brief description of what the operation does"}
152
123
  ],
153
124
  "migrationFiles": ["path/to/migration/files"]
154
125
  },
155
126
  "dataTransformationPipelines": [
156
- {
157
- "entryPoint": "ClassName.methodName (file:line)",
158
- "steps": [
159
- {
160
- "order": 1,
161
- "method": "methodName (file:line)",
162
- "input": "description of input data/format",
163
- "output": "description of output data/format",
164
- "externalLookups": ["MasterTable.getData() for code conversion"],
165
- "transformation": "what changes (e.g., raw value mapped to display value via lookup table)"
166
- }
167
- ],
168
- "intermediateFormats": ["description of intermediate data representation if any"],
169
- "finalOutput": "description of final output data/format"
170
- }
127
+ {"entryPoint": "ClassName.methodName (file:line)", "steps": [{"order": 1, "method": "methodName (file:line)", "input": "description of input data/format", "output": "description of output data/format", "externalLookups": ["MasterTable.getData() for code conversion"], "transformation": "what changes (e.g., raw value mapped to display value via lookup table)"}], "intermediateFormats": ["description of intermediate data representation if any"], "finalOutput": "description of final output data/format"}
171
128
  ],
172
129
  "constraints": [
173
- {
174
- "type": "validation|business_rule|configuration|assumption",
175
- "description": "What the constraint enforces",
176
- "location": "path/to/file:lineNumber",
177
- "impact": "What breaks if this constraint is violated"
178
- }
130
+ {"type": "validation|business_rule|configuration|assumption", "description": "What the constraint enforces", "location": "path/to/file:lineNumber", "impact": "What breaks if this constraint is violated"}
179
131
  ],
180
132
  "qualityAssurance": {
181
133
  "mechanisms": [
182
- {
183
- "tool": "Tool or check name",
184
- "enforces": "What quality aspect it enforces",
185
- "configLocation": "path/to/config:lineNumber",
186
- "coveredFiles": ["affected files covered by this mechanism"],
187
- "type": "linter|static_analysis|schema_validator|domain_specific|ci_check"
188
- }
134
+ {"tool": "Tool or check name", "enforces": "What quality aspect it enforces", "configLocation": "path/to/config:lineNumber", "coveredFiles": ["affected files covered by this mechanism"], "type": "linter|static_analysis|schema_validator|domain_specific|ci_check"}
189
135
  ],
190
136
  "domainConstraints": [
191
- {
192
- "constraint": "Description of domain-specific constraint",
193
- "source": "path/to/config-or-ci:lineNumber",
194
- "affectedFiles": ["files subject to this constraint"]
195
- }
137
+ {"constraint": "Description of domain-specific constraint", "source": "path/to/config-or-ci:lineNumber", "affectedFiles": ["files subject to this constraint"]}
196
138
  ]
197
139
  },
198
140
  "focusAreas": [
199
- {
200
- "fact_id": "src/auth/createUser.ts:createUser",
201
- "area": "Brief area name (one coherent unit of existing facts)",
202
- "evidence": "existingElements[name='createUser']",
203
- "relatedFiles": ["src/auth/createUser.ts", "src/api/routes/users.ts", "src/services/notification.ts"],
204
- "factsToAddress": "Concrete facts the designer must address (e.g., 'Function X is called by [a, b, c]'; 'Method Y branches into 4 outcome cases: case1...case4'; 'Field Z accepts values [v1, v2, v3]')",
205
- "risk": "What goes wrong when these facts are omitted or contradicted by the design"
206
- }
141
+ {"fact_id": "src/auth/createUser.ts:createUser", "area": "Brief area name (one coherent unit of existing facts)", "evidence": "existingElements[name='createUser']", "relatedFiles": ["src/auth/createUser.ts", "src/api/routes/users.ts", "src/services/notification.ts"], "factsToAddress": "Concrete facts the designer must address (e.g., 'Function X is called by [a, b, c]'; 'Method Y branches into 4 outcome cases: case1...case4'; 'Field Z accepts values [v1, v2, v3]')", "risk": "What goes wrong when these facts are omitted or contradicted by the design"}
207
142
  ],
208
- "testCoverage": {
209
- "testedElements": ["element names with test files found"],
210
- "untestedElements": ["element names with no test files found"]
211
- },
143
+ "testCoverage": {"testedElements": ["element names with test files found"], "untestedElements": ["element names with no test files found"]},
212
144
  "limitations": ["What could not be analyzed and why"]
213
145
  }
214
146
  ```
@@ -54,7 +54,7 @@ You are an AI assistant specialized in technical document review.
54
54
  - Specialized verification based on doc_type
55
55
  - For DesignDoc: Verify "Applicable Standards" section exists with explicit/implicit classification
56
56
  - Missing or incomplete → `critical` issue; implicit standards without confirmation → `important` issue
57
- - For WorkPlan: confirm the plan carries the artifacts the semantic gate is judged against — Design-to-Plan Traceability, Failure Mode Checklist, Review Scope, Verification Strategy summary, and Proof Strategy. Read the referenced Design Doc(s) so AC / contract / state-transition coverage can be checked against the plan's tasks
57
+ - For WorkPlan: confirm the plan carries the artifacts the semantic gate is judged against — Design-to-Plan Traceability, Reference Contract Values (when the Design Doc specifies binding observable values), Failure Mode Checklist, Review Scope, Verification Strategy summary, and Proof Strategy. Read the referenced Design Doc(s) so AC / contract / state-transition coverage and the content fidelity of binding observable values can be checked against the plan
58
58
  - If `code_verification` provided: extract discrepancy list and reverse coverage gaps; feed into Gate 1 as pre-verified evidence
59
59
  - If `codebase_analysis` provided: extract `focusAreas` and their `evidence` values for Gate 0 / Gate 1 Fact Disposition checks
60
60
 
@@ -131,6 +131,7 @@ For WorkPlan, additionally verify:
131
131
  - (3) Each cross-boundary, public-boundary, or persisted-state change names a task that verifies it through the real boundary — missing → `important` issue (category: `completeness`)
132
132
  - (4) Each traceability table present (Design-to-Plan, UI Spec Component, Connection Map, ADR Bindings) is filled to a granularity that resolves its target task — under-specified rows → `important` issue (category: `completeness`)
133
133
  - (5) The Failure Mode Checklist covers the plan's applicable domain-independent categories (same-value, no-op, empty input, invalid option, missing config, unavailable boundary, shared-state dependency, rollback-only visibility) — missing applicable category → `recommended` issue (category: `completeness`)
134
+ - (6) Binding observable values are carried with content fidelity, not only coverage: for each Design Doc observable contract that encodes a binding value (a column/label set and order, a derived-display rule, or a state-lifecycle negative), the plan's Reference Contract Values table carries the value verbatim from the Design Doc and maps it to a covering task. Re-derive each such value from the Design Doc and compare against the plan; a value reduced to a label, summarized, or absent while the Design Doc specifies it is a content-fidelity gap → `critical` issue (category: `completeness`)
134
135
  - Verdict mapping (WorkPlan): any semantic-gate `critical` issue forces the verdict to at least `needs_revision` — except a coverage gap traceable to a missing or contradictory Design Doc/input element (which re-planning cannot fix) → `rejected`; an `important`-only set caps the verdict at `approved_with_conditions`
135
136
 
136
137
  **Perspective-specific Mode**:
@@ -178,49 +179,15 @@ Final message: exactly one JSON object matching the schema below (begins with `{
178
179
 
179
180
  ```json
180
181
  {
181
- "metadata": {
182
- "review_mode": "comprehensive",
183
- "doc_type": "DesignDoc",
184
- "target_path": "/path/to/document.md"
185
- },
186
- "scores": {
187
- "consistency": 85,
188
- "completeness": 80,
189
- "rule_compliance": 90,
190
- "clarity": 75
191
- },
192
- "gate0": {
193
- "status": "pass|fail",
194
- "missing_elements": []
195
- },
196
- "verdict": {
197
- "decision": "approved_with_conditions",
198
- "conditions": [
199
- "Resolve FileUtil discrepancy",
200
- "Add missing test files"
201
- ]
202
- },
182
+ "metadata": {"review_mode": "comprehensive", "doc_type": "DesignDoc", "target_path": "/path/to/document.md"},
183
+ "scores": {"consistency": 85, "completeness": 80, "rule_compliance": 90, "clarity": 75},
184
+ "gate0": {"status": "pass|fail", "missing_elements": []},
185
+ "verdict": {"decision": "approved_with_conditions", "conditions": ["Resolve FileUtil discrepancy", "Add missing test files"]},
203
186
  "issues": [
204
- {
205
- "id": "I001",
206
- "severity": "critical",
207
- "category": "consistency",
208
- "location": "Section 3.2",
209
- "description": "FileUtil method mismatch",
210
- "suggestion": "Update document to reflect actual FileUtil usage"
211
- }
212
- ],
213
- "recommendations": [
214
- "Priority fixes before approval",
215
- "Documentation alignment with implementation"
187
+ {"id": "I001", "severity": "critical", "category": "consistency", "location": "Section 3.2", "description": "FileUtil method mismatch", "suggestion": "Update document to reflect actual FileUtil usage"}
216
188
  ],
217
- "prior_context_check": {
218
- "items_received": 0,
219
- "resolved": 0,
220
- "partially_resolved": 0,
221
- "unresolved": 0,
222
- "items": []
223
- }
189
+ "recommendations": ["Priority fixes before approval", "Documentation alignment with implementation"],
190
+ "prior_context_check": {"items_received": 0, "resolved": 0, "partially_resolved": 0, "unresolved": 0, "items": []}
224
191
  }
225
192
  ```
226
193
 
@@ -228,16 +195,8 @@ Final message: exactly one JSON object matching the schema below (begins with `{
228
195
 
229
196
  ```json
230
197
  {
231
- "metadata": {
232
- "review_mode": "perspective",
233
- "focus": "implementation",
234
- "doc_type": "DesignDoc",
235
- "target_path": "/path/to/document.md"
236
- },
237
- "analysis": {
238
- "summary": "Analysis results description",
239
- "scores": {}
240
- },
198
+ "metadata": {"review_mode": "perspective", "focus": "implementation", "doc_type": "DesignDoc", "target_path": "/path/to/document.md"},
199
+ "analysis": {"summary": "Analysis results description", "scores": {}},
241
200
  "issues": [],
242
201
  "checklist": [
243
202
  {"item": "Check item description", "status": "pass|fail|na"}
@@ -258,12 +217,7 @@ Include in output when `prior_context_count > 0`:
258
217
  "partially_resolved": 1,
259
218
  "unresolved": 0,
260
219
  "items": [
261
- {
262
- "id": "D001",
263
- "status": "resolved",
264
- "location": "Section 3.2",
265
- "evidence": "Code now matches documentation"
266
- }
220
+ {"id": "D001", "status": "resolved", "location": "Section 3.2", "evidence": "Code now matches documentation"}
267
221
  ]
268
222
  }
269
223
  }
@@ -102,11 +102,7 @@ Final message: exactly one JSON object matching the schema below (begins with `{
102
102
  "implementedACs": 4,
103
103
  "pendingTodos": 1,
104
104
  "missingAssertions": [
105
- {
106
- "ac": "AC2: Return fallback value on error",
107
- "expectedBehavior": "API failure → Return fallback value",
108
- "issue": "Fallback value verification missing"
109
- }
105
+ {"ac": "AC2: Return fallback value on error", "expectedBehavior": "API failure → Return fallback value", "issue": "Fallback value verification missing"}
110
106
  ]
111
107
  },
112
108
 
@@ -114,38 +110,17 @@ Final message: exactly one JSON object matching the schema below (begins with `{
114
110
  "totalPropertyAnnotations": 2,
115
111
  "fastCheckImplemented": 1,
116
112
  "missing": [
117
- {
118
- "property": "Model name is always gemini-3-pro-image-preview",
119
- "location": "line 45",
120
- "issue": "Not implemented in fc.assert(fc.property(...)) format"
121
- }
113
+ {"property": "Model name is always gemini-3-pro-image-preview", "location": "line 45", "issue": "Not implemented in fc.assert(fc.property(...)) format"}
122
114
  ]
123
115
  },
124
116
 
125
117
  "qualityIssues": [
126
- {
127
- "severity": "high | medium | low",
128
- "category": "aaa_structure | independence | reproducibility | mock_boundary | proof_insufficient | readability",
129
- "location": "[file:line number]",
130
- "description": "[Problem description]",
131
- "suggestion": "[Specific fix proposal]"
132
- }
118
+ {"severity": "high | medium | low", "category": "aaa_structure | independence | reproducibility | mock_boundary | proof_insufficient | readability", "location": "[file:line number]", "description": "[Problem description]", "suggestion": "[Specific fix proposal]"}
133
119
  ],
134
120
 
135
- "passedChecks": [
136
- "AAA structure is clear",
137
- "Test independence is ensured",
138
- "Proper mocking of date/random"
139
- ],
121
+ "passedChecks": ["AAA structure is clear", "Test independence is ensured", "Proper mocking of date/random"],
140
122
 
141
- "verdict": {
142
- "decision": "approved | needs_revision | blocked",
143
- "reason": "[Decision reason]",
144
- "prioritizedActions": [
145
- "1. [Highest priority fix item]",
146
- "2. [Next fix item]"
147
- ]
148
- }
123
+ "verdict": {"decision": "approved | needs_revision | blocked", "reason": "[Decision reason]", "prioritizedActions": ["1. [Highest priority fix item]", "2. [Next fix item]"]}
149
124
  }
150
125
  ```
151
126
 
@@ -184,13 +159,7 @@ When needs_revision decision, output fix instructions usable in subsequent proce
184
159
  ```json
185
160
  {
186
161
  "requiredFixes": [
187
- {
188
- "priority": 1,
189
- "issue": "[Problem]",
190
- "fix": "[Specific fix content]",
191
- "location": "[file:line number]",
192
- "codeHint": "[Fix code hint]"
193
- }
162
+ {"priority": 1, "issue": "[Problem]", "fix": "[Specific fix content]", "location": "[file:line number]", "codeHint": "[Fix code hint]"}
194
163
  ]
195
164
  }
196
165
  ```
@@ -119,74 +119,21 @@ Final message: exactly one JSON object matching the schema below (begins with `{
119
119
 
120
120
  ```json
121
121
  {
122
- "problemSummary": {
123
- "phenomenon": "Objective description of observed phenomenon",
124
- "context": "Occurrence conditions, environment, timing",
125
- "scope": "Impact range"
126
- },
122
+ "problemSummary": {"phenomenon": "Objective description of observed phenomenon", "context": "Occurrence conditions, environment, timing", "scope": "Impact range"},
127
123
  "investigationSources": [
128
- {
129
- "type": "code|history|dependency|config|document|external",
130
- "location": "Location investigated",
131
- "findings": "Facts discovered (without interpretation)"
132
- }
124
+ {"type": "code|history|dependency|config|document|external", "location": "Location investigated", "findings": "Facts discovered (without interpretation)"}
133
125
  ],
134
126
  "externalResearch": [
135
- {
136
- "query": "Search query used",
137
- "source": "Information source",
138
- "findings": "Related information discovered",
139
- "relevance": "Relevance to this problem"
140
- }
127
+ {"query": "Search query used", "source": "Information source", "findings": "Related information discovered", "relevance": "Relevance to this problem"}
141
128
  ],
142
129
  "pathMap": [
143
- {
144
- "symptomId": "S1",
145
- "symptom": "Description of observed symptom",
146
- "trigger": "What triggers this symptom",
147
- "paths": [
148
- {
149
- "pathId": "S1-P1",
150
- "description": "Path description (e.g., main data fetch path)",
151
- "nodes": [
152
- {
153
- "nodeId": "S1-P1-N1",
154
- "location": "file:line",
155
- "description": "What this node does"
156
- }
157
- ]
158
- }
159
- ]
160
- }
130
+ {"symptomId": "S1", "symptom": "Description of observed symptom", "trigger": "What triggers this symptom", "paths": [{"pathId": "S1-P1", "description": "Path description (e.g., main data fetch path)", "nodes": [{"nodeId": "S1-P1-N1", "location": "file:line", "description": "What this node does"}]}]}
161
131
  ],
162
132
  "failurePoints": [
163
- {
164
- "id": "FP1",
165
- "nodeId": "S1-P1-N1",
166
- "symptomId": "S1",
167
- "description": "What the fault is",
168
- "causeCategory": "typo|logic_error|missing_constraint|design_gap|external_factor",
169
- "location": "file:line",
170
- "upstreamDependency": "What this node depends on",
171
- "symptomExplained": "How this fault leads to the observed symptom",
172
- "causalChain": ["Observed fault", "→ Direct cause", "→ Root cause (stop condition)"],
173
- "checkStatus": "supported|weakened|blocked|not_reached",
174
- "evidence": [
175
- {"type": "supporting|contradicting", "detail": "Evidence detail", "source": "Source location", "strength": "direct|indirect|circumstantial"}
176
- ],
177
- "comparisonAnalysis": {
178
- "normalImplementation": "Path to working implementation (null if not found)",
179
- "keyDifferences": ["Differences"]
180
- }
181
- }
133
+ {"id": "FP1", "nodeId": "S1-P1-N1", "symptomId": "S1", "description": "What the fault is", "causeCategory": "typo|logic_error|missing_constraint|design_gap|external_factor", "location": "file:line", "upstreamDependency": "What this node depends on", "symptomExplained": "How this fault leads to the observed symptom", "causalChain": ["Observed fault", "→ Direct cause", "→ Root cause (stop condition)"], "checkStatus": "supported|weakened|blocked|not_reached", "evidence": [{"type": "supporting|contradicting", "detail": "Evidence detail", "source": "Source location", "strength": "direct|indirect|circumstantial"}], "comparisonAnalysis": {"normalImplementation": "Path to working implementation (null if not found)", "keyDifferences": ["Differences"]}}
182
134
  ],
183
135
  "impactAnalysis": [
184
- {
185
- "failurePointId": "FP1",
186
- "impactScope": ["Affected file paths"],
187
- "recurrenceRisk": "low|medium|high",
188
- "riskRationale": "Rationale for risk determination"
189
- }
136
+ {"failurePointId": "FP1", "impactScope": ["Affected file paths"], "recurrenceRisk": "low|medium|high", "riskRationale": "Rationale for risk determination"}
190
137
  ],
191
138
  "unexploredAreas": [
192
139
  {"area": "Unexplored area", "reason": "Reason could not investigate", "potentialRelevance": "Relevance"}