Skip to main content

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
DocumentDefines
CODITECT-STANDARD-TRACK-NOMENCLATURE.mdTask ID format, tracks, tiers
CODITECT-STANDARD-AUTOMATION.mdPrinciple #12: Action-Level Task Tracking
ADR-054Extensibility architecture
ADR-074Governance 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

ToolFormatExample
BashBash(description="{TaskID}: {action}")Bash(description="A.9.1.3: Run Django migrate")
EditEdit(description="{TaskID}: {change}")Edit(description="H.5.7.1: Update schema")
WriteWrite(description="{TaskID}: {file}")Write(description="F.2.1: Create API docs")
TaskTask(description="{TaskID}: {agent task}")Task(description="A.3.1: Design auth service")
ReadComment in context// Reading for A.9.1.3
Glob/GrepComment 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:

HookTypePurposeFile
task_id_validator.pyPreToolUseValidates task ID presencehooks/task_id_validator.py
task-tracking-enforcer.pyPreToolUse:TodoWriteValidates track nomenclaturehooks/task-tracking-enforcer.py

Enforcement Levels

LevelBehaviorConfiguration
strictBlock operations without task IDs"enforcement": "strict"
softWarn but allow (default)"enforcement": "soft"
offNo 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

StatusMeaning
pendingQueued for sync
syncedSuccessfully synced to cloud
failedSync failed, will retry
offlineCreated 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

BenefitDescription
Audit TrailEvery action linked to a specific task
Session LogsAuto-correlate actions to work items
Retrospective AnalysisUnderstand task execution patterns
Cloud SyncRequired for TaskTracking model sync
Multi-Agent CoordinationTrack which agent worked on what
Progress ReportingAutomatic task completion detection

9. Exceptions

When Task ID Can Be Omitted

ScenarioExample
Exploratory readReading CLAUDE.md for context
Status checkgit 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


Standard Owner: AZ1.AI INC Maintained By: Hal Casteel License: Proprietary (CODITECT Framework) Status: Active Next Review: 2026-04-23 (quarterly)