/trace:init [path]from trace
Configures TRACE for a scope: selects the durable docs folder, copies the canonical three-category structure, marks it with AGENTS.md/CLAUDE.md forwarders, and persists the choice to config.json.
Ships in trace. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use Claude Code’s Read, Glob, Write, and Edit tools for file operations. Use AskUserQuestion for closed choices and normal chat for open questions. Invoke referenced skills with the Skill tool. Resolve script paths from this installed skill; respect the session’s permissions.
You are configuring TRACE for the current scope. Init does four things, in order:
/trace:distil writes into).system/, architecture/, adr/, reference/, working-notes/, each with a README copied verbatim from the plugin).AGENTS.md + CLAUDE.md forwarder so the rest of TRACE recognises it.<scope>/.claude/.trace/config.json.Resolve the scope per scope-resolution.md — $ARGUMENTS if given, otherwise cwd. A root AGENTS.md is not required — the recommended order is /trace:init then /trace:agents-md-setup. Init does not touch any AGENTS.md outside the chosen folder; the directory index is /trace:agents-md-setup's job.
Before doing anything, read:
[path] argument resolves into a scope rootRead <scope>/.claude/.trace/config.json if it exists. If it does, show the current docs_folder value and use the question control: Keep as-is (exit) / Change location (proceed) / Cancel (exit).
If it does not exist, read <scope>/.claude/.playbook/config.json — the pre-1.0 location. If that one exists, migrate it: write its contents to .claude/.trace/config.json, delete the whole .claude/.playbook/ folder, tell the developer in one line that the config moved, then continue as if the new file had been there (same three-way question on Keep as-is / Change location / Cancel).
If neither exists, proceed.
Glob the top-level directories. Identify:
AGENTS.md is TRACE-marked (see docs-folder-resolution.md). Read the first ~30 lines to check. A CLAUDE.md without a sibling AGENTS.md does not count.docs/, documentation/, wiki/: folders that look like documentation homes even without a marker.Show concisely what you found. Then use the question control with up to four options, ordered by strength, including only rows that apply (allow a custom answer in chat):
docs/ — TRACE default.claude-context/, internal/docs/, etc.Validate the choice before continuing: if a file (not a directory) already exists at the chosen path, or at any of the five sub-paths (system, architecture, adr, reference, working-notes), say what's in the way and re-ask — don't proceed into Phase 3 with a path that can't hold the structure.
If the developer picks a folder that already contains hand-written content, tell them in plain text before continuing: TRACE's three-category structure and marker will be laid down alongside whatever is there. Confirm once in chat — no second question.
Copy the six canonical READMEs from the plugin's shared/doc-structure/ into <chosen-folder>/ with one call:
node "${CLAUDE_SKILL_DIR}/../../scripts/copy-doc-structure.js" <chosen-folder>
The script copies only missing files — it never overwrites — and prints a JSON report:
written — files it created. The common greenfield case: all six, nothing routed through context.skipped_identical — targets already byte-identical to the canonical source. Nothing to do.conflicts — targets that exist and differ. For each, Read it, show what's there briefly, and use the question control: Overwrite with canonical / Leave existing / Cancel init. On overwrite, Read the source (../../shared/doc-structure/<path> relative to this skill) and Write it to the target.errors — paths the script could not write (e.g. a file sitting where a directory is needed). Show each path and message to the developer and stop; they resolve the obstruction, then re-run /trace:init — re-running is safe, already-written files are skipped.Author nothing beyond these six READMEs. In particular, do not create architecture/overview.md, adr/0000-record-architecture-decisions.md, or any topic files under system/ — those land later, with real content, via other skills or the developer. Pre-authoring empty stubs is a violation of TRACE's guardrails.
Write <chosen-folder>/AGENTS.md using the body of context-folder-template.md, dropping the leading "# AGENTS.md (template for...)" preamble — start from the # Durable project context heading.
Write <chosen-folder>/CLAUDE.md as the one-line forwarder:
See @AGENTS.md for more information.
If <chosen-folder>/AGENTS.md already exists:
If <chosen-folder>/CLAUDE.md exists with content other than the one-line forwarder, overwrite it — per the plugin's convention CLAUDE.md is always just a forwarder.
Write <scope>/.claude/.trace/config.json:
{
"docs_folder": "docs/"
}
Substitute the developer's actual choice; keep the trailing slash. Overwrite if present — the chosen value supersedes any previous one.
One short message listing only the bullets that apply:
AGENTS.md + CLAUDE.md forwarder) was written, already present, or overwritten..claude/.trace/config.json.AGENTS.md exists at the scope root, one line suggesting /trace:agents-md-setup next (pass the same path argument when the scope isn't cwd) — that skill owns the scope's AGENTS.md, and without it /trace:distil won't recognise this folder as its own scope./trace:distil and /trace:agents-md-setup read this scope's config. If it is absent, both fall back to the precedence in docs-folder-resolution.md.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
trace, project-setup, docs-folder, configuration, onboarding
Other plugins' skills for the same job
11 skills in this plugin
/adrRecord an architecture decision as a lightweight, immutable ADR in the scope's docs folder. Owns the ADR template, numbering, and write. Invokable directly for a direct-path decision, or by /trace:spec at handoff./agents-md-setupSet up or review the project's AGENTS.md through an interactive interview with the developer/commit-messageDraft a single commit's message — imperative-mood title plus a short why body, optional decision bullets, plain text (no markdown). Use when the developer explicitly asks for a commit message, asks to fix a message before amending, or asks the agent to perform the commit on their behalf./context-graphMeasure context weight per directory: AGENTS.md chains, @ imports, gotchas, on-demand docs./distilEvaluate recent changes and propose updates to the project's permanent context (AGENTS.md or the scope's docs folder) when something durable was learned/doctorValidate a TRACE-adopted scope against TRACE's own conventions — doc structure, marker pairs, AGENTS.md spec, ADR numbering and immutability, working-note banners, relative links — then guide the fixes. Owns the resolution flow for ADR number collisions left by merged branches. Useful after merges, before releases, or whenever the structure feels off.npx claudepluginhub axakon/trace --plugin trace