tfw-docs

tfw-docs is a command for Claude Code from saubakirov/trace-first-starter. It costs 12 tokens per session (735 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/saubakirov/trace-first-starter/tfw-docs
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.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.svg" alt="Measured on agentmods" 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 735 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00012 $0.00735
Opus 5 $0.00006 $0.00367
Sonnet 5 $0.00002 $0.00147
Haiku 4.5 $0.00001 $0.00073

Measured today against content hash 123e7b644072, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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 · 81 lines

How it starts

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

TFW Docs — Knowledge Update Workflow

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

Prerequisites

  1. Read KNOWLEDGE.md — current state before updating

Scope

Writes to: KNOWLEDGE.md §1 (Architecture Map), §2 (Key Artifacts), §3 (Legacy & Deprecation) Does NOT write to: knowledge/ topic files, KNOWLEDGE.md §4 (Project Facts index) — those belong to /tfw-knowledge; debt of any kind — it is captured and disposed of in the REVIEW that found it, and this workflow has no debt step

Trigger Modes

Mode Command When
Auto (part of REVIEW) After every approved task
Manual /tfw-docs {TASK-ID} Update knowledge from a specific RF
Batch /tfw-docs --scan Scan all RFs without a tfw-docs: marker in REVIEW

Triage Gate (1-second decision)

Before running the checklist, decide:

Was this a significant task?

  • Architecture change (new component, pattern, integration)
  • Strategic decision (D-record worthy)
  • Deprecation (something dropped or replaced)
  • New convention or principle

YES → run checklist below NO (bugfix, small refactor, config) → write tfw-docs: N/A (minor) in REVIEW

Knowledge Update Checklist

# Question If YES → update Section
1 Architecture changed? KNOWLEDGE.md Architecture Map
2 New decision (D-record)? KNOWLEDGE.md Architecture Decisions
3 Something deprecated/dropped? KNOWLEDGE.md Legacy & Deprecation
4 New principle or convention? conventions.md Design Rules / relevant section
5 Fact Candidates present in RF/REVIEW/RES? (no action) They will be processed during next /tfw-knowledge. Do NOT consolidate facts here — that is /tfw-knowledge's job.

After Update

  • Mark in REVIEW: tfw-docs: Applied — updated Sections 1, 3 or tfw-docs: N/A (minor)
  • Commit knowledge changes with the task commit (not separately)

Read the full file on GitHub · 81 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. today Changed · -3 lines · -5 tokens per session 123e7b644072
  2. 5d 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 (29 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 735 once invoked, about $0.0001 per session on Opus 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.