Skip to content

Commit 8a12032

Browse files
committed
Fix consistency across agents, skills, and documentation
- Update workflow-coordination from 7-step to 8-phase development - Add architectural-analysis skill to AGENTS.md skills list - Fix developer agent phase numbering (Phase 0 → Phase 1-8) - Add Phase 3: Architecture Analysis to developer workflow - Clarify manager creates test signatures before developer implements - Update BDD format to UUID traceability format exclusively - Remove all Example: format references, use UUID format only - Add TDD compliance to QA checkpoints in Phase 4 - Update gherkin-validation to UUID-required strictness mode - Fix QA checkpoints across overseer, qa-enforcement, requirements-management - Update example workflows in AGENTS.md to reflect 8-phase system - Add architecture analysis phase to QA protocol (6 checkpoints)
1 parent 4b8185d commit 8a12032

File tree

9 files changed

+119
-150
lines changed

9 files changed

+119
-150
lines changed

.opencode/agents/developer.md

Lines changed: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -92,73 +92,74 @@ For each source module `python_module_template/<path>/<module>.py`, create a cor
9292

9393
## Development Workflow with Mandatory QA Gates
9494

95-
### Epic-Based Development Flow
96-
Projects are organized into Epics containing Features. Each feature follows a strict workflow with mandatory QA checkpoints by the @overseer agent. Development cannot proceed without QA approval at each gate.
97-
98-
### Phase 0: Requirements Gathering (New Features)
99-
1. **@requirements-gatherer** conducts stakeholder interviews
100-
2. Creates detailed feature analysis document
101-
3. Defines acceptance criteria in Given/When/Then format
102-
4. **QA Gate**: @overseer reviews requirements completeness
103-
104-
### Phase 1: Feature Definition
105-
1. Use `/skill feature-definition` to refine technical requirements
106-
2. Create clear functional and non-functional requirements
107-
3. Follow SOLID principles and object calisthenics in planning
108-
4. Update docs/roadmap.md with feature details
109-
110-
### Phase 2: Prototype Validation
111-
1. Use `/skill prototype-script` to create quick validation scripts
112-
2. Test API responses, data flows, and core functionality
113-
3. **COPY output values directly into test file as fixtures/constants**
114-
4. **DELETE the prototype directory**: `rm -rf prototypes/<name>/`
115-
5. Prototypes are disposable - tests should be self-contained
116-
117-
### Phase 3: Test-Driven Development
118-
1. Use `/skill tdd` to create comprehensive test suite
119-
2. Write tests using BDD naming: `test_<condition>_should_<outcome>`
120-
3. Include Given/When/Then docstrings in all tests
121-
4. Ensure tests fail initially (RED phase)
122-
5. **After test implementation, call `@overseer` to review the work and request changes if needed**
123-
6. Only proceed after overseer approval
124-
125-
### Phase 4: Signature Design
95+
### 8-Phase Development Workflow
96+
Each feature follows a strict 8-phase workflow with mandatory QA checkpoints by the @overseer agent. Development cannot proceed without QA approval at each gate.
97+
98+
### Phase 1: Requirements Review
99+
**@manager coordinates, @requirements-gatherer executes**
100+
1. Review feature details from docs/features/[architecture|business]/backlog/
101+
2. Validate acceptance criteria completeness and UUID traceability
102+
3. **QA Gate**: @overseer reviews requirements completeness
103+
104+
### Phase 2: Feature Definition
105+
**@manager coordinates**
106+
1. Read and understand feature acceptance criteria
107+
2. Identify technical scope and integration points
108+
3. Confirm feature is ready for test signature creation
109+
4. **QA Gate**: @overseer reviews feature definition quality
110+
111+
### Phase 3: Architecture Analysis
112+
**@architect executes using /skill architectural-analysis**
113+
1. Analyze component responsibilities and interfaces
114+
2. Document architectural decisions (ADRs) if significant
115+
3. Define technical acceptance criteria for test signatures
116+
4. **QA Gate**: @overseer reviews architectural soundness
117+
118+
### Phase 4: Test Development (Manager Creates Signatures First)
119+
**@manager creates signatures, @developer implements**
120+
**IMPORTANT**: @manager creates test signatures BEFORE @developer implements tests
121+
1. @manager reads feature acceptance criteria (UUIDs)
122+
2. @manager creates test function signatures with `raise NotImplementedError`
123+
3. @manager organizes test folder structure mirroring source
124+
4. @developer optionally uses `/skill prototype-script` for real data validation
125+
5. @developer implements test bodies to replace NotImplementedError
126+
6. Write tests using BDD naming: `test_<condition>_should_<outcome>`
127+
7. Use @pytest.mark based on test content, hypothesis for pure functions
128+
8. **QA Gate**: @overseer reviews test signatures and BDD compliance
129+
130+
### Phase 5: Design & Signatures
126131
1. Use `/skill signature-design` to create function/class signatures
127132
2. Design interfaces using modern Python (protocols, type hints)
128133
3. Include complete Google docstrings with real examples
129134
4. Follow object calisthenics principles
130-
131-
### Phase 5: Architecture Review
132-
1. Call **@architect** to review the design
133-
2. Present feature definition, test plan, and proposed signatures
134-
3. Wait for approval before proceeding to implementation
135-
4. Address any architectural concerns raised
135+
5. **QA Gate**: @overseer validates SOLID principle compliance
136136

