Skip to content

Commit bd68265

Browse files
montfortclaude
andcommitted
feat: implement Fase 4 — audit command, C4 Model guide, and ecosystem docs (#27)
Add `devtrail audit` command with timeline, traceability map (BFS), risk distribution, and compliance summary. Supports text, markdown, json, and html (with SVG pie chart) output formats. Framework additions: C4-DIAGRAM-GUIDE.md (EN+ES), api_changes/api_spec_path fields in ADR/REQ templates, C4 and API tracking rules in AGENT-RULES.md. Bump versions to fw-4.0.0 / cli-2.1.0. Add CHANGELOG.md covering all 4 phases. Update README, CLI-REFERENCE, and plan-implementacion.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ea5e894 commit bd68265

31 files changed

Lines changed: 2275 additions & 53 deletions

File tree

CHANGELOG.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Changelog
2+
3+
All notable changes to DevTrail will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project uses [independent versioning](README.md#versioning) for Framework (`fw-`) and CLI (`cli-`).
7+
8+
---
9+
10+
## Framework 4.0.0 / CLI 2.1.0 — Phase 4: Advanced Automation & Ecosystem
11+
12+
### Added (CLI)
13+
- **`devtrail audit`** command — Generate audit trail reports with timeline, traceability map, risk distribution, and compliance summary
14+
- Output formats: text (colored terminal), markdown, json, html (with SVG pie chart)
15+
- Filters: `--from`/`--to` date range, `--system` component filter
16+
- Traceability graph built from document `related:` fields using BFS
17+
18+
### Added (Framework)
19+
- **C4-DIAGRAM-GUIDE.md** — Complete guide for C4 Model diagrams with Mermaid syntax (EN + ES)
20+
- Examples for all 4 levels: Context, Container, Component, Code
21+
- PlantUML alternative syntax
22+
- Integration guidance for ADR and REQ documents
23+
- `api_changes` field in TEMPLATE-ADR.md frontmatter for tracking API endpoint changes
24+
- `api_spec_path` field in TEMPLATE-REQ.md frontmatter for OpenAPI/AsyncAPI spec references
25+
- Architecture Diagram section in TEMPLATE-ADR.md with Mermaid C4 placeholder
26+
- Sections 10 (C4 Model) and 11 (API Specification Tracking) in AGENT-RULES.md
27+
- Terminal compatibility notes in skill files for box-drawing character fallback
28+
- Canonical source comment in docs-validation.yml for document type list
29+
30+
### Changed
31+
- QUICK-REFERENCE.md: Added C4 Model reference to regulatory alignment table
32+
- Version bumps: Framework 3.2.0 → 4.0.0, CLI 2.0.0 → 2.1.0
33+
- Updated CLI-REFERENCE.md, README.md with 13 commands (EN + ES)
34+
35+
---
36+
37+
## Framework 3.2.0 / CLI 2.0.0 — Phase 3: Compliance Automation & Metrics
38+
39+
### Added (CLI)
40+
- **`devtrail compliance`** command — Check regulatory compliance (EU AI Act, ISO 42001, NIST AI RMF)
41+
- Output formats: text, markdown, json
42+
- Per-standard or `--all` mode with percentage scores
43+
- **`devtrail metrics`** command — Governance metrics and documentation statistics
44+
- Period filtering, review compliance rate, risk distribution, agent activity, trends
45+
46+
### Added (Framework)
47+
- AI-RISK-CATALOG.md — Risk catalog mapped to 12 NIST AI 600-1 categories + ISO 42001 Annex C
48+
- AI-LIFECYCLE-TRACKER.md — AI system lifecycle tracking mapped to ISO 42001 Annex A.6
49+
- AI-KPIS.md — Governance KPI tracking template
50+
- MANAGEMENT-REVIEW-TEMPLATE.md — ISO 42001 Clause 9.3 review agenda
51+
- OBSERVABILITY-GUIDE.md — OpenTelemetry integration guide with 10 sections (EN + ES)
52+
- NIST AI RMF implementation guides: MAP, MEASURE, MANAGE, GOVERN
53+
- NIST-AI-600-1-GENAI-RISKS.md — Detailed 12 GenAI risk categories
54+
55+
---
56+
57+
## Framework 3.1.0 / CLI 1.4.0 — Phase 2: New Document Types & Validation
58+
59+
### Added (CLI)
60+
- **`devtrail validate`** command — Validate documents with 13 rules (NAMING, META, CROSS, TYPE, REF, SEC, OBS)
61+
- `--fix` flag for automatic corrections
62+
- Exit code 1 on errors, 0 on warnings-only
63+
- Document parsing engine (`document.rs`) — Shared by validate, compliance, metrics, audit
64+
- Validation engine (`validation.rs`) — Extensible rule-based validation
65+
- Lizard integration (`complexity.rs`) — Cyclomatic complexity analysis
66+
67+
### Added (Framework)
68+
- **TEMPLATE-SEC.md** — Security Assessment (STRIDE threat model, OWASP ASVS)
69+
- **TEMPLATE-MCARD.md** — Model/System Card (Mitchell et al. 2019)
70+
- **TEMPLATE-SBOM.md** — Software Bill of Materials (SPDX/CycloneDX aligned)
71+
- **TEMPLATE-DPIA.md** — Data Protection Impact Assessment (GDPR Art. 35)
72+
- Skills: `/devtrail-sec`, `/devtrail-mcard` (Claude, Gemini, generic agent)
73+
- Updated `/devtrail-new` and `/devtrail-status` for 12 document types
74+
- Compliance CI jobs in docs-validation.yml
75+
76+
---
77+
78+
## Framework 3.0.0 / CLI 1.3.0 — Phase 1: Regulatory Base & Standards Update
79+
80+
### Changed (Framework)
81+
- **IEEE 830 → ISO/IEC/IEEE 29148:2018** in TEMPLATE-REQ.md (External Interfaces, V&V, Traceability)
82+
- **ISO/IEC 25010:2011 → 2023** in TEMPLATE-ADR.md and TEMPLATE-REQ.md (9 quality characteristics)
83+
- **ISO/IEC/IEEE 29119-3:2021** alignment in TEMPLATE-TES.md (3-level hierarchy, 29119 terminology)
84+
- Regulatory fields added to all templates: `eu_ai_act_risk`, `nist_genai_risks`, `iso_42001_clause`
85+
- OpenTelemetry optional sections in TEMPLATE-REQ, TEMPLATE-TES, TEMPLATE-INC, TEMPLATE-AILOG
86+
87+
### Added (Framework)
88+
- **AI-GOVERNANCE-POLICY.md** — ISO 42001 Clauses 4-10 governance template
89+
- **ISO-25010-2023-REFERENCE.md** — Quality characteristics reference
90+
- EU AI Act, NIST GenAI, GDPR sections in ETH, INC, and AILOG templates
91+
- Observability rules in AGENT-RULES.md (Section 9)
92+
- Expanded agent directives with pre-commit checklists
93+
- New folders: `08-security/`, `09-ai-models/`
94+
95+
### Added (CLI)
96+
- Support for 12 document types (was 8): SEC, MCARD, SBOM, DPIA
97+
- New directories in `init`, `status`, `repair`, `explore`
98+
99+
### Changed (CLI)
100+
- Cross-validation rules in pre-commit hooks and CI
101+
102+
---
103+
104+
*DevTrail is maintained by [Strange Days Tech](https://strangedays.tech).*

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ DevTrail uses independent version tags for each component:
146146

147147
| Component | Tag prefix | Example | Includes |
148148
|-----------|-----------|---------|----------|
149-
| Framework | `fw-` | `fw-2.1.0` | Templates, governance, directives, scripts |
150-
| CLI | `cli-` | `cli-1.0.0` | The `devtrail` binary |
149+
| Framework | `fw-` | `fw-4.0.0` | Templates (12 types), governance, directives, scripts |
150+
| CLI | `cli-` | `cli-2.1.0` | The `devtrail` binary |
151151

152152
Check installed versions with `devtrail status` or `devtrail about`.
153153

@@ -162,6 +162,10 @@ Check installed versions with `devtrail status` or `devtrail about`.
162162
| `devtrail remove [--full]` | Remove DevTrail from project |
163163
| `devtrail status [path]` | Show installation health and doc stats |
164164
| `devtrail repair [path]` | Restore missing directories and framework files |
165+
| `devtrail validate [path]` | Validate documents for compliance and correctness |
166+
| `devtrail compliance [path]` | Check regulatory compliance (EU AI Act, ISO 42001, NIST) |
167+
| `devtrail metrics [path]` | Show governance metrics and documentation statistics |
168+
| `devtrail audit [path]` | Generate audit trail reports with timeline and traceability |
165169
| `devtrail explore [path]` | Browse documentation interactively in a TUI |
166170
| `devtrail about` | Show version and license info |
167171

cli/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "devtrail-cli"
3-
version = "2.0.0"
3+
version = "2.1.0"
44
edition = "2021"
55
description = "CLI tool for DevTrail - Documentation Governance for AI-Assisted Development"
66
license = "MIT"

0 commit comments

Comments
 (0)