$npx -y skills add Rune-kit/rune --skill constraint-checkMeta-validator for HARD-GATEs. Use when auditing whether a skill's mandatory constraints were actually followed during a workflow (not just claimed). Called by cook, team, and audit for discipline compliance.
| 1 | # constraint-check |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | The internal affairs department for Rune skills. Checks whether HARD-GATEs and mandatory constraints were actually followed during a workflow — not just claimed to be followed. Reads the constraint definitions from skill files and audits the conversation trail for compliance. |
| 6 | |
| 7 | While `completion-gate` checks if claims have evidence, `constraint-check` checks if the PROCESS was followed. Did you actually write tests before code? Did you actually get plan approval? Did you actually run sentinel? |
| 8 | |
| 9 | ## Triggers |
| 10 | |
| 11 | - Called by `cook` (L1) at end of workflow as discipline audit |
| 12 | - Called by `team` (L1) to verify stream agents followed constraints |
| 13 | - Called by `audit` (L2) during quality dimension assessment |
| 14 | - `/rune constraint-check` — manual audit of current session |
| 15 | |
| 16 | ## Calls (outbound) |
| 17 | |
| 18 | None — pure read-only validator. |
| 19 | |
| 20 | ## Called By (inbound) |
| 21 | |
| 22 | - `cook` (L1): end-of-workflow discipline audit |
| 23 | - `team` (L1): verify stream agent compliance |
| 24 | - `audit` (L2): quality dimension |
| 25 | - User: manual session audit |
| 26 | |
| 27 | ## Execution |
| 28 | |
| 29 | ### Step 1 — Identify Active Skills |
| 30 | |
| 31 | Parse the conversation/workflow to identify which skills were invoked: |
| 32 | |
| 33 | ``` |
| 34 | Extract from context: |
| 35 | - Skills invoked via Skill tool (exact list) |
| 36 | - Skills referenced in agent narrative |
| 37 | - Phase progression (cook phases completed) |
| 38 | ``` |
| 39 | |
| 40 | ### Step 2 — Load Constraint Definitions |
| 41 | |
| 42 | For each invoked skill, extract HARD-GATEs and numbered constraints: |
| 43 | |
| 44 | ``` |
| 45 | For each skill in invoked_skills: |
| 46 | Read: skills/<skill>/SKILL.md |
| 47 | Extract: |
| 48 | - <HARD-GATE> blocks → mandatory, violation = BLOCK |
| 49 | - ## Constraints numbered list → required, violation = WARN |
| 50 | - ## Mesh Gates table → required gates |
| 51 | ``` |
| 52 | |
| 53 | ### Step 3 — Audit Compliance |
| 54 | |
| 55 | Check each constraint against the conversation evidence: |
| 56 | |
| 57 | | Constraint Type | How to Verify | Evidence Source | |
| 58 | |---|---|---| |
| 59 | | "MUST write tests BEFORE code" | Test file Write/Edit timestamps before implementation Write/Edit | Tool call ordering | |
| 60 | | "MUST get user approval" | User message containing "go"/"yes"/"proceed" after plan | Conversation history | |
| 61 | | "MUST run verification" | Bash command with test/lint/build output | Tool call results | |
| 62 | | "MUST show actual output" | Stdout captured in agent response | Agent messages | |
| 63 | | "MUST NOT modify files outside scope" | Git diff files vs plan file list | Git + plan comparison | |
| 64 | | "Iron Law: delete code before test" | No implementation code exists before test creation | Tool call ordering | |
| 65 | |
| 66 | ### Step 4 — Classify Violations |
| 67 | |
| 68 | | Violation Type | Severity | Meaning | |
| 69 | |---------------|----------|---------| |
| 70 | | HARD-GATE violation | BLOCK | Skill says this is non-negotiable | |
| 71 | | Constraint violation | WARN | Skill says this is required but not fatal | |
| 72 | | Best practice skip | INFO | Recommended but optional | |
| 73 | |
| 74 | ### Step 5 — Report |
| 75 | |
| 76 | ``` |
| 77 | ## Constraint Check Report |
| 78 | - **Status**: COMPLIANT | VIOLATIONS_FOUND | CRITICAL_VIOLATION |
| 79 | - **Skills Audited**: [count] |
| 80 | - **Constraints Checked**: [count] |
| 81 | - **Violations**: [count by severity] |
| 82 | |
| 83 | ### HARD-GATE Violations (BLOCK) |
| 84 | - [skill:test] Iron Law: implementation code written at tool_call #12 BEFORE test file created at #15 |
| 85 | - [skill:cook] Plan Gate: Phase 4 started without user approval message |
| 86 | |
| 87 | ### Constraint Violations (WARN) |
| 88 | - [skill:verification] Constraint 2: "All tests pass" claimed at message #20 without stdout evidence |
| 89 | - [skill:sentinel] Constraint 3: files scanned list not included in report |
| 90 | |
| 91 | ### Compliance Summary |
| 92 | | Skill | HARD-GATEs | Constraints | Status | |
| 93 | |-------|-----------|-------------|--------| |
| 94 | | cook | 3/3 ✓ | 6/7 (1 WARN) | WARN | |
| 95 | | test | 0/1 ✗ | 8/9 (1 WARN) | BLOCK | |
| 96 | | verification | 1/1 ✓ | 4/6 (2 WARN) | WARN | |
| 97 | | sentinel | 1/1 ✓ | 7/7 ✓ | PASS | |
| 98 | |
| 99 | ### Remediation |
| 100 | - BLOCK: test Iron Law — delete implementation, restart with test-first |
| 101 | - WARN: verification — re-run and capture stdout |
| 102 | ``` |
| 103 | |
| 104 | ## Constraint Catalog (Quick Reference) |
| 105 | |
| 106 | Key HARD-GATEs across skills that constraint-check audits: |
| 107 | |
| 108 | | Skill | HARD-GATE | Check Method | |
| 109 | |---|---|---| |
| 110 | | test | Tests BEFORE code (Iron Law) | Tool call ordering | |
| 111 | | cook | Scout before plan, plan before code | Phase progression | |
| 112 | | plan | Every code phase has test entry | Plan content | |
| 113 | | verification | Evidence for every claim | Stdout capture | |
| 114 | | sentinel | BLOCK = halt pipeline | No commit after BLOCK | |
| 115 | | preflight | BLOCK = halt pipeline | No commit after BLOCK | |
| 116 | | debug | No code changes during debug | No Write/Edit in debug | |
| 117 | | debug | 3-fix escalation | Fix attempt counter | |
| 118 | | brainstorm | No implementation before approval | User message check | |
| 119 | |
| 120 | ## Output Format |
| 121 | |
| 122 | Constraint Check Report with stat |