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
@@ -156,6 +156,15 @@ When the task file, Dependencies, or Investigation Targets reference `docs/proje
156
156
  3. **Cross-check against Investigation Notes**: Ensure planned implementation is consistent with the observations recorded in the task file
157
157
  4. **Execute determination**: Determine continue/escalation per "Mandatory Judgment Criteria" above
158
158
 
159
+ #### Adjacent Case Sweep (Required when the task file has a `Change Category` field set to one or more of `bug-fix`, `regression`, `state-change`, `boundary-change`)
160
+
161
+ Run this check after Pre-implementation Verification and before the Binding Decision Check. Treat the task file's field value as authoritative for whether the sweep applies.
162
+
163
+ 1. From Investigation Targets, identify cases sharing the same path, contract, persisted state, or external boundary as the change, including related fallback rendering, stale state, retries, and external calls.
164
+ 2. Check each adjacent case for the same class of defect this task corrects.
165
+ 3. Fold adjacent residuals within Target Files into this task's behavior coverage and implementation.
166
+ 4. Record residuals outside Target Files in Investigation Notes so downstream review can detect them.
167
+
159
168
  #### Binding Decision Check (Required when the task file has a Binding Decisions section)
160
169
 
161
170
  Run this check after Pre-implementation Verification and before behavior-first implementation when the task file contains a Binding Decisions section with one or more rows.
@@ -172,6 +181,24 @@ Run this check after Pre-implementation Verification and before behavior-first i
172
181
  - `N`: stop implementation and return `status: "escalation_needed"` with `escalation_type: "binding_decision_violation"` and `phase: "pre_implementation"`
173
182
  - `Unknown`: record the row as deferred in Investigation Notes and proceed to behavior-first implementation. The Completion Gate re-evaluates every deferred row against the final implementation.
174
183
 
184
+ #### Reference Contract Check (Required when the task file has a Reference Contracts section)
185
+
186
+ Run this check after Pre-implementation Verification and before behavior-first implementation when the task file contains a Reference Contracts section with one or more rows.
187
+
188
+ 1. Confirm each Source in the Reference Contracts table has been read. Sources should also appear in Investigation Targets.
189
+ 2. Verify source fidelity before planning: locate the Required Observable Value in the Source and confirm it matches verbatim. If the value is not found or the task row differs by summary, omission, reordered fields, changed labels, or changed conditions, stop implementation and return `status: "escalation_needed"` with `escalation_type: "design_compliance_violation"`. Set `details.design_doc_expectation` to the Source value or "source value not found" and `details.actual_situation` to the task row's Required Observable Value.
190
+ 3. Use the Investigation Notes format below while recording the planned approach and evaluation results.
191
+ - `### Reference Contracts Evaluation`
192
+ - `[source] planned: [one sentence planned approach]`
193
+ - `[source] source fidelity -> Y|N - [one-line rationale]`
194
+ - `[source] [Compliance Check] -> Y|N|Unknown - [one-line rationale]`
195
+ 4. Record the planned implementation approach in Investigation Notes, one sentence per row.
196
+ 5. Evaluate each row's Compliance Check against the planned approach. Record the result as `Y`, `N`, or `Unknown` with a one-line rationale.
197
+ 6. Branch per row:
198
+ - `Y`: proceed
199
+ - `N`: stop implementation and return `status: "escalation_needed"` with `escalation_type: "design_compliance_violation"`. Set `details.design_doc_expectation` to the row's Required Observable Value and `details.actual_situation` to the planned approach.
200
+ - `Unknown`: record the row as deferred in Investigation Notes and proceed to behavior-first implementation. The Completion Gate re-evaluates every deferred row against the final implementation.
201
+
175
202
  #### Reference Representativeness (Applied During Implementation)
176
203
 
177
204
  During implementation, apply coding-rules Reference Representativeness before adopting existing patterns, UI composition, or dependency versions. Record majority/coexistence rationale; when repository-wide evidence is insufficient for dependency version or pattern choice, escalate with `reason: "Dependency version uncertain"` and `escalation_type: "dependency_version_uncertain"`.
