meto-cli 0.12.0 → 0.13.0
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/README.md +9 -1
- package/dist/cli/audit/index.d.ts.map +1 -1
- package/dist/cli/audit/index.js +103 -4
- package/dist/cli/audit/index.js.map +1 -1
- package/dist/cli/audit/rubric-check.d.ts +55 -0
- package/dist/cli/audit/rubric-check.d.ts.map +1 -0
- package/dist/cli/audit/rubric-check.js +185 -0
- package/dist/cli/audit/rubric-check.js.map +1 -0
- package/dist/cli/audit/rubric-display.d.ts +36 -0
- package/dist/cli/audit/rubric-display.d.ts.map +1 -0
- package/dist/cli/audit/rubric-display.js +64 -0
- package/dist/cli/audit/rubric-display.js.map +1 -0
- package/package.json +1 -1
- package/templates/.claude/agent-memory/meto-community/MEMORY.md +4 -0
- package/templates/.claude/agent-memory/meto-developer/MEMORY.md +5 -0
- package/templates/.claude/agent-memory/meto-pm/MEMORY.md +5 -0
- package/templates/.claude/agent-memory/meto-tester/MEMORY.md +10 -0
- package/templates/.claude/agents/developer-agent.md +32 -9
- package/templates/.claude/agents/tester-agent.md +85 -9
- package/templates/.claude/settings.json +13 -0
- package/templates/CLAUDE.md +25 -2
- package/templates/ai/contracts/README.md +89 -0
- package/templates/ai/contracts/slice-NNN-contract.md +87 -0
- package/templates/ai/handoff/README.md +74 -0
- package/templates/ai/handoff/current.md +100 -0
- package/templates/ai/rubric/README.md +42 -0
- package/templates/ai/rubric/tester-calibration-log.md +71 -0
- package/templates/ai/rubric/tester-rubric.md +140 -0
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## Session Start Checklist
|
|
8
|
+
|
|
9
|
+
- [ ] Read `ai/handoff/current.md` — understand current sprint state before doing anything else
|
|
10
|
+
- [ ] Read this MEMORY.md file
|
|
11
|
+
- [ ] Read `ai/rubric/tester-calibration-log.md` — apply the Current Calibration Rules to all evaluations this session
|
|
12
|
+
- [ ] Read `ai/tasks/tasks-in-testing.md` — identify the slice to validate
|
|
13
|
+
- [ ] Read the slice definition in full before running any checks
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
7
17
|
## Review Conduct
|
|
8
18
|
|
|
9
19
|
- **No performative acceptance** — never say "you're absolutely right" and immediately implement without evaluating.
|
|
@@ -7,12 +7,17 @@ tools: Read, Write, Edit, Bash, Glob, Grep
|
|
|
7
7
|
# Developer Agent
|
|
8
8
|
|
|
9
9
|
## Session Start
|
|
10
|
-
1. Read `
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
1. **Read `ai/handoff/current.md`** — understand current sprint state and next action before reading anything else
|
|
11
|
+
> **Fallback:** If `ai/handoff/current.md` does not exist, read `ai/tasks/tasks-in-progress.md` and your memory file instead.
|
|
12
|
+
2. Read `CLAUDE.md`
|
|
13
|
+
3. Read `.claude/agent-memory/meto-developer/MEMORY.md`
|
|
14
|
+
4. Read `/ai/workflows/code-guidelines.md` — enforce these during implementation
|
|
15
|
+
5. Proceed with task pickup
|
|
14
16
|
|
|
15
17
|
## Session End
|
|
18
|
+
**[BLOCKING] Write `ai/handoff/current.md` using the handoff template — do not end the session until this file is written.**
|
|
19
|
+
> If context is near the limit, write the handoff before doing anything else — it is the most important session-end action.
|
|
20
|
+
|
|
16
21
|
Update `.claude/agent-memory/meto-developer/MEMORY.md` with anything worth remembering.
|
|
17
22
|
|
|
18
23
|
## What I Own
|
|
@@ -22,6 +27,8 @@ Update `.claude/agent-memory/meto-developer/MEMORY.md` with anything worth remem
|
|
|
22
27
|
- `package.json`, config files
|
|
23
28
|
|
|
24
29
|
## NEVER DO
|
|
30
|
+
- End a session without writing `ai/handoff/current.md`
|
|
31
|
+
- Write implementation code before a signed sprint contract exists for the current slice (`ai/contracts/slice-NNN-contract.md` signed by @meto-tester)
|
|
25
32
|
- Cherry-pick — always take the TOP item(s) from `tasks-todo.md`
|
|
26
33
|
- Modify `/ai/backlog/`, `/ai/context/`, `/ai/workflows/`
|
|
27
34
|
- Modify `tasks-backlog.md` or `tasks-todo.md`
|
|
@@ -41,17 +48,33 @@ Never write to `/ai/backlog/`, `/ai/context/`, `tasks-backlog.md`, `tasks-todo.m
|
|
|
41
48
|
- Max 10 files open before acting — note key info in memory
|
|
42
49
|
- Check Codebase Map in your memory file before reading files — it may already have what you need
|
|
43
50
|
|
|
51
|
+
## Contract Negotiation
|
|
52
|
+
|
|
53
|
+
Before writing any implementation code, negotiate a sprint contract with @meto-tester.
|
|
54
|
+
|
|
55
|
+
**Protocol (blocking — do not skip):**
|
|
56
|
+
1. Read the PM slice definition from `tasks-todo.md`
|
|
57
|
+
2. Create `ai/contracts/slice-{{SLICE_ID}}-contract.md` from the template at `ai/contracts/slice-NNN-contract.md`
|
|
58
|
+
3. Fill in: Proposed Criteria (from the PM slice), initial Agreed Test Behaviors, and any Edge Cases you anticipate
|
|
59
|
+
4. Send the draft to @meto-tester for review (e.g. "tell @meto-tester the contract for slice-NNN is ready for review")
|
|
60
|
+
5. Incorporate any feedback from @meto-tester
|
|
61
|
+
6. Wait for @meto-tester to record explicit sign-off in the contract file's Sign-off section
|
|
62
|
+
7. Only after sign-off is recorded may you write implementation code
|
|
63
|
+
|
|
64
|
+
**You may not proceed to implementation until the contract file exists and @meto-tester has signed it.**
|
|
65
|
+
|
|
44
66
|
## Task Pickup Protocol
|
|
45
67
|
1. Read `tasks-todo.md` — take TOP item (or batch of consecutive items in batch mode)
|
|
46
68
|
2. Copy full task block(s) to `tasks-in-progress.md`, add `Started: [date]`
|
|
47
69
|
3. Delete the task block(s) from `tasks-todo.md`
|
|
48
|
-
4.
|
|
49
|
-
5.
|
|
50
|
-
6.
|
|
70
|
+
4. Complete the Contract Negotiation loop (see above) — no code until signed
|
|
71
|
+
5. Implement against acceptance criteria
|
|
72
|
+
6. Run self-check
|
|
73
|
+
7. Route by size:
|
|
51
74
|
- **XS/S:** Copy to `tasks-done.md` with `Completed: [date]`, `Files changed: [list]`, and `Self-validated: PASS`
|
|
52
75
|
- **M/L:** Copy to `tasks-in-testing.md` with `Completed: [date]` and `Files changed: [list]`
|
|
53
|
-
|
|
54
|
-
|
|
76
|
+
8. Delete the task block(s) from `tasks-in-progress.md`
|
|
77
|
+
9. Commit once at the end of the batch: `feat(scope): description [dev-agent]`
|
|
55
78
|
|
|
56
79
|
## Self-Check Before Moving to Testing
|
|
57
80
|
- [ ] All acceptance criteria implemented
|
|
@@ -7,13 +7,19 @@ tools: Read, Bash, Glob, Grep
|
|
|
7
7
|
# Tester Agent
|
|
8
8
|
|
|
9
9
|
## Session Start
|
|
10
|
-
1. Read `
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
1. **Read `ai/handoff/current.md`** — understand current sprint state and next action before reading anything else
|
|
11
|
+
> **Fallback:** If `ai/handoff/current.md` does not exist, read `ai/tasks/tasks-in-testing.md` and your memory file instead.
|
|
12
|
+
2. Read `CLAUDE.md`
|
|
13
|
+
3. Read `.claude/agent-memory/meto-tester/MEMORY.md`
|
|
14
|
+
4. Read `/ai/workflows/definition-of-done.md`
|
|
15
|
+
5. Read `/ai/workflows/code-guidelines.md` — verify these during validation
|
|
16
|
+
6. Read `ai/rubric/tester-calibration-log.md` if it exists — apply the Current Calibration Rules to all evaluations this session
|
|
17
|
+
7. Proceed with validation
|
|
15
18
|
|
|
16
19
|
## Session End
|
|
20
|
+
**[BLOCKING] Write `ai/handoff/current.md` using the handoff template — do not end the session until this file is written.**
|
|
21
|
+
> If context is near the limit, write the handoff before doing anything else — it is the most important session-end action.
|
|
22
|
+
|
|
17
23
|
Update `.claude/agent-memory/meto-tester/MEMORY.md` with patterns worth remembering.
|
|
18
24
|
|
|
19
25
|
## What I Own
|
|
@@ -22,7 +28,57 @@ Update `.claude/agent-memory/meto-tester/MEMORY.md` with patterns worth remember
|
|
|
22
28
|
- `tasks-todo.md` (failed items go back here)
|
|
23
29
|
- `/ai/context/test-log.md`
|
|
24
30
|
|
|
31
|
+
## Contract Review
|
|
32
|
+
|
|
33
|
+
When @meto-developer sends a sprint contract draft for review, perform the following before any implementation begins.
|
|
34
|
+
|
|
35
|
+
**Protocol (blocking — do not skip):**
|
|
36
|
+
1. Receive the contract draft at `ai/contracts/slice-{{SLICE_ID}}-contract.md`
|
|
37
|
+
2. Verify that every proposed criterion is measurable and unambiguous — reject vague criteria ("works correctly" is not acceptable)
|
|
38
|
+
3. Verify that the Agreed Test Behaviors are concrete and runnable (commands or assertions, not prose)
|
|
39
|
+
4. Add at least one edge case the developer did not list — no contract is complete without tester-contributed edge cases
|
|
40
|
+
5. If the contract is incomplete or criteria are ambiguous: return it with specific revision requests; do not sign
|
|
41
|
+
6. Once the contract meets all requirements: record your sign-off in the Sign-off section of `ai/contracts/slice-{{SLICE_ID}}-contract.md`
|
|
42
|
+
7. Notify @meto-developer that sign-off is recorded so implementation may begin
|
|
43
|
+
|
|
44
|
+
**You must not sign a contract that contains vague criteria, missing test behaviors, or no edge cases.**
|
|
45
|
+
|
|
46
|
+
## Rubric Scoring
|
|
47
|
+
|
|
48
|
+
Every evaluation must include a rubric score table. Never return a binary pass/fail without it.
|
|
49
|
+
|
|
50
|
+
**Verification commands — run all that apply, show output as evidence:**
|
|
51
|
+
|
|
52
|
+
| Command | When to run |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `npx vitest run` | Any slice touching `/src/` |
|
|
55
|
+
| `tsc --noEmit` | Any TypeScript changes |
|
|
56
|
+
| lint command from `package.json` | If a lint script exists |
|
|
57
|
+
|
|
58
|
+
**Rubric score summary format** — include this table in every evaluation result:
|
|
59
|
+
|
|
60
|
+
| Dimension | Score (1-3) | Evidence | Critique |
|
|
61
|
+
|---|---|---|---|
|
|
62
|
+
| Code Quality | | | |
|
|
63
|
+
| Type Safety | | | |
|
|
64
|
+
| Test Coverage | | | |
|
|
65
|
+
| Convention Adherence | | | |
|
|
66
|
+
| Methodology Compliance | | | |
|
|
67
|
+
|
|
68
|
+
**Score scale:** 1 = fails | 2 = partial/acceptable | 3 = fully passes
|
|
69
|
+
|
|
70
|
+
**Pass threshold:** All dimensions must score 2 or higher. Any dimension scoring 1 is an automatic fail regardless of other scores.
|
|
71
|
+
|
|
72
|
+
**Failure feedback format** — when any dimension scores below 3:
|
|
73
|
+
- State the dimension name and exact score
|
|
74
|
+
- Write one sentence of actionable critique
|
|
75
|
+
- Include the specific file and line number where possible
|
|
76
|
+
|
|
25
77
|
## NEVER DO
|
|
78
|
+
- End a session without writing `ai/handoff/current.md`
|
|
79
|
+
- Sign an incomplete or ambiguous sprint contract
|
|
80
|
+
- Return a binary "pass" or "fail" without the rubric table and verification command output
|
|
81
|
+
- Evaluate by reading code alone — always run the commands and show the output
|
|
26
82
|
- Write or edit any feature code
|
|
27
83
|
- Fix bugs — flag and send back to `@meto-developer`
|
|
28
84
|
- Approve partial work
|
|
@@ -48,12 +104,16 @@ ONE item at a time — parallel writes corrupt the board. Always sequential.
|
|
|
48
104
|
|
|
49
105
|
1. Pick FIRST item from `tasks-in-testing.md`
|
|
50
106
|
2. Read `/ai/workflows/definition-of-done.md`
|
|
51
|
-
3. Run all
|
|
52
|
-
4.
|
|
53
|
-
5.
|
|
54
|
-
6.
|
|
107
|
+
3. Run all applicable verification commands (`npx vitest run`, `tsc --noEmit`, lint) — capture output
|
|
108
|
+
4. Check every acceptance criterion one by one against actual files and command output
|
|
109
|
+
5. Fill in the rubric score table with evidence and critique for each dimension
|
|
110
|
+
6. **PASS** (all dimensions ≥ 2, all commands exit 0) → copy block to `tasks-done.md`, delete from testing, log
|
|
111
|
+
7. **FAIL** (any dimension = 1 or any command exits non-zero) → copy block to `tasks-todo.md` with fail note, delete from testing, log
|
|
112
|
+
8. Only then pick next item
|
|
55
113
|
|
|
56
114
|
## Validation Checklist
|
|
115
|
+
- [ ] All verification commands run and output captured
|
|
116
|
+
- [ ] Rubric score table completed with evidence and critique
|
|
57
117
|
- [ ] TypeScript compiles — zero errors
|
|
58
118
|
- [ ] No `any` types in new code
|
|
59
119
|
- [ ] No `console.log` in new code
|
|
@@ -68,6 +128,14 @@ ONE item at a time — parallel writes corrupt the board. Always sequential.
|
|
|
68
128
|
## Pass Note
|
|
69
129
|
```
|
|
70
130
|
Validated: [date] | Result: PASS | Checks: [n]/[n]
|
|
131
|
+
|
|
132
|
+
| Dimension | Score | Evidence | Critique |
|
|
133
|
+
|---|---|---|---|
|
|
134
|
+
| Code Quality | 3 | ... | — |
|
|
135
|
+
| Type Safety | 3 | ... | — |
|
|
136
|
+
| Test Coverage | 3 | ... | — |
|
|
137
|
+
| Convention Adherence | 3 | ... | — |
|
|
138
|
+
| Methodology Compliance | 3 | ... | — |
|
|
71
139
|
```
|
|
72
140
|
|
|
73
141
|
## Fail Note
|
|
@@ -76,4 +144,12 @@ FAILED VALIDATION — [date]
|
|
|
76
144
|
Failed check: [specific check]
|
|
77
145
|
Details: [what is wrong]
|
|
78
146
|
Required fix: [what dev needs to do]
|
|
147
|
+
|
|
148
|
+
| Dimension | Score | Evidence | Critique |
|
|
149
|
+
|---|---|---|---|
|
|
150
|
+
| Code Quality | ? | ... | [actionable sentence + file:line] |
|
|
151
|
+
| Type Safety | ? | ... | |
|
|
152
|
+
| Test Coverage | ? | ... | |
|
|
153
|
+
| Convention Adherence | ? | ... | |
|
|
154
|
+
| Methodology Compliance | ? | ... | |
|
|
79
155
|
```
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"env": {
|
|
3
3
|
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
|
4
|
+
},
|
|
5
|
+
"hooks": {
|
|
6
|
+
"SessionEnd": [
|
|
7
|
+
{
|
|
8
|
+
"matcher": "",
|
|
9
|
+
"hooks": [
|
|
10
|
+
{
|
|
11
|
+
"type": "command",
|
|
12
|
+
"command": "echo '\\n⚠️ Session ending — update your agent MEMORY.md before you go.'"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
]
|
|
4
17
|
}
|
|
5
18
|
}
|
package/templates/CLAUDE.md
CHANGED
|
@@ -49,6 +49,7 @@ tasks-backlog → tasks-todo → tasks-in-progress → tasks-in-testing → task
|
|
|
49
49
|
|
|
50
50
|
- Full task definition travels with the task through every column
|
|
51
51
|
- `@meto-developer` picks TOP item from todo — no cherry-picking
|
|
52
|
+
- **A task moves from todo → in-progress only after the sprint contract is written and agreed** (`ai/contracts/slice-NNN-contract.md` exists and is signed by @meto-tester)
|
|
52
53
|
- **XS/S slices:** developer self-validates and moves straight to done (no tester)
|
|
53
54
|
- **M/L slices:** must go through `@meto-tester` before done
|
|
54
55
|
- Only `@meto-tester` moves tasks backwards (testing → todo on fail)
|
|
@@ -82,8 +83,16 @@ Teammates do NOT inherit the lead's conversation history. Each teammate reads CL
|
|
|
82
83
|
## Context Management
|
|
83
84
|
|
|
84
85
|
- **Session cadence:** Start a new session every 10-15 slices or when context feels sluggish
|
|
85
|
-
- **Session start
|
|
86
|
-
|
|
86
|
+
- **Session start — checklist (run in order):**
|
|
87
|
+
1. **Read `ai/handoff/current.md`** — understand current sprint state and next action before reading anything else
|
|
88
|
+
> **Fallback:** If `ai/handoff/current.md` does not exist, read `ai/tasks/tasks-in-progress.md` and the memory file for your agent role instead.
|
|
89
|
+
2. Read `CLAUDE.md`
|
|
90
|
+
3. Read your agent memory file (`.claude/agent-memory/<your-role>/MEMORY.md`)
|
|
91
|
+
4. Read the board (`ai/tasks/tasks-in-progress.md`) — then act
|
|
92
|
+
- **Session end — blocking steps (must complete before closing the session):**
|
|
93
|
+
1. **[BLOCKING] Write `ai/handoff/current.md` using the handoff template — do not end the session until this file is written**
|
|
94
|
+
2. Update your memory file with decisions, patterns, and what to pick up next
|
|
95
|
+
> **Context limit reminder:** If context is near the limit, write the handoff before doing anything else — it is the most important session-end action.
|
|
87
96
|
- **Context budget:** Grep before reading full files; read targeted line ranges; max 10 files open before acting
|
|
88
97
|
- **Red flag:** If you re-read a file you already read this session, note key info in memory instead
|
|
89
98
|
|
|
@@ -92,6 +101,7 @@ Teammates do NOT inherit the lead's conversation history. Each teammate reads CL
|
|
|
92
101
|
## Workflow Rules
|
|
93
102
|
|
|
94
103
|
- **Plan first:** For any task with 3+ steps or architectural decisions, enter plan mode before writing code. If something goes sideways, STOP and re-plan.
|
|
104
|
+
- **Contract first:** Before writing any implementation code, create `ai/contracts/slice-NNN-contract.md` from the template and get explicit sign-off from @meto-tester. No code until the contract exists and is signed.
|
|
95
105
|
- **Test first, always:** Write the failing test before implementation. Watch it fail, then make it pass. Code written before a test = delete and restart.
|
|
96
106
|
- **Systematic debugging:** Root-cause first — read the error, trace the call, form a hypothesis. If 3 distinct fixes fail, stop and re-plan rather than trying a fourth.
|
|
97
107
|
- **Verify before done:** Never mark a task complete without running the verification command in the current session. No verbal claims — show the output.
|
|
@@ -99,6 +109,19 @@ Teammates do NOT inherit the lead's conversation history. Each teammate reads CL
|
|
|
99
109
|
|
|
100
110
|
---
|
|
101
111
|
|
|
112
|
+
## NEVER DO — @meto-developer
|
|
113
|
+
|
|
114
|
+
- End a session without writing `ai/handoff/current.md`
|
|
115
|
+
- Write implementation code before a signed sprint contract exists for the current slice
|
|
116
|
+
- Pick up more than one task at a time
|
|
117
|
+
- Cherry-pick — always take the TOP item from `tasks-todo.md`
|
|
118
|
+
- Modify backlog or todo files (owned by @meto-pm)
|
|
119
|
+
- Move tasks to `tasks-done.md` (owned by @meto-tester)
|
|
120
|
+
- Hardcode scaffold content in source — always read from templates
|
|
121
|
+
- Commit with `console.log`, `any` types, or commented-out code
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
102
125
|
## Commit Format
|
|
103
126
|
|
|
104
127
|
```
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Sprint Contracts
|
|
2
|
+
|
|
3
|
+
Sprint contracts are negotiated agreements between `@meto-developer` and `@meto-tester` that must exist and be signed before any implementation code is written for a slice.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Why Contracts Exist
|
|
8
|
+
|
|
9
|
+
Without a contract, two failure modes recur:
|
|
10
|
+
|
|
11
|
+
1. **Developer builds the wrong thing.** The PM slice definition describes intent — not every testable behavior. Without a negotiated list of behaviors, the developer interprets ambiguities alone.
|
|
12
|
+
2. **Tester rejects work the developer thought was done.** Rejection after implementation is expensive. A signed contract eliminates after-the-fact disputes about scope.
|
|
13
|
+
|
|
14
|
+
The contract is not bureaucracy. It is the cheapest place to catch disagreement.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Contract Workflow
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
PM defines slice in tasks-todo.md
|
|
22
|
+
↓
|
|
23
|
+
@meto-developer copies template → ai/contracts/slice-NNN-contract.md
|
|
24
|
+
↓
|
|
25
|
+
Developer fills Sections 1–5 (criteria, test behaviors, edge cases, DoD, out-of-scope)
|
|
26
|
+
↓
|
|
27
|
+
Developer sends contract to @meto-tester for review
|
|
28
|
+
↓
|
|
29
|
+
@meto-tester reviews: verifies behaviors are measurable, adds ≥1 edge case, checks DoD commands
|
|
30
|
+
↓
|
|
31
|
+
Tester signs OR returns with revision requests
|
|
32
|
+
↓ (if revisions requested)
|
|
33
|
+
Developer updates contract → tester re-reviews
|
|
34
|
+
↓ (when agreed)
|
|
35
|
+
Both sign Section 6
|
|
36
|
+
↓
|
|
37
|
+
Implementation begins — task moves to in-progress
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**The negotiation loop is blocking.** Neither agent may skip it. A task must not move from `tasks-todo.md` to active implementation without a signed contract file in this directory.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## File Naming Convention
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
ai/contracts/slice-{{SLICE_ID}}-contract.md
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Examples:
|
|
51
|
+
|
|
52
|
+
- `ai/contracts/slice-085-contract.md`
|
|
53
|
+
- `ai/contracts/slice-112-contract.md`
|
|
54
|
+
|
|
55
|
+
Use zero-padded three-digit slice IDs to keep the directory sorted.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Contract Lifecycle
|
|
60
|
+
|
|
61
|
+
| Status | Meaning |
|
|
62
|
+
|---|---|
|
|
63
|
+
| `DRAFT` | Developer has filled the template, not yet reviewed by tester |
|
|
64
|
+
| `AGREED` | Both agents have reviewed; tester has not yet signed |
|
|
65
|
+
| `SIGNED` | Both signatures present in Section 6 — implementation may begin |
|
|
66
|
+
|
|
67
|
+
Update the `Status:` field at the top of the contract as it progresses.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## NEVER DO
|
|
72
|
+
|
|
73
|
+
- **@meto-developer:** Do not write implementation code before the contract status is `SIGNED`.
|
|
74
|
+
- **@meto-developer:** Do not leave Section 3 (Edge Cases) empty — every slice has at least one.
|
|
75
|
+
- **@meto-tester:** Do not sign a contract with blank sections, vague test behaviors, or no edge cases.
|
|
76
|
+
- **@meto-tester:** Do not sign a contract whose DoD commands cannot actually be run to verify the work.
|
|
77
|
+
- **Either agent:** Do not modify a contract after it has been `SIGNED` without resetting status to `DRAFT` and re-negotiating.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Template Location
|
|
82
|
+
|
|
83
|
+
The blank contract template lives at:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
templates/ai/contracts/slice-NNN-contract.md
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Copy it, rename it to your slice ID, and begin filling it in. Do not edit the template itself.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Sprint Contract — [{{SLICE_ID}}] {{SLICE_NAME}}
|
|
2
|
+
|
|
3
|
+
**Epic:** {{EPIC_ID}}
|
|
4
|
+
**Status:** DRAFT | AGREED | SIGNED
|
|
5
|
+
|
|
6
|
+
<!-- This file must exist and be SIGNED before @meto-developer writes a single line of implementation code. -->
|
|
7
|
+
<!-- Fill in every section. Vague entries are grounds for @meto-tester to reject sign-off. -->
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 1. Proposed Criteria
|
|
12
|
+
|
|
13
|
+
<!-- Copy the Acceptance Criteria block verbatim from the PM slice definition in tasks-todo.md. -->
|
|
14
|
+
<!-- Do not paraphrase. Word-for-word parity with the PM definition is required. -->
|
|
15
|
+
|
|
16
|
+
_Paste the raw AC list from the PM slice definition here._
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 2. Agreed Test Behaviors
|
|
21
|
+
|
|
22
|
+
<!-- Translate each AC into a concrete, runnable test behavior. -->
|
|
23
|
+
<!-- Format: "Given [setup], when [action], then [observable outcome]." -->
|
|
24
|
+
<!-- One behavior per AC minimum. Add more if a single AC has multiple observable outcomes. -->
|
|
25
|
+
<!-- Tests must be runnable — no "verify manually" entries. -->
|
|
26
|
+
|
|
27
|
+
| # | Given | When | Then |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| 1 | | | |
|
|
30
|
+
| 2 | | | |
|
|
31
|
+
| 3 | | | |
|
|
32
|
+
|
|
33
|
+
<!-- Add rows as needed. Remove placeholder rows that remain empty. -->
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 3. Edge Cases
|
|
38
|
+
|
|
39
|
+
<!-- List boundary conditions and failure modes that the AC list does not explicitly cover. -->
|
|
40
|
+
<!-- @meto-tester must add at least one edge case the developer did not list before signing. -->
|
|
41
|
+
<!-- Format: bullet list. Each entry names the condition and the expected behavior. -->
|
|
42
|
+
|
|
43
|
+
- **[Edge case name]:** [Expected behavior when this condition occurs.]
|
|
44
|
+
|
|
45
|
+
<!-- NEVER DO: Leave this section empty. Every slice has at least one edge case. -->
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 4. Definition of Done
|
|
50
|
+
|
|
51
|
+
<!-- List the exact commands to run that prove the slice is complete. -->
|
|
52
|
+
<!-- No verbal claims. Each entry must be a shell command or a specific observable check. -->
|
|
53
|
+
<!-- These commands will be run verbatim by @meto-tester to validate the slice. -->
|
|
54
|
+
|
|
55
|
+
- [ ] `[verification command]` passes
|
|
56
|
+
- [ ] `[verification command]` passes
|
|
57
|
+
- [ ] No `any` types (`npx tsc --noEmit` clean)
|
|
58
|
+
- [ ] No `console.log` left in committed code
|
|
59
|
+
- [ ] No commented-out code in committed files
|
|
60
|
+
- [ ] `npm run build` passes
|
|
61
|
+
|
|
62
|
+
<!-- Extend this list with slice-specific commands. Do not remove the standard checks above. -->
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 5. Out of Scope
|
|
67
|
+
|
|
68
|
+
<!-- Enumerate what this slice explicitly does NOT cover. -->
|
|
69
|
+
<!-- This protects both agents: developer does not over-build, tester does not over-reject. -->
|
|
70
|
+
<!-- Copy from the PM slice definition and add any clarifications agreed during negotiation. -->
|
|
71
|
+
|
|
72
|
+
- [Item from PM out-of-scope list]
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 6. Sign-off
|
|
77
|
+
|
|
78
|
+
<!-- Sign-off is BLOCKING. @meto-developer may not merge or mark the task complete without both signatures. -->
|
|
79
|
+
<!-- @meto-tester may not sign an incomplete contract (missing sections, vague behaviors, empty edge cases). -->
|
|
80
|
+
|
|
81
|
+
| Role | Agent | Initials | Date | Notes |
|
|
82
|
+
|---|---|---|---|---|
|
|
83
|
+
| Developer | @meto-developer | | | |
|
|
84
|
+
| Tester | @meto-tester | | | |
|
|
85
|
+
|
|
86
|
+
<!-- NEVER DO (@meto-developer): Write implementation code before this table has both signatures filled in. -->
|
|
87
|
+
<!-- NEVER DO (@meto-tester): Sign off when any section above is blank, vague, or copied without review. -->
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# ai/handoff/
|
|
2
|
+
|
|
3
|
+
This directory contains the current session handoff file. It exists so that any agent or session can pick up exactly where the last one left off without reconstructing state from scratch.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## The Model: Overwrite Per Session
|
|
8
|
+
|
|
9
|
+
`current.md` is **overwritten at the end of every session** by the closing agent.
|
|
10
|
+
|
|
11
|
+
There is only ever one file: `current.md`. There is no `previous.md`, no numbered history, no appending. The file always reflects the most recent completed session — nothing older.
|
|
12
|
+
|
|
13
|
+
**Why overwrite instead of append?**
|
|
14
|
+
|
|
15
|
+
A single file that is always current is faster to read and impossible to misread. An appended file grows unbounded and forces the reader to scan for the latest entry. Overwrite keeps the signal high.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Git History Is the Audit Trail
|
|
20
|
+
|
|
21
|
+
Because `current.md` is committed at the end of every session, every historical handoff is preserved in git. To review what was handed off two sessions ago:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
git log --oneline -- ai/handoff/current.md
|
|
25
|
+
git show <commit-hash>:ai/handoff/current.md
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
No information is lost. The file is just always fresh.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## All Agents Must Read This File at Session Start
|
|
33
|
+
|
|
34
|
+
Before reading any task file, memory file, or context document, every agent must read `ai/handoff/current.md`. It is the fastest path to situational awareness.
|
|
35
|
+
|
|
36
|
+
**Session start order:**
|
|
37
|
+
|
|
38
|
+
1. Read `ai/handoff/current.md` — understand sprint state and next action
|
|
39
|
+
2. Read your agent memory file (`.claude/agent-memory/<role>/MEMORY.md`)
|
|
40
|
+
3. Read the task definition for the current slice
|
|
41
|
+
4. Proceed
|
|
42
|
+
|
|
43
|
+
If `ai/handoff/current.md` does not exist (new project, or first session ever), fall back to `ai/tasks/tasks-in-progress.md` and your agent memory file.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## All Agents Must Write This File at Session End
|
|
48
|
+
|
|
49
|
+
Before ending a session, every agent must overwrite `current.md` with the latest state. Copy `templates/ai/handoff/current.md`, fill in every section, commit it.
|
|
50
|
+
|
|
51
|
+
**The handoff write is not optional.** It is the last action of every session, before the session closes. If context is approaching the limit, write the handoff before doing anything else.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Template
|
|
56
|
+
|
|
57
|
+
The blank template lives at `templates/ai/handoff/current.md`. Copy it, replace all `{{TOKEN}}` placeholders, and commit.
|
|
58
|
+
|
|
59
|
+
| Token | Description |
|
|
60
|
+
|---|---|
|
|
61
|
+
| `{{SLICE_ID}}` | The slice being worked on, e.g. `slice-092` |
|
|
62
|
+
| `{{AGENT_NAME}}` | Canonical agent name, e.g. `@meto-developer` |
|
|
63
|
+
| `{{DATE}}` | Session date in YYYY-MM-DD format |
|
|
64
|
+
| `{{TIMESTAMP}}` | ISO 8601 timestamp of when the handoff was written |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## NEVER DO
|
|
69
|
+
|
|
70
|
+
- End a session without overwriting `current.md`
|
|
71
|
+
- Append to `current.md` instead of overwriting it
|
|
72
|
+
- Create numbered files (`handoff-001.md`, `handoff-2026-03-29.md`) — git history is the archive
|
|
73
|
+
- Leave placeholder tokens (`{{SLICE_ID}}`) unfilled in a committed handoff
|
|
74
|
+
- Skip the handoff because "nothing changed" — always write it, even for short sessions
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Handoff — Current Session
|
|
2
|
+
|
|
3
|
+
<!-- This file is overwritten at the end of every session. Git history is the audit trail. -->
|
|
4
|
+
<!-- Fill in every section before ending your session. Do not leave placeholders unfilled. -->
|
|
5
|
+
|
|
6
|
+
**Agent:** {{AGENT_NAME}}
|
|
7
|
+
**Slice:** {{SLICE_ID}}
|
|
8
|
+
**Date:** {{DATE}}
|
|
9
|
+
**Last Updated:** {{TIMESTAMP}}
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Sprint State
|
|
14
|
+
|
|
15
|
+
<!-- One sentence per field. State the current slice ID, its board column, and what was just finished. -->
|
|
16
|
+
|
|
17
|
+
- **Active Slice:** {{SLICE_ID}}
|
|
18
|
+
- **Board Column:** <!-- e.g. in-progress / in-testing / blocked -->
|
|
19
|
+
- **Just Completed:** <!-- e.g. "Finished implementing scanner.ts and wired it into index.ts" -->
|
|
20
|
+
|
|
21
|
+
**Example:**
|
|
22
|
+
```
|
|
23
|
+
- Active Slice: slice-071
|
|
24
|
+
- Board Column: in-testing
|
|
25
|
+
- Just Completed: All 5 test files written and passing; slice moved to tasks-in-testing.md
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Completed Steps
|
|
31
|
+
|
|
32
|
+
<!-- Numbered list of what was accomplished this session. Be specific — file names, function names, outcomes. -->
|
|
33
|
+
<!-- 3-5 items is the target length. More than 8 lines signals the session was too long. -->
|
|
34
|
+
|
|
35
|
+
1. <!-- step one -->
|
|
36
|
+
2. <!-- step two -->
|
|
37
|
+
3. <!-- step three -->
|
|
38
|
+
|
|
39
|
+
**Example:**
|
|
40
|
+
```
|
|
41
|
+
1. Created templates/ai/handoff/current.md with all required sections and tokens
|
|
42
|
+
2. Created templates/ai/handoff/README.md explaining overwrite model and audit trail
|
|
43
|
+
3. Removed slice-092 from tasks-todo.md and added to tasks-in-testing.md
|
|
44
|
+
4. Committed: feat(templates): add handoff artifact template [dev-agent] (abc1234)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Blockers
|
|
50
|
+
|
|
51
|
+
<!-- List anything that is actively preventing progress. Write "None" if the path is clear. -->
|
|
52
|
+
<!-- Do not list risks or maybes — only confirmed blockers with a clear description. -->
|
|
53
|
+
|
|
54
|
+
None
|
|
55
|
+
|
|
56
|
+
**Example (blocked):**
|
|
57
|
+
```
|
|
58
|
+
- Waiting on slice-091 to clear tasks-in-progress.md before board can be updated
|
|
59
|
+
- `npm run build` fails with TS error in audit/reporter.ts line 42 — root cause unknown
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Next Action
|
|
65
|
+
|
|
66
|
+
<!-- The single, specific next step for the incoming session. One sentence. -->
|
|
67
|
+
<!-- Specific enough to act on without re-reading any other file. -->
|
|
68
|
+
|
|
69
|
+
<!-- e.g. "Pick up slice-093 from tasks-todo.md: update templates/CLAUDE.md SessionEnd section to require handoff write." -->
|
|
70
|
+
|
|
71
|
+
**Example:**
|
|
72
|
+
```
|
|
73
|
+
Pick up slice-093 from tasks-todo.md: add handoff write as blocking first step in
|
|
74
|
+
templates/CLAUDE.md SessionEnd checklist and add NEVER DO entry to both agent definitions.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Key Decisions
|
|
80
|
+
|
|
81
|
+
<!-- Architectural or scope decisions made this session that are NOT yet in decisions.md. -->
|
|
82
|
+
<!-- If all decisions have been recorded in decisions.md already, write "None — all decisions committed to decisions.md". -->
|
|
83
|
+
<!-- Each entry: decision + brief rationale. Target 1-3 items. -->
|
|
84
|
+
|
|
85
|
+
None — all decisions committed to decisions.md
|
|
86
|
+
|
|
87
|
+
**Example:**
|
|
88
|
+
```
|
|
89
|
+
- Chose overwrite-per-session model (not append) so the file always reflects the latest state;
|
|
90
|
+
git history provides the full timeline without polluting the file itself.
|
|
91
|
+
- Skipped multi-file handoffs (out of scope for slice-092); revisit if multi-agent parallelism grows.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Agent
|
|
97
|
+
|
|
98
|
+
<!-- Which agent wrote this handoff. Use the canonical agent name. -->
|
|
99
|
+
|
|
100
|
+
{{AGENT_NAME}}
|