runward

RW™ · V0.22.0

Docs · Reference

Rule catalog.

The 64 craft rules the gate can require, each mapped to one or more phases and an OWASP ASI risk. Table generated from the stable machine contract runward rules --json.

64 rules · runward v0.22.0

RuleImpactPhasesASIWhy
Day-Zero Project Setup Checklistchecklist-day-zero-project CRITICAL advisory Starts a project on the foundation that prevents costly refactors, with the core engineering disciplines wired from the first commit
Pre-Production Resilience Checklistchecklist-pre-production-resilience CRITICAL advisory ASI08 Ensures application handles failures gracefully in production
Pre-Production Security Checklistchecklist-pre-production-security CRITICAL advisory ASI02, ASI03, ASI06 Ensures security requirements are met before production deployment
Secrets at the Network Boundary, Never in the Modelconfig-secrets-boundary CRITICAL floor, govern ASI03, ASI10 Makes secret disclosure structurally impossible by keeping the real key out of the model and the domain
Contract Governance (Versioned, Additive, Expand-then-Contract)contracts-governance CRITICAL architect ASI04, ASI07 Lets the system evolve without breaking consumers, by governing the contract at the boundary rather than the implementation behind it
Evaluation Loop (Test + Evaluate, Hold-out, Anchored Judge)eval-loop CRITICAL govern ASI08 Gives a non-deterministic system a trustworthy way to detect behavioural regressions without letting it optimise its own grader
Deterministic Boundary of the Modelfrontier-deterministic-boundary CRITICAL floor ASI01 Keeps every fact, figure and decision that can be checked out of the model, so the system is verifiable and cannot hallucinate load-bearing values
The Redone-Task Proofhandover-redone-task-proof CRITICAL handover ASI09 A hand-over is proven by a real task redone end to end without the departing builder — recorded, dated, pointed at — so autonomy is a fact, not a farewell promise
Move the Deterministic out of the Modelhexa-move-deterministic-out CRITICAL floor ASI01, ASI02 Reduces LLM costs and latency by moving deterministic logic out of LLM calls
Model Provider as an Adapter (Detected, Never Hardcoded)provider-llm-auto-detection CRITICAL floor Keeps the model behind a port so the provider can change by configuration without touching the core
Fail-Open for the Non-Critical, Fail-Closed for the Sensitiveresilience-fail-open CRITICAL govern ASI02, ASI08 Degrades gracefully where safe and denies safely where it matters, instead of applying one failure policy everywhere
If Doubt, Upgrade the Modelrouting-confidence-upgrade CRITICAL advisory Prevents quality degradation from incorrect model selection
Externalize State for Scalingscaling-state-externalization CRITICAL advisory Enables horizontal scaling by removing in-process state dependencies
Unexpected Code Execution Runs Sandboxed, Never In-Processsecurity-code-execution-sandbox CRITICAL govern ASI05, ASI02 Caps the blast radius of any code the agent runs (generated or tool-provided) by isolating it from the host, secrets and network
Pin Every Consumed Tool/MCP Server by Version and Hashsecurity-mcp-server-pinning CRITICAL architect, govern ASI04, ASI10 A consumed tool or MCP server is pinned by version and content hash, so a supply-chain swap or rug-pull cannot silently change what the agent may call
Untrusted Input, Prompt Injection and the Lethal Trifectasecurity-prompt-injection CRITICAL floor, govern ASI01, ASI06 Treats prompt injection as a first-rank, structural threat constrained by architecture rather than detected by heuristics
Sovereignty Graduated by Class of Datatopology-sovereignty-by-data-class CRITICAL topology Prevents regulated or personal data from silently landing on a placement that cannot hold its sovereignty
Background Job Guardrails (Retry, Idempotency, Bounded Concurrency, Job Observability)async-job-guardrails HIGH govern ASI08 The four non-negotiables of any background job — bounded retry per step, idempotency under concurrency, capped and partitioned concurrency, and queue lag plus failure rate as first-class metrics
Post-Turn Pipeline (Keep the Interactive Turn Thin)async-post-turn-pipeline HIGH advisory Keeps response latency bound to what the answer needs by moving extraction, consolidation and summarization into an isolated, event-driven pipeline that runs after the turn
Pre-Production Observability Checklistchecklist-pre-production-observability HIGH advisory Ensures you can monitor and debug production issues
Pre-Production Performance Checklistchecklist-pre-production-performance HIGH advisory Ensures application performs well under production load
Memory Carries Provenance; an Untrusted Write Cannot Act Unrevieweddata-memory-provenance HIGH govern ASI06 Every stored memory item carries its origin and trust tier; a memory written from untrusted content is quarantined and cannot influence a privileged action without human review
Forward-Only, Branch-First Migrationsdata-migrations-forward-only HIGH advisory Keeps schema change safe and auditable by making migrations additive, ordered, and tested on a branch before main
The Agent Charter Is Finalized as the Leave-Behindhandover-agents-charter-final HIGH handover ASI10 AGENTS.md leaves the mission as the standing constraint on every future agent — verification commands, judgment boundaries, never/PR rules — so the next agent inherits the discipline, not just the code
The Runbook Is Executable, Not Descriptivehandover-runbook-executable HIGH handover ASI08 The recovery runbook carries real commands for the gestures that matter at 3 a.m. — start, observe, debug, resume, swap the provider, rerun the bench, process a suspended approval — so an incident meets procedures, not prose
The Succession Is Namedhandover-succession-named HIGH handover The system leaves the mission with a named owner, an escalation path and a review cadence — an unowned agentic system in production is an incident with a start date
New Feature = New Adapterhexa-adapter-pattern HIGH architect, floor Keeps core business logic clean and external integrations isolated
Hexagonal Architecture Structurehexa-architecture HIGH architect, floor Enables testability, maintainability, and clean dependency management
A Thin Model Abstraction You Own (Not a Heavy Chain Framework)hexa-typescript-native HIGH architect Reduces token overhead, improves debuggability, removes volatile dependencies by keeping a light abstraction you control instead of a heavy framework
Tiered Memory Routerpatterns-memory-router-tiered HIGH advisory ASI06 Order-of-magnitude latency cut on simple queries by fetching only the memory tier the query needs, measured on a reference system — recalibrate on your traffic
ADR Discipline and Working Journalprocess-adr-and-journal HIGH architect Makes structural decisions traceable and reversible-by-record, so the system can be picked up by anyone without re-litigating settled choices
Graceful Degradation of Optional Servicesprovider-no-crash-missing-env HIGH floor Lets the app start and run wherever it is deployed, enabling features by available config rather than crashing on a missing variable
Multi-Provider Fallbackresilience-multi-provider-fallback HIGH govern ASI04, ASI08 Ensures LLM availability by falling back to alternative providers
LLM Retry with Exponential Backoffresilience-retry-backoff HIGH govern ASI08 Handles transient LLM failures gracefully without overwhelming the API
Model Cost Ratiosrouting-model-cost-ratios HIGH advisory Essential reference for cost optimization decisions
Smart Routing by Complexityrouting-smart-complexity HIGH advisory Order-of-magnitude latency cut on simple requests and a substantial cost reduction through intelligent model selection, measured on a reference system — recalibrate on your traffic
Distributed Rate Limitingscaling-distributed-rate-limiting HIGH advisory ASI08, ASI10 Enables consistent rate limiting across multiple instances
Provenance on Every Field, So the Human Never Trusts a Guesssecurity-human-agent-trust HIGH govern ASI09 Stops a model-proposed value being read as a verified fact at the approval point — the human decides on real provenance, never on fabricated confidence
Re-approve a Tool on Any Change to Its Signed Definitionsecurity-tool-change-reapproval HIGH govern ASI02, ASI04 A change to a registered tool's definition (name, schema, description, permissions) forces re-approval before the agent may call it, closing the rug-pull window
State as an Immutable Journal (Event Sourcing, Replay, Provenance)state-event-sourcing HIGH floor ASI06 Makes the agent a stateless reducer over an external, replayable journal, so truth, audit and recovery are structural rather than bolted on
Tool Registry Patterntools-registry-pattern HIGH advisory ASI02, ASI03 Replaces giant switch statements with maintainable, extensible tool management
Tool Scope and Atomicitytools-scope-atomicity HIGH floor ASI02 Reduces token usage and improves LLM tool selection accuracy
Every Port Has a Named Placementtopology-port-placement-mapped HIGH topology Keeps the execution topology traced port by port, so a placement never drifts unseen behind the domain
Trace Export Is a Decision, Because Traces Are Datatopology-trace-export-decision HIGH topology Stops the most sensitive payloads leaving under the name "telemetry" without a named, reviewed decision
A Usage Registry, Because Risk Is Classed by Deploymenttopology-usage-registry-present HIGH topology Lets you answer, at audit time, what runs where touching what — risk attaches to a deployment, not a platform
Scheduled Maintenance (The Cron Updates and Cools, It Never Destroys Truth)async-scheduled-maintenance MEDIUM advisory Keeps memory, derived views and the journal healthy over months of operation through periodic decay, pruning and cold archiving that never touch the source of truth
Prompt Cache Stability (a Cost Lever, Provider-Specific)cache-three-tier-architecture MEDIUM advisory Cuts input-token cost when a provider bills cached prefixes cheaper, by keeping the stable part of the prompt byte-identical across requests
Config Typing with Zodconfig-typing-zod MEDIUM advisory Makes configuration type-safe and validated once at the boundary, so the rest of the system trusts it
Reversible Memory Consolidation (Merge, Summarize, Keep Pointers)data-memory-consolidation MEDIUM advisory Keeps long-term memory compact without destroying evidence, so every consolidated fact can be unfolded back to its sources at audit time
Bi-Temporal Memory Invalidation (Contradicted Facts Are Dated, Not Deleted)data-memory-invalidation MEDIUM advisory Lets memory change its mind without lying about the past, by tracking when a fact was learned and when it was valid as two separate timelines
Memory Scoring Formuladata-memory-scoring MEDIUM advisory Provides optimal memory retrieval ranking
Orphan Data Cleanupdata-orphan-cleanup MEDIUM advisory Prevents data bloat from orphaned records
TTL by Data Typedata-ttl-types MEDIUM advisory Ensures proper data lifecycle management and compliance
Stack Posture (Sober Default plus Trigger), Not a Fixed Stackhexa-recommended-stack MEDIUM advisory Replaces a frozen product stack with a portable rule for choosing technology by evidence, so the rule does not age with any vendor
Alert Configurationobservability-alert-configuration MEDIUM advisory Ensures timely notification of production issues
LLM Metrics Trackingobservability-llm-metrics MEDIUM advisory Enables cost monitoring, performance optimization, and anomaly detection
Structured JSON Logsobservability-structured-json-logs MEDIUM advisory Enables log querying, aggregation, and alerting in production
Prompt as Program (Prompt Compiler)patterns-prompt-compiler MEDIUM advisory Enables versioning, testing, and optimization of prompts
Request ID Propagationpatterns-request-id-propagation MEDIUM advisory Enables end-to-end request tracing across services
Codebase Metrics Thresholdsquality-codebase-metrics MEDIUM advisory Identifies code quality issues before they become problems
Zod Input Validationquality-zod-input-validation MEDIUM advisory Prevents invalid data from entering the system and provides type safety
Retryable vs Non-Retryable Errorsresilience-retryable-errors MEDIUM advisory Prevents wasted retries and ensures quick failure for unrecoverable errors
Database Connection Poolingscaling-db-connection-pooling MEDIUM advisory Prevents connection exhaustion under load
Log Providers at Startupobservability-startup-provider-log LOW advisory Simplifies debugging by showing configuration at startup

Generated from runward rules --json — run runward explain <slug> for the full text · runward v0.22.0

← Docs