mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-11 07:56:50 +02:00
f6eee5661ec8736ff3d558c500656f253a8afa55
Add system-prompt.ts that dynamically generates a system prompt for an
LLM assistant that helps users:
- Learn about Nostr protocol (events, kinds, NIPs, identifiers)
- Build Grimoire commands from natural language descriptions
- Explain what any Grimoire command does
The prompt is built dynamically from the codebase documentation:
- Command docs from src/types/man.ts (manPages)
- NIP titles from src/constants/nips.ts
- Event kinds from src/constants/kinds.ts
- Kind ranges from src/lib/nostr-kinds.ts
Exported functions:
- buildSystemPrompt(options?) - Full prompt with all sections
- buildCompactSystemPrompt() - Smaller version for limited context
- getCommandsReference() - Just the commands section
- getNipsReference() - Just the NIPs section
- getKindsReference(maxKinds?) - Just the kinds section
- getNostrBasics() - Just the Nostr fundamentals
- getCommandQuickReference() - Array of {name, synopsis, description}
- getCommandDoc(name) - Single command documentation
- getNipTitles() - Map of NIP IDs to titles
- getEventKindsInfo() - Map of kind numbers to info
https://claude.ai/code/session_01V6ooJHnmnRgqBXdrrMpj1k
…
…
…
…
Grimoire
A Nostr protocol explorer and developer tool with a tiling window manager interface.
Features
- Tiling Windows - Each window is a Nostr "app" (profile viewer, event feed, NIP docs, etc.)
- Command Palette - Unix-style commands via
Cmd+Kto open apps and navigate - Multi-workspace - Virtual desktops with independent layouts
- Real-time - Reactive event subscriptions with automatic updates
Stack
React 19, TypeScript, Vite, TailwindCSS, Jotai, Dexie, Applesauce
Getting Started
npm install
npm run dev
Scripts
| Command | Description |
|---|---|
npm run dev |
Start dev server |
npm run build |
Build for production |
npm test |
Run tests in watch mode |
npm run lint |
Lint code |
npm run format |
Format code |
License
MIT
Languages
TypeScript
98.9%
CSS
0.8%
JavaScript
0.3%