ADR-056: Action-Level Task Tracking Protocol
Status
ACCEPTED - January 5, 2026
Context
Current State
CODITECT uses a track-based task nomenclature system (ADR-054) for project planning:
- Task IDs follow format:
Track.Section.Task[.Subtask](e.g., A.9.1.3) - Tasks are tracked in PILOT-PARALLEL-EXECUTION-PLAN.md (SSOT)
- Cloud sync (ADR-053) enables TaskTracking model synchronization
Problem Statement
When AI agents execute tasks, individual tool calls (Bash, Read, Edit, Glob, Grep) are not correlated to their parent task IDs. This creates:
- Lost Audit Trail: Cannot determine which actions were taken for which task
- Session Log Gaps: Actions appear without context in session logs
- Retrospective Blind Spots: Cannot analyze task execution patterns
- Cloud Sync Limitations: TaskTracking model cannot link to specific actions
Observed Anti-Pattern
# Agent executes task A.9.1.3 but tool calls lack context:
Bash(description="Check migration status") # What task?
Bash(description="List files in directory") # Why?
Bash(description="Run Django command") # For which goal?
Requirements
- Traceability: Every tool call must be traceable to a task ID
- Automation: Protocol must be enforceable via hooks
- Consistency: Same format across all tool types
- Backward Compatibility: Existing tasks continue to work
- Platform-Wide: Applies to all CODITECT-managed projects
Decision
We adopt Action-Level Task Tracking as Automation Principle #12 with the following protocol:
Protocol Format
Every tool call description MUST include the task ID prefix:
{Task ID}: {Action Description}
Tool-Specific Patterns
| Tool | Pattern |
|---|---|
| Bash | Bash(description="{Task ID}: {action}") |
| Read | State in response: "Reading for {Task ID}" |
| Edit | State in response: "{Task ID}: Updated X" |
| Write | State in response: "{Task ID}: Created X" |
| Glob/Grep | State in response: "{Task ID}: Searching for X" |
| Task | Include task ID in prompt context |
Examples
Correct:
Bash(description="A.9.1.3: Check if migration is applied to production")
Bash(description="A.9.1.3: Run Django migrate for context app")
Bash(description="F.5.4: Create ADR-056 for action-level tracking")
Incorrect:
Bash(description="Check migration status") # Missing task ID
Bash(description="List files") # Too generic
Bash(description="Run command") # No context
Enforcement Levels
| Level | Behavior |
|---|---|
warn | Log warning, allow operation (default) |
soft | Display warning to user, allow operation |
strict | Block operation until task ID provided |
Hook Implementation
# hooks/task-tracking-enforcer.py (PreToolUse)
# Validates Bash description parameter starts with task ID pattern
# Pattern: [A-Z]+ . d+( . d+)*:
TASK_ID_PREFIX = re.compile(r'^[A-Z]+\.\d+(\.\d+)*:\s')
def validate_bash_description(description: str) -> bool:
return TASK_ID_PREFIX.match(description) is not None
Consequences
Positive
- Complete Audit Trail: Every action linked to its parent task
- Automated Session Logs:
/session-logauto-correlates actions - Retrospective Intelligence: Analyze task execution patterns
- Cloud Sync Ready: TaskTracking model can link to actions
- Quality Improvement: Identify inefficient task execution
Negative
- Verbosity: Descriptions become longer
- Learning Curve: Agents must adopt new pattern
- Enforcement Overhead: Hook runs on every Bash call
Neutral
- Migration: Existing sessions unaffected (forward-only)
- Optional Strictness: Teams choose enforcement level
Implementation
Phase 1: Documentation (Completed)
- Update
CLAUDE.mdSection 2 with protocol - Add Principle #12 to
CODITECT-STANDARD-AUTOMATION.md - Update
rollout-master/CLAUDE.mdreference - Create this ADR
Phase 2: Hook Enhancement (Pending)
- Update
task-tracking-enforcer.pyto validate Bash descriptions - Add
--levelflag support (warn/soft/strict) - Add metrics collection for compliance rate
Phase 3: Cloud Integration (Pending)
- Link task actions to TaskTracking model
- Enable action-level reporting in cloud dashboard
- Add retrospective analysis queries
Compliance
This ADR establishes Automation Principle #12 in:
coditect-core-standards/CODITECT-STANDARD-AUTOMATION.mdcoditect-core/CLAUDE.mdSection 2rollout-master/CLAUDE.mdTrack Nomenclature section
All CODITECT-managed projects inherit this protocol via symlink architecture.
Related
- ADR-053: Cloud Context Sync Architecture
- ADR-054: Track Nomenclature Extensibility
- Standard: CODITECT-STANDARD-AUTOMATION.md (Principle #12)
- Standard: CODITECT-STANDARD-TRACK-NOMENCLATURE.md
- Hook:
hooks/task-tracking-enforcer.py
Version: 1.0.0 Author: Hal Casteel Approved By: Platform Architecture Team