Skip to content

Commit a782ab6

Browse files
authored
docs: enforce architecture guide standards in planning skills (#65)
1 parent ef485d6 commit a782ab6

5 files changed

Lines changed: 437 additions & 34 deletions

File tree

.agents/skills/adhoc-plan/SKILL.md

Lines changed: 56 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Execute this workflow when the user asks to turn recommended items into a concre
1212

1313
- Repository root: `/Users/davidahmann/Projects/wrkr`
1414
- Recommendation source: user-provided recommended items for this run
15+
- Standards sources of truth:
16+
- `/Users/davidahmann/Projects/wrkr/product/dev_guides.md`
17+
- `/Users/davidahmann/Projects/wrkr/product/architecture_guides.md`
1518
- No dependency on `/Users/davidahmann/Projects/wrkr/product/ideas.md`
1619
- Planning-only skill. Do not implement code in this workflow.
1720

@@ -25,28 +28,45 @@ Validation rules:
2528
- `output_plan_path` must resolve inside the repository and be writable.
2629
- If either input is missing or invalid, stop and output a blocker report.
2730

31+
## Preconditions
32+
33+
- `/Users/davidahmann/Projects/wrkr/product/dev_guides.md` must exist and be readable.
34+
- `/Users/davidahmann/Projects/wrkr/product/architecture_guides.md` must exist and be readable.
35+
- Both guides must contain enforceable rules for:
36+
- testing and CI gating
37+
- determinism and contract stability
38+
- architecture/TDD/chaos/frugal governance requirements
39+
- If guides are missing or incomplete, stop and output a blocker report.
40+
2841
## Workflow
2942

30-
1. Parse `recommended_items` and normalize each item to:
43+
1. Read `product/dev_guides.md` and `product/architecture_guides.md`; extract locked implementation and architecture constraints.
44+
2. Parse `recommended_items` and normalize each item to:
3145
- recommendation
3246
- why
3347
- strategic direction
3448
- expected moat/benefit
35-
2. Remove duplicates and out-of-scope items.
36-
3. Cluster recommendations into coherent epics.
37-
4. Prioritize with `P0/P1/P2` using contract risk, moat gain, adoption leverage, and dependency order.
38-
5. Create execution-ready stories with:
49+
3. Remove duplicates and out-of-scope items.
50+
4. Cluster recommendations into coherent epics.
51+
5. Prioritize with `P0/P1/P2` using contract risk, moat gain, adoption leverage, and dependency order.
52+
6. Create execution-ready stories with:
3953
- tasks
4054
- repo paths
4155
- run commands
4256
- test requirements
4357
- matrix wiring
4458
- acceptance criteria
45-
6. Add plan-level `Test Matrix Wiring`.
46-
7. Add `Recommendation Traceability` mapping recommendations to epic/story IDs.
47-
8. Add `Minimum-Now Sequence`, `Exit Criteria`, and `Definition of Done`.
48-
9. Verify quality gates.
49-
10. Overwrite `output_plan_path` with the final plan.
59+
7. For every story, enforce architecture fields:
60+
- architecture constraints
61+
- ADR required (`yes/no`)
62+
- TDD first failing test(s)
63+
- cost/perf impact (`low|medium|high`)
64+
- chaos/failure hypothesis (required for risk-bearing stories)
65+
8. Add plan-level `Test Matrix Wiring`.
66+
9. Add `Recommendation Traceability` mapping recommendations to epic/story IDs.
67+
10. Add `Minimum-Now Sequence`, `Exit Criteria`, and `Definition of Done`.
68+
11. Verify quality gates.
69+
12. Overwrite `output_plan_path` with the final plan.
5070

5171
## Command Contract (JSON Required)
5272

@@ -66,10 +86,28 @@ Use `wrkr` commands with `--json` whenever the plan needs machine-readable evide
6686
- Respect architecture boundaries:
6787
- Go core authoritative for enforcement/verification
6888
- Python remains thin adoption layer
89+
- Enforce both standards guides in every generated plan:
90+
- `product/dev_guides.md`
91+
- `product/architecture_guides.md`
6992
- No dashboard-first scope in core backlog.
7093
- No minor polish as primary backlog.
7194
- Every story must include tests and matrix wiring.
7295

96+
## Architecture Guides Enforcement Contract
97+
98+
For stories touching architecture/risk/adapter/failure semantics, plan wiring must include:
99+
100+
- `make prepush-full`
101+
102+
For reliability/fault-tolerance stories, plan wiring must include:
103+
104+
- `make test-hardening`
105+
- `make test-chaos`
106+
107+
For performance-sensitive stories, plan wiring must include:
108+
109+
- `make test-perf`
110+
73111
## Test Requirements by Work Type (Mandatory)
74112

75113
1. Schema/artifact changes:
@@ -151,6 +189,11 @@ Story template:
151189
- `Test requirements:`
152190
- `Matrix wiring:`
153191
- `Acceptance criteria:`
192+
- `Architecture constraints:`
193+
- `ADR required: yes|no`
194+
- `TDD first failing test(s):`
195+
- `Cost/perf impact: low|medium|high`
196+
- `Chaos/failure hypothesis:` (required for risk-bearing stories)
154197
- Optional: `Dependencies:`, `Risks:`
155198

156199
## Quality Gate
@@ -163,6 +206,9 @@ Before finalizing:
163206
- Paths are real and repo-relevant.
164207
- Test requirements match story type.
165208
- Matrix wiring exists for every story.
209+
- Every story maps to enforceable rules from both guides (`dev_guides.md`, `architecture_guides.md`).
210+
- High-risk stories include hardening/chaos lane wiring.
211+
- CLI contract stories include explicit `--json` and exit-code invariants.
166212
- Sequence is dependency-aware and implementation-ready.
167213

168214
## Failure Mode

.agents/skills/backlog-plan/SKILL.md

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Execute this workflow when asked to convert strategic feature recommendations in
1212

1313
- Repository root: `/Users/davidahmann/Projects/wrkr`
1414
- Input file: `/Users/davidahmann/Projects/wrkr/product/ideas.md`
15+
- Standards sources of truth:
16+
- `/Users/davidahmann/Projects/wrkr/product/dev_guides.md`
17+
- `/Users/davidahmann/Projects/wrkr/product/architecture_guides.md`
1518
- Structure references (match level of detail and style):
1619
- `/Users/davidahmann/Projects/gait/product/PLAN_v1.md`
1720
- Output file: `/Users/davidahmann/Projects/wrkr/product/PLAN_NEXT.md` (unless user specifies a different target)
@@ -29,31 +32,57 @@ Execute this workflow when asked to convert strategic feature recommendations in
2932

3033
If these are missing, stop and output a gap note instead of inventing details.
3134

35+
- `product/dev_guides.md` and `product/architecture_guides.md` must exist and be readable.
36+
- Both guides must provide enforceable planning constraints for:
37+
- testing/CI gates
38+
- determinism/contracts
39+
- architecture/TDD/chaos/frugal standards
40+
- If either guide is missing or incomplete, stop with a blocker report.
41+
3242
## Workflow
3343

3444
1. Read `ideas.md` and extract candidate initiatives.
35-
2. Read reference plans to mirror structure and detail level.
36-
3. Cluster ideas into coherent epics (avoid one-idea-per-epic fragmentation).
37-
4. Prioritize using `P0/P1/P2` based on contract risk reduction, moat expansion, adoption leverage, and sequencing dependency.
38-
5. Produce execution-ready epics and stories.
39-
6. For every story, include concrete tasks, repo paths, run commands, acceptance criteria, test requirements, and CI matrix wiring.
40-
7. Build a plan-level test matrix section mapping stories to CI lanes (fast, integration, acceptance, cross-platform).
41-
8. Ensure each story defines tests based on work type (schema, CLI, gate/policy, determinism, runtime, SDK, docs/examples).
42-
9. Add explicit boundaries and non-goals to prevent scope drift.
43-
10. Add delivery sequencing section (phase/week-based minimum-now path).
44-
11. Add definition of done and release/exit gate criteria.
45-
12. Write full plan to target file, overwriting prior contents.
45+
2. Read `product/dev_guides.md` and `product/architecture_guides.md` and lock constraints into planning decisions.
46+
3. Read reference plans to mirror structure and detail level.
47+
4. Cluster ideas into coherent epics (avoid one-idea-per-epic fragmentation).
48+
5. Prioritize using `P0/P1/P2` based on contract risk reduction, moat expansion, adoption leverage, and sequencing dependency.
49+
6. Produce execution-ready epics and stories.
50+
7. For every story, include concrete tasks, repo paths, run commands, acceptance criteria, test requirements, CI matrix wiring, and architecture governance fields.
51+
8. Build a plan-level test matrix section mapping stories to CI lanes (fast, integration, acceptance, cross-platform).
52+
9. Ensure each story defines tests based on work type (schema, CLI, gate/policy, determinism, runtime, SDK, docs/examples).
53+
10. Add explicit boundaries and non-goals to prevent scope drift.
54+
11. Add delivery sequencing section (phase/week-based minimum-now path).
55+
12. Add definition of done and release/exit gate criteria.
56+
13. Write full plan to target file, overwriting prior contents.
4657

4758
## Non-Negotiables
4859

4960
- Preserve Wrkr core contracts: determinism, offline-first defaults, fail-closed policy posture, schema stability, and exit code stability.
5061
- Respect architecture boundaries: Go core is authoritative for enforcement/verification logic; Python remains thin adoption layer.
62+
- Enforce both planning standards guides in all generated stories:
63+
- `product/dev_guides.md`
64+
- `product/architecture_guides.md`
5165
- Avoid dashboard-first or hosted-only dependencies in backlog core.
5266
- Do not include implementation code, pseudo-code, or ticket boilerplate.
5367
- Do not recommend minor polish work as primary backlog items.
5468
- Every story must include test requirements and explicit matrix wiring.
5569
- No story is complete without same-change test updates, except explicitly justified docs-only stories.
5670

71+
## Architecture Guides Enforcement Contract
72+
73+
For architecture/risk/adapter/failure stories, require wiring for:
74+
75+
- `make prepush-full`
76+
77+
For reliability/fault-tolerance stories, require wiring for:
78+
79+
- `make test-hardening`
80+
- `make test-chaos`
81+
82+
For performance-sensitive stories, require wiring for:
83+
84+
- `make test-perf`
85+
5786
## Test Requirements by Work Type (Mandatory)
5887

5988
1. Schema or artifact contract work:
@@ -131,6 +160,11 @@ Story template (required fields):
131160
- `Test requirements:`
132161
- `Matrix wiring:`
133162
- `Acceptance criteria:`
163+
- `Architecture constraints:`
164+
- `ADR required: yes|no`
165+
- `TDD first failing test(s):`
166+
- `Cost/perf impact: low|medium|high`
167+
- `Chaos/failure hypothesis:` (required for risk-bearing stories)
134168
- Optional when needed:
135169
- `Dependencies:`
136170
- `Risks:`
@@ -146,6 +180,9 @@ Before finalizing, verify:
146180
- Paths are real and repo-relevant.
147181
- Test requirements match story work type.
148182
- Matrix wiring is present for every story.
183+
- Every story maps to enforceable rules from both guides (`dev_guides.md`, `architecture_guides.md`).
184+
- High-risk stories include hardening/chaos lane wiring.
185+
- CLI contract stories include explicit `--json` and exit-code invariants.
149186
- Sequence is dependency-aware.
150187
- Plan stays strategic and execution-relevant (not cosmetic).
151188

.agents/skills/initial-plan/SKILL.md

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: initial-plan
3-
description: Transform the Wrkr PRD in product/wrkr.md into a world-class, zero-ambiguity execution plan that mirrors the detail level of gait/product/PLAN_v1.md, while enforcing product/dev_guides.md coding, testing, CI, determinism, and contract standards. Use when the user asks for an initial build plan from the PRD (not from ideas/recommendations).
3+
description: Transform the Wrkr PRD in product/wrkr.md into a world-class, zero-ambiguity execution plan that mirrors the detail level of gait/product/PLAN_v1.md, while enforcing product/dev_guides.md and product/architecture_guides.md standards for coding, testing, CI, determinism, architecture governance, and contracts. Use when the user asks for an initial build plan from the PRD (not from ideas/recommendations).
44
---
55

66
# PRD to Initial Execution Plan (Wrkr)
@@ -11,7 +11,9 @@ Execute this workflow when asked to create the initial execution plan from the W
1111

1212
- Repository root: `/Users/davidahmann/Projects/wrkr`
1313
- Primary source of truth: `/Users/davidahmann/Projects/wrkr/product/wrkr.md`
14-
- Standards source of truth: `/Users/davidahmann/Projects/wrkr/product/dev_guides.md`
14+
- Standards sources of truth:
15+
- `/Users/davidahmann/Projects/wrkr/product/dev_guides.md`
16+
- `/Users/davidahmann/Projects/wrkr/product/architecture_guides.md`
1517
- Style reference (structure and depth): `/Users/davidahmann/Projects/wrkr/product/PLAN_v1.md`
1618
- Default output: `/Users/davidahmann/Projects/wrkr/product/PLAN_v1.0.md` (unless user specifies a different target path)
1719
- Planning only. Do not implement code or docs outside the target plan file.
@@ -26,7 +28,7 @@ Execute this workflow when asked to create the initial execution plan from the W
2628
- architecture and tech choices
2729
- CLI surfaces and expected behavior
2830

29-
`dev_guides.md` must define enforceable engineering standards. At minimum:
31+
`product/dev_guides.md` and `product/architecture_guides.md` must define enforceable engineering standards. At minimum:
3032
- toolchain versions
3133
- lint/format requirements
3234
- testing tiers and commands
@@ -52,34 +54,41 @@ If these are missing, stop and output a gap note instead of inventing policy.
5254
- coverage gates, determinism, schema and exit code stability
5355
- security scanning and release integrity expectations
5456

55-
3. Read `gait/product/PLAN_v1.md` to mirror structure depth and story-level specificity.
57+
3. Read `product/architecture_guides.md` and extract locked architecture execution standards:
58+
- TDD requirements and first-failing-test expectations
59+
- architecture constraints and ADR requirements
60+
- cloud-native execution factors beyond 12-factor expectations
61+
- frugal architecture/cost impact requirements
62+
- chaos/hardening/perf lane triggers and failure-hypothesis expectations
5663

57-
4. Inspect current repository baseline and convert observed reality into a `Current Baseline (Observed)` section:
64+
4. Read `gait/product/PLAN_v1.md` to mirror structure depth and story-level specificity.
65+
66+
5. Inspect current repository baseline and convert observed reality into a `Current Baseline (Observed)` section:
5867
- existing directories and key files
5968
- current CI/workflow state
6069
- current command surfaces and gaps versus PRD
6170

62-
5. Build epics by implementation dependency, not by document order:
71+
6. Build epics by implementation dependency, not by document order:
6372
- Epic 0 foundations/scaffold/contracts
6473
- core runtime epics (source, detection, aggregation, identity, risk, proof, compliance)
6574
- CLI, regressions, and remediation flows
6675
- docs/acceptance/release hardening epics
6776

68-
6. Decompose every epic into execution-ready stories with explicit tasks and test wiring.
77+
7. Decompose every epic into execution-ready stories with explicit tasks and test wiring.
6978

70-
7. Add a plan-level `Test Matrix Wiring` section that maps stories to:
79+
8. Add a plan-level `Test Matrix Wiring` section that maps stories to:
7180
- Fast lane
7281
- Core CI lane
7382
- Acceptance lane
7483
- Cross-platform lane
7584
- Risk lane
7685
- Gating rule
7786

78-
8. Add a dependency-aware `Minimum-Now Sequence` with phased/week execution order.
87+
9. Add a dependency-aware `Minimum-Now Sequence` with phased/week execution order.
7988

80-
9. Add `Explicit Non-Goals` and `Definition of Done`.
89+
10. Add `Explicit Non-Goals` and `Definition of Done`.
8190

82-
10. Write the plan to the target file, replacing prior contents.
91+
11. Write the plan to the target file, replacing prior contents.
8392

8493
## Non-Negotiables
8594

@@ -115,6 +124,11 @@ Story template (required fields):
115124
- `Test requirements:`
116125
- `Matrix wiring:`
117126
- `Acceptance criteria:`
127+
- `Architecture constraints:`
128+
- `ADR required: yes|no`
129+
- `TDD first failing test(s):`
130+
- `Cost/perf impact: low|medium|high`
131+
- `Chaos/failure hypothesis:` (required for risk-bearing stories)
118132
- `Semantic invariants:` (required for stories touching identity/lifecycle/manifest/regress)
119133
- Optional when needed:
120134
- `Dependencies:`
@@ -159,6 +173,30 @@ For every story, derive required checks from `product/dev_guides.md` by work typ
159173
- Add command-smoke checks for documented flows.
160174
- Update acceptance scripts if operator workflow changed.
161175

176+
## Architecture Guides Enforcement Contract
177+
178+
For every story, enforce `product/architecture_guides.md` requirements:
179+
180+
1. TDD requirements:
181+
- Capture first failing test(s) before implementation tasks.
182+
- Require red-green-refactor intent in story acceptance criteria where behavior changes.
183+
184+
2. Architecture governance:
185+
- Specify architecture constraints for layer boundaries touched.
186+
- Mark `ADR required: yes` when changing boundary/data flow/contract/failure class.
187+
188+
3. Frugal architecture:
189+
- Include cost/perf impact classification (`low|medium|high`).
190+
- For perf-sensitive stories, include `make test-perf`.
191+
192+
4. Chaos/reliability operations:
193+
- Risk-bearing stories must include failure hypothesis and lane wiring for:
194+
- `make test-hardening`
195+
- `make test-chaos`
196+
197+
5. Contract-first behavior:
198+
- CLI/JSON/exit-code stories must state explicit invariants in acceptance criteria.
199+
162200
## Testing Tier Mapping (Mandatory)
163201

164202
When assigning `Test requirements:` and `Matrix wiring:` for each story, map to applicable dev-guides tiers explicitly:
@@ -218,15 +256,18 @@ Before finalizing, verify:
218256
- every epic traces back to specific FR/NFR/AC statements in `wrkr.md`
219257
- every story has concrete repo paths and executable commands
220258
- acceptance criteria are deterministic and objectively testable
221-
- test requirements match `dev_guides.md` tier expectations
259+
- test requirements match `dev_guides.md` and `architecture_guides.md` requirements
222260
- identity/lifecycle/manifest/regress stories include explicit semantic invariants
261+
- every story includes architecture constraints, TDD first-failing-test requirement, and cost/perf impact
262+
- high-risk stories include hardening/chaos lane wiring
263+
- CLI contract stories include explicit `--json` and exit-code invariants
223264
- matrix wiring exists for every story
224265
- sequence is dependency-aware and executable end-to-end
225266
- plan respects Wrkr boundaries (See product only; no Axym/Gait feature scope creep)
226267

227268
## Failure Mode
228269

229-
If `wrkr.md` or `dev_guides.md` lacks required planning inputs, write only:
270+
If `wrkr.md`, `dev_guides.md`, or `architecture_guides.md` lacks required planning inputs, write only:
230271

231272
- `No initial plan generated.`
232273
- `Reason:` concise blocker summary.

0 commit comments

Comments
 (0)