Overview/Features

What is in the framework

Each capability below names the module that implements it, where a single module owns the behaviour, and the table or dataset that pins it. Counts come from the repository at version 0.1.0. The skill, agent, rule, command and eval-case counts are re-checked by scripts/validate-repo.py; the test count is reported by the suite itself, so read it from a test run.

17 skills 13 agents 13 hook rules 13 CLI commands 101 eval cases 498 tests

Classification

Every request is read before anything else happens. The classifier returns an intent, a complexity band, a priority, an output shape, a workflow tier, and the evidence behind each decision.

zyrompts classify
$ zyrompts classify "refactor the payment module into services"
{
  "intent": "refactor",
  "complexity": "moderate",
  "workflow": "planned",
  "flags": ["ambiguous"],
  "ambiguities": ["no acceptance criteria stated for a non-trivial change"],
  "signals": [
    { "dimension": "complexity", "value": "security-sensitive surface",
      "confidence": 0.6, "evidence": "cue 'payment'" },
    { "dimension": "complexity", "value": "terse but wide scope",
      "confidence": 0.7, "evidence": "6 words, wide-scope cue retained" }
  ]
}

Two rules exist because the first version of the classifier got them wrong. A terse request with wide scope is terse, not trivial. A code-changing request with no concrete target is underspecified, not a one-line edit. Both are pinned by the classification suite.

Classification suite, 25 cases, all passing
RequestIntentComplexityTier
hiunknowntrivialDIRECT
fix TypeError in src/components/Map.tsxfixtrivialDIRECT
fix the bugfixtrivialLIGHT
refactor the payment module into servicesrefactormoderatePLANNED
migrate the monolith to microservicesbuildlargeFULL

Workflow lifecycle

Thirteen phases, in order. Each has a gate, and a phase that fails its gate blocks the workflow rather than letting it advance.

INTAKE -> CLARIFY -> RESEARCH -> SPECIFY -> PLAN -> CRITIQUE -> APPROVE
       -> IMPLEMENT -> REVIEW -> FIX -> VERIFY -> ARCHIVE -> DONE

Four tiers select a prefix of that chain. The tier is a floor, never a ceiling: the classifier raises it on evidence and never lowers a heavier one that the evidence supports.

Phase count per tier, from workflow.py:TIER_PHASES
TierPhasesCountSelected when
DIRECTINTAKE, DONE2trivial ask, or a question about code
LIGHTINTAKE, IMPLEMENT, VERIFY, DONE4small, contained change
PLANNEDadds CLARIFY, SPECIFY, PLAN, CRITIQUE, APPROVE, REVIEW10moderate build or refactor
FULLall thirteen13large, wide, or architectural

Revision loops are bounded. A critique that keeps failing cannot spin: the loop stops at its cap and hands back to a human. A block records resume_at, so the state file says exactly where work stopped.

Do not force every task through the full lifecycle. A one-line question is answered in the DIRECT tier. Sending it through planning, critique and approval would be slower and no safer.

Policy and permissions

The engine answers one question per tool call: given this tool, these arguments and this autonomy level, is the call allowed, denied, or does it need confirmation?

Autonomy levels. The hard-deny table fires in all four columns.
LevelRead toolsSafe mutationsFile writes
read-onlyallowaskdeny
ask (default)allowaskask
autoallowallowallow
yoloallowallowallow

Read-only denies writes outright rather than asking, because asking implies yes is a valid answer, and one approval would negotiate the level away. Unknown tools are treated as mutating: fail closed.

hard denials under yolo
$ zyrompts policy "rm -rf /" --autonomy yolo
{
  "decision": "deny",
  "reason": "hard denial 'root-delete': 'rm -rf /' is never allowed",
  "rule": "hard-deny:root-delete"
}

$ zyrompts policy "ls -la" --autonomy yolo
{
  "decision": "allow",
  "reason": "read-only command",
  "rule": "readonly-command"
}

Nine hard-deny rules, a protected-path table, workspace containment and a secret redactor run before any autonomy band is consulted. The security page lists them in full.

Hook engine

One dispatcher serves every event. A capability is a JSON file, not a script, so adding a nudge needs no Python change.

