codex-workflows 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/.agents/skills/coding-rules/SKILL.md +14 -2
  2. package/.agents/skills/documentation-criteria/references/design-template.md +47 -3
  3. package/.agents/skills/documentation-criteria/references/plan-template.md +3 -3
  4. package/.agents/skills/documentation-criteria/references/task-template.md +1 -1
  5. package/.agents/skills/documentation-criteria/references/ui-spec-template.md +8 -0
  6. package/.agents/skills/external-resource-context/SKILL.md +99 -0
  7. package/.agents/skills/external-resource-context/agents/openai.yaml +7 -0
  8. package/.agents/skills/external-resource-context/references/api.md +20 -0
  9. package/.agents/skills/external-resource-context/references/backend.md +21 -0
  10. package/.agents/skills/external-resource-context/references/frontend.md +21 -0
  11. package/.agents/skills/external-resource-context/references/infra.md +21 -0
  12. package/.agents/skills/external-resource-context/references/template.md +72 -0
  13. package/.agents/skills/recipe-front-adjust/SKILL.md +113 -0
  14. package/.agents/skills/recipe-front-adjust/agents/openai.yaml +7 -0
  15. package/.agents/skills/recipe-front-design/SKILL.md +28 -9
  16. package/.agents/skills/recipe-fullstack-implement/SKILL.md +4 -1
  17. package/.agents/skills/subagents-orchestration-guide/SKILL.md +2 -0
  18. package/.agents/skills/subagents-orchestration-guide/references/monorepo-flow.md +44 -47
  19. package/.agents/skills/task-analyzer/SKILL.md +3 -2
  20. package/.agents/skills/task-analyzer/references/skills-index.yaml +42 -3
  21. package/.codex/agents/code-reviewer.toml +7 -1
  22. package/.codex/agents/document-reviewer.toml +3 -0
  23. package/.codex/agents/quality-fixer-frontend.toml +5 -0
  24. package/.codex/agents/quality-fixer.toml +5 -0
  25. package/.codex/agents/task-executor-frontend.toml +11 -0
  26. package/.codex/agents/task-executor.toml +11 -0
  27. package/.codex/agents/technical-designer-frontend.toml +64 -17
  28. package/.codex/agents/technical-designer.toml +54 -17
  29. package/.codex/agents/ui-analyzer.toml +307 -0
  30. package/.codex/agents/ui-spec-designer.toml +15 -0
  31. package/README.md +42 -24
  32. package/package.json +1 -1
@@ -14,11 +14,23 @@ For language-specific rules, also read:
14
14
 
15
15
  1. **Maintainability over Speed**: Prioritize long-term code health
16
16
  2. **Simplicity First**: YAGNI principle — simplest solution that meets requirements
17
- 3. **Explicit over Implicit**: Clear intentions through code structure and naming
18
- 4. **Delete over Comment**: Remove unused code instead of commenting it out
17
+ 3. **Minimum Surface for Required Coverage**: At a fixed coverage point, choose the smallest design surface that satisfies current user-visible requirements and accepted technical constraints. See "Minimum Surface Terms" below.
18
+ 4. **Explicit over Implicit**: Clear intentions through code structure and naming
19
+ 5. **Delete over Comment**: Remove unused code instead of commenting it out
19
20
 
20
21
  **ENFORCEMENT**: Every code change MUST align with these principles
21
22
 
23
+ ## Minimum Surface Terms [MANDATORY]
24
+
25
+ Use these definitions whenever a design, review, or implementation instruction references "Minimum Surface for Required Coverage".
26
+
27
+ - **Maintenance-surface-bearing elements**: persistent state; public-contract or cross-boundary fields/props; behavioral modes, flags, or variants; reusable abstractions; extracted services; shared utilities; component splits.
28
+ - **Out of scope**: private local variables, internal helper functions with no external observers, test fixtures or mocks, temporary migration scaffolding removed before completion, and private implementation details confined to one function or file.
29
+ - **Precedence rule**: When an element matches both in-scope and out-of-scope conditions, the in-scope classification wins.
30
+ - **Selection rule**: Adopt a larger surface only by naming a current requirement or accepted technical constraint that smaller alternatives fail to cover. Value-based arguments are tiebreakers only.
31
+ - **Subjective-only rationales**: "reusable", "useful", "future-ready", "convenient", "convenient for implementation", and "users might want".
32
+ - **Relation to YAGNI**: YAGNI decides present vs. future need over time; Minimum Surface minimizes surface area for the current accepted scope.
33
+
22
34
  ## Code Quality [MANDATORY]
23
35
 
24
36
  - Refactor as you go — eliminate technical debt immediately
@@ -33,6 +33,14 @@ unknowns:
33
33
  - [ADR File Name]: [Related decision items]
34
34
  - Reference common technical ADRs when applicable
35
35
 
