Intent is a CLI tool for managing steel threads, work packages, project artifacts, coding rules, and LLM guidance for software projects.
This file is the prescriptive DO / NEVER contract for working with Intent. Narrative, rationale, and FAQs live in intent/docs/working-with-llms.md. Project navigation lives in AGENTS.md. Each file has one job.
An Intent project has this layout:
my-project/
├── AGENTS.md # Tool-agnostic LLM config (auto-generated by `intent agents sync`)
├── CLAUDE.md # Claude-specific overlay (imports AGENTS.md)
├── usage-rules.md # Prescriptive DO / NEVER rules (this file)
├── CHANGELOG.md
├── .claude/
│ ├── settings.json # Session hooks (SessionStart, UserPromptSubmit, Stop)
│ ├── agents/ # Installed Claude subagents
│ └── skills/ # Installed Claude skills
├── .git/hooks/pre-commit # Critic gate (runs bin/intent_critic on staged files)
├── .intent/
│ └── config.json
├── .intent_critic.yml # Critic config (severity threshold, disabled rules)
├── intent/
│ ├── st/ # Steel threads
│ │ ├── ST0001/
│ │ │ ├── info.md # Required (title, status, dates, description)
│ │ │ ├── design.md
│ │ │ ├── impl.md
│ │ │ ├── tasks.md
│ │ │ └── WP/01/info.md # Work packages
│ │ └── CANCELLED/ST####/ # Cancelled threads with inline deprecation note
│ ├── llm/ # Internal enforcement (human-curated)
│ │ ├── MODULES.md # Highlander registry
│ │ └── DECISION_TREE.md # Code placement flowchart
│ ├── docs/ # Technical docs (including working-with-llms.md)
│ ├── .treeindex/ # Directory summaries (committed)
│ ├── wip.md # Current work in progress
│ └── restart.md # Session restart context
Status values for steel threads and work packages: WIP, Completed, Not Started, On Hold, Cancelled.
intent st new "Title"
intent st list
intent st show ST0001
intent st start ST0001
intent st done ST0001
intent st cancel ST0001
intent wp new ST0001 "Title"
intent wp list ST0001
intent wp show ST0001/01
intent wp start ST0001/01
intent wp done ST0001/01Specifiers accept bare numbers (5 = ST0005; 5/01 = ST0005/01). Leading zeros parse as octal in bash — use ST0035 or 35, never 0035.
intent agents init # Create AGENTS.md at project root
intent agents init --template <lang> # Language-specific scaffold
intent agents sync # Update AGENTS.md from project state
intent agents validate # Check complianceAGENTS.md is a real file at the project root (not a symlink). Regenerate with intent agents sync; never edit manually.
intent claude subagents list
intent claude subagents install <name>
intent claude subagents install --all
intent claude subagents sync
intent claude subagents uninstall <name>
intent claude subagents show <name>
intent claude subagents statusInstalls to ~/.claude/agents/<name>.md. Mid-session installs are not visible to Task() until the next Claude Code session starts — the subagent registry is read once at startup.
intent claude skills list
intent claude skills install <name>
intent claude skills install --all
intent claude skills sync
intent claude skills uninstall <name>
intent claude skills show <name>Installs to ~/.claude/skills/<name>/SKILL.md. Skills auto-load into every Claude Code session.
intent claude rules list # Enumerate all rules (canon + extensions)
intent claude rules show <id> # Print full RULE.md for an ID
intent claude rules validate # Schema + attribution + runnable-example check
intent claude rules index # Regenerate rules/index.jsonRule IDs use the form IN-<LANG>-<CAT>-<NNN> (eg IN-EX-CODE-006, IN-AG-HIGHLANDER-001). Library root: intent/plugins/claude/rules/.
intent ext list
intent ext show <name>
intent ext validate [<name>]
intent ext new <name> --subagent | --skill | --rule-packUser extensions live at ~/.intent/ext/<name>/ and contribute subagents, skills, or rule packs without forking Intent. Extension items shadow canon by name (subagents / skills) or by rule id: (rules), with a visible shadow warning. Set INTENT_EXT_DISABLE=1 to revert to canon-only for a command.
intent treeindex <dir> # Generate directory summary
intent treeindex <dir> --check # CI-friendly staleness check
intent treeindex <dir> --prune # Remove orphaned summaries
intent treeindex <dir> --depth 3 # Control depth (default 2)
intent treeindex <dir> --force # Regenerate unconditionallyTreeindex files live at intent/.treeindex/<dir>/.treeindex. Check .treeindex before exploring an unfamiliar directory. Never run on project root — target subdirectories.
intent init # Initialise new Intent project
intent doctor # Config + dependency health check
intent info
intent version
intent upgrade # Apply pending migration(s)
intent claude upgrade [--apply] # Install/refresh canon LLM config
intent plugin # Discover plugins and their commands
intent help [<command>]All skills install to ~/.claude/skills/<name>/SKILL.md and auto-load into every Claude Code session.
| Skill | Purpose |
|---|---|
/in-session |
Session bootstrap — loads language-appropriate skills after /compact |
/in-essentials |
Intent workflow rules (CLI discipline, tracking hygiene) |
/in-standards |
Agnostic coding discipline (Highlander, PFIC, Thin Coordinator) |
/in-start |
Start a new steel thread from an idea |
/in-next |
Pick the next WP/task by scanning wip.md and open STs |
/in-plan |
Produce a plan before touching code |
/in-review |
Two-stage review — general reviewer + language-specific critic |
/in-verify |
Verification gate before declaring a task done |
/in-debug |
Systematic debugging flow |
/in-finish |
Session wrap-up — updates wip.md, restart.md, prompts for commit |
/in-handoff |
Hand session context off for a future session |
/in-detrope |
Trope detection and remediation |
/in-autopsy |
Post-session autopsy for recurring corrections |
/in-cost-analysis |
Analyse session costs |
/in-elixir-essentials |
Elixir code rules |
/in-elixir-testing |
Elixir test rules |
/in-ash-ecto-essentials |
Ash + Ecto conventions |
/in-phoenix-liveview |
Phoenix + LiveView patterns |
/in-tca-init |
TCA (Targeted Codebase Audit) provisioning |
/in-tca-audit |
TCA audit execution |
/in-tca-synthesize |
TCA synthesis step |
/in-tca-remediate |
TCA remediation step |
/in-tca-finish |
TCA wrap-up |
Run /in-session immediately after /compact, any context reset, or at session start.
All subagents install to ~/.claude/agents/<name>.md and run in separate context windows via the Task() tool.
| Subagent | Role |
|---|---|
intent |
Intent methodology and CLI usage |
socrates |
CTO Review Mode — Socratic dialog between CTO (Socrates) + Tech Lead (Plato) |
diogenes |
Elixir Test Architect — Aristotle + Diogenes; spec generation / validation |
critic-elixir |
Elixir rule-library critic (code + test modes) |
critic-rust |
Rust rule-library critic (code + test modes) |
critic-swift |
Swift rule-library critic (code + test modes) |
critic-lua |
Lua rule-library critic (code + test modes) |
critic-shell |
Shell (bash + zsh) rule-library critic (code mode only) |
Socrates and Diogenes are disjoint agents — different domains, different personas. Socrates is architectural; Diogenes is test-specification. See intent/docs/working-with-llms.md for the FAQ.
Extension subagents (not canon): worker-bee — install via intent claude subagents install worker-bee after upgrading to v2.9.0 (the seed is staged automatically).
Single source of truth for coding rules. Critic subagents read the library at invocation time, apply each rule's Detection heuristic to target files, and report findings by severity. Rules never autofix.
- Library root:
intent/plugins/claude/rules/<lang>/<category>/<slug>/RULE.md. - Categories:
code,test, plus Elixir-specificash,phoenix,lv. - Agnostic rules apply everywhere:
intent/plugins/claude/rules/agnostic/(Highlander, PFIC, Thin Coordinator, No Silent Errors). - Schema:
intent/plugins/claude/rules/_schema/rule-schema.md. - Authoring guide:
intent/docs/rules.md. - Critic contract:
intent/docs/critics.md.
Per-project rule overrides go in extensions (~/.intent/ext/*/rules/), not by editing canon.
Critics enforce rules at two points:
- Pre-commit hook (
.git/hooks/pre-commit) — runsbin/intent_critic <lang> <staged-files>on every commit. Blocks on severity at or above threshold. - On-demand —
Task(subagent_type="critic-<lang>", prompt="review <targets>")from Claude Code.prompt="test-check <targets>"for test-mode.
Per-project config at project root: .intent_critic.yml:
| Key | Value | Default |
|---|---|---|
severity_min |
critical | warning | recommendation | style |
warning |
disabled |
List of rule IDs to suppress | [] |
show_all |
Shorthand for severity_min: style |
false |
Full contract in intent/docs/critics.md.
.claude/settings.json wires Claude Code lifecycle hooks:
SessionStart(startup, resume, clear, compact) — injects a brief project context reminder.UserPromptSubmit(strict gate) — blocks the first user prompt until/in-sessionhas run in the conversation.Stop— injects a/in-finishreminder at session end.PostToolUseonWrite|Edit— optional advisory critic (off by default; opt-in via.intent_critic.yml).
Hook templates ship with Intent (lib/templates/.claude/settings.json) and are applied to target projects via intent claude upgrade --apply.
Every Intent project has three root-level LLM config files:
Read by every agentic tool (Claude Code, Codex, Cursor, Aider, Continue, Gemini CLI, ...). Contains project overview, build/test commands, coding conventions summary, steel-thread process, installed skills/subagents, rule-library pointer, critic-invocation example. Auto-generated by intent agents sync; never edit manually.
Short. Imports AGENTS.md by reference; adds Claude-specific directives: memory dirs, /in-session auto-load pointer, .claude/settings.json hook pointer. Hand-edited after initial scaffold.
This file. Elixir-ecosystem-aligned (mix usage_rules.sync discoverable). Terse and imperative. Narrative content belongs in intent/docs/working-with-llms.md.
MODULES.md— Highlander module registry (where every concern lives).DECISION_TREE.md— code-placement flowchart.
intent st new "Title"— CLI creates the directory andinfo.md.- Fill in objective, context, related threads in
info.md. - For work-packaged STs:
intent wp new <STID> "Title"per WP. - Track tasks in
tasks.md; design indesign.md; as-built inimpl.md.
intent st start <STID>— flips status to WIP.- Work through WPs in
tasks.mddependency order. intent wp start <STID/NN>andintent wp done <STID/NN>per WP.- On completion:
intent st done <STID>.
---
verblock: "DD Mon YYYY:vX.Y: author - Description"
intent_version: 2.9.1
status: WIP
created: YYYYMMDD
completed:
---intent init
intent agents init --template <lang>
intent claude skills install --all
intent claude subagents install --all
intent claude upgrade --apply # Install hooks, pre-commit, critic config/in-session (auto-loads language-appropriate skills)
/in-review (Stage 1 reviewer + Stage 2 language critic)
/in-finish (updates wip.md + restart.md, prompts commit)
AGENTS.md— project navigation (auto-generated)CLAUDE.md— Claude-specific scaffoldintent/docs/working-with-llms.md— LLM workflow narrative (rationale, FAQs, long-form)intent/docs/rules.md— rule authoring guideintent/docs/critics.md— Critic contract and report formatintent/docs/writing-extensions.md— extension authoringintent/llm/MODULES.md— Highlander module registryintent/llm/DECISION_TREE.md— code-placement flowchart
- Never edit
AGENTS.mddirectly — it is auto-generated byintent agents sync. - Never run
intent treeindexon the project root — target subdirectories. - Never create steel thread or work package directories manually — use
intent st newandintent wp new. - Never manually edit
status:fields in info.md frontmatter — useintent st start | done | cancelandintent wp start | done. - Never modify
.intent/config.jsonmanually — useintentcommands. - Never delete
.treeindexfiles without running--prunefirst. - Never edit
.claude/settings.jsonhook stanzas directly — updatelib/templates/.claude/settings.jsonand re-runintent claude upgrade --apply. - Never bypass
.git/hooks/pre-commitwith--no-verifyon shared branches without an explicit justification in the commit message. - Never use leading zeros for ST or WP specifiers (
ST0035or35, never0035) — leading zeros parse as octal in bash. - Never manually wrap lines in markdown files — let the renderer handle it.