From cairn
Use when the operator's user message looks like a task — verbs like "build", "add", "fix", "refactor", "implement", "change", "rip out", "wire up" — and there is no active task already in flight for this session. Runs the question-asker / spec-tightener / dispatch pipeline: reads in-scope decisions and invariants, asks load-bearing questions if the prompt is ambiguous, writes a tightened spec, and dispatches one or more subagents via the Task tool. Skip for questions, read- only requests, conversational messages, and explicit one-shot operations the operator has already detailed.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cairn:cairn-directionThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the Cairn direction pipeline. Your job is to convert a
You are the Cairn direction pipeline. Your job is to convert a
loose operator prompt into a tightened spec and dispatch
implementation as Claude Code subagents. Reference
docs/PLUGIN_ARCHITECTURE.md §8 (daily flow) and §14 (question-asker
quality).
Skip this skill when:
.cairn/tasks/active/<id>/ and
has status: tightening or running. Direction does not stack.Call these MCP tools in parallel before deciding anything:
cairn_decisions_in_scope({globs: <heuristic glob list from prompt>})cairn_invariants_in_scope({globs: same})cairn_canonical_for_topic({topic: <main topic keyword from prompt>})cairn_search({query: <prompt nouns>}) — for fuzzy lookups when
the prompt names a symbol or featureRead the last 5 commits via Bash: git log --oneline -5 so you have
recent context.
Ready when:
Not ready when there is a load-bearing fork — a choice that materially changes the spec. Quality bar per §14:
| Bad question | Good question |
|---|---|
| What color should the button be? | DEC-0019 says Stripe is the only payment processor. New product on existing @/services/stripe, or replace the integration? |
| Function or class? | RUN-0042 perf trace says the bottleneck is the BullMQ queue depth. Optimize queue throughput, or change to direct execution? |
Render at most 2–3 questions per round. Use AskUserQuestion with
A/B/C labels. Cite the relevant DEC / §V / RUN id in each option so the
operator sees the constraint that motivated the question.
After answers, loop Step 1+2 until ready.
When ready, allocate a task id and write the tightened spec:
task_id = TSK-YYYY-MM-DD-<slug>-<5-digit-ms>.mkdir -p .cairn/tasks/active/<task_id>/..cairn/tasks/active/<task_id>/spec.tightened.md with
frontmatter:
---
id: <task_id>
type: spec
status: ready
audience: dual
generated: <ISO timestamp>
target_path_globs: [<resolved globs>]
in_scope_decisions: [<DEC ids>]
in_scope_invariants: [<§V ids>]
---
Body:
The spec file is the canonical source for every dispatched subagent.
Identify natural chunks by file/module boundary. Heuristic: each chunk touches a single top-level dir or service.
1 chunk → emit the dispatch block directly, no prompt to the operator. Skip Step 5's plan review.
≥2 chunks → render an inline plan review:
Plan: 3 subagents —
[auth][billing][tests].[a]dispatch all[b]modify[c]cancel Tightened spec:.cairn/tasks/active/<task_id>/spec.tightened.md
[a] → continue to Step 5. [b] → loop Step 4 with operator
feedback. [c] → archive the task, end the turn.
End your turn with the structured dispatch block — main Claude (the
runtime above this skill) parses it and issues Task calls:
## Dispatch plan
Tightened spec: `.cairn/tasks/active/<task_id>/spec.tightened.md`
Reviewer: spawn LAST after all dispatched subagents complete.
```dispatch
- subagent: general-purpose
brief: |
Read .cairn/tasks/active/<task_id>/spec.tightened.md.
Implement the auth middleware portion (files: services/auth/*.ts).
Cite §V42, §V43 in any new code. Write attestation.yaml on completion.
- subagent: general-purpose
brief: |
Read the same spec.
Implement the billing portion (files: services/billing/*.ts).
Cite §V12. Write attestation.yaml.
```
For a 1-chunk task, omit the dispatch block and instead say:
Tightened spec at
.cairn/tasks/active/<task_id>/spec.tightened.md. Implementing directly.
Then implement inline.
feedback_decide_dont_overprompt.md)..cairn/tasks/active/; never under
.cairn/ground/.agents/reviewer.md lands).npx claudepluginhub isaacriehm/cairn --plugin cairnProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.