codex-workflows 0.6.2 → 0.6.3

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.
@@ -81,7 +81,7 @@ description: "Documentation creation criteria for PRD, ADR, Design Doc, UI Spec,
81
81
 
82
82
  ### Work Plan
83
83
  **Purpose**: Implementation task management and progress tracking
84
- **Scope**: Task breakdown, dependencies, schedule estimates, test skeleton file paths, Verification Strategy summaries from each Design Doc, Design-to-Plan Traceability mapping for implementation-relevant technical requirements, final Quality Assurance phase, and progress tracking only. Technical rationale belongs in ADR and design details belong in Design Doc.
84
+ **Scope**: Task breakdown, dependencies, schedule estimates, test skeleton file paths, Verification Strategy summaries from each Design Doc, Design-to-Plan Traceability mapping for implementation-relevant technical requirements, ADR Bindings for implementation-binding ADR decisions, final Quality Assurance phase, and progress tracking only. Technical rationale belongs in ADR and design details belong in Design Doc.
85
85
 
86
86
  **Phase Division Criteria**:
87
87
 
@@ -30,8 +30,9 @@ unknowns:
30
30
 
31
31
  ### Prerequisite ADRs
32
32
 
33
- - [ADR File Name]: [Related decision items]
33
+ - docs/adr/ADR-XXXX-title.md: [Related decision items]
34
34
  - Reference common technical ADRs when applicable
35
+ - ADR placeholders use the repository ADR filename convention: replace `XXXX` with the four-digit ADR number and `title` with the file slug.
35
36
 
36
37
  ### External Resources Used
37
38
 
@@ -11,9 +11,11 @@ Implementation Readiness: pending
11
11
  - Design Doc(s):
12
12
  - [docs/design/XXX.md]
13
13
  - [docs/design/YYY.md] (if multiple, e.g. backend + frontend)
14
- - ADR: [docs/adr/ADR-XXXX.md] (if any)
14
+ - ADR: docs/adr/ADR-XXXX-title.md (if any)
15
15
  - PRD: [docs/prd/XXX.md] (if any)
16
16
 
17
+ ADR placeholders use the repository ADR filename convention: replace `XXXX` with the four-digit ADR number and `title` with the file slug.
18
+
17
19
  ## Verification Strategies (from Design Docs)
18
20
 
19
21
  Repeat this block for each Design Doc when multiple Design Docs exist. Preserve each strategy's identity and source document path. Merge strategies only when the Design Docs explicitly define a shared one.
@@ -77,6 +79,23 @@ Include this section when a UI Spec is among the inputs. Map each UI component s
77
79
 
78
80
  **Reference key rule**: The component identifier is the UI Spec section heading verbatim. Component headings must be unique within a UI Spec.
79
81
 
82
+ ## ADR Bindings
83
+
84
+ Include this section when ADRs are provided as input or listed in the Design Doc's "Prerequisite ADRs" section. Map each implementation-binding ADR decision to the task(s) it constrains. Omit this section when no ADR applies.
85
+
86
+ A decision is **implementation-binding** when it constrains code placement, dependency direction, contract/schema shape, data flow, or persistence. Acceptance criteria and required behavior remain in the Design Doc; this table covers structural implementation constraints from ADRs.
87
+
88
+ | ADR | Source Section | Axis (exactly one value) | Binding Decision | Covered By Task(s) | Gap Status | Notes |
89
+ |-----|----------------|--------------------------|------------------|--------------------|------------|-------|
90
+ | docs/adr/ADR-XXXX-title.md | Decision | dependency_direction | [One implementation-binding decision sentence, copied or condensed from the named section] | P1-T1, P2-T1 | covered | |
91
+ | docs/adr/ADR-YYYY-title.md | Implementation Guidance | persistence | [Binding decision with no covering task yet] | - | gap | [Justification and user-confirmation note] |
92
+
93
+ **Axis values**: `placement` (where code belongs), `dependency_direction` (allowed import or call direction), `contract_schema` (interface, payload, or schema shape), `data_flow` (how data moves across components), `persistence` (where and how state is stored)
94
+
95
+ One row represents one independently checkable binding decision. A single ADR can contribute multiple rows. A single task can appear in multiple rows.
96
+
97
+ **Gap Status values**: `covered` (mapped to one or more tasks), `gap` (no task exists yet; set Covered By Task(s) to `-`, include justification in Notes, and require user confirmation before plan approval)
98
+
80
99
  ## Connection Map
