thread-new

A command for opening a new research thread in a project’s documentation registry. A research thread is a named line of investigation that collects its idea, plan, and experiments in one place.

In plain words
What is it for?
Use it to create a research line with a lowercase slug, an idea document, and a plan document. It also helps begin the first experiment by interviewing the user about the research goal.
Why use it?
Starting research can otherwise leave scattered notes and duplicate topics. The command checks existing threads, creates a unique record, and prepares the initial documents.

Command

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/zhyx12/projtool/thread-new
Clone the repo
git clone --depth 1 https://github.com/zhyx12/projtool
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 596 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.00046 $0.00596
Opus 5 $0.00023 $0.00298
Sonnet 5 $0.00009 $0.00119
Haiku 4.5 $0.00005 $0.00060

Measured 2d ago against content hash 191d42b77cab, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

thread-new 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 2d 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.

src/projtool/assets/project_templates/claude/commands/thread-new.md · 44 lines

How it starts

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

/thread-new — open a research thread

A thread is a research line: a narrative unit that lives at threads/<slug>/ in the docs repo and gathers the experiments that pursue one idea. This command opens one and gets its idea.md / plan.md started.

Steps

  1. Pick the slug. Derive a short slug from the user's phrase and confirm it. The slug must match ^[a-z0-9][a-z0-9-]*$ (lowercase, digits, hyphens; no leading hyphen) and be unique. Call mcp__projtool__thread_tree first and scan the existing threads — if a similar or near-duplicate line already exists, surface it and ask whether to reuse it instead of opening a second one. Note an optional human-readable title.

  2. Create the thread. mcp__projtool__thread_new(slug, title) mints the thr_<ULID> record (status active) and writes threads/<slug>/idea.md and plan.md skeletons in one docs commit. This works on an un-migrated project too: it bootstraps docs/registry/ and does not touch the old plans/ layout. A duplicate slug is refused — pick another.

  3. Fill the narrative. Interview the user briefly, then edit:

    • threads/<slug>/idea.md — motivation and hypothesis (what we believe, why it's worth a GPU-day).
    • threads/<slug>/plan.md — decision criteria (the metric + threshold that settles it) and the first experiment(s) you intend to run. Commit narrowly in the docs repo — git add only those two files, never git add -A.
  4. Point forward. When the code for the first experiment is committed, mcp__projtool__register_experiment(slug=..., code_sha=<commit>, thread=<slug>) freezes the plan (dirty plan auto-committed, plan blob + snapshot anchored, code_sha = the exact commit you intend to run) and creates the exp/<slug> node. From there the normal run flow (instance_up / start_training / finalize) applies unchanged.

Keep it light: a thread is a working narrative, not a proposal. One screen of idea.md + plan.md is plenty to start.

Read the full file on GitHub · 44 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. 2d ago First seen · 44 lines · 46 tokens per session scan A 191d42b77cab

Subscribe to this mod's changes

thread-new is a command published in the GitHub repository zhyx12/projtool (1 stars, last pushed 19d ago), licensed MIT. It adds 46 tokens to every session and 596 once invoked, about $0.0002 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-31.