codex-workflows 0.6.8 → 0.7.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 (41) hide show
  1. package/.agents/skills/ai-development-guide/SKILL.md +5 -3
  2. package/.agents/skills/ai-development-guide/references/frontend.md +11 -19
  3. package/.agents/skills/coding-rules/references/typescript.md +17 -12
  4. package/.agents/skills/documentation-criteria/SKILL.md +1 -1
  5. package/.agents/skills/documentation-criteria/references/design-template.md +16 -5
  6. package/.agents/skills/documentation-criteria/references/plan-template.md +19 -5
  7. package/.agents/skills/documentation-criteria/references/task-template.md +19 -1
  8. package/.agents/skills/recipe-build/SKILL.md +1 -1
  9. package/.agents/skills/recipe-front-build/SKILL.md +1 -1
  10. package/.agents/skills/recipe-front-plan/SKILL.md +1 -1
  11. package/.agents/skills/recipe-fullstack-build/SKILL.md +1 -1
  12. package/.agents/skills/recipe-plan/SKILL.md +1 -1
  13. package/.agents/skills/recipe-prepare-implementation/SKILL.md +2 -1
  14. package/.agents/skills/subagents-orchestration-guide/SKILL.md +2 -2
  15. package/.agents/skills/subagents-orchestration-guide/references/monorepo-flow.md +1 -1
  16. package/.agents/skills/testing/SKILL.md +5 -5
  17. package/.agents/skills/testing/references/typescript.md +2 -6
  18. package/.codex/agents/acceptance-test-generator.toml +2 -44
  19. package/.codex/agents/code-reviewer.toml +12 -57
  20. package/.codex/agents/code-verifier.toml +1 -47
  21. package/.codex/agents/codebase-analyzer.toml +1 -106
  22. package/.codex/agents/design-sync.toml +2 -64
  23. package/.codex/agents/document-reviewer.toml +8 -81
  24. package/.codex/agents/integration-test-reviewer.toml +1 -26
  25. package/.codex/agents/investigator.toml +1 -73
  26. package/.codex/agents/quality-fixer-frontend.toml +4 -105
  27. package/.codex/agents/quality-fixer.toml +4 -122
  28. package/.codex/agents/requirement-analyzer.toml +1 -29
  29. package/.codex/agents/rule-advisor.toml +1 -79
  30. package/.codex/agents/scope-discoverer.toml +1 -70
  31. package/.codex/agents/security-reviewer.toml +1 -19
  32. package/.codex/agents/solver.toml +5 -54
  33. package/.codex/agents/task-decomposer.toml +47 -4
  34. package/.codex/agents/task-executor-frontend.toml +37 -144
  35. package/.codex/agents/task-executor.toml +37 -144
  36. package/.codex/agents/technical-designer-frontend.toml +8 -0
  37. package/.codex/agents/technical-designer.toml +10 -1
  38. package/.codex/agents/ui-analyzer.toml +1 -157
  39. package/.codex/agents/verifier.toml +2 -65
  40. package/.codex/agents/work-planner.toml +30 -9
  41. package/package.json +1 -1