81
100
 
82
101
  Include this section when implementation crosses runtime, process, deployment, or service boundaries. Omit it when the change stays inside one runtime or only uses in-process package imports.
@@ -17,9 +17,19 @@ Metadata:
17
17
  Files to read before starting implementation. Use concrete file paths, optionally with a section/function hint:
18
18
  - [e.g., src/orders/checkout.ts (processOrder function)]
19
19
 
20
+ ## Binding Decisions
21
+ (Include this section when the work plan's ADR Bindings table covers this task. Omit otherwise.)
22
+
23
+ Each row is an ADR decision the implementation in this task must comply with.
24
+
25
+ | Source | Axis | Decision | Compliance Check |
26
+ |--------|------|----------|------------------|
27
+ | docs/adr/ADR-XXXX-title.md (§ <Source Section>) | [Axis value copied verbatim from the work plan's ADR Bindings row] | [Binding decision copied from the work plan's ADR Bindings row] | [Y/N-answerable positive predicate that evaluates whether the planned and final implementation satisfy the decision] |
28
+
20
29
  ## Investigation Notes
21
30
  Brief observations recorded after reading Investigation Targets:
22
31
  - [path] - [interfaces, control/data flow, state transitions, side effects relevant to this task]
32
+ - When Binding Decisions exist, record the planned implementation approach and each Compliance Check result here.
23
33
 
24
34
  ## Implementation Steps (TDD: Red-Green-Refactor)
25
35
  ### 1. Red Phase
@@ -52,6 +62,7 @@ Brief observations recorded after reading Investigation Targets:
52
62
  - [ ] All added tests pass
53
63
  - [ ] Operation verified per Operation Verification Methods above
54
64
  - [ ] Deliverables created (for research/design tasks)
65
+ - [ ] When Binding Decisions exist, every Compliance Check evaluates to `Y` against the final implementation, with evidence recorded in Investigation Notes
55
66
 
56
67
  ## Notes
57
68
  - Impact scope: [Areas where changes may propagate]
@@ -31,7 +31,7 @@ Each criterion produces `pass`, `fail`, or `not_applicable`, with file:line evid
31
31
 
32
32
  | ID | Criterion | Pass Evidence |
33
33
  |----|-----------|---------------|
34
- | R1 | Verification Strategy references resolve | Every command, file path, function, endpoint, fixture, seed, and test reference in the work plan's Verification Strategies either exists now or is the deliverable of a task in the plan |
34
+ | R1 | Verification Strategy and ADR Binding references resolve | Every command, file path, function, endpoint, fixture, seed, and test reference in the work plan's Verification Strategies either exists now or is the deliverable of a task in the plan; every ADR Bindings source path resolves; every ADR Bindings `covered` row references existing task IDs |
35
35
  | R2 | E2E prerequisites are addressed | For each fixture-e2e or service-integration-e2e skeleton, every noted precondition is present in the codebase or covered by a Phase 0 task |
36
36
  | R3 | Phase 1 observability exists | The first implementation phase includes at least one operation verification method executable at task completion using existing files, prior Phase 0 deliverables, or the task's own output |
37
37
  | R4 | UI rendering surface exists | When the plan implements UI components, a fixture entry, dev route, Storybook story, preview harness, or equivalent render surface exists or is covered by a Phase 0 task |
@@ -47,11 +47,12 @@ Read the work plan passed in `$ARGUMENTS`; if absent, select the most recent non
47
47
  - Verification Strategies
48
48
  - Quality Assurance Mechanisms
49
49
  - Design-to-Plan Traceability
50
+ - ADR Bindings
50
51
  - UI Spec Component -> Task Mapping
51
52
  - Connection Map
52
53
  - test skeleton references and E2E absence reasons
53
54
  - phase structure and task IDs
54
- - referenced Design Docs and UI Specs
55
+ - referenced Design Docs, ADRs, and UI Specs
55
56
 
56
57
  If no work plan exists, stop and report the missing prerequisite.
57
58
 
@@ -185,7 +185,7 @@ Subagents respond in JSON format. The final response from each JSON-returning su
185
185
  | `requirement-analyzer` | `scale`, `confidence`, `affectedLayers`, `adrRequired`, `scopeDependencies`, `questions` |
186
186
  | `codebase-analyzer` | `focusAreas`, `dataModel`, `qualityAssurance`, `dataTransformationPipelines`, `limitations` |
187
187
  | `ui-analyzer` | `externalResources`, `componentStructure`, `propsPatterns`, `cssLayout`, `stateDisplay`, `focusAreas`, `candidateWriteSet`, `limitations` |
188
- | `task-executor*` | `status`, `escalation_type`, `filesModified`, `requiresTestReview` |
188
+ | `task-executor*` | `status`, `escalation_type` (`design_compliance_violation`, `similar_function_found`, `similar_component_found`, `investigation_target_not_found`, `out_of_scope_file`, `dependency_version_uncertain`, `binding_decision_violation`), `filesModified`, `requiresTestReview` |
189
189
  | `quality-fixer*` | `status`, `reason`, `stubFindings`, `blockingIssues`, `missingPrerequisites` |
190
190
  | `document-reviewer` | `verdict.decision`, `verdict.conditions` |
191
191
  | `code-verifier` | `summary.status`, `discrepancies`, `reverseCoverage` |
@@ -209,9 +209,9 @@ Work plans use the header line `Implementation Readiness: <status>`.
209
209
 
210
210
  Use this procedure after work-plan approval and before autonomous task execution when the flow needs to verify implementation readiness.
211
211
 
212
- 1. Load the approved work plan exact path and extract Verification Strategies, Quality Assurance Mechanisms, Design-to-Plan Traceability, UI Spec Component -> Task Mapping, Connection Map, test skeleton references, E2E absence reasons, phase structure, referenced Design Docs, and UI Specs.
212
+ 1. Load the approved work plan exact path and extract Verification Strategies, Quality Assurance Mechanisms, Design-to-Plan Traceability, ADR Bindings, UI Spec Component -> Task Mapping, Connection Map, test skeleton references, E2E absence reasons, phase structure, referenced Design Docs, ADRs, and UI Specs.
213
213
  2. Evaluate these criteria with evidence:
214
- - R1 Verification Strategy references resolve
214
+ - R1 Verification Strategy and ADR Binding references resolve
215
215
  - R2 E2E prerequisites are addressed
216
216
  - R3 Phase 1 observability exists
217
217
  - R4 UI rendering surface exists when UI work is present
@@ -66,6 +66,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
66
66
  - Create individual task files in `docs/plans/tasks/`
67
67
  - Document concrete executable procedures
68
68
  - Include task-level Quality Assurance Mechanisms when the work plan defines them
69
+ - Include task-level Binding Decisions when ADR Bindings cover the task
69
70
  - **Always include operation verification methods**
70
71
  - Define clear completion criteria (within executor's scope of responsibility)
71
72
 
@@ -92,6 +93,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
92
93
  - Extract task list
93
94
  - Identify dependencies
94
95
  - Read Design-to-Plan Traceability rows and verify every `covered` item has a corresponding generated task or phase completion task
96
+ - Read ADR Bindings rows and verify every `covered` item has a corresponding generated task
95
97
  - **Overall Optimization Considerations**
96
98
  - Identify common processing (prevent redundant implementation)
97
99
  - Pre-map impact scope
@@ -136,6 +138,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
136
138
  | fixture-e2e environment/setup work | Existing fixture data, API mock layer, browser harness configuration |
137
139
  | service-integration-e2e environment/setup work | Current environment config, startup scripts, seed scripts, auth flow references, external service stubs |
138
140
  | Cross-boundary implementation | Connection Map rows touching the task target files, caller/producer module, callee/consumer module, expected signal, contract definition |
141
+ | Task constrained by an ADR | ADR file with section hint matching the ADR Bindings row's Source Section value |
139
142
  | Bug fix/refactor | Affected code paths, failing tests, reproduction-related files |
140
143
  | Behavior replacement/rewrite | Existing implementation being replaced, observable outputs, Verification Strategy section in the Design Doc |
141
144
 
@@ -146,6 +149,7 @@ Decompose tasks based on implementation strategy patterns determined in implemen
146
149
  - When test skeletons exist, include them explicitly
147
150
  - When the work plan contains a UI Spec Component -> Task Mapping table, propagate matching component sections to every task listed in the row
148
151
  - 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
152
+ - When the work plan contains an ADR Bindings table, propagate matching binding rows to every covered task
149
153
  - When a task matches multiple natures, include Investigation Targets from all matching rows and deduplicate overlaps
150
154
 
151
155
  7. **Implementation Pattern Consistency**
@@ -191,6 +195,26 @@ When the work plan includes a `Design-to-Plan Traceability` section:
191
195
  5. **Verification integrity**: For `verification` rows, ensure the corresponding task file includes the required comparison or verification method in Operation Verification Methods.
192
196
  6. **Prerequisite integrity**: For `prerequisite` rows, place setup, migration, seed, auth, or environment work before dependent implementation tasks.
193
197
 
198
+ ## ADR Binding Propagation
199
+
200
+ When the work plan includes an `ADR Bindings` section:
201
+
202
+ 1. **Coverage preservation**: For each row marked `covered`, locate every task ID listed in `Covered By Task(s)`.
203
+ 2. **Gap handling**: Preserve each `gap` row as a planning issue and surface it to the caller when task generation would otherwise assume the ADR decision is implemented.
204
+ 3. **Investigation Targets**: Add the ADR file path with the row's Source Section as a section hint to each matched task, formatted as `docs/adr/ADR-XXXX-title.md (§ [Source Section])`.
205
+ 4. **Binding Decisions table**: Add one row to each matched task's `Binding Decisions` section:
206
+ - `Source`: ADR path with section hint
207
+ - `Axis`: value copied verbatim from the plan row
208
+ - `Decision`: binding decision copied from the plan row
209
+ - `Compliance Check`: a Y/N-answerable positive predicate that evaluates whether the planned and final implementation satisfy the decision
210
+ 5. **Predicate shape**: Write each Compliance Check as a concrete positive statement. Examples by Axis:
211
+ - `placement`: `Auth entrypoint is in src/middleware/**`
212
+ - `dependency_direction`: `Domain code imports only from src/domain/** and src/shared/**`
213
+ - `contract_schema`: `API responses match the ResponseEnvelope<T> schema`
214
+ - `data_flow`: `Session tokens are written through the Redis client`
215
+ - `persistence`: `User records are persisted through the UsersRepository interface`
216
+ 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.
217
+
194
218
  ## UI Spec Propagation
195
219
 
196
220
  When the work plan includes a `UI Spec Component -> Task Mapping` section:
@@ -310,6 +334,10 @@ Please execute decomposed tasks according to the order.
310
334
  - [ ] Appropriate granularity (1-5 files/task)
311
335
  - [ ] Investigation Targets specified for every task
312
336
  - [ ] Quality Assurance Mechanisms propagated to relevant tasks when present in the plan header
337
+ - [ ] ADR Bindings rows propagated to relevant tasks when present in the work plan
338
+ - [ ] ADR source includes section hint
339
+ - [ ] Axis copied verbatim from the work plan row
340
+ - [ ] Compliance Check is a Y/N-answerable positive predicate
313
341
  - [ ] Operation Verification Methods specified for every task
314
342
  - [ ] Clear completion criteria setting
315
343
  - [ ] Overall design document creation
@@ -176,6 +176,22 @@ When the task file, Dependencies, or Investigation Targets reference `docs/proje
176
176
  3. **Cross-check against Investigation Notes**: Ensure planned implementation is consistent with the observations recorded in the task file
177
177
  4. **Execute determination**: Determine continue/escalation per "Mandatory Judgment Criteria" above
178
178
 
179
+ #### Binding Decision Check (Required when the task file has a Binding Decisions section)
180
+
181
+ 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.
182
+
183
+ 1. Confirm each Source in the Binding Decisions table has been read. Sources should also appear in Investigation Targets.
184
+ 2. Use the Investigation Notes format below while recording the planned approach and evaluation results.
185
+ - `### Binding Decisions Evaluation`
186
+ - `[axis] planned: [one sentence planned approach]`
187
+ - `[source] [Compliance Check] -> Y|N|Unknown — [one-line rationale]`
188
+ 3. Record the planned implementation approach in Investigation Notes, one sentence per distinct `Axis` value present in the Binding Decisions table. Group rows that share an Axis value when one sentence covers the group.
189
+ 4. Evaluate each row's Compliance Check against the planned approach. Record the result as `Y`, `N`, or `Unknown` with a one-line rationale.
190
+ 5. Branch per row:
191
+ - `Y`: proceed
192
+ - `N`: stop implementation and return `status: "escalation_needed"` with `escalation_type: "binding_decision_violation"` and `phase: "pre_implementation"`
193
+ - `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.
194
+
179
195
  #### Reference Representativeness (Applied During Implementation)
180
196
 
181
197
  When adopting a pattern, UI composition, or dependency from existing code, apply repository-wide representativeness checks at the point of adoption:
@@ -218,7 +234,7 @@ For research tasks, includes creating deliverable files specified in metadata "P
218
234
  ### 5. Return JSON Result
219
235
  Return one of the following as the final response (see Structured Response Specification for schemas):
220
236
  - `status: "completed"` — task fully implemented
221
- - `status: "escalation_needed"` — design deviation or similar component discovered
237
+ - `status: "escalation_needed"` — a structured escalation case from the schemas below applies
222
238
 
223
239
  ## Structured Response Specification
224
240
 
@@ -260,6 +276,8 @@ Report in the following JSON format upon task completion (**without executing qu
260
276
  #### 2-1. Design Doc Deviation Escalation
261
277
  When unable to implement per Design Doc, escalate in following JSON format:
262
278
 
279
+ Use Binding Decision Violation Escalation instead when the task has a Binding Decisions row covering the same issue.
280
+
263
281
  ```json
264
282
  {
265
283
  "status": "escalation_needed",
@@ -366,6 +384,36 @@ When repository-wide verification is insufficient to determine the appropriate d
366
384
  }
367
385
  ```
368
386
 
387
+ #### 2-5. Binding Decision Violation Escalation
388
+ 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:
389
+
390
+ ```json
391
+ {
392
+ "status": "escalation_needed",
393
+ "reason": "Binding decision violation",
394
+ "taskName": "[Task name being executed]",
395
+ "escalation_type": "binding_decision_violation",
396
+ "phase": "pre_implementation | completion_gate",
397
+ "implementationApproach": "[1-2 sentence summary of the planned or final implementation approach]",
398
+ "failures": [
399
+ {
400
+ "source": "[ADR file path with section hint, copied from Source column]",
401
+ "axis": "[Axis value copied from the Axis column]",
402
+ "decision": "[Decision text copied from Decision column]",
403
+ "complianceCheck": "[Compliance Check predicate copied from Compliance Check column]",
404
+ "evaluation": "N | Unknown",
405
+ "rationale": "[One line explaining why the implementation does not satisfy the check, or why it cannot be evaluated]"
406
+ }
407
+ ],
408
+ "user_decision_required": true,
409
+ "suggested_options": [
410
+ "Adjust the implementation plan to satisfy the binding decision",
411
+ "Update the ADR, then update the work plan ADR Bindings and task Binding Decisions",
412
+ "Provide additional context that resolves the Unknown evaluation"
413
+ ]
414
+ }
415
+ ```
416
+
369
417
  ## Scope Boundary (delegate to orchestrator)
370
418
  - Overall quality checks → handled by quality-fixer-frontend
371
419
  - Commit creation → handled by orchestrator after quality checks
@@ -378,11 +426,12 @@ When repository-wide verification is insufficient to determine the appropriate d
378
426
  ☐ Investigation Targets were processed, or marked N/A when the task file has no Investigation Targets section
379
427
  ☐ Investigation Notes were updated before implementation when Investigation Targets exist
380
428
  ☐ Implementation is consistent with the observations recorded in Investigation Notes
429
+ ☐ 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)
381
430
  ☐ Output format validated (JSON response with all required fields)
382
431
  ☐ Quality standards satisfied (tests pass, progress updated)
383
432
  ☐ Final response is a single JSON with status `completed` or `escalation_needed`
384
433
 
385
- **ENFORCEMENT**: HALT if any gate unchecked. Return `status: "escalation_needed"` to caller.
434
+ **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 other completion gate failures.
386
435
 
387
436
  """
388
437
 
@@ -176,6 +176,22 @@ When the task file, Dependencies, or Investigation Targets reference `docs/proje
176
176
  3. **Cross-check against Investigation Notes**: Ensure planned implementation is consistent with the observations recorded in the task file
177
177
  4. **Execute determination**: Determine continue/escalation per "Mandatory Judgment Criteria" above
178
178
 
179
+ #### Binding Decision Check (Required when the task file has a Binding Decisions section)
180
+
181
+ 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.
182
+
183
+ 1. Confirm each Source in the Binding Decisions table has been read. Sources should also appear in Investigation Targets.
184
+ 2. Use the Investigation Notes format below while recording the planned approach and evaluation results.
185
+ - `### Binding Decisions Evaluation`
186
+ - `[axis] planned: [one sentence planned approach]`
187
+ - `[source] [Compliance Check] -> Y|N|Unknown — [one-line rationale]`
188
+ 3. Record the planned implementation approach in Investigation Notes, one sentence per distinct `Axis` value present in the Binding Decisions table. Group rows that share an Axis value when one sentence covers the group.
189
+ 4. Evaluate each row's Compliance Check against the planned approach. Record the result as `Y`, `N`, or `Unknown` with a one-line rationale.
190
+ 5. Branch per row:
191
+ - `Y`: proceed
192
+ - `N`: stop implementation and return `status: "escalation_needed"` with `escalation_type: "binding_decision_violation"` and `phase: "pre_implementation"`
193
+ - `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.
194
+
179
195
  #### Reference Representativeness (Applied During Implementation)
180
196
 
181
197
  When adopting a pattern, API usage, or dependency from existing code, apply repository-wide representativeness checks at the point of adoption:
@@ -221,7 +237,7 @@ For research tasks, includes creating deliverable files specified in metadata "P
221
237
  ### 5. Return JSON Result
222
238
  Return one of the following as the final response (see Structured Response Specification for schemas):
223
239
  - `status: "completed"` — task fully implemented
224
- - `status: "escalation_needed"` — design deviation or similar function discovered
240
+ - `status: "escalation_needed"` — a structured escalation case from the schemas below applies
225
241
 
226
242
  ## Structured Response Specification
227
243
 
@@ -263,6 +279,8 @@ Report in the following JSON format upon task completion (**without executing qu
263
279
  #### 2-1. Design Doc Deviation Escalation
264
280
  When unable to implement per Design Doc, escalate in following JSON format:
265
281
 
282
+ Use Binding Decision Violation Escalation instead when the task has a Binding Decisions row covering the same issue.
283
+
266
284
  ```json
267
285
  {
268
286
  "status": "escalation_needed",
@@ -369,6 +387,36 @@ When repository-wide verification is insufficient to determine the appropriate d
369
387
  }
370
388
  ```
371
389
 
390
+ #### 2-5. Binding Decision Violation Escalation
391
+ 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:
392
+
393
+ ```json
394
+ {
395
+ "status": "escalation_needed",
396
+ "reason": "Binding decision violation",
397
+ "taskName": "[Task name being executed]",
398
+ "escalation_type": "binding_decision_violation",
399
+ "phase": "pre_implementation | completion_gate",
400
+ "implementationApproach": "[1-2 sentence summary of the planned or final implementation approach]",
401
+ "failures": [
402
+ {
403
+ "source": "[ADR file path with section hint, copied from Source column]",
404
+ "axis": "[Axis value copied from the Axis column]",
405
+ "decision": "[Decision text copied from Decision column]",
406
+ "complianceCheck": "[Compliance Check predicate copied from Compliance Check column]",
407
+ "evaluation": "N | Unknown",
408
+ "rationale": "[One line explaining why the implementation does not satisfy the check, or why it cannot be evaluated]"
409
+ }
410
+ ],
411
+ "user_decision_required": true,
412
+ "suggested_options": [
413
+ "Adjust the implementation plan to satisfy the binding decision",
414
+ "Update the ADR, then update the work plan ADR Bindings and task Binding Decisions",
415
+ "Provide additional context that resolves the Unknown evaluation"
416
+ ]
417
+ }
418
+ ```
419
+
372
420
  ## Execution Principles
373
421
  - Follow RED-GREEN-REFACTOR (see the principles in testing skill)
374
422
  - Update progress checkboxes per step
@@ -381,11 +429,12 @@ When repository-wide verification is insufficient to determine the appropriate d
381
429
  ☐ Investigation Targets were processed, or marked N/A when the task file has no Investigation Targets section
382
430
  ☐ Investigation Notes were updated before implementation when Investigation Targets exist
383
431
  ☐ Implementation is consistent with the observations recorded in Investigation Notes
432
+ ☐ 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)
384
433
  ☐ Output format validated (JSON response with all required fields)
385
434
  ☐ Quality standards satisfied (tests pass, progress updated)
386
435
  ☐ Final response is a single JSON with status `completed` or `escalation_needed`
387
436
 
388
- **ENFORCEMENT**: HALT if any gate unchecked. Return `status: "escalation_needed"` to caller.
437
+ **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 other completion gate failures.
389
438
 
390
439
  """
391
440
 
@@ -44,7 +44,8 @@ Skill Status:
44
44
  6. Concretize risks and countermeasures
45
45
  7. Create explicit Design-to-Plan Traceability so Design Doc technical requirements are covered without silent omission
46
46
  8. Propagate UI Spec component and runtime boundary context into the plan so task decomposition can pass it to executors
47
- 9. Document in progress-trackable format
47
+ 9. Map implementation-binding ADR decisions to constrained tasks
48
+ 10. Document in progress-trackable format
48
49
 
49
50
  ## Input Parameters
50
51
 
@@ -68,10 +69,16 @@ Read the Design Doc(s), UI Spec, PRD, and ADR (if provided). Extract:
68
69
  - Verification Strategy from each Design Doc: correctness definition, target comparison, verification method, observable success indicator, normalized verification timing, and early verification point
69
70
  - Quality Assurance Mechanisms from each Design Doc: all items marked `adopted`, including mechanism name, enforced quality aspect, configuration path, and covered files or project-wide scope
70
71
  - Implementation-relevant technical requirements from each Design Doc section using the category values defined in the plan template's `Design-to-Plan Traceability` section
72
+ - Prerequisite ADR references from each Design Doc and implementation-binding decisions from each resolved ADR
71
73
 
72
74
  Focus on implementation-relevant items only: items that directly inform task creation, dependency ordering, verification design, or protected no-change boundaries.
73
75
  Extract `scope-boundary` rows from explicit non-target statements such as `No Ripple Effect`, compatibility constraints, or protected boundaries that must remain unchanged.
74
76
 
77
+ For ADR references, resolve paths using these rules:
78
+ - Explicit `docs/adr/ADR-XXXX-title.md` path: read that file directly
79
+ - Short `docs/adr/ADR-XXXX.md` or `ADR-XXXX` reference: match `docs/adr/ADR-XXXX-*.md`
80
+ - Zero matches or two or more matches: flag a planning gap requiring user confirmation before plan approval
81
+
75
82
  ### 2. Process Test Design Information (when provided)
76
83
  Read test skeleton files and extract meta information (see Test Design Information Processing section).
77
84
 
@@ -141,6 +148,29 @@ Map only boundaries satisfying all three qualifications above: separate runtime,
141
148
 
142
149
  For each boundary, record the caller/producer, callee/consumer, expected signal, and covering tasks in the `Connection Map` table.
143
150
 
151
+ ### 5c. Map ADR Decisions to Tasks
152
+
153
+ When ADRs are provided as input or listed in a Design Doc's "Prerequisite ADRs" section, create an `ADR Bindings` table before finalizing tasks.
154
+
155
+ For each resolved ADR:
156
+ 1. Extract decisions from sections such as `Decision`, `Implementation Guidance`, `Consequences`, or clearly labeled decision bullets.
157
+ 2. Select only implementation-binding decisions: constraints on code placement, dependency direction, contract/schema shape, data flow, or persistence.
158
+ 3. Classify each selected decision with exactly one Axis value:
159
+ - `placement`: constrains where code, modules, components, or responsibilities belong
160
+ - `dependency_direction`: constrains allowed import, call, ownership, or layering direction
161
+ - `contract_schema`: constrains interface, payload, schema, props, DTO, event, or persisted record shape
162
+ - `data_flow`: constrains how data moves, transforms, is passed, emitted, or observed
163
+ - `persistence`: constrains storage location, repository boundary, migration, cache, or durable state behavior
164
+ - When multiple Axis values apply, prefer the ADR's explicit subject. If the subject remains ambiguous, use this priority order: `persistence` > `contract_schema` > `dependency_direction` > `data_flow` > `placement`.
165
+ 4. Map each binding decision to the task IDs that implement or verify the constrained area.
166
+ 5. Record one row per binding decision in the plan template's `ADR Bindings` table.
167
+
168
+ Mapping rules:
169
+ - A binding decision can map to multiple tasks when the constrained implementation spans boundaries.
170
+ - A task can be covered by multiple binding decisions.
171
+ - Acceptance criteria and required user-visible behaviors belong in `Design-to-Plan Traceability`; `ADR Bindings` covers structural implementation constraints.
172
+ - If an ADR decision constrains the design but no task covers it, add a justified gap and flag it for user confirmation before plan approval.
173
+
144
174
  ### 6. Define Tasks with Completion Criteria
145
175
  For each task, derive completion criteria from Design Doc acceptance criteria. Apply the 3-element completion definition (Implementation Complete, Quality Complete, Integration Complete).
146
176
 
@@ -333,6 +363,10 @@ When creating work plans, **Phase Structure Diagrams** and **Task Dependency Dia
333
363
  - [ ] Scope-boundary items mapped explicitly when the Design Doc defines protected no-change areas
334
364
  - [ ] Covered By Task(s) uses only normalized task IDs
335
365
  - [ ] No unjustified `gap` entries remain
366
+ - [ ] ADR Bindings table completed when ADRs are provided or listed in Design Doc prerequisites
367
+ - [ ] ADR references resolved with exact path or single `docs/adr/ADR-XXXX-*.md` match
368
+ - [ ] Each binding row has one valid Axis value
369
+ - [ ] Each binding row maps to covering task(s) or a justified gap
336
370
  - [ ] Phase structure matches the implementation approach
337
371
  - [ ] Early verification point placed in the earliest applicable phase
338
372
  - [ ] Normalized verification timing mapped consistently to phases
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-workflows",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Task-oriented agentic coding framework for OpenAI Codex CLI — skills, recipes, and subagents for structured development workflows",
5
5
  "license": "MIT",
6
6
  "author": "Shinsuke Kagawa",