TC Tracker
Track every code change with structured JSON records, an enforced state machine, and a session handoff format that lets a new AI session resume work cleanly when a previous one expires.
Overview
A Technical Change (TC) is a structured record that captures what changed, why it changed, who changed it, when it changed, how it was tested, and where work stands for the next session. Records live as JSON in docs/TC/ inside the target project, validated against a strict schema and a state machine.
Use this skill when the user:
- Asks to "track this change" or wants an audit trail for code modifications
- Wants to hand off in-progress work to a future AI session
- Needs structured release notes that go beyond commit messages
- Onboards an existing project and wants retroactive change documentation
- Asks for
/tc init,/tc create,/tc update,/tc status,/tc resume, or/tc close
Do NOT use this skill when:
- The user only wants a changelog from git history (use
engineering/changelog-generator) - The user only wants to track tech debt items (use
engineering/tech-debt-tracker) - The change is trivial (typo, formatting) and won't affect behavior
Storage Layout
Each project stores TCs at {project_root}/docs/TC/:
TC ID Convention
- Parent TC:
TC-NNN-MM-DD-YY-functionality-slug(e.g.,TC-001-04-05-26-user-authentication) - Sub-TC:
TC-NNN.AorTC-NNN.A.1(letter = revision, digit = sub-revision) NNNis sequential,MM-DD-YYis the creation date, slug is kebab-case.
State Machine
See references/lifecycle.md [blocked] for the full transition table and recovery flows.
Workflow Commands
The skill ships five Python scripts that perform deterministic, stdlib-only operations on TC records. Each one supports --help and --json.
1. Initialize tracking in a project
Creates docs/TC/, docs/TC/records/, docs/TC/evidence/, tc_config.json, and tc_registry.json. Idempotent — re-running reports "already initialized" with current stats.
2. Create a new TC record
Generates the next sequential TC ID, creates the record directory, writes a fully populated tc_record.json (status planned, R1 creation revision), and updates the registry.
3. Update a TC record
Every change appends a sequential R<n> revision entry, refreshes updated, and re-validates against the schema before writing atomically (.tmp then rename).
4. View status
5. Validate a record or registry
Validator enforces the schema, checks state-machine legality, verifies sequential R<n> and T<n> IDs, and asserts approval consistency (approved=true requires approved_by and approved_date).
See references/tc-schema.md [blocked] for the full schema.
Slash-Command Dispatcher
The repo ships a /tc slash command at commands/tc.md that dispatches to these scripts based on subcommand:
The slash command is the user interface; the Python scripts are the engine.
Session Handoff Format
The handoff block lives at session_context.handoff inside each TC and is the single most important field for AI continuity. It contains:
progress_summary— what has been donenext_steps— ordered list of remaining actionsblockers— anything preventing progresskey_context— critical decisions, gotchas, patterns the next bot must knowfiles_in_progress— files being edited and their state (editing,needs_review,partially_done,ready)decisions_made— architectural decisions with rationale and timestamp
See references/handoff-format.md [blocked] for the full structure and fill-out rules.
Validation Rules (Always Enforced)
- State machine — only valid transitions are allowed.
- Sequential IDs —
revision_historyusesR1, R2, R3...;test_casesusesT1, T2, T3.... - Append-only history — revision entries are never modified or deleted.
- Approval consistency —
approved=truerequiresapproved_byandapproved_date. - TC ID format — must match
TC-NNN-MM-DD-YY-slug. - Sub-TC ID format — must match
TC-NNN.AorTC-NNN.A.N. - Atomic writes — JSON is written to
.tmpthen renamed. - Registry stats — recomputed on every registry write.
Non-Blocking Bookkeeping Pattern
TC tracking must NOT interrupt the main workflow.
- Never stop to update TC records inline. Keep coding.
- At natural milestones, spawn a background subagent to update the record.
- Surface questions only when genuinely needed ("This work doesn't match any active TC — create one?"), and ask once per session, not per file.
- At session end, write a final handoff block before closing.
Retroactive Bulk Creation
For onboarding an existing project with undocumented history, build a retro_changelog.json (one entry per logical change) and feed it to tc_create.py in a loop, or extend the script for batch mode. Group commits by feature, not by file.
Anti-Patterns
Cross-References
engineering/changelog-generator— Generates Keep-a-Changelog release notes from Conventional Commits. Pair it with TC tracker: TC for the granular per-change audit trail, changelog for user-facing release notes.engineering/tech-debt-tracker— For tracking long-lived debt items rather than discrete code changes.engineering/focused-fix— When a bug fix needs systematic feature-wide repair, run/focused-fixfirst then capture the result as a TC.project-management/decision-log— Architectural decisions made inside a TC'sdecisions_madeblock can also be promoted to a project-wide decision log.engineering-team/code-reviewer— Pre-merge review fits naturally into thetested -> deployedtransition; capture the reviewer inapproval.approved_by.
References in This Skill
- references/tc-schema.md [blocked] — Full JSON schema for TC records and the registry.
- references/lifecycle.md [blocked] — State machine, valid transitions, and recovery flows.
- references/handoff-format.md [blocked] — Session handoff structure and best practices.