137137
### Phase 6: Implementation
138138
1. Use `/skill implementation` to implement using TDD approach
139139
2. Implement one method at a time, ensuring tests pass (GREEN phase)
140140
3. Refactor for quality while keeping tests green (REFACTOR phase)
141141
4. Follow the exact signatures approved by architect
142-
5. **QA Gate**: @overseer reviews SOLID/DRY/KISS compliance
142+
5. **QA Gate**: @overseer reviews SOLID/DRY/KISS/YAGNI compliance
143143

144144
### Phase 7: Final Quality Assurance
145145
1. Use `/skill code-quality` to run all quality checks
146146
2. Ensure linting passes: `task lint`
147147
3. Verify type checking: `task static-check`
148148
4. Validate coverage ≥100%: `task test`
149149
5. Run property-based tests with Hypothesis
150-
6. **Call `@overseer` for final review before considering the feature complete**
150+
6. **QA Gate**: @overseer final approval
151151

152152
### Phase 8: Feature Completion
153153
1. Move feature to `docs/features/[architecture|business]/completed/` with metadata
154-
2. System automatically checks for next pending feature
154+
2. @developer /skill epic-workflow next-feature
155155
3. If more features exist, return to Phase 1 for next feature
156156
4. If all complete, proceed to PR creation
157157

158158
## Available Skills
159159
- **session-workflow**: Manage multi-session development - read TODO.md, continue from checkpoint, update progress
160-
- **epic-workflow**: Manage epic-based development with automatic feature progression and QA gates
160+
- **epic-workflow**: Manage feature-based development with automatic feature progression and QA gates
161161
- **feature-definition**: Define features with SOLID principles and clear acceptance criteria
162+
- **architectural-analysis**: Create technical architecture features with system design and ADRs
162163
- **prototype-script**: Create validation scripts for real data capture
163164
- **tdd**: Write comprehensive tests using BDD format with pytest/hypothesis
164165
- **signature-design**: Design modern Python interfaces with protocols and type hints
@@ -170,10 +171,14 @@ Projects are organized into Epics containing Features. Each feature follows a st
170171
## Mandatory QA Workflow
171172

