Skip to content

wycats/grimoire

Repository files navigation

Grimoire: A Spellbook for Agents

Mission: A Self-Compiling Cognitive Operating System.

Overview

Grimoire is not just a collection of prompts; it is a state-machine generator that compiles "Cognitive Spells" into VS Code-compatible prompt files (.prompt.md). These spells allow AI agents to shift reasoning modes (e.g., from "Lateral Thinking" to "Scientific Debugging") on command.

Philosophy

We follow The Exosuit Way:

  • Context is King: The docs/agent-context is the source of truth.
  • Phased Execution: Plan -> Implement -> Verify.
  • Laws vs. Code: RFCs are laws; the Manual is the code.

Getting Started

Prerequisites

  • Node.js 24+
  • pnpm

Installation

pnpm install
pnpm run prepare # Installs git hooks

Usage

Compiling

To compile the Grimoire locally (to .github/prompts):

pnpm run build

Deploying

To deploy the Grimoire to your global VS Code user profile:

pnpm run deploy
# or explicitly
pnpm run deploy -- --stable
pnpm run deploy -- --insiders

Configuration & Auto-Deploy

To enable automatic deployment on commit, create a grimoire.local.json file in the root (this file is gitignored):

{
  "autoDeploy": true,
  "target": "stable" // or "insiders"
}

With this configuration, lefthook will trigger a deployment every time you commit changes.

Development

Adding a Spell

  1. Edit src/data/spellbook.ts.
  2. Add your new spell to the appropriate category.
  3. Run pnpm run check to verify types and linting.
  4. Commit your changes (auto-deploy will handle the rest if configured).

Project Structure

  • src/data/spellbook.ts: The content (spells, definitions).
  • src/core/: The compiler logic and system axioms.
  • src/scripts/: Utility scripts (auto-deploy, audits).
  • docs/: Project documentation and RFCs.

Scripts

  • pnpm run check: Type-check and lint.
  • pnpm run lint: Run ESLint.
  • pnpm run format: Run Prettier.

License

ISC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors