Developer Documentation¶
Project: ADW (AI Developer Workflow) Version: 2.1.0 Last Updated: 2025-11-15
Welcome to the ADW developer documentation hub. This section contains comprehensive guides, architecture documentation, and standards for developers working with or extending the ADW system.
Quick Navigation¶
Core Guides¶
Essential guides for ADW development:
- Code Style Guide - Coding standards and naming conventions
- Testing Guide - Testing framework, commands, and strategies
- Linting Guide - Code quality tools and linting standards
- Review Guide - Code review criteria and process
Architecture¶
Understanding ADW's design and structure:
- Architecture Outline - System components and module relationships
- Architecture Guide - Design principles, patterns, and implementation examples
- Architecture Reference - Quick reference for architectural conventions
- Decision Records - Architectural Decision Records (ADRs)
Documentation Standards¶
Writing consistent, high-quality documentation:
- Documentation Guide - Documentation structure and standards
- Docstring Guide - Google-style docstring format
- Docstring Examples: Functions - Function documentation templates
- Docstring Examples: Classes - Class documentation templates
- Conditional Documentation - Dynamic documentation strategies
Process & Conventions¶
Development workflows and standards:
- Commit Conventions - Semantic commit message format
- PR Conventions - Pull request guidelines and templates
- Issue Interpretation Guide - Creating structured GitHub issues
- Code Culture - Team values and best practices
Templates¶
Standardized templates for consistent documentation:
- Feature Template - Feature specification template
- Maintenance Template - Maintenance task template
- ADR Template - Architecture decision record template
Getting Started¶
For New Developers¶
- Read the Code Style Guide - Understand coding standards
- Review the Testing Guide - Learn testing patterns and commands
- Explore the Architecture Outline - Understand system structure
- Study the Code Culture - Learn team values and practices
For Contributors¶
- Follow Commit Conventions - Write semantic commit messages
- Use PR Conventions - Create well-structured pull requests
- Apply Review Guide - Conduct thorough code reviews
- Maintain Documentation Standards - Keep docs up-to-date
For Architects¶
- Review Architecture Guide - Understand design patterns
- Study Decision Records - Learn from past decisions
- Follow Architecture Reference - Apply architectural conventions
- Create ADRs - Document significant architectural decisions
Development Quick Reference¶
Setup¶
# Create virtual environment
uv venv .venv
# Install in editable mode with dev dependencies
uv pip install -e ".[dev]"
# Activate environment
source .venv/bin/activate # Linux/macOS
Testing¶
# Run all tests
python -m pytest
# Run specific test file
python -m pytest adw/tests/cli_test.py
# Run with coverage
python -m pytest --cov=adw --cov-report=term-missing
Test Framework: pytest
Test Pattern: *_test.py
Coverage Target: 50%+
Test Location: adw/tests/, adw/*/tests/
See Testing Guide for complete documentation.
Linting¶
# Run linter
ruff check adw
# Run linter with auto-fix
ruff check adw --fix
# Run formatter
ruff format adw
Linter: ruff Line Length: 100 characters Rules: E, F, W, I, N (errors, warnings, imports, naming)
See Linting Guide for complete documentation.
Common Development Tasks¶
Adding a New Workflow¶
- Create or copy a JSON definition in
.opencode/workflow/<name>.json. - Describe phases, steps, and conditions using the workflow JSON schema and workflow engine guide.
- Run
adw workflow list(oradw workflow help <name>) to confirm the definition was auto-registered, then exercise it withadw workflow <name> <issue-number>. - Add or update tests for the agents/workflow steps referenced by the new definition.
- Update documentation (README, docs/index.md, and relevant guides) so users know how to invoke the new workflow.
See the Architecture Outline and Architecture Guide for engine internals and extension patterns.
Adding a Slash Command¶
- Create markdown file in
.opencode/command/command_name.md - Update
adw/core/models.pySlashCommand type - Add to SLASH_COMMAND_MODEL_MAP for model selection
- Test command execution
Fixing a Bug¶
- Write failing test that reproduces the bug
- Identify affected module(s) from Architecture Outline
- Implement fix following Code Style Guide
- Verify test passes
- Run full test suite
- Update documentation if behavior changed
Refactoring Code¶
- Ensure existing tests pass
- Make incremental changes
- Run tests after each change
- Follow patterns from Architecture Guide
- Update architecture docs if structure changed
Documentation Types¶
| Type | Purpose | Location | Format |
|---|---|---|---|
| README | Project overview | Root, module roots | Markdown |
| Architecture Docs | System design | docs/Agent/architecture/ |
Markdown |
| API Docs | Module/function reference | Generated from docstrings | Google-style |
| Decision Records | Design decisions | docs/Agent/architecture/decisions/ |
ADR format |
| Guides | Development guides | docs/Agent/ |
Markdown |
| Examples | Practical tutorials | docs/Examples/ |
Markdown + Code |
| Theory | Concepts and principles | docs/Theory/ |
Markdown |
Code Quality Standards¶
Naming Conventions¶
- Functions/variables:
snake_case - Classes:
PascalCase - Constants:
UPPER_SNAKE_CASE - Private:
_leading_underscore
Documentation Requirements¶
- Type Hints: Required for public APIs
- Docstrings: Required for public modules, classes, functions
- Imports: Organized (stdlib, third-party, local)
Linting Rules¶
- E/F/W: PEP 8 errors, warnings, and style issues
- I: Import sorting and organization
- N: Naming conventions
- Line Length: 100 characters maximum
- Auto-fix: Enabled for most rules
Architecture Principles¶
ADW is built on four core architectural principles:
- Isolated Execution - Each workflow runs in an isolated git worktree
- State-Driven Architecture - Workflow state persists to JSON files
- Declarative Phase Orchestration -
.opencode/workflow/*.jsondefinitions describe each phase and are executed viaadw workflow <name> - AI-Augmented Automation - Claude Code agents handle complex tasks
See Architecture Guide for detailed explanations.
Contributing¶
Pull Request Process¶
- Create Feature Branch:
git checkout -b feature-description - Make Changes: Follow Code Style Guide
- Run Tests: Ensure all tests pass (
python -m pytest) - Run Linter: Ensure no linting errors (
ruff check adw) - Commit: Follow Commit Conventions
- Push:
git push origin feature-description - Create PR: Follow PR Conventions
- Code Review: Address review comments using Review Guide
- Merge: After approval and passing CI
Commit Message Format¶
<type>: <description>
<optional body>
<optional footer>
Types: feat, fix, docs, style, refactor, test, chore
See Commit Conventions for complete specification.
Additional Resources¶
External Documentation¶
- Claude Code CLI - Claude Code documentation
- GitHub API - GitHub REST API reference
- Pydantic - Data validation library
- Click - CLI framework
- pytest - Testing framework
- ruff - Linting and formatting tool
Internal Documentation¶
- Main README - Project overview and user guide
- Workflow Engine Guide - Deep reference for the declarative workflow runtime
- Examples - Practical tutorials and examples
- Theory - Concepts and principles
Support¶
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: This directory (
docs/Agent/)
Last Updated: 2025-11-15 Maintainers: ADW Development Team