Skip to content

Commit d7dd2ea

Browse files
authored
feat(workflow): add PO and reviewer self-declaration protocol (#71)
- scope/SKILL.md: add mandatory PO Self-Declaration block (11 claims covering INVEST I/V/S/T, observable outcomes, no impl details, entity coverage, distinct examples, unique IDs, pre-mortem, scope boundary) after Stage 2 Step B review checklist; every DISAGREE is a hard blocker before commit - session-workflow/SKILL.md: add Step 1 Stage 2 Criteria Self-Declaration TODO format section with full template; add Rule 9 enforcing declaration before criteria commit - product-owner.md: note Self-Declaration requirement in Step 1 routing table - verify/SKILL.md: add Reviewer Stance Declaration section (5 claims: adversarial mindset, manual trace, boundary check, semantic read, independence) to report template between SE Self-Declaration Audit and Decision; DISAGREE allowed with explanation, unexplained DISAGREE = REJECTED
1 parent 2b3dca3 commit d7dd2ea

File tree

4 files changed

+72
-1
lines changed

4 files changed

+72
-1
lines changed

.opencode/agents/product-owner.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Load `skill session-workflow` first — it reads TODO.md, orients you to the cur
2525

2626
| Step | Action |
2727
|---|---|
28-
| **Step 1 — SCOPE** | Load `skill scope` — contains Stage 1 (Discovery sessions) and Stage 2 (Stories + Criteria) |
28+
| **Step 1 — SCOPE** | Load `skill scope` — contains Stage 1 (Discovery sessions) and Stage 2 (Stories + Criteria). At the end of Stage 2 Step B (criteria), write the `## Self-Declaration` block into `TODO.md` before committing — every DISAGREE is a hard blocker. |
2929
| **Step 5 — ACCEPT** | See acceptance protocol below |
3030

3131
## Ownership Rules

.opencode/skills/scope/SKILL.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,26 @@ All Rules must have their pre-mortems completed before any Examples are written.
279279
- [ ] Each Example is observably distinct from every other
280280
- [ ] No single feature file spans multiple unrelated concerns
281281

282+
**Self-Declaration (mandatory before criteria commit)**
283+
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+
```
301+
282302
Commit: `feat(criteria): write acceptance criteria for <name>`
283303

284304
**After this commit, `Example:` blocks are frozen.** Any change requires:

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

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,40 @@ 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+
107141
## Step 3 (TDD Loop) Cycle-Aware TODO Format
108142

109143
During Step 3 (TDD Loop), TODO.md **must** include a `## Cycle State` block to track Red-Green-Refactor progress.
@@ -166,3 +200,4 @@ Run `gen-todo` at session start (after reading TODO.md) and at session end (befo
166200
6. During Step 3, always update `## Cycle State` when transitioning between RED/GREEN/REFACTOR phases
167201
7. When a step completes, update TODO.md and commit **before** any further work
168202
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

.opencode/skills/verify/SKILL.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ This skill guides the reviewer through Step 4: independent verification that the
2121

2222
After the software-engineer signals Step 3 is complete and all self-verification checks pass. Do not start verification until the software-engineer has committed all work and written the Self-Declaration.
2323

24+
The reviewer produces one written report (see template below) that includes: all gate results, the SE Self-Declaration Audit, the **Reviewer Stance Declaration**, and the final APPROVED/REJECTED verdict.
25+
2426
## Step-by-Step
2527

2628
### 1. Read the Feature Docs
@@ -216,6 +218,20 @@ Undeclared violations → REJECT.
216218
| Patterns Behavioral | AGREE/DISAGREE | PASS/FAIL | |
217219
| Semantic | AGREE/DISAGREE | PASS/FAIL | |
218220

221+
### Reviewer Stance Declaration
222+
223+
Write this block **before** the Decision. Every `DISAGREE` must include an inline explanation. A `DISAGREE` with no explanation auto-forces `REJECTED`.
224+
225+
```markdown
226+
## Reviewer Stance Declaration
227+
As a reviewer I declare:
228+
* Adversarial: I actively tried to find a failure mode, not just confirm passing — AGREE/DISAGREE | note:
229+
* Manual trace: I traced at least one execution path manually beyond automated output — AGREE/DISAGREE | path:
230+
* Boundary check: I checked the boundary conditions and edge cases of every Rule — AGREE/DISAGREE | gaps:
231+
* Semantic read: I read each test against its AC and confirmed it tests the right observable behavior — AGREE/DISAGREE | mismatches:
232+
* Independence: my verdict was not influenced by how much effort has already been spent — AGREE/DISAGREE
233+
```
234+
219235
### Decision
220236
**APPROVED** — all gates passed, no undeclared violations
221237
OR

0 commit comments

Comments
 (0)