A structured workflow for AI-assisted development, built around the Define-Test-Implement loop. This toolkit provides the templates, standards, and AI prompts to put it into practice.
- The DTI Workflow
- Directory Structure
- Start Here (15 Minutes)
- Getting Started
- Standards
- Templates
- Contributing
- Changelog
Define-Test-Implement (DTI) is a structured workflow that guides developers—especially AI-assisted beginners—from idea to working code in three clear phases:
- Define ✅ – write down exactly what you need to build
- Test 🧪 – write automated tests from your definition checklist
- Implement ⚙️ – write the minimum code needed to make your tests pass
By separating concerns this way, DTI lowers cognitive load, keeps AI tools on track, and yields modular, maintainable software.
For canonical phase rules and PR expectations, see DTI Methodology.
Write down exactly what your code needs to do.
- Write a simple description of what the code should do, a checklist of what success looks like, or rough examples of how the code might be used.
- List what goes into the code (inputs), what should come out (outputs), what must always be true (rules), and any unusual situations to handle (edge-cases).
- Provide this definition to your AI assistant so it has a clear blueprint.
Write automated tests from the checklist you defined.
- Turn each item from your checklist into a specific test
- Write tests that check both normal usage and edge cases
- Use these tests to keep AI-generated code on track and catch mistakes early
Write code until your tests pass, then refactor.
- Pass the Test: Make the smallest change needed to pass the next failing test. Ask your AI assistant to help write basic code structure.
- Verify: Check that AI suggestions pass your tests before moving on.
- Refactor: Clean up the code only after all tests pass. Review the implementation for clarity, performance, and best practices without changing its behavior, relying on your tests to catch any regressions.
.
├── prompt.md # AI assistant prompts for each DTI phase
├── TODO.md # Project backlog and next steps
│
├── standards/ # Documentation standards and guidelines
│ ├── methodology.md # Canonical DTI workflow rules
│ ├── documentation.md # Documentation requirements
│ ├── contributing.md # Contribution guidelines
│ └── conventional_commits.md # Commit message standards
│
└── templates/ # Documentation templates
├── define.md # Requirements definition template
├── test-plan.md # Test plan template
├── architecture.md # System architecture template
├── overview.md # Project overview template
├── setup.md # Setup instructions template
└── todo.md # TODO list template
If you are new to DTI, follow this path first:
-
Read the worked example in order:
-
Copy the templates and start your own feature artifacts:
cp templates/define.md define.md cp templates/test-plan.md test-plan.md
-
Use the phase prompts in prompt.md to drive your AI assistant through Define, then Test, then Implement.
-
Run the DTI structure check:
./scripts/check-dti.sh
- Clone this repository
- Review the DTI Workflow in this README
- Formulate your work using
templates/define.mdandtemplates/test-plan.md - Use the appropriate templates from the
templates/directory for your documentation needs - Follow the contribution guidelines when submitting changes
Our documentation follows several key standards:
- Code Documentation: Clear, concise comments with comprehensive API documentation
- Markdown Standards: Consistent heading hierarchy, proper formatting, and table of contents for longer documents
- Best Practices: Focus on clarity, include examples, and explain the reasoning behind decisions
- Review Process: All documentation changes undergo peer review for technical accuracy and style consistency
For detailed standards, see:
We provide several templates to ensure consistency:
- Definition - For requirements gathering and documentation
- Test Plan - For mapping definitions to automated tests
- Architecture Documentation - For system architecture documentation
- Project Overview - For high-level project descriptions
- Setup Instructions - For installation and configuration guides
- TODO Lists - For tracking documentation tasks
We welcome contributions! Please follow these steps:
- Review our Contributing Guidelines to understand the required DTI flow for PRs
- Follow our Documentation Standards
- Use Conventional Commits for commit messages
- Check our Changelog for recent updates
- Submit a pull request for review
See CHANGELOG.md for a list of notable changes.
This project is currently unlicensed. Add a LICENSE file to define reuse terms.