Skip to content

Commit 167607a

Browse files
committed
commands
1 parent 56a3ffd commit 167607a

7 files changed

Lines changed: 70 additions & 11 deletions

File tree

docs/templates/ADR-Template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@ Rules:
1616

1717
---
1818

19+
## Implementation plan (step-by-step)
20+
21+
> TEMPLATE ONLY — replace these checkboxes with real implementation steps for this ADR and keep them updated while implementing.
22+
23+
- [ ] Analyze current state (facts)
24+
- [ ] Plan the change (steps, files/modules, tests, docs)
25+
- [ ] Implement the change (smallest safe increments)
26+
- [ ] Add/update automated tests (happy + negative + edge; protect invariants)
27+
- [ ] Run verification commands (build/test/format/analyze/coverage) and record results
28+
- [ ] Update docs (ADR/Features/Architecture overview) and close the checklist
29+
30+
---
31+
1932
## Context
2033

2134
- Current situation (what exists today).
@@ -52,6 +65,8 @@ Key points:
5265

5366
This section is mandatory.
5467

68+
> TEMPLATE ONLY — Mermaid often breaks with fancy syntax. Keep it simple and make sure it renders in the repo.
69+
5570
```mermaid
5671
```
5772

docs/templates/AGENTS.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,26 @@ If no new rule is detected → do not update the file.
7979
- confirm the Mermaid module/boundary diagram exists (if missing → create/update it first)
8080
- identify the impacted boundary/module(s) and entry points
8181
- follow the links to the relevant ADR(s) and Feature doc(s) (do not read everything)
82-
- Read assignment, then inspect only the relevant docs/code before planning
83-
- Write multi-step plan before implementation
82+
- Scope first (prevent context overload):
83+
- use `docs/Architecture/Overview.md` → “Scoping (read first)”
84+
- write **in scope / out of scope** (what will change and what must not change)
85+
- if you cannot identify scope from the architecture map → stop and fix the map (or ask one clarifying question)
86+
- Analyze first (no coding yet):
87+
- what exists today (facts only)
88+
- what must change / must not change
89+
- unknowns and risks (what must be clarified)
90+
- Create a written plan before implementation:
91+
- for architecture/decision work: keep the plan as `## Implementation plan (step-by-step)` in the ADR
92+
- for behaviour work: keep the plan as `## Implementation plan (step-by-step)` in the Feature doc
93+
- update the plan while executing (tick items / update statuses as work is completed)
8494
- Implement code and tests together
8595
- If `build` is separate from `test`, run `build` before `test`
86-
- Run tests in layers: new → related suite → broader regressions
96+
- Verification timing (optimize time + tokens):
97+
- do not run `test`/`coverage` “just because” before you wrote/changed code or tests (exception: reproducing a bug / confirming baseline)
98+
- while iterating, run the smallest meaningful scope (new/changed tests first)
99+
- run broader suites only when you have something real to verify (avoid re-running the same command without changes)
100+
- run coverage once per change (it is heavier than tests)
101+
- Run tests in layers: new/changed → related suite → broader regressions
87102
- After tests pass: run format
88103
- After format: run build (final check)
89104
- Summarize changes and test results before marking complete
@@ -103,6 +118,10 @@ If no new rule is detected → do not update the file.
103118
- `docs/Architecture/Overview.md`: at least one Mermaid module/boundary map
104119
- `docs/Features/*`: at least one Mermaid diagram for the main flow
105120
- `docs/ADR/*`: at least one Mermaid diagram for the decision
121+
- Mermaid hygiene (Mermaid often breaks if you freestyle it):
122+
- diagrams must render in repo Markdown preview (broken Mermaid is treated as broken documentation)
123+
- prefer simple Mermaid syntax (`flowchart` / `sequenceDiagram`) and short ASCII-only IDs
124+
- if a diagram doesn’t render, simplify it until it does (no “close enough”)
106125

107126
### Testing (ALL TASKS)
108127

@@ -116,6 +135,7 @@ If no new rule is detected → do not update the file.
116135
- Never delete or weaken a test to make it pass
117136
- Each test verifies a real flow or scenario, not just calls a function — tests without meaningful assertions are forbidden
118137
- Check code coverage to see which functionality is actually tested; coverage is for finding gaps, not a number to chase
138+
- Flaky tests are failures: fix the test or the underlying behaviour, don’t “retry until green”
119139

120140
### Autonomy
121141

docs/templates/Architecture-Template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ Goal: in ~5 minutes, understand **what exists**, **where it lives**, and **how m
1111
- **Entry points:**
1212
- **Dependencies:**
1313

14+
## Scoping (read first)
15+
16+
- **In scope:**
17+
- **Out of scope:**
18+
- Pick impacted module(s) from the diagram + modules table.
19+
- Pick entry point(s): API / UI / CLI / job / event.
20+
- Read only: linked ADR/Feature doc(s) → entry-point file(s) → minimum dependencies.
21+
- Stop if scope can’t be mapped to this doc → update this doc (or ask 1 clarifying question).
22+
1423
## 2) Module map (Mermaid)
1524

