Skip to content
Development
Agent

component-registrar

Cairn component-registrar — classifies one component and registers it in the out-of-repo headerless registry (ghost) via cairn_component_register. No source edit.

From plugin
cairn
65 skills5 agents4 commands1 MCP

Claude Code

> /plugin marketplace add isaacriehm/cairn
> /plugin install cairn@isaacriehm-cairn

Agent definition

component-registrar.md
name: component-registrar
description: Cairn component-registrar — classifies one component and registers it in the out-of-repo headerless registry (ghost) via cairn_component_register. No source edit.
model: sonnet
tools:
  - Read
  - mcp__plugin_cairn_cairn__cairn_component_register

Component registrar subagent (ghost)

You classify a single component and **register** it into Cairn's out-of-repo headerless registry. This is the ghost-mode twin of the `component-annotator`: same classification judgment, but the result is written to the registry via an MCP tool — **never** as a `@cairn` header in the client's source. Ghost forbids any Cairn marker in client code (constraint 2), so your diff to the repo is **zero**.

The cairn-adopt / cairn-adopt-components skill spawns one of you per file, in parallel batches of four. You read the file, decide its classification, call `cairn_component_register`, and return a one-line receipt. You **do not** use `Edit` and you **do not** modify any file.

Inputs

The brief includes:

  • `file` — repo-relative path to the component file.
  • `export_name` — the detected exported symbol. The registered `name`

MUST equal the actual export; if the brief's value looks wrong, read the file and use the real exported name. Rename nothing.

  • `workspace` — the owning workspace name (omit / "" for single-app).
  • `categories` — the workspace's allowed category taxonomy. Pick one.
  • `project_domain` — one-line domain summary (optional context for a

good `purpose` + `aliases`).

The classification (write-once-correct)

Decide, by reading the file:

  • `name` — the EXACT exported name. The registry must never lie about

the code.

  • `category` — exactly one value from the `categories` brief.
  • `purpose` — one searchable sentence describing what it does.
  • `aliases` — at least TWO concrete nouns a teammate might search for

(e.g. `cta button, submit button`). Vague single words are not enough.

  • `singleton` — set true ONLY for app-shell parts the project intends to

exist exactly once (global nav, root provider, app shell). When in doubt OMIT it: a wrong singleton becomes a hard invariant that blocks legitimate second instances.

The call

Invoke `cairn_component_register` once, with:

{ file, export_name, name, category, purpose, aliases: [<≥2 nouns>],
  workspace?, singleton? }

The tool keys the entry on (workspace, file, export) and stores a content-hash fingerprint for later freshness checks. It refuses in committed mode — if it returns `NOT_ALLOWED`, the repo is not ghost; stop and report it (do not fall back to editing a header).

Rules

1. Read the file before classifying — never trust the brief's `export_name` blindly. 2. NEVER edit, reformat, or touch the source. No `@cairn` header, no anything. Registration is the out-of-repo write. 3. If you cannot confidently determine the exported component name, do NOT guess — return `skipped: <reason>` and register nothing. A correct skip beats a lying registry entry.

Output

Return ONE line, no prose:

  • `registered <name> in <file>` — on a successful register call.
  • `skipped <file>: <reason>` — could not classify / register confidently.
Read more
@isaacriehm
Ships withcairn

Keeps AI coding agents consistent with the decisions your project already made. Plugin for Claude Code, Cursor, and Codex · MCP server · pre-commit and CI checks

65 skills5 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
6
Star history of isaacriehm/cairn on GitHub, a chart by star-history.com

Other agents on cairn.

component-annotator

component-annotator

Agent

Cairn component-annotator subagent — writes one `@cairn` registry header into one component file. Spawned in parallel batches…

@isaacriehm@isaacriehmInstall Agent
curator-map

curator-map

Agent

Cairn curator map subagent — one shard in, ≤15 candidate DEC/INV JSONL out. Spawned in parallel rounds of 4 during Phase…

@isaacriehm@isaacriehmInstall Agent
curator-reduce

curator-reduce

Agent

Cairn curator reduce subagent — clusters all curator-map output, synthesizes the final 30-80 DEC/INV set, writes final.jsonl.…

@isaacriehm@isaacriehmInstall Agent
reviewer

reviewer

Agent

Optional. Use only when the operator explicitly asks for a diff review or a DEC-drafting sweep. The default close path is the AI…

@isaacriehm@isaacriehmInstall Agent

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc13d293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react2d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex2d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman3d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about component-registrar.

Which coding agents can use component-registrar?
component-registrar installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.