About the Project — Grimoire Engine
Inspiration
This project started with a simple, frustrating truth we all experience as developers:
we fix the same bugs over and over because our codebase forgets.
A teammate solves something brilliantly… then leaves.
A tricky PR is merged… and slowly disappears into the scroll of history.
Six months later, the same error reappears, and we have no memory of how we fixed it before.
We asked ourselves: What if our code didn’t forget?
What if every past solution became a “spell” the system could recall whenever a similar error surfaced?
That idea—half practical, half mystical—is what sparked the Grimoire Engine.
What We Learned
Working on this project reminded us how messy real engineering knowledge can be.
We learned how to:
- Break down PRs into meaningful, structured information
- Represent code diffs and error logs in ways AI can understand
- Match new failures to old fixes using embeddings and tf-idf
- Generate repair suggestions that feel genuinely useful
We also learned how powerful it is to merge AI reasoning with real engineering history.
How We Built It
1. Capturing “Spells” from PRs
We built a GitHub webhook that listens for merged PRs and fetches the diff, title, description, and logs.
All this gets distilled into a structured “spell” object.
PRs are unpredictable, so crafting this process took a lot of refining.
2. Indexing Everything
We use a hybrid of small embeddings and tf-idf so the system can understand both human-readable text and raw code fragments.
This balanced approach performed better than either method on its own.
3. Matching Errors to Past Fixes
When an error comes in, we vectorize it and compare it against all stored spells.
If a high-confidence match appears, we show the related spell along with a generated patch preview.
4. The Interface
We wanted the UI to feel like opening a digital spellbook without making developers roll their eyes.
Finding the right mix of clarity, modern design, and a touch of mysticism was surprisingly fun.
Challenges We Faced
Making sense of chaotic PRs
PRs vary wildly in structure and clarity. Converting them into consistent data required many iterations.
Embedding code + logs reliably
Stack traces can overwhelm embeddings, and diffs can confuse them.
We experimented with weighting fields differently until the matches felt accurate.
Preventing AI from hallucinating fixes
We added confidence thresholds and guardrails to stop the system from being overly creative.
Designing a mystical yet usable UI
We wanted personality without sacrificing usability—a tough but rewarding design challenge.
Reflection
Through this project, we realized something important:
software development is as much about collective memory as it is about skill.
Every team is shaped by the solutions it discovers, the bugs it defeats, and the lessons it painfully learns not to repeat.
But that knowledge fades unless we preserve it.
Grimoire Engine is our attempt to give codebases a memory—
a way for past work to guide future work,
and maybe save a few developers from late-night debugging sessions.
n
What's next for GRIMOIRE ENGINE
The hackathon version of Grimoire Engine is just the beginning.
We now see how powerful this idea can be when applied to real engineering teams, and there are several directions we’re excited to explore next.
🔮 1. Deeper Understanding of Code, Not Just Text
Right now, spell matching is based on logs, diffs, and natural language.
Next, we want the engine to understand ASTs, code structure, and semantic intent, enabling:
- More precise spell matching
- Stronger patch suggestions
- Fewer hallucinations
This will turn the system from “smart search” into “true reasoning over code.”
📚 2. A Continuously Evolving Spellbook
We want spells to grow over time.
When similar fixes appear across multiple PRs, the engine should merge them into canonical spells—the distilled wisdom of the codebase.
This means the longer a team uses Grimoire Engine, the smarter it gets.
🧪 3. Auto-Validation and Safe Patch Application
Before suggesting a fix, the engine should:
- Run tests
- Validate build output
- Check type safety
- Predict risk levels
Eventually, we aim for a workflow where developers can apply patches with one click, backed by guardrails.
🧙 4. Developer Workflow Integrations
We plan to integrate with tools developers already use:
- VS Code / JetBrains plugins
- GitHub PR comments
- CI/CD systems
- Slack or Teams notifications
Errors should summon relevant spells wherever developers already work.
🌐 5. Supporting Multi-Repository and Large-Org Knowledge
Right now, the system works on a single repository.
Next, we want cross-repo and cross-team spell discovery so organizations can build shared knowledge across entire engineering ecosystems.
🤝 6. Collaborative Spell Editing
Spells should be editable, reviewable, and versioned.
Think of it as:
“Pull Requests for your engineering knowledge.”
Teams can refine spell summaries, add context, or link related spells over time.
🪄 7. A Truly Mystical, Guided Debugging Experience
We want the interface to evolve into a richer experience where:
- Errors “manifest” as entities
- Spells show lineage and history
- The system guides developers step-by-step through the reasoning
All while keeping the mystical Grimoire identity.
The Vision
We imagine a future where engineering teams never lose knowledge again—
where every fix, every insight, and every hard-won lesson becomes part of a living system that grows with the codebase.
Grimoire Engine is more than a tool.
It’s the beginning of a collective memory for software teams, and we’re excited to keep building toward that future.
Built With
- fastapi
- kiro
- nextjs
- openai
- python
- render
- sqlalchemy
- sqlite
- v0.dev
- vercel
Log in or sign up for Devpost to join the conversation.