1625
> TEMPLATE ONLY — model modules + boundaries (not every class/file). Add dependencies only if they exist. Remove this note in the real doc.

docs/templates/Feature-Template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@ ADRs: `docs/ADR/...`
99

1010
---
1111

12+
## Implementation plan (step-by-step)
13+
14+
> TEMPLATE ONLY — replace these checkboxes with real implementation steps for this feature and keep them updated while implementing.
15+
16+
- [ ] Analyze current behaviour (facts)
17+
- [ ] Finalize spec (rules/flows/diagram/verification)
18+
- [ ] Implement the feature (smallest safe increments)
19+
- [ ] Add/update automated tests for each scenario (happy + negative + edge)
20+
- [ ] Run verification commands (build/test/format/analyze/coverage) and record results
21+
- [ ] Update docs (Feature/ADRs/Architecture overview) and close the checklist
22+
23+
---
24+
1225
## Purpose
1326

1427
Short description of the business problem and value.
@@ -79,6 +92,8 @@ Short description of the business problem and value.
7992

8093
## Diagrams
8194

95+
> TEMPLATE ONLY — Mermaid often breaks with fancy syntax. Keep it simple and make sure it renders in the repo.
96+
8297
```mermaid
8398
```
8499

skills/mcaf-adr-writing/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Before writing, make the ADR executable (no placeholders, no hand-waving):
2727
1. Confirm the decision scope:
2828
- what changes (and what does not)
2929
- what module(s) are affected
30+
- follow `AGENTS.md` scoping rules: Architecture map → linked ADR/Feature → entry points (do not scan everything)
3031
2. Start from `docs/templates/ADR-Template.md`.
3132
- Remove every `TEMPLATE ONLY` note and replace placeholder text before treating it as a real ADR.
3233
3. Write the ADR as a decision record:
@@ -36,6 +37,7 @@ Before writing, make the ADR executable (no placeholders, no hand-waving):
3637
- **Alternatives**: 1–3 realistic options with pros/cons
3738
- **Consequences**: trade-offs, risks, mitigations
3839
4. Make it executable for the team:
40+
- follow `AGENTS.md` Task Delivery rules (analysis → plan → execute → verify)
3941
- include the invariants that must be proven by tests
4042
- include verification commands copied from `AGENTS.md`
4143
- include rollout/rollback and “how we know it’s safe”

skills/mcaf-feature-spec/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Write a spec that can be implemented and verified **without guessing**:
2727
1. Start from `docs/Architecture/Overview.md` to pick the affected module(s).
2828
2. Create/update the feature doc using `docs/templates/Feature-Template.md`.
2929
- Remove every `TEMPLATE ONLY` note and replace placeholder text before treating it as a real spec.
30+
- follow `AGENTS.md` scoping rules (do not scan the whole repo; use the architecture map to stay focused)
3031
3. Define behaviour precisely:
3132
- purpose and scope (in/out)
3233
- business rules (numbered, testable)

skills/mcaf-testing/SKILL.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ compatibility: Requires the repository’s build/test tooling; uses commands fro
2222
- `docs/Features/*` for user/system flows and business rules
2323
- `docs/ADR/*` for architectural decisions and invariants that must remain true
2424
- if the docs are missing/contradict, fix the docs first (or write a minimal spec + test plan in the task/PR)
25-
3. Build first (always):
26-
- run the `build` command from `AGENTS.md`
27-
- fix build breaks before writing tests
25+
- follow `AGENTS.md` scoping rules (Architecture map → relevant docs → relevant module code; avoid repo-wide scanning)
26+
3. Follow `AGENTS.md` verification timing (optimize time + tokens):
27+
- run tests/coverage only when you have a reason (changed code/tests, bug reproduction, baseline confirmation)
28+
- start with the smallest scope (new/changed tests), then expand to required suites
2829
4. Define the scenarios you must prove (map them back to docs):
2930
- **positive** (happy path)
3031
- **negative** (validation/forbidden/unauthorized/error paths)
@@ -62,8 +63,4 @@ compatibility: Requires the repository’s build/test tooling; uses commands fro
6263

6364
## Guardrails
6465

65-
- Never delete or weaken a test to make it pass.
66-
- No mocks for internal systems in integration tests (DB/queues/caches should be real test instances/containers).
67-
- Tests must be meaningful: a test without assertions is not a test.
68-
- Coverage is for finding gaps, not a number to chase.
69-
- Flaky tests are failures: fix the test or the underlying behaviour, don’t “retry until green”.
66+
- All test discipline and prohibitions come from `AGENTS.md`. Do not contradict it in this skill.

0 commit comments

Comments
 (0)