36
+ ### External Resources Used
37
+
38
+ | Project Resource Label | Feature Identifier | Purpose |
39
+ |------------------------|--------------------|---------|
40
+ | frontend-design-origin | [screen / node / frame / route / story id] | [why this feature uses it] |
41
+ | api-schema-source | [endpoint / operation id / schema name] | [why this feature uses it] |
42
+ | infra-iac-source | [service / module / environment] | [why this feature uses it] |
43
+
36
44
  ### Agreement Checklist
37
45
 
38
46
  #### Scope
@@ -171,6 +179,8 @@ Use this table for runtime wiring, switching, or registration points. Record how
171
179
 
172
180
  ### Main Components
173
181
 
182
+ Repeat the block below for each component.
183
+
174
184
  #### Component 1
175
185
 
176
186
  - **Responsibility**: [Scope of responsibility for this component]
@@ -188,6 +198,38 @@ Use this table for runtime wiring, switching, or registration points. Record how
188
198
 
189
199
  **Decision**: [reuse / extend / new] -- [rationale in 1-2 sentences]
190
200
 
201
+ ### Minimal Surface Alternatives (When Introducing Maintenance-Surface Elements)
202
+
203
+ One entry per new in-scope element as defined by coding-rules "Minimum Surface Terms". Mark this section as N/A with brief rationale when the design introduces no in-scope elements.
204
+
205
+ #### Element 1: [name of the new element]
206
+
207
+ **Step 1 - Fixed Requirements**
208
+ - [AC ID or constraint ID]: [requirement / constraint text]
209
+ - [AC ID or constraint ID]: [requirement / constraint text]
210
+
211
+ **Steps 2-3 - Alternatives Compared**
212
+
213
+ | Alternative | Current requirements covered (AC or constraint IDs) | New state introduced (count) | New concept / mode / flag / prop / variant (count) | Crosses component boundary (yes/no) | Breaking change or migration required (yes/no) | Subjective cost notes |
214
+ |-------------|------------------------------------------------------|------------------------------|------------------------------------|--------------------------------------|-------------------------------------------------|-----------------------|
215
+ | [The added element as proposed] | | | | | | |
216
+ | [Subtractive alternative: derive / compute on demand / keep at caller / reuse existing / do not introduce new state] | | | | | | |
217
+ | [Optional third alternative] | | | | | | |
218
+
219
+ **Step 4 - Selected Alternative and Rationale**
220
+ - **Selected**: [alternative name]
221
+ - **Rationale**:
222
+ - If selected = smallest alternative considered: state "smallest alternative considered; no further reduction available"
223
+ - If selected > smallest: name the current requirement(s) from step 1 that smaller alternatives fail to satisfy
224
+
225
+ **Step 5 - Rejected Alternatives Log**
226
+ - [Alternative name]: [1-2 lines on what it was and why rejected]
227
+ - [Alternative name]: [1-2 lines on what it was and why rejected]
228
+
229
+ (Repeat the Element block above for each additional in-scope element.)
230
+
231
+ Rejected Alternatives Log is element-level. Future Extensibility below is design-level.
232
+
191
233
  ### Contract Definitions
192
234
 
