/audit-trail - Complete Task Traceability
Display full audit trail for any task, showing creation, status changes, agent invocations, commits, and completion evidence.
Usage
# Full audit trail for a task
/audit-trail --task E.1.1
# Audit trail for entire track
/audit-trail --track E
# Today's activity audit
/audit-trail --today
# Date range
/audit-trail --from 2025-12-30 --to 2026-01-02
# Export for compliance
/audit-trail --task E.1.1 --export audit-E.1.1.json
Output Format
AUDIT TRAIL: E.1.1 - Full signup → payment → activation E2E test
═══════════════════════════════════════════════════════════════
Task Metadata
───────────────────────────────────────────────────────────────
Track: E (Integration Testing)
Subtask: E.1 (End-to-End Flow Testing)
Task ID: E.1.1
Title: Full signup → email verify → payment → activation flow
Priority: P0
Owner Agent: testing-specialist
Created: 2025-12-29T10:00:00Z (in PILOT plan v1.5.0)
Timeline
───────────────────────────────────────────────────────────────
2025-12-29T10:00:00Z │ CREATED
│ Added to PILOT-PARALLEL-EXECUTION-PLAN.md
│ Source: Sprint planning session
2026-01-01T22:00:00Z │ STARTED
│ Session: session-8-integration-deployment
│ Agent: Task(subagent_type="testing-specialist")
2026-01-01T22:30:00Z │ IN_PROGRESS
│ Read: conftest.py, test_license_workflow.py
│ Read: coditect_license/urls.py, commerce/urls.py
2026-01-01T23:00:00Z │ COMPLETED
│ File: tests/e2e/test_signup_activation_flow.py
│ Lines: 450 | Tests: 10 | Classes: 3
│ Session Log: SESSION-LOG-2026-01-01.md
Evidence
───────────────────────────────────────────────────────────────
Files Created:
└─ backend/tests/e2e/test_signup_activation_flow.py (450 lines)
Test Classes:
├─ TestSignupToActivationFlow (6 tests)
├─ TestPaymentWebhookReliability (2 tests)
└─ TestMultiTenantActivationFlow (2 tests)
Git Commits:
└─ [pending] Track E.1.1: Add signup-to-activation E2E test
Documentation:
├─ SESSION-LOG-2026-01-01.md (entry at 23:00:00Z)
└─ PILOT-PARALLEL-EXECUTION-PLAN.md (checkbox marked)
Quality Gate
───────────────────────────────────────────────────────────────
✅ File exists: test_signup_activation_flow.py
✅ Tests defined: 10 test methods found
✅ PILOT plan updated: [x] E.1.1 marked complete
✅ Session log entry: Entry found for task completion
⚠️ Git commit: Pending (not yet committed)
Verification Command
───────────────────────────────────────────────────────────────
/pilot --verify E.1.1
Options
| Option | Description |
|---|---|
--task X.Y.Z | Audit trail for specific task |
--track X | Audit trail for entire track |
--today | Today's activity only |
--from DATE | Start date (YYYY-MM-DD) |
--to DATE | End date (YYYY-MM-DD) |
--export FILE | Export to JSON file |
--verbose | Include file contents preview |
--git | Include git log details |
Data Sources
| Source | Purpose |
|---|---|
| PILOT Plan | Task definition, status, agent assignment |
| Session Logs | Activity timestamps, file creation |
| Git History | Commit trail, file changes |
| Test Files | Evidence of implementation |
| Context DB | Agent invocation history |
Compliance Export Format
{
"task_id": "E.1.1",
"title": "Full signup → payment → activation E2E test",
"track": "E",
"timeline": [
{
"timestamp": "2025-12-29T10:00:00Z",
"event": "CREATED",
"actor": "human",
"source": "PILOT-PARALLEL-EXECUTION-PLAN.md"
},
{
"timestamp": "2026-01-01T22:00:00Z",
"event": "STARTED",
"actor": "testing-specialist",
"session": "session-8-integration-deployment"
}
],
"evidence": {
"files": ["tests/e2e/test_signup_activation_flow.py"],
"tests": 10,
"commits": [],
"documentation": ["SESSION-LOG-2026-01-01.md"]
},
"quality_gate": {
"file_exists": true,
"tests_defined": true,
"plan_updated": true,
"log_entry": true,
"committed": false
}
}
Related Commands
/pilot --verify- Verify task completion/pilot --dashboard- Progress dashboard/quality-gate- Run quality checks/context-snapshot- Capture session state
Success Output
When audit trail generation completes:
✅ COMMAND COMPLETE: /audit-trail
Task: <task-id>
Events: N timeline entries
Evidence: M files
Quality Gate: X/Y passed
Completion Checklist
Before marking complete:
- Task metadata retrieved
- Timeline events collected
- Evidence files identified
- Quality gate status displayed
Failure Indicators
This command has FAILED if:
- ❌ Task ID not found
- ❌ PILOT plan not accessible
- ❌ Session logs missing
- ❌ Invalid date range
When NOT to Use
Do NOT use when:
- Task doesn't exist yet
- Need quick status (use /pilot --status)
- Informal work not in PILOT plan
Anti-Patterns (Avoid)
| Anti-Pattern | Problem | Solution |
|---|---|---|
| Skip quality gate | Miss incomplete work | Always review gate status |
| Ignore pending commits | Lost evidence | Commit before auditing |
| Broad date range | Too much noise | Focus on specific tasks |
Principles
This command embodies:
- #9 Based on Facts - Multi-source evidence
- #3 Complete Execution - Full timeline capture
- #6 Clear, Understandable - Structured audit format
Full Standard: CODITECT-STANDARD-AUTOMATION.md
Command Version: 1.0.0 Created: 2026-01-02 Author: CODITECT Process Refinement