tc-tracker
Original:🇺🇸 English
Translated
5 scripts
Use when the user asks to track technical changes, create change records, manage TC lifecycles, or hand off work between AI sessions. Covers init/create/update/status/resume/close/export workflows for structured code change documentation.
7installs
Added on
NPX Install
npx skill4agent add alirezarezvani/claude-skills tc-trackerTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →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 inside the target project, validated against a strict schema and a state machine.
docs/TC/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, or/tc resume/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/docs/TC/
├── tc_config.json # Project settings
├── tc_registry.json # Master index + statistics
├── records/
│ └── TC-001-04-05-26-user-auth/
│ └── tc_record.json # Source of truth
└── evidence/
└── TC-001/ # Log snippets, command output, screenshotsTC ID Convention
- Parent TC: (e.g.,
TC-NNN-MM-DD-YY-functionality-slug)TC-001-04-05-26-user-authentication - Sub-TC: or
TC-NNN.A(letter = revision, digit = sub-revision)TC-NNN.A.1 - is sequential,
NNNis the creation date, slug is kebab-case.MM-DD-YY
State Machine
planned -> in_progress -> implemented -> tested -> deployed
| | | | |
+-> blocked -+ +- in_progress <-------+
| (rework / hotfix)
+-> plannedSee references/lifecycle.md 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 and .
--help--json1. Initialize tracking in a project
bash
python3 scripts/tc_init.py --project "My Project" --root .Creates , , , , and . Idempotent — re-running reports "already initialized" with current stats.
docs/TC/docs/TC/records/docs/TC/evidence/tc_config.jsontc_registry.json2. Create a new TC record
bash
python3 scripts/tc_create.py \
--root . \
--name "user-authentication" \
--title "Add JWT-based user authentication" \
--scope feature \
--priority high \
--summary "Adds JWT login + middleware" \
--motivation "Required for protected endpoints"Generates the next sequential TC ID, creates the record directory, writes a fully populated (status , R1 creation revision), and updates the registry.
tc_record.jsonplanned3. Update a TC record
bash
# Status transition (validated against the state machine)
python3 scripts/tc_update.py --root . --tc-id TC-001-04-05-26-user-auth \
--set-status in_progress --reason "Starting implementation"
# Add a file
python3 scripts/tc_update.py --root . --tc-id TC-001-04-05-26-user-auth \
--add-file src/auth.py:created
# Append handoff data
python3 scripts/tc_update.py --root . --tc-id TC-001-04-05-26-user-auth \
--handoff-progress "JWT middleware wired up" \
--handoff-next "Write integration tests" \
--handoff-next "Update README"Every change appends a sequential revision entry, refreshes , and re-validates against the schema before writing atomically ( then rename).
R<n>updated.tmp4. View status
bash
# Single TC
python3 scripts/tc_status.py --root . --tc-id TC-001-04-05-26-user-auth
# All TCs (registry summary)
python3 scripts/tc_status.py --root . --all --json5. Validate a record or registry
bash
python3 scripts/tc_validator.py --record docs/TC/records/TC-001-.../tc_record.json
python3 scripts/tc_validator.py --registry docs/TC/tc_registry.jsonValidator enforces the schema, checks state-machine legality, verifies sequential and IDs, and asserts approval consistency ( requires and ).
R<n>T<n>approved=trueapproved_byapproved_dateSee references/tc-schema.md for the full schema.
Slash-Command Dispatcher
The repo ships a slash command at that dispatches to these scripts based on subcommand:
/tccommands/tc.md| Command | Action |
|---|---|
| Run |
| Prompt for fields, run |
| Apply user-described changes via |
| Run |
| Display handoff, archive prior session, start a new one |
| Transition to |
| Re-render all derived artifacts |
| Re-render the registry summary |
The slash command is the user interface; the Python scripts are the engine.
Session Handoff Format
The handoff block lives at inside each TC and is the single most important field for AI continuity. It contains:
session_context.handoff- — what has been done
progress_summary - — ordered list of remaining actions
next_steps - — anything preventing progress
blockers - — critical decisions, gotchas, patterns the next bot must know
key_context - — files being edited and their state (
files_in_progress,editing,needs_review,partially_done)ready - — architectural decisions with rationale and timestamp
decisions_made
See references/handoff-format.md for the full structure and fill-out rules.
Validation Rules (Always Enforced)
- State machine — only valid transitions are allowed.
- Sequential IDs — uses
revision_history;R1, R2, R3...usestest_cases.T1, T2, T3... - Append-only history — revision entries are never modified or deleted.
- Approval consistency — requires
approved=trueandapproved_by.approved_date - TC ID format — must match .
TC-NNN-MM-DD-YY-slug - Sub-TC ID format — must match or
TC-NNN.A.TC-NNN.A.N - Atomic writes — JSON is written to then renamed.
.tmp - 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 (one entry per logical change) and feed it to in a loop, or extend the script for batch mode. Group commits by feature, not by file.
retro_changelog.jsontc_create.pyAnti-Patterns
| Anti-pattern | Why it's bad | Do this instead |
|---|---|---|
Editing | History is append-only — tampering destroys the audit trail | Add a new revision that corrects the field |
| Skipping the state machine ("just set status to deployed") | Bypasses validation and hides skipped phases | Walk through |
| Creating one TC per file changed | Fragments related work and explodes the registry | One TC per logical unit (feature, fix, refactor) |
| Updating TC inline between every code edit | Slows the main agent, wastes context | Spawn a background subagent at milestones |
Marking | Validator will reject; misleading audit trail | Always set |
Overwriting | Risks corruption mid-write and skips validation | Use |
Putting secrets in | Records are committed to the repo | Reference an env var or external secret store |
| Reusing TC IDs after deletion | Breaks the sequential guarantee and confuses history | Increment forward only — never recycle |
Letting | Defeats the purpose of handoff | Update on every milestone, even if it's "nothing changed" |
Cross-References
- — 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/changelog-generator - — For tracking long-lived debt items rather than discrete code changes.
engineering/tech-debt-tracker - — When a bug fix needs systematic feature-wide repair, run
engineering/focused-fixfirst then capture the result as a TC./focused-fix - — Architectural decisions made inside a TC's
project-management/decision-logblock can also be promoted to a project-wide decision log.decisions_made - — Pre-merge review fits naturally into the
engineering-team/code-reviewertransition; capture the reviewer intested -> deployed.approval.approved_by
References in This Skill
- references/tc-schema.md — Full JSON schema for TC records and the registry.
- references/lifecycle.md — State machine, valid transitions, and recovery flows.
- references/handoff-format.md — Session handoff structure and best practices.