8.2 KiB
name, description, disable-model-invocation, allowed-tools
| name | description | disable-model-invocation | allowed-tools |
|---|---|---|---|
| init | Initialize Spire for the current project — detect project facts, scaffold .claude/spire/project.md, and handle shared vs. personal install. Human-triggered. | true | Bash(cat:*), Bash(grep:*), Bash(ls:*), Bash(just:*), Bash(git:*), Read, Write, Glob, Grep |
Spire — Init
Run once after install or major structural changes. Re-init never clobbers hand-edited files. Adept founding templates ship with the plugin; init does not write them.
Phase 1 — Detect install type
Search .claude/settings.json, then .claude/settings.local.json (each if present), plugins and mcpServers keys, for any string containing spire (typically "spire@reliquary" or a path containing /spire/).
| Spire found in | $INSTALL_TYPE |
Scaffolded files |
|---|---|---|
settings.json |
shared | committed |
settings.local.json only |
personal | gitignored |
| Neither | ask the user: "Should the Spire config be shared with the project (committed) or personal (gitignored)?" | per answer |
Phase 2 — Detect project facts
Each undetected fact becomes a placeholder in project.md.
2.1 — Workpad location
Resolve via the spire:workpad chain (owner: workpad "Where the workpad lives"). Record as $WORKPAD.
2.2 — Pinned agents
.claude/agents/*.md: each frontmatter name and description → "Pinned agents".
2.3 — Verification commands
Check in order: Justfile (just --list: check, test, lint, build, verify, ci or similar); Makefile (check, test, lint, build); package.json scripts; Cargo.toml (cargo check, cargo test, cargo clippy).
Sort into gate (cheap, between blocks: check, lint, typecheck, clippy) and tests (suite, once per phase).
2.4 — Conventions
Root CLAUDE.md: one line per fact that changes Spire's behaviour (branching, merge direction, commit style, sensitive areas, host rules). Point to rules the root CLAUDE.md already loads; never copy them.
2.5 — Tome presence
Both settings files: tome, a *-tome:navigate skill or tome@reliquary. Found: note the tome skill name.
Phase 3 — Scaffold project.md
3.1 — Re-init safety check
.claude/spire/project.md exists: read its frontmatter status.
authored: stop. Tell the user: "project.md has been manually edited (status: authored). Skipping to avoid clobbering your changes. Delete or change status togeneratedto allow re-scaffolding."generated: overwrite.- missing: treat as
authored.
3.2 — Write the file
Create .claude/spire/ if needed; write .claude/spire/project.md:
---
status: generated
generated: <YYYY-MM-DD>
---
# Project Knowledge
Write every field as a terse fact for the agent; no prose.
## This project
- **Tome skill**: <detected tome skill or "none detected — Igor will orient via direct file reads">
- **Workpad**: <detected workpad path with subfolder structure>
- **Adepts**: Domain knowledge agents with persistent folders at `<workpad>/adepts/<domain-slug>/`.
- **Pinned agents** (prefer these over generic tiers):
<list of detected agents with name and description, or placeholder comment>
- **Domain skills to route to subagents when relevant**: <!-- detect and list, or leave as placeholder -->
- **Conventions**: <summarized conventions from CLAUDE.md, or placeholder comment>
## Build
Read by `spire:implementation`. Unset means the skill's default; `none` means deliberately absent.
- **Gate** (cheap, between blocks): <detected gate commands, or placeholder comment>
- **Tests** (once per phase): <detected test command, or placeholder comment>
- **Checkout**: <!-- one checkout (default) | worktrees -->
- **Branches**: <!-- who commits where; default: the branch the brief names -->
- **Staging**: <!-- explicit paths (default) -->
- **Owner models**: <!-- per block kind; default: Opus 5.5 for complex blocks, Sonnet for mechanical ones -->
- **Brief constraints**: <!-- sensitive areas, e.g. generated files, migrations -->
- **Host rules**: <!-- temp dirs, memory caps -->
- **Build plan**: <!-- user sees it before the run (default) | skip (no gate) -->
Personal overrides go in `.claude/spire/project.local.md` (gitignored, same headings). They win over this file.
Fill every detected field; undetected: a <!-- placeholder --> comment.
Phase 4 — Scaffold adepts directory
Founding templates live in the plugin (skills/adepts/templates/); the adept agent copies them during genesis.
4.1 — Create the adepts directory
mkdir -p "${WORKPAD}/adepts"
4.2 — Write adepts/CLAUDE.md
Exists with status: authored in frontmatter: skip. Else write:
---
status: generated
---
# Adepts
Domain knowledge accumulated by adept agents. One subfolder per domain (a subsystem, a library, a cross-cutting concern), short kebab-case slug.
## Structure
adepts/ CLAUDE.md ← you are here / CLAUDE.md ← INDEX — frontmatter + tiered reading list. Short. Auto-loaded. handoff.md ← rolling state for the successor. Overwritten, not appended. key-files.md ← solid knowledge docs — as many as the domain needs conventions.md architecture.md gotchas.md ... ← any other doc, provided it is listed in CLAUDE.md journal/ YYYY-MM-DD-HH-genesis.md YYYY-MM-DD-HH-.md
## Conventions
- **One domain per folder.** Overlap → the stricter scope. Broad names are gravity wells.
- **CLAUDE.md is an index.** Frontmatter, tiered reading list, open questions; under ~60 lines. Auto-loaded on any read in the folder: keep it cheap.
- **Every file in the domain root is listed in CLAUDE.md.** Unlisted files do not exist.
- **handoff.md: overwritten, never appended.** Write early; refresh after anything significant. `verified-at` = commit the solid docs were last checked against.
- **journal/: append-only.** One file per topic or session, `YYYY-MM-DD-HH-<topic>.md`. Recency and session counts derive from these names: keep the prefix exact.
- **Solid knowledge → docs; experiences → journal.** Branch observations stay in the journal (and handoff.md "In flight") until the code is on main.
- **Don't hoard.** Findings belonging in project docs or a workpad report go there; link from here.
- **Metadata is derived.** Never hand-maintain counts, dates or an index file. Declare `domain`, `summary`, `covers`, `related`, `status` once in frontmatter; the roster derives the rest.
Phase 5 — Gitignore
Append each line only if no equivalent line exists.
| Line | personal | shared |
|---|---|---|
spire/ |
.claude/.gitignore (create if missing) |
— |
spire/project.local.md |
— | .claude/.gitignore (create if missing) |
/.spire/ and /${WORKPAD}/logs/ (workpad path relative to repo root) |
.git/info/exclude (nothing personal is committed) |
repo root .gitignore (create if missing; committed with init's other files) |
Phase 6 — Optional alias
Offer:
"Would you like to create
/assistantas an alias for/spire:igor? This creates.claude/skills/assistant/SKILL.mdso you can invoke Igor as just/assistant."
Accepted: write .claude/skills/assistant/SKILL.md:
---
name: assistant
description: Start an Igor session — alias for spire:igor.
user-invocable: true
---
Invoke the `spire:igor` skill. Pass through any arguments:
/spire:igor $ARGUMENTS
Phase 7 — Commit (shared install only)
shared: stage by explicit path the files this run created or modified (.claude/spire/project.md, ${WORKPAD}/adepts/CLAUDE.md, .claude/skills/assistant/SKILL.md if created in Phase 6, the root .gitignore and .claude/.gitignore when Phase 5 wrote them), then commit 🤖 Initialize Spire project config.
personal: no commit (files are gitignored).
Summary
Report: install type; files created or updated; skipped (status: authored files, phases that didn't apply); next steps: "Edit .claude/spire/project.md to fill in any remaining placeholders, then change status from generated to authored to lock it against future re-inits. Personal settings go in .claude/spire/project.local.md."