mormot2-superpowers
A plugin for Claude Code built on the Superpowers framework to serve the Synopse mORMot 2 community.
What is this and why do I need it?
Claude Code is an AI assistant that runs in your terminal, understands your codebase, and can write, edit, and test code autonomously.
Superpowers is a plugin framework for Claude Code. It allows developers to inject strict workflows, specialized tools, and deep domain knowledge directly into the AI's context so it stops acting like a junior generalist and starts acting like a senior specialist. Superpowers enforces strict TDD cycles, creates isolated git worktrees for safe development, generates detailed implementation plans, dispatches parallel subagents, performs technical code reviews, investigates root causes systematically, and verifies tests/builds before commits or PRs.
Out of the box, when an AI tries to write Pascal for mORMot 2, it falls back to generic habits: it writes string fields on TOrm classes, generates WriteLn "logging" instead of using TSynLog, forgets RawUtf8 boundaries, and invents classes that don't exist. It also doesn't know how to run fpc or dcc32 with your project's specific search paths.
mormot2-superpowers bridges this gap. It is a set of carefully crafted rules, documentation bridges, and build scripts that teaches Claude Code how to actually use mORMot 2 idiomatically.
The Plugin in Action (Input / Output Examples)
Here are a few examples showing how the plugin changes Claude's behavior from generic to mORMot 2 specific:
Example 1: Generating a Model
Prompt: "Add a User ORM class with email and role fields."
Without the plugin (Generic AI):
Generates standard Delphi classes using string, perhaps guessing at SQL mappings or using generic data access patterns. It will likely use deprecated TSQLRecord (from mORMot v1) instead of TOrm (mORMot 2). It will also default to using WriteLn instead of ConsoleWrite, ReadLn instead of ConsoleWaitForEnterKey, and will struggle with correct RawUtf8 casting.
With mormot2-superpowers:
The AI automatically loads the mormot2-orm skill and generates idiomatic code:
type
TOrmUser = class(TOrm)
fEmail: RawUtf8;
fRole: RawUtf8;
published
property Email: RawUtf8 index 80 read fEmail write fEmail stored AS_UNIQUE;
property Role: RawUtf8 read fRole write fRole;
end;
It knows to use RawUtf8, TOrm, and stored AS_UNIQUE.
Example 2: Querying the Documentation
Command: /mormot2-doc rest
Action:
Instead of hallucinating APIs, the agent retrieves the actual, local SAD (Software Architecture Document) chapter concerning REST and SOA. It injects the excerpt into its context, allowing it to correctly implement an IInvokable interface service exactly as the mORMot 2 framework dictates.
Example 3: Building and Testing
Command: /fpc-build or /mormot2-test
Action:
Claude Code normally doesn't know where your framework files are located or how to invoke your compiler. With the plugin, it invokes fpc, lazbuild, or dcc32 with all the correct mORMot 2 search paths injected automatically (e.g., -Fi../mORMot2/src -Fu../mORMot2/src/core).
It then parses the structured build output (BUILD_RESULT exit=0 errors=0 warnings=0) and can autonomously fix compilation errors or test failures using TSynTestCase.
What it does