Thank you for your interest in contributing to DevTrail! This document provides guidelines and information for contributors.
Languages: English | Español
- Code of Conduct
- Contributor License Agreement (CLA)
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Style Guidelines
- Documentation Standards
This project is governed by our Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
In short: be respectful, inclusive, and constructive in all interactions. Harassment, discrimination, and trolling are not tolerated. Please read the full Code of Conduct before contributing.
This project requires all contributors to sign a Contributor License Agreement (CLA) before their pull requests can be merged. We use CLA Assistant to manage this process.
- When you open your first pull request, CLA Assistant will automatically post a comment asking you to sign the CLA.
- Click the link in the comment to review and sign the agreement.
- The CLA only needs to be signed once — it covers all future contributions to this project.
- Once signed, CLA Assistant will update the PR check status and your contribution can proceed to review.
If you have questions about the CLA, please open a Discussion.
Before creating a bug report, please check existing issues to avoid duplicates.
When reporting a bug, include:
- A clear, descriptive title
- Steps to reproduce the behavior
- Expected behavior
- Actual behavior
- Screenshots (if applicable)
- Environment details (OS, AI platform, etc.)
Feature suggestions are welcome! Please include:
- A clear description of the feature
- The problem it solves
- Potential implementation approaches
- Any alternatives you've considered
Documentation improvements are highly valued:
- Fix typos or unclear wording
- Add examples
- Improve explanations
- Translate to other languages
Code contributions should:
- Fix a bug or implement a feature
- Include appropriate tests (if applicable)
- Follow the project's style guidelines
- Update documentation as needed
- Git
- A text editor (VS Code recommended)
- Bash (for Linux/Mac validation scripts)
- PowerShell (for Windows validation scripts)
- Rust toolchain (for CLI development — install via rustup.rs)
- Node.js 20+ (optional, for markdownlint)
-
Fork the repository
Click "Fork" on the GitHub repository page.
-
Clone your fork
git clone https://github.com/your-username/devtrail.git cd devtrail -
Install the pre-commit hook
cp dist/scripts/pre-commit-docs.sh .git/hooks/pre-commit chmod +x .git/hooks/pre-commit
-
Install development tools (optional)
# Markdown linting npm install -g markdownlint-cli -
Create a branch
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make your changes and validate
# Linux/Mac bash dist/scripts/pre-commit-docs.sh # Windows .\dist\scripts\validate-docs.ps1
- Run validation scripts successfully
- Update documentation if needed
- Add yourself to CONTRIBUTORS.md (if applicable)
- Write a clear PR description
Use conventional commit format:
type(scope): description
Examples:
feat(templates): add template for security reviews
fix(validation): correct regex for file naming
docs(readme): clarify installation steps
chore(ci): update GitHub Actions workflow
Types:
feat- New featurefix- Bug fixdocs- Documentation changeschore- Maintenance tasksrefactor- Code refactoringtest- Test additions or fixes
## Summary
Brief description of changes
## Motivation
Why is this change needed?
## Changes
- Change 1
- Change 2
## Testing
How were these changes tested?
## Checklist
- [ ] Validation scripts pass
- [ ] Documentation updated
- [ ] No sensitive information included- A maintainer will review your PR
- Address any requested changes
- Once approved, a maintainer will merge
- Use ATX-style headers (
#,##, etc.) - Use fenced code blocks with language identifiers
- Use tables for structured data
- Keep lines under 120 characters when practical
- Use blank lines to separate sections
---
id: TYPE-YYYY-MM-DD-NNN
title: Clear, descriptive title
status: draft | accepted | deprecated
created: YYYY-MM-DD
# Additional fields as needed
---DevTrail documents:
[TYPE]-[YYYY-MM-DD]-[NNN]-[description].md
- Use lowercase for description
- Use hyphens to separate words
- Keep descriptions concise but clear
- Use clear variable names
- Add comments for complex logic
- Follow shell/PowerShell best practices
If you're proposing a new document type:
-
Create the template
- Add
TEMPLATE-NEWTYPE.mdtodist/.devtrail/templates/ - Follow existing template patterns
- Add
-
Update governance docs
dist/.devtrail/00-governance/DOCUMENTATION-POLICY.mddist/.devtrail/00-governance/AGENT-RULES.mddist/.devtrail/QUICK-REFERENCE.md
-
Update agent configs
dist/dist-templates/directives/(distribution templates)
-
Update validation
dist/scripts/pre-commit-docs.shdist/scripts/validate-docs.ps1dist/.github/workflows/docs-validation.yml
-
Document the change
- Create an ADR explaining the new type
- Update the README if needed
Templates should include:
- Complete YAML front-matter with all fields
- Clear section headers
- Placeholder text explaining what goes in each section
- Examples where helpful
- Be clear and unambiguous
- Use tables for reference information
- Include examples
- Keep rules actionable
The DevTrail CLI is written in Rust and located in the cli/ directory.
cd cli
cargo buildcd cli
cargo testcd cli
cargo build --releaseThe release binary is optimized with LTO and stripped for minimal size.
cli/src/
├── main.rs # Entry point + clap CLI definition
├── commands/
│ ├── mod.rs # Subcommand routing
│ ├── init.rs # devtrail init [path]
│ ├── update.rs # devtrail update
│ ├── remove.rs # devtrail remove [--full]
│ ├── update_cli.rs # devtrail update-cli
│ └── about.rs # devtrail about
├── config.rs # Config and checksums management
├── download.rs # GitHub Releases download
├── inject.rs # Directive file injection (markers)
├── manifest.rs # dist-manifest.yml parsing
├── platform.rs # OS/arch detection for binary downloads
├── self_update.rs # CLI binary self-update logic
└── utils.rs # Helpers (hashing, colors, paths)
If you have questions about contributing:
- Check existing Issues
- Check Discussions
- Open a new Discussion for general questions
- Open an Issue for specific bugs or features
Contributors are recognized in:
- GitHub's contributor graph
- Release notes for significant contributions
- CONTRIBUTORS.md (for recurring contributors)
Thank you for helping make DevTrail better!
DevTrail — Because every change tells a story.