Inspiration

Every community moderator and every freelancer already lives inside automation they cannot read. Discord's AutoMod rules, Zapier chains, a billing tool's reminder settings — the rules act on people, but the person accountable for them can't see what the rule actually says, can't test what it would have done, and can't take an action back.

CurseEngine starts from a simple demand: an automation you can read, in plain language; a way to rehearse it before it runs; and an undo for everything it does.

What it does

CurseEngine is a small, frozen automation language. You write a curse — one line of near-English — and a hand-written tokenizer and recursive-descent parser compile it to a typed, inspectable rule graph. A sandboxed executor runs it against live events, but only through capabilities the host app has explicitly declared. There is no eval, and no LLM anywhere in parsing or execution: deterministic rules make the final call, every time.

curse spam-strikes: when message where count(message by same author flagged) >= 3 within 7 days -> mute author for 1 day; escalate to owner

Three properties hold across the whole system:

  • Readable — the rule graph is rendered for every curse, and every decision the executor makes is recorded with its reasons (including the actions it skipped, and why).
  • Rehearsable — the simulator runs the same executor over historical events with a recording adapter. A dry run has zero side effects, proven by property-based tests, so "what would this rule have done last week?" is a safe question.
  • Reversible — every action lands in the grimoire, an append-only audit log. Undo never edits history; it appends a reversal. State and grimoire persist in Postgres, so the record survives restarts — verified live by stopping the production apps cold and watching the grimoire come back.

One skeleton, two apps and a rule-pack

The Skeleton Crew claim, mechanically checkable in git: after the engine baseline, zero files under packages/curse-engine changed while both apps and the pack were built.

App What it proves The contrast
GrimMod (chat moderation) A raid-bot burst is muted on its third flagged message, the owner is escalated to, later messages are suppressed — and the mute can be undone from the grimoire Real-time, high-volume, safety-critical, human-in-the-loop
Deadbeat (invoice chasing) Advancing the clock fires polite (7d), firm (14d) and escalate (21d) tiers into an in-app outbox, exactly once per tier per invoice Scheduled, low-volume, money-adjacent, tone-critical
Standup pack Three .curse files with new vocabulary run through simulate() as a dry run Scheduled, team-internal, informational

Both apps share one engine and one kill switch: set CURSE_ENGINE_ENABLED=off and event intake returns 503 with zero decisions, emails, mutes or grimoire growth — while reads and undo keep working.

How I built it (with Kiro)

The full write-up is in the repo (docs/KIRO-USAGE.md) and summarised in the Kiro section below. The short version: four specs, steering-guarded slices, a Kiro Web core build (nine sessions, ~50 of the 4,000 hackathon credits) plus Slice 4 Web and CLI sessions — a custom agent run by name, a completed MCP lookup, and a published Power — and an adversarial QA pass after every slice whose findings went back into the specs.

Try it in minutes

git clone https://github.com/pintu544/curseengine
cd curseengine
pnpm install --frozen-lockfile
pnpm test          # 179 tests, including 1,500-case simulator/live parity
pnpm --filter @curseengine/grimmod build && pnpm --filter @curseengine/grimmod start

Or skip the install: both demos are live (links above). In GrimMod, press Raid-bot burst and watch the third message trigger the mute. In Deadbeat, press +1 day and watch the outbox fill — then press it again and watch nothing duplicate.

What I learned

The property-based tests earned their keep on day one: the first parity run shrank a counterexample where simulator and live behaviour disagreed about stacked mutes — a wrong assumption a hand-written test would have shared. And spec-first turned out to be a cost feature, not a process tax: with the decisions written down, the whole build cost about 50 Kiro credits.

Who this helps next

Small-community moderators who need AutoMod's power without its opacity, and solo operators who chase invoices and standups by hand. The engine is MIT-licensed and app-agnostic: any host that can declare capabilities (chat, mail, notify) can be automated in sentences its owner can actually read.

Built With

Share this project:

Updates

Submission history