dev-playbooks 1.2.8 → 1.4.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/package.json +1 -1
- package/skills/_shared/references/spec-structure-template.md +161 -0
- package/skills/devbooks-archiver/SKILL.md +26 -0
- package/skills/devbooks-code-review/references/code-review-prompt.md +10 -0
- package/skills/devbooks-coder/SKILL.md +91 -31
- package/skills/devbooks-design-doc/references/design-doc-prompt.md +12 -2
- package/skills/devbooks-impact-analysis/references/impact-analysis-prompt.md +17 -0
- package/skills/devbooks-spec-contract/references/spec-change-prompt.md +11 -0
- package/skills/devbooks-test-owner/SKILL.md +97 -35
- package/skills/devbooks-test-owner/references/test-code-prompt.md +14 -0
package/package.json
CHANGED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Spec Structure Template
|
|
2
|
+
|
|
3
|
+
> This template defines the standard structure for Spec truth files, ensuring Specs are verifiable, traceable, and can drive test generation.
|
|
4
|
+
|
|
5
|
+
## File Location
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
<truth-root>/specs/<capability>/spec.md
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Standard Structure
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
---
|
|
15
|
+
# Metadata (required)
|
|
16
|
+
capability: <capability-name>
|
|
17
|
+
owner: @<owner>
|
|
18
|
+
last_verified: YYYY-MM-DD
|
|
19
|
+
last_referenced_by: <last-referencing-change-id>
|
|
20
|
+
health: active | stale | deprecated
|
|
21
|
+
freshness_check: monthly | quarterly | on-change
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# <Capability Name> Specification
|
|
25
|
+
|
|
26
|
+
## Glossary
|
|
27
|
+
|
|
28
|
+
> Capability-specific terms, consistent with `<truth-root>/_meta/glossary.md`.
|
|
29
|
+
|
|
30
|
+
| Term | Definition | Constraints |
|
|
31
|
+
|------|------------|-------------|
|
|
32
|
+
| Order | Order entity | Must have at least one OrderItem |
|
|
33
|
+
| OrderItem | Order line item | qty > 0, price >= 0 |
|
|
34
|
+
|
|
35
|
+
## Invariants
|
|
36
|
+
|
|
37
|
+
> Constraints that must always hold; violations are system bugs.
|
|
38
|
+
|
|
39
|
+
| ID | Description | Verification |
|
|
40
|
+
|----|-------------|--------------|
|
|
41
|
+
| INV-001 | Order total = SUM(item.price * item.qty) | A (automated test) |
|
|
42
|
+
| INV-002 | Inventory quantity >= 0 | A (automated test) |
|
|
43
|
+
| INV-003 | Shipped orders cannot be cancelled | A (state machine test) |
|
|
44
|
+
|
|
45
|
+
## Contracts
|
|
46
|
+
|
|
47
|
+
### Preconditions
|
|
48
|
+
|
|
49
|
+
| ID | Operation | Condition | Violation Behavior |
|
|
50
|
+
|----|-----------|-----------|-------------------|
|
|
51
|
+
| PRE-001 | Create order | user.isAuthenticated | Return 401 |
|
|
52
|
+
| PRE-002 | Pay order | order.status == 'pending' | Return 400 |
|
|
53
|
+
|
|
54
|
+
### Postconditions
|
|
55
|
+
|
|
56
|
+
| ID | Operation | Guarantee |
|
|
57
|
+
|----|-----------|-----------|
|
|
58
|
+
| POST-001 | Create order success | Generate unique order.id |
|
|
59
|
+
| POST-002 | Payment success | inventory.decreased(qty) |
|
|
60
|
+
|
|
61
|
+
## State Machine
|
|
62
|
+
|
|
63
|
+
> If this capability involves state transitions, a state machine must be defined.
|
|
64
|
+
|
|
65
|
+
### State Set
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
States: {Created, Paid, Shipped, Done, Cancelled}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Transition Rules
|
|
72
|
+
|
|
73
|
+
| Current State | Action | Target State | Condition |
|
|
74
|
+
|---------------|--------|--------------|-----------|
|
|
75
|
+
| Created | pay | Paid | payment.success |
|
|
76
|
+
| Created | cancel | Cancelled | - |
|
|
77
|
+
| Paid | ship | Shipped | inventory.reserved |
|
|
78
|
+
| Paid | refund | Cancelled | - |
|
|
79
|
+
| Shipped | deliver | Done | - |
|
|
80
|
+
|
|
81
|
+
### Forbidden Transitions
|
|
82
|
+
|
|
83
|
+
| Current State | Action | Reason |
|
|
84
|
+
|---------------|--------|--------|
|
|
85
|
+
| Shipped | cancel | Violates INV-003 |
|
|
86
|
+
| Done | * | Terminal state, cannot exit |
|
|
87
|
+
| Cancelled | * | Terminal state, cannot exit |
|
|
88
|
+
|
|
89
|
+
## Requirements
|
|
90
|
+
|
|
91
|
+
### REQ-001: <Requirement Title>
|
|
92
|
+
|
|
93
|
+
**Description**: <one-sentence description>
|
|
94
|
+
|
|
95
|
+
**SHALL/SHOULD/MAY**:
|
|
96
|
+
- The system **SHALL** ...
|
|
97
|
+
- The system **SHOULD** ...
|
|
98
|
+
|
|
99
|
+
**Trace**: AC-001 (from design.md)
|
|
100
|
+
|
|
101
|
+
#### Scenario: <scenario-name>
|
|
102
|
+
|
|
103
|
+
- **GIVEN** user is logged in and cart is non-empty
|
|
104
|
+
- **WHEN** user clicks "Submit Order"
|
|
105
|
+
- **THEN** system creates order and returns order ID
|
|
106
|
+
|
|
107
|
+
**Data Instances** (boundary conditions):
|
|
108
|
+
|
|
109
|
+
| Input | Expected Output | Notes |
|
|
110
|
+
|-------|-----------------|-------|
|
|
111
|
+
| qty=1, price=100 | total=100 | Normal value |
|
|
112
|
+
| qty=0 | Reject | Boundary - zero |
|
|
113
|
+
| qty=-1 | Reject | Boundary - negative |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Change History
|
|
118
|
+
|
|
119
|
+
| Date | Change Package | Changes |
|
|
120
|
+
|------|----------------|---------|
|
|
121
|
+
| 2024-01-16 | 20240116-1030-add-cancel | Add cancel order scenario |
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Usage Guide
|
|
125
|
+
|
|
126
|
+
### 1. Who Writes Specs?
|
|
127
|
+
|
|
128
|
+
- **spec-contract skill**: Creates/updates spec deltas
|
|
129
|
+
- **archiver skill**: Merges spec deltas into truth-root
|
|
130
|
+
|
|
131
|
+
### 2. Who Reads Specs?
|
|
132
|
+
|
|
133
|
+
| Skill | Reading Purpose |
|
|
134
|
+
|-------|-----------------|
|
|
135
|
+
| design-doc | Check if design conflicts with existing Specs, reference REQ-xxx |
|
|
136
|
+
| test-owner | Generate tests from contracts/state machines |
|
|
137
|
+
| impact-analysis | Identify affected Specs |
|
|
138
|
+
| code-review | Check terminology consistency |
|
|
139
|
+
| archiver | Update metadata, build reference chain |
|
|
140
|
+
|
|
141
|
+
### 3. Test Generation Mapping
|
|
142
|
+
|
|
143
|
+
| Spec Element | Generated Test Type |
|
|
144
|
+
|--------------|---------------------|
|
|
145
|
+
| INV-xxx | Invariant tests |
|
|
146
|
+
| PRE-xxx | Precondition tests (satisfied + violated) |
|
|
147
|
+
| POST-xxx | Postcondition tests |
|
|
148
|
+
| State Transition | State transition tests |
|
|
149
|
+
| Forbidden Transition | Forbidden transition tests |
|
|
150
|
+
| Data Instance Table | Parameterized test cases |
|
|
151
|
+
|
|
152
|
+
### 4. Health Detection
|
|
153
|
+
|
|
154
|
+
The `health` field in Spec files is automatically detected by entropy-monitor:
|
|
155
|
+
|
|
156
|
+
| Condition | health Status |
|
|
157
|
+
|-----------|---------------|
|
|
158
|
+
| last_verified < 90 days | `active` |
|
|
159
|
+
| last_verified > 90 days | `stale` (needs review) |
|
|
160
|
+
| Explicitly marked deprecated | `deprecated` |
|
|
161
|
+
| last_referenced_by empty for >6 months | Recommend deletion |
|
|
@@ -120,6 +120,32 @@ Merge change package spec artifacts into `<truth-root>`:
|
|
|
120
120
|
| `<change-root>/<change-id>/specs/**` | `<truth-root>/specs/**` | Incremental merge |
|
|
121
121
|
| `<change-root>/<change-id>/contracts/**` | `<truth-root>/contracts/**` | Versioned merge |
|
|
122
122
|
|
|
123
|
+
**Spec Metadata Update** (must execute during merge):
|
|
124
|
+
|
|
125
|
+
When merging specs into truth-root, the following metadata must be updated:
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
# Update in each merged/referenced spec file header
|
|
129
|
+
---
|
|
130
|
+
last_referenced_by: <change-id> # Last change package referencing this spec
|
|
131
|
+
last_verified: <archive-date> # Last verification date
|
|
132
|
+
health: active # Health status: active | stale | deprecated
|
|
133
|
+
---
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Metadata Update Rules**:
|
|
137
|
+
|
|
138
|
+
| Scenario | Update Behavior |
|
|
139
|
+
|----------|-----------------|
|
|
140
|
+
| New Spec | Create complete metadata header |
|
|
141
|
+
| Modify existing Spec | Update `last_referenced_by` and `last_verified` |
|
|
142
|
+
| Spec referenced by design doc but not modified | Update only `last_referenced_by` |
|
|
143
|
+
| Marked as deprecated | Set `health: deprecated` |
|
|
144
|
+
|
|
145
|
+
**Building Reference Traceability Chain**:
|
|
146
|
+
|
|
147
|
+
During archiving, archiver automatically scans the "Affected Specs" declared in design.md and updates the `last_referenced_by` field for these Specs, even if they weren't directly modified. This establishes a reverse traceability chain from Specs to change packages.
|
|
148
|
+
|
|
123
149
|
### Step 4: Architecture Merge
|
|
124
150
|
|
|
125
151
|
> **Design Decision**: C4 architecture changes are recorded in design.md's Architecture Impact section and merged into truth by Archiver during archiving.
|
|
@@ -13,6 +13,10 @@ Inputs (provided by me):
|
|
|
13
13
|
- Glossary / ubiquitous language (if present): `<truth-root>/_meta/glossary.md`
|
|
14
14
|
- High-ROI pitfalls list (if present): `<truth-root>/engineering/pitfalls.md`
|
|
15
15
|
|
|
16
|
+
**Required Spec Truth Reading** (mandatory before review):
|
|
17
|
+
- `<truth-root>/specs/**`: existing spec files
|
|
18
|
+
- Purpose: verify code naming/structure aligns with terminology and contracts defined in Specs
|
|
19
|
+
|
|
16
20
|
Hard constraints (must follow):
|
|
17
21
|
1) Output only review findings and concrete change suggestions; do not directly modify `tests/` or design documents.
|
|
18
22
|
2) Do not debate business correctness (tests/specs decide that); focus only on maintainability and engineering quality.
|
|
@@ -64,6 +68,12 @@ Review focus (must cover):
|
|
|
64
68
|
- Is the same concept named inconsistently across modules (e.g., User/Account/Member mixed)?
|
|
65
69
|
- Is Entity vs Value Object modeled correctly? (Entity has an ID; VO has no ID and is immutable.)
|
|
66
70
|
|
|
71
|
+
**Spec Truth Terminology Alignment** (must check):
|
|
72
|
+
- Do code names match terminology defined in `<truth-root>/specs/`?
|
|
73
|
+
- Do state names/enum values match state machine definitions in Specs?
|
|
74
|
+
- Do method names reflect actions/transitions in Specs? (e.g., `cancel()` corresponds to `order --[cancel]--> cancelled`)
|
|
75
|
+
- If naming inconsistencies are found, mark as "terminology drift risk" and recommend unification
|
|
76
|
+
|
|
67
77
|
---
|
|
68
78
|
|
|
69
79
|
## Invariant Protection (must check)
|
|
@@ -14,16 +14,27 @@ allowed-tools:
|
|
|
14
14
|
|
|
15
15
|
## Workflow Position Awareness
|
|
16
16
|
|
|
17
|
-
> **Core Principle**: Coder executes after Test Owner Phase 1
|
|
17
|
+
> **Core Principle**: Coder executes after Test Owner Phase 1, achieving mental clarity through **mode labels** (not session isolation).
|
|
18
18
|
|
|
19
19
|
### My Position in the Overall Workflow
|
|
20
20
|
|
|
21
21
|
```
|
|
22
|
-
proposal → design →
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
proposal → design → [TEST-OWNER] → [CODER] → [TEST-OWNER] → code-review → archive
|
|
23
|
+
↓ ↓
|
|
24
|
+
Implement+fast track Evidence audit
|
|
25
|
+
(@smoke/@critical) (no @full rerun)
|
|
25
26
|
```
|
|
26
27
|
|
|
28
|
+
### AI Era Solo Development Optimization
|
|
29
|
+
|
|
30
|
+
> **Important Change**: This protocol is optimized for AI programming + solo development scenarios, **removing the mandatory "separate session" requirement**.
|
|
31
|
+
|
|
32
|
+
| Old Design | New Design | Reason |
|
|
33
|
+
|------------|------------|--------|
|
|
34
|
+
| Test Owner and Coder must use separate sessions | Same session, switch with `[TEST-OWNER]` / `[CODER]` mode labels | Reduce context rebuilding cost |
|
|
35
|
+
| Coder runs full tests and waits | Coder runs fast track (`@smoke`/`@critical`), `@full` triggered async | Fast iteration |
|
|
36
|
+
| Completion goes directly to Test Owner | Completion status is `Implementation Done`, wait for @full | Async doesn't block, archive is sync |
|
|
37
|
+
|
|
27
38
|
### Coder's Responsibility Boundaries
|
|
28
39
|
|
|
29
40
|
| Allowed | Prohibited |
|
|
@@ -31,18 +42,60 @@ proposal → design → test-owner(phase1) → [Coder] → test-owner(phase2)
|
|
|
31
42
|
| Modify `src/**` code | ❌ Modify `tests/**` |
|
|
32
43
|
| Check off `tasks.md` items | ❌ Modify `verification.md` |
|
|
33
44
|
| Record deviations to `deviation-log.md` | ❌ Check off AC coverage matrix |
|
|
34
|
-
| Run tests
|
|
45
|
+
| Run fast track tests (`@smoke`/`@critical`) | ❌ Set verification.md Status to Verified/Done |
|
|
46
|
+
| Trigger `@full` tests (CI/background) | ❌ Wait for @full completion (can start next change) |
|
|
35
47
|
|
|
36
48
|
### Flow After Coder Completes
|
|
37
49
|
|
|
38
|
-
1. **
|
|
39
|
-
2. **
|
|
40
|
-
3. **
|
|
41
|
-
4. **
|
|
42
|
-
|
|
43
|
-
- Test Owner
|
|
50
|
+
1. **Fast track tests green**: `@smoke` + `@critical` pass
|
|
51
|
+
2. **Trigger @full**: Commit code, CI starts running @full tests async
|
|
52
|
+
3. **Status change**: Set change status to `Implementation Done`
|
|
53
|
+
4. **Can start next change** (not blocked)
|
|
54
|
+
5. **Wait for @full results**:
|
|
55
|
+
- @full passes → Test Owner enters Phase 2 to audit evidence
|
|
56
|
+
- @full fails → Coder fixes
|
|
57
|
+
|
|
58
|
+
**Key Reminders**:
|
|
59
|
+
- After Coder completes, status is `Implementation Done`, **not directly to Code Review**
|
|
60
|
+
- Dev iteration is async (can start next change), but archive is sync (must wait for @full to pass)
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Test Layering and Run Strategy (Critical!)
|
|
65
|
+
|
|
66
|
+
> **Core Principle**: Coder only runs fast track tests, @full tests are triggered async, not blocking dev iteration.
|
|
67
|
+
|
|
68
|
+
### Test Layering Labels
|
|
69
|
+
|
|
70
|
+
| Label | Purpose | When Coder Runs | Expected Time |
|
|
71
|
+
|-------|---------|-----------------|---------------|
|
|
72
|
+
| `@smoke` | Fast feedback, core paths | After each code change | Seconds |
|
|
73
|
+
| `@critical` | Key functionality verification | Before commit | Minutes |
|
|
74
|
+
| `@full` | Complete acceptance tests | **Don't run**, trigger CI async | Can be slow |
|
|
44
75
|
|
|
45
|
-
|
|
76
|
+
### Coder's Test Run Strategy
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# During development: frequently run @smoke
|
|
80
|
+
npm test -- --grep "@smoke"
|
|
81
|
+
|
|
82
|
+
# Before commit: run @critical
|
|
83
|
+
npm test -- --grep "@smoke|@critical"
|
|
84
|
+
|
|
85
|
+
# After commit: CI automatically runs @full (Coder doesn't wait)
|
|
86
|
+
git push # triggers CI
|
|
87
|
+
# → Coder can start next task
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Async vs Sync Boundary
|
|
91
|
+
|
|
92
|
+
| Action | Blocking/Async | Description |
|
|
93
|
+
|--------|----------------|-------------|
|
|
94
|
+
| `@smoke` tests | Sync | Run immediately after each change |
|
|
95
|
+
| `@critical` tests | Sync | Must pass before commit |
|
|
96
|
+
| `@full` tests | **Async** | CI runs in background, doesn't block Coder |
|
|
97
|
+
| Start next change | **Not blocked** | Coder can start immediately |
|
|
98
|
+
| Archive | **Blocked** | Must wait for @full to pass |
|
|
46
99
|
|
|
47
100
|
---
|
|
48
101
|
|
|
@@ -319,26 +372,29 @@ During implementation, you **must immediately** write to `deviation-log.md` in t
|
|
|
319
372
|
|
|
320
373
|
| Code | Status | Determination Criteria | Next Step |
|
|
321
374
|
|:----:|--------|------------------------|-----------|
|
|
322
|
-
| ✅ |
|
|
323
|
-
| ⚠️ |
|
|
324
|
-
| 🔄 | HANDOFF | Found test issues needing modification | `
|
|
375
|
+
| ✅ | IMPLEMENTATION_DONE | Fast track tests green, @full triggered, no deviations | Switch to `[TEST-OWNER]` wait for @full |
|
|
376
|
+
| ⚠️ | IMPLEMENTATION_DONE_WITH_DEVIATION | Fast track green, deviation-log has pending records | `devbooks-design-backport` |
|
|
377
|
+
| 🔄 | HANDOFF | Found test issues needing modification | Switch to `[TEST-OWNER]` mode to fix tests |
|
|
325
378
|
| ❌ | BLOCKED | Needs external input/decision | Record breakpoint, wait for user |
|
|
326
|
-
| 💥 | FAILED |
|
|
379
|
+
| 💥 | FAILED | Fast track tests not passing | Fix and retry |
|
|
327
380
|
|
|
328
381
|
### Status Determination Flow
|
|
329
382
|
|
|
330
383
|
```
|
|
331
384
|
1. Check if deviation-log.md has "| ❌" records
|
|
332
|
-
→ Yes:
|
|
385
|
+
→ Yes: IMPLEMENTATION_DONE_WITH_DEVIATION
|
|
333
386
|
|
|
334
387
|
2. Check if tests/ modification needed
|
|
335
|
-
→ Yes: HANDOFF to
|
|
388
|
+
→ Yes: HANDOFF to [TEST-OWNER] mode
|
|
389
|
+
|
|
390
|
+
3. Check if fast track tests (@smoke + @critical) all pass
|
|
391
|
+
→ No: FAILED
|
|
336
392
|
|
|
337
|
-
|
|
338
|
-
→ No: BLOCKED or
|
|
393
|
+
4. Check if tasks.md is fully completed
|
|
394
|
+
→ No: BLOCKED or continue implementation
|
|
339
395
|
|
|
340
|
-
|
|
341
|
-
→
|
|
396
|
+
5. All checks passed, trigger @full
|
|
397
|
+
→ IMPLEMENTATION_DONE
|
|
342
398
|
```
|
|
343
399
|
|
|
344
400
|
### Routing Output Template (Required)
|
|
@@ -348,37 +404,41 @@ After completing coder, you **must** output in this format:
|
|
|
348
404
|
```markdown
|
|
349
405
|
## Completion Status
|
|
350
406
|
|
|
351
|
-
**Status**: ✅
|
|
407
|
+
**Status**: ✅ IMPLEMENTATION_DONE / ⚠️ ... / 🔄 HANDOFF / ❌ BLOCKED / 💥 FAILED
|
|
352
408
|
|
|
353
409
|
**Task Progress**: X/Y completed
|
|
354
410
|
|
|
411
|
+
**Fast Track Tests**: @smoke ✅ / @critical ✅
|
|
412
|
+
|
|
413
|
+
**@full Tests**: Triggered (CI running async)
|
|
414
|
+
|
|
355
415
|
**Deviation Records**: Has N pending / None
|
|
356
416
|
|
|
357
417
|
## Next Step
|
|
358
418
|
|
|
359
|
-
**Recommended**: `devbooks-xxx skill`
|
|
419
|
+
**Recommended**: Switch to `[TEST-OWNER]` mode wait for @full / `devbooks-xxx skill`
|
|
360
420
|
|
|
361
421
|
**Reason**: [specific reason]
|
|
362
422
|
|
|
363
|
-
|
|
364
|
-
Run devbooks-xxx skill for change <change-id>
|
|
423
|
+
**Note**: Can start next change, no need to wait for @full completion
|
|
365
424
|
```
|
|
366
425
|
|
|
367
426
|
### Specific Routing Rules
|
|
368
427
|
|
|
369
428
|
| My Status | Next Step | Reason |
|
|
370
429
|
|-----------|-----------|--------|
|
|
371
|
-
|
|
|
372
|
-
|
|
|
373
|
-
| HANDOFF (test issue) | `
|
|
430
|
+
| IMPLEMENTATION_DONE | Switch to `[TEST-OWNER]` mode (wait for @full) | Fast track green, wait for @full to pass then audit evidence |
|
|
431
|
+
| IMPLEMENTATION_DONE_WITH_DEVIATION | `devbooks-design-backport` | Backport design first |
|
|
432
|
+
| HANDOFF (test issue) | Switch to `[TEST-OWNER]` mode | Coder cannot modify tests |
|
|
374
433
|
| BLOCKED | Wait for user | Record breakpoint area |
|
|
375
434
|
| FAILED | Fix and retry | Analyze failure reason |
|
|
376
435
|
|
|
377
436
|
**Critical Constraints**:
|
|
378
437
|
- Coder **can never modify** `tests/**`
|
|
379
|
-
- If test issues found, must
|
|
438
|
+
- If test issues found, must switch to `[TEST-OWNER]` mode to handle
|
|
380
439
|
- If deviations exist, must design-backport first before continuing
|
|
381
|
-
- **Coder must
|
|
440
|
+
- **Coder completion status is `Implementation Done`, must wait for @full to pass before entering Test Owner Phase 2**
|
|
441
|
+
- **Mode switching replaces session isolation**: Use `[TEST-OWNER]` / `[CODER]` labels to switch modes
|
|
382
442
|
|
|
383
443
|
---
|
|
384
444
|
|
|
@@ -18,6 +18,10 @@ Inputs (provided by me):
|
|
|
18
18
|
- Chat history
|
|
19
19
|
- Glossary / ubiquitous language (if present): `<truth-root>/_meta/glossary.md`
|
|
20
20
|
|
|
21
|
+
**Required Spec Truth Reading** (mandatory before designing):
|
|
22
|
+
- `<truth-root>/specs/**`: existing spec files (REQ/Invariants/Contracts)
|
|
23
|
+
- Purpose: ensure design does not conflict with existing specs and explicitly references affected specs
|
|
24
|
+
|
|
21
25
|
Tasks:
|
|
22
26
|
1) Output a design doc (not an implementation plan, not code).
|
|
23
27
|
2) The doc must be concrete enough to drive acceptance and task decomposition: clear boundaries, contracts, red lines, and acceptance.
|
|
@@ -182,7 +186,13 @@ Limits:
|
|
|
182
186
|
|
|
183
187
|
Additional requirements (for traceability in large projects):
|
|
184
188
|
- Explicitly list affected capabilities/modules/external contracts (names and boundaries only; no implementation)
|
|
185
|
-
- If external interfaces/APIs/events/data structures are involved: specify versioning strategy in the
|
|
186
|
-
- If architecture boundaries change: add an optional **C4 Delta** subsection under
|
|
189
|
+
- If external interfaces/APIs/events/data structures are involved: specify versioning strategy in the "Core data and event contracts" section (`schema_version`, compatibility window, migration/replay principles)
|
|
190
|
+
- If architecture boundaries change: add an optional **C4 Delta** subsection under "Target architecture" describing what C1/C2/C3 elements were added/modified/removed (full maps are maintained by the C4 map maintainer)
|
|
191
|
+
|
|
192
|
+
**Spec Truth Reference Requirements** (core traceability):
|
|
193
|
+
- **Must declare affected existing Specs**: list spec files under `<truth-root>/specs/` impacted by this design
|
|
194
|
+
- **Must reference REQ/Invariant**: each constraint in the design must trace back to REQ-xxx or INV-xxx in Specs
|
|
195
|
+
- **Gap declaration**: if design cannot satisfy an existing REQ, explicitly declare it as a Gap with justification
|
|
196
|
+
- **Terminology consistency**: domain terms must match `<truth-root>/_meta/glossary.md`; new terms must be declared and proposed for glossary addition
|
|
187
197
|
|
|
188
198
|
Now output the Design Doc in Markdown. Do not output extra explanations.
|
|
@@ -17,6 +17,10 @@ Input materials (provided by me):
|
|
|
17
17
|
- Current truth source: `<truth-root>/`
|
|
18
18
|
- Codebase (read-only analysis)
|
|
19
19
|
|
|
20
|
+
**Required Spec Truth Reading** (mandatory before analysis):
|
|
21
|
+
- `<truth-root>/specs/**`: existing spec files
|
|
22
|
+
- Purpose: identify which existing Specs (REQ/Invariants/Contracts) are impacted by this change
|
|
23
|
+
|
|
20
24
|
Hard constraints (must follow):
|
|
21
25
|
- Impact analysis first, code later
|
|
22
26
|
- No "decorative/surface refactors" unless they directly reduce risk for this change
|
|
@@ -53,6 +57,19 @@ Output format (MECE):
|
|
|
53
57
|
- Are external system/API changes isolated by ACL? (External model changes must not leak into internal models)
|
|
54
58
|
- Are there direct calls to external APIs bypassing the adapter layer?
|
|
55
59
|
- If adding external dependency: suggested ACL interface definition
|
|
60
|
+
- **F. Affected Spec Truth** (required):
|
|
61
|
+
- List spec files under `<truth-root>/specs/` impacted by this change
|
|
62
|
+
- For each affected Spec, mark impact type:
|
|
63
|
+
- `[BREAK]`: breaks existing REQ/Invariant (needs Spec update or redesign)
|
|
64
|
+
- `[EXTEND]`: extends existing capability (needs new REQ/Scenario)
|
|
65
|
+
- `[DEPRECATE]`: deprecates existing capability (needs Spec marked deprecated)
|
|
66
|
+
- Output format:
|
|
67
|
+
```
|
|
68
|
+
Affected Specs:
|
|
69
|
+
- [EXTEND] specs/order/spec.md - add cancel order scenario
|
|
70
|
+
- [BREAK] specs/payment/spec.md - INV-002 "paid orders cannot be cancelled" needs modification
|
|
71
|
+
- [DEPRECATE] specs/legacy-checkout/spec.md - entire spec deprecated
|
|
72
|
+
```
|
|
56
73
|
4) Compatibility and Risks
|
|
57
74
|
- Breaking changes (explicitly mark if any)
|
|
58
75
|
- Migration/rollback paths
|
|
@@ -18,6 +18,10 @@ Inputs (provided by me):
|
|
|
18
18
|
- Project profile (if present; follow formatting conventions first): `<truth-root>/_meta/project-profile.md`
|
|
19
19
|
- Glossary / ubiquitous language (if present): `<truth-root>/_meta/glossary.md`
|
|
20
20
|
|
|
21
|
+
**Spec Truth Conflict Detection** (must complete before writing):
|
|
22
|
+
- **Must read existing Specs**: before writing spec delta, read all specs under `<truth-root>/specs/**`
|
|
23
|
+
- **Purpose**: detect conflicts between new spec delta and existing Specs
|
|
24
|
+
|
|
21
25
|
Hard constraints (must follow):
|
|
22
26
|
- Output a **spec delta**, not a design doc, not an implementation plan, not code
|
|
23
27
|
- Do not write implementation details (class names/function names/specific production file paths/library calls)
|
|
@@ -26,6 +30,13 @@ Hard constraints (must follow):
|
|
|
26
30
|
- Avoid duplicating capabilities: search/reuse/modify existing capability specs first; create a new capability only when necessary
|
|
27
31
|
- Ubiquitous language: if `<truth-root>/_meta/glossary.md` exists, you must use those terms; do not invent new terms
|
|
28
32
|
|
|
33
|
+
**Conceptual Integrity Guardian** (conflict detection rules):
|
|
34
|
+
- **Terminology conflict**: does the new spec use terminology inconsistent with existing specs? (e.g., `Order.status` vs `Order.state`)
|
|
35
|
+
- **Rule conflict**: do new spec rules contradict existing spec rules? (e.g., "paid orders can be cancelled" vs "paid orders cannot be cancelled")
|
|
36
|
+
- **Boundary conflict**: does the new spec's responsibility overlap with existing specs? (e.g., two specs both claim ownership of payment logic)
|
|
37
|
+
- **Invariant compatibility**: does the new spec violate Invariants declared in existing specs?
|
|
38
|
+
- **Conflict report**: if conflicts are detected, declare them at the top of the spec delta with resolution suggestions; archiving is forbidden until conflicts are resolved
|
|
39
|
+
|
|
29
40
|
Workshop (internal step; do not output separately):
|
|
30
41
|
- Before writing the spec, run a “virtual three-amigos workshop” (business/dev/test) and incorporate consensus + edge examples into Requirements/Scenarios; do not output workshop notes.
|
|
31
42
|
|
|
@@ -14,44 +14,98 @@ allowed-tools:
|
|
|
14
14
|
|
|
15
15
|
## Workflow Position Awareness
|
|
16
16
|
|
|
17
|
-
> **Core Principle**: Test Owner has **dual-phase responsibilities** in the overall workflow,
|
|
17
|
+
> **Core Principle**: Test Owner has **dual-phase responsibilities** in the overall workflow, achieving mental clarity through **mode labels** (not session isolation).
|
|
18
18
|
|
|
19
19
|
### My Position in the Overall Workflow
|
|
20
20
|
|
|
21
21
|
```
|
|
22
|
-
proposal → design → [
|
|
23
|
-
↓
|
|
24
|
-
Red baseline
|
|
22
|
+
proposal → design → [TEST-OWNER] → [CODER] → [TEST-OWNER] → code-review → archive
|
|
23
|
+
↓ ↓ ↓
|
|
24
|
+
Red baseline Implement Evidence audit
|
|
25
|
+
(incremental) (@smoke) (no @full rerun)
|
|
25
26
|
```
|
|
26
27
|
|
|
28
|
+
### AI Era Solo Development Optimization
|
|
29
|
+
|
|
30
|
+
> **Important Change**: This protocol is optimized for AI programming + solo development scenarios, **removing the mandatory "separate session" requirement**.
|
|
31
|
+
|
|
32
|
+
| Old Design | New Design | Reason |
|
|
33
|
+
|------------|------------|--------|
|
|
34
|
+
| Test Owner and Coder must use separate sessions | Same session, switch with `[TEST-OWNER]` / `[CODER]` mode labels | Reduce context rebuilding cost |
|
|
35
|
+
| Phase 2 reruns full tests | Phase 2 defaults to **evidence audit**, optional sampling rerun | Avoid slow test multiple runs |
|
|
36
|
+
| No test layering requirement | Mandatory test layering: `@smoke`/`@critical`/`@full` | Fast feedback loop |
|
|
37
|
+
|
|
27
38
|
### Test Owner's Dual-Phase Responsibilities
|
|
28
39
|
|
|
29
|
-
| Phase | Trigger | Core Responsibility | Output |
|
|
30
|
-
|
|
31
|
-
| **Phase 1: Red Baseline** | After design.md is complete | Write tests, produce failure evidence | verification.md (Status=Ready), Red baseline |
|
|
32
|
-
| **Phase 2: Green Verification** | After Coder completes |
|
|
40
|
+
| Phase | Trigger | Core Responsibility | Test Run Method | Output |
|
|
41
|
+
|-------|---------|---------------------|-----------------|--------|
|
|
42
|
+
| **Phase 1: Red Baseline** | After design.md is complete | Write tests, produce failure evidence | Only run **incremental tests** (new/P0) | verification.md (Status=Ready), Red baseline |
|
|
43
|
+
| **Phase 2: Green Verification** | After Coder completes + @full passes | **Audit evidence**, check off AC matrix | Default no rerun, optional sampling | AC matrix checked, Status=Verified |
|
|
33
44
|
|
|
34
45
|
### Phase 2 Detailed Responsibilities (Critical!)
|
|
35
46
|
|
|
36
47
|
When user says "Coder is done, please verify" or similar, Test Owner enters **Phase 2**:
|
|
37
48
|
|
|
38
|
-
1. **
|
|
39
|
-
2. **
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
1. **Check prerequisites**: Confirm @full tests have passed (check CI results or `evidence/green-final/`)
|
|
50
|
+
2. **Audit evidence** (default mode):
|
|
51
|
+
- Check test logs in `evidence/green-final/` directory
|
|
52
|
+
- Verify commit hash matches current code
|
|
53
|
+
- Confirm tests cover all ACs
|
|
54
|
+
3. **Optional sampling rerun**: Sample verify high-risk ACs or questionable tests
|
|
55
|
+
4. **Check off AC Coverage Matrix**: Change `[ ]` to `[x]` in verification.md AC Coverage Matrix
|
|
56
|
+
5. **Set status to Verified**: Indicates test verification passed, waiting for Code Review
|
|
43
57
|
|
|
44
58
|
### AC Coverage Matrix Checkbox Permissions (Important!)
|
|
45
59
|
|
|
46
60
|
| Checkbox Location | Who Can Check | When to Check |
|
|
47
61
|
|-------------------|---------------|---------------|
|
|
48
|
-
| `[ ]` in AC Coverage Matrix | **Test Owner** | Phase 2 after
|
|
62
|
+
| `[ ]` in AC Coverage Matrix | **Test Owner** | Phase 2 after evidence audit confirmed |
|
|
63
|
+
| Status field `Verified` | **Test Owner** | After Phase 2 completion |
|
|
49
64
|
| Status field `Done` | Reviewer | After Code Review passes |
|
|
50
65
|
|
|
51
66
|
**Prohibited**: Coder cannot check AC Coverage Matrix, cannot modify verification.md.
|
|
52
67
|
|
|
53
68
|
---
|
|
54
69
|
|
|
70
|
+
## Test Layering and Run Strategy (Critical!)
|
|
71
|
+
|
|
72
|
+
> **Core Principle**: Test layering is key to solving "slow tests blocking development".
|
|
73
|
+
|
|
74
|
+
### Test Layering Labels (Must Use)
|
|
75
|
+
|
|
76
|
+
| Label | Purpose | Who Runs | Expected Time | When to Run |
|
|
77
|
+
|-------|---------|----------|---------------|-------------|
|
|
78
|
+
| `@smoke` | Fast feedback, core paths | Coder runs frequently | Seconds | After each code change |
|
|
79
|
+
| `@critical` | Key functionality verification | Coder before commit | Minutes | Before commit |
|
|
80
|
+
| `@full` | Complete acceptance tests | CI runs async | Can be slow (hours) | Background/CI |
|
|
81
|
+
|
|
82
|
+
### Test Run Strategy by Phase
|
|
83
|
+
|
|
84
|
+
| Phase | What to Run | Purpose | Blocking/Async |
|
|
85
|
+
|-------|-------------|---------|----------------|
|
|
86
|
+
| **Test Owner Phase 1** | Only **newly written tests** | Confirm Red status | Sync (but incremental only) |
|
|
87
|
+
| **Coder during dev** | `@smoke` | Fast feedback loop | Sync |
|
|
88
|
+
| **Coder before commit** | `@critical` | Key path verification | Sync |
|
|
89
|
+
| **Coder on completion** | `@full` (trigger CI) | Complete acceptance | **Async** (doesn't block dev) |
|
|
90
|
+
| **Test Owner Phase 2** | **No run** (audit evidence) | Independent verification | N/A |
|
|
91
|
+
|
|
92
|
+
### Async vs Sync Boundary (Critical!)
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
✅ Async: Dev iteration (Coder can start next change after completion, no waiting for @full)
|
|
96
|
+
❌ Sync: Archive gate (Archive must wait for @full to pass)
|
|
97
|
+
|
|
98
|
+
Timeline example:
|
|
99
|
+
T1: Coder completes implementation, triggers @full async test → Status = Implementation Done
|
|
100
|
+
T2: Coder can start next change (not blocked)
|
|
101
|
+
T3: @full tests pass → Status = Ready for Phase 2
|
|
102
|
+
T4: Test Owner audits evidence + checks off → Status = Verified
|
|
103
|
+
T5: Code Review → Status = Done
|
|
104
|
+
T6: Archive (at this point @full has definitely passed)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
55
109
|
## Prerequisites: Configuration Discovery (Protocol-Agnostic)
|
|
56
110
|
|
|
57
111
|
- `<truth-root>`: Current truth directory root
|
|
@@ -86,10 +140,15 @@ Test Owner must produce a structured `verification.md` that serves as both test
|
|
|
86
140
|
|--------|---------|-------------|
|
|
87
141
|
| `Draft` | Initial state | Auto-generated |
|
|
88
142
|
| `Ready` | Test plan ready | **Test Owner** |
|
|
143
|
+
| `Implementation Done` | Implementation complete, waiting for @full tests | **Coder** |
|
|
144
|
+
| `Verified` | @full passed + evidence audit complete | **Test Owner** |
|
|
89
145
|
| `Done` | Review passed | Reviewer (Test Owner/Coder prohibited) |
|
|
90
|
-
| `Archived` | Archived |
|
|
146
|
+
| `Archived` | Archived | Archiver |
|
|
91
147
|
|
|
92
|
-
**
|
|
148
|
+
**Key Constraints**:
|
|
149
|
+
- `Verified` status requires @full tests to have passed
|
|
150
|
+
- Only changes with `Verified` or `Done` status can be archived
|
|
151
|
+
- Test Owner sets `Ready` after completing test plan, sets `Verified` after evidence audit
|
|
93
152
|
|
|
94
153
|
```markdown
|
|
95
154
|
# Verification Plan: <change-id>
|
|
@@ -385,14 +444,14 @@ Test Owner has two phases, completion status varies by phase:
|
|
|
385
444
|
|
|
386
445
|
| Current Phase | How to Determine | Next Step After Completion |
|
|
387
446
|
|---------------|------------------|---------------------------|
|
|
388
|
-
| **Phase 1** | verification.md doesn't exist or Red baseline not produced | →
|
|
389
|
-
| **Phase 2** | User says "verify/check off" and
|
|
447
|
+
| **Phase 1** | verification.md doesn't exist or Red baseline not produced | → `[CODER]` mode |
|
|
448
|
+
| **Phase 2** | User says "verify/check off" and @full tests have passed | → Code Review |
|
|
390
449
|
|
|
391
450
|
### Phase 1 Completion Status Classification (MECE)
|
|
392
451
|
|
|
393
452
|
| Code | Status | Determination Criteria | Next Step |
|
|
394
453
|
|:----:|--------|------------------------|-----------|
|
|
395
|
-
| ✅ | PHASE1_COMPLETED | Red baseline produced, no deviations | `
|
|
454
|
+
| ✅ | PHASE1_COMPLETED | Red baseline produced, no deviations | Switch to `[CODER]` mode |
|
|
396
455
|
| ⚠️ | PHASE1_COMPLETED_WITH_DEVIATION | Red baseline produced, deviation-log has pending records | `devbooks-design-backport` |
|
|
397
456
|
| ❌ | BLOCKED | Needs external input/decision | Record breakpoint, wait for user |
|
|
398
457
|
| 💥 | FAILED | Test framework issues etc. | Fix and retry |
|
|
@@ -401,8 +460,9 @@ Test Owner has two phases, completion status varies by phase:
|
|
|
401
460
|
|
|
402
461
|
| Code | Status | Determination Criteria | Next Step |
|
|
403
462
|
|:----:|--------|------------------------|-----------|
|
|
404
|
-
| ✅ | PHASE2_VERIFIED |
|
|
405
|
-
|
|
|
463
|
+
| ✅ | PHASE2_VERIFIED | Evidence audit passed, AC matrix checked | `devbooks-code-review` |
|
|
464
|
+
| ⏳ | PHASE2_WAITING | @full tests still running | Wait for CI to complete |
|
|
465
|
+
| ❌ | PHASE2_FAILED | @full tests not passing | Notify Coder to fix |
|
|
406
466
|
| 🔄 | PHASE2_HANDOFF | Found issues with tests themselves | Fix tests then re-verify |
|
|
407
467
|
|
|
408
468
|
### Phase Determination Flow
|
|
@@ -421,11 +481,13 @@ Test Owner has two phases, completion status varies by phase:
|
|
|
421
481
|
c. All above pass → PHASE1_COMPLETED
|
|
422
482
|
|
|
423
483
|
3. Phase 2 status determination:
|
|
424
|
-
a.
|
|
484
|
+
a. Check if @full tests have completed
|
|
485
|
+
→ No: PHASE2_WAITING
|
|
486
|
+
b. Check if @full tests passed
|
|
425
487
|
→ No: PHASE2_FAILED
|
|
426
|
-
|
|
488
|
+
c. Check if tests themselves have issues
|
|
427
489
|
→ Yes: PHASE2_HANDOFF
|
|
428
|
-
|
|
490
|
+
d. Audit evidence, confirm coverage → PHASE2_VERIFIED
|
|
429
491
|
```
|
|
430
492
|
|
|
431
493
|
### Routing Output Template (Required)
|
|
@@ -437,11 +499,13 @@ After completing test-owner, **must** output in this format:
|
|
|
437
499
|
|
|
438
500
|
**Phase**: Phase 1 (Red Baseline) / Phase 2 (Green Verification)
|
|
439
501
|
|
|
440
|
-
**Status**: ✅ PHASE1_COMPLETED / ✅ PHASE2_VERIFIED /
|
|
502
|
+
**Status**: ✅ PHASE1_COMPLETED / ✅ PHASE2_VERIFIED / ⏳ PHASE2_WAITING / ...
|
|
441
503
|
|
|
442
504
|
**Red Baseline**: Produced / Not completed (Phase 1 only)
|
|
443
505
|
|
|
444
|
-
|
|
506
|
+
**@full Tests**: Passed / Running / Failed (Phase 2 only)
|
|
507
|
+
|
|
508
|
+
**Evidence Audit**: Completed / Pending (Phase 2 only)
|
|
445
509
|
|
|
446
510
|
**AC Matrix**: Checked N/M / Not checked (Phase 2 only)
|
|
447
511
|
|
|
@@ -449,31 +513,29 @@ After completing test-owner, **must** output in this format:
|
|
|
449
513
|
|
|
450
514
|
## Next Step
|
|
451
515
|
|
|
452
|
-
**Recommended**: `devbooks-xxx skill`
|
|
516
|
+
**Recommended**: Switch to `[CODER]` mode / `devbooks-xxx skill`
|
|
453
517
|
|
|
454
518
|
**Reason**: [specific reason]
|
|
455
|
-
|
|
456
|
-
### How to invoke
|
|
457
|
-
Run devbooks-xxx skill for change <change-id>
|
|
458
519
|
```
|
|
459
520
|
|
|
460
521
|
### Specific Routing Rules
|
|
461
522
|
|
|
462
523
|
| My Status | Next Step | Reason |
|
|
463
524
|
|-----------|-----------|--------|
|
|
464
|
-
| PHASE1_COMPLETED | `
|
|
525
|
+
| PHASE1_COMPLETED | Switch to `[CODER]` mode | Red baseline produced, Coder implements to make Green |
|
|
465
526
|
| PHASE1_COMPLETED_WITH_DEVIATION | `devbooks-design-backport` | Backport design first, then hand to Coder |
|
|
466
|
-
| PHASE2_VERIFIED | `devbooks-code-review` |
|
|
467
|
-
|
|
|
527
|
+
| PHASE2_VERIFIED | `devbooks-code-review` | Evidence audit passed, can proceed to code review |
|
|
528
|
+
| PHASE2_WAITING | Wait for CI | @full tests still running |
|
|
529
|
+
| PHASE2_FAILED | Notify Coder to fix | Tests not passing, need Coder to fix |
|
|
468
530
|
| PHASE2_HANDOFF | Fix tests | Tests themselves have issues, Test Owner fixes |
|
|
469
531
|
| BLOCKED | Wait for user | Record breakpoint area |
|
|
470
532
|
| FAILED | Fix and retry | Analyze failure reason |
|
|
471
533
|
|
|
472
534
|
**Critical Constraints**:
|
|
473
|
-
- **
|
|
474
|
-
- Test Owner and Coder cannot share the same session context
|
|
535
|
+
- **Mode switching replaces session isolation**: Use `[TEST-OWNER]` / `[CODER]` labels to switch modes
|
|
475
536
|
- If deviations exist, must design-backport first before handing to Coder
|
|
476
537
|
- **Phase 2 AC matrix checking can only be done by Test Owner**
|
|
538
|
+
- **Phase 2 can only check off after @full tests have passed**
|
|
477
539
|
|
|
478
540
|
---
|
|
479
541
|
|
|
@@ -11,6 +11,10 @@ Inputs (provided by me):
|
|
|
11
11
|
- Design/spec documents
|
|
12
12
|
- Test methodology references (see: `references/test-driven-development.md`)
|
|
13
13
|
|
|
14
|
+
**Required Spec Truth Reading** (mandatory before testing):
|
|
15
|
+
- `<truth-root>/specs/**`: existing spec files
|
|
16
|
+
- Purpose: auto-generate test skeletons from contracts (Preconditions/Postconditions/Invariants) and state machines
|
|
17
|
+
|
|
14
18
|
Artifact locations (directory conventions; protocol-agnostic):
|
|
15
19
|
- Test plan + traceability should live at: `<change-root>/<change-id>/verification.md`
|
|
16
20
|
- Test code changes live in the repo’s normal place (e.g., `tests/`), but traceability matrices and MANUAL-* checklists should live in the change package (`verification.md`), not scattered into external `docs/`
|
|
@@ -63,6 +67,16 @@ Core principles (must follow):
|
|
|
63
67
|
3) **Deterministic and reproducible**: default to offline, no real external services; freeze time; fix random seeds; use fakes/mocks; fixed inputs.
|
|
64
68
|
4) **Few but strong (risk-driven)**: prioritize the highest-risk failure modes (isolation, idempotency/replay, quality gates, error cascades, contract drift).
|
|
65
69
|
|
|
70
|
+
**Contract Tests from Spec Truth** (must follow):
|
|
71
|
+
- **Invariants → invariant tests**: each `[Invariant]` or `INV-xxx` in Specs must have a corresponding test
|
|
72
|
+
- **Preconditions → precondition tests**: each `PRE-xxx` generates two tests: (1) success when satisfied (2) rejection when violated
|
|
73
|
+
- **Postconditions → postcondition tests**: each `POST-xxx` generates result verification tests
|
|
74
|
+
- **State Machine → transition tests**: if Spec contains state machine, generate:
|
|
75
|
+
- All legal transition path tests
|
|
76
|
+
- All forbidden transition rejection tests
|
|
77
|
+
- Terminal state cannot exit tests
|
|
78
|
+
- **REQ coverage traceability**: each test must annotate which REQ-xxx/INV-xxx/PRE-xxx/POST-xxx it covers (in comments or verification.md)
|
|
79
|
+
|
|
66
80
|
Coverage targets (debate edition; guidance only):
|
|
67
81
|
|
|
68
82
|
| Code type | Coverage target | Rationale |
|