codex-workflows 0.6.2 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/documentation-criteria/SKILL.md +1 -1
- package/.agents/skills/documentation-criteria/references/design-template.md +2 -1
- package/.agents/skills/documentation-criteria/references/plan-template.md +20 -1
- package/.agents/skills/documentation-criteria/references/task-template.md +11 -0
- package/.agents/skills/recipe-design/SKILL.md +92 -37
- package/.agents/skills/recipe-front-design/SKILL.md +99 -39
- package/.agents/skills/recipe-prepare-implementation/SKILL.md +3 -2
- package/.agents/skills/subagents-orchestration-guide/SKILL.md +3 -3
- package/.codex/agents/codebase-analyzer.toml +5 -5
- package/.codex/agents/document-reviewer.toml +6 -2
- package/.codex/agents/task-decomposer.toml +28 -0
- package/.codex/agents/task-executor-frontend.toml +51 -2
- package/.codex/agents/task-executor.toml +51 -2
- package/.codex/agents/technical-designer-frontend.toml +8 -3
- package/.codex/agents/technical-designer.toml +8 -3
- package/.codex/agents/ui-analyzer.toml +1 -1
- package/.codex/agents/ui-spec-designer.toml +5 -4
- package/.codex/agents/work-planner.toml +35 -1
- package/package.json +1 -1
|
@@ -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
|
-
-
|
|
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:
|
|
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]
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: recipe-design
|
|
3
|
-
description: "Execute from
|
|
3
|
+
description: "Execute from codebase-scoped analysis to design document creation."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Required Skills [LOAD BEFORE EXECUTION]
|
|
7
7
|
|
|
8
8
|
1. [LOAD IF NOT ACTIVE] `documentation-criteria` — document creation rules and templates
|
|
9
9
|
2. [LOAD IF NOT ACTIVE] `implementation-approach` — implementation strategy
|
|
10
|
-
3. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` — agent coordination and workflow flows
|
|
11
10
|
|
|
12
11
|
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
13
12
|
|
|
@@ -15,37 +14,39 @@ description: "Execute from requirement analysis to design document creation."
|
|
|
15
14
|
|
|
16
15
|
## Orchestrator Definition
|
|
17
16
|
|
|
18
|
-
**Core Identity**: "I am not a worker. I am an orchestrator."
|
|
17
|
+
**Core Identity**: "I am not a worker. I am an orchestrator."
|
|
19
18
|
|
|
20
19
|
**Execution Protocol**:
|
|
21
|
-
1. **Spawn agents for
|
|
22
|
-
2. **
|
|
23
|
-
-
|
|
24
|
-
-
|
|
20
|
+
1. **Spawn agents for analysis and document work** -- your role is to invoke sub-agents, pass data between them, and report results. The Step 1 scope bootstrap is an orchestrator-local pass limited to locating seed files.
|
|
21
|
+
2. **Run the design flow below in order**:
|
|
22
|
+
- Execute: scope bootstrap -> codebase-analyzer -> [Stop: Scope confirmation] -> technical-designer -> code-verifier -> document-reviewer -> design-sync -> [Stop: Design approval]
|
|
23
|
+
- `code-verifier` and `design-sync` apply to Design Docs; skip them for ADR-only output.
|
|
25
24
|
- **[STOP — BLOCKING]** At every `[Stop: ...]` marker -> Present status to user for confirmation. **CANNOT proceed until user explicitly confirms.**
|
|
26
25
|
3. **Scope**: Complete when design documents receive approval
|
|
27
26
|
|
|
28
|
-
**CRITICAL**: MUST execute document-reviewer
|
|
27
|
+
**CRITICAL**: MUST execute document-reviewer and all stopping points. MUST execute design-sync for Design Docs. Each serves as a quality gate.
|
|
29
28
|
ENFORCEMENT: Skipping any quality gate invalidates the design output.
|
|
30
29
|
|
|
31
30
|
## Workflow Overview
|
|
32
31
|
|
|
33
|
-
Core design-document path after prerequisite branches such as PRD, ADR, or UI Spec are resolved:
|
|
34
|
-
|
|
35
32
|
```
|
|
36
|
-
Requirements ->
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
Requirements -> scope bootstrap -> codebase-analyzer -> [Stop: Scope confirmation]
|
|
34
|
+
|
|
|
35
|
+
technical-designer
|
|
36
|
+
|
|
|
37
|
+
code-verifier -> document-reviewer
|
|
38
|
+
|
|
|
39
|
+
design-sync -> [Stop: Design approval]
|
|
43
40
|
```
|
|
44
41
|
|
|
42
|
+
`code-verifier` and `design-sync` are Design Doc steps. ADR-only output skips them.
|
|
43
|
+
|
|
45
44
|
## Scope Boundaries
|
|
46
45
|
|
|
47
46
|
**Included in this skill**:
|
|
48
|
-
-
|
|
47
|
+
- Scope bootstrap: locating seed files so codebase-analyzer receives a populated input
|
|
48
|
+
- Codebase analysis with codebase-analyzer (entry point of the design phase)
|
|
49
|
+
- Scope confirmation with the user, grounded in codebase-analyzer findings
|
|
49
50
|
- ADR creation (if architecture changes, new technology, or data flow changes)
|
|
50
51
|
- Design Doc creation with technical-designer
|
|
51
52
|
- Document review with document-reviewer
|
|
@@ -55,46 +56,100 @@ Requirements -> requirement-analyzer -> [Stop: Scale determination]
|
|
|
55
56
|
|
|
56
57
|
Requirements: $ARGUMENTS
|
|
57
58
|
|
|
58
|
-
Pass the user requirements directly to requirement-analyzer as the first action. If clarification is needed, handle it at the requirement-analysis stop point before proceeding.
|
|
59
|
-
|
|
60
59
|
MUST clearly present design alternatives and trade-offs.
|
|
61
60
|
|
|
62
61
|
Execute the process below within design scope.
|
|
63
62
|
|
|
64
63
|
## Execution Process
|
|
65
64
|
|
|
66
|
-
### Step 1:
|
|
67
|
-
|
|
65
|
+
### Step 1: Scope Bootstrap
|
|
66
|
+
Build a lightweight seed for codebase-analyzer. This is a file-location pass only, with no deep reading and no design decisions.
|
|
67
|
+
|
|
68
|
+
1. Extract candidate keywords from the user requirements: feature names, domain nouns, identifiers, route names, API names, or file-like terms.
|
|
69
|
+
2. Search each keyword separately with `rg -l --glob '!**/{node_modules,dist,build,coverage,.git}/**' --glob '!**/*.{lock,min.js,map}' '<keyword>'`. If `rg` is unavailable, use `grep -RIl` with the same exclusions where possible.
|
|
70
|
+
3. Bucket matches as `source`, `test`, `docs`, and `generated_or_vendor`. Exclude `generated_or_vendor` from the seed.
|
|
71
|
+
4. Rank matches in this order: path or filename match, exported symbol or route/API match, source content match, tests for selected source files, docs for selected source files.
|
|
72
|
+
5. Collect the final seed as `affectedFiles`, and keep a one-line `seedRationale` for each file.
|
|
73
|
+
6. If the search returns no source files, ask the user which files or modules the design targets. Use the user's answer as `affectedFiles`. If the user confirms no related code exists, confirm whether to proceed with a new-surface design before invoking codebase-analyzer.
|
|
74
|
+
7. If the ranked seed has more than 20 files, present the top-ranked candidates and ask the user to narrow the seed before invoking codebase-analyzer.
|
|
75
|
+
|
|
76
|
+
Construct `requirement_analysis` with:
|
|
77
|
+
- `affectedFiles`: the Step 1 seed
|
|
78
|
+
- `affectedLayers`: layers inferred from paths, or `["unknown"]` when unclear
|
|
79
|
+
- `scale`: provisional scale from file count (`small` 1-2, `medium` 3-5, `large` 6+)
|
|
80
|
+
- `purpose`: the user requirements
|
|
81
|
+
- `confidence`: `confirmed` when target files are explicit or the ranked seed is focused; otherwise `provisional`
|
|
82
|
+
- `adrRequired`: `true` when the request changes architecture, introduces technology or dependencies, changes data flow/storage/contract ownership, or changes shared cross-boundary contracts; otherwise `false`
|
|
83
|
+
- `adrReason`: the specific matched ADR condition, or `null`
|
|
84
|
+
- `prdRequired`: `true` when scale is `large` and no existing PRD covers the scope; otherwise `false`
|
|
85
|
+
- `scopeDependencies`: questions whose answers can change the target files, scale, or document type
|
|
86
|
+
- `questions`: user-facing questions needed before design
|
|
87
|
+
- `documentTypeRationale`: why ADR, Design Doc, or both are needed from the provisional seed
|
|
88
|
+
- `seedRationale`: one-line reason for each file in `affectedFiles`
|
|
89
|
+
- `technicalConsiderations`: include any obvious user-stated constraints, risks, and dependencies; use empty lists only when none are stated
|
|
68
90
|
|
|
69
91
|
### Step 2: Codebase Analysis
|
|
70
|
-
Spawn codebase-analyzer agent: "Analyze the existing codebase to provide evidence for Design Doc creation. requirement_analysis: [
|
|
92
|
+
Spawn codebase-analyzer agent: "Analyze the existing codebase to provide evidence for Design Doc creation. requirement_analysis: [Step 1 requirement_analysis]. requirements: $ARGUMENTS. target_paths: [Step 1 affectedFiles]."
|
|
93
|
+
|
|
94
|
+
### Step 3: Scope Confirmation
|
|
95
|
+
After codebase-analyzer returns, present the design scope to the user before design work:
|
|
96
|
+
- Target files/modules: `analysisScope.filesAnalyzed` and directly relevant modules
|
|
97
|
+
- Affected layers: inferred from `analysisScope.categoriesDetected`, `focusAreas`, and paths
|
|
98
|
+
- Recommended document path: ADR, Design Doc, or both, with `documentTypeRationale`, `adrRequired`, and `adrReason`
|
|
99
|
+
- PRD status: whether `prdRequired` is true, whether an existing PRD path is available, and what decision is needed before design
|
|
100
|
+
- Unknowns/assumptions: `limitations` and unresolved risks
|
|
101
|
+
- Questions before design: scope questions that change the design target or scale
|
|
102
|
+
|
|
103
|
+
Ask the user to choose one:
|
|
104
|
+
- Proceed with the recommended document path
|
|
105
|
+
- Correct the scope and re-run codebase-analyzer
|
|
106
|
+
- Answer open questions, then proceed
|
|
107
|
+
- Provide an existing PRD path when `prdRequired` is true
|
|
108
|
+
- Explicitly approve proceeding without a PRD when `prdRequired` is true and no PRD will be provided
|
|
109
|
+
|
|
110
|
+
If `prdRequired` is true and the user neither provides a PRD path nor explicitly approves proceeding without a PRD, stop. This recipe does not create PRDs.
|
|
111
|
+
|
|
112
|
+
After confirmation, set the final scale from the confirmed target file count (`small` 1-2, `medium` 3-5, `large` 6+), recompute `adrRequired`, `adrReason`, `prdRequired`, `confidence`, and `documentTypeRationale`, then carry the complete confirmed requirement context into design creation.
|
|
113
|
+
|
|
114
|
+
**[STOP — BLOCKING]** Wait for user confirmation before proceeding.
|
|
115
|
+
|
|
116
|
+
### Step 4: Design Document Creation
|
|
117
|
+
Create documents according to `documentTypeRationale`:
|
|
118
|
+
- ADR only: Spawn technical-designer agent: "document_to_create: ADR. Create ADR based on the requirements, confirmed_requirement_context: [complete confirmed requirement context from Step 3, including confirmed scope, confirmed scale, adrRequired, adrReason, prdRequired, PRD path or explicit no-PRD approval when applicable, documentTypeRationale, scopeDependencies, questions, and seedRationale], and codebase analysis output. Follow `document_to_create` for this invocation; `documentTypeRationale` describes the overall confirmed path. Include architecture decisions and clear alternatives with trade-offs."
|
|
119
|
+
- Design Doc only: Spawn technical-designer agent: "document_to_create: DesignDoc. Create Design Doc based on the requirements, confirmed_requirement_context: [complete confirmed requirement context from Step 3, including confirmed scope, confirmed scale, adrRequired, adrReason, prdRequired, PRD path or explicit no-PRD approval when applicable, documentTypeRationale, scopeDependencies, questions, and seedRationale], and codebase analysis output. Follow `document_to_create` for this invocation; `documentTypeRationale` describes the overall confirmed path. Include component design, acceptance criteria, and clear alternatives with trade-offs."
|
|
120
|
+
- Both ADR and Design Doc: first spawn technical-designer with `document_to_create: ADR`. After the ADR path is available, spawn technical-designer again with `document_to_create: DesignDoc`, `adr_path: [ADR path]`, the same `confirmed_requirement_context`, and the same codebase analysis output. The Design Doc must reference the ADR decision.
|
|
121
|
+
|
|
122
|
+
### Step 5: Code Verification
|
|
123
|
+
For Design Docs only, spawn code-verifier agent: "Verify the Design Doc against the current codebase. document_path: [Design Doc path from Step 4]. doc_type: design-doc."
|
|
71
124
|
|
|
72
|
-
|
|
73
|
-
Spawn technical-designer agent: "Create design document based on requirement analysis output and codebase analysis output. Include architecture decisions, component design, and acceptance criteria."
|
|
125
|
+
Skip this step for ADR-only output.
|
|
74
126
|
|
|
75
|
-
### Step
|
|
76
|
-
|
|
127
|
+
### Step 6: Document Review
|
|
128
|
+
Review each created document:
|
|
129
|
+
- ADR: Spawn document-reviewer agent: "Review the ADR for consistency and completeness. doc_type: ADR. target: [ADR path]. codebase_analysis: [output from Step 2]."
|
|
130
|
+
- Design Doc: Spawn document-reviewer agent: "Review the Design Doc for consistency and completeness. doc_type: DesignDoc. target: [Design Doc path]. codebase_analysis: [output from Step 2]. code_verification: [output from Step 5]."
|
|
77
131
|
|
|
78
|
-
### Step
|
|
79
|
-
|
|
132
|
+
### Step 7: Consistency Verification
|
|
133
|
+
For Design Docs only, spawn design-sync agent: "Verify consistency of the design document with other existing design documents and project constraints."
|
|
80
134
|
|
|
81
|
-
|
|
82
|
-
Spawn design-sync agent: "Verify consistency of the design document with other existing design documents and project constraints."
|
|
135
|
+
Skip this step for ADR-only output.
|
|
83
136
|
|
|
84
137
|
**Note**: design-sync returns `sync_status: "SKIPPED"` when only 1 Design Doc exists. This is distinct from `NO_CONFLICTS` and MUST be reported as such to the user.
|
|
85
138
|
|
|
86
139
|
## Completion Criteria
|
|
87
140
|
|
|
88
|
-
- [ ]
|
|
89
|
-
- [ ] Spawned codebase-analyzer and passed its findings into design creation
|
|
90
|
-
- [ ]
|
|
91
|
-
- [ ]
|
|
141
|
+
- [ ] Built the Step 1 scope bootstrap seed or obtained target files/modules from the user
|
|
142
|
+
- [ ] Spawned codebase-analyzer with populated requirement context and passed its findings into design creation
|
|
143
|
+
- [ ] Confirmed the design scope with the user before document creation
|
|
144
|
+
- [ ] Created all documents required by `documentTypeRationale` via technical-designer
|
|
145
|
+
- [ ] Spawned code-verifier and passed its findings into document review for Design Docs
|
|
92
146
|
- [ ] Spawned document-reviewer and addressed feedback
|
|
93
|
-
- [ ] Spawned design-sync for consistency verification
|
|
147
|
+
- [ ] Spawned design-sync for consistency verification for Design Docs
|
|
94
148
|
- [ ] Obtained user approval for design document
|
|
95
149
|
- [ ] All `[Stop: ...]` markers honored with user confirmation
|
|
96
150
|
|
|
97
151
|
## Output Example
|
|
98
152
|
Design phase completed.
|
|
99
|
-
-
|
|
153
|
+
- ADR: docs/adr/[document-name].md or N/A
|
|
154
|
+
- Design document: docs/design/[document-name].md or N/A
|
|
100
155
|
- Approval status: User approved
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: recipe-front-design
|
|
3
|
-
description: "Execute from
|
|
3
|
+
description: "Execute from codebase-scoped analysis to frontend design document creation including UI Spec."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
**Context**: Dedicated to the frontend design phase.
|
|
@@ -9,8 +9,7 @@ description: "Execute from requirement analysis to frontend design document crea
|
|
|
9
9
|
|
|
10
10
|
1. [LOAD IF NOT ACTIVE] `documentation-criteria` -- document quality standards
|
|
11
11
|
2. [LOAD IF NOT ACTIVE] `implementation-approach` -- implementation methodology
|
|
12
|
-
3. [LOAD IF NOT ACTIVE] `
|
|
13
|
-
4. [LOAD IF NOT ACTIVE] `external-resource-context` -- external resource hearing and lookup
|
|
12
|
+
3. [LOAD IF NOT ACTIVE] `external-resource-context` -- external resource hearing and lookup
|
|
14
13
|
|
|
15
14
|
**Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
|
|
16
15
|
|
|
@@ -19,11 +18,13 @@ description: "Execute from requirement analysis to frontend design document crea
|
|
|
19
18
|
**Core Identity**: "I am not a worker. I am an orchestrator."
|
|
20
19
|
|
|
21
20
|
**Execution Method**:
|
|
22
|
-
-
|
|
23
|
-
- Codebase analysis -> performed by codebase-analyzer
|
|
21
|
+
- Scope bootstrap -> performed by the orchestrator as a file-location pass
|
|
22
|
+
- Codebase analysis -> performed by codebase-analyzer
|
|
23
|
+
- Scope confirmation -> performed by the orchestrator with user confirmation
|
|
24
|
+
- UI fact gathering -> performed by ui-analyzer
|
|
24
25
|
- UI Specification creation -> performed by ui-spec-designer
|
|
25
26
|
- Design document creation -> performed by technical-designer-frontend
|
|
26
|
-
- Design verification -> performed by code-verifier
|
|
27
|
+
- Design Doc verification -> performed by code-verifier
|
|
27
28
|
- Document review -> performed by document-reviewer
|
|
28
29
|
|
|
29
30
|
Orchestrator spawns agents and passes structured data between them.
|
|
@@ -31,9 +32,11 @@ Orchestrator spawns agents and passes structured data between them.
|
|
|
31
32
|
## Scope Boundaries
|
|
32
33
|
|
|
33
34
|
**Included in this skill**:
|
|
34
|
-
-
|
|
35
|
+
- Scope bootstrap: locating seed files so codebase-analyzer receives a populated input
|
|
36
|
+
- Codebase analysis with codebase-analyzer (entry point of the frontend design phase)
|
|
37
|
+
- Scope confirmation with the user, grounded in codebase-analyzer findings
|
|
35
38
|
- External resource hearing with external-resource-context
|
|
36
|
-
- UI fact gathering with ui-analyzer
|
|
39
|
+
- UI fact gathering with ui-analyzer
|
|
37
40
|
- UI Specification creation with ui-spec-designer (prototype code inquiry included)
|
|
38
41
|
- ADR creation (if architecture changes, new technology, or data flow changes)
|
|
39
42
|
- Design Doc creation with technical-designer-frontend
|
|
@@ -45,27 +48,76 @@ Requirements: $ARGUMENTS
|
|
|
45
48
|
|
|
46
49
|
## Execution Flow
|
|
47
50
|
|
|
48
|
-
### Step 1:
|
|
49
|
-
|
|
50
|
-
- What problems do you want to solve?
|
|
51
|
-
- Expected outcomes and success criteria
|
|
52
|
-
- Relationship with existing systems
|
|
51
|
+
### Step 1: Scope Bootstrap
|
|
52
|
+
Build a lightweight seed for codebase-analyzer. This is a file-location pass only, with no deep reading and no design decisions.
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
1. Extract candidate keywords from the user requirements: feature names, domain nouns, component names, route names, identifiers, or file-like terms.
|
|
55
|
+
2. Search each keyword separately with `rg -l --glob '!**/{node_modules,dist,build,coverage,.git}/**' --glob '!**/*.{lock,min.js,map}' '<keyword>'`. If `rg` is unavailable, use `grep -RIl` with the same exclusions where possible.
|
|
56
|
+
3. Bucket matches as `source`, `test`, `docs`, and `generated_or_vendor`. Exclude `generated_or_vendor` from the seed.
|
|
57
|
+
4. Rank matches in this order: path or filename match, component/route/hook/API symbol match, source content match, tests for selected source files, docs for selected source files.
|
|
58
|
+
5. Collect matched frontend and shared file paths as `affectedFiles`, and keep a one-line `seedRationale` for each file.
|
|
59
|
+
6. If the search returns no frontend or shared source files, ask the user which files, modules, routes, or components the design targets. Use the user's answer as `affectedFiles`. If the user confirms no related code exists, confirm whether to proceed with a new-surface design before invoking codebase-analyzer.
|
|
60
|
+
7. If the ranked seed has more than 20 files, present the top-ranked candidates and ask the user to narrow the seed before invoking codebase-analyzer.
|
|
56
61
|
|
|
57
|
-
|
|
58
|
-
|
|
62
|
+
Construct `requirement_analysis` with:
|
|
63
|
+
- `affectedFiles`: the Step 1 seed
|
|
64
|
+
- `affectedLayers`: `["frontend"]` plus `shared` when shared files are included
|
|
65
|
+
- `scale`: provisional scale from file count (`small` 1-2, `medium` 3-5, `large` 6+)
|
|
66
|
+
- `purpose`: the user requirements
|
|
67
|
+
- `confidence`: `confirmed` when target files are explicit or the ranked seed is focused; otherwise `provisional`
|
|
68
|
+
- `adrRequired`: `true` when the request changes component architecture, state ownership, routing architecture, data flow, external dependencies, or shared cross-boundary contracts; otherwise `false`
|
|
69
|
+
- `adrReason`: the specific matched ADR condition, or `null`
|
|
70
|
+
- `prdRequired`: `true` when scale is `large` and no existing PRD covers the scope; otherwise `false`
|
|
71
|
+
- `scopeDependencies`: questions whose answers can change the target files, scale, UI surface, or document type
|
|
72
|
+
- `questions`: user-facing questions needed before design
|
|
73
|
+
- `documentTypeRationale`: why ADR, Design Doc, or both are needed from the provisional seed
|
|
74
|
+
- `seedRationale`: one-line reason for each file in `affectedFiles`
|
|
75
|
+
- `technicalConsiderations`: include any obvious user-stated constraints, risks, and dependencies; use empty lists only when none are stated
|
|
59
76
|
|
|
60
|
-
### Step 2:
|
|
61
|
-
|
|
77
|
+
### Step 2: Codebase Analysis
|
|
78
|
+
Spawn codebase-analyzer agent: "Analyze the existing codebase to provide evidence for frontend Design Doc creation. Focus on existing implementations, state paths, API integrations, and constraints the design should respect. requirement_analysis: [Step 1 requirement_analysis]. requirements: [original user requirements]. layer: frontend. target_paths: [Step 1 affectedFiles]. focus_areas: component hierarchy, state management, UI interactions, data fetching."
|
|
79
|
+
|
|
80
|
+
### Step 3: Scope Confirmation
|
|
81
|
+
After codebase-analyzer returns, present the frontend design scope to the user before UI or design work:
|
|
82
|
+
- Target files/modules: `analysisScope.filesAnalyzed` and directly relevant components, routes, or modules
|
|
83
|
+
- Affected layers: inferred from `analysisScope.categoriesDetected`, `focusAreas`, and paths
|
|
84
|
+
- Recommended document path: ADR, Design Doc, or both, with `documentTypeRationale`, `adrRequired`, and `adrReason`
|
|
85
|
+
- PRD status: whether `prdRequired` is true, whether an existing PRD path is available, and what decision is needed before UI/design work
|
|
86
|
+
- Unknowns/assumptions: `limitations` and unresolved risks
|
|
87
|
+
- Questions before design: scope questions that change the UI surface, design target, or scale
|
|
88
|
+
|
|
89
|
+
Ask the user to choose one:
|
|
90
|
+
- Proceed with the recommended document path
|
|
91
|
+
- Correct the scope and re-run codebase-analyzer
|
|
92
|
+
- Answer open questions, then proceed
|
|
93
|
+
- Provide an existing PRD path when `prdRequired` is true
|
|
94
|
+
- Explicitly approve proceeding without a PRD when `prdRequired` is true and no PRD will be provided
|
|
95
|
+
|
|
96
|
+
If `prdRequired` is true and the user neither provides a PRD path nor explicitly approves proceeding without a PRD, stop. This recipe does not create PRDs.
|
|
97
|
+
|
|
98
|
+
After confirmation, set the final scale from the confirmed target file count (`small` 1-2, `medium` 3-5, `large` 6+), recompute `adrRequired`, `adrReason`, `prdRequired`, `confidence`, and `documentTypeRationale`, then carry the complete confirmed requirement context into UI and design creation.
|
|
99
|
+
|
|
100
|
+
ADR-only path: run Steps 1, 2, 3, and 8. Also run Step 4 only when the ADR depends on external frontend resources, and Step 6 only when the ADR depends on existing UI facts beyond Step 2. Skip Steps 5 and 7.
|
|
101
|
+
|
|
102
|
+
Design Doc path: run Steps 1 through 8.
|
|
103
|
+
|
|
104
|
+
Both ADR and Design Doc path: run the Design Doc path, creating the ADR before the Design Doc in Step 8.
|
|
105
|
+
|
|
106
|
+
**[STOP -- BLOCKING]** Wait for user confirmation before proceeding.
|
|
107
|
+
|
|
108
|
+
### Step 4: External Resource Hearing
|
|
109
|
+
For Design Doc output, run this step before UI fact gathering. For ADR-only output, run it only when the ADR depends on external frontend resources.
|
|
110
|
+
|
|
111
|
+
After scope confirmation, run the frontend domain hearing protocol from `external-resource-context`.
|
|
62
112
|
|
|
63
113
|
Persist project-level access methods in `docs/project-context/external-resources.md`. When the file already exists, ask whether to keep current axes, refresh all axes, or refresh selected axes.
|
|
64
114
|
|
|
65
115
|
**[STOP -- BLOCKING]** Complete external resource hearing before UI fact gathering.
|
|
66
116
|
Proceed to UI fact gathering after project-level external resources are written or the update is explicitly skipped.
|
|
67
117
|
|
|
68
|
-
### Step
|
|
118
|
+
### Step 5: Prototype Inquiry
|
|
119
|
+
For Design Doc output only. Skip this step for ADR-only output.
|
|
120
|
+
|
|
69
121
|
After external resource hearing completes, ask the user about prototype code:
|
|
70
122
|
|
|
71
123
|
**Ask the user**: "Do you have prototype code for this feature? If so, please provide the path to the code. The prototype will be placed in `docs/ui-spec/assets/` as reference material for the UI Spec."
|
|
@@ -73,27 +125,32 @@ After external resource hearing completes, ask the user about prototype code:
|
|
|
73
125
|
**[STOP -- BLOCKING]** Wait for user response about prototype code availability.
|
|
74
126
|
**CANNOT proceed until user responds.**
|
|
75
127
|
|
|
76
|
-
### Step
|
|
77
|
-
|
|
128
|
+
### Step 6: UI Fact Gathering Phase
|
|
129
|
+
For Design Doc output, run this step before UI Specification creation. For ADR-only output, run it only when the ADR decision depends on existing UI facts beyond the Step 2 codebase analysis.
|
|
130
|
+
|
|
131
|
+
When Step 5 ran, use the prototype path as an input when one was provided. When Step 5 was skipped, set `prototype_path` to unavailable.
|
|
132
|
+
|
|
133
|
+
Spawn ui-analyzer agent: "Gather UI facts for frontend design. requirement_analysis: [confirmed requirement context]. requirements: [original user requirements]. target_paths: [confirmed frontend affected files and directories]. target_components: [frontend target components when known]. ui_spec_path: [path if an existing UI Spec covers this feature]. prototype_path: [path if provided]. Read docs/project-context/external-resources.md, resolve relevant UI external resources through declared access methods, and analyze component structure, props patterns, CSS layout, state displays, accessibility, generated artifacts, and candidate write set."
|
|
78
134
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- Spawn ui-analyzer agent: "Gather UI facts for frontend design. requirement_analysis: [JSON from requirement-analyzer]. requirements: [original user requirements]. target_paths: [frontend affected files and directories from requirement-analyzer]. target_components: [frontend target components when known]. ui_spec_path: [path if an existing UI Spec covers this feature]. prototype_path: [path if provided]. Read docs/project-context/external-resources.md, resolve relevant UI external resources through declared access methods, and analyze component structure, props patterns, CSS layout, state displays, accessibility, generated artifacts, and candidate write set."
|
|
135
|
+
### Step 7: UI Specification Phase
|
|
136
|
+
For Design Doc output only. Skip this step for ADR-only output.
|
|
82
137
|
|
|
83
|
-
### Step 5: UI Specification Phase
|
|
84
138
|
After UI fact gathering completes, create the UI Specification:
|
|
85
|
-
- Spawn ui-spec-designer agent: "Create UI Spec [from PRD at [path] if PRD exists]. UI analysis: [JSON from ui-analyzer]. [Prototype code is at [user-provided path]. Place prototype in docs/ui-spec/assets/{feature-name}/ | Prototype path unavailable; proceed from PRD/requirements and UI analysis.] Fill External Resources Used from docs/project-context/external-resources.md and feature identifiers."
|
|
139
|
+
- Spawn ui-spec-designer agent: "Create UI Spec [from PRD at [path] if PRD exists]. Requirements: [original user requirements]. Confirmed scope: [Step 3 confirmed scope]. Codebase analysis: [JSON from codebase-analyzer]. UI analysis: [JSON from ui-analyzer]. [Prototype code is at [user-provided path]. Place prototype in docs/ui-spec/assets/{feature-name}/ | Prototype path unavailable; proceed from PRD/requirements and UI analysis.] Fill External Resources Used from docs/project-context/external-resources.md and feature identifiers."
|
|
86
140
|
- Spawn document-reviewer agent: "doc_type: UISpec target: [ui-spec path] Review for consistency and completeness"
|
|
87
141
|
|
|
88
142
|
**[STOP -- BLOCKING]** Present UI Spec for user approval.
|
|
89
143
|
**CANNOT proceed until user explicitly approves the UI Spec.**
|
|
90
144
|
|
|
91
|
-
### Step
|
|
92
|
-
Create appropriate design documents according to scale
|
|
93
|
-
- For ADR: Spawn technical-designer-frontend agent: "Create ADR for [technical decision]"
|
|
94
|
-
- For Design Doc: Spawn technical-designer-frontend agent: "Create Design Doc based on requirements. Codebase Analysis: [JSON from codebase-analyzer]. UI Analysis: [JSON from ui-analyzer]. UI Spec is at [ui-spec path]. Inherit component structure and state design from UI Spec. Fill External Resources Used from docs/project-context/external-resources.md and feature identifiers."
|
|
95
|
-
-
|
|
96
|
-
-
|
|
145
|
+
### Step 8: Design Document Creation Phase
|
|
146
|
+
Create appropriate design documents according to confirmed scope and scale:
|
|
147
|
+
- For ADR: Spawn technical-designer-frontend agent: "document_to_create: ADR. Create ADR for [technical decision]. Requirements: [original user requirements]. confirmed_requirement_context: [complete confirmed requirement context from Step 3, including confirmed scope, confirmed scale, adrRequired, adrReason, prdRequired, PRD path or explicit no-PRD approval when applicable, documentTypeRationale, scopeDependencies, questions, and seedRationale]. Follow `document_to_create` for this invocation; `documentTypeRationale` describes the overall confirmed path. Codebase Analysis: [JSON from codebase-analyzer]. UI Analysis: [JSON from ui-analyzer, only if Step 6 ran]. Present at least two alternatives with trade-offs."
|
|
148
|
+
- For Design Doc: Spawn technical-designer-frontend agent: "document_to_create: DesignDoc. Create Design Doc based on requirements. Requirements: [original user requirements]. confirmed_requirement_context: [complete confirmed requirement context from Step 3, including confirmed scope, confirmed scale, adrRequired, adrReason, prdRequired, PRD path or explicit no-PRD approval when applicable, documentTypeRationale, scopeDependencies, questions, and seedRationale]. Follow `document_to_create` for this invocation; `documentTypeRationale` describes the overall confirmed path. Codebase Analysis: [JSON from codebase-analyzer]. UI Analysis: [JSON from ui-analyzer]. UI Spec is at [ui-spec path]. Inherit component structure and state design from UI Spec. Fill External Resources Used from docs/project-context/external-resources.md and feature identifiers. Present at least two alternatives with trade-offs."
|
|
149
|
+
- When both ADR and Design Doc are required, create the ADR first. After the ADR path is available, create the Design Doc with `document_to_create: DesignDoc` and `adr_path: [ADR path]`; the Design Doc must reference the ADR decision.
|
|
150
|
+
- For Design Docs only, spawn code-verifier agent: "Verify Design Doc against code. doc_type: design-doc. document_path: [document path]. verbose: false."
|
|
151
|
+
- Review each created document:
|
|
152
|
+
- ADR: Spawn document-reviewer agent: "Review the ADR for consistency and completeness. doc_type: ADR. target: [ADR path]. mode: composite. codebase_analysis: [JSON from codebase-analyzer]. ui_analysis: [JSON from ui-analyzer, when available]."
|
|
153
|
+
- Design Doc: Spawn document-reviewer agent: "Review the Design Doc for consistency and completeness. doc_type: DesignDoc. target: [Design Doc path]. mode: composite. codebase_analysis: [JSON from codebase-analyzer]. ui_analysis: [JSON from ui-analyzer]. code_verification: [JSON from code-verifier]."
|
|
97
154
|
|
|
98
155
|
**[STOP -- BLOCKING]** Present design alternatives and trade-offs, obtain user approval.
|
|
99
156
|
**CANNOT proceed until user explicitly approves the design document.**
|
|
@@ -102,15 +159,18 @@ ENFORCEMENT: Every stop point MUST be respected. Skipping user approval invalida
|
|
|
102
159
|
|
|
103
160
|
## Completion Criteria
|
|
104
161
|
|
|
105
|
-
- [ ]
|
|
106
|
-
- [ ]
|
|
107
|
-
- [ ]
|
|
108
|
-
- [ ]
|
|
109
|
-
- [ ] Design
|
|
162
|
+
- [ ] Built the Step 1 scope bootstrap seed or obtained target files/modules from the user
|
|
163
|
+
- [ ] Codebase analysis completed before UI and design work
|
|
164
|
+
- [ ] Confirmed the frontend design scope with the user before UI and design work
|
|
165
|
+
- [ ] External resource hearing completed when applicable
|
|
166
|
+
- [ ] UI analysis completed before Design Doc creation when applicable
|
|
167
|
+
- [ ] UI Specification created and approved for Design Docs
|
|
168
|
+
- [ ] All documents required by `documentTypeRationale` created and approved
|
|
110
169
|
- [ ] All document reviews passed
|
|
111
170
|
|
|
112
171
|
## Output Example
|
|
113
172
|
Frontend design phase completed.
|
|
114
173
|
- UI Specification: docs/ui-spec/[feature-name]-ui-spec.md
|
|
115
|
-
-
|
|
174
|
+
- ADR: docs/adr/[document-name].md or N/A
|
|
175
|
+
- Design document: docs/design/[document-name].md or N/A
|
|
116
176
|
- Approval status: User approved
|
|
@@ -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
|
|
@@ -11,7 +11,7 @@ You are an AI assistant specializing in objective codebase analysis for design p
|
|
|
11
11
|
☐ [VERIFIED] All required skills from [[skills.config]] are LOADED
|
|
12
12
|
☐ [VERIFIED] Input parameters received and validated
|
|
13
13
|
☐ [VERIFIED] Task scope understood
|
|
14
|
-
☐ [VERIFIED]
|
|
14
|
+
☐ [VERIFIED] Requirement context or PRD context available
|
|
15
15
|
|
|
16
16
|
## Required Skills [LOADING PROTOCOL]
|
|
17
17
|
|
|
@@ -33,7 +33,7 @@ You are an AI assistant specializing in objective codebase analysis for design p
|
|
|
33
33
|
|
|
34
34
|
## Input Parameters
|
|
35
35
|
|
|
36
|
-
- **requirement_analysis**: JSON
|
|
36
|
+
- **requirement_analysis**: Requirement context JSON from the orchestrator or requirement-analyzer (required)
|
|
37
37
|
- **requirements**: Original user requirements text (required)
|
|
38
38
|
- **prd_path**: Path to PRD (optional)
|
|
39
39
|
- **layer**: Scope filter for multi-layer projects, such as `backend`, `frontend`, or `shared` (optional)
|
|
@@ -51,10 +51,10 @@ Identify what exists, what appears missing, and what deserves close attention in
|
|
|
51
51
|
|
|
52
52
|
1. Read `requirement_analysis` and extract:
|
|
53
53
|
- `affectedFiles`
|
|
54
|
-
- `affectedLayers`
|
|
55
|
-
- `scale`
|
|
54
|
+
- `affectedLayers` when provided
|
|
55
|
+
- `scale` when provided
|
|
56
56
|
- `purpose`
|
|
57
|
-
- `technicalConsiderations`
|
|
57
|
+
- `technicalConsiderations` when provided
|
|
58
58
|
2. Read PRD when `prd_path` is provided and extract relevant scope boundaries
|
|
59
59
|
3. When `layer` is provided, narrow the candidate scope to that layer first
|
|
60
60
|
4. When `target_paths` are provided, prioritize them over inferred paths and treat them as the primary analysis scope
|
|
@@ -51,6 +51,8 @@ Skill Status:
|
|
|
51
51
|
|
|
52
52
|
- **doc_type**: Document type (`PRD`/`ADR`/`UISpec`/`DesignDoc`)
|
|
53
53
|
- **target**: Document path to review
|
|
54
|
+
- **codebase_analysis**: codebase-analyzer JSON used to create the target document (optional)
|
|
55
|
+
- **ui_analysis**: ui-analyzer JSON used to create the target document (optional)
|
|
54
56
|
- **code_verification**: Code-verifier results JSON (optional)
|
|
55
57
|
|
|
56
58
|
## Review Modes
|
|
@@ -68,10 +70,10 @@ Skill Status:
|
|
|
68
70
|
|
|
69
71
|
### Step 0: Input Context Analysis (MANDATORY)
|
|
70
72
|
|
|
71
|
-
1. **Scan prompt** for: JSON blocks, verification results, discrepancies, prior feedback
|
|
73
|
+
1. **Scan prompt** for: JSON blocks, codebase analysis, UI analysis, verification results, discrepancies, prior feedback
|
|
72
74
|
2. **Extract actionable items** (may be zero)
|
|
73
75
|
- Normalize each to: `{ id, description, location, severity }`
|
|
74
|
-
3. **Record**: `prior_context_count: <N
|
|
76
|
+
3. **Record**: `prior_context_count: <N>`, `codebase_analysis_available: true|false`, `ui_analysis_available: true|false`
|
|
75
77
|
4. Proceed to Step 1
|
|
76
78
|
|
|
77
79
|
### Step 1: Parameter Analysis
|
|
@@ -79,6 +81,8 @@ Skill Status:
|
|
|
79
81
|
- Specialized verification based on doc_type
|
|
80
82
|
- For DesignDoc: Verify "Applicable Standards" section exists with explicit/implicit classification
|
|
81
83
|
- Missing or incomplete → `critical` issue; implicit standards without confirmation → `important` issue
|
|
84
|
+
- When `codebase_analysis` is provided, use `analysisScope`, `existingElements`, `constraints`, `qualityAssurance`, `focusAreas`, and `limitations` as source evidence for scope, feasibility, and completeness checks
|
|
85
|
+
- When `ui_analysis` is provided, use `componentStructure`, `propsPatterns`, `cssLayout`, `stateDisplay`, `displayConditions`, `accessibility`, and `candidateWriteSet` as source evidence for UI scope, feasibility, and completeness checks
|
|
82
86
|
- When `code_verification` is provided, use its discrepancies and reverse coverage as pre-verified evidence during review
|
|
83
87
|
|
|
84
88
|
### Step 2: Target Document Collection
|
|
@@ -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"` —
|
|
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"` —
|
|
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
|
|
|
@@ -10,7 +10,7 @@ You are a frontend technical design specialist AI assistant for creating Archite
|
|
|
10
10
|
☐ [VERIFIED] All required skills from [[skills.config]] are LOADED
|
|
11
11
|
☐ [VERIFIED] Input parameters received and validated
|
|
12
12
|
☐ [VERIFIED] Task scope understood
|
|
13
|
-
☐ [VERIFIED] Requirements
|
|
13
|
+
☐ [VERIFIED] Requirements, confirmed scope, UI Spec, or PRD available
|
|
14
14
|
|
|
15
15
|
**ENFORCEMENT**: HALT and return to caller if any gate unchecked
|
|
16
16
|
|
|
@@ -40,6 +40,8 @@ Representative triggers:
|
|
|
40
40
|
- ADR: component architecture, state-management, React pattern, or external library changes
|
|
41
41
|
- Design Doc: 3+ component/file changes, complex state management, or new React patterns/custom hooks
|
|
42
42
|
|
|
43
|
+
When `confirmed_requirement_context.documentTypeRationale` is provided by the orchestrator, treat it as the authority for the overall confirmed document path. When `document_to_create` is also provided, it is the authority for the current invocation's single document output. Do not re-derive or override either value. If they conflict with the criteria above, report the discrepancy inside the created document and follow the orchestrator-provided values.
|
|
44
|
+
|
|
43
45
|
## Mandatory Process Before Design Doc Creation
|
|
44
46
|
|
|
45
47
|
### Existing Code Investigation【Required】
|
|
@@ -234,7 +236,10 @@ When external resources are recorded for the project:
|
|
|
234
236
|
- `update`: Update existing document
|
|
235
237
|
- `reverse-engineer`: Document existing frontend architecture as-is
|
|
236
238
|
|
|
237
|
-
- **
|
|
239
|
+
- **confirmed_requirement_context**: Confirmed requirement context from the orchestrator when provided, including confirmed scope, confirmed scale, `adrRequired`, `adrReason`, `prdRequired`, PRD path or explicit no-PRD approval, `documentTypeRationale`, `scopeDependencies`, `questions`, and `seedRationale`. When provided, this is the primary source for document type, scope, scale, and open-question handling.
|
|
240
|
+
- **document_to_create**: Current invocation's document output (`ADR` or `DesignDoc`) when provided by the orchestrator. This value determines what this invocation creates.
|
|
241
|
+
- **adr_path**: ADR document path to reference from a Design Doc when the ADR was created earlier in the same flow (optional)
|
|
242
|
+
- **Requirements Analysis Results**: Requirements analysis results (scale determination, technical requirements, etc.) when provided by requirement-analyzer
|
|
238
243
|
- **Codebase Analysis** (optional, from codebase-analyzer):
|
|
239
244
|
- Use as the primary source for Existing Codebase Analysis when provided
|
|
240
245
|
- `existingElements` informs implementation path mapping and inspection evidence
|
|
@@ -252,7 +257,7 @@ When external resources are recorded for the project:
|
|
|
252
257
|
- `candidateWriteSet` informs change impact mapping and planning scope
|
|
253
258
|
- **PRD**: PRD document (if exists)
|
|
254
259
|
- **UI Spec**: UI Specification document (if exists, for frontend features)
|
|
255
|
-
- **Documents to Create**: ADR, Design Doc, or both
|
|
260
|
+
- **Documents to Create**: ADR, Design Doc, or both. When `document_to_create` is provided, create only that document in this invocation; use `confirmed_requirement_context.documentTypeRationale` as the overall flow context.
|
|
256
261
|
- **Existing Architecture Information**:
|
|
257
262
|
- Current technology stack (React, build tool, Tailwind CSS, etc.)
|
|
258
263
|
- Adopted component architecture patterns (Atomic Design, Feature-based, etc.)
|
|
@@ -10,7 +10,7 @@ You are a technical design specialist AI assistant for creating Architecture Dec
|
|
|
10
10
|
☐ [VERIFIED] All required skills from [[skills.config]] are LOADED
|
|
11
11
|
☐ [VERIFIED] Input parameters received and validated
|
|
12
12
|
☐ [VERIFIED] Task scope understood
|
|
13
|
-
☐ [VERIFIED] Requirements
|
|
13
|
+
☐ [VERIFIED] Requirements, confirmed scope, or PRD available
|
|
14
14
|
|
|
15
15
|
**ENFORCEMENT**: HALT and return to caller if any gate unchecked
|
|
16
16
|
|
|
@@ -40,6 +40,8 @@ Representative triggers:
|
|
|
40
40
|
- ADR: contract, architecture, data-flow, or external dependency changes
|
|
41
41
|
- Design Doc: 3+ file changes, complex implementation logic, or new algorithms/patterns
|
|
42
42
|
|
|
43
|
+
When `confirmed_requirement_context.documentTypeRationale` is provided by the orchestrator, treat it as the authority for the overall confirmed document path. When `document_to_create` is also provided, it is the authority for the current invocation's single document output. Do not re-derive or override either value. If they conflict with the criteria above, report the discrepancy inside the created document and follow the orchestrator-provided values.
|
|
44
|
+
|
|
43
45
|
## Mandatory Process Before Design Doc Creation
|
|
44
46
|
|
|
45
47
|
### External Resources Integration
|
|
@@ -272,7 +274,10 @@ Confirm and document conflicts with existing systems at each integration point t
|
|
|
272
274
|
- `update`: Update existing document
|
|
273
275
|
- `reverse-engineer`: Document existing architecture as-is
|
|
274
276
|
|
|
275
|
-
- **
|
|
277
|
+
- **confirmed_requirement_context**: Confirmed requirement context from the orchestrator when provided, including confirmed scope, confirmed scale, `adrRequired`, `adrReason`, `prdRequired`, PRD path or explicit no-PRD approval, `documentTypeRationale`, `scopeDependencies`, `questions`, and `seedRationale`. When provided, this is the primary source for document type, scope, scale, and open-question handling.
|
|
278
|
+
- **document_to_create**: Current invocation's document output (`ADR` or `DesignDoc`) when provided by the orchestrator. This value determines what this invocation creates.
|
|
279
|
+
- **adr_path**: ADR document path to reference from a Design Doc when the ADR was created earlier in the same flow (optional)
|
|
280
|
+
- **Requirements Analysis Results**: Requirements analysis results (scale determination, technical requirements, etc.) when provided by requirement-analyzer
|
|
276
281
|
- **Codebase Analysis** (optional, from codebase-analyzer):
|
|
277
282
|
- Use as the primary source for Existing Codebase Analysis when provided
|
|
278
283
|
- `existingElements` informs implementation path mapping and inspection evidence
|
|
@@ -282,7 +287,7 @@ Confirm and document conflicts with existing systems at each integration point t
|
|
|
282
287
|
- `dataTransformationPipelines` informs the `Output Comparison` section in Verification Strategy
|
|
283
288
|
- Additional investigation should focus on gaps or limitations that the analysis calls out
|
|
284
289
|
- **PRD**: PRD document (if exists)
|
|
285
|
-
- **Documents to Create**: ADR, Design Doc, or both
|
|
290
|
+
- **Documents to Create**: ADR, Design Doc, or both. When `document_to_create` is provided, create only that document in this invocation; use `confirmed_requirement_context.documentTypeRationale` as the overall flow context.
|
|
286
291
|
- **Existing Architecture Information**:
|
|
287
292
|
- Current technology stack
|
|
288
293
|
- Adopted architecture patterns
|
|
@@ -23,7 +23,7 @@ Track work steps. Include first "Confirm skill constraints" and final "Verify sk
|
|
|
23
23
|
|
|
24
24
|
## Input Parameters
|
|
25
25
|
|
|
26
|
-
- **requirement_analysis**: Requirement
|
|
26
|
+
- **requirement_analysis**: Requirement context JSON from the orchestrator or requirement-analyzer
|
|
27
27
|
- **requirements**: Original user requirements text
|
|
28
28
|
- **ui_spec_path**: Existing UI Spec path when available
|
|
29
29
|
- **prototype_path**: Prototype code path when provided by the workflow
|
|
@@ -10,7 +10,7 @@ You are a UI specification specialist AI assistant for creating UI Specification
|
|
|
10
10
|
☐ [VERIFIED] All required skills from [[skills.config]] are LOADED
|
|
11
11
|
☐ [VERIFIED] Input parameters received and validated
|
|
12
12
|
☐ [VERIFIED] Task scope understood
|
|
13
|
-
☐ [VERIFIED] PRD or
|
|
13
|
+
☐ [VERIFIED] PRD, requirements, or confirmed scope context available
|
|
14
14
|
|
|
15
15
|
**ENFORCEMENT**: HALT and return to caller if any gate unchecked
|
|
16
16
|
|
|
@@ -45,16 +45,17 @@ Skill Status:
|
|
|
45
45
|
|
|
46
46
|
## Required Information
|
|
47
47
|
|
|
48
|
-
- **PRD**: PRD document path
|
|
48
|
+
- **PRD**: PRD document path when one exists; otherwise use the requirements, confirmed scope, and UI analysis provided by the orchestrator
|
|
49
49
|
- **Prototype code path**: Path to prototype code (optional, placed in `docs/ui-spec/assets/{feature-name}/`)
|
|
50
|
+
- **Codebase analysis**: JSON from codebase-analyzer when provided; use `analysisScope`, `existingElements`, `constraints`, `focusAreas`, and `limitations` to ground screen/component scope and reuse decisions
|
|
50
51
|
- **UI analysis**: JSON from ui-analyzer when provided, including externalResources, componentStructure, propsPatterns, cssLayout, stateDisplay, focusAreas, and candidateWriteSet
|
|
51
52
|
- **Existing frontend codebase**: Will be investigated automatically
|
|
52
53
|
|
|
53
54
|
## Mandatory Process Before UI Spec Creation
|
|
54
55
|
|
|
55
|
-
### Step 1: PRD Analysis
|
|
56
|
+
### Step 1: PRD or Requirements Analysis
|
|
56
57
|
|
|
57
|
-
1. **Read and understand PRD**
|
|
58
|
+
1. **Read and understand PRD or orchestrator-provided requirements**
|
|
58
59
|
- Extract all acceptance criteria with AC IDs
|
|
59
60
|
- Identify screens/views implied by user stories and requirements
|
|
60
61
|
- Note accessibility requirements and UI quality metrics from PRD
|
|
@@ -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.
|
|
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.
|
|
3
|
+
"version": "0.6.4",
|
|
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",
|