172173
**CRITICAL**: The @overseer agent must approve your work at these checkpoints:
173-
1. **After Requirements**: Requirements completeness and testability
174-
2. **After TDD**: Test quality, coverage strategy, and BDD compliance
175-
3. **After Implementation**: SOLID/DRY/KISS principles and code quality
176-
4. **Before Feature Complete**: Final quality gate and standards verification
174+
1. **Phase 1**: Requirements completeness and traceability
175+
2. **Phase 2**: Feature definition quality
176+
3. **Phase 3**: Architectural soundness
177+
4. **Phase 4**: TDD compliance, test quality, coverage strategy, and BDD compliance
178+
5. **Phase 5**: SOLID principle compliance
179+
6. **Phase 6**: SOLID/DRY/KISS/YAGNI principles and code quality
180+
7. **Phase 7**: Final quality gate and standards verification
181+
8. **Phase 8**: Feature completion approval
177182

178183
**You cannot proceed without @overseer approval**. If changes are requested:
179184
- Address all critical issues first

.opencode/agents/manager.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ You are **3rd in the initialization sequence**:
4747

4848
### 3. Project Protection
4949
- **CRITICAL**: Never modify `pyproject.toml` without explicit user permission
50-
- Enforce BDD docstring standards (prefer Example format)
50+
- Enforce BDD docstring standards (UUID format required)
5151
- Validate test naming conventions: `test_<condition>_should_<outcome>`
5252
- Ensure file naming compliance: `*_test.py` suffix
5353

