Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .opencode/skills/template-test/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ test -d "${project_dir}/.opencode/skills"
test -f "${project_dir}/pyproject.toml"
test -f "${project_dir}/README.md"
test -f "${project_dir}/AGENTS.md"
test -f "${project_dir}/DEVELOPMENT_WORKFLOW.md"
```

### File Content Validation
Expand Down Expand Up @@ -212,7 +211,6 @@ validate_project() {
test -f "pyproject.toml" || { echo "❌ Missing pyproject.toml"; return 1; }
test -f "README.md" || { echo "❌ Missing README.md"; return 1; }
test -f "AGENTS.md" || { echo "❌ Missing AGENTS.md"; return 1; }
test -f "DEVELOPMENT_WORKFLOW.md" || { echo "❌ Missing DEVELOPMENT_WORKFLOW.md"; return 1; }

# Check for unsubstituted variables
if grep -r "{{cookiecutter" . --exclude-dir=venv 2>/dev/null; then
Expand Down
13 changes: 6 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This is the meta repository for the AI-Enhanced Python Project Cookiecutter Temp
| Information | Details |
|-------------|---------|
| **Purpose** | Create AI-enhanced Python projects with comprehensive development workflows |
| **AI Integration** | OpenCode agents and skills for TDD/BDD development |
| **AI Integration** | OpenCode agents and skills for TDD development |
| **Quality Standards** | SOLID principles, object calisthenics, 100% coverage |
| **Versioning** | Hybrid major.minor.calver for generated projects |
| **Architecture** | Test-driven development with architect approval workflow |
Expand Down Expand Up @@ -37,15 +37,14 @@ python-project-template/
│ │ └── skills/
│ │ ├── feature-definition/ # SOLID feature planning
│ │ ├── prototype-script/ # Quick validation scripts
│ │ ├── tdd-bdd/ # Test-driven development
│ │ ├── tdd/ # Test-driven development
│ │ ├── signature-design/ # Interface design
│ │ ├── implementation/ # TDD implementation
│ │ ├── code-quality/ # Quality enforcement
│ │ ├── git-release/ # Release management
│ │ └── pr-management/ # Pull request workflows
│ ├── pyproject.toml # Project configuration
│ ├── AGENTS.md # Generated project AI documentation
│ └── DEVELOPMENT_WORKFLOW.md # 7-phase development guide
│ └── AGENTS.md # Generated project AI documentation
├── .opencode/ # Meta agents for template itself
│ ├── agents/template-manager.md # This meta agent
│ └── skills/
Expand All @@ -61,7 +60,7 @@ When developers use this template, they get:
### AI-Powered Development Workflow
1. **Feature Definition** → SOLID principles planning
2. **Prototype Validation** → Quick scripts with real data
3. **Test-Driven Development** → BDD tests with pytest/hypothesis
3. **Test-Driven Development** → TDD tests with pytest/hypothesis
4. **Signature Design** → Modern Python interfaces
5. **Architecture Review** → AI architect approval
6. **Implementation** → TDD methodology
Expand Down Expand Up @@ -126,7 +125,7 @@ cookiecutter gh:your-username/python-project-template --checkout v1.2.20260312r1
- **@repo-manager**: Git operations, PRs, and themed releases

### Skills Included in Generated Projects
- **feature-definition**, **prototype-script**, **tdd-bdd**
- **feature-definition**, **prototype-script**, **tdd**
- **signature-design**, **implementation**, **code-quality**
- **git-release**, **pr-management**
- **create-skill**, **create-agent**
Expand All @@ -136,7 +135,7 @@ cookiecutter gh:your-username/python-project-template --checkout v1.2.20260312r1
# In a generated project
@developer /skill feature-definition # Define new feature
@developer /skill prototype-script # Create prototype
@developer /skill tdd-bdd # Write tests
@developer /skill tdd # Write tests
@architect # Get design approval
@developer /skill implementation # Implement feature
@repo-manager /skill pr-management # Create PR
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ All notable changes to this template will be documented in this file.

### Added
- **AI-Enhanced Development Workflow** - Complete OpenCode integration for AI-powered development
- **Developer Agent** - Main development agent with 7-phase TDD/BDD workflow
- **Developer Agent** - Main development agent with 7-phase TDD workflow
- **Architect Agent** - Design review agent for SOLID principles and object calisthenics compliance
- **Repository Manager Agent** - Git operations, PRs, and themed releases management
- **Development Skills** - feature-definition, prototype-script, tdd-bdd, signature-design, implementation, code-quality
- **Development Skills** - feature-definition, prototype-script, tdd, signature-design, implementation, code-quality
- **Repository Skills** - git-release (hybrid calver versioning with themed releases), pr-management
- **Meta Skills** - create-skill, create-agent for extending OpenCode
- **Template Management** - template-manager agent, template-test, template-release skills
Expand Down
1 change: 0 additions & 1 deletion scripts/check_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"pyproject.toml",
"README.md",
"AGENTS.md",
"DEVELOPMENT_WORKFLOW.md",
".opencode/agents/developer.md",
".opencode/agents/architect.md",
".opencode/agents/repo-manager.md",
Expand Down
2 changes: 1 addition & 1 deletion scripts/template_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ validate_project() {

# Structure validation
local required_dirs=(".opencode" ".opencode/agents" ".opencode/skills" "tests" "docs")
local required_files=("pyproject.toml" "README.md" "AGENTS.md" "DEVELOPMENT_WORKFLOW.md")
local required_files=("pyproject.toml" "README.md" "AGENTS.md")

for dir in "${required_dirs[@]}"; do
if [ ! -d "$dir" ]; then
Expand Down
8 changes: 4 additions & 4 deletions {{cookiecutter.project_slug}}/.opencode/agents/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You are a specialized developer agent for the {{cookiecutter.project_name}} proj
- `task static-check` - Run pyright type checker
- `task doc-serve` - Serve documentation locally

## Development Workflow (TDD/BDD with Architecture Review)
## Development Workflow (TDD with Architecture Review)

### Phase 1: Feature Definition
1. Use `/skill feature-definition` to define requirements and acceptance criteria
Expand All @@ -61,8 +61,8 @@ You are a specialized developer agent for the {{cookiecutter.project_name}} proj
4. Save prototype results for use in implementation

### Phase 3: Test-Driven Development
1. Use `/skill tdd-bdd` to create comprehensive test suite
2. Write tests using BDD naming conventions and real prototype data
1. Use `/skill tdd` to create comprehensive test suite
2. Write tests using descriptive naming conventions and real prototype data
3. Include unit, integration, and property-based tests with Hypothesis
4. Ensure tests fail initially (RED phase)

Expand Down Expand Up @@ -94,7 +94,7 @@ You are a specialized developer agent for the {{cookiecutter.project_name}} proj
## Available Skills
- **feature-definition**: Define features with SOLID principles
- **prototype-script**: Create validation scripts for real data
- **tdd-bdd**: Write tests using BDD naming with pytest
- **tdd**: Write tests using descriptive naming with pytest
- **signature-design**: Design modern Python interfaces
- **implementation**: Implement using TDD methodology
- **code-quality**: Enforce quality with ruff/coverage/hypothesis
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ Use this at the start of any new feature development to establish clear requirem
- **Non-functional Requirements**: Performance, security, usability
- **Constraints**: Technical or business limitations

### 3. Acceptance Criteria (BDD Style)
```gherkin
Given [initial context]
When [action is performed]
Then [expected outcome]
### 3. Acceptance Criteria
Define clear test scenarios using the naming convention:
```
test_when_[condition]_should_[expected_outcome]
```