193
235
  ```
@@ -347,9 +389,11 @@ Mark items as N/A with brief rationale when the feature has no relevant trust bo
347
389
 
348
390
  ## Future Extensibility
349
391
 
350
- - **Extension points**: [Interfaces, hooks, or plugin mechanisms designed for future use]
351
- - **Known future requirements**: [Planned features that influenced current design decisions]
352
- - **Intentional limitations**: [What was deliberately kept simple and why]
392
+ This section records what was excluded from the current design surface. Speculative inclusions belong in a separate proposal.
393
+
394
+ - **Deferred possibilities**: [Capabilities considered during design and explicitly excluded from the current design surface. Each entry names either the current requirement it would have served, or marks itself as speculative]
395
+ - **Intentional limitations**: [What was deliberately kept small and why]
396
+ - **Extension points (existing, with current consumers)**: [Interfaces or hooks already in use by named current consumers. Each entry names a current consumer]
353
397
 
354
398
  ## Alternative Solutions
355
399
 
@@ -119,7 +119,7 @@ Use when implementation approach is Vertical Slice. Each phase represents one va
119
119
  #### Tasks
120
120
  - [ ] [P1-T1] Specific work content
121
121
  - [ ] [P1-T2] Verification for this value unit
122
- - [ ] Quality check: Implement staged quality checks (refer to ai-development-guide skill)
122
+ - [ ] Quality check: Run staged static analysis, build verification, tests, and final quality gate
123
123
 
124
124
  #### Phase Completion Criteria
125
125
  - [ ] Early verification point passed
@@ -151,7 +151,7 @@ Use when implementation approach is Horizontal Slice. Phases follow Foundation -
151
151
  #### Tasks
152
152
  - [ ] [P1-T1] Specific work content
153
153
  - [ ] [P1-T2] Specific work content
154
- - [ ] Quality check: Implement staged quality checks (refer to ai-development-guide skill)
154
+ - [ ] Quality check: Run staged static analysis, build verification, tests, and final quality gate
155
155
  - [ ] Unit tests: All related tests pass
156
156
 
157
157
  #### Phase Completion Criteria
@@ -201,7 +201,7 @@ This phase is required for all implementation approaches.
201
201
  - [ ] Document updates
202
202
 
203
203
  ### Quality Assurance
204
- - [ ] Implement staged quality checks (details: refer to ai-development-guide skill)
204
+ - [ ] Run staged static analysis, build verification, tests, and final quality gate
205
205
  - [ ] All tests pass
206
206
  - [ ] Static check pass
207
207
  - [ ] Lint check pass
@@ -46,7 +46,7 @@ Brief observations recorded after reading Investigation Targets:
46
46
  - **Verification method**: [What to verify and how]
47
47
  - **Success criteria**: [Observable outcome that proves correctness]
48
48
  - **Failure response**: [What to do if verification fails]
49
- - **Verification level**: [L1/L2/L3, per implementation-approach skill]
49
+ - **Verification level**: [L1 unit/local verification, L2 integration verification, or L3 end-to-end verification]
50
50
 
51
51
  ## Completion Criteria
52
52
  - [ ] All added tests pass
@@ -13,6 +13,14 @@
13
13
  |--------|------|---------|
14
14
  | Prototype code | [docs/ui-spec/assets/xxx/] | [commit SHA / tag] |
15
15
 
16
+ ## External Resources Used
17
+
18
+ | Project Resource Label | Feature Identifier | Purpose |
19
+ |------------------------|--------------------|---------|
20
+ | [frontend-design-origin] | [screen / node / frame / route / story id] | [why this feature uses it] |
21
+ | [frontend-design-system] | [component / token / variant / story id] | [why this feature uses it] |
22
+ | [frontend-visual-verification] | [route / story / viewport / scenario] | [how this feature is verified] |
23
+
16
24
  ## Prototype Management
17
25
 
18
26
  Prototype code is an **attachment** to this UI Spec. The canonical specification is always this document + the Design Doc.
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: external-resource-context
3
+ description: "Discovers, confirms, and records external resource access methods for project design and implementation work, including design sources, design systems, API schemas, database schemas, IaC sources, secret stores, environment config, and verification environments. Use when external resource context needs to be discovered or refreshed, recorded in docs/project-context/external-resources.md, or referenced from a Design Doc/UI Spec."
4
+ ---
5
+
6
+ # External Resource Context
7
+
8
+ ## Purpose
9
+
10
+ This skill helps Codex discover required external resources, record stable access methods, and reuse recorded context during design, planning, implementation, and review work.
11
+
12
+ Covered resources include design origin, design system, guidelines, visual verification environment, database schema source, migration history, secret store location, API schema source, mock environment, IaC source, and environment configuration.
13
+
14
+ ## Scope Boundaries
15
+
16
+ **In scope**: hearing protocol for unclear external resources, storage location, single-source ownership rule, and lookup protocol for known resources.
17
+
18
+ **Freshness handling**: record access methods and feature identifiers here. The consuming workflow checks current resource content at use time.
19
+
20
+ ## Storage Locations
21
+
22
+ | Tier | Location | Holds | Update Frequency |
23
+ |------|----------|-------|------------------|
24
+ | Project | `docs/project-context/external-resources.md` | Environment-stable facts: resource labels, presence, and access methods | When the project environment changes |
25
+ | Feature | `## External Resources Used` section in the relevant UI Spec or Design Doc | Feature-specific identifiers that reference project-tier labels | Per feature |
26
+
27
+ ### Single Source Rule
28
+
29
+ The project tier owns environment facts such as URLs, MCP server names, file paths, commands, and secret-store locations. Feature-tier sections list feature-specific identifiers such as design node ids, API paths, schema names, or IaC module names, then reference the project-tier label.
30
+
31
+ ## Hearing Protocol
32
+
33
+ ### When to Hear
34
+
35
+ | Condition | Action |
36
+ |-----------|--------|
37
+ | `docs/project-context/external-resources.md` is absent | Run full hearing for the relevant domain |
38
+ | File exists | Ask for one choice: keep current axes, refresh all axes, or refresh selected axes |
39
+
40
+ When the user chooses `refresh selected axes`, ask for the exact domain and axis labels before updating. Confirm the selected labels against the loaded domain reference, then hear only those axes.
41
+
42
+ ### Domain Routing
43
+
44
+ Load the domain reference matching the current task:
45
+
46
+ | Task type | References to load |
47
+ |-----------|--------------------|
48
+ | Frontend UI work | [references/frontend.md](references/frontend.md) |
49
+ | Backend or data work | [references/backend.md](references/backend.md) |
50
+ | API contract work | [references/api.md](references/api.md) |
51
+ | Infrastructure or deployment | [references/infra.md](references/infra.md) |
52
+ | Fullstack | Load each relevant domain reference |
53
+
54
+ Each domain reference defines axes and question templates. Use `N/A` for axes outside the current project.
55
+
56
+ ### Two-Phase Hearing
57
+
58
+ 1. **Structured hearing**: ask each axis from the domain reference. For each non-N/A axis, collect the access or reference method: MCP server name, URL, file path, command, repository-owned source, project convention, manual confirmation path, or existing implementation.
59
+ 2. **Self-declaration**: ask for additional external resources outside the structured axes. Append any resources the user provides under `Additional Resources`.
60
+
61
+ ## Storage Protocol
62
+
63
+ After hearing completes:
64
+
65
+ 1. Build project-tier content from the answers using [references/template.md](references/template.md).
66
+ 2. Write `docs/project-context/external-resources.md`, creating `docs/project-context/` as needed.
67
+ 3. When a target UI Spec or Design Doc exists, update its `External Resources Used` section with project-tier labels plus feature-specific identifiers.
68
+ 4. If a write fails, return the error with the intended path and leave completion status unresolved.
69
+ 5. Report touched file paths to the calling workflow.
70
+
71
+ ## Lookup Protocol
72
+
73
+ Consumers resolve external context in this order:
74
+
75
+ 1. Read `docs/project-context/external-resources.md`.
76
+ 2. Read the target UI Spec or Design Doc `External Resources Used` section for feature-specific identifiers.
77
+ 3. Use the project-tier access method to fetch or inspect the resource.
78
+
79
+ Codex custom agents inherit parent `mcp_servers` when the agent file omits `mcp_servers`. Preserve that inheritance for agents that may need project-specific MCP tools. Reserve MCP `enabled_tools` for a deliberately narrow server-level allow list.
80
+
81
+ ## Output Format
82
+
83
+ The project-tier file follows [references/template.md](references/template.md). Feature-tier sections use the fixed heading `External Resources Used`; heading level follows the parent document structure.
84
+
85
+ ## Quality Checklist
86
+
87
+ - [ ] Each relevant axis has a presence indicator and access method, or is marked `N/A`
88
+ - [ ] Self-declaration phase completed
89
+ - [ ] Project-tier file contains environment facts
90
+ - [ ] Feature-tier sections contain feature identifiers and project-tier labels
91
+ - [ ] Existing project-tier updates are confirmed before writes
92
+
93
+ ## References
94
+
95
+ - [references/frontend.md](references/frontend.md)
96
+ - [references/backend.md](references/backend.md)
97
+ - [references/api.md](references/api.md)
98
+ - [references/infra.md](references/infra.md)
99
+ - [references/template.md](references/template.md)
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "external-resource-context"
3
+ short_description: "Discover and reuse external resource context"
4
+ default_prompt: "Use $external-resource-context to identify or consult external resources for: "
5
+
6
+ policy:
7
+ allow_implicit_invocation: true
@@ -0,0 +1,20 @@
1
+ # API External Resource Axes
2
+
3
+ Use these axes when work depends on API contracts outside the repository.
4
+
5
+ | Axis | Purpose | Presence Choices | Access Method Examples |
6
+ |------|---------|------------------|------------------------|
7
+ | API Schema Source | OpenAPI, GraphQL SDL, proto, or typed contract source | Present / Repository-owned / N/A | schema repo path, docs URL, MCP |
8
+ | API Explorer | Interactive or generated contract inspection | Present / N/A | Swagger UI URL, GraphQL explorer URL |
9
+ | Mock Server | Contract-backed mock or sandbox endpoint | Present / N/A | mock URL, command, docker compose service |
10
+ | Consumer Contract Source | Downstream expectations or contract tests | Present / N/A | contract repo, pact broker URL, file path |
11
+
12
+ ## Question Template
13
+
14
+ Ask each axis in positive form:
15
+
16
+ 1. "Which API contract resources are available for this work?"
17
+ 2. "For each applicable resource, what access method or reference method should Codex use?"
18
+ 3. "Which feature-specific identifier applies, such as endpoint path, operation id, schema name, or event name?"
19
+
20
+ Record `N/A` for axes outside the project.
@@ -0,0 +1,21 @@
1
+ # Backend External Resource Axes
2
+
3
+ Use these axes when backend or data work depends on resources outside the repository.
4
+
5
+ | Axis | Purpose | Presence Choices | Access Method Examples |
6
+ |------|---------|------------------|------------------------|
7
+ | Database Schema Source | Canonical schema, ERD, or generated model source | Present / Repository-owned / N/A | schema repo path, DB docs URL, MCP |
8
+ | Migration History | Deployment-applied migration sequence | Present / Repository-owned / N/A | migration repo, migration table query command |
9
+ | Secret Store | Runtime secret names and lookup location | Present / N/A | cloud secret manager path, vault path |
10
+ | Environment Configuration | Runtime config source and environment matrix | Present / Repository-owned / N/A | config repo, deployment docs, command |
11
+ | Mock or Fixture Environment | Local or shared backend verification setup | Present / N/A | docker compose path, seeded DB command, service URL |
12
+
13
+ ## Question Template
14
+
15
+ Ask each axis in positive form:
16
+
17
+ 1. "Which backend external resources are available for this work?"
18
+ 2. "For each applicable resource, what access method or reference method should Codex use?"
19
+ 3. "Which feature-specific identifier applies, such as table name, service name, secret name, or environment name?"
20
+
21
+ Record `N/A` for axes outside the project.
@@ -0,0 +1,21 @@
1
+ # Frontend External Resource Axes
2
+
3
+ Use these axes when frontend UI work depends on resources outside the repository.
4
+
5
+ | Axis | Purpose | Presence Choices | Access Method Examples |
6
+ |------|---------|------------------|------------------------|
7
+ | Design Origin | Canonical visual or interaction source | Present / Existing implementation / N/A | Figma MCP, public URL, exported file path |
8
+ | Design System | Component catalog, tokens, variants, usage rules | Present / Existing package only / N/A | Storybook URL, package docs, MCP, local docs |
9
+ | Guidelines | Accessibility, responsive, copy, brand, i18n, or platform rules | Present / Project conventions only / N/A | URL, file path, wiki export |
10
+ | Visual Verification Environment | Rendered UI inspection path | Present / Manual confirmation / N/A | browser MCP, Playwright command, Storybook URL, dev server URL |
11
+ | Generated UI Artifacts | Generated CSS typings, route typings, message catalogs, snapshots | Present / N/A | generator command, config path |
12
+
13
+ ## Question Template
14
+
15
+ Ask each axis in positive form:
16
+
17
+ 1. "Which frontend external resources are available for this work?"
18
+ 2. "For each applicable resource, what access method or reference method should Codex use?"
19
+ 3. "Which feature-specific identifier applies, such as screen name, node id, route, story id, or component name?"
20
+
21
+ Record `N/A` for axes outside the project.
@@ -0,0 +1,21 @@
1
+ # Infrastructure External Resource Axes
2
+
3
+ Use these axes when infrastructure, deployment, or runtime environment work depends on resources outside the repository.
4
+
5
+ | Axis | Purpose | Presence Choices | Access Method Examples |
6
+ |------|---------|------------------|------------------------|
7
+ | IaC Source | Terraform, Pulumi, CDK, or deployment source | Present / Repository-owned / N/A | repo path, module registry, docs URL |
8
+ | Environment Inventory | Accounts, regions, clusters, services | Present / N/A | cloud console URL, inventory file, command |
9
+ | Deployment Pipeline | CI/CD workflow and promotion process | Present / Repository-owned / N/A | pipeline URL, workflow file path |
10
+ | Observability Source | Logs, metrics, traces, dashboards | Present / N/A | dashboard URL, MCP, CLI command |
11
+ | Runtime Access Method | How to inspect deployed state | Present / N/A | kubectl context, cloud CLI profile, bastion docs |
12
+
13
+ ## Question Template
14
+
15
+ Ask each axis in positive form:
16
+
17
+ 1. "Which infrastructure external resources are available for this work?"
18
+ 2. "For each applicable resource, what access method or reference method should Codex use?"
19
+ 3. "Which feature-specific identifier applies, such as module name, service name, environment, account, or dashboard?"
20
+
21
+ Record `N/A` for axes outside the project.
@@ -0,0 +1,72 @@
1
+ # Project External Resources Template
2
+
3
+ Use this structure for `docs/project-context/external-resources.md`.
4
+
5
+ ```markdown
6
+ # External Resources
7
+
8
+ ## Overview
9
+
10
+ This file records project-level access methods for resources outside the repository. Feature documents reference these labels and add feature-specific identifiers.
11
+
12
+ ## Frontend
13
+
14
+ | Label | Axis | Status | Access Method | Owner / Notes |
15
+ |-------|------|--------|---------------|---------------|
16
+ | frontend-design-origin | Design Origin | present / existing-implementation / N/A | MCP / URL / file path / command | [owner or notes] |
17
+ | frontend-design-system | Design System | present / existing-package / N/A | MCP / URL / file path / command | [owner or notes] |
18
+ | frontend-guidelines | Guidelines | present / project-conventions / N/A | URL / file path | [owner or notes] |
19
+ | frontend-visual-verification | Visual Verification Environment | present / manual-confirmation / N/A | MCP / URL / command | [owner or notes] |
20
+ | frontend-generated-artifacts | Generated UI Artifacts | present / N/A | command / config path | [owner or notes] |
21
+
22
+ ## Backend
23
+
24
+ | Label | Axis | Status | Access Method | Owner / Notes |
25
+ |-------|------|--------|---------------|---------------|
26
+ | backend-schema-source | Database Schema Source | present / repository-owned / N/A | URL / file path / command | [owner or notes] |
27
+ | backend-migration-history | Migration History | present / repository-owned / N/A | URL / file path / command | [owner or notes] |
28
+ | backend-secret-store | Secret Store | present / N/A | store path / docs path | [owner or notes] |
29
+ | backend-environment-config | Environment Configuration | present / repository-owned / N/A | URL / file path / command | [owner or notes] |
30
+ | backend-mock-environment | Mock or Fixture Environment | present / N/A | URL / command | [owner or notes] |
31
+
32
+ ## API
33
+
34
+ | Label | Axis | Status | Access Method | Owner / Notes |
35
+ |-------|------|--------|---------------|---------------|
36
+ | api-schema-source | API Schema Source | present / repository-owned / N/A | URL / file path / MCP | [owner or notes] |
37
+ | api-explorer | API Explorer | present / N/A | URL / MCP | [owner or notes] |
38
+ | api-mock-server | Mock Server | present / N/A | URL / command | [owner or notes] |
39
+ | api-consumer-contract | Consumer Contract Source | present / N/A | URL / file path | [owner or notes] |
40
+
41
+ ## Infrastructure
42
+
43
+ | Label | Axis | Status | Access Method | Owner / Notes |
44
+ |-------|------|--------|---------------|---------------|
45
+ | infra-iac-source | IaC Source | present / repository-owned / N/A | URL / file path | [owner or notes] |
46
+ | infra-environment-inventory | Environment Inventory | present / N/A | URL / file path / command | [owner or notes] |
47
+ | infra-deployment-pipeline | Deployment Pipeline | present / repository-owned / N/A | URL / file path | [owner or notes] |
48
+ | infra-observability-source | Observability Source | present / N/A | URL / MCP / command | [owner or notes] |
49
+ | infra-runtime-access | Runtime Access Method | present / N/A | command / docs path | [owner or notes] |
50
+
51
+ ## Additional Resources
52
+
53
+ | Label | Description | Access Method | Owner / Notes |
54
+ |-------|-------------|---------------|---------------|
55
+ | [label] | [description] | [URL / MCP / file path / command] | [owner or notes] |
56
+
57
+ ## Update History
58
+
59
+ | Date | Change | Author |
60
+ |------|--------|--------|
61
+ | YYYY-MM-DD | Initial capture | [name] |
62
+ ```
63
+
64
+ Feature-tier sections use this compact table:
65
+
66
+ ```markdown
67
+ ## External Resources Used
68
+
69
+ | Project Resource Label | Feature Identifier | Purpose |
70
+ |------------------------|--------------------|---------|
71
+ | frontend-design-origin | [screen / node / frame id] | [why this feature uses it] |
72
+ ```
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: recipe-front-adjust
3
+ description: "Adjust an implemented UI with external resource context, focused write-set confirmation, verification, and quality checks."
4
+ ---
5
+
6
+ **Context**: UI adjustment for implemented frontend features. The parent session owns the edit and verification loop; subagents handle bounded fact gathering, planning, and quality checks.
7
+
8
+ ## Required Skills [LOAD BEFORE EXECUTION]
9
+
10
+ 1. [LOAD IF NOT ACTIVE] `documentation-criteria` -- scale and planning criteria
11
+ 2. [LOAD IF NOT ACTIVE] `external-resource-context` -- external resource hearing and lookup
12
+ 3. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` -- agent coordination rules
13
+
14
+ **Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
15
+
16
+ ## Execution Pattern
17
+
18
+ **Core Identity**: "I am a guided executor. I run the UI adjustment and verification loop in the parent session."
19
+
20
+ **Execution Protocol**:
21
+ 1. Delegate bounded one-shot work to `ui-analyzer`, `work-planner`, and `quality-fixer-frontend`.
22
+ 2. Run user dialogue, write-set confirmation, edits, and verification in the parent session.
23
+ 3. Respect every `[STOP]` marker before moving to the next phase.
24
+
25
+ Adjustment request: $ARGUMENTS
26
+
27
+ ## Execution Flow
28
+
29
+ ### Step 1: External Resource Hearing
30
+
31
+ Run the frontend domain hearing protocol from `external-resource-context`.
32
+
33
+ ### Step 2: UI Fact Gathering
34
+
35
+ Spawn `ui-analyzer`:
36
+
37
+ `requirement_analysis: { affectedFiles: [files inferred from request], purpose: "UI adjustment", technicalConsiderations: [] }. requirements: [adjustment request]. target_paths: [paths named or inferred from request]. target_components: [components named in request]. ui_spec_path: [path if available]. Read docs/project-context/external-resources.md, resolve relevant UI sources through declared access methods, analyze existing UI code, and populate candidateWriteSet[].`
38
+
39
+ ### Step 3: Confirm Write Set and Scale
40
+
41
+ 1. Present `candidateWriteSet[]` to the user.
42
+ 2. Ask the user to confirm high-confidence entries, confirm all entries, or provide an edited file list.
43
+ 3. Apply documentation-criteria Creation Decision Matrix to the confirmed write set:
44
+ - `0 files`: ask the user for the component or path that owns the change, then pause this recipe.
45
+ - `1-2 files`: proceed with direct adjustment.
46
+ - `3-5 files`: create a focused work plan.
47
+ - `6+ files` or ADR conditions: route to the frontend design flow.
48
+
49
+ ### Step 4: Plan Creation When Needed
50
+
51
+ For `3-5 files`, spawn `work-planner`:
52
+
53
+ `Create a focused UI adjustment plan. Adjustment request: [verbatim]. ui_analysis: [ui-analyzer JSON]. External resources: docs/project-context/external-resources.md. Confirmed write set: [files]. Each phase should be implementable as 1-3 commits. Include visual verification, accessibility, i18n parity, and generated artifact checks when relevant. Output path: docs/plans/[YYYYMMDD]-adjust-[short-description].md.`
54
+
55
+ **[STOP]** Present the plan and wait for approval.
56
+
57
+ For `1-2 files`, present a concise adjustment context:
58
+ - request
59
+ - confirmed write set
60
+ - relevant `focusAreas[]`
61
+ - relevant external resource summaries and access methods
62
+
63
+ **[STOP]** Wait for user confirmation that the context covers the work.
64
+
65
+ ### Step 5: Adjustment and Verification
66
+
67
+ For each adjustment unit:
68
+ 1. Plan the edit from `focusAreas[]`, confirmed write set, and relevant external resource summaries.
69
+ 2. Apply the edit in the parent session.
70
+ 3. Verify against declared access methods:
71
+ - design origin: compare implementation target to the recorded design source
72
+ - visual verification: use the recorded browser, test runner, Storybook, dev server, or manual confirmation path
73
+ - design system: confirm tokens, variants, and usage rules through the recorded source
74
+ 4. Refine until the implemented UI matches the design source or the user-confirmed adjustment target.
75
+
76
+ ### Step 6: Quality Verification
77
+
78
+ Spawn `quality-fixer-frontend` for each unit:
79
+
80
+ - Direct adjustment: pass `filesModified: [edited files]`
81
+ - Planned adjustment: pass `task_file: [work plan path]` and `filesModified: [edited files]`
82
+
83
+ Route `quality-fixer-frontend` results:
84
+ - `approved`: proceed to commit
85
+ - `stub_detected`: complete the implementation gap and rerun quality verification
86
+ - `blocked`: surface missing prerequisites or unclear specification points to the user
87
+
88
+ ### Step 7: Commit
89
+
90
+ Commit each approved adjustment unit with affected files and relevant generated artifacts.
91
+
92
+ ## Completion Criteria
93
+
94
+ - [ ] External resource hearing completed or update explicitly skipped
95
+ - [ ] `ui-analyzer` returned JSON with external resource status and `candidateWriteSet`
96
+ - [ ] User confirmed write set before scale judgment
97
+ - [ ] Scale judgment completed with matching branch
98
+ - [ ] Direct context or work plan approved
99
+ - [ ] Adjustment units edited and verified through declared resource paths
100
+ - [ ] Each unit passed `quality-fixer-frontend`
101
+ - [ ] Each approved unit committed
102
+
103
+ ## Output Example
104
+
105
+ ```
106
+ Frontend adjustment completed.
107
+ - External resources: docs/project-context/external-resources.md (updated|unchanged)
108
+ - UI analysis: [N] components, [M] focus areas
109
+ - Scale: 1-2 files | 3-5 files
110
+ - Work plan: path | N/A
111
+ - Adjustment units committed: [count]
112
+ - Quality status: approved
113
+ ```
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "recipe-front-adjust"
3
+ short_description: "Implemented UI adjustment flow"
4
+ default_prompt: "Use $recipe-front-adjust to adjust an implemented UI: "
5
+
6
+ policy:
7
+ allow_implicit_invocation: false
@@ -10,6 +10,7 @@ description: "Execute from requirement analysis to frontend design document crea
10
10
  1. [LOAD IF NOT ACTIVE] `documentation-criteria` -- document quality standards
11
11
  2. [LOAD IF NOT ACTIVE] `implementation-approach` -- implementation methodology
12
12
  3. [LOAD IF NOT ACTIVE] `subagents-orchestration-guide` -- agent coordination and workflow flows
13
+ 4. [LOAD IF NOT ACTIVE] `external-resource-context` -- external resource hearing and lookup
13
14
 
14
15
  **Spawn rule**: every `spawn_agent` call MUST pass `fork_turns="none"` or `fork_context=false` for context isolation.
15
16
 
@@ -19,7 +20,7 @@ description: "Execute from requirement analysis to frontend design document crea
19
20
 
20
21
  **Execution Method**:
21
22
  - Requirement analysis -> performed by requirement-analyzer
22
- - Codebase analysis -> performed by codebase-analyzer
23
+ - Codebase analysis -> performed by codebase-analyzer and ui-analyzer
23
24
  - UI Specification creation -> performed by ui-spec-designer
24
25
  - Design document creation -> performed by technical-designer-frontend
25
26
  - Design verification -> performed by code-verifier
@@ -31,6 +32,8 @@ Orchestrator spawns agents and passes structured data between them.
31
32
 
32
33
  **Included in this skill**:
33
34
  - Requirement analysis with requirement-analyzer
35
+ - External resource hearing with external-resource-context
36
+ - UI fact gathering with ui-analyzer alongside codebase-analyzer
34
37
  - UI Specification creation with ui-spec-designer (prototype code inquiry included)
35
38
  - ADR creation (if architecture changes, new technology, or data flow changes)
36
39
  - Design Doc creation with technical-designer-frontend
@@ -54,26 +57,41 @@ Once requirements are moderately clarified:
54
57
  **[STOP -- BLOCKING]** Review requirement analysis results and address question items.
55
58
  **CANNOT proceed until user explicitly confirms the requirement analysis.**
56
59
 
57
- ### Step 2: UI Specification Phase
58
- After requirement analysis approval, ask the user about prototype code:
60
+ ### Step 2: External Resource Hearing
61
+ After requirement analysis approval, run the frontend domain hearing protocol from `external-resource-context`.
62
+
63
+ 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
+
65
+ **[STOP -- BLOCKING]** Complete external resource hearing before UI fact gathering.
66
+ Proceed to UI fact gathering after project-level external resources are written or the update is explicitly skipped.
67
+
68
+ ### Step 3: Prototype Inquiry
69
+ After external resource hearing completes, ask the user about prototype code:
59
70
 
60
71
  **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."
61
72
 
62
73
  **[STOP -- BLOCKING]** Wait for user response about prototype code availability.
63
74
  **CANNOT proceed until user responds.**
64
75
 
65
- Then create the UI Specification:
66
- - Spawn ui-spec-designer agent: "Create UI Spec [from PRD at [path] if PRD exists]. [Prototype code is at [user-provided path]. Place prototype in docs/ui-spec/assets/{feature-name}/ | No prototype code available.]"
76
+ ### Step 4: UI Fact Gathering Phase
77
+ After prototype inquiry completes, use the prototype path as an input when one was provided.
78
+
79
+ Spawn codebase-analyzer and ui-analyzer in parallel:
80
+ - 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: [JSON from requirement-analyzer]. requirements: [original user requirements]. layer: frontend. target_paths: [frontend affected files and directories from requirement-analyzer]. focus_areas: component hierarchy, state management, UI interactions, data fetching."
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."
82
+
83
+ ### Step 5: UI Specification Phase
84
+ 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."
67
86
  - Spawn document-reviewer agent: "doc_type: UISpec target: [ui-spec path] Review for consistency and completeness"
68
87
 
69
88
  **[STOP -- BLOCKING]** Present UI Spec for user approval.
70
89
  **CANNOT proceed until user explicitly approves the UI Spec.**
71
90
 
72
- ### Step 3: Design Document Creation Phase
91
+ ### Step 6: Design Document Creation Phase
73
92
  Create appropriate design documents according to scale determination:
74
93
  - For ADR: Spawn technical-designer-frontend agent: "Create ADR for [technical decision]"
75
- - For Design Doc: Spawn codebase-analyzer agent first: "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: [JSON from requirement-analyzer]. requirements: [original user requirements]. layer: frontend. target_paths: [frontend affected files and directories from requirement-analyzer]. focus_areas: component hierarchy, state management, UI interactions, data fetching."
76
- - For Design Doc: Spawn technical-designer-frontend agent: "Create Design Doc based on requirements. Codebase Analysis: [JSON from codebase-analyzer]. UI Spec is at [ui-spec path]. Inherit component structure and state design from UI Spec."
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."
77
95
  - Spawn code-verifier agent: "Verify Design Doc against code. doc_type: design-doc. document_path: [document path]. verbose: false."
78
96
  - Spawn document-reviewer agent: "Review the Design Doc for consistency and completeness. doc_type: DesignDoc. target: [document path]. mode: composite. code_verification: [JSON from code-verifier]"
79
97
 
@@ -85,8 +103,9 @@ ENFORCEMENT: Every stop point MUST be respected. Skipping user approval invalida
85
103
  ## Completion Criteria
86
104
 
87
105
  - [ ] Requirement analysis completed and approved
106
+ - [ ] External resource hearing completed
107
+ - [ ] Codebase analysis and UI analysis completed before document creation
88
108
  - [ ] UI Specification created and approved
89
- - [ ] Codebase analysis completed before frontend Design Doc creation
90
109
  - [ ] Design document created and approved
91
110
  - [ ] All document reviews passed
92
111