Patterns and cadences for using DevTrail day to day.
Languages: English | Español | 简体中文
- After Initial Setup
- Daily Development
- Keeping DevTrail Updated
- Checking Project Health
- Using Skills (Active Documentation)
- Team Patterns
- Understanding Versions
You ran devtrail init . and committed the result. Now what?
- Open your project with your AI coding assistant (Claude Code, Cursor, Gemini CLI, etc.)
- The assistant will automatically read the DevTrail directives (
CLAUDE.md,GEMINI.md, etc.) - From this point on, the assistant creates documentation in
.devtrail/as part of its normal workflow - No extra configuration needed — DevTrail works passively through the directive files
- Work normally with your AI assistant — write features, fix bugs, refactor
- The AI creates documents in
.devtrail/according to the governance rules:- AILOG for significant implementations (>10 lines changed)
- AIDEC when choosing between alternatives
- ADR for architectural decisions
- ETH when ethical concerns arise
- Review documents flagged with
review_required: true - Commit documentation together with the corresponding code changes
Use the active system (skills) when:
- The AI missed documenting a significant change
- You (a human) made a decision that should be recorded
- You want to create a REQ, TES, TDE, or INC document
- You want to check documentation compliance
- Monthly or when you see a new release on GitHub
- Check the releases page for changelogs
| Goal | Command |
|---|---|
| Update both framework and CLI | devtrail update |
| Update only templates and governance files | devtrail update-framework |
| Update only the CLI binary | devtrail update-cli |
Framework and CLI have independent versions — you can update one without the other. See Understanding Versions.
- Review changes to directive files and governance docs
- Commit the updated files:
git add .devtrail/ && git commit -m "chore: update DevTrail framework" - If you customized any framework files, check for conflicts
devtrail statusShows: framework version, CLI version, directory structure integrity, and document statistics by type. Use it to verify that the installation is healthy.
/devtrail-statusThe /devtrail-status skill (available in Claude Code and Gemini CLI) analyzes:
- Which recent code changes lack corresponding documentation
- Document compliance against governance rules
- Overall documentation health
DevTrail has two documentation systems:
| System | How it works | When to use |
|---|---|---|
| Passive | AI auto-documents via directive files | Default — happens automatically |
| Active | User invokes skills to create docs | When passive missed something, or for human decisions |
| Skill | Purpose |
|---|---|
/devtrail-status |
Check documentation compliance |
/devtrail-new |
Create any document type (suggests best fit) |
/devtrail-ailog |
Quick AILOG creation |
/devtrail-aidec |
Quick AIDEC creation |
/devtrail-adr |
Quick ADR creation |
For full skill details, see the README.
- Check that significant code changes include corresponding
.devtrail/documents - Review any documents with
review_required: true - Verify that AILOGs accurately describe what the AI did
- Point them to
.devtrail/QUICK-REFERENCE.mdfor a quick overview - Have them read recent ADRs to understand architectural context
- Show them AILOGs from recent features to see how documentation works in practice
- Review AILOGs and AIDECs from the sprint to understand AI contribution patterns
- Identify undocumented decisions that should have been recorded
- Check TDE documents for accumulating technical debt
When multiple team members use AI assistants on the same project:
- Each assistant session produces its own documents
- The
agentfield in metadata identifies which assistant created each document - Review overlapping or contradictory AIDECs during PR review
If your project operates in mainland China or processes personal information of mainland China users, enable the China scope and follow this workflow.
- Edit
.devtrail/config.ymland addchinatoregional_scope:regional_scope: - global - eu # if also EU-subject - china
- Run
devtrail compliance --region chinato see the baseline (all checks will fail until you create the supporting documents). - Read the guides installed under
.devtrail/00-governance/:CHINA-REGULATORY-FRAMEWORK.md— overview and coverage matrixTC260-IMPLEMENTATION-GUIDE.md— five-level risk gradingPIPL-PIPIA-GUIDE.md— when a PIPIA is required and what it must containCAC-FILING-GUIDE.md— single vs dual filing, status lifecycleGB-45438-LABELING-GUIDE.md— explicit + implicit labeling design
Bundle of documents to create together (cross-linked via related:):
| Document | Purpose | Required when |
|---|---|---|
MCARD |
Model card with cac_filing_required, gb45438_applicable, tc260_risk_level |
Always for in-scope models |
TC260RA |
Risk grading (scenario × intelligence × scale → 5 levels) | Always |
AILABEL |
Explicit + implicit labeling per GB 45438 | When the model generates content |
CACFILE |
Algorithm filing record | When cac_filing_required: true |
PIPIA |
Personal-info impact assessment (Art. 55-56) | When personal info is processed |
SBOM |
Training-data inventory + GB/T 45652 compliance | Always |
devtrail compliance --region china confirms the bundle is complete.
The INC template includes a CSL 2026 Incident Reporting section. Set:
csl_severity_level: relatively_major # or particularly_serious | major | general
csl_report_deadline_hours: 4 # 1 for particularly_serious, 4 for relatively_majordevtrail validate enforces severity-to-deadline coherence (CROSS-008, CROSS-009). Major+ incidents must be closed (status accepted) within 30 days for the CSL-003 check to pass.
When a process involves transferring personal information out of mainland China, set pipl_cross_border_transfer: true on the PIPIA and document the chosen mechanism (CAC security assessment / certification / standard contract) in the Cross-Border Transfer Analysis section. CROSS-011 will warn if none is documented.
# Before merging a feature branch that touches AI services
devtrail validate # cross-rules including CROSS-004..011
devtrail compliance --region china # per-framework scoreDevTrail uses independent versioning for its two components:
| Component | Tag prefix | Contains | Updated via |
|---|---|---|---|
| Framework | fw- |
Templates, governance docs, directives, scripts | devtrail update-framework |
| CLI | cli- |
The devtrail binary |
devtrail update-cli |
- Framework changes (new templates, updated rules) are more frequent
- CLI changes (new commands, bug fixes) follow a different cadence
- You can update governance docs without needing a new CLI binary
devtrail about # Quick version check
devtrail status # Full health report including versionsFor detailed CLI information, see the CLI Reference.
DevTrail — Because every change tells a story.