### 4. Technical Specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ gh run view $(gh pr view 123 --json headRefOid --jq .headRefOid)
# 1. Start feature development
/skill feature-definition # Define requirements
/skill prototype-script # Create prototype
/skill tdd-bdd # Write tests
/skill tdd # Write tests

# 2. Create PR for design review
git checkout -b feature/user-auth
Expand Down Expand Up @@ -406,7 +406,7 @@ gh pr list --label "bug" --json number | \
### Testing
- [ ] Adequate test coverage
- [ ] Tests are meaningful
- [ ] BDD naming conventions used
- [ ] Test naming conventions followed
- [ ] Property-based tests where appropriate

### Documentation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
name: tdd-bdd
description: Implement Test-Driven Development with BDD-style naming and pytest best practices
name: tdd
description: Implement Test-Driven Development with descriptive naming conventions and pytest best practices
license: MIT
compatibility: opencode
metadata:
audience: developers
workflow: feature-development
---
## What I do
Guide the creation of tests using TDD methodology with BDD-style naming conventions, using pytest, coverage, and hypothesis for robust testing.
Guide the creation of tests using TDD methodology with descriptive naming conventions, using pytest, coverage, and hypothesis for robust testing.

## When to use me
Use this after prototype validation to create comprehensive tests before implementing the actual feature code.

## TDD-BDD Process
## TDD Process

### 1. BDD Test Naming Convention
### 1. Test Naming Convention
```python
def test_when_[condition]_should_[expected_outcome]():
"""Test that describes behavior clearly."""
Expand Down Expand Up @@ -243,7 +243,7 @@ class TestAuthService:
```python
"""
Tests for user authentication feature.
Following TDD-BDD approach with real prototype data.
Following TDD approach with real prototype data.
"""
import pytest
import json
Expand Down
6 changes: 3 additions & 3 deletions {{cookiecutter.project_slug}}/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This project includes custom skills for OpenCode:
### Development Workflow
- **feature-definition**: Define features with SOLID principles and clear requirements
- **prototype-script**: Create quick validation scripts with real data capture
- **tdd-bdd**: Write comprehensive tests using BDD naming with pytest/hypothesis
- **tdd**: Write comprehensive tests using TDD with pytest/hypothesis
- **signature-design**: Design modern Python interfaces with protocols and type hints
- **implementation**: Implement using TDD methodology with real prototype data
- **code-quality**: Enforce quality with ruff, coverage, and hypothesis testing
Expand All @@ -39,7 +39,7 @@ This project includes custom skills for OpenCode:

## Available Agents

- **developer**: Main development agent with complete 7-phase TDD/BDD workflow
- **developer**: Main development agent with complete 7-phase TDD workflow
- **architect**: Design review and approval agent for SOLID/object calisthenics compliance
- **repo-manager**: Repository management for Git operations, PRs, commits, and releases

Expand Down Expand Up @@ -126,7 +126,7 @@ Then run `/init` to generate a fresh `AGENTS.md` based on your project's current
# 1. Define and implement a feature
@developer /skill feature-definition
@developer /skill prototype-script
@developer /skill tdd-bdd
@developer /skill tdd
@developer /skill signature-design
@architect # Review design
@developer /skill implementation
Expand Down
Loading