Skip to content

Commit a85f0ca

Browse files
authored
fix(workflow): move self-declarations from TODO.md to verbal agent communication (#74)
1 parent cb8ab73 commit a85f0ca

File tree

5 files changed

+55
-160
lines changed

5 files changed

+55
-160
lines changed

.opencode/skills/implementation/SKILL.md

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -222,45 +222,41 @@ All must pass before Self-Declaration.
222222

223223
### Self-Declaration (once, after all quality gates pass)
224224

225-
Answer honestly the `## Self-Declaration` report:
226-
227-
```markdown
228-
## Self-Declaration
229-
As a software-engineer I declare:
230-
* YAGNI: no code without a failing test — AGREE/DISAGREE | file:line
231-
* YAGNI: no speculative abstractions — AGREE/DISAGREE | file:line
232-
* KISS: simplest solution that passes — AGREE/DISAGREE | file:line
233-
* KISS: no premature optimization — AGREE/DISAGREE | file:line
234-
* DRY: no duplication — AGREE/DISAGREE | file:line
235-
* DRY: no redundant comments — AGREE/DISAGREE | file:line
236-
* SOLID-S: one reason to change per class — AGREE/DISAGREE | file:line
237-
* SOLID-O: open for extension, closed for modification — AGREE/DISAGREE | file:line
238-
* SOLID-L: subtypes substitutable — AGREE/DISAGREE | file:line
239-
* SOLID-I: no forced unused deps — AGREE/DISAGREE | file:line
240-
* SOLID-D: depend on abstractions, not concretions — AGREE/DISAGREE | file:line
241-
* OC-1: one level of indentation per method — AGREE/DISAGREE | deepest: file:line
242-
* OC-2: no else after return — AGREE/DISAGREE | file:line
243-
* OC-3: primitive types wrapped — AGREE/DISAGREE | file:line
244-
* OC-4: first-class collections — AGREE/DISAGREE | file:line
245-
* OC-5: one dot per line — AGREE/DISAGREE | file:line
246-
* OC-6: no abbreviations — AGREE/DISAGREE | file:line
247-
* OC-7: ≤20 lines per function, ≤50 per class — AGREE/DISAGREE | longest: file:line
248-
* OC-8: ≤2 instance variables per class (behavioural classes only; dataclasses, Pydantic models, value objects, and TypedDicts are exempt) — AGREE/DISAGREE | file:line
249-
* OC-9: no getters/setters — AGREE/DISAGREE | file:line
250-
* Patterns: I have no good reason to refactor parts of the code using OOP or Design Patterns — AGREE/DISAGREE | file:line
251-
* Patterns: no creational smell — AGREE/DISAGREE | file:line
252-
* Patterns: no structural smell — AGREE/DISAGREE | file:line
253-
* Patterns: no behavioral smell — AGREE/DISAGREE | file:line
254-
* Semantic: tests operate at same abstraction as AC — AGREE/DISAGREE | file:line
255-
```
256-
257-
A `DISAGREE` answer is not automatic rejection — state the reason inline and fix before handing off.
225+
Communicate verbally to the reviewer. Answer honestly for each principle:
226+
227+
- YAGNI: no code without a failing test — AGREE/DISAGREE | file:line
228+
- YAGNI: no speculative abstractions — AGREE/DISAGREE | file:line
229+
- KISS: simplest solution that passes — AGREE/DISAGREE | file:line
230+
- KISS: no premature optimization — AGREE/DISAGREE | file:line
231+
- DRY: no duplication — AGREE/DISAGREE | file:line
232+
- DRY: no redundant comments — AGREE/DISAGREE | file:line
233+
- SOLID-S: one reason to change per class — AGREE/DISAGREE | file:line
234+
- SOLID-O: open for extension, closed for modification — AGREE/DISAGREE | file:line
235+
- SOLID-L: subtypes substitutable — AGREE/DISAGREE | file:line
236+
- SOLID-I: no forced unused deps — AGREE/DISAGREE | file:line
237+
- SOLID-D: depend on abstractions, not concretions — AGREE/DISAGREE | file:line
238+
- OC-1: one level of indentation per method — AGREE/DISAGREE | deepest: file:line
239+
- OC-2: no else after return — AGREE/DISAGREE | file:line
240+
- OC-3: primitive types wrapped — AGREE/DISAGREE | file:line
241+
- OC-4: first-class collections — AGREE/DISAGREE | file:line
242+
- OC-5: one dot per line — AGREE/DISAGREE | file:line
243+
- OC-6: no abbreviations — AGREE/DISAGREE | file:line
244+
- OC-7: ≤20 lines per function, ≤50 per class — AGREE/DISAGREE | longest: file:line
245+
- OC-8: ≤2 instance variables per class (behavioural classes only; dataclasses, Pydantic models, value objects, and TypedDicts are exempt) — AGREE/DISAGREE | file:line
246+
- OC-9: no getters/setters — AGREE/DISAGREE | file:line
247+
- Patterns: I have no good reason to refactor parts of the code using OOP or Design Patterns — AGREE/DISAGREE | file:line
248+
- Patterns: no creational smell — AGREE/DISAGREE | file:line
249+
- Patterns: no structural smell — AGREE/DISAGREE | file:line
250+
- Patterns: no behavioral smell — AGREE/DISAGREE | file:line
251+
- Semantic: tests operate at same abstraction as AC — AGREE/DISAGREE | file:line
252+
253+
A `DISAGREE` answer is not automatic rejection — state the reason and fix before handing off.
258254

259255
### Hand off to Step 4 (Verify)
260256

261257
Signal completion to the reviewer. Provide:
262258
- Feature file path
263-
- Self-Declaration report
259+
- Self-Declaration (communicated verbally, as above)
264260
- Summary of what was implemented
265261

266262
---

.opencode/skills/scope/SKILL.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -281,23 +281,19 @@ All Rules must have their pre-mortems completed before any Examples are written.
281281

282282
**Self-Declaration (mandatory before criteria commit)**
283283

284-
Write the following block into `TODO.md` before committing. Every `DISAGREE` is a **hard blocker** — explain inline and fix before the commit. Do not commit until all items are AGREE or have a documented resolution.
285-
286-
```markdown
287-
## Self-Declaration
288-
As a product-owner I declare:
289-
* INVEST-I: each Rule is Independent (no hidden ordering or dependency between Rules) — AGREE/DISAGREE | conflict:
290-
* INVEST-V: each Rule delivers Value to a named user — AGREE/DISAGREE | Rule:
291-
* INVEST-S: each Rule is Small enough for one development cycle — AGREE/DISAGREE | Rule:
292-
* INVEST-T: each Rule is Testable (I can write a pass/fail Example for it) — AGREE/DISAGREE | Rule:
293-
* Observable: every Then is a single, observable, measurable outcome — AGREE/DISAGREE | file:line
294-
* No impl details: no Example tests internal state or implementation — AGREE/DISAGREE | file:line
295-
* Coverage: every entity in the feature description appears in at least one Rule — AGREE/DISAGREE | missing:
296-
* Distinct: no two Examples test the same observable behavior — AGREE/DISAGREE | file:line
297-
* Unique IDs: all @id values are unique within this feature — AGREE/DISAGREE
298-
* Pre-mortem: I ran a pre-mortem on each Rule and found no hidden failure modes — AGREE/DISAGREE | Rule:
299-
* Scope: no Example introduces behavior outside the feature boundary — AGREE/DISAGREE | file:line
300-
```
284+
Communicate verbally to the next agent. Every `DISAGREE` is a **hard blocker** — fix before committing. Do not commit until all items are AGREE or have a documented resolution.
285+
286+
- INVEST-I: each Rule is Independent (no hidden ordering or dependency between Rules) — AGREE/DISAGREE | conflict:
287+
- INVEST-V: each Rule delivers Value to a named user — AGREE/DISAGREE | Rule:
288+
- INVEST-S: each Rule is Small enough for one development cycle — AGREE/DISAGREE | Rule:
289+
- INVEST-T: each Rule is Testable (I can write a pass/fail Example for it) — AGREE/DISAGREE | Rule:
290+
- Observable: every Then is a single, observable, measurable outcome — AGREE/DISAGREE | file:line
291+
- No impl details: no Example tests internal state or implementation — AGREE/DISAGREE | file:line
292+
- Coverage: every entity in the feature description appears in at least one Rule — AGREE/DISAGREE | missing:
293+
- Distinct: no two Examples test the same observable behavior — AGREE/DISAGREE | file:line
294+
- Unique IDs: all @id values are unique within this feature — AGREE/DISAGREE
295+
- Pre-mortem: I ran a pre-mortem on each Rule and found no hidden failure modes — AGREE/DISAGREE | Rule:
296+
- Scope: no Example introduces behavior outside the feature boundary — AGREE/DISAGREE | file:line
301297

302298
Commit: `feat(criteria): write acceptance criteria for <name>`
303299

.opencode/skills/session-workflow/SKILL.md

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -104,46 +104,10 @@ No feature in progress.
104104
Next: Run @<product-owner-agent> — load skill feature-selection and pick the next BASELINED feature from backlog.
105105
```
106106

107-
## Step 1 (Stage 2 Criteria) Self-Declaration TODO Format
108-
109-
When Stage 2 Step B (criteria) is complete and before the `feat(criteria):` commit, TODO.md **must** include a `## Self-Declaration` block written by the PO:
110-
111-
```markdown
112-
# Current Work
113-
114-
Feature: <name>
115-
Step: 1 (SCOPE — Stage 2 Criteria)
116-
Source: docs/features/backlog/<name>.feature
117-
118-
## Self-Declaration
119-
As a product-owner I declare:
120-
* INVEST-I: each Rule is Independent — AGREE/DISAGREE | conflict:
121-
* INVEST-V: each Rule delivers Value to a named user — AGREE/DISAGREE | Rule:
122-
* INVEST-S: each Rule is Small enough for one development cycle — AGREE/DISAGREE | Rule:
123-
* INVEST-T: each Rule is Testable — AGREE/DISAGREE | Rule:
124-
* Observable: every Then is a single, observable, measurable outcome — AGREE/DISAGREE | file:line
125-
* No impl details: no Example tests internal state or implementation — AGREE/DISAGREE | file:line
126-
* Coverage: every entity in the feature description appears in at least one Rule — AGREE/DISAGREE | missing:
127-
* Distinct: no two Examples test the same observable behavior — AGREE/DISAGREE | file:line
128-
* Unique IDs: all @id values are unique within this feature — AGREE/DISAGREE
129-
* Pre-mortem: I ran a pre-mortem on each Rule and found no hidden failure modes — AGREE/DISAGREE | Rule:
130-
* Scope: no Example introduces behavior outside the feature boundary — AGREE/DISAGREE | file:line
131-
132-
## Progress
133-
- [x] `@id:<hex>`: <description>
134-
135-
## Next
136-
Run @<software-engineer-agent> — load skill implementation and begin Step 2 (Architecture) for <feature-name>
137-
```
138-
139-
Every `DISAGREE` is a hard blocker — fix before committing.
140-
141107
## Step 3 (TDD Loop) Cycle-Aware TODO Format
142108

143109
During Step 3 (TDD Loop), TODO.md **must** include a `## Cycle State` block to track Red-Green-Refactor progress.
144110

145-
When `Phase: REFACTOR` is complete, a `## Self-Declaration` block is also **mandatory** before handing off to Step 4.
146-
147111
```markdown
148112
# Current Work
149113

@@ -155,9 +119,6 @@ Source: docs/features/in-progress/<name>.feature
155119
Test: `@id:<hex>` — <description>
156120
Phase: RED | GREEN | REFACTOR
157121

158-
## Self-Declaration
159-
As a software-engineer I declare this code follows YAGNI-1 ... (full checklist in implementation/SKILL.md)
160-
161122
## Progress
162123
- [x] `@id:<hex>`: <description>
163124
- [~] `@id:<hex>`: <description> ← in progress (see Cycle State)
@@ -199,5 +160,3 @@ Run `gen-todo` at session start (after reading TODO.md) and at session end (befo
199160
5. The "Next" line must be actionable enough that a fresh AI can execute it without asking questions
200161
6. During Step 3, always update `## Cycle State` when transitioning between RED/GREEN/REFACTOR phases
201162
7. When a step completes, update TODO.md and commit **before** any further work
202-
8. During Step 3, write the `## Self-Declaration` block into TODO.md after all quality gates pass — every claim must have AGREE/DISAGREE with `file:line` evidence
203-
9. During Step 1 Stage 2 Step B (criteria), write the `## Self-Declaration` block into TODO.md before the criteria commit — every DISAGREE is a hard blocker that must be resolved before committing

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Use `@software-engineer /skill git-release` for the full release process. When r
230230

231231
Every session: load `skill session-workflow`. Read `TODO.md` first, update it at the end.
232232

233-
`TODO.md` is a session bookmark — not a project journal. See `docs/workflow.md` for the full structure including the Cycle State and Self-Declaration blocks used during Step 3.
233+
`TODO.md` is a session bookmark — not a project journal. See `docs/workflow.md` for the full structure including the Cycle State block used during Step 3.
234234

235235
## Setup
236236

docs/workflow.md

Lines changed: 11 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,6 @@ Each step has a designated agent and a specific deliverable. No step is skipped.
213213
│ │ │ Load skill refactor — follow its protocol │ │ │
214214
│ │ │ uv run task test-fast after each individual change │ │ │
215215
│ │ │ EXIT: test-fast passes; no smells remain │ │ │
216-
│ │ ├───────────────────────────────────────────────────────┤ │ │
217-
│ │ │ SELF-DECLARE │ │ │
218-
│ │ │ Fill Self-Declaration block in TODO.md │ │ │
219-
│ │ │ AGREE/DISAGREE per principle with file:line │ │ │
220-
│ │ │ DISAGREE requires inline justification │ │ │
221216
│ │ └───────────────────────────────────────────────────────┘ │ │
222217
│ │ │ │
223218
│ │ Mark @id completed in TODO.md │ │
@@ -231,38 +226,14 @@ Each step has a designated agent and a specific deliverable. No step is skipped.
231226
│ uv run task test (coverage must be 100%) │
232227
│ timeout 10s uv run task run │
233228
│ coverage < 100%: add test in tests/unit/ for uncovered branch │
234-
│ (do NOT add @id tests for coverage — @id tests are AC only)
235-
│ All must pass before Self-Declaration
229+
│ (do NOT add @id tests for coverage — @id tests are AC only) │
230+
│ All must pass before handing off
236231
│ │
237232
│ SELF-DECLARATION (once, after all quality gates pass) │
238-
│ As a software-engineer I declare: │
239-
│ * YAGNI: no code without a failing test — AGREE/DISAGREE | file:line │
240-
│ * YAGNI: no speculative abstractions — AGREE/DISAGREE | file:line │
241-
│ * KISS: simplest solution that passes — AGREE/DISAGREE | file:line │
242-
│ * KISS: no premature optimization — AGREE/DISAGREE | file:line │
243-
│ * DRY: no duplication — AGREE/DISAGREE | file:line │
244-
│ * DRY: no redundant comments — AGREE/DISAGREE | file:line │
245-
│ * SOLID-S: one reason to change per class — AGREE/DISAGREE | file:line│
246-
│ * SOLID-O: open for extension, closed for modification │
247-
│ — AGREE/DISAGREE | file:line │
248-
│ * SOLID-L: subtypes substitutable — AGREE/DISAGREE | file:line │
249-
│ * SOLID-I: no forced unused deps — AGREE/DISAGREE | file:line │
250-
│ * SOLID-D: depend on abstractions, not concretions │
251-
│ — AGREE/DISAGREE | file:line │
252-
│ * OC-1: one level of indentation per method — AGREE/DISAGREE | file:line│
253-
│ * OC-2: no else after return — AGREE/DISAGREE | file:line │
254-
│ * OC-3: primitive types wrapped — AGREE/DISAGREE | file:line │
255-
│ * OC-4: first-class collections — AGREE/DISAGREE | file:line │
256-
│ * OC-5: one dot per line — AGREE/DISAGREE | file:line │
257-
│ * OC-6: no abbreviations — AGREE/DISAGREE | file:line │
258-
│ * OC-7: ≤20 lines per function — AGREE/DISAGREE | file:line │
259-
│ * OC-8: ≤2 instance variables per class (behavioural classes only; dataclasses, Pydantic models, value objects, and TypedDicts are exempt) — AGREE/DISAGREE | file:line │
260-
│ * OC-9: no getters/setters — AGREE/DISAGREE | file:line │
261-
│ * Patterns: no creational smell — AGREE/DISAGREE | file:line │
262-
│ * Patterns: no structural smell — AGREE/DISAGREE | file:line │
263-
│ * Patterns: no behavioral smell — AGREE/DISAGREE | file:line │
264-
│ * Semantic: tests operate at same abstraction as AC │
265-
│ — AGREE/DISAGREE | file:line │
233+
│ Communicate verbally to reviewer: │
234+
│ * YAGNI, KISS, DRY, SOLID, OC checklist — AGREE/DISAGREE │
235+
│ with file:line evidence for each claim │
236+
│ * DISAGREE requires inline justification │
266237
│ │
267238
│ → Hand off to Step 4 (Verify) │
268239
└─────────────────────────────────────────────────────────────────────┘
@@ -275,7 +246,7 @@ Each step has a designated agent and a specific deliverable. No step is skipped.
275246
│ │
276247
│ 4a. READ │
277248
│ in-progress .feature file (Rules + Examples + @id) │
278-
│ Self-Declaration from software-engineer
249+
│ Self-Declaration communicated verbally by software-engineer │
279250
│ │
280251
│ 4b. pyproject.toml GATE │
281252
│ git diff main -- pyproject.toml │
@@ -308,8 +279,8 @@ Each step has a designated agent and a specific deliverable. No step is skipped.
308279
│ [ ] Docstrings explain why, not what │
309280
│ │
310281
│ 4g. SELF-DECLARATION AUDIT │
311-
│ For every YES claim: find the file:line — does it hold?
312-
│ For every NO claim: is the deviation justified?
282+
│ For every AGREE claim: find the file:line — does it hold? │
283+
│ For every DISAGREE claim: is the deviation justified? │
313284
│ Undeclared violations → REJECT │
314285
│ │
315286
│ 4h. INTERACTIVE (if any doubt remains) │
@@ -436,34 +407,7 @@ Source: docs/features/in-progress/<name>.feature
436407

437408
## Cycle State
438409
Test: @id:<hex> — <description>
439-
Phase: RED | GREEN | REFACTOR | SELF-DECLARE
440-
441-
## Self-Declaration
442-
As a software-engineer I declare:
443-
* YAGNI: no code without a failing test — AGREE/DISAGREE | file:line
444-
* YAGNI: no speculative abstractions — AGREE/DISAGREE | file:line
445-
* KISS: simplest solution that passes — AGREE/DISAGREE | file:line
446-
* KISS: no premature optimization — AGREE/DISAGREE | file:line
447-
* DRY: no duplication — AGREE/DISAGREE | file:line
448-
* DRY: no redundant comments — AGREE/DISAGREE | file:line
449-
* SOLID-S: one reason to change per class — AGREE/DISAGREE | file:line
450-
* SOLID-O: open for extension, closed for modification — AGREE/DISAGREE | file:line
451-
* SOLID-L: subtypes substitutable — AGREE/DISAGREE | file:line
452-
* SOLID-I: no forced unused deps — AGREE/DISAGREE | file:line
453-
* SOLID-D: depend on abstractions, not concretions — AGREE/DISAGREE | file:line
454-
* OC-1: one level of indentation per method — AGREE/DISAGREE | deepest: file:line
455-
* OC-2: no else after return — AGREE/DISAGREE | file:line
456-
* OC-3: primitive types wrapped — AGREE/DISAGREE | file:line
457-
* OC-4: first-class collections — AGREE/DISAGREE | file:line
458-
* OC-5: one dot per line — AGREE/DISAGREE | file:line
459-
* OC-6: no abbreviations — AGREE/DISAGREE | file:line
460-
* OC-7: ≤20 lines per function, ≤50 per class — AGREE/DISAGREE | longest: file:line
461-
* OC-8: ≤2 instance variables per class (behavioural classes only; dataclasses, Pydantic models, value objects, and TypedDicts are exempt) — AGREE/DISAGREE | file:line
462-
* OC-9: no getters/setters — AGREE/DISAGREE | file:line
463-
* Patterns: no creational smell — AGREE/DISAGREE | file:line
464-
* Patterns: no structural smell — AGREE/DISAGREE | file:line
465-
* Patterns: no behavioral smell — AGREE/DISAGREE | file:line
466-
* Semantic: tests operate at same abstraction as AC — AGREE/DISAGREE | file:line
410+
Phase: RED | GREEN | REFACTOR
467411

468412
## Progress
469413
- [x] @id:<hex>: <done>
@@ -474,7 +418,7 @@ As a software-engineer I declare:
474418
<one actionable sentence>
475419
```
476420

477-
`## Cycle State` is updated at every phase transition. `## Self-Declaration` is written once after all quality gates pass in Step 3. Both sections are present only during Step 3; omit when in other steps.
421+
`## Cycle State` is updated at every phase transition. This section is present only during Step 3; omit when in other steps.
478422

479423
---
480424

0 commit comments

Comments
 (0)