@@ -223,29 +250,7 @@ Return one of the following as the final response (see Structured Response Speci
223
250
  Report in the following JSON format upon task completion (**without executing quality checks or commits**, delegating to quality assurance process):
224
251
 
225
252
  ```json
226
- {
227
- "status": "completed",
228
- "taskName": "[Exact name of executed task]",
229
- "changeSummary": "[Specific summary of React component implementation/changes]",
230
- "filesModified": ["src/components/Button/Button.tsx", "src/components/Button/index.ts"],
231
- "testsAdded": ["src/components/Button/Button.test.tsx"],
232
- "requiresTestReview": false,
233
- "newTestsPassed": true,
234
- "progressUpdated": {
235
- "taskFile": "5/8 items completed",
236
- "workPlan": "Relevant sections updated",
237
- "designDoc": "Progress section updated or N/A"
238
- },
239
- "runnableCheck": {
240
- "level": "L1: Unit test (React Testing Library) / L2: Integration test / L3: E2E test",
241
- "executed": true,
242
- "command": "test -- Button.test.tsx",
243
- "result": "passed / failed / skipped",
244
- "reason": "Test execution reason/verification content"
245
- },
246
- "readyForQualityCheck": true,
247
- "nextActions": "Overall quality verification by quality assurance process"
248
- }
253
+ {"status":"completed","taskName":"[Exact name of executed task]","changeSummary":"[Specific summary of React component implementation/changes]","filesModified":["src/components/Button/Button.tsx","src/components/Button/index.ts"],"testsAdded":["src/components/Button/Button.test.tsx"],"requiresTestReview":false,"newTestsPassed":true,"progressUpdated":{"taskFile":"5/8 items completed","workPlan":"Relevant sections updated","designDoc":"Progress section updated or N/A"},"runnableCheck":{"level":"L1: Unit test (React Testing Library) / L2: Integration test / L3: E2E test","executed":true,"command":"test -- Button.test.tsx","result":"passed / failed / skipped","reason":"Test execution reason/verification content"},"readyForQualityCheck":true,"nextActions":"Overall quality verification by quality assurance process"}
249
254
  ```
250
255
 
251
256
  ### 2. Escalation Response
@@ -253,144 +258,40 @@ Report in the following JSON format upon task completion (**without executing qu
253
258
  #### 2-1. Design Doc Deviation Escalation
254
259
  When unable to implement per Design Doc, escalate in following JSON format:
255
260
 
256
- Use Binding Decision Violation Escalation instead when the task has a Binding Decisions row covering the same issue.
261
+ Use Binding Decision Violation Escalation instead when the task has a Binding Decisions row covering the same issue. Use this Design Doc Deviation Escalation for Reference Contracts failures.
257
262
  For task/AC/UI Spec/reference core-mechanism sources, set `details.design_doc_expectation` to `[source type] [location]: [cited expectation]`.
258
263
  For core-mechanism violations, put the substitute in `details.actual_situation`, the behavior change in `details.why_cannot_implement`, and the unblock condition in `recommendation`.
259
264
 
260
265
  ```json
261
- {
262
- "status": "escalation_needed",
263
- "reason": "Design Doc deviation",
264
- "taskName": "[Task name being executed]",
265
- "details": {
266
- "design_doc_expectation": "[Exact quote from relevant Design Doc section]",
267
- "actual_situation": "[Details of situation actually encountered]",
268
- "why_cannot_implement": "[Technical reason why cannot implement per Design Doc]",
269
- "attempted_approaches": ["List of solution methods considered for trial"]
270
- },
271
- "escalation_type": "design_compliance_violation",
272
- "user_decision_required": true,
273
- "suggested_options": [
274
- "Modify Design Doc to match reality",
275
- "Implement missing components first",
276
- "Reconsider requirements and change implementation approach"
277
- ],
278
- "recommendation": "[Specific proposal for most appropriate solution direction]"
279
- }
266
+ {"status":"escalation_needed","reason":"Design Doc deviation","taskName":"[Task name being executed]","details":{"design_doc_expectation":"[Exact quote from relevant Design Doc section]","actual_situation":"[Details of situation actually encountered]","why_cannot_implement":"[Technical reason why cannot implement per Design Doc]","attempted_approaches":["List of solution methods considered for trial"]},"escalation_type":"design_compliance_violation","user_decision_required":true,"suggested_options":["Modify Design Doc to match reality","Implement missing components first","Reconsider requirements and change implementation approach"],"recommendation":"[Specific proposal for most appropriate solution direction]"}
280
267
  ```
281
268
 
282
269
  #### 2-2. Similar Component Discovery Escalation
283
270
  When discovering similar components/hooks during existing code investigation, escalate in following JSON format:
284
271
 
285
272
  ```json
286
- {
287
- "status": "escalation_needed",
288
- "reason": "Similar component/hook discovered",
289
- "taskName": "[Task name being executed]",
290
- "similar_components": [
291
- {
292
- "file_path": "src/components/ExistingButton/ExistingButton.tsx",
293
- "component_name": "ExistingButton",
294
- "similarity_reason": "Same UI pattern, same Props structure",
295
- "code_snippet": "[Excerpt of relevant component code]",
296
- "technical_debt_assessment": "high/medium/low/unknown"
297
- }
298
- ],
299
- "search_details": {
300
- "keywords_used": ["component keywords", "feature keywords"],
301
- "files_searched": 15,
302
- "matches_found": 3
303
- },
304
- "escalation_type": "similar_component_found",
305
- "user_decision_required": true,
306
- "suggested_options": [
307
- "Extend and use existing component",
308
- "Refactor existing component then use",
309
- "New implementation as technical debt (create ADR)",
310
- "New implementation (clarify differentiation from existing)"
311
- ],
312
- "recommendation": "[Recommended approach based on existing component analysis]"
313
- }
273
+ {"status":"escalation_needed","reason":"Similar component/hook discovered","taskName":"[Task name being executed]","similar_components":[{"file_path":"src/components/ExistingButton/ExistingButton.tsx","component_name":"ExistingButton","similarity_reason":"Same UI pattern, same Props structure","code_snippet":"[Excerpt of relevant component code]","technical_debt_assessment":"high/medium/low/unknown"}],"search_details":{"keywords_used":["component keywords","feature keywords"],"files_searched":15,"matches_found":3},"escalation_type":"similar_component_found","user_decision_required":true,"suggested_options":["Extend and use existing component","Refactor existing component then use","New implementation as technical debt (create ADR)","New implementation (clarify differentiation from existing)"],"recommendation":"[Recommended approach based on existing component analysis]"}
314
274
  ```
315
275
 
316
276
  #### 2-3. Investigation Target Not Found Escalation
317
277
  When an Investigation Target file does not exist or the path is stale, escalate in following JSON format:
318
278
 
319
279
  ```json
320
- {
321
- "status": "escalation_needed",
322
- "reason": "Investigation target not found",
323
- "taskName": "[Task name being executed]",
324
- "escalation_type": "investigation_target_not_found",
325
- "missingTargets": [
326
- {
327
- "path": "[path specified in task file]",
328
- "searchHint": "[section/function hint if provided, or null]",
329
- "searchAttempts": ["Checked path directly", "Searched nearby files with similar names", "Reviewed task dependencies for renamed or moved files"]
330
- }
331
- ],
332
- "user_decision_required": true,
333
- "suggested_options": [
334
- "Provide the correct file path",
335
- "Remove this Investigation Target and proceed",
336
- "Update the task file with current paths"
337
- ],
338
- "recommendation": "[Recommended next step based on what was found]"
339
- }
280
+ {"status":"escalation_needed","reason":"Investigation target not found","taskName":"[Task name being executed]","escalation_type":"investigation_target_not_found","missingTargets":[{"path":"[path specified in task file]","searchHint":"[section/function hint if provided, or null]","searchAttempts":["Checked path directly","Searched nearby files with similar names","Reviewed task dependencies for renamed or moved files"]}],"user_decision_required":true,"suggested_options":["Provide the correct file path","Remove this Investigation Target and proceed","Update the task file with current paths"],"recommendation":"[Recommended next step based on what was found]"}
340
281
  ```
341
282
 
342
283
  #### 2-4. Dependency Version Uncertain Escalation
343
284
  When repository-wide verification is insufficient to determine the appropriate dependency version, escalate in following JSON format:
344
285
 
345
286
  ```json
346
- {
347
- "status": "escalation_needed",
348
- "reason": "Dependency version uncertain",
349
- "taskName": "[Task name being executed]",
350
- "escalation_type": "dependency_version_uncertain",
351
- "dependency": {
352
- "name": "[dependency name]",
353
- "versionsFound": ["list of versions found in repository"],
354
- "filesChecked": ["file paths where the dependency usage was found"],
355
- "ambiguityReason": "[why repository state alone is insufficient]"
356
- },
357
- "user_decision_required": true,
358
- "suggested_options": [
359
- "Use the majority version already in the repository",
360
- "Use a different version with explicit rationale",
361
- "Research the latest stable version and decide after review"
362
- ]
363
- }
287
+ {"status":"escalation_needed","reason":"Dependency version uncertain","taskName":"[Task name being executed]","escalation_type":"dependency_version_uncertain","dependency":{"name":"[dependency name]","versionsFound":["list of versions found in repository"],"filesChecked":["file paths where the dependency usage was found"],"ambiguityReason":"[why repository state alone is insufficient]"},"user_decision_required":true,"suggested_options":["Use the majority version already in the repository","Use a different version with explicit rationale","Research the latest stable version and decide after review"]}
364
288
  ```
365
289
 
366
290
  #### 2-5. Binding Decision Violation Escalation
367
291
  When one or more Compliance Checks in the task's Binding Decisions section evaluate to `N` during pre-implementation, or to `N` or `Unknown` during completion, escalate in following JSON format:
368
292
 
369
293
  ```json
370
- {
371
- "status": "escalation_needed",
372
- "reason": "Binding decision violation",
373
- "taskName": "[Task name being executed]",
374
- "escalation_type": "binding_decision_violation",
375
- "phase": "pre_implementation | completion_gate",
376
- "implementationApproach": "[1-2 sentence summary of the planned or final implementation approach]",
377
- "failures": [
378
- {
379
- "source": "[ADR file path with section hint, copied from Source column]",
380
- "axis": "[Axis value copied from the Axis column]",
381
- "decision": "[Decision text copied from Decision column]",
382
- "complianceCheck": "[Compliance Check predicate copied from Compliance Check column]",
383
- "evaluation": "N | Unknown",
384
- "rationale": "[One line explaining why the implementation does not satisfy the check, or why it cannot be evaluated]"
385
- }
386
- ],
387
- "user_decision_required": true,
388
- "suggested_options": [
389
- "Adjust the implementation plan to satisfy the binding decision",
390
- "Update the ADR, then update the work plan ADR Bindings and task Binding Decisions",
391
- "Provide additional context that resolves the Unknown evaluation"
392
- ]
393
- }
294
+ {"status":"escalation_needed","reason":"Binding decision violation","taskName":"[Task name being executed]","escalation_type":"binding_decision_violation","phase":"pre_implementation | completion_gate","implementationApproach":"[1-2 sentence summary of the planned or final implementation approach]","failures":[{"source":"[ADR file path with section hint, copied from Source column]","axis":"[Axis value copied from the Axis column]","decision":"[Decision text copied from Decision column]","complianceCheck":"[Compliance Check predicate copied from Compliance Check column]","evaluation":"N | Unknown","rationale":"[One line explaining why the implementation does not satisfy the check, or why it cannot be evaluated]"}],"user_decision_required":true,"suggested_options":["Adjust the implementation plan to satisfy the binding decision","Update the ADR, then update the work plan ADR Bindings and task Binding Decisions","Provide additional context that resolves the Unknown evaluation"]}
394
295
  ```
395
296
 
396
297
  #### 2-6. Test Environment Not Ready Escalation
@@ -398,16 +299,7 @@ When one or more Compliance Checks in the task's Binding Decisions section evalu
398
299
  Triggered when the Test Environment Check finds the project-configured test toolchain unavailable or unrunnable.
399
300
 
400
301
  ```json
401
- {
402
- "status": "escalation_needed",
403
- "reason": "Test environment not ready",
404
- "taskName": "[Task name]",
405
- "escalation_type": "test_environment_not_ready",
406
- "missingComponent": "test runner | RTL setup | browser runtime | fixtures | mock server | setup file | other",
407
- "description": "[why the missing component blocks tests]",
408
- "user_decision_required": true,
409
- "suggested_options": ["Install or configure the missing component, then re-run the task", "Reassign the task once the environment is ready"]
410
- }
302
+ {"status":"escalation_needed","reason":"Test environment not ready","taskName":"[Task name]","escalation_type":"test_environment_not_ready","missingComponent":"test runner | RTL setup | browser runtime | fixtures | mock server | setup file | other","description":"[why the missing component blocks tests]","user_decision_required":true,"suggested_options":["Install or configure the missing component, then re-run the task","Reassign the task once the environment is ready"]}
411
303
  ```
412
304
 
413
305
  ## Scope Boundary (delegate to orchestrator)
@@ -424,12 +316,13 @@ Triggered when the Test Environment Check finds the project-configured test tool
424
316
  ☐ Implementation is consistent with the observations recorded in Investigation Notes
425
317
  ☐ Final implementation preserves the required core mechanism from the task, AC, Design Doc, UI Spec, or referenced materials, with evidence recorded in Investigation Notes or runnableCheck.reason
426
318
  ☐ Every Binding Decisions Compliance Check evaluates to `Y` against the final implementation, with evidence recorded in Investigation Notes (when the task file has a Binding Decisions section)
319
+ ☐ Every Reference Contracts row has source fidelity `Y` and Compliance Check `Y` against the final implementation, with evidence recorded in Investigation Notes (when the task file has a Reference Contracts section)
427
320
  ☐ When test runs are cited as `runnableCheck` evidence, they are substantive per the `runnableCheck.result` field spec; non-test verification is evaluated by command success
428
321
  ☐ Output format validated (JSON response with all required fields)
429
322
  ☐ Quality standards satisfied (tests pass, progress updated)
430
323
  ☐ Final response is a single JSON with status `completed` or `escalation_needed`
431
324
 
432
- **ENFORCEMENT**: HALT if any gate unchecked. Return `status: "escalation_needed"` to caller. Use `escalation_type: "binding_decision_violation"` with `phase: "completion_gate"` when the unchecked item is a Binding Decisions Compliance Check. Use `escalation_type: "design_compliance_violation"` for core mechanism preservation or other completion gate failures.
325
+ **ENFORCEMENT**: HALT if any gate unchecked. Return `status: "escalation_needed"` to caller. Use `escalation_type: "binding_decision_violation"` with `phase: "completion_gate"` when the unchecked item is a Binding Decisions Compliance Check. Use `escalation_type: "design_compliance_violation"` for Reference Contracts, core mechanism preservation, or other completion gate failures.
433
326
 
434
327
  """
435
328
 
@@ -156,6 +156,15 @@ When the task file, Dependencies, or Investigation Targets reference `docs/proje
156
156
  3. **Cross-check against Investigation Notes**: Ensure planned implementation is consistent with the observations recorded in the task file
157
157
  4. **Execute determination**: Determine continue/escalation per "Mandatory Judgment Criteria" above
158
158
 
159
+ #### Adjacent Case Sweep (Required when the task file has a `Change Category` field set to one or more of `bug-fix`, `regression`, `state-change`, `boundary-change`)
160
+
161
+ Run this check after Pre-implementation Verification and before the Binding Decision Check. Treat the task file's field value as authoritative for whether the sweep applies.
162
+
163
+ 1. From Investigation Targets, identify cases sharing the same path, contract, persisted state, or external boundary as the change.
164
+ 2. Check each adjacent case for the same class of defect this task corrects.
165
+ 3. Fold adjacent residuals within Target Files into this task's failing tests and implementation.
166
+ 4. Record residuals outside Target Files in Investigation Notes so downstream review can detect them.
167
+
159
168
  #### Binding Decision Check (Required when the task file has a Binding Decisions section)
160
169
 
161
170
  Run this check after Pre-implementation Verification and before the TDD cycle when the task file contains a Binding Decisions section with one or more rows.
@@ -172,6 +181,24 @@ Run this check after Pre-implementation Verification and before the TDD cycle wh
172
181
  - `N`: stop implementation and return `status: "escalation_needed"` with `escalation_type: "binding_decision_violation"` and `phase: "pre_implementation"`
173
182
  - `Unknown`: record the row as deferred in Investigation Notes and proceed to the TDD cycle. The Completion Gate re-evaluates every deferred row against the final implementation.
174
183
 
184
+ #### Reference Contract Check (Required when the task file has a Reference Contracts section)
185
+
186
+ Run this check after Pre-implementation Verification and before the TDD cycle when the task file contains a Reference Contracts section with one or more rows.
187
+
188
+ 1. Confirm each Source in the Reference Contracts table has been read. Sources should also appear in Investigation Targets.
189
+ 2. Verify source fidelity before planning: locate the Required Observable Value in the Source and confirm it matches verbatim. If the value is not found or the task row differs by summary, omission, reordered fields, changed labels, or changed conditions, stop implementation and return `status: "escalation_needed"` with `escalation_type: "design_compliance_violation"`. Set `details.design_doc_expectation` to the Source value or "source value not found" and `details.actual_situation` to the task row's Required Observable Value.
190
+ 3. Use the Investigation Notes format below while recording the planned approach and evaluation results.
191
+ - `### Reference Contracts Evaluation`
192
+ - `[source] planned: [one sentence planned approach]`
193
+ - `[source] source fidelity -> Y|N - [one-line rationale]`
194
+ - `[source] [Compliance Check] -> Y|N|Unknown - [one-line rationale]`
195
+ 4. Record the planned implementation approach in Investigation Notes, one sentence per row.
196
+ 5. Evaluate each row's Compliance Check against the planned approach. Record the result as `Y`, `N`, or `Unknown` with a one-line rationale.
197
+ 6. Branch per row:
198
+ - `Y`: proceed
199
+ - `N`: stop implementation and return `status: "escalation_needed"` with `escalation_type: "design_compliance_violation"`. Set `details.design_doc_expectation` to the row's Required Observable Value and `details.actual_situation` to the planned approach.
200
+ - `Unknown`: record the row as deferred in Investigation Notes and proceed to the TDD cycle. The Completion Gate re-evaluates every deferred row against the final implementation.
201
+
175
202
  #### Reference Representativeness (Applied During Implementation)
176
203
 
177
204
  During implementation, apply coding-rules Reference Representativeness before adopting existing patterns, API usage, or dependency versions. Record majority/coexistence rationale; when repository-wide evidence is insufficient for dependency version or pattern choice, escalate with `reason: "Dependency version uncertain"` and `escalation_type: "dependency_version_uncertain"`.
@@ -222,29 +249,7 @@ Return one of the following as the final response (see Structured Response Speci
222
249
  Report in the following JSON format upon task completion (**without executing quality checks or commits**, delegating to quality assurance process):
223
250
 
224
251
  ```json
225
- {
226
- "status": "completed",
227
- "taskName": "[Exact name of executed task]",
228
- "changeSummary": "[Specific summary of implementation content/changes]",
229
- "filesModified": ["specific/file/path1", "specific/file/path2"],
230
- "testsAdded": ["created/test/file/path"],
231
- "requiresTestReview": true,
232
- "newTestsPassed": true,
233
- "progressUpdated": {
234
- "taskFile": "5/8 items completed",
235
- "workPlan": "Relevant sections updated",
236
- "designDoc": "Progress section updated or N/A"
237
- },
238
- "runnableCheck": {
239
- "level": "L1: Unit test / L2: Integration test / L3: E2E test",
240
- "executed": true,
241
- "command": "Executed test command",
242
- "result": "passed / failed / skipped",
243
- "reason": "Test execution reason/verification content"
244
- },
245
- "readyForQualityCheck": true,
246
- "nextActions": "Overall quality verification by quality assurance process"
247
- }
252
+ {"status":"completed","taskName":"[Exact name of executed task]","changeSummary":"[Specific summary of implementation content/changes]","filesModified":["specific/file/path1","specific/file/path2"],"testsAdded":["created/test/file/path"],"requiresTestReview":true,"newTestsPassed":true,"progressUpdated":{"taskFile":"5/8 items completed","workPlan":"Relevant sections updated","designDoc":"Progress section updated or N/A"},"runnableCheck":{"level":"L1: Unit test / L2: Integration test / L3: E2E test","executed":true,"command":"Executed test command","result":"passed / failed / skipped","reason":"Test execution reason/verification content"},"readyForQualityCheck":true,"nextActions":"Overall quality verification by quality assurance process"}
248
253
  ```
249
254
 
250
255
  ### 2. Escalation Response
@@ -252,144 +257,40 @@ Report in the following JSON format upon task completion (**without executing qu
252
257
  #### 2-1. Design Doc Deviation Escalation
253
258
  When unable to implement per Design Doc, escalate in following JSON format:
254
259
 
255
- Use Binding Decision Violation Escalation instead when the task has a Binding Decisions row covering the same issue.
260
+ Use Binding Decision Violation Escalation instead when the task has a Binding Decisions row covering the same issue. Use this Design Doc Deviation Escalation for Reference Contracts failures.
256
261
  For task/AC/reference core-mechanism sources, set `details.design_doc_expectation` to `[source type] [location]: [cited expectation]`.
257
262
  For core-mechanism violations, put the substitute in `details.actual_situation`, the behavior change in `details.why_cannot_implement`, and the unblock condition in `recommendation`.
258
263
 
259
264
  ```json
260
- {
261
- "status": "escalation_needed",
262
- "reason": "Design Doc deviation",
263
- "taskName": "[Task name being executed]",
264
- "details": {
265
- "design_doc_expectation": "[Exact quote from relevant Design Doc section]",
266
- "actual_situation": "[Details of situation actually encountered]",
267
- "why_cannot_implement": "[Technical reason why cannot implement per Design Doc]",
268
- "attempted_approaches": ["List of solution methods considered for trial"]
269
- },
270
- "escalation_type": "design_compliance_violation",
271
- "user_decision_required": true,
272
- "suggested_options": [
273
- "Modify Design Doc to match reality",
274
- "Implement missing components first",
275
- "Reconsider requirements and change implementation approach"
276
- ],
277
- "recommendation": "[Specific proposal for most appropriate solution direction]"
278
- }
265
+ {"status":"escalation_needed","reason":"Design Doc deviation","taskName":"[Task name being executed]","details":{"design_doc_expectation":"[Exact quote from relevant Design Doc section]","actual_situation":"[Details of situation actually encountered]","why_cannot_implement":"[Technical reason why cannot implement per Design Doc]","attempted_approaches":["List of solution methods considered for trial"]},"escalation_type":"design_compliance_violation","user_decision_required":true,"suggested_options":["Modify Design Doc to match reality","Implement missing components first","Reconsider requirements and change implementation approach"],"recommendation":"[Specific proposal for most appropriate solution direction]"}
279
266
  ```
280
267
 
281
268
  #### 2-2. Similar Function Discovery Escalation
282
269
  When discovering similar functions during existing code investigation, escalate in following JSON format:
283
270
 
284
271
  ```json
285
- {
286
- "status": "escalation_needed",
287
- "reason": "Similar function discovered",
288
- "taskName": "[Task name being executed]",
289
- "similar_functions": [
290
- {
291
- "file_path": "[path to existing implementation]",
292
- "function_name": "existingFunction",
293
- "similarity_reason": "Same domain, same responsibility",
294
- "code_snippet": "[Excerpt of relevant code]",
295
- "technical_debt_assessment": "high/medium/low/unknown"
296
- }
297
- ],
298
- "search_details": {
299
- "keywords_used": ["domain keywords", "responsibility keywords"],
300
- "files_searched": 15,
301
- "matches_found": 3
302
- },
303
- "escalation_type": "similar_function_found",
304
- "user_decision_required": true,
305
- "suggested_options": [
306
- "Extend and use existing function",
307
- "Refactor existing function then use",
308
- "New implementation as technical debt (create ADR)",
309
- "New implementation (clarify differentiation from existing)"
310
- ],
311
- "recommendation": "[Recommended approach based on existing code analysis]"
312
- }
272
+ {"status":"escalation_needed","reason":"Similar function discovered","taskName":"[Task name being executed]","similar_functions":[{"file_path":"[path to existing implementation]","function_name":"existingFunction","similarity_reason":"Same domain, same responsibility","code_snippet":"[Excerpt of relevant code]","technical_debt_assessment":"high/medium/low/unknown"}],"search_details":{"keywords_used":["domain keywords","responsibility keywords"],"files_searched":15,"matches_found":3},"escalation_type":"similar_function_found","user_decision_required":true,"suggested_options":["Extend and use existing function","Refactor existing function then use","New implementation as technical debt (create ADR)","New implementation (clarify differentiation from existing)"],"recommendation":"[Recommended approach based on existing code analysis]"}
313
273
  ```
314
274
 
315
275
  #### 2-3. Investigation Target Not Found Escalation
316
276
  When an Investigation Target file does not exist or the path is stale, escalate in following JSON format:
317
277
 
318
278
  ```json
319
- {
320
- "status": "escalation_needed",
321
- "reason": "Investigation target not found",
322
- "taskName": "[Task name being executed]",
323
- "escalation_type": "investigation_target_not_found",
324
- "missingTargets": [
325
- {
326
- "path": "[path specified in task file]",
327
- "searchHint": "[section/function hint if provided, or null]",
328
- "searchAttempts": ["Checked path directly", "Searched nearby files with similar names", "Reviewed task dependencies for renamed or moved files"]
329
- }
330
- ],
331
- "user_decision_required": true,
332
- "suggested_options": [
333
- "Provide the correct file path",
334
- "Remove this Investigation Target and proceed",
335
- "Update the task file with current paths"
336
- ],
337
- "recommendation": "[Recommended next step based on what was found]"
338
- }
279
+ {"status":"escalation_needed","reason":"Investigation target not found","taskName":"[Task name being executed]","escalation_type":"investigation_target_not_found","missingTargets":[{"path":"[path specified in task file]","searchHint":"[section/function hint if provided, or null]","searchAttempts":["Checked path directly","Searched nearby files with similar names","Reviewed task dependencies for renamed or moved files"]}],"user_decision_required":true,"suggested_options":["Provide the correct file path","Remove this Investigation Target and proceed","Update the task file with current paths"],"recommendation":"[Recommended next step based on what was found]"}
339
280
  ```
340
281
 
341
282
  #### 2-4. Dependency Version Uncertain Escalation
342
283
  When repository-wide verification is insufficient to determine the appropriate dependency version, escalate in following JSON format:
343
284
 
344
285
  ```json
345
- {
346
- "status": "escalation_needed",
347
- "reason": "Dependency version uncertain",
348
- "taskName": "[Task name being executed]",
349
- "escalation_type": "dependency_version_uncertain",
350
- "dependency": {
351
- "name": "[dependency name]",
352
- "versionsFound": ["list of versions found in repository"],
353
- "filesChecked": ["file paths where the dependency usage was found"],
354
- "ambiguityReason": "[why repository state alone is insufficient]"
355
- },
356
- "user_decision_required": true,
357
- "suggested_options": [
358
- "Use the majority version already in the repository",
359
- "Use a different version with explicit rationale",
360
- "Research the latest stable version and decide after review"
361
- ]
362
- }
286
+ {"status":"escalation_needed","reason":"Dependency version uncertain","taskName":"[Task name being executed]","escalation_type":"dependency_version_uncertain","dependency":{"name":"[dependency name]","versionsFound":["list of versions found in repository"],"filesChecked":["file paths where the dependency usage was found"],"ambiguityReason":"[why repository state alone is insufficient]"},"user_decision_required":true,"suggested_options":["Use the majority version already in the repository","Use a different version with explicit rationale","Research the latest stable version and decide after review"]}
363
287
  ```
364
288
 
365
289
  #### 2-5. Binding Decision Violation Escalation
366
290
  When one or more Compliance Checks in the task's Binding Decisions section evaluate to `N` during pre-implementation, or to `N` or `Unknown` during completion, escalate in following JSON format:
367
291
 
368
292
  ```json
369
- {
370
- "status": "escalation_needed",
371
- "reason": "Binding decision violation",
372
- "taskName": "[Task name being executed]",
373
- "escalation_type": "binding_decision_violation",
374
- "phase": "pre_implementation | completion_gate",
375
- "implementationApproach": "[1-2 sentence summary of the planned or final implementation approach]",
376
- "failures": [
377
- {
378
- "source": "[ADR file path with section hint, copied from Source column]",
379
- "axis": "[Axis value copied from the Axis column]",
380
- "decision": "[Decision text copied from Decision column]",
381
- "complianceCheck": "[Compliance Check predicate copied from Compliance Check column]",
382
- "evaluation": "N | Unknown",
383
- "rationale": "[One line explaining why the implementation does not satisfy the check, or why it cannot be evaluated]"
384
- }
385
- ],
386
- "user_decision_required": true,
387
- "suggested_options": [
388
- "Adjust the implementation plan to satisfy the binding decision",
389
- "Update the ADR, then update the work plan ADR Bindings and task Binding Decisions",
390
- "Provide additional context that resolves the Unknown evaluation"
391
- ]
392
- }
293
+ {"status":"escalation_needed","reason":"Binding decision violation","taskName":"[Task name being executed]","escalation_type":"binding_decision_violation","phase":"pre_implementation | completion_gate","implementationApproach":"[1-2 sentence summary of the planned or final implementation approach]","failures":[{"source":"[ADR file path with section hint, copied from Source column]","axis":"[Axis value copied from the Axis column]","decision":"[Decision text copied from Decision column]","complianceCheck":"[Compliance Check predicate copied from Compliance Check column]","evaluation":"N | Unknown","rationale":"[One line explaining why the implementation does not satisfy the check, or why it cannot be evaluated]"}],"user_decision_required":true,"suggested_options":["Adjust the implementation plan to satisfy the binding decision","Update the ADR, then update the work plan ADR Bindings and task Binding Decisions","Provide additional context that resolves the Unknown evaluation"]}
393
294
  ```
394
295
 
395
296
  #### 2-6. Test Environment Not Ready Escalation
@@ -397,16 +298,7 @@ When one or more Compliance Checks in the task's Binding Decisions section evalu
397
298
  Triggered when the Test Environment Check finds the project-configured test toolchain unavailable or unrunnable.
398
299
 
399
300
  ```json
400
- {
401
- "status": "escalation_needed",
402
- "reason": "Test environment not ready",
403
- "taskName": "[Task name]",
404
- "escalation_type": "test_environment_not_ready",
405
- "missingComponent": "test runner | fixtures | mock server | setup file | other",
406
- "description": "[why the missing component blocks tests]",
407
- "user_decision_required": true,
408
- "suggested_options": ["Install or configure the missing component, then re-run the task", "Reassign the task once the environment is ready"]
409
- }
301
+ {"status":"escalation_needed","reason":"Test environment not ready","taskName":"[Task name]","escalation_type":"test_environment_not_ready","missingComponent":"test runner | fixtures | mock server | setup file | other","description":"[why the missing component blocks tests]","user_decision_required":true,"suggested_options":["Install or configure the missing component, then re-run the task","Reassign the task once the environment is ready"]}
410
302
  ```
411
303
 
412
304
  ## Execution Principles
@@ -423,12 +315,13 @@ Triggered when the Test Environment Check finds the project-configured test tool
423
315
  ☐ Implementation is consistent with the observations recorded in Investigation Notes
424
316
  ☐ Final implementation preserves the required core mechanism from the task, AC, Design Doc, or referenced materials, with evidence recorded in Investigation Notes or runnableCheck.reason
425
317
  ☐ Every Binding Decisions Compliance Check evaluates to `Y` against the final implementation, with evidence recorded in Investigation Notes (when the task file has a Binding Decisions section)
318
+ ☐ Every Reference Contracts row has source fidelity `Y` and Compliance Check `Y` against the final implementation, with evidence recorded in Investigation Notes (when the task file has a Reference Contracts section)
426
319
  ☐ When test runs are cited as `runnableCheck` evidence, they are substantive per the `runnableCheck.result` field spec; non-test verification is evaluated by command success
427
320
  ☐ Output format validated (JSON response with all required fields)
428
321
  ☐ Quality standards satisfied (tests pass, progress updated)
429
322
  ☐ Final response is a single JSON with status `completed` or `escalation_needed`
430
323
 
431
- **ENFORCEMENT**: HALT if any gate unchecked. Return `status: "escalation_needed"` to caller. Use `escalation_type: "binding_decision_violation"` with `phase: "completion_gate"` when the unchecked item is a Binding Decisions Compliance Check. Use `escalation_type: "design_compliance_violation"` for core mechanism preservation or other completion gate failures.
324
+ **ENFORCEMENT**: HALT if any gate unchecked. Return `status: "escalation_needed"` to caller. Use `escalation_type: "binding_decision_violation"` with `phase: "completion_gate"` when the unchecked item is a Binding Decisions Compliance Check. Use `escalation_type: "design_compliance_violation"` for Reference Contracts, core mechanism preservation, or other completion gate failures.
432
325
 
433
326
  """
434
327
 
@@ -85,6 +85,14 @@ For each integration boundary, define:
85
85
  - Input props or consumed context
86
86
  - Output events or effects
87
87
  - On Error behavior
88
+ - Serialized Format and Consumer Parse Rule when a value crosses through a query string, route parameter, form post, storage key, config entry, message payload, file, or similar encoded medium
89
+
90
+ When the design contains observable values the implementation must reproduce exactly, record them explicitly in the Design Doc using the `Observable Contract Values` table:
91
+ - `structure-order`: column sets, field sets, label sets, or display order
92
+ - `derived-display`: display value derived from another field, lookup, state, or configuration
93
+ - `state-lifecycle-negative`: condition where persisted, restored, cached, or derived state must stay unused
94
+
95
+ Write each Required Observable Value as a copyable exact value, not a summary. If a value is serialized and parsed across a boundary, record it in Field Propagation Map / Connection Map instead of this table.
88
96
 
89
97
  ### Minimal Surface Alternatives【Required when introducing maintenance-surface elements】
90
98
 
@@ -160,9 +160,18 @@ Record direct impact, indirect impact, and explicitly unaffected components in t
160
160
  ### Field Propagation Map【Required】
161
161
  When new or changed fields cross component boundaries:
162
162
 
163
- Document each field's status (preserved / transformed / dropped) at each boundary with rationale.
163
+ Document each field's status (preserved / transformed / dropped) at each boundary with rationale. When a value is serialized and parsed through a query string, route parameter, form post, CLI argument, environment variable, config entry, message payload, storage key, or file, record the exact Serialized Format and Consumer Parse Rule.
164
164
  Skip if no fields cross component boundaries.
165
165
 
166
+ ### Observable Contract Values【Required when applicable】
167
+ When the design contains observable values the implementation must reproduce exactly, record them explicitly in the Design Doc using the `Observable Contract Values` table:
168
+
169
+ - `structure-order`: column sets, field sets, label sets, or display order
170
+ - `derived-display`: display value derived from another field, lookup, state, or configuration
171
+ - `state-lifecycle-negative`: condition where persisted, restored, cached, or derived state must stay unused
172
+
173
+ Write each Required Observable Value as a copyable exact value, not a summary. If a value is serialized and parsed across a boundary, record it in Field Propagation Map / Connection Map instead of this table.
174
+
166
175
  ### Interface Change Impact Analysis【Required】
167
176
 
168
177
  Record existing operation, new operation, conversion need, adapter/wrapper need, and compatibility method. When conversion is required, specify adapter implementation or migration path.