@@ -158,140 +158,22 @@ Return one of the following as the final response (see Output Format for schemas
158
158
 
159
159
  **When incomplete implementation is detected**:
160
160
  ```json
161
- {
162
- "status": "stub_detected",
163
- "summary": "Incomplete implementation detected in changed code before quality checks.",
164
- "stubFindings": [
165
- {
166
- "file": "src/example.ts",
167
- "indicator": "TODO marker",
168
- "details": "TODO comment defers required business logic in the task scope"
169
- }
170
- ],
171
- "nextActions": "Return to task-executor and complete the implementation before re-running quality-fixer."
172
- }
161
+ {"status":"stub_detected","summary":"Incomplete implementation detected in changed code before quality checks.","stubFindings":[{"file":"src/example.ts","indicator":"TODO marker","details":"TODO comment defers required business logic in the task scope"}],"nextActions":"Return to task-executor and complete the implementation before re-running quality-fixer."}
173
162
  ```
174
163
 
175
164
  **When quality check succeeds**:
176
165
  ```json
177
- {
178
- "status": "approved",
179
- "summary": "Overall quality check completed. All checks passed.",
180
- "checksPerformed": {
181
- "phase1_linting": {
182
- "status": "passed",
183
- "commands": ["linting", "formatting"],
184
- "autoFixed": true
185
- },
186
- "phase2_structure": {
187
- "status": "passed",
188
- "commands": ["unused code check", "dependency check"]
189
- },
190
- "phase3_build": {
191
- "status": "passed",
192
- "commands": ["build"]
193
- },
194
- "phase4_tests": {
195
- "status": "passed",
196
- "commands": ["test"],
197
- "testsRun": 42,
198
- "testsPassed": 42
199
- },
200
- "phase5_code_recheck": {
201
- "status": "passed",
202
- "commands": ["code quality re-check"]
203
- }
204
- },
205
- "fixesApplied": [
206
- {
207
- "type": "auto",
208
- "category": "format",
209
- "description": "Auto-fixed indentation and style",
210
- "filesCount": 5
211
- },
212
- {
213
- "type": "manual",
214
- "category": "correctness",
215
- "description": "Improved correctness guarantees",
216
- "filesCount": 2
217
- }
218
- ],
219
- "taskFileMechanisms": {
220
- "provided": true,
221
- "executed": ["mechanism names that were found and executed"],
222
- "skipped": [
223
- {
224
- "mechanism": "mechanism name",
225
- "reason": "tool not found / config not found / not executable"
226
- }
227
- ]
228
- },
229
- "metrics": {
230
- "totalErrors": 0,
231
- "totalWarnings": 0,
232
- "executionTime": "2m 15s"
233
- },
234
- "nextActions": "Ready to commit"
235
- }
166
+ {"status":"approved","summary":"Overall quality check completed. All checks passed.","checksPerformed":{"phase1_linting":{"status":"passed","commands":["linting","formatting"],"autoFixed":true},"phase2_structure":{"status":"passed","commands":["unused code check","dependency check"]},"phase3_build":{"status":"passed","commands":["build"]},"phase4_tests":{"status":"passed","commands":["test"],"testsRun":42,"testsPassed":42},"phase5_code_recheck":{"status":"passed","commands":["code quality re-check"]}},"fixesApplied":[{"type":"auto","category":"format","description":"Auto-fixed indentation and style","filesCount":5},{"type":"manual","category":"correctness","description":"Improved correctness guarantees","filesCount":2}],"taskFileMechanisms":{"provided":true,"executed":["mechanism names that were found and executed"],"skipped":[{"mechanism":"mechanism name","reason":"tool not found / config not found / not executable"}]},"metrics":{"totalErrors":0,"totalWarnings":0,"executionTime":"2m 15s"},"nextActions":"Ready to commit"}
236
167
  ```
237
168
 
238
169
  **blocked response format (specification conflict)**:
239
170
  ```json
240
- {
241
- "status": "blocked",
242
- "reason": "Cannot determine due to unclear specification",
243
- "blockingIssues": [{
244
- "type": "specification_conflict",
245
- "details": "Test expectation and implementation contradict",
246
- "test_expects": "500 error",
247
- "implementation_returns": "400 error",
248
- "why_cannot_judge": "Correct specification unknown"
249
- }],
250
- "attemptedFixes": [
251
- "Fix attempt 1: Tried aligning test to implementation",
252
- "Fix attempt 2: Tried aligning implementation to test",
253
- "Fix attempt 3: Tried inferring specification from related documentation"
254
- ],
255
- "taskFileMechanisms": {
256
- "provided": true,
257
- "executed": ["mechanisms executed before blocking"],
258
- "skipped": [
259
- {
260
- "mechanism": "mechanism name",
261
- "reason": "tool not found / config not found / not executable"
262
- }
263
- ]
264
- },
265
- "needsUserDecision": "Please confirm the correct error code"
266
- }
171
+ {"status":"blocked","reason":"Cannot determine due to unclear specification","blockingIssues":[{"type":"specification_conflict","details":"Test expectation and implementation contradict","test_expects":"500 error","implementation_returns":"400 error","why_cannot_judge":"Correct specification unknown"}],"attemptedFixes":["Fix attempt 1: Tried aligning test to implementation","Fix attempt 2: Tried aligning implementation to test","Fix attempt 3: Tried inferring specification from related documentation"],"taskFileMechanisms":{"provided":true,"executed":["mechanisms executed before blocking"],"skipped":[{"mechanism":"mechanism name","reason":"tool not found / config not found / not executable"}]},"needsUserDecision":"Please confirm the correct error code"}
267
172
  ```
268
173
 
269
174
  **blocked response format (missing prerequisites)**:
270
175
  ```json
271
- {
272
- "status": "blocked",
273
- "reason": "Execution prerequisites not met",
274
- "missingPrerequisites": [
275
- {
276
- "type": "seed_data",
277
- "description": "E2E database is missing required seeded user records",
278
- "affectedChecks": ["test:e2e"],
279
- "resolutionSteps": ["Run the project seed script for E2E fixtures", "Start the dependent local services"]
280
- }
281
- ],
282
- "taskFileMechanisms": {
283
- "provided": true,
284
- "executed": ["mechanisms executed before blocking"],
285
- "skipped": [
286
- {
287
- "mechanism": "mechanism name",
288
- "reason": "tool not found / config not found / not executable"
289
- }
290
- ]
291
- },
292
- "checksSkipped": 1,
293
- "checksPassedWithoutPrerequisites": 3
294
- }
176
+ {"status":"blocked","reason":"Execution prerequisites not met","missingPrerequisites":[{"type":"seed_data","description":"E2E database is missing required seeded user records","affectedChecks":["test:e2e"],"resolutionSteps":["Run the project seed script for E2E fixtures","Start the dependent local services"]}],"taskFileMechanisms":{"provided":true,"executed":["mechanisms executed before blocking"],"skipped":[{"mechanism":"mechanism name","reason":"tool not found / config not found / not executable"}]},"checksSkipped":1,"checksPassedWithoutPrerequisites":3}
295
177
  ```
296
178
 
297
179
  Allowed `type` values: `seed_data`, `library`, `environment_variable`, `running_service`, `external_dependency`, `other`
@@ -120,35 +120,7 @@ Return the JSON result as the final response. See Output Format for the schema.
120
120
  **JSON format is mandatory.**
121
121
 
122
122
  ```json
123
- {
124
- "taskType": "feature|fix|refactor|performance|security",
125
- "purpose": "Essential purpose of request (1-2 sentences)",
126
- "scale": "small|medium|large",
127
- "confidence": "confirmed|provisional",
128
- "affectedFiles": ["path/to/file1.ts", "path/to/file2.ts"],
129
- "affectedLayers": ["backend", "frontend"],
130
- "fileCount": 3,
131
- "adrRequired": true,
132
- "adrReason": "specific condition met, or null if not required",
133
- "technicalConsiderations": {
134
- "constraints": ["list"],
135
- "risks": ["list"],
136
- "dependencies": ["list"]
137
- },
138
- "scopeDependencies": [
139
- {
140
- "question": "specific question that affects scale",
141
- "impact": { "if_yes": "large", "if_no": "medium" }
142
- }
143
- ],
144
- "questions": [
145
- {
146
- "category": "boundary|existing_code|dependencies",
147
- "question": "specific question",
148
- "options": ["A", "B", "C"]
149
- }
150
- ]
151
- }
123
+ {"taskType":"feature|fix|refactor|performance|security","purpose":"Essential purpose of request (1-2 sentences)","scale":"small|medium|large","confidence":"confirmed|provisional","affectedFiles":["path/to/file1.ts","path/to/file2.ts"],"affectedLayers":["backend","frontend"],"fileCount":3,"adrRequired":true,"adrReason":"specific condition met, or null if not required","technicalConsiderations":{"constraints":["list"],"risks":["list"],"dependencies":["list"]},"scopeDependencies":[{"question":"specific question that affects scale","impact":{"if_yes":"large","if_no":"medium"}}],"questions":[{"category":"boundary|existing_code|dependencies","question":"specific question","options":["A","B","C"]}]}
152
124
  ```
153
125
 
154
126
  **Field descriptions**:
@@ -73,85 +73,7 @@ Return the JSON result as the final response. See Output Format for the schema.
73
73
  Return structured JSON:
74
74
 
75
75
  ```json
76
- {
77
- "taskAnalysis": {
78
- "taskType": "implementation|fix|refactoring|design|quality-improvement",
79
- "essence": "Fundamental purpose of the task",
80
- "estimatedFiles": 3,
81
- "scale": "small|medium|large",
82
- "extractedTags": ["implementation", "testing", "security"]
83
- },
84
- "selectedRules": [
85
- {
86
- "file": "coding-rules",
87
- "sections": [
88
- {
89
- "title": "Function Design",
90
- "content": "## Function Design\\n\\n### Basic Principles\\n- Single responsibility principle\\n..."
91
- },
92
- {
93
- "title": "Error Handling",
94
- "content": "## Error Handling\\n\\n### Error Classification\\n..."
95
- }
96
- ],
97
- "reason": "Core implementation rules needed",
98
- "priority": "high"
99
- },
100
- {
101
- "file": "testing",
102
- "sections": [
103
- {
104
- "title": "Red-Green-Refactor Process",
105
- "content": "## Red-Green-Refactor Process\\n\\n1. Red: Write failing test\\n..."
106
- }
107
- ],
108
- "reason": "TDD practice required",
109
- "priority": "high"
110
- }
111
- ],
112
- "metaCognitiveGuidance": {
113
- "taskEssence": "Understanding fundamental purpose, not surface work",
114
- "ruleAdequacy": "Evaluation of whether selected rules match task characteristics",
115
- "pastFailures": [
116
- "error-fixing impulse",
117
- "large changes at once",
118
- "insufficient testing"
119
- ],
120
- "potentialPitfalls": [
121
- "Error-fixing impulse without root cause analysis",
122
- "Large changes without phased approach",
123
- "Implementation without tests"
124
- ],
125
- "firstStep": {
126
- "action": "Specific first action to take",
127
- "rationale": "Why this should be done first"
128
- }
129
- },
130
- "metaCognitiveQuestions": [
131
- "What is the most important quality criterion for this task?",
132
- "What problems occurred in similar tasks in the past?",
133
- "Which part should be tackled first?",
134
- "Is there a possibility of exceeding initial assumptions?"
135
- ],
136
- "warningPatterns": [
137
- {
138
- "pattern": "Large changes at once",
139
- "risk": "High complexity, difficult debugging",
140
- "mitigation": "Split into phases"
141
- },
142
- {
143
- "pattern": "Implementation without tests",
144
- "risk": "Quality degradation",
145
- "mitigation": "Follow Red-Green-Refactor"
146
- }
147
- ],
148
- "criticalRules": [
149
- "Complete static checking before proceeding",
150
- "User approval mandatory before implementation",
151
- "No commits before quality check completion"
152
- ],
153
- "confidence": "high|medium|low"
154
- }
76
+ {"taskAnalysis":{"taskType":"implementation|fix|refactoring|design|quality-improvement","essence":"Fundamental purpose of the task","estimatedFiles":3,"scale":"small|medium|large","extractedTags":["implementation","testing","security"]},"selectedRules":[{"file":"coding-rules","sections":[{"title":"Function Design","content":"## Function Design\\n\\n### Basic Principles\\n- Single responsibility principle\\n..."},{"title":"Error Handling","content":"## Error Handling\\n\\n### Error Classification\\n..."}],"reason":"Core implementation rules needed","priority":"high"},{"file":"testing","sections":[{"title":"Red-Green-Refactor Process","content":"## Red-Green-Refactor Process\\n\\n1. Red: Write failing test\\n..."}],"reason":"TDD practice required","priority":"high"}],"metaCognitiveGuidance":{"taskEssence":"Understanding fundamental purpose, not surface work","ruleAdequacy":"Evaluation of whether selected rules match task characteristics","pastFailures":["error-fixing impulse","large changes at once","insufficient testing"],"potentialPitfalls":["Error-fixing impulse without root cause analysis","Large changes without phased approach","Implementation without tests"],"firstStep":{"action":"Specific first action to take","rationale":"Why this should be done first"}},"metaCognitiveQuestions":["What is the most important quality criterion for this task?","What problems occurred in similar tasks in the past?","Which part should be tackled first?","Is there a possibility of exceeding initial assumptions?"],"warningPatterns":[{"pattern":"Large changes at once","risk":"High complexity, difficult debugging","mitigation":"Split into phases"},{"pattern":"Implementation without tests","risk":"Quality degradation","mitigation":"Follow Red-Green-Refactor"}],"criticalRules":["Complete static checking before proceeding","User approval mandatory before implementation","No commits before quality check completion"],"confidence":"high|medium|low"}
155
77
  ```
156
78
 
157
79
  ## Skill Selection Priority
@@ -162,76 +162,7 @@ Note: These signals are informational only during steps 1-6. Keep all discovered
162
162
  ### Essential Output
163
163
 
164
164
  ```json
165
- {
166
- "targetPath": "/path/to/project",
167
- "referenceArchitecture": "layered|mvc|clean|hexagonal|none",
168
- "existingPrd": "path or null",
169
- "saturationReached": true,
170
- "discoveredUnits": [
171
- {
172
- "id": "UNIT-001",
173
- "name": "Unit Name",
174
- "description": "Brief description",
175
- "confidence": "high|medium|low",
176
- "triangulationStrength": "strong|moderate|weak",
177
- "sourceCount": 3,
178
- "entryPoints": ["/path1", "/path2"],
179
- "relatedFiles": ["src/feature/*"],
180
- "dependencies": ["UNIT-002"],
181
- "valueProfile": {
182
- "targetPersona": "Who this feature serves (e.g., 'end user', 'admin', 'developer')",
183
- "userGoal": "What the user is trying to accomplish with this feature",
184
- "valueCategory": "High-level capability this belongs to (e.g., 'Authentication', 'Content Management', 'Reporting')",
185
- "groupingKey": {
186
- "targetPersona": "end-user",
187
- "userGoal": "sign-in",
188
- "valueCategory": "authentication"
189
- }
190
- },
191
- "technicalProfile": {
192
- "primaryModules": ["src/auth/service.ts", "src/auth/controller.ts"],
193
- "publicInterfaces": ["AuthService.login()", "AuthController.handleLogin()"],
194
- "dataFlowSummary": "Request → Controller → Service → Repository → DB",
195
- "infrastructureDeps": ["database", "redis-cache"]
196
- },
197
- "unitInventory": {
198
- "routes": ["POST /login -> AuthController.handleLogin (src/auth/controller.ts:24)"],
199
- "testFiles": ["src/auth/service.test.ts"],
200
- "publicExports": ["AuthService (src/auth/service.ts:10)"]
201
- }
202
- }
203
- ],
204
- "relationships": [
205
- {
206
- "from": "UNIT-001",
207
- "to": "UNIT-002",
208
- "type": "depends_on|extends|shares_data"
209
- }
210
- ],
211
- "uncertainAreas": [
212
- {
213
- "area": "Area name",
214
- "reason": "Why uncertain",
215
- "suggestedAction": "What to do"
216
- }
217
- ],
218
- "prdUnits": [
219
- {
220
- "id": "PRD-001",
221
- "name": "PRD unit name (user-value level)",
222
- "description": "What this capability delivers to the user",
223
- "groupingKey": {
224
- "targetPersona": "end-user",
225
- "userGoal": "sign-in",
226
- "valueCategory": "authentication"
227
- },
228
- "sourceUnits": ["UNIT-001", "UNIT-003"],
229
- "combinedRelatedFiles": ["src/feature-a/*", "src/feature-b/*"],
230
- "combinedEntryPoints": ["/path1", "/path2", "/path3"]
231
- }
232
- ],
233
- "limitations": ["What could not be discovered and why"]
234
- }
165
+ {"targetPath":"/path/to/project","referenceArchitecture":"layered|mvc|clean|hexagonal|none","existingPrd":"path or null","saturationReached":true,"discoveredUnits":[{"id":"UNIT-001","name":"Unit Name","description":"Brief description","confidence":"high|medium|low","triangulationStrength":"strong|moderate|weak","sourceCount":3,"entryPoints":["/path1","/path2"],"relatedFiles":["src/feature/*"],"dependencies":["UNIT-002"],"valueProfile":{"targetPersona":"Who this feature serves (e.g., 'end user', 'admin', 'developer')","userGoal":"What the user is trying to accomplish with this feature","valueCategory":"High-level capability this belongs to (e.g., 'Authentication', 'Content Management', 'Reporting')","groupingKey":{"targetPersona":"end-user","userGoal":"sign-in","valueCategory":"authentication"}},"technicalProfile":{"primaryModules":["src/auth/service.ts","src/auth/controller.ts"],"publicInterfaces":["AuthService.login()","AuthController.handleLogin()"],"dataFlowSummary":"Request → Controller → Service → Repository → DB","infrastructureDeps":["database","redis-cache"]},"unitInventory":{"routes":["POST /login -> AuthController.handleLogin (src/auth/controller.ts:24)"],"testFiles":["src/auth/service.test.ts"],"publicExports":["AuthService (src/auth/service.ts:10)"]}}],"relationships":[{"from":"UNIT-001","to":"UNIT-002","type":"depends_on|extends|shares_data"}],"uncertainAreas":[{"area":"Area name","reason":"Why uncertain","suggestedAction":"What to do"}],"prdUnits":[{"id":"PRD-001","name":"PRD unit name (user-value level)","description":"What this capability delivers to the user","groupingKey":{"targetPersona":"end-user","userGoal":"sign-in","valueCategory":"authentication"},"sourceUnits":["UNIT-001","UNIT-003"],"combinedRelatedFiles":["src/feature-a/*","src/feature-b/*"],"combinedEntryPoints":["/path1","/path2","/path3"]}],"limitations":["What could not be discovered and why"]}
235
166
  ```
236
167
 
237
168
  ## Completion Criteria
@@ -107,25 +107,7 @@ Return the JSON result as the final response. See Output Format for the schema.
107
107
  ## Output Format
108
108
 
109
109
  ```json
110
- {
111
- "status": "approved|approved_with_notes|needs_revision|blocked",
112
- "summary": "[1-2 sentence summary]",
113
- "filesReviewed": 5,
114
- "findings": [
115
- {
116
- "category": "confirmed_risk|defense_gap|hardening|policy",
117
- "confidence": "high|medium|low",
118
- "location": "[file:line]",
119
- "description": "[specific issue found]",
120
- "rationale": "[category-specific, see Category-Specific Rationale]",
121
- "suggestion": "[specific fix]"
122
- }
123
- ],
124
- "notes": "[summary of hardening/policy findings for completion report, present when status is approved_with_notes]",
125
- "requiredFixes": [
126
- "[specific fix 1 — only confirmed_risk and qualifying defense_gap items]"
127
- ]
128
- }
110
+ {"status":"approved|approved_with_notes|needs_revision|blocked","summary":"[1-2 sentence summary]","filesReviewed":5,"findings":[{"category":"confirmed_risk|defense_gap|hardening|policy","confidence":"high|medium|low","location":"[file:line]","description":"[specific issue found]","rationale":"[category-specific, see Category-Specific Rationale]","suggestion":"[specific fix]"}],"notes":"[summary of hardening/policy findings for completion report, present when status is approved_with_notes]","requiredFixes":["[specific fix 1 — only confirmed_risk and qualifying defense_gap items]"]}
129
111
  ```
130
112
 
131
113
  ## Status Determination
@@ -92,6 +92,10 @@ Generate at least 3 solutions from the following perspectives:
92
92
  | mitigation | Measures to reduce impact | Temporary measure while waiting for root fix |
93
93
  | fundamental | Comprehensive fix including recurrence prevention | When similar problems have occurred repeatedly |
94
94
 
95
+ **Adjacent Case Coverage**:
96
+ - When the investigated incident is a bug or regression, or when a confirmed failure point affects a state transition, persisted state, or external boundary, evaluate cases sharing the same path, contract, persisted state, or external boundary for the same class of defect.
97
+ - Include adjacent cases in the solution scope when they share the defect class. Record why any are excluded in `uncertaintyHandling.residualRisks`.
98
+
95
99
  **Generated Solution Verification**:
96
100
  - Check if project rules have applicable guidelines
97
101
  - For areas without guidelines, research current best practices via web search to verify solutions align with standard approaches
@@ -126,60 +130,7 @@ Return the JSON result as the final response. See Output Format for the schema.
126
130
  ## Output Format
127
131
 
128
132
  ```json
129
- {
130
- "inputSummary": {
131
- "identifiedFailurePoints": [
132
- {"failurePointId": "FP1", "description": "Failure point description", "status": "confirmed|probable|possible"}
133
- ],
134
- "failurePointRelationships": [
135
- {"from": "FP1", "to": "FP2", "relationship": "independent|upstream_of|downstream_of|amplifies|same_boundary"}
136
- ],
137
- "coverageAssessment": "sufficient|partial|insufficient"
138
- },
139
- "solutions": [
140
- {
141
- "id": "S1",
142
- "name": "Solution name",
143
- "type": "direct|workaround|mitigation|fundamental",
144
- "description": "Detailed solution description",
145
- "implementation": {
146
- "approach": "Implementation approach description",
147
- "affectedFiles": ["Files requiring changes"],
148
- "dependencies": ["Affected dependencies"]
149
- },
150
- "tradeoffs": {
151
- "cost": {"level": "low|medium|high", "details": "Details"},
152
- "risk": {"level": "low|medium|high", "details": "Details"},
153
- "scope": {"level": "low|medium|high", "details": "Details"},
154
- "maintainability": {"level": "low|medium|high", "details": "Details"},
155
- "certainty": {"level": "low|medium|high", "details": "Details"}
156
- },
157
- "pros": ["Advantages"],
158
- "cons": ["Disadvantages"]
159
- }
160
- ],
161
- "recommendation": {
162
- "selectedSolutionId": "S1",
163
- "rationale": "Detailed selection rationale",
164
- "alternativeIfRejected": "Alternative solution ID if recommendation rejected",
165
- "conditions": "Conditions under which this recommendation is appropriate"
166
- },
167
- "implementationPlan": {
168
- "steps": [
169
- {
170
- "order": 1,
171
- "action": "Specific action",
172
- "verification": "How to verify this step",
173
- "rollback": "Rollback procedure if problems occur"
174
- }
175
- ],
176
- "criticalPoints": ["Points requiring special attention"]
177
- },
178
- "uncertaintyHandling": {
179
- "residualRisks": ["Risks that may remain after resolution"],
180
- "monitoringPlan": "Monitoring plan after resolution"
181
- }
182
- }
133
+ {"inputSummary":{"identifiedFailurePoints":[{"failurePointId":"FP1","description":"Failure point description","status":"confirmed|probable|possible"}],"failurePointRelationships":[{"from":"FP1","to":"FP2","relationship":"independent|upstream_of|downstream_of|amplifies|same_boundary"}],"coverageAssessment":"sufficient|partial|insufficient"},"solutions":[{"id":"S1","name":"Solution name","type":"direct|workaround|mitigation|fundamental","description":"Detailed solution description","implementation":{"approach":"Implementation approach description","affectedFiles":["Files requiring changes"],"dependencies":["Affected dependencies"]},"tradeoffs":{"cost":{"level":"low|medium|high","details":"Details"},"risk":{"level":"low|medium|high","details":"Details"},"scope":{"level":"low|medium|high","details":"Details"},"maintainability":{"level":"low|medium|high","details":"Details"},"certainty":{"level":"low|medium|high","details":"Details"}},"pros":["Advantages"],"cons":["Disadvantages"]}],"recommendation":{"selectedSolutionId":"S1","rationale":"Detailed selection rationale","alternativeIfRejected":"Alternative solution ID if recommendation rejected","conditions":"Conditions under which this recommendation is appropriate"},"implementationPlan":{"steps":[{"order":1,"action":"Specific action","verification":"How to verify this step","rollback":"Rollback procedure if problems occur"}],"criticalPoints":["Points requiring special attention"]},"uncertaintyHandling":{"residualRisks":["Risks that may remain after resolution"],"monitoringPlan":"Monitoring plan after resolution"}}
183
134
  ```
184
135
 
185
136
  ## Completion Criteria
@@ -67,6 +67,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
67
67
  - Document concrete executable procedures
68
68
  - Include task-level Quality Assurance Mechanisms when the work plan defines them
69
69
  - Include task-level Binding Decisions when ADR Bindings cover the task
70
+ - Include task-level Reference Contracts when Reference Contract Values cover the task
70
71
  - Include task-level Proof Obligations when the work plan defines Proof Strategy, test skeleton proof annotations, or acceptance-criterion primary failure modes
71
72
  - **Always include operation verification methods**
72
73
  - Define clear completion criteria (within executor's scope of responsibility)
@@ -94,6 +95,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
94
95
  - Extract task list
95
96
  - Identify dependencies
96
97
  - Read Design-to-Plan Traceability rows and verify every `covered` item has a corresponding generated task or phase completion task
98
+ - Read Reference Contract Values rows and verify every `covered` value has a corresponding generated task
97
99
  - Read ADR Bindings rows and verify every `covered` item has a corresponding generated task
98
100
  - **Overall Optimization Considerations**
99
101
  - Identify common processing (prevent redundant implementation)
@@ -121,6 +123,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
121
123
  - Task overview
122
124
  - Target files
123
125
  - Investigation Targets
126
+ - Change Category when the task is a bug fix, regression, state-change, or boundary-change
124
127
  - Investigation Notes
125
128
  - Concrete implementation steps
126
129
  - Operation Verification Methods
@@ -138,7 +141,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
138
141
  | Integration test work | Test skeleton file, target implementation under test, existing fixture/auth/setup patterns |
139
142
  | fixture-e2e environment/setup work | Existing fixture data, API mock layer, browser harness configuration |
140
143
  | service-integration-e2e environment/setup work | Current environment config, startup scripts, seed scripts, auth flow references, external service stubs |
141
- | Cross-boundary implementation | Connection Map rows touching the task target files, caller/producer module, callee/consumer module, expected signal, contract definition |
144
+ | Cross-boundary implementation | Connection Map rows touching the task target files, caller/producer module, callee/consumer module, serialized format, consumer parse rule, expected signal, contract definition |
142
145
  | Task constrained by an ADR | ADR file with section hint matching the ADR Bindings row's Source Section value |
143
146
  | Bug fix/refactor | Affected code paths, failing tests, reproduction-related files |
144
147
  | Behavior replacement/rewrite | Existing implementation being replaced, observable outputs, Verification Strategy section in the Design Doc |
@@ -150,6 +153,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
150
153
  - When test skeletons exist, include them explicitly
151
154
  - When the work plan contains a UI Spec Component -> Task Mapping table, propagate matching component sections to every task listed in the row
152
155
  - When the work plan contains a Connection Map, propagate boundary rows touching the task's target files to every task on either side of the boundary
156
+ - When the work plan contains a Reference Contract Values table, propagate matching rows to every covered task
153
157
  - When the work plan contains an ADR Bindings table, propagate matching binding rows to every covered task
154
158
  - When a task matches multiple natures, include Investigation Targets from all matching rows and deduplicate overlaps
155
159
 
@@ -164,6 +168,18 @@ Decompose tasks based on implementation strategy patterns determined in implemen
164
168
  9. **Propagate Proof Obligations**
165
169
  When the work plan or referenced test skeletons include Primary failure mode or Proof obligation annotations, copy the applicable obligations into each generated task that implements or verifies the claim. If no skeleton exists, derive the primary failure mode from the acceptance criterion and Verification Strategy. Each obligation must state the AC ID or claim identifier, claim, failure mode, boundary to exercise, state assertion expectation, permitted mock boundary rationale, and residual uncertainty if any.
166
170
 
171
+ 10. **Classify Change Category for Adjacent Case Sweep**
172
+ When a task corrects observed behavior or changes a path, contract, persisted state, or external boundary, classify it so executors and reviewers can run a scoped adjacent-case sweep from a concrete field instead of re-inferring intent.
173
+
174
+ - `bug-fix`: corrects observed incorrect behavior
175
+ - `regression`: restores behavior a prior change broke
176
+ - `state-change`: changes how state is written, transitioned, or persisted
177
+ - `boundary-change`: changes a published or consumed contract at an external, cross-package, or persisted boundary
178
+
179
+ A task can match more than one category. Populate the task's `Change Category` field with every matched value, comma-separated.
180
+
181
+ For every matched category, extend Investigation Targets with files sharing the same path, contract, persisted state, or external boundary as the change, including the owner module on both sides of an affected boundary. Union targets across all matched categories. Omit `Change Category` only when the task neither corrects observed behavior nor changes a path, contract, persisted state, or external boundary. Additive, config-only, and scaffolding work is not exempt when it changes one of those dimensions.
182
+
167
183
  ## Verification Strategy Propagation
168
184
 
169
185
  Verification Strategy defines what correctness means at design time. L1/L2/L3 (from implementation-approach) define task-level verification depth at execution time. Use both.
@@ -231,6 +247,25 @@ When the work plan includes an `ADR Bindings` section:
231
247
  - `persistence`: `User records are persisted through the UsersRepository interface`
232
248
  6. **Validation**: Treat missing Axis, unknown Axis value, or non-checkable Compliance Check as an incomplete task file. Non-checkable means the implementation cannot be observed and answered as `Y` or `N`, or the predicate is written as a negative or compound condition.
233
249
 
250
+ ## Reference Contract Propagation
251
+
252
+ When the work plan includes a `Reference Contract Values` section:
253
+
254
+ 1. **Coverage preservation**: For each row marked `covered`, locate every task ID listed in `Covered By Task(s)`.
255
+ 2. **Gap handling**: Preserve each `gap` row as a planning issue and surface it to the caller when task generation would otherwise assume the observable value is implemented.
256
+ 3. **Investigation Targets**: Add the row's Design Doc path with section hint to each matched task. Deduplicate against Design-to-Plan Traceability targets.
257
+ 4. **Reference Contracts table**: Add one row to each matched task's `Reference Contracts` section:
258
+ - `Source`: Design Doc path with section hint
259
+ - `Contract Type`: value copied verbatim from the work plan row
260
+ - `Required Observable Value`: value copied verbatim from the work plan row, preserving exact wording, field order, labels, and conditions
261
+ - `Compliance Check`: a Y/N-answerable positive predicate that evaluates whether the planned and final implementation reproduces the value
262
+ 5. **Predicate shape**: Write each Compliance Check as a concrete positive statement. Examples:
263
+ - `The listed columns render in the specified order`
264
+ - `The label shows the looked-up name in place of the raw code`
265
+ - `The restored state is applied only when the explicit restore signal is present`
266
+ 6. **Boundary ownership**: Connection Map Propagation carries serialized boundaries. Reference Contract rows carry non-serialized observable values. When a work plan records the same value in both places, keep Connection Map propagation and surface the duplicate Reference Contract row as a planning issue.
267
+ 7. **Validation**: Treat missing Contract Type, missing Required Observable Value, non-checkable Compliance Check, or `covered` row without task IDs as an incomplete task file.
268
+
234
269
  ## UI Spec Propagation
235
270
 
236
271
  When the work plan includes a `UI Spec Component -> Task Mapping` section:
@@ -246,9 +281,15 @@ When the work plan includes a `UI Spec Component -> Task Mapping` section:
246
281
  When the work plan includes a `Connection Map` section:
247
282
 
248
283
  1. For each boundary row, locate all tasks listed in `Covered By Task(s)`.
249
- 2. Add the caller/producer module, callee/consumer module, serialized contract, and expected signal to each listed task's Investigation Targets or Notes.
250
- 3. For tasks on one side of a boundary, include an Operation Verification Method that observes the expected signal from the other side.
251
- 4. Propagate only boundary rows explicitly mapped in the work plan.
284
+ 2. Add the caller/producer module, callee/consumer module, serialized format, consumer parse rule, and expected signal to each listed task's Investigation Targets or Notes.
285
+ 3. For serialized boundaries, require concrete serialized format and consumer parse rule values. Treat `-` in either column as an incomplete plan row unless the row is a non-serialized external signal whose Expected Signal fully captures the contract.
286
+ 4. For serialized in-runtime boundaries, include a Boundary Context note that states the producer value, the consumer parse rule, and the roundtrip check: the emitted value parses to the value the consumer expects.
287
+ 5. For tasks on one side of a boundary, include an Operation Verification Method that observes the expected signal from the other side.
288
+ 6. Propagate only boundary rows explicitly mapped in the work plan.
289
+
290
+ ## Change Category Classification
291
+
292
+ This is distinct from per-AC boundary-path proof. Proof obligations prove the boundary path within an acceptance criterion; Change Category drives a sweep of cases outside the task's explicit ACs that share its path, contract, persisted state, or external boundary. Use Step 10 as the single procedural source for classification and Investigation Target extension.
252
293
 
253
294
  ## Task File Template
254
295
 
@@ -349,7 +390,9 @@ Please execute decomposed tasks according to the order.
349
390
  - [ ] Impact scope and boundaries definition for each task
350
391
  - [ ] Appropriate granularity (1-5 files/task)
351
392
  - [ ] Investigation Targets specified for every task
393
+ - [ ] Change Category set for bug-fix, regression, state-change, or boundary-change tasks, with adjacent path/boundary owners added to Investigation Targets
352
394
  - [ ] Quality Assurance Mechanisms propagated to relevant tasks when present in the plan header
395
+ - [ ] Reference Contract Values rows propagated to relevant tasks when present in the work plan
353
396
  - [ ] ADR Bindings rows propagated to relevant tasks when present in the work plan
354
397
  - [ ] ADR source includes section hint
355
398
  - [ ] Axis copied verbatim from the work plan row