Files
reliquary/plugins/spire/skills/init/SKILL.md
T
g4borg dbe32330f6 🛰️ export: 17 files (satellite)
M README.md
M plugins/spire/.claude-plugin/plugin.json
M plugins/spire/README.md
M plugins/spire/agents/adept.md
M plugins/spire/agents/athanor.md
M plugins/spire/agents/researcher.md
M plugins/spire/agents/reviewer.md
M plugins/spire/skills/adepts/SKILL.md
M plugins/spire/skills/igor/SKILL.md
D plugins/spire/skills/igor/references/mindset.md
M plugins/spire/skills/igor/references/model-tiers.md
M plugins/spire/skills/implementation/SKILL.md
M plugins/spire/skills/implementation/references/known-failures.md
M plugins/spire/skills/implementation/references/superpowers.md
M plugins/spire/skills/init/SKILL.md
M plugins/spire/skills/zathras/SKILL.md
A plugins/spire/tests/test_sizes.py

Upstream-Commit: 2d4b7733f35b7fdafcf898c6fb2a5b65ee7af6d2
2026-11-25 01:52:10 +01:00

9.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), enabledPlugins 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 — Quire location

Resolve via the spire:quire chain (owner: quire "Where the quire lives"). Record as $QUIRE. New projects default to docs/quire/; an existing docs/workpad/ is used as is (the chain's allowed fallback).

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 to generated to 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">
- **Quire**: <detected quire path with subfolder structure>
- **Adepts**: Domain knowledge agents with persistent folders at `<quire>/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.

- **Scope**: <!-- minimal | medium (default) | high (`spire:project`) -->
- **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 -->
- **Fork owner model**: <!-- optional; no reader yet; meant for: full model id for `spire:gremlins` `G init --model` -->
- **Assertion pattern**: <!-- optional; no reader yet; meant for: regex a gate greps to spot weakened checks -->
- **Parallel tests**: <!-- optional; no reader yet; meant for: `safe` to let forks run tests in parallel -->
- **Brief constraints**: <!-- sensitive areas, e.g. generated files, migrations -->
- **Host rules**: <!-- temp dirs, memory caps; time limits (e.g. `timeout`) only on tests that might not terminate; agent, `claude -p` and gremlin runs get memory caps only -->
- **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 "${QUIRE}/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 quire report go there; link from here.
- **Metadata is derived.** Never hand-maintain counts, dates or an index file. Declare `domain`, `summary`, `covers`, `related` once in frontmatter (`status` optional; unset reads as `active`); 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 /${QUIRE}/logs/ (quire path relative to repo root) .git/info/exclude (nothing personal is committed) repo root .gitignore (create if missing; committed with init's other files)

Only when this run created .claude/spire/project.md (not on re-init): create ${CLAUDE_PROJECT_DIR}/.spire/.gitignore containing * if it is missing (never overwrite), then write ${CLAUDE_PROJECT_DIR}/.spire/upgrades.lock with the version from ${CLAUDE_PLUGIN_ROOT}/.claude-plugin/plugin.json as one line. Do not commit it.


Phase 6 — Optional alias

Offer:

"Would you like to create /assistant as an alias for /spire:igor? This creates .claude/skills/assistant/SKILL.md so 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, ${QUIRE}/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."