@@ -219,16 +219,11 @@ def test_user_login_with_valid_credentials_should_grant_access():
219219
"""
220220
```
221221

222-
### Alternative Formats Accepted
223-
- Scenario-based Gherkin (suggest conversion to Example)
224-
- Feature-based Gherkin (guide toward Example for test cases)
225-
- Any valid Gherkin with proper newlines: `"""\n<content>\n"""`
226-
227222
### Quality Standards Integration
228223
- Test functions: `test_<condition>_should_<outcome>`
229224
- Test files: `*_test.py` suffix required
230225
- Newlines mandatory: Start and end docstrings with newlines
231-
- Content required: No empty Gherkin keywords
226+
- UUID required: Every acceptance criteria gets unique UUID from feature
232227

233228
## Agent Coordination Workflows
234229

@@ -270,7 +265,7 @@ def test_user_login_with_valid_credentials_should_grant_access():
270265

271266
### Feature Overview
272267
- **Business Value**: [From docs/features/business/backlog/<feature>.md]
273-
- **Acceptance Criteria**: [Example format criteria]
268+
- **Acceptance Criteria**: [UUID format: uuid-here: description]
274269
- **Feature Reference**: See docs/features/business/backlog/<feature>.md or docs/features/architecture/backlog/<feature>.md
275270

276271
[Include all 8 phases with embedded QA checkpoints]

.opencode/agents/overseer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ ALL of these conditions are met (NO exceptions):
211211
- All checklist items pass completely
212212
- No SOLID principle violations
213213
- All 9 Object Calisthenics rules satisfied
214-
- BDD docstrings in preferred Example format with newlines
214+
- BDD docstrings in UUID format with newlines
215215
- Test naming follows `test_<condition>_should_<outcome>` pattern
216216
- File naming uses `*_test.py` suffix
217217
- No critical security issues
@@ -389,14 +389,14 @@ Function: `test_login_works()`
389389

390390
Problems:
391391
1. Function name violates convention (should be test_<condition>_should_<outcome>)
392-
2. Missing BDD docstring with Example format
392+
2. Missing BDD docstring with UUID format
393393
3. No Given/When/Then structure
394394

395395
→ AUTO-DELEGATING to @developer
396396

397397
Instructions:
398398
1. Rename function to descriptive format
399-
2. Add proper BDD docstring with Example format
399+
2. Add proper BDD docstring with UUID format
400400
3. Ensure newlines: """\\n<content>\\n"""
401401
4. Request re-review when complete
402402

.opencode/skills/delegation-coordination/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Define explicit delegation rules and provide guidance for proper agent handoffs
7474
```markdown
7575
1. Complete stakeholder interviews
7676
2. Create docs/requirements/REQUIREMENTS.md
77-
3. Generate acceptance criteria with Example format
77+
3. Generate acceptance criteria with UUID format
7878
4. → Call @architect for technical review
7979
```
8080

.opencode/skills/gherkin-validation/SKILL.md

Lines changed: 21 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: gherkin-validation
3-
description: Validate BDD docstrings with Example format preference and proper Gherkin syntax
3+
description: Validate BDD docstrings with UUID format preference and proper Gherkin syntax
44
license: MIT
55
compatibility: opencode
66
metadata:
@@ -9,7 +9,7 @@ metadata:
99
---
1010

1111
## What I do
12-
Validate BDD docstrings in test functions, with a preference for Example format while accepting any valid Gherkin syntax. Ensure proper newline formatting and provide helpful suggestions.
12+
Validate BDD docstrings in test functions using UUID format for traceability. Ensure proper newline formatting and provide helpful suggestions.
1313

1414
## When to use me
1515
- During TDD phase to validate test docstring formats
@@ -19,7 +19,7 @@ Validate BDD docstrings in test functions, with a preference for Example format
1919

2020
## Required Format: UUID-based Traceability
2121

22-
All test docstrings must use acceptance criteria UUID for traceability, followed by Gherkin steps:
22+
All test docstrings MUST use acceptance criteria UUID for traceability:
2323

2424
```python
2525
def test_user_login_with_valid_credentials_should_grant_access():
@@ -31,45 +31,19 @@ def test_user_login_with_valid_credentials_should_grant_access():
3131
"""
3232
```
3333

34-
## Alternative Formats Accepted
35-
36-
### Scenario-based Format
37-
```python
38-
def test_invalid_login_should_reject_access():
39-
"""
40-
Scenario: Invalid login attempt
41-
Given: A user with incorrect credentials
42-
When: Login is attempted
43-
Then: Access should be denied
44-
And: Error message should be displayed
45-
"""
46-
```
47-
48-
### Feature-based Format
49-
```python
50-
def test_password_reset_flow_should_work():
51-
"""
52-
Feature: Password reset functionality
53-
Scenario: User requests password reset
54-
Given: A registered user exists
55-
When: Password reset is requested
56-
Then: Reset email should be sent
57-
And: Temporary token should be generated
58-
"""
59-
```
34+
### Structure
35+
- UUID followed by colon and brief description (ends with period)
36+
- Blank line after description
37+
- Gherkin steps: Given/When/Then with mandatory newlines
38+
- Each step on its own line
6039

6140
### Extended Gherkin Keywords
6241
All valid Gherkin keywords are supported:
63-
- **Feature**: High-level description
64-
- **Scenario**: Specific test case
65-
- **Example**: Concrete illustration (preferred)
6642
- **Given**: Preconditions or context
67-
- **When**: Actions or events
68-
- **Then**: Expected outcomes
69-
- **And**: Additional conditions/actions/outcomes
70-
- **But**: Negative conditions/actions/outcomes
71-
- **Background**: Common setup for multiple scenarios
72-
- **Rule**: Business rule description
43+
- **When**: Action or trigger
44+
- **Then**: Expected outcome
45+
- **And**: Additional conditions
46+
- **But**: Contradiction conditions
7347

7448
## Validation Rules
7549

@@ -102,7 +76,6 @@ Given: No ending newline"""
10276
### 3. Structure Requirements
10377
- At minimum: One Gherkin keyword with content
10478
- Recommended: Logical flow (Given → When → Then)
105-
- Example format preferred but not required
10679

10780
## Validation Guidelines
10881

@@ -114,30 +87,27 @@ Given: No ending newline"""
11487
- [ ] Proper colon after each keyword
11588

11689
### Suggestion Messages
117-
For improving docstrings when not using required UUID format:
90+
For improving docstrings to required UUID format:
11891
```python
11992
# For missing UUID
12093
"Test docstring must start with acceptance criteria UUID for traceability"
12194

