Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/okuzpe/midas-harnessWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/okuzpe/midas-harness/01-midas-checks)<a href="https://agentmods.dev/rules/okuzpe/midas-harness/01-midas-checks"><img src="https://agentmods.dev/badge/rules/okuzpe/midas-harness/01-midas-checks.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00040 | $0.11044 |
| Opus 5 | $0.00020 | $0.05522 |
| Sonnet 5 | $0.00008 | $0.02209 |
| Haiku 4.5 | $0.00004 | $0.01104 |
Grade A, and why
01-midas-checks scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads MCP configurationlowAgent snooping
mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.
- **CHECK:** `grep -nE "(token|api[_-]?key|secret|password)\"\s*:\s*\"[^$]" .mcp.json` → empty (matches `/midas-doctor`'s `mcp:secret-free` check). Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Generated by Midas from
harness/conventions.md. Do not hand-edit — run/midas-doctor(ornode scripts/render-adapters.mjs) to re-render.
Always-on rules — CHECK digest (base: harness/rules/; project: harness/rules/)
- Rule: Acceptance criteria (EARS) (always-on) (
acceptance-criteria.md, base)- CHECK:
grep -nE "When |THEN |SHALL |WHEN " {product}/sprints— any acceptance line that is a goal, not an observable behaviour, is a fail. Missing{product}/sprints→ skip. - CHECK:
node <paths.scripts>/gates/test-gate.mjsexits 0; cross-read sprint acceptance vs tests/{runs}/verifications/— an uncovered criterion is a fail.
- CHECK:
- Rule: Accessibility & design-system floor (always-on) (
accessibility.md, base)- CHECK:
grep -rniE "#[0-9a-fA-F]{3,8}|rgba?\(" <ui-src>→ every hit is a token definition, not an inline value in a component; an inline hex/rgb in component code is a fail. - CHECK:
manual:a reviewer can name which reference each key screen draws from; "generic Bootstrap/Tailwind default" with no traceable anchor is a fail. - CHECK:
manual:the design tokens are AA-verified (the startertokens.cssdocuments the ratios per semantic pair); any new colour pairing is checked against AA before use. - CHECK:
grep -rniE "outline:[[:space:]]*(none|0)" <ui-src>→ none without a replacement focus ring; plusmanual:tab through each primary flow — a control that can't be reached or shows no focus is a fail. - CHECK:
grep -rni "<img" <ui-src> | grep -vi "alt="→ empty (every<img>carriesalt; decorative usesalt=""/aria-hidden). HTML-<img>-only — for component frameworks (<Image>,<Avatar>, …) lean on the pairedmanual:review of each image-rendering component. - CHECK:
manual:aprefers-reduced-motionquery exists (the startertokens.cssships one), and every status/state has a non-colour cue (icon, label, or shape). - CHECK:
manual:primary buttons/links meet the minimum target size at touch viewport widths. - CHECK:
manual:each input has a<label>/aria-label; each validation error carries text plus anariaassociation — a red border with no message is a fail. - CHECK:
grep -rniE "box-sizing:[[:space:]]*border-box" <ui-src>is present in the reset; anycontent-boxoverride is a flag. - CHECK:
manual:media inheritsmax-width:100%(base reset); a fixedwidth:NNNpxon media withoutmax-width:100%is a fail. - CHECK:
grep -rniE "display:[[:space:]]*(flex|grid)" <ui-src>→manual:children holding text/media/scroll panes carrymin-width:0(.ds-min-0), or the grid track usesminmax(0,1fr). - CHECK: prose sets
overflow-wrap:break-word; everytext-overflow:ellipsisalso hasoverflow:hidden+white-space:nowrap(the trio) —grep -rniE "text-overflow:[[:space:]]*ellipsis" <ui-src>each verified. - CHECK:
manual:long-form text and forms sit in a--ds-width-prose/--ds-width-formcontainer (~60–75ch), centered. - CHECK:
grep -rniE "(^|[^-])height:[[:space:]]*[0-9]+px" <ui-src>on buttons/inputs is a flag (excludes line/min/max-height); controls read--ds-size-control-*. - CHECK:
manual:no horizontal scrollbar (document.documentElement.scrollWidth <= clientWidth); buttons/inputs stay inside their parent./midas-verifyautomates this. - CHECK:
grep -rniE "z-index:[[:space:]]*[0-9]+" <ui-src>→ each is avar(--ds-z-*)token; a raw integer (e.g.9999) is a fail.
- CHECK:
- Rule: Change propagation — keep sources, bundles, docs, and versions aligned (always-on) (
change-propagation.md, base)- CHECK:
npm run align(engine) names each downstream surface; an unmentioned generated tree in the diff that was hand-edited is a fail. - CHECK:
npm run align(engine) or/midas-alignexits withverdict=alignedor lists only resolved gaps; exit 1 with open gaps is a fail before merge. - CHECK:
git diff --name-onlyshows no lone edits underharness/plugins/midas/,harness/.claude-plugin/,cli/template/, or managed adapter regions without a corresponding.claude/,harness/, orscripts/source change. - CHECK:
node <paths.scripts>/sync-version.mjs --checkexits 0 whenharness/VERSIONis in the diff. - CHECK:
node scripts/test.mjsversion:*,version-pin:*, andversion:sync-checkpass. - CHECK:
git diff --name-onlyon a diff touchingcli/orharness/skillsalso listsINSTALL.mdordocs/— undocumented install/flow change is a fail. - CHECK:
node <paths.scripts>/doctor.mjsreports no adapterdriftafter a<paths.engine>/rules/diff. - CHECK:
grep -rnE 'harness/state\.yaml' .claude/skills/→ only examples naming classic layout, not as the sole read path in ritual guards.
- CHECK:
- Rule: Code quality (always-on) (
code-quality.md, base)- CHECK:
manual:diff each new file against a sibling in the same directory; a naming/indent/idiom break that stands out from local style is a fail. - CHECK:
grep -rin "<concept>" <src-root>/is the review command; a parallel implementation of an existing pattern is a fail. Engine backstop:grep -nE "function detectLegacyLayout" cli/lib cli --include "*.mjs"has one definition. - CHECK: any rules/standards/guidelines doc outside
<paths.engine>/conventions.md,<paths.engine>/rules/, and<paths.rules>/is a fail (find . -iname "*standard*" -o -iname "*guideline*"outside those paths → empty). - CHECK:
manual:the name is a verb-phrase describing the effect; a body with multiple unrelated responsibilities (independent side effects) is a fail. - CHECK: linter (
eslint max-lines-per-function/ equivalent) reports no function over the stack limit; absent a linter, no body exceeds ~40 logical lines. - CHECK:
grep -rnE "\\([^)]*,[^)]*,[^)]*,[^)]*,[^)]*\\)" --include "*.mjs" --include "*.js" cli/libreviewed; no new signature in the diff declares > 4 positional parameters. - CHECK: grep imports against
<paths.rules>/folder-structure.md(the project's Phase-5 rule; e.g.grep -rn "from '@/db'" <src-root>/ui/→ empty); any forbidden cross-layer import is a fail. - CHECK:
eslint no-unused-vars/ts-prune/vulture(per stack) reports zero unused or unreachable symbols in the diff. - CHECK: review for commented-out statements (
grep -nE "^\s*(//|#).*[;{}()]" <diff>); a commented-out code block is a fail. - CHECK:
grep -rnE "TODO" <src-root>/ | grep -vE "TODO\((\w+|#[0-9]+)\):"must be empty. - CHECK:
grep -rnE "console\.(log|debug)|(^|[^.])\bprint\(|fmt\.Print" <src-root>/→ empty, unless the match is the project logger. - CHECK:
manual:the PR/sprint notes record the search for an existing utility; an unexplained duplicate utility is a fail. - CHECK:
manual:a generic abstraction with fewer than 3 distinct call sites is a fail unless explicitly justified. - CHECK:
manual:a wrapper/indirection that adds no behaviour over the call it forwards to is a fail. - CHECK: lockfile diff: every added dependency has a PR note covering size/maintenance/license; an unexplained addition is a fail.
- CHECK:
grep -nE ":\s*[\"']?[\^~*]" package.json(or the stack manifest) → empty; lockfile committed. - CHECK: each new third-party call site carries the Context7 (or documented web-fallback) doc note; a missing note is a fail.
- CHECK:
grep -rnE "catch\\s*\\([^)]*\\)\\s*\\{\\s*\\}" --include "*.mjs" --include "*.js" cli scripts→ empty (unvalidated/swallowed boundary reads are a fail; evidence:file:line). - CHECK:
manual:inspect error/response paths; a message returning a raw secret or internal stack trace to a caller is a fail. - CHECK:
grep -rnE "catch\s*\([^)]*\)\s*\{\s*\}|except[^\n]*:\s*\n\s*pass"→ empty.
- CHECK:
- Rule: Cursor safety hooks (always-on when installed) (
cursor-safety-hooks.md, base)- CHECK:
grep -nE "gate-commits\\.mjs|trace-hook\\.mjs" .cursor/hooks.json— Trace commands are observe-only; citing Trace spans as proof a destructive command was blocked is a fail. - CHECK:
grep -n gate-commits.mjs .cursor/hooks.jsonpresent when Cursor safety hooks are installed;{paths.cache}/session/commit-approved.jsonis the receipt path (schema_version: 2). - CHECK:
harness/rules/cursor-safety-hooks.md(or<paths.engine>/rules/cursor-safety-hooks.md) contains at least one**CHECK:**and a dated## Amendmentsection.
- CHECK:
- Rule: Documentation (always-on) (
docs.md, base)- CHECK:
grep -nE "export (async )?function |export class " --include "*.mjs" cli/lib scripts/libis the scan; each exported symbol in the sprint diff is preceded by a doc comment. - CHECK:
manual:a doc comment that merely echoes the signature is a fail. - CHECK:
manual:non-obvious params/returns (ranges, units, nullability) are documented; an undocumented constraint is a fail. - CHECK:
grep -rnE "@deprecated" <src-root>/→ each match names a reason and an alternative. - CHECK:
manual:each workaround/non-obvious branch has a why comment; a comment restating the code is a fail. - CHECK: see
code-quality.md§ TODO format (not duplicated here). - CHECK:
grep -nE "^\\s*(//|#).*[;{}()]" --include "*.mjs" --include "*.js" cli/lib scripts/lib→ empty of commented-out statements. - CHECK:
manual:a comment citing a spec/issue/paper includes its URL or issue id. - CHECK: the active sprint file's acceptance/Tasks table has no
todo/in-progressrows at audit time. - CHECK:
grep -nE "^## Amendment" <paths.engine>/rules/*.md→ each rule file has a dated Amendment section. - CHECK: each ADR has Context/Decision/Consequences sections;
git log --diff-filter=D -- {product}/adr/shows no deleted ADR. - CHECK:
grep -iE "getting started|quickstart|setup" README.mdpresent, and the steps run from a clean checkout. - CHECK:
.env.example(or equivalent) exists and lists every env var the code reads, with placeholder values only. - CHECK:
manual:each non-obvious CI/deploy step has a doc reference; an undocumented deploy step is a fail. - CHECK:
git diff --name-only HEAD— a behaviour change whose docs (README.md,docs/,INSTALL.md) are untouched in the same commit is a fail. - CHECK: a link-checker over changed docs returns no 4xx/5xx; a broken link is a fail.
- CHECK:
manual:cross-read changed docs againstharness/conventions.md+ rules; a contradiction is a fail (harness file wins).
- CHECK:
- Rule: Enforcement state is recorded and honest (always-on) (
enforcement-state.md, base)- CHECK:
node <paths.scripts>/doctor.mjs <project>reports noenforcementwarn — every named config file exists on disk. Anyinstalled: falseis reported as an advisoryoknote, not a fail. - CHECK: when a stack rule's CHECK names a linter/scanner as its machine-readable form, a matching
enforcement:entry exists and its config file is present. (manual.)
- CHECK:
- Rule: Engine repository is not an install target (always-on) (
engine-repo-boundary.md, base)- CHECK:
test ! -e .harness/engine/VERSION && test ! -e .harness/state.yaml(or Windows equivalent) at the midas-harness repo root — either file present is a fail. - CHECK:
node cli/index.mjs --dry-run .exits non-zero with message containingrefusing to install/update/migrate into the midas-harness engine repository. - CHECK:
manual:session/PR notes proposing a root product install without an explicit human override naming a separate directory is a fail.
- CHECK:
- Rule: Git commits (always-on) (
git-commits.md, base)- CHECK:
git log <base>..HEAD --format=%s | grep -vE "^(feat|fix|docs|refactor|test|chore|perf|style|ci)(\(.+\))?!?: .{1,62}$"→ empty. - CHECK: same
git logscan as above; any subject whose type is outside the allowed set is a fail. - CHECK:
git log <base>..HEAD --format=%s | grep -iE ": (added|adding|fixed|fixing|updated|updating)\b"→ empty. - CHECK:
git log HEAD --format=%B -n 50 | grep -E "^BREAKING CHANGE:"is present whenevergit log HEAD --format=%s -n 50 | grep -E "^[a-z]+(\(.+\))?!:"matches; a!subject without aBREAKING CHANGE:footer is a fail. - CHECK:
manual:where a body exists, it states rationale; a body that just restates the diff is a fail. - CHECK:
git log <base>..HEAD --format=%B | grep -iE "(co-authored-by:.*(claude|copilot|chatgpt|gemini)|generated (by|with) (claude|copilot|chatgpt|gemini)|claude code)"→ empty. - CHECK:
git log HEAD --format=%s -n 20subjects are conventional; a commit spanning unrelated areas is a fail. - CHECK:
git log HEAD --format=%s -n 20 | grep -E "^(feat|fix)\\("mixed in one subject is a fail. - CHECK:
git log <base>..HEAD --name-only | grep -E "\.env($|\.)|\.pem$"→ empty; secret-scan the range (seesecurity.md). - CHECK:
git log <base>..HEAD --format=%s | grep -iE "^(wip|temp|asdf|fix fix)"→ empty. - CHECK:
git log <base>..HEAD --name-onlylists no unexpected binary/build artifacts; any such file is justified in the PR. - CHECK:
git rev-parse --abbrev-ref HEADandgit merge-base HEAD HEADsucceed; a branch forked off another feature branch without a documented dependency is a fail. - CHECK: current branch name matches the generated pattern (
echo "$BRANCH" | grep -E "^(feat|fix|docs|chore|refactor)/[a-z0-9-]+$"). - CHECK:
manual:no branch outlives its sprint window without a recorded reason. - CHECK:
git log -n 5 --format=%Bhas noforce-pushto the default branch without a referencing ADR. - CHECK:
git push --dry-runis not run unless the human requested push;grep -n gate-commits.mjs .cursor/hooks.jsondocuments the mechanical twin. - CHECK:
manual:the PR targets the default branch and links the sprint task; a PR with no sprint reference is a fail. - CHECK:
manual:merged history matches the project's single chosen strategy (no mixed merge/squash).
- CHECK:
- Rule: Hygiene & dead-flow sweep (always-on) (
hygiene.md, base)- CHECK:
manual:ifstate.yamlhasmode: brownfield, either (a) a{runs}/sweeps/sweep-NN.mdexists whose date falls within the active sprint window, or (b){runs}/audits/audit-NN.md§ hygiene recordssweep: skipped — <one-line reason>. Neither is a fail on greenfield (modeabsent orgreenfield). - CHECK:
manual:read the latest{runs}/sweeps/sweep-NN.mdfor this sprint cycle (if any); ifMIDAS_SWEEP_RESULTshowsdead_flows>0orledger_drift>0, the sprint audit must list each as fixed, deferred (with issue/owner), or accepted (with rationale). An unmentioned high-severity row is a fail. - CHECK:
manual:for each feature id touched in the sprint diff,status: passingrows carry non-emptyevidence(test path, route, or verify record);failingrows are not contradicted by shipped code in the same diff without a recorded deferral. - CHECK:
manual:when{product}/roadmap.mdexists, eachsprints[]id has a Status cell ofplanned|active|doneequal to that row'sstatus. A mismatch isledger-drift(fail at Phase 8 unless the audit records a skip with reason). Missing roadmap →n/a(pre-Phase 6). - CHECK:
manual:for each{product}/playbooks/*.mdcited in the sprint or architecture, grep<src-root>/for the trigger predicate; a playbook with zero matches and no## Retirednote in the sweep or audit is a warn (fail if the sprint added or edited that playbook without fixing the trigger). - CHECK:
grep -nE "\\bOPEN\\b" {product}/open-questions.md→ empty when the file exists (answered questions must not stay OPEN);grep -nE "\\]\\([^)]+\\.md\\)" {product}targets that 404 on disk are a fail. - CHECK:
manual:when a{runs}/sweeps/sweep-NN.mdexists for this cycle, every effective<paths.rules>/*.mdand{product}/playbooks/*.mdwhose latest## Amendmentdate (or file mtime if no Amendment) is older than 180 days appears as categoryneeds_review(or is consciously accepted in the sweep Disposition). A sweep that ranstandarddepth and omitted such rows is a fail. Greenfield with no sweep this cycle →n/a.
- CHECK:
- Rule: Lean solution ladder (always-on) (
lean-ladder.md, base)- CHECK:
manual:for each substantial added module/abstraction in the diff, the PR/sprint notes or/midas-lean-reviewrecord name the rung used (or why rung 7 was required); unexplained scaffolding is a fail. - CHECK:
manual:lockfile additions this sprint — each has a note that rungs 3–5 were considered; an unexplained new dep for a thin wrapper is a fail (pairs withcode-quality.mdDependencies). - CHECK:
manual:cross-read the sprint diff againstsecurity.md/accessibility.mdCHECKs that apply to touched surfaces; a "lean" removal of a required control is a fail. - CHECK:
manual:recommended (not hard-required): a{runs}/lean/lean-NN.mdor progress note citing/midas-lean-reviewexists for UI/feature sprints with large diffs; absence alone is not a fail — unresolved high lean findings listed in the Phase-8 audit without fixed/deferred/accepted is a fail.
- CHECK:
- Rule: Cost-aware model routing (always-on) (
model-routing.md, base)- CHECK: Binding Phase 1/3/4/8 / code-review / security-review verdicts are produced via the
midas-orchestratorsub-agent. The model id in an audit/verify/tribunal header is provenance-by-delegation. Runnode <paths.scripts>/doctor.mjs; aroutingwarning is a fail. A local model id in a binding verdict header is a fail unless the record is markedun-attested. - CHECK: Doc fetches and file/status extraction are delegated to
midas-scout(orExplore), not run on the orchestrate tier. (manual: a phase whose only work is fetch/extract names a scout delegation in its SKILL body.) - CHECK: Each multi-tier phase delegates its produce/fetch legs to
midas-builder/midas-scoutin the SKILL body —harness-tieris the dispatch tier only, never the whole cost story. (manual.) - CHECK:
paths.state -> routingids are all known model ids and, under the Claude profile, equalresolveCostAwareRouting(routing_profile, cost_profile)(and the pinnedmodel:of the three first-party agents). Theopenai-miniprofile resolves all three tiers togpt-5.4-mini. Runnode <paths.scripts>/doctor.mjs <project>; arouting:*warning is a fail. (The engine enforces the same reconciliation against the example state inscripts/test.mjs.) - CHECK:
paths.state -> routingids equalresolveCostAwareRouting(routing_profile, cost_profile)under the Claude profile (anycost_profile); agent pins match the same map. Runnode <paths.scripts>/doctor.mjs <project>; arouting:*warning is a fail. - CHECK: each phase / lifecycle skill body has a
## Tier & delegation(or equivalent## Tier & cost) section that names which legs go tomidas-orchestrator/midas-builder/midas-scout—harness-tieralone is not enough. Mechanized:node <paths.scripts>/skill-quality-check.mjswarnsmissing \## Tier & delegation`...` when the heading is absent; a warning on a touched skill is a fail. - CHECK: a skill's
recommended-modelfrontmatter matches itsharness-tierunder the canonical balanced-Claude map (CLAUDE_COST_PROFILE_ROUTING.balancedinscripts/model-profiles.mjs). Mechanized:node <paths.scripts>/skill-quality-check.mjswarns on drift; a warning on a touched skill is a fail. - CHECK: (manual) a latency-tolerant fan-out of ≥3 same-shaped calls uses batching, not a serial loop.
- CHECK: Binding Phase 1/3/4/8 / code-review / security-review verdicts are produced via the
- Rule: Naming (always-on) (
naming.md, base)- CHECK:
git diff --name-only <base>..HEADshows no path segment matching[A-Z _](outside framework-mandated names likeREADME,Dockerfile). - CHECK:
git diff --name-only | grep -iE "/(utils?|helpers?|misc|common|stuff)\.[a-z]+$"→ empty (or each justified). - CHECK:
grep -nE "index\\.(js|mjs|ts|tsx)$" --include "*" cli— each barrel sits on a public module boundary. - CHECK: every test file matches the pinned pattern (
git diff --name-only | grep -iE "test|spec"all conform); a misnamed test is a fail. - CHECK:
grep -rnE "(class|interface|type|enum)\s+[a-z]" <src-root>/→ empty (declarations start uppercase). - CHECK:
grep -rnE "(Class|Object|Impl|Manager|Data)\b" <src-root>/reviewed; an implementation-noise suffix that adds no meaning is a fail. - CHECK:
grep -nE "AbstractThing|BaseObject" --include "*.mjs" --include "*.js" cli scripts→ empty. - CHECK: grep new function declarations against the stack casing rule; a casing mismatch is a fail.
- CHECK:
grep -nE "^export (async )?function [a-z]" --include "*.mjs" cli/lib scripts— function names start with a verb/query word. - CHECK:
grep -nE "function (is|has|can|should)[A-Z]" --include "*.mjs" --include "*.js" cli/lib scripts/libdocuments the boolean-prefix convention. - CHECK:
grep -nE "function (handle|on)[A-Z]" --include "*.mjs" cli/libdocuments the handler prefix convention. - CHECK:
grep -rnE "\b\w+(Array|List|Obj|Str|Num|Map)\b\s*=" <src-root>/reviewed; a type-suffixed variable name is a fail. - CHECK:
manual:single-letter names appear only as loop indices or standard math notation. - CHECK:
grep -nE "^export const [A-Z][A-Z0-9_]+ =" --include "*.mjs" cli/lib scriptsdocuments SCREAMING_SNAKE_CASE for shared constants. - CHECK:
grep -nE "\\b(usr|cfg)\\b" --include "*.mjs" --include "*.js" cli/lib scripts/lib→ empty of non-standard abbreviations as identifiers. - CHECK:
grep -rinE "user|account|member" --include "*.mjs" cli/libis the synonym scan; two names for the same concept is a fail. - CHECK:
manual:each domain noun in code matches a glossary term from{product}/idea.md/{product}/architecture.md. - CHECK:
git grep -nE "\\b(user|account|member)\\b" -- <paths.engine>lists hits for review; a rename that leaves the old identifier in production paths in the same commit is a fail.
- CHECK:
- Rule: Organic implementation routing (always-on) (
organic-routing.md, base)- CHECK:
harness/rules/organic-routing.md(or<paths.engine>/rules/organic-routing.md) contains at least one**CHECK:**and a dated## Amendmentsection. - CHECK:
manual:when a Phase-7 task cluster spans ≥4 files,{runs}/sprints/NN-progress.md§ Done (Route column) or § Observations namesRoute: inline|delegated|plan-first. - CHECK:
manual:no mid-sprint/plan-sprintsor silent planning without user acceptance noted in progress (Accepted plan-first → evidence in Learned / sprint file / ADR). - CHECK:
manual:cost-aware tier (orchestrate/build/scout) is still applied after the route is chosen — seemodel-routing.md. - CHECK:
manual:session/progress notes show at most one writing builder (or inline writer) on the same worktree at a time; two overlapping write delegations without worktree isolation is a fail. - CHECK:
manual:when Phase-7 progress records ≥2delegatedrows in one session, they name distinct scopes (or reuse an earlier summary); identical route+scope relaunch without reuse is a fail.
- CHECK:
- Rule: Safety guardrails (always-on) (
safety-guardrails.md, base)- CHECK:
manual:the sprint/session evidence shows no unauthorized force-push, hard reset, recursive delete of non-tmp project paths, or production destroy; if such a command ran, the human's explicit OK for that command is recorded in the session or PR notes — otherwise fail. - CHECK:
manual:when{paths.cache}/session/freeze-dir.txtexists (or the human named a freeze root still in force), every path in the working-tree diff for that session lies under that root; any write outside is a fail. - CHECK:
manual:when the human asked for guard/full-safety mode, the session both (a) paused on careful-class commands and (b) had a named freeze root before further edits — missing either is a fail. - CHECK:
harness/rules/safety-guardrails.md(or<paths.engine>/rules/safety-guardrails.md) contains at least one**CHECK:**and a dated## Amendmentsection.
- CHECK:
- Rule: Security (always-on) (
security.md, base)- CHECK:
git grep -nE "(sk-[A-Za-z0-9]{16,}|ghp_[A-Za-z0-9]{16,}|-----BEGIN [A-Z ]*PRIVATE KEY)"→ empty; a secret-scanner (gitleaks/trufflehog) on the diff finds nothing. - CHECK:
grep -nE "(sk-|ghp_|BEGIN [A-Z ]*PRIVATE KEY)" --include "*.mjs" --include "*.js" --include "*.json" cli scripts→ empty. - CHECK:
grep -nE "(token|api[_-]?key|secret|password)\"\s*:\s*\"[^$]" .mcp.json→ empty (matches/midas-doctor'smcp:secret-freecheck). - CHECK:
grep -E "\.env|\*\.pem|secret|credential" .gitignorematches each pattern. - CHECK:
node <paths.scripts>/doctor.mjs --gates-onlyreportsokorskipformcp:secret-free. - CHECK:
grep -nE "force.?push|delete.*branch" .mcp.json .cursor/mcp.json→ empty unless a referencing ADR exists. - CHECK:
manual:each token's documented scope matches its actual use; a write/admin token used only for reads is a fail. - CHECK:
grep -nE "permissions:" .github/workflows/*.ymlpresent; default-broad tokens without a matching step are a fail. - CHECK:
grep -rnE "(exec|spawn)\(.*\$\{|query\(\s*[\"'\].*${|+ req.(body|query|params)" /` → empty (string-built SQL/shell from user input is a fail). - CHECK:
grep -rnE "innerHTML|dangerouslySetInnerHTML|v-html|\|\s*safe" <src-root>/→ empty, or each match proven to use sanitized/constant data. - CHECK:
npm audit --audit-level=high(orpip-audit) exits clean on the new deps; the PR records the result. - CHECK: lockfile present and committed in the diff; manifest has no unbound ranges (see
code-quality.mdpinning CHECK). - CHECK:
git diff --name-only package-lock.json pnpm-lock.yaml yarn.lock— an unexplained transitive bump without a PR note is a fail. - CHECK:
npm audit --audit-level=high(orpip-audit/osv-scanner) exits clean on the committed lockfile this sprint; any high/critical is fixed or logged with a dated remediation ADR. - CHECK:
manual:error responses return a safe message/code; a raw stack trace or path reaching the client is a fail. - CHECK:
grep -rnE "log.*(password|token|secret|ssn|email)" <src-root>/→ reviewed; logging a raw secret/PII value is a fail. - CHECK:
manual:response headers/bodies expose no server version or internal IDs not required by spec (e.g.X-Powered-Bydisabled). - CHECK:
grep -rnE "http://(?!localhost|127\.0\.0\.1)" <src-root>/ config/→ empty. - CHECK:
manual:if the spec requires encryption-at-rest,{product}/architecture.mdrecords the mechanism and the code/infra applies it.
- CHECK:
- Rule: Session continuity (always-on) (
session-continuity.md, base)- CHECK:
manual:when the sprint diff checks off tasks in{product}/sprints/NN-*.md, read{runs}/sprints/NN-progress.md§ Done — each completed row carries a non-empty Tool value (e.g.test-runner,context7,playwright-mcp); a checked-off task with proof but no Tool is a fail. Sprints with zero tasks completed this cycle →n/a. - CHECK:
manual:the capture log instate.yamlor the amended artifact's## Amendmentnotesno conflictsor documents the contradiction table outcome; a silent capture against an existing CHECK is a fail. - CHECK:
git diff --name-only HEADlists no new*.dbor vector-store config files; continuity evidence isNN-progress.md,{product}/*, or<paths.rules>/*only. - CHECK:
manual:when{runs}/sprints/NN-progress.mdexists andlast_touchedadvanced this cycle, § Next is non-empty and § Observations has a Learned (or explicit Session close) row covering goal / discoveries / next step. A progress file that only lists Done with a blank Next after a multi-task session is a fail. - CHECK:
manual:session evidence shows/midas-recallor a re-read ofNN-progress.md+paths.stateafter a compaction/reset before further implementation; continuing from chat memory alone is a fail.
- CHECK:
- Rule: Skill authoring quality gate (always-on) (
skill-quality.md, base)- CHECK:
node <paths.scripts>/skill-quality-check.mjsexits 0 when the PR/sprint diff touches authored skills/agents beyond typos/links. - CHECK:
node <paths.scripts>/skill-quality-check.mjsstdout containsHard fails: 0(or JSONfails: 0), or each fail is fixed in the same diff. - CHECK:
node <paths.scripts>/skill-quality-check.mjsexits 0. Dimension floors are the agent score block indocs/skill-quality-gate.md(Core floors:); the mechanical CLI does not print that line. - CHECK:
node <paths.scripts>/skill-quality-check.mjsexits 0. AgentEvidence:cites Trigger/Structure/Completion/Safety perdocs/skill-quality-gate.md; the mechanical CLI does not print that line. - CHECK:
node <paths.scripts>/skill-quality-check.mjsexits 0 on authored skill/agent surfaces; missing name/description, name≠dir, or side-effect skill withoutdisable-model-invocation: true(and no documented exception) is a fail. - CHECK:
node <paths.scripts>/skill-quality-check.mjswarnsnot referenced in the skills catalogwhen a skill directory has no/<name>mention indocs/skills.md(or<paths.engine>/docs/skills.mdon installs) — mechanizes the presence half of this CHECK; a warning on a touched skill is a fail. Stillmanual:whether a changed one-line role was updated in the catalog text, not just that the slash-name is still present (see alsochange-propagation.md). - CHECK:
node <paths.scripts>/skill-quality-check.mjsexits 0; an entry over 500 lines without an in-tree L3 split plan, or happy-path depth > SKILL + one support file, is a fail.
- CHECK:
- Rule: No soft-pass on gates (always-on) (
soft-pass.md, base)- CHECK:
node <paths.scripts>/doctor.mjs --gates-onlyreportsokorskipforgate:diff-receipts(passing{paths.cache}/gates/<run>/{test,quality}.jsonor no production diff). Citing only Trace output is a fail.
- CHECK:
- Rule: State integrity (always-on) (
state-integrity.md, base)- CHECK:
node <paths.scripts>/doctor.mjs --gates-onlyreportsokforgate:phase-artifacts(or nowarn gate:phase-*). Agate=passedphase with neither assumption nor on-disk artifacts is a fail. - CHECK:
node <paths.scripts>/doctor.mjs --gates-onlyreportsok(orskip) forgate:sprint-continuity. An active sprint with no progress file and absent/stalelast_touchedis a fail. See alsosession-continuity.md§ STM progress log (manual twin).
- CHECK:
- Rule: Testing (always-on) (
testing.md, base)- CHECK:
node <paths.scripts>/gates/test-gate.mjsexits 0 (skipped-with-reason counts as pass when no production paths changed); a behaviour change with no test delta is a fail. - CHECK:
manual:for new-feature sprint tasks,{runs}/sprints/NN-progress.mdor the sprint file names a failing test (or equivalent RED evidence) before the implementation is checked off; a feature task with only a GREEN note and no RED/exception reason is a fail. - CHECK:
manual:when the sprint diff includes a defect fix (fix:commit, bug/defect sprint task, or progress note naming a bug), the same range adds or updates a test (or a verify/acceptance evidence row) that covers the formerly broken behaviour; a fix-only diff with no regression proof is a fail. - CHECK:
grep -nE "assert\\s+True|expect\\((true|1)\\)\\.toBe\\(\\1\\)|assert 1 == 1" --include "*.js" --include "*.mjs" scripts cli→ empty. - CHECK: the project test command (
npm test/pytest/ …) exits 0 with zero failures. - CHECK:
manual:each new public function/module has a unit test with its dependencies stubbed. - CHECK:
manual:at least one integration test exercises each architecture module boundary touched this sprint. - CHECK:
manual:each acceptance-criterion journey has a unit/integration test, a/midas-verifyrecord row (web or mobile section), or equivalent API proof; for UI journeys the verify record also shows no uncaught console errors / no failed happy-path network requests (runtime health, seeverification.md). UI E2E does not require a committede2e/folder in{product}/when the frozen{runs}/verifications/verify-NN.mdcovers the journey. - CHECK: every test file sits in the pinned location (adjacent or mirrored); a stray test path is a fail.
- CHECK:
manual:each test targets one behaviour; a test asserting several unrelated outcomes is a fail. - CHECK:
grep -nE "describe\\(|it\\(" --include "*.js" scripts/lib/tests cli/libtitles name scenario + expected result. - CHECK:
grep -rnE "\.(skip|only)|xit\(|xfail|@pytest.mark.skip|test.todo" <tests>→ each match carries a linked issue + expiry, else fail. - CHECK:
grep -rnE "assert\s+True|expect\((true|1)\)\.toBe\(\1\)|assert 1 == 1" <tests>→ empty. - CHECK: the suite passes when run in random/sharded order; shared mutable state across tests is a fail.
- CHECK:
grep -rnE "https?://(?!localhost|127\.0\.0\.1)" <tests>→ empty, or each match is a tagged contract test. - CHECK:
grep -rnE "mkdtempSync|tmpdir\\(" --include "*.js" --include "*.mjs" cli/lib/core/tests scripts/lib/testspresent for filesystem-touching tests. - CHECK:
grep -rnE "Math.random|Date.now\(\)|new Date\(\)" <tests>reviewed; unseeded randomness or a real clock in a time-dependent test is a fail. - CHECK: the CI workflow (
.github/workflows/*) runs the test command on push/PR; absent, it is a fail. - CHECK:
grep -nE "required:" .github/workflows/ci.yml— branch protection / required check makes the test job mandatory for merge. - CHECK:
manual:any known-flaky test has a tracking issue and a fix/quarantine within the sprint.
- CHECK:
- Rule: Verification (always-on) (
verification.md, base)- CHECK: the project's typecheck, lint, and build commands (
tsc --noEmit/mypy, the linter, the build) each exit 0 with zero new errors on the sprint diff. - CHECK: the project test command (
npm test/pytest/ …) exits 0; a behaviour change with no new/updated test in the same diff range is a fail. - CHECK:
manual:the project's run/preview/start command boots and stays up; an uncaught exception, failed import, or crash-on-launch is a fail (record the command + the observed output). - CHECK: a
/midas-verifyrecord ({runs}/verifications/verify-NN.md) exists with a per-criterionpass | fail | blockedverdict backed by a selector + screenshot; an uncovered acceptance-criterion journey is a fail. - CHECK: verify record
## Device profilestable is filled for UI sprints; missing mobile profile on a mobile-first screen is a fail. - CHECK:
manual:for mobile-client sprints,## Mobile (native)section exists or every native criterion is proven another way; silent skip is a fail. - CHECK: runtime-health table in verify record; Chrome DevTools, agent-browser, or Playwright fallback documented per row.
- CHECK: verify record
## Product authenticityfilled for UI marketing surfaces; logo-swap "still generic" = fail (seevisual-design.md§ Product authenticity). Missing section on a landing/marketing sprint is a fail. - CHECK:
manual:every acceptance-criterion row has a non-empty Tool value; undocumented fallback is a fail. - CHECK: the sprint's
{runs}/audits/audit-NN.mdexists and was produced by the auditor tier, not the producer; itsMIDAS_AUDIT_RESULTtally showsunresolved=0 verdict=pass. - CHECK:
node <paths.scripts>/doctor.mjs --gates-onlyreportsokorskipforgate:phase-artifacts; each{runs}/audits/audit-*.mdwithverdict=passlists artifact paths that exist on disk. - CHECK:
manual:when the sprint diff touches auth/payments/secrets or exceeds ~400 authored lines in production paths,{runs}/audits/audit-NN.mdor progress cites/midas-security-auditor a dated skip-with-reason; silent skip is a fail. Docs-only / rename sprints must not be failed for skipping security-audit. - CHECK:
manual:when audit/progress cites ≥2 independent review lenses on one candidate, the record names a synthesis ofconfirmed|suspect|escalatefor overlapping findings; two lens outputs with no synthesis is a fail. - CHECK: in
{product}/features.json, astatus: "passing"with emptyevidence, or a shipped behaviour with no feature entry, is a fail; Phase 8 grades the file against the verification records.
- CHECK: the project's typecheck, lint, and build commands (
- Rule: Visual design fundamentals (always-on) (
visual-design.md, base)- CHECK:
manual:on each key screen, exactly one primary CTA is visually dominant; a second filled primary on the same view is a fail. - CHECK:
grep -rniE "<h[1-6]" <ui-src>→manual:each page's heading order has no skipped levels; a decorative size bump without semantic level is a fail. - CHECK:
manual:the primary heading uses--ds-text-2xl/--ds-text-3xlor larger; body copy uses--ds-text-md; metadata/labels use--ds-text-smor--ds-text-secondary— a screen where all text reads the same size/weight is a fail. - CHECK:
grep -rniE "font-family" <ui-src>→ every declaration isvar(--ds-font-sans)orvar(--ds-font-mono)(or inherits from the base reset); a third family or a raw stack name is a fail. - CHECK:
grep -rniE "font-size:[[:space:]]*[0-9.]+(px|rem|em)" <ui-src>→ each hit isvar(--ds-text-*)or lives in the token definition file; a raw size in component code is a fail. - CHECK:
grep -rniE "line-height:[[:space:]]*[0-9.]+" <ui-src>→ each hit in component code isvar(--ds-leading-*); a raw unitless/px line-height in a component is a fail. - CHECK:
manual:related controls share--ds-space-2/--ds-space-4gaps; unrelated sections are separated by ≥--ds-space-6; arbitrary px gaps in component CSS are a fail (seecomponents.mdcross-cutting rule 6). - CHECK:
manual:the primary CTA uses--ds-action-*; status badges/toasts use intent tokens; a decorative rainbow of accent colours on one screen is a fail. Hardcoded colour values are graded underaccessibility.md(do not re-audit here). - CHECK:
manual:primary vs secondary/ghost variants are distinguishable without relying on colour alone (weight, fill vs outline, or position). - CHECK:
manual:name the first-viewport composition; if it matches the default SaaS stack above with no written justification in design-direction, fail (severity MED+). - CHECK:
manual:auditor answers "Could this page belong to an unrelated product after a logo and text swap?" — Yes = fail; No = pass (cite what makes it product-specific). - CHECK:
manual:first viewport shows product evidence named in{product}/design-direction.mdFirst viewport section; a hero that is only headline + subtitle + two buttons + stock mockup is a fail unless that section marks an explicit exception. - CHECK:
manual:each major marketing section either advances a user job or shows the product; a section that only repeats icon+title+blurb with no product tie-in is a fail. - CHECK:
manual:palette/type/iconography on key screens cite design-direction rows; unexplained purple-on-white / stock-gradient / decoration-only icon grids are a fail. - CHECK:
manual:a first-time reviewer can name the primary action within 5 seconds on each key screen; buried or ambiguous primary action is a fail. - CHECK:
manual:on landing/marketing pages, headline + primary CTA appear in the first viewport; on app views, the page title and primary action precede dense secondary content. - CHECK:
manual:each data-dependent view has identifiable empty/loading/error UI (component name or route cited in the audit); a spinner-only forever or empty white box is a fail. - CHECK:
manual:list each landing section's purpose; duplicate benefit-card bands or repeated primary CTAs without a new user job are a fail.
- CHECK:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago Changed · +1 lines 4d52a2e3627d
- 7d ago First seen · 256 lines · 40 tokens per session scan A 2172777553c6
01-midas-checks is a cursor rule published in the GitHub repository okuzpe/midas-harness (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 40 tokens to every session and 11,044 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
clean-code-reviewer
Eliminates technical debt using SOLID, DRY, YAGNI, and Addy Osmani production-grade engineering principles. / TR: SOLID, DRY, YAGNI ve Addy Osmani üretim seviyesi mühendislik ilkeleri ile kod kalitesini denetleyen yetenek.
sweep-benchmarks
Audit xrspatial modules for asv benchmark coverage gaps: missing benchmarks, backend parameterization gaps, unrepresentative inputs, broken or silently-skipped benchmarks.
code-review
BMAD BMM Agent: code-review.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.