trace-first-starter: Command for Claude Code

.claude/commands/tfw-research.md

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

A structured research workflow for investigating a project between two named stages, or on its own. It locks the agent to research work and records progress in numbered files.

In plain words
What is it for?
Use it to run research iterations, identify missing evidence and blind spots, and save research results in the required project files.
Why use it?
It keeps research separate from planning, review, and coding while making interrupted investigations resumable.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions AGENTS.md.

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-research.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-research

README.md
[![agentmods](https://agentmods.dev/badge/commands/saubakirov/trace-first-starter/tfw-research.svg)](https://agentmods.dev/commands/saubakirov/trace-first-starter/tfw-research)
Your own site
<a href="https://agentmods.dev/commands/saubakirov/trace-first-starter/tfw-research"><img src="https://agentmods.dev/badge/commands/saubakirov/trace-first-starter/tfw-research.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 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,886 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.00013 $0.01886
Opus 5 $0.00006 $0.00943
Sonnet 5 $0.00003 $0.00377
Haiku 4.5 $0.00001 $0.00189

Measured today against content hash f1d62fbb0d8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

tfw-research 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-research.md · 148 lines

How it starts

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

TFW Research — Core Algorithm

🔒 ROLE LOCK: RESEARCHER You write RES and research/ stage files only. You do NOT write HL, TS, ONB, RF, REVIEW, or code.

Mindset: Find gaps, expose blind spots, demand proof; observe, infer, question.

Read Contract

Root instructions are already active. Read this workflow completely, then select inputs in this order. Every shared range is addressed by its unique Markdown heading.

Order Input Checkpoint purpose Authority
1 selected task status.md and journal/ current lifecycle and lineage task-local
2 master HL, research/iterations.yaml, and predecessor research/iterN/RES.md only for iteration 2+ question, approved context, iteration/resume state governing task artifacts
3 .tfw/project_config.yaml keys under tfw.research mode and limits project config
4 .tfw/conventions.md headings HL (High Level), Session identity, Commit Attribution, Fact Categories, and Anti-patterns (prohibited) contract, identity, attribution, candidate routing, prohibitions shared rule
5 HL §7.2 citations and newly relevant knowledge research evidence and decision context named source
6 .tfw/workflows/research/{mode}.md, then only the first incomplete stage template; .tfw/templates/RES.md at synthesis mode behavior and output form workflow/template

Full AGENTS.md, conventions.md, glossary.md, and KNOWLEDGE.md are not reloaded. Completed stage files are read only for resume or synthesis; §14.1 history is read only when a compatibility question triggers it. Missing or duplicate addressed headings are a hard stop under conventions.mdContext Selection.

Step 0: Resume & Iteration Detection

On resume, reread this workflow and mode. Read research/iterations.yaml when present. Current iteration is the first pending entry, cross-checked against iterN/ folders (highest + 1, else 1); for N>1 read predecessor RES files. In current iterN/, inspect stage/RES files. Resume from first missing stage. Existing RES completes the iteration.

Read the full file on GitHub · 148 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 · -6 lines f1d62fbb0d8d
  2. 8d ago First seen · 154 lines · 13 tokens per session scan A 1f602b42b174

Subscribe to this mod's changes

tfw-research is a command published in the GitHub repository saubakirov/trace-first-starter (29 stars, last pushed yesterday), licensed MIT. It adds 13 tokens to every session and 1,886 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.