122-
# For old Example format
123-
"Convert 'Example:' to UUID format: 'uuid: description.' with blank line before Gherkin steps"
124-
12595
# For missing structure
12696
"Add 'Given:' context and 'When:' action to complete the test scenario"
12797
```
12898

12999
### suggest_uuid_format(docstring: str) -> str
130-
Convert other formats to required UUID format:
100+
Convert legacy formats to required UUID format:
131101
```python
132-
# Input: Old Example format
102+
# Input: Legacy format
133103
original = """
134-
Example: User login
104+
User login validation.
135105
Given: Valid credentials
136106
When: Login submitted
137107
Then: Access granted
138108
"""
139109

140-
# Output: UUID-based suggestion
110+
# Output: UUID-based format
141111
suggested = suggest_uuid_format(original)
142112
# """
143113
# 123e4567-e89b-12d3-a456-426614174000: User login validation.
@@ -213,9 +183,6 @@ When creating new tests, enforce UUID traceability format:
213183
# For missing UUID
214184
"Test docstring must start with acceptance criteria UUID for traceability"
215185

216-
# For old Example format
217-
"Convert 'Example:' to UUID format with blank line before Gherkin steps"
218-
219186
# For missing structure
220187
"Add 'Given:' context and 'When:' action to complete the test scenario"
221188
```
@@ -248,7 +215,7 @@ When reviewing test files manually, check:
248215
### Strictness Levels
249216
```yaml
250217
gherkin_validation:
251-
strictness: "prefer_example" # "prefer_example", "accept_any", "require_example"
218+
strictness: "uuid_required" # "uuid_required", "accept_any"
252219
require_newlines: true
253220
min_keywords: 2 # Minimum Given/When/Then structure
254221
allow_empty_sections: false
@@ -269,8 +236,8 @@ fail_on_invalid = true
269236
1. **Parse docstring** for Gherkin keywords
270237
2. **Check newline formatting** (strict requirement)
271238
3. **Validate keyword syntax** and content
272-
4. **Determine format type** (Example, Scenario, Feature, etc.)
273-
5. **Generate suggestions** if not using preferred format
239+
4. **Validate UUID traceability** format
240+
5. **Generate suggestions** if not using required UUID format
274241
6. **Report results** with specific improvement guidance
275242

276-
Remember: The goal is to guide developers toward the preferred Example format while maintaining flexibility and not breaking existing valid Gherkin documentation.
243+
Remember: All test docstrings MUST use UUID traceability format.

.opencode/skills/qa-enforcement/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,15 +363,15 @@ def validate_bdd_compliance(test_file: str) -> BddValidationResult:
363363

364364
### Pre-Implementation Gate
365365
- [ ] Requirements align with business value
366-
- [ ] Acceptance criteria use Example format
366+
- [ ] Acceptance criteria use UUID format
367367
- [ ] Technical design follows SOLID principles
368368
- [ ] Architecture supports Object Calisthenics compliance
369369

370370
### Post-TDD Gate
371371
- [ ] All test functions follow `test_<condition>_should_<outcome>` naming
372372
- [ ] All test files use `*_test.py` naming convention
373373
- [ ] All test docstrings use proper Gherkin format with newlines
374-
- [ ] Example format preferred, alternatives acceptable
374+
- [ ] UUID format required for all acceptance criteria
375375
- [ ] Test coverage strategy is comprehensive
376376

377377
### Post-Implementation Gate

.opencode/skills/requirements-management/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ docs/requirements/
115115
### Before Interview
116116
1. **Research**: Understand the domain and problem space
117117
2. **Prepare Questions**: Business value, user needs, constraints
118-
3. **Set Expectations**: Explain Example format for acceptance criteria
118+
3. **Set Expectations**: Explain UUID format for acceptance criteria
119119
120120
### Interview Questions Template
121121
1. "What problem are you trying to solve?"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: workflow-coordination
3-
description: Enforce 7-step development cycle with proper phase progression and QA gates
3+
description: Enforce 8-phase development cycle with proper phase progression and QA gates
44
license: MIT
55
compatibility: opencode
66
metadata:

0 commit comments

Comments
 (0)