Run a Ritual exploration loop on a branch — analyze with lenses, suggest capabilities, gate-check, tag schools, score, and present ranked suggestions
Ships in grimoire-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are the Grimoire's Ritual engine. A Ritual is the structured exploration loop for a branch: analyze → suggest → gate-check → tag → score → present. You run the complete loop and present the user with ranked, validated, school-tagged suggestions they can accept, reject, or defer.
This is not branch expansion. Expansion generates a structural skeleton. A Ritual explores a branch through analytical lenses, surfaces capabilities the team hasn't considered, filters through governance gates, corrects school tags, scores against project criteria, and presents the results for human decision.
Run this when the user wants to explore a branch in depth: "run a ritual on billing," "explore the auth branch," "what capabilities am I missing in patient-records?"
Read these .grimoire/ files before starting:
tree.yaml — The current tree (for duplicate/contradiction detection and context)vision.md — Informs suggestion relevanceschools.yaml — Sealed wards for gate-check; all wards for taggingscoring.yaml — Criteria for the scoring phaseglossary.yaml — Canonical termsdecisions.yaml — Previous rejections/deferrals (to avoid re-suggesting rejected nodes)The user specifies which branch to explore. Find that branch in tree.yaml.
Analyze the target branch and select 3-5 analytical lenses — the perspectives through which you will examine the branch's capability space. Different lenses surface different kinds of capabilities.
Available Lenses:
Functional Decomposition — What discrete functions does this subsystem perform? Inputs, outputs, transformations. Good for: core business logic, data processing, CRUD.
User Journey Mapping — What does a user actually do with this subsystem, step by step? Good for: UI/UX, onboarding, public-facing systems.
Data Flow Analysis — What data enters, how is it transformed, where does it go, who can see it? Good for: storage, integrations, PII/sensitive data.
Failure Mode Analysis — What happens when this breaks? Failure modes, fallbacks, recovery paths. Good for: infrastructure, critical paths, financial transactions.
Integration Surface Analysis — Where does this touch other subsystems, external services, or APIs? Good for: API layers, service boundaries, third-party integrations.
Security Threat Modeling — Attack surfaces, trust boundaries, authentication points, data sensitivity. Good for: auth, public endpoints, credential handling.
Performance & Scale Analysis — Bottlenecks, hot paths, scaling characteristics. Good for: real-time systems, high-throughput processing, SLA-bound services.
Operational Lifecycle Analysis — How is this deployed, monitored, maintained, deprecated? Good for: infrastructure, background jobs, data migrations.
Domain Expert Decomposition — What would a subject-matter expert expect? Industry standards, regulatory requirements. Good for: medical, financial, legal domains.
Dependency Chain Analysis — What must exist before this works? What does it enable? Good for: build order, foundational capabilities, hidden prerequisites.
Selection criteria:
Present your lens selection with 1-2 sentence reasoning for each:
## Analysis Lenses for `billing`
1. **Functional Decomposition** — Maps the core billing operations to ensure no fundamental capability is missed.
2. **Failure Mode Analysis** — Critical because billing handles financial transactions where failure has regulatory consequences.
3. **Integration Surface Analysis** — Billing integrates with patient records, insurance providers, and payment processors.
Using the selected lenses, generate 7-15 candidate nodes for the branch.
Each suggestion includes:
<min>-<max><unit>. Honest ranges — wide is better than falsely precise.Rules:
decisions.yaml)Run /grimoire-gate-check on the generated suggestions. Gate-check is the sole blocking authority — it eliminates suggestions that violate sealed wards or fail structural gates (contradiction, cycle, duplicate).
Pass the suggestions along with:
tree.yaml, schools.yaml, and decisions.yamlSuggestions within this ritual batch may depend on each other. These intra-batch dependencies are valid — gate-check will not eliminate them as contradictions.
After gate-check, continue with only the surviving suggestions.
For each surviving suggestion, verify and correct the school tags:
Flag advisory ward implications — what evidence will be required at slice time if this suggestion is accepted:
### Advisory Implications
- **invoice-generation**: Triggers compliance.audit-trail ward. Will require: audit-log-specification
- **payment-processing**: Triggers security.input-sanitization ward. Will require: xss-prevention-checklist, input-boundary-audit
Also flag glossary candidates — domain terms in suggestions that aren't in the glossary.
Score each surviving suggestion against the criteria in .grimoire/scoring.yaml.
For each criterion, assign a score from 1 to 5 using the criterion's low/high anchors. Compute a weighted total. Merge suggestions that are functionally identical within the batch (keep the better description). Rank by weighted total descending.
Present the results as a markdown table, ranked by score:
## Ritual Results: `billing` (12 suggestions, 2 eliminated)
| # | Suggestion | Effort | Schools | Score | Key Dependencies |
|---|-----------|--------|---------|-------|------------------|
| 1 | Invoice Generation | 5-8d | compliance | 4.2 | patient-records.species-database |
| 2 | Payment Processing | 5-10d | security, compliance | 3.9 | billing.invoice-generation |
| 3 | Insurance Claims | 8-15d | compliance | 3.5 | billing.invoice-generation |
| ... | ... | ... | ... | ... | ... |
### Eliminated by Gate Check
- ~~Multi-Currency Support~~ — Sealed ward: no-external-services
- ~~Client Finder~~ — Duplicate of patient-records.search
### Advisory Ward Implications
- Invoice Generation → compliance.audit-trail: audit-log-specification required
- Payment Processing → security.input-sanitization: xss-prevention-checklist required
For each suggestion, include a brief expandable description and rationale.
Ask the user to accept, reject, or defer each suggestion:
tree.yaml under the target branch with status: accepteddecisions.yaml with reason. Do not add to tree.decisions.yaml with reason. Do not add to tree (but may be reconsidered later).The user may decide all at once ("accept 1-5, reject 6, defer the rest") or one by one.
Cascading rejections: If the user rejects a suggestion that other suggestions in this batch depend on (intra-batch dependency), flag the dependents and ask if they should also be rejected.
After decisions:
.grimoire/tree.yaml — Add accepted suggestions as nodes under the target branch.grimoire/decisions.yaml — Record all accept/reject/defer decisions with timestamps and reasons.grimoire/glossary.yaml — New glossary candidates/grimoire-expand. You are surfacing capabilities through analytical lenses.What SKILL.md sets; muted values are Claude Code's defaults
/grimoire-skills:grimoire-ritualfrom grimoire-skills
npx claudepluginhub tapania/grimoire-skills --plugin grimoire-skills15 skills in this plugin
/grimoireGrimoire orchestrator — transforms a software project vision into governance-checked, dependency-resolved implementation slices/grimoire-archaeologyBootstrap .grimoire/ from an existing codebase — reverse-engineer vision, schools, taxonomy, and glossary from code/grimoire-expandExpand a single branch of the specification tree with child capabilities/grimoire-familiarAnalyze a third-party library or service and map its capabilities, constraints, and conflicts onto the specification treeOther plugins' skills for the same job