From cairn
Routes software development work in or around a repo/workspace to the lightest safe workflow that still protects correctness. ALWAYS invoke for build, change, fix, refactor, plan, investigate, research, cleanup, reduce complexity, align with repo patterns, spec, implement, greenfield-in-repo work, or any card/issue/ticket/link/screenshot/bug/rough idea (pt-BR: implementar, criar, corrigir, refatorar, ajustar, planejar, pesquisar, investigar, limpar, reduzir complexidade, analisar). Skip pure/read-only Q&A, explain/summarize/list/open-only requests, one-off shell commands, or tasks owned by a more specific active skill.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cairn:cairnWhen to use
Fire when the user says (en): build/change/fix/refactor/plan/research/investigate this; implement this card/issue/ticket; here's a bug/link/screenshot; brainstorm before coding; write a spec; clean this up; reduce complexity; align this with repo patterns; create a new module/tool/feature in this repo; work this repo/workspace. (pt-BR): "implementa/cria/corrige/refatora/ajusta isso"; "esse card/bug/ticket"; "investiga/analisa esse problema"; "pesquisa"; "planeja antes de codar"; "cria spec"; "limpa/reduz complexidade"; "alinha com o padrao do repo"; "trabalha nesse repo". Do NOT fire for: pure/read-only Q&A, explain/summarize/list/open-only requests, card summaries with no implementation/planning, one-off shell commands, or work owned by a more specific active skill.
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Cairn routes software development work to the lightest workflow that still protects
Cairn routes software development work to the lightest workflow that still protects correctness. It is not card-only and it is not a spec ceremony. It is a decision loop.
Brownfield is the default posture whenever a repo exists: inspect the current system,
reuse patterns, and fit changes into the owner boundary. Greenfield work is supported
when it is development work in or for a repo/workspace, but it starts in discovery or
tracked-change when the wrong scaffold would be costly.
A SessionStart bootstrap routes work here before you respond — you do not need to
be invoked by name. Manual override: invoke the cairn skill / /cairn.
references/workspace.md).| Mode | Use when | Artifact |
|---|---|---|
direct | small clear reversible change with obvious target; not broad greenfield/scaffold | none unless useful |
diagnose | concrete failure, bug, flake, slowness | repro notes and proof |
discovery | ambiguous idea, research, greenfield/scaffold, product/domain/architecture uncertainty | brief or decision note |
delta-spec | medium brownfield behavior change | brief, delta, plan, proof |
tracked-change | multi-phase, high-risk, cross-boundary, customer-visible | durable change folder |
If unsure between two modes, choose the lower ceremony mode unless auth, data,
money, production, public/customer impact, or multi-repo coordination is involved.
When the user explicitly asks to plan before coding, or asks for a new module/tool/feature
from scratch with unclear boundaries, choose discovery or delta-spec, not direct.
Read these references only when needed:
references/modes.md for detailed mode selection and workflow steps.references/artifacts.md for artifact templates and retention rules.references/research.md for the brainstorm / web-research / docs-grounding stages.references/memory.md for the .cairn/ state layout and the resume protocol.references/workspace.md for the umbrella model and boundary detection.references/gates.md for what is deterministically enforced vs advisory, and reconciliation.references/framework-lessons.md for what Cairn borrows and avoids.references/research.md):
skip them on small clear work; ground new libs on the lockfile version, not the newest..cairn/changes/<slug>/ work, read tasks.md and the
decision-log.md tail before acting; tick tasks.md incrementally, not at the end.cairn-analyze.mjs on any change folder.Every Cairn-routed response must start with:
Mode: <direct|diagnose|discovery|delta-spec|tracked-change>
For small work:
Mode: ...
Done/Blocked: ...
Proof: ...
Risk: ...
Next: ...
For planning work:
Mode: ...
Why: ...
Facts: ...
Open questions: ...
Plan: ...
Proof strategy: ...
For incomplete work, name the blocker and the next concrete action.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub tavaresgmg/cairn --plugin cairn