trace-first-starter: Command for Claude Code

.claude/commands/tfw-docs.md

tfw-docs is a command for Claude Code from saubakirov/trace-first-starter. It costs 12 tokens per session (1,210 once invoked), scanned A, original, MIT.

A documentation workflow that updates a project’s architecture and technical-debt records after a task is approved. Technical debt is postponed cleanup or design work that may make future changes harder.

In plain words
What is it for?
Use it automatically after an approved review, manually for one task’s results, or in batch mode to scan completed reviews that have not yet been documented.
Why use it?
It keeps important architectural decisions, legacy information, and known cleanup work documented after meaningful changes.

Command for Claude Code

Written for Claude Code: installed under .claude/.

This is saubakirov/trace-first-starter's own configuration. It tells Claude Code how to work on trace-first-starter itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything trace-first-starter configures →

Reuse

Borrowing it

Nothing to install: this file belongs to saubakirov/trace-first-starter. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/saubakirov/trace-first-starter/master/.claude/commands/tfw-docs.md
Clone the repo
git clone --depth 1 https://github.com/saubakirov/trace-first-starter

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tfw-docs

README.md
[![agentmods](https://agentmods.dev/badge/commands/saubakirov/trace-first-starter/tfw-docs/github.svg)](https://agentmods.dev/commands/saubakirov/trace-first-starter/tfw-docs)
Your own site
<a href="https://agentmods.dev/commands/saubakirov/trace-first-starter/tfw-docs"><img src="https://agentmods.dev/badge/commands/saubakirov/trace-first-starter/tfw-docs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tfw-docs

Your own site · 80×15
<a href="https://agentmods.dev/commands/saubakirov/trace-first-starter/tfw-docs"><img src="https://agentmods.dev/badge/commands/saubakirov/trace-first-starter/tfw-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,210 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.01210
Opus 5.5 $0.00005 $0.00484
Sonnet 5.5 $0.00002 $0.00242
Haiku 4.5 $0.00001 $0.00121

Measured 21d ago against content hash 0d083e9f7988, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tfw-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 21d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/tfw-docs.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TFW Docs — Technical Reference and Decisions

Role: Coordinator Trigger: after REVIEW → ✅ APPROVE, or manually via /tfw-docs

🔒 ROLE LOCK: COORDINATOR Permitted: selected KNOWLEDGE.md architecture/reference ranges, technical decision records in knowledge/records/, the current REVIEW effect reference, and an explicitly triggered convention range. Forbidden: code, implementation, debt, human-knowledge promotion and historical source edits.

Read Contract

Root instructions are active. Read this workflow completely, then the inputs in order. Shared ranges use unique headings; missing/duplicate addressed headings are a hard stop.

Order Input Checkpoint purpose Authority
1 selected task/phase status.md and journal/ actual owner, contributors, returns and live lineage task-local
2 highest REVIEW and referenced RF/source ranges accepted changes, decisions, candidates and effect applicability governing
3 KNOWLEDGE.md entry and selected Architecture Map, Key Artifacts, Legacy & Deprecation ranges; relevant legacy/record relations exact reference destinations and currentness project documentation
4 .tfw/conventions.md headings Session identity, Knowledge handover, Knowledge qualification, Current knowledge use; triggered convention range only when needed identity, source/intent, role and authority shared
5 .tfw/templates/knowledge/record.md only for a warranted decision record shared output form, technical kind template

Global state/counts, unrelated task bodies, full libraries and already completed effects are not inputs. Retained legacy D rows are history and reference, not a queue to convert or renumber.

Activation and routing checkpoint

Apply the active root activation/routing contract before material work. Task-bound current work requires a complete spine; total legacy absence is read-only and partial/mismatched routing refuses. This unit must be the actual Coordinator. Manual batch work requires owner-direct activation, creates no task/principal, and never answers authority by editing a producer-owned artifact.

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 21d ago Changed · +6 lines 0d083e9f7988
  2. 27d ago Changed · +2 lines c609203cb8d5
  3. 28d ago Changed · +7 lines 051b167c473b
  4. 1mo ago Changed · -1 lines · -4 tokens per session 46fb7316afdb
  5. 1mo ago Changed · +3 lines c3d72162e708
  6. 1mo ago Changed · -7 lines · +4 tokens per session 56aff7ed22b8
  7. 1mo ago Changed · -3 lines · -5 tokens per session 123e7b644072
  8. 1mo ago First seen · 84 lines · 17 tokens per session scan A 20c18bbf5661

Subscribe to this mod's changes

tfw-docs is a command published in the GitHub repository saubakirov/trace-first-starter (30 stars, last pushed 9d ago), licensed MIT. It adds 12 tokens to every session and 1,210 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.