13 rules across five events
EventRulesWhat they do
UserPromptSubmitintake, research-first, scope-discipline, output-readability, decision-routingclassify the request, then nudge on evidence, scope, format and routing
PreToolUsebash-safety, background-exec, write-scopeinject the policy verdict and the path boundary before a tool runs
SessionStartdecorum, memory-recallload the behaviour policy and prior project state
Stopverify-completioncheck a completion claim against evidence in the transcript
SubagentStartsubagent-routing, agent-boundaryroute work to a role and enforce the independence boundary

A rule is validated against a capability matrix before it runs. A bad regex, an unknown event or a handler that is not on the allowlist is a load-time skip with a note, never a crash. The dispatcher exits 0 on every path, because a hook that crashes blocks the user's prompt.

{
  "id": "research-first",
  "event": "UserPromptSubmit",
  "priority": 10,
  "criteria": { "match": ["\\b(best practice|state of the art)\\b"] },
  "action": {
    "type": "inject_context",
    "text": ["Check the primary source before asserting. Cite the URL and date."]
  }
}

Skill library

Seventeen canonical skills. Each carries purpose, activation conditions, inputs and outputs, procedure, required tools, examples, failure handling, evaluation cases, version and machine-readable dependencies. zyrompts validate fails on an unknown dependency or a cycle.

skills/<name>/SKILL.md
SkillUse it whenDepends on
prompt-improvera request is underspecified and would need a correction round-tripnone
prompt-engineeringwriting or adapting a prompt for a specific model familynone
brainstorma goal exists but no approach is decidedoptional: clarify
clarifya real fork, a contradiction, or a missing requirementnone
researchthe answer depends on facts you do not havenone
specifya non-trivial feature has no written definition of doneclarify
planbefore any non-trivial changespecify
critiquea plan exists and has not been attacked yetplan
cycledraft, critique and merge in one bounded passplan, critique
executea plan is approvedplan, critique
tdda test suite exists and the change has observable behaviorexecute
debuggingsomething fails and the cause is not knownnone
refactorbehavior must stay identical while structure changesoptional: tdd
code-reviewa diff needs an independent readexecute
security-reviewcode handles untrusted input, auth, secrets, files or the networkcode-review
verifybefore claiming a change worksexecute, code-review
archivework ends, pauses, or is handed oververify

Agent roles

Thirteen roles declared as data: capability tier, tools, whether the role is read-only, its attempt cap, what it produces, and whose output it may review. The orchestrator uses that data to schedule work.

agents.py:REGISTRY
RoleTierWritesMay reviewProduces
researcherfastno-research report with sources
prompt-engineerstandardno-improved prompt with before/after score
plannerfrontierno-plan.md
architectfrontierno-decision with alternatives
criticfrontiernoplanner, architectcritique with graded findings
developerstandardyes-code changes with test evidence
debuggerstandardno-root cause with reproduction
testerstandardyesdevelopertest suite and run output
code-reviewerfrontiernodeveloper, testerfindings ranked by severity
security-reviewerfrontiernodevelopersecurity findings with severity and fix
documentationfastyes-docs update
performancestandardno-measurement and proposal
verifierfrontiernodeveloper, tester, code-revieweracceptance matrix with evidence

The registry routes by capability class, not by product name. A role asks for a frontier, standard or fast model; which model fills that slot is the operator's decision.

Platform adapters

An adapter is a pure function from the skill list to a set of files. No clock, no network, no environment. That is what makes generate-adapters.py --check meaningful in CI.

Generated output, 75 files across five platforms
PlatformPer-skill fileManifestHook engine
Claude Codeskills/<name>/SKILL.mdplugin.json, hooks.jsonyes
Gemini.gemini/skills/zy-<slug>/SKILL.mdskills.jsonno
Copilot.github/skills/zy-<slug>/SKILL.mdplugin.jsonno
CodexAGENTS.md index-no
OpenCode.opencode/agent/zy-<slug>.md-no

The zy- prefix applies where a platform namespace is flat and a bare execute would collide with a built-in skill. The architecture page covers what each renderer drops and why.

Prompt engineering

A deterministic score from 0 to 100, attributed point by point across seven components: task clarity, target context, output format, constraints, success criteria, scope boundaries and examples. The rewrite uses the score to prove it improved the prompt.

