Skip to content

jirayusueb/egm-stack

v0.23.0Apache-2.0

Spec-first engineering for coding agents: draft with context, review without it, then build with evidence.

arena

Run a controlled arena for /arena or when one attempt at a non-trivial artifact would lock in the wrong shape. Fan out candidates under one brief, cross-judge them from another model family, pick a base, graft the strongest parts, and verify the result.

ddd

Coach strategic and tactical domain-driven design for a model, a spec, or a legacy system. Use for /ddd, or when subdomains, bounded contexts, ubiquitous language, aggregates, or domain events decide the design.

delegate

Delegate a bounded task with /delegate and a self-contained brief. Use when work is independent, parallel, or needs a fresh context, and the parent must keep the scope, the diff review, and the checks.

diagnose

Find the root cause of a defect by discipline: reproduce, minimise, hypothesise with separating tests, instrument, bisect, then fix with a regression test. Use for /diagnose, a reported bug, a crash, wrong output, or a flaky test.

egm-ask

Answer a question about where the user is in the EGM flow, which skill to run next, or whether the stack has a capability, without changing anything. Use for /egm-ask, or when the user asks where they are, what to run next, or how a host maps an action.

egm-bootstrap

Document an existing codebase subtree with README contracts for interfaces, invariants, and side effects. Use for /egm-bootstrap on a legacy repository, or to repair stale READMEs. Experimental. Asks before a tree above fifteen directories.

egm-brainstorm

Stress-test a half-formed idea with eight adversarial lenses, then write a concepts brief that drafting can use. Use for /egm-brainstorm, or when a user has a feature idea but no agreed problem, scope, or alternatives.

egm-draft

Draft a design document one section at a time, with an approval gate after each section, from a concepts brief or the user's notes. Use for /egm-draft, or when a concept is ready to become a spec with goals, alternatives, risks, and an implementation plan.

egm-drift

Compare design documents and READMEs against the code, then report where the implementation diverged from the written contract without editing code. Use for /egm-drift, or when a spec, README, or architecture doc may be stale.

egm-mode

Run /egm-mode to route any engineering task through the EGM spec-first stack. Use it at the start of design work, review, implementation, investigation, or delegation, when you need the right playbook or pipeline skill. It classifies the request, opens the matching playbook or pipeline skill, enforces review with fresh context, and keeps replies short and evidence-backed.

egm-resolve

Triage reviewer findings against the target, write an annotated report, and apply only the fixes the author approves. Use for /egm-resolve, or when a review round leaves findings to settle before the next stage.

egm-review

Audit a design, spec, plan, document, code change, or domain model with fresh-context reviewers, resolve the findings, and report what remains. Use for /egm-review, or when a design needs adversarial review before implementation.

egm-setup

Configure which model each EGM role uses, set one reasoning budget, and write the result to the rule files that harnesses load. Use for /egm-setup, or when the user asks to change EGM models, set a budget, or pick a model for a role.

egm-verify

Prove a change against the approved design's success criteria. Read the criteria, run the check each one names, and write a verification report with evidence. Use for /egm-verify, or when a task is called done and the design says what done means.

how

Explain how a subsystem works with /how. Use for code walkthroughs before a change, onboarding, placement and ownership questions, and runtime flow. Produces Overview, Key Concepts, How It Works, Where Things Live, and Gotchas.

no-comments

Remove comments and workaround code for /no-comments or when a diff adds narration, banners, or suppression comments. Spawn Comment Sicko read-only, reject scope escapes, fix accepted findings at the root, and report open items.

principle-attack-the-premise

Apply when two or more fixes that share one premise fail the same gate. Write the premise down and test it before writing another fix.

principle-boundary-discipline

Apply when wiring validation, error handling, or framework adapters. Validate at system boundaries, trust internal types, and keep business logic in pure functions.

principle-build-the-lever

Apply when work is non-trivial. Build the tool that does it or proves it, so a reviewer can read and rerun the work instead of trusting it.

principle-encode-lessons-in-structure

Apply when the same instruction appears twice or a correction repeats. Encode the rule as a lint, metadata flag, runtime check, or script instead of more prose.

principle-exhaust-the-design-space

Apply when a novel interaction or architecture decision has no precedent. Build 2 or 3 competing prototypes and compare them side by side before committing.

principle-experience-first

Apply when product, UX, or feature-scope trade-offs appear. Choose user delight over implementation convenience and ship fewer polished features.

principle-explain-the-number

Apply when you are about to trust, report, or act on a measured number. Find what limits it and rule out that it measured something other than the work.

principle-fix-root-causes

Apply when debugging. Trace each symptom to the first place the system did something wrong and fix it there.

principle-foundational-thinking

Apply when choosing core types, writing initial logic, or sequencing scaffold and feature work. Get the data shape right so downstream code becomes obvious.

principle-gate-before-spend

Apply when paying for the rest of a plan: a review's later stages, a fan-out's next wave, or a whole-file re-run. Decide with the evidence in hand and spend only what the decision needs.

principle-guard-the-context-window

Apply when context fills with large outputs, long files, or repeated reads. Route bulk work to fresh contexts and keep summaries in the main thread.

principle-laziness-protocol

Apply when refactoring, judging diff size, or tempted to add abstractions. Bias toward deletion and the smallest change that solves the problem.

principle-make-operations-idempotent

Apply when designing commands, lifecycle steps, or loops that run amid crashes and retries. Derive each step from current state so re-execution converges.

principle-migrate-callers-then-delete-legacy-apis

Apply when introducing a new internal API while old callers exist. Migrate every caller and delete the old API in the same wave.

principle-minimize-reader-load

Apply when code is hard to trace. Count layers between question and answer and hidden state the reader must hold, then cut one of each.

principle-model-the-domain

Apply when stateful logic branches heavily or repeats a shape assumption. Encode the domain in a structure so invalid states cannot be represented.

principle-never-block-on-the-human

Apply when tempted to ask whether to do reversible work. Make a reasonable decision, proceed, and present the result for correction.

principle-outcome-oriented-execution

Apply when planning a rewrite or migration with explicit phase boundaries. Converge on the verifiable end state instead of preserving every intermediate state.

principle-prove-it-works

Apply when completing a task and before declaring it done. Check the real artifact, not a proxy, a self-report, or a successful compile.

principle-redesign-from-first-principles

Apply when integrating a new requirement into an existing design. Redesign as if the requirement was foundational, then deliver in verifiable increments.

principle-separate-before-serializing-shared-state

Apply when concurrent actors may write the same file, branch, key, or state object. Remove the sharing first and serialize structurally only for a real invariant.

principle-sequence-verifiable-units

Apply when breaking multi-step work into units or stacking commits. Give each unit a checkable end state and check each before the next.

principle-subtract-before-you-add

Apply when sequencing an addition, refactor, or rewrite. Remove dead code and redundant guards first, then build on the simpler base.

principle-test-behavior-not-implementation

Apply when writing, changing, or keeping a test. Assert what the code's users can observe so the test fails on a broken contract and survives a refactor.

principle-type-system-discipline

Apply when designing types or reviewing a signature in a statically typed language. Make impossible states, mismatched primitives, and unhandled variants compile errors.

reflect

Mine the current conversation for durable learnings with /reflect. Locate the active transcript, run three parallel reviewers, and route accepted items to a concrete skill edit after explicit approval.

rules

Load one condensed book rule pack with /rules and apply its decision rules, trigger rules, and checklist as constraints for the current task. Use for design, boundaries, code review, data, DDD, refactoring, release, legacy, and prototyping work when a decision needs the book rules behind it.

statechart

Check a TLA+ model of a system that moves between states, such as a product flow, a protocol, or a service, and draw it as a Mermaid statechart. The report gives the shortest path to each state that breaks a rule. Use for /statechart, or to show a bug as a path through states. Experimental: requires Java and TLC.

ste100

Apply ASD-STE100 Simplified Technical English constraints for /ste100 or when a procedure, warning, or maintenance instruction must read the same way to every reader. Paraphrase the documented rules, check words against the official Issue 9 dictionary, and report lint findings separately from judgment calls.

swarm

Fan out parallel workers for /swarm or for coverage, races, and exploration. Declare the shape and the done predicate, drain the workers, and return one consolidated report.

tdd

Drive a fix with /tdd when the user asks for a failing test or a regression test, or when a cheap local test path exists. Write the failing test, confirm the intended failure, apply the smallest fix, and rerun.

technical-writing

Apply the layered technical-writing standard for /technical-writing or when writing or reviewing docs, RFCs, READMEs, PR descriptions, or commit messages. Pick the Diátaxis mode, write Google developer style sentences, disambiguate with Global English, and hand controlled language and AI tells to their own skills.

unslop

Cut AI tells from any writing. Use for /unslop or when a draft reads generated, padded, or vague. Scan for the stable rule ids, then rewrite without changing meaning or tone.

why

Investigate why code has its current shape with /why. Use for design rationale, regressions, postmortems, and data-backed thresholds. Discovers MCP tools, maps each to one of seven evidence categories, runs investigators, and returns a cited answer that separates facts from inference.