CODITECT Task ID Protocol Standard
1. Overview
Purpose
The Task ID Protocol defines how task identifiers must be used in all CODITECT tool invocations, ensuring traceability, audit trails, and cloud synchronization of work items.
Scope
This standard applies to:
- All tool calls (
Bash,Edit,Write,Task, etc.) - Agent invocations (
/agent,Task(subagent_type=...)) - Automated scripts and hooks
- Cloud sync operations
Related Documents
| Document | Defines |
|---|---|
| CODITECT-STANDARD-TRACK-NOMENCLATURE.md | Task ID format, tracks, tiers |
| CODITECT-STANDARD-AUTOMATION.md | Principle #12: Action-Level Task Tracking |
| ADR-054 | Extensibility architecture |
| ADR-074 | Governance hooks |
2. Task ID Format
Syntax
<Track>.<Section>.<Task>[.<Subtask>]
Validation Regex
^[A-Z]\.\d+\.\d+(\.\d+)?$
Examples
A.9.1 # Backend, Section 9, Task 1
B.2.3.1 # Frontend, Section 2, Task 3, Subtask 1
H.5.7.1 # Track H, Section 5, Task 7, Subtask 1
Full format specification: CODITECT-STANDARD-TRACK-NOMENCLATURE.md § 2
3. Tool Call Requirements
Format
Every tool call description MUST include the task ID:
{Task ID}: {Action Description}
By Tool Type
| Tool | Format | Example |
|---|---|---|
| Bash | Bash(description="{TaskID}: {action}") | Bash(description="A.9.1.3: Run Django migrate") |
| Edit | Edit(description="{TaskID}: {change}") | Edit(description="H.5.7.1: Update schema") |
| Write | Write(description="{TaskID}: {file}") | Write(description="F.2.1: Create API docs") |
| Task | Task(description="{TaskID}: {agent task}") | Task(description="A.3.1: Design auth service") |
| Read | Comment in context | // Reading for A.9.1.3 |
| Glob/Grep | Comment in context | // H.5.7.1: Finding schema files |
Correct vs. Incorrect
# ❌ WRONG - No task ID
Bash(description="Check migration status")
Edit(description="Update the database schema")
Task(description="Design authentication")
# ✅ CORRECT - Task ID included
Bash(description="A.9.1.3: Check migration status")
Edit(description="H.5.7.1: Update the database schema")
Task(description="A.3.1: Design authentication service")
4. Enforcement
Governance Hooks
Task ID enforcement is automatic via Claude Code hooks:
| Hook | Type | Purpose | File |
|---|---|---|---|
task_id_validator.py | PreToolUse | Validates task ID presence | hooks/task_id_validator.py |
task-tracking-enforcer.py | PreToolUse:TodoWrite | Validates track nomenclature | hooks/task-tracking-enforcer.py |
Enforcement Levels
| Level | Behavior | Configuration |
|---|---|---|
| strict | Block operations without task IDs | "enforcement": "strict" |
| soft | Warn but allow (default) | "enforcement": "soft" |
| off | No enforcement | "enforcement": "off" |
Configuration
File: ~/.coditect/config/governance.json
{
"task_id_protocol": {
"enforcement": "soft",
"tools": ["Bash", "Edit", "Write", "Task"],
"exclude_patterns": [
"git status",
"ls ",
"cat "
]
}
}
5. Cloud Sync Integration
How Task IDs Enable Cloud Sync
Tool Call with Task ID
↓
task_id_validator.py extracts task ID
↓
Local SQLite (context.db) → task_tracking table
↓
Cloud Sync → api.coditect.ai/api/v1/context/tasks/
↓
Multi-tenant TaskTracking model (django-multitenant)
Database Schema
-- Local SQLite (context.db)
CREATE TABLE task_tracking (
id INTEGER PRIMARY KEY,
task_id TEXT NOT NULL, -- e.g., "A.9.1.3"
session_id TEXT NOT NULL,
action_type TEXT, -- Bash, Edit, Write, Task
description TEXT,
started_at TEXT,
completed_at TEXT,
status TEXT DEFAULT 'in_progress',
sync_status TEXT DEFAULT 'pending'
);
CREATE INDEX idx_task_id ON task_tracking(task_id);
Sync Status Values
| Status | Meaning |
|---|---|
pending | Queued for sync |
synced | Successfully synced to cloud |
failed | Sync failed, will retry |
offline | Created offline, pending connectivity |
6. Agent Invocation Protocol
CODITECT Agents
/agent <agent-name> "{TaskID}: {task description}"
Example:
/agent senior-architect "A.3.1: Design authentication service with OAuth2 support"
/agent codi-documentation-writer "F.2.1: Create API reference for auth endpoints"
Claude Code Built-in Agents
Task(
subagent_type="<type>",
description="{TaskID}: {description}",
prompt="..."
)
Example:
Task(
subagent_type="general-purpose",
description="H.5.7.1: Implement hash-based change tracking",
prompt="Create the platform-index.db schema..."
)
7. Session Workflow
Start of Session
/orient # Loads PILOT plan
/cxq --decisions --recent 10 # Review recent decisions
During Work
# Every tool call includes task ID
1. Bash(description="A.9.1.3: Run migrations")
2. Edit(description="A.9.1.3: Update model fields")
3. Task(description="A.9.1.4: Test migration rollback")
End of Session
/cx # Extract context (auto-tracks task IDs)
/export # Export session (includes task references)
8. Benefits
Why Task IDs Are Required
| Benefit | Description |
|---|---|
| Audit Trail | Every action linked to a specific task |
| Session Logs | Auto-correlate actions to work items |
| Retrospective Analysis | Understand task execution patterns |
| Cloud Sync | Required for TaskTracking model sync |
| Multi-Agent Coordination | Track which agent worked on what |
| Progress Reporting | Automatic task completion detection |
9. Exceptions
When Task ID Can Be Omitted
| Scenario | Example |
|---|---|
| Exploratory read | Reading CLAUDE.md for context |
| Status check | git status without active task |
| Session orientation | /orient command |
| Help commands | /help, /which |
Configuring Exceptions
{
"task_id_protocol": {
"exclude_patterns": [
"git status",
"git log",
"ls -la",
"cat CLAUDE.md",
"/orient",
"/help",
"/which"
]
}
}
10. Quick Reference
Cheat Sheet
# Format
{Track}.{Section}.{Task}[.{Subtask}]: {Action}
# Examples
A.9.1: Run database migration
B.2.3.1: Create button component
H.5.7.1: Index framework components
# Agent invocation
/agent senior-architect "A.3.1: Design auth service"
# Tool call
Bash(description="A.9.1.3: Apply migration")
Edit(description="A.9.1.3: Update User model")
Write(description="F.2.1: Create API docs")
Task(description="E.1.1: Run test suite")
Validation Command
# Validate task ID format
python3 -c "
import re
task_id = 'A.9.1.3'
pattern = r'^[A-Z]\.\d+\.\d+(\.\d+)?$'
print('Valid' if re.match(pattern, task_id) else 'Invalid')
"
11. References
- CODITECT-STANDARD-TRACK-NOMENCLATURE.md - Full track system
- CODITECT-STANDARD-AUTOMATION.md - Principle #12
- ADR-054 - Extensibility
- ADR-074 - Governance hooks
- ADR-053 - Cloud sync
Standard Owner: AZ1.AI INC Maintained By: Hal Casteel License: Proprietary (CODITECT Framework) Status: Active Next Review: 2026-04-23 (quarterly)