zyrompts score
$ zyrompts score "fix the bug"
{
  "total": 20,
  "max_total": 100,
  "grade": "F",
  "components": {
    "task_clarity": 20, "target_context": 0, "output_format": 0,
    "constraints": 0, "success_criteria": 0, "scope_boundaries": 0,
    "examples": 0
  },
  "missing": [
    "name the file, symbol, error, or source the task applies to",
    "specify the output format and length",
    "state what must and must not happen",
    "add a checkable success criterion (done when ...)",
    "bound the scope: which files or modules may change"
  ],
  "not_applicable": []
}

The frameworks (RTF, CO-STAR, RISEN, CRISPE, few-shot) are data, not prose, so the right one can be selected from the classification rather than from taste. Model guidance routes on capability class, so it does not rot when a version number changes.

Independent review

Deterministic critique of plans, specifications and diffs. A finding is reported only after a refutation attempt, and carries a confidence grade: CONFIRMED when the check proves it, UNVERIFIED when it does not.

plan.md
# Plan

## Chapter 1 - Middleware

Add rate limiting to src/middleware/rate.ts.
zyrompts plan-critique plan.md --check-paths
# Review: plan

Verdict: BLOCK
Findings: 3 surviving, 0 refuted (3 CONFIRMED, 0 UNVERIFIED)

## Chapter 1 missing Affected files
Severity: medium
Confidence: CONFIRMED

'Chapter 1 - Middleware' does not state its affected files.

Evidence: heading 'Chapter 1 - Middleware' has no 'Affected files' section

Suggestion: Add a 'Affected files:' block naming the files and how success is proven.

## Chapter 1 missing Verification
Severity: medium
Confidence: CONFIRMED

'Chapter 1 - Middleware' does not state its verification.

Evidence: heading 'Chapter 1 - Middleware' has no 'Verification' section

Suggestion: Add a 'Verification:' block naming the files and how success is proven.

## Chapter 1 references a missing file
Severity: high
Confidence: CONFIRMED

'Chapter 1 - Middleware' names src/middleware/rate.ts, which does not exist.

Evidence: path 'src/middleware/rate.ts' not found in the working tree

Suggestion: Confirm the path or mark it as a file to be created.

Structural headings such as Context, Rollback and Open questions are not graded as chapters. That distinction is a real defect the templates found when the plan template failed its own critique.

Eval harness

Four suites, 101 labelled cases. Each case states the intended behavior, so a change that helps one suite and hurts another shows up as a number instead of an argument.

zyrompts eval
SuiteCasesMeasures
classification25intent, complexity and tier against labelled requests
injection18instruction-like text detection and the resulting tier drop
policy46decision and rule id for commands, paths and autonomy levels
prompt_score12score bands and the components each prompt is missing

One failing case does not stop the suite. Datasets accept # comments, so a case can explain why it exists next to the expectation.

State and telemetry

Project state is one JSON document under .zyrompts/state/project.json, written atomically with a temporary file and a rename, so a crash mid-write cannot corrupt the only copy. Every mutation appends to an event log, which makes history auditable after the fact.

The state file carries a schema version. Loading a newer version raises rather than silently dropping fields the running code does not understand.

Telemetry records cost, duration and tool calls as JSONL. It is local only: nothing phones home, and a crashed run still leaves a usable log.

Command line

Thirteen commands. Each is scriptable without a model, and each sets an exit code, so any of them can be a CI gate.

zyrompts --help
CommandWhat it doesExit code
classifyintent, complexity, tier and signals for a prompt0
scoreprompt quality 0-100 with missing components0
improverewrite a prompt; gaps become questions0
policyevaluate a tool call at a given autonomy1 on deny
plan-critiquedeterministic critique of a plan file1 on block
diff-reviewdeterministic critique of a diff1 on block
adaptersgenerate or check the five platform trees1 on drift
validaterules, skills, dependencies, manifests1 on problems
evalrun the four eval suites1 on failure
healthenvironment and rule health as JSON1 if unhealthy
decorumprint the policy, or check a reply against it1 on problems
modelsprompting guidance for a model family0
redactstrip credentials from text or stdin0

Run with no subcommand for a health check. Full usage is in the README.

See how the layers fit

The architecture page maps every module to its invariant and shows the data flow end to end.