@azure-id/orc 1.6.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +152 -0
  2. package/README-id.md +206 -125
  3. package/README.md +202 -74
  4. package/bin/cli.js +1595 -2
  5. package/bin/mockrun-catalog.js +272 -267
  6. package/bin/verify-contracts.js +4553 -4509
  7. package/bin/verify-package.js +6 -0
  8. package/bin/webui/api.js +26 -0
  9. package/bin/webui/app.html +10 -0
  10. package/bin/webui/css/panels/knowledge.css +30 -0
  11. package/bin/webui/css/panels/rules.css +145 -0
  12. package/bin/webui/fixtures/index.js +27 -0
  13. package/bin/webui/fixtures/rules.js +1002 -0
  14. package/bin/webui/fixtures/wiki-one.js +198 -0
  15. package/bin/webui/i18n/en/knowledge.json +127 -117
  16. package/bin/webui/i18n/en/nav.json +1 -0
  17. package/bin/webui/i18n/en/rules.json +55 -0
  18. package/bin/webui/i18n/id/knowledge.json +127 -117
  19. package/bin/webui/i18n/id/nav.json +1 -0
  20. package/bin/webui/i18n/id/rules.json +55 -0
  21. package/bin/webui/js/01-i18n.js +1 -0
  22. package/bin/webui/js/panels/knowledge.js +117 -1
  23. package/bin/webui/js/panels/rules.js +351 -0
  24. package/mock-run/INDEX.md +107 -106
  25. package/mock-run/orc-rules.md +254 -0
  26. package/package.json +1 -1
  27. package/templates/agents/orc-executor-haiku-4-5.md +9 -1
  28. package/templates/agents/orc-executor-opus-4-7-high.md +9 -1
  29. package/templates/agents/orc-executor-opus-4-7-med.md +9 -1
  30. package/templates/agents/orc-executor-opus-4-8-high.md +9 -1
  31. package/templates/agents/orc-executor-opus-5-high.md +9 -1
  32. package/templates/agents/orc-executor-opus-5-low.md +9 -1
  33. package/templates/agents/orc-executor-opus-5-med.md +9 -1
  34. package/templates/agents/orc-executor-sonnet-4-6-high.md +9 -1
  35. package/templates/agents/orc-executor-sonnet-4-6-med.md +9 -1
  36. package/templates/agents/orc-executor-sonnet-5-high.md +9 -1
  37. package/templates/commands/orc-rules.md +66 -0
  38. package/templates/commands/orc-wiki.md +23 -1
  39. package/templates/skills/_shared/README.md +61 -54
  40. package/templates/skills/_shared/extra-dispatch.md +1 -1
  41. package/templates/skills/_shared/phases/README.md +1 -0
  42. package/templates/skills/_shared/phases/execution.md +3 -1
  43. package/templates/skills/_shared/phases/preflight.md +20 -0
  44. package/templates/skills/_shared/phases/rules.md +159 -0
  45. package/templates/skills/_shared/return-validation.md +28 -0
  46. package/templates/skills/_shared/rules/CREDITS.md +141 -0
  47. package/templates/skills/_shared/rules/INDEX.md +107 -0
  48. package/templates/skills/_shared/rules/code.md +229 -0
  49. package/templates/skills/_shared/rules/delivery.md +114 -0
  50. package/templates/skills/_shared/rules/ui.md +139 -0
  51. package/templates/skills/_shared/rules/writing.md +223 -0
  52. package/templates/skills/context-combiner/SKILL.md +9 -1
  53. package/templates/skills/orc/SKILL.md +8 -1
  54. package/templates/skills/orc/references/preflight-report.md +6 -0
  55. package/templates/skills/orc/subskills/orc-execution/SKILL.md +2 -1
  56. package/templates/skills/orc/subskills/orc-execution/core.md +9 -1
  57. package/templates/skills/orc-aftermath/SKILL.md +7 -0
  58. package/templates/skills/orc-analyze/SKILL.md +7 -0
  59. package/templates/skills/orc-analyze-mini/SKILL.md +9 -1
  60. package/templates/skills/orc-boundary/SKILL.md +7 -0
  61. package/templates/skills/orc-brainstorm/SKILL.md +7 -0
  62. package/templates/skills/orc-budget/SKILL.md +7 -0
  63. package/templates/skills/orc-challenge/SKILL.md +7 -0
  64. package/templates/skills/orc-claude/SKILL.md +7 -0
  65. package/templates/skills/orc-diy/SKILL.md +7 -0
  66. package/templates/skills/orc-explain/SKILL.md +7 -0
  67. package/templates/skills/orc-export/SKILL.md +7 -0
  68. package/templates/skills/orc-fast/SKILL.md +9 -2
  69. package/templates/skills/orc-grill/SKILL.md +7 -0
  70. package/templates/skills/orc-handoff/SKILL.md +9 -1
  71. package/templates/skills/orc-learn/SKILL.md +7 -0
  72. package/templates/skills/orc-mini/SKILL.md +10 -3
  73. package/templates/skills/orc-pact/SKILL.md +7 -0
  74. package/templates/skills/orc-poly/SKILL.md +7 -0
  75. package/templates/skills/orc-pr-driver/SKILL.md +9 -1
  76. package/templates/skills/orc-pr-setup/SKILL.md +9 -1
  77. package/templates/skills/orc-quick/SKILL.md +9 -1
  78. package/templates/skills/orc-retro/SKILL.md +7 -0
  79. package/templates/skills/orc-route/SKILL.md +7 -0
  80. package/templates/skills/orc-test/SKILL.md +7 -0
  81. package/templates/skills/orc-verify/SKILL.md +7 -0
  82. package/templates/skills/orc-wiki/SKILL.md +15 -0
  83. package/templates/skills/orc-wiki/references/partial-refresh.md +68 -0
  84. package/templates/skills/orc-wiki/references/phases/phase-0.md +15 -1
@@ -0,0 +1,254 @@
1
+ # Mock run — `orc rules`
2
+
3
+ > ORC ships 65 anti-slop rules. Your project writes its own. Yours win.
4
+
5
+ ---
6
+
7
+ ## 1. What it does
8
+
9
+ ORC writes a lot of prose and a lot of code, and both come out carrying the
10
+ same recognisable defaults: sentences that say nothing in a confident shape,
11
+ and code that is longer, more defensive and more abstract than the task asked
12
+ for. These rules are the filter.
13
+
14
+ There are two halves, and they never mix.
15
+
16
+ | Half | Who writes it | Where it lives | Changes when |
17
+ |---|---|---|---|
18
+ | **ORC rules** | ORC | `.claude/skills/_shared/rules/` | you run `orc update` |
19
+ | **Your rules** | you | `.claude/orc/rules.md` | you type |
20
+
21
+ The ORC rules are **read-only**. They were adapted, with credit, from other
22
+ people's work — `orc rules credits` names every source, its author, its licence
23
+ and what ORC took from it.
24
+
25
+ `/orc-doc` uses none of this. That lane has its own rules: `orc doc rules`.
26
+
27
+ ---
28
+
29
+ ## 2. Look at what you have
30
+
31
+ Rina has just installed ORC in the `acme-api` repo.
32
+
33
+ ```
34
+ $ orc rules
35
+
36
+ orc rules — ORC 65 (W 23 · C 22 · D 10 · U 10) · yours none
37
+
38
+ Precedence the order never changes
39
+ 1. house rules CODE and agent BEHAVIOUR only
40
+ _shared/phases/house-rules.md + the project's CLAUDE.md P0
41
+ beats everything below it, always
42
+ 2. your rules everything
43
+ <claude>/orc/rules.md
44
+ beats the ORC rules OUTRIGHT on any conflict
45
+ 3. ORC rules everything
46
+ <claude>/skills/_shared/rules/
47
+ beats nothing — it is the floor, and yours replaces it
48
+
49
+ ORC rules read-only — `orc update` changes them, nothing else
50
+ OSW Writing 23 HARD 14 · PURPOSE 2 · LOCK 7
51
+ OSC Code 22 HARD 17 · PURPOSE 4 · LOCK 1
52
+ OSD Delivery 10 HARD 7 · PURPOSE 0 · LOCK 3
53
+ OSU UI 10 HARD 7 · PURPOSE 1 · LOCK 2
54
+ /home/rina/acme-api/.claude/skills/_shared/rules
55
+
56
+ Your rules they win on any conflict
57
+ none yet
58
+ add one: orc rules add --priority P0 --text "…"
59
+ /home/rina/acme-api/.claude/orc/rules.md
60
+ ```
61
+
62
+ **`yours none` is an answer, not a gap.** It says this project has not written
63
+ its own rules yet. That is a different fact from the command failing to look,
64
+ and the line keeps the two apart.
65
+
66
+ The three tiers mean:
67
+
68
+ - **HARD** — absolute. No exception.
69
+ - **PURPOSE** — the technique is allowed. It needs a written one-line reason.
70
+ - **LOCK** — a consistency rule. Reported, never blocking.
71
+
72
+ ---
73
+
74
+ ## 3. Read one pack
75
+
76
+ ```
77
+ $ orc rules show writing
78
+
79
+ Writing (OSW) — 23 rules read-only
80
+
81
+ OSW-01 HARD Lead with the point
82
+ OSW-02 HARD No binary contrast
83
+ OSW-03 HARD No faux-insight setup
84
+ OSW-04 LOCK No colon reveal
85
+ OSW-05 HARD No fake-profound kicker, no summary recap
86
+ …
87
+ OSW-22 HARD A human's paragraph is not yours to restyle
88
+ OSW-23 HARD Never invent a specific
89
+
90
+ /home/rina/acme-api/.claude/skills/_shared/rules/writing.md
91
+ ```
92
+
93
+ ---
94
+
95
+ ## 4. Write your own
96
+
97
+ Rina's team has two standing rules. She types them the way she would say them.
98
+
99
+ ```
100
+ $ orc rules add --priority P0 --text "Never name a customer in a commit message or a PR body. Use the account id.
101
+ Every public function in src/api/ carries a one-line comment naming its caller."
102
+
103
+ ✓ P0 extended — 2 lines
104
+ ORC 65 (W 23 · C 22 · D 10 · U 10) · yours 2 lines (P0 2)
105
+ /home/rina/acme-api/.claude/orc/rules.md
106
+ ```
107
+
108
+ There is **no rule id and no rule count** on your side. The unit is the block,
109
+ and the whole block is handed to every agent exactly as you typed it. A rule you
110
+ no longer want, you delete.
111
+
112
+ Three headings, and as much text under each as you want:
113
+
114
+ - **P0** — must. A run that breaks it is wrong.
115
+ - **P1** — should. Break it only with a reason, and the reason is recorded.
116
+ - **P2** — prefer. A default when nothing else decides.
117
+
118
+ You can edit the file in your own editor instead. Or open `orc ui` ▸ **Rules**,
119
+ which is one text box and a Save button.
120
+
121
+ ---
122
+
123
+ ## 5. Turn an ORC rule off
124
+
125
+ ORC caps em dashes (`OSW-13`). Rina's team likes them. She does not argue with
126
+ the tool — she writes her own rule and names the id.
127
+
128
+ ```
129
+ $ orc rules add --priority P1 --text "OSW-13: em dashes are our house voice. Use them where they read best."
130
+
131
+ ✓ P1 extended — 1 line
132
+ ORC 65 (W 23 · C 22 · D 10 · U 10) · yours 3 lines (P0 2 · P1 1) · 1 override
133
+ ```
134
+
135
+ `1 override`. That count is **never silent**: it prints at preflight, it is
136
+ listed in the panel, and it is stated inside every slice ORC dispatches.
137
+
138
+ The count comes from ORC rule ids you **named**. A rule of yours that
139
+ contradicts an ORC rule without naming it is found by the agent while it works,
140
+ and comes back as a conflict for you to settle — never a choice it makes
141
+ quietly. The command says so in its own output.
142
+
143
+ **Trying to edit ORC's own packs is refused by name:**
144
+
145
+ ```
146
+ $ orc rules set --pack writing --priority P0 --text "…"
147
+ ❌ ORC rules are read-only — they change with `orc update`, never with a command.
148
+ Write your own instead: orc rules add --priority P0 --text "…" (yours win on any conflict).
149
+ ```
150
+
151
+ ---
152
+
153
+ ## 6. Check a file, for free
154
+
155
+ ```
156
+ $ orc rules lint src/checkout.js README.md
157
+
158
+ orc rules lint — 2 files (paths)
159
+
160
+ src/checkout.js
161
+ 1 OSC-02 HARD No decorative separator
162
+ ==========================
163
+ → one plain line, or nothing
164
+ 2 OSC-04 HARD No empty label
165
+ MAIN LOGIC
166
+ → the label names a category, not a fact — delete it
167
+ 7 OSC-05 HARD A TODO names a task
168
+ TODO: improve this
169
+ → name the task and enough context to act on it, or delete it
170
+
171
+ README.md
172
+ 3 OSW-11 HARD Banned phrases
173
+ it's worth noting
174
+ → delete the clause and keep the point
175
+
176
+ off here your own rules name these ids
177
+ OSW-13
178
+
179
+ checked 12 rules of 65 — not checked here: 53 rules. They need a reader, not a matcher.
180
+ ```
181
+
182
+ That last line is the important one. **The lint only checks what a string match
183
+ can prove** — banned words, banned phrases, comment shapes, emoji in a heading,
184
+ em dash density, a few more. The other 53 rules need a reader.
185
+
186
+ A clean lint is not a clean review, and the command says so every time, even
187
+ when it finds nothing.
188
+
189
+ It costs nothing and calls no model. It **reports**; it never fixes.
190
+
191
+ Two things it skips, and it counts both rather than staying quiet: the rule
192
+ packs themselves (a rule that bans a word has to print that word to define it),
193
+ and any file you mark `orc-rules-ignore-file`. One line you want left alone gets
194
+ `orc-rules-ignore` on it.
195
+
196
+ ---
197
+
198
+ ## 7. What a run does with them
199
+
200
+ Every lane that writes words or code now carries a card in every slice it
201
+ dispatches, in this order and no other:
202
+
203
+ ```
204
+ 1 HOUSE RULES how a change is made: surgical, simple, honest
205
+ 2 YOUR PROJECT'S RULES read first, and they win
206
+ 3 ORC RULES the anti-slop baseline
207
+ 4 the task
208
+ ```
209
+
210
+ The house rules are about **code and behaviour**. They say nothing about the
211
+ words an agent writes, so they never overrule a writing rule.
212
+
213
+ At preflight you see one line:
214
+
215
+ ```
216
+ rules: ORC 65 (W 23 · C 22 · D 10 · U 10) · yours 3 lines (P0 2 · P1 1) · 1 override
217
+ ```
218
+
219
+ And every agent reports back what it did with them: which rules it acted on,
220
+ which two rules disagreed, and which ORC rule your own rule replaced. A conflict
221
+ comes back as a gap for you to settle.
222
+
223
+ ---
224
+
225
+ ## 8. Where the rules came from
226
+
227
+ ```
228
+ $ orc rules credits
229
+ ```
230
+
231
+ Every source, with its licence and what was taken:
232
+
233
+ - **Peter G. Yang** — [`petergyang/no-ai-slop`](https://github.com/petergyang/no-ai-slop) (MIT)
234
+ - **Miqdad Badjuber** — [`miqdadbadjuber/anti-slop`](https://github.com/miqdadbadjuber/anti-slop) (MIT)
235
+ - **`@ehmo`** — [`ehmo/slopkit`](https://github.com/ehmo/slopkit)
236
+ - **`@BioInfo`** — [`BioInfo/slopless`](https://github.com/BioInfo/slopless)
237
+ - **Andrej Karpathy** — his `CLAUDE.md`
238
+ - **Matty Cartwright** — The Anti-Slop Writing Rules
239
+ - Three research papers on LLM code smells
240
+
241
+ The long form is `CREDITS.md` beside the packs, and the panel renders the same
242
+ table. Credit is a shipped file here, not a line in a commit message.
243
+
244
+ ---
245
+
246
+ ## 9. What it never does
247
+
248
+ - It never edits ORC's own packs. `orc update` does that, and nothing else.
249
+ - It never resolves a conflict for you. A conflict is a gap you settle.
250
+ - It never blocks a run. The lint reports; there is no gate.
251
+ - It never pretends the lint covered rules it could not check.
252
+ - It never guesses that one of your sentences contradicts a rule. It counts the
253
+ ids you named and says that is what it counted.
254
+ - It never reaches `/orc-doc`. That lane has `orc doc rules`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-id/orc",
3
- "version": "1.6.0",
3
+ "version": "1.7.1",
4
4
  "description": "ORC — an orchestrator skill constellation for Claude Code: intake, planning, scored parallel subagents, code-pattern matching, review, verify, ship, plus a project knowledge-base wiki.",
5
5
  "bin": {
6
6
  "orc": "bin/cli.js"
@@ -25,6 +25,9 @@ never spawn other agents, never work outside your task slice.
25
25
  - house_rules — standing behavioral card (injected literally): surgical changes
26
26
  only, simplicity-first, no unrequested scope, boring-solution preference,
27
27
  never claim unobserved results, honest partial over false done
28
+ - rules_card — the anti-slop card (injected literally, directly under
29
+ house_rules): YOUR PROJECT'S RULES, then ORC RULES. A project rule beats an ORC
30
+ rule; house_rules beat both, but only on code and behaviour. Absent = no card
28
31
  - log_digest — decisions from earlier waves; absorb before starting
29
32
  - pattern — resolved code-pattern for your task's language, or null. Present =
30
33
  {conventions[] you MUST MATCH, invariants[] that are BLOCKING, validation_gate[]
@@ -53,7 +56,8 @@ never spawn other agents, never work outside your task slice.
53
56
  is a corruption bug), and build/test output is always read whole. Canonical:
54
57
  `.claude/skills/_shared/read-ladder.md`.
55
58
  3. Implement the task within declared_files only. Obey every house_rules
56
- line. Follow every constraint. If
59
+ line, then every rules_card rule — two rules that disagree go in
60
+ rules_conflicts[], never a silent choice. Follow every constraint. If
57
61
  `pattern` is present, MATCH its conventions, satisfy every BLOCKING invariant
58
62
  AND every enforceable validation_gate line (re-check your diff before
59
63
  returning; advisory gate lines never require new tooling). Create/update
@@ -108,6 +112,10 @@ never spawn other agents, never work outside your task slice.
108
112
  malformed. NOT required when you never repaired anything, and a loop that hit
109
113
  tdd_loop_max and stopped returns `none` — an unsolved failure is not a gotcha.
110
114
  You RETURN it; the orchestrator writes the file. Never write it yourself.
115
+ - rules_applied[] · rules_conflicts[] · rules_overridden[] — REQUIRED when the
116
+ slice carried a rules_card (each may be empty; absent is malformed): the rule
117
+ ids you acted on, two rules that disagree, and the ORC ids a project rule
118
+ replaced. Omit all three when no rules_card was supplied.
111
119
 
112
120
  Malformed returns = failure — including status=done with a runner present but
113
121
  no evidence, or status=done with a non-empty unmet[]. needs_context cap 2 per task.
@@ -26,6 +26,9 @@ never spawn other agents, never work outside your task slice.
26
26
  - house_rules — standing behavioral card (injected literally): surgical changes
27
27
  only, simplicity-first, no unrequested scope, boring-solution preference,
28
28
  never claim unobserved results, honest partial over false done
29
+ - rules_card — the anti-slop card (injected literally, directly under
30
+ house_rules): YOUR PROJECT'S RULES, then ORC RULES. A project rule beats an ORC
31
+ rule; house_rules beat both, but only on code and behaviour. Absent = no card
29
32
  - log_digest — decisions from earlier waves; absorb before starting
30
33
  - pattern — resolved code-pattern for your task's language, or null. Present =
31
34
  {conventions[] you MUST MATCH, invariants[] that are BLOCKING, validation_gate[]
@@ -54,7 +57,8 @@ never spawn other agents, never work outside your task slice.
54
57
  is a corruption bug), and build/test output is always read whole. Canonical:
55
58
  `.claude/skills/_shared/read-ladder.md`.
56
59
  3. Implement the task within declared_files only. Obey every house_rules
57
- line. Follow every constraint. If
60
+ line, then every rules_card rule — two rules that disagree go in
61
+ rules_conflicts[], never a silent choice. Follow every constraint. If
58
62
  `pattern` is present, MATCH its conventions, satisfy every BLOCKING invariant
59
63
  AND every enforceable validation_gate line (re-check your diff before
60
64
  returning; advisory gate lines never require new tooling). Create/update
@@ -109,6 +113,10 @@ never spawn other agents, never work outside your task slice.
109
113
  malformed. NOT required when you never repaired anything, and a loop that hit
110
114
  tdd_loop_max and stopped returns `none` — an unsolved failure is not a gotcha.
111
115
  You RETURN it; the orchestrator writes the file. Never write it yourself.
116
+ - rules_applied[] · rules_conflicts[] · rules_overridden[] — REQUIRED when the
117
+ slice carried a rules_card (each may be empty; absent is malformed): the rule
118
+ ids you acted on, two rules that disagree, and the ORC ids a project rule
119
+ replaced. Omit all three when no rules_card was supplied.
112
120
 
113
121
  Malformed returns = failure — including status=done with a runner present but
114
122
  no evidence, or status=done with a non-empty unmet[]. needs_context cap 2 per task.
@@ -26,6 +26,9 @@ never spawn other agents, never work outside your task slice.
26
26
  - house_rules — standing behavioral card (injected literally): surgical changes
27
27
  only, simplicity-first, no unrequested scope, boring-solution preference,
28
28
  never claim unobserved results, honest partial over false done
29
+ - rules_card — the anti-slop card (injected literally, directly under
30
+ house_rules): YOUR PROJECT'S RULES, then ORC RULES. A project rule beats an ORC
31
+ rule; house_rules beat both, but only on code and behaviour. Absent = no card
29
32
  - log_digest — decisions from earlier waves; absorb before starting
30
33
  - pattern — resolved code-pattern for your task's language, or null. Present =
31
34
  {conventions[] you MUST MATCH, invariants[] that are BLOCKING, validation_gate[]
@@ -54,7 +57,8 @@ never spawn other agents, never work outside your task slice.
54
57
  is a corruption bug), and build/test output is always read whole. Canonical:
55
58
  `.claude/skills/_shared/read-ladder.md`.
56
59
  3. Implement the task within declared_files only. Obey every house_rules
57
- line. Follow every constraint. If
60
+ line, then every rules_card rule — two rules that disagree go in
61
+ rules_conflicts[], never a silent choice. Follow every constraint. If
58
62
  `pattern` is present, MATCH its conventions, satisfy every BLOCKING invariant
59
63
  AND every enforceable validation_gate line (re-check your diff before
60
64
  returning; advisory gate lines never require new tooling). Create/update
@@ -109,6 +113,10 @@ never spawn other agents, never work outside your task slice.
109
113
  malformed. NOT required when you never repaired anything, and a loop that hit
110
114
  tdd_loop_max and stopped returns `none` — an unsolved failure is not a gotcha.
111
115
  You RETURN it; the orchestrator writes the file. Never write it yourself.
116
+ - rules_applied[] · rules_conflicts[] · rules_overridden[] — REQUIRED when the
117
+ slice carried a rules_card (each may be empty; absent is malformed): the rule
118
+ ids you acted on, two rules that disagree, and the ORC ids a project rule
119
+ replaced. Omit all three when no rules_card was supplied.
112
120
 
113
121
  Malformed returns = failure — including status=done with a runner present but
114
122
  no evidence, or status=done with a non-empty unmet[]. needs_context cap 2 per task.
@@ -26,6 +26,9 @@ never spawn other agents, never work outside your task slice.
26
26
  - house_rules — standing behavioral card (injected literally): surgical changes
27
27
  only, simplicity-first, no unrequested scope, boring-solution preference,
28
28
  never claim unobserved results, honest partial over false done
29
+ - rules_card — the anti-slop card (injected literally, directly under
30
+ house_rules): YOUR PROJECT'S RULES, then ORC RULES. A project rule beats an ORC
31
+ rule; house_rules beat both, but only on code and behaviour. Absent = no card
29
32
  - log_digest — decisions from earlier waves; absorb before starting
30
33
  - pattern — resolved code-pattern for your task's language, or null. Present =
31
34
  {conventions[] you MUST MATCH, invariants[] that are BLOCKING, validation_gate[]
@@ -54,7 +57,8 @@ never spawn other agents, never work outside your task slice.
54
57
  is a corruption bug), and build/test output is always read whole. Canonical:
55
58
  `.claude/skills/_shared/read-ladder.md`.
56
59
  3. Implement the task within declared_files only. Obey every house_rules
57
- line. Follow every constraint. If
60
+ line, then every rules_card rule — two rules that disagree go in
61
+ rules_conflicts[], never a silent choice. Follow every constraint. If
58
62
  `pattern` is present, MATCH its conventions, satisfy every BLOCKING invariant
59
63
  AND every enforceable validation_gate line (re-check your diff before
60
64
  returning; advisory gate lines never require new tooling). Create/update
@@ -109,6 +113,10 @@ never spawn other agents, never work outside your task slice.
109
113
  malformed. NOT required when you never repaired anything, and a loop that hit
110
114
  tdd_loop_max and stopped returns `none` — an unsolved failure is not a gotcha.
111
115
  You RETURN it; the orchestrator writes the file. Never write it yourself.
116
+ - rules_applied[] · rules_conflicts[] · rules_overridden[] — REQUIRED when the
117
+ slice carried a rules_card (each may be empty; absent is malformed): the rule
118
+ ids you acted on, two rules that disagree, and the ORC ids a project rule
119
+ replaced. Omit all three when no rules_card was supplied.
112
120
 
113
121
  Malformed returns = failure — including status=done with a runner present but
114
122
  no evidence, or status=done with a non-empty unmet[]. needs_context cap 2 per task.
@@ -26,6 +26,9 @@ never spawn other agents, never work outside your task slice.
26
26
  - house_rules — standing behavioral card (injected literally): surgical changes
27
27
  only, simplicity-first, no unrequested scope, boring-solution preference,
28
28
  never claim unobserved results, honest partial over false done
29
+ - rules_card — the anti-slop card (injected literally, directly under
30
+ house_rules): YOUR PROJECT'S RULES, then ORC RULES. A project rule beats an ORC
31
+ rule; house_rules beat both, but only on code and behaviour. Absent = no card
29
32
  - log_digest — decisions from earlier waves; absorb before starting
30
33
  - pattern — resolved code-pattern for your task's language, or null. Present =
31
34
  {conventions[] you MUST MATCH, invariants[] that are BLOCKING, validation_gate[]
@@ -54,7 +57,8 @@ never spawn other agents, never work outside your task slice.
54
57
  is a corruption bug), and build/test output is always read whole. Canonical:
55
58
  `.claude/skills/_shared/read-ladder.md`.
56
59
  3. Implement the task within declared_files only. Obey every house_rules
57
- line. Follow every constraint. If
60
+ line, then every rules_card rule — two rules that disagree go in
61
+ rules_conflicts[], never a silent choice. Follow every constraint. If
58
62
  `pattern` is present, MATCH its conventions, satisfy every BLOCKING invariant
59
63
  AND every enforceable validation_gate line (re-check your diff before
60
64
  returning; advisory gate lines never require new tooling). Create/update
@@ -109,6 +113,10 @@ never spawn other agents, never work outside your task slice.
109
113
  malformed. NOT required when you never repaired anything, and a loop that hit
110
114
  tdd_loop_max and stopped returns `none` — an unsolved failure is not a gotcha.
111
115
  You RETURN it; the orchestrator writes the file. Never write it yourself.
116
+ - rules_applied[] · rules_conflicts[] · rules_overridden[] — REQUIRED when the
117
+ slice carried a rules_card (each may be empty; absent is malformed): the rule
118
+ ids you acted on, two rules that disagree, and the ORC ids a project rule
119
+ replaced. Omit all three when no rules_card was supplied.
112
120
 
113
121
  Malformed returns = failure — including status=done with a runner present but
114
122
  no evidence, or status=done with a non-empty unmet[]. needs_context cap 2 per task.
@@ -26,6 +26,9 @@ never spawn other agents, never work outside your task slice.
26
26
  - house_rules — standing behavioral card (injected literally): surgical changes
27
27
  only, simplicity-first, no unrequested scope, boring-solution preference,
28
28
  never claim unobserved results, honest partial over false done
29
+ - rules_card — the anti-slop card (injected literally, directly under
30
+ house_rules): YOUR PROJECT'S RULES, then ORC RULES. A project rule beats an ORC
31
+ rule; house_rules beat both, but only on code and behaviour. Absent = no card
29
32
  - log_digest — decisions from earlier waves; absorb before starting
30
33
  - pattern — resolved code-pattern for your task's language, or null. Present =
31
34
  {conventions[] you MUST MATCH, invariants[] that are BLOCKING, validation_gate[]
@@ -54,7 +57,8 @@ never spawn other agents, never work outside your task slice.
54
57
  is a corruption bug), and build/test output is always read whole. Canonical:
55
58
  `.claude/skills/_shared/read-ladder.md`.
56
59
  3. Implement the task within declared_files only. Obey every house_rules
57
- line. Follow every constraint. If
60
+ line, then every rules_card rule — two rules that disagree go in
61
+ rules_conflicts[], never a silent choice. Follow every constraint. If
58
62
  `pattern` is present, MATCH its conventions, satisfy every BLOCKING invariant
59
63
  AND every enforceable validation_gate line (re-check your diff before
60
64
  returning; advisory gate lines never require new tooling). Create/update
@@ -109,6 +113,10 @@ never spawn other agents, never work outside your task slice.
109
113
  malformed. NOT required when you never repaired anything, and a loop that hit
110
114
  tdd_loop_max and stopped returns `none` — an unsolved failure is not a gotcha.
111
115
  You RETURN it; the orchestrator writes the file. Never write it yourself.
116
+ - rules_applied[] · rules_conflicts[] · rules_overridden[] — REQUIRED when the
117
+ slice carried a rules_card (each may be empty; absent is malformed): the rule
118
+ ids you acted on, two rules that disagree, and the ORC ids a project rule
119
+ replaced. Omit all three when no rules_card was supplied.
112
120
 
113
121
  Malformed returns = failure — including status=done with a runner present but
114
122
  no evidence, or status=done with a non-empty unmet[]. needs_context cap 2 per task.
@@ -26,6 +26,9 @@ never spawn other agents, never work outside your task slice.
26
26
  - house_rules — standing behavioral card (injected literally): surgical changes
27
27
  only, simplicity-first, no unrequested scope, boring-solution preference,
28
28
  never claim unobserved results, honest partial over false done
29
+ - rules_card — the anti-slop card (injected literally, directly under
30
+ house_rules): YOUR PROJECT'S RULES, then ORC RULES. A project rule beats an ORC
31
+ rule; house_rules beat both, but only on code and behaviour. Absent = no card
29
32
  - log_digest — decisions from earlier waves; absorb before starting
30
33
  - pattern — resolved code-pattern for your task's language, or null. Present =
31
34
  {conventions[] you MUST MATCH, invariants[] that are BLOCKING, validation_gate[]
@@ -54,7 +57,8 @@ never spawn other agents, never work outside your task slice.
54
57
  is a corruption bug), and build/test output is always read whole. Canonical:
55
58
  `.claude/skills/_shared/read-ladder.md`.
56
59
  3. Implement the task within declared_files only. Obey every house_rules
57
- line. Follow every constraint. If
60
+ line, then every rules_card rule — two rules that disagree go in
61
+ rules_conflicts[], never a silent choice. Follow every constraint. If
58
62
  `pattern` is present, MATCH its conventions, satisfy every BLOCKING invariant
59
63
  AND every enforceable validation_gate line (re-check your diff before
60
64
  returning; advisory gate lines never require new tooling). Create/update
@@ -109,6 +113,10 @@ never spawn other agents, never work outside your task slice.
109
113
  malformed. NOT required when you never repaired anything, and a loop that hit
110
114
  tdd_loop_max and stopped returns `none` — an unsolved failure is not a gotcha.
111
115
  You RETURN it; the orchestrator writes the file. Never write it yourself.
116
+ - rules_applied[] · rules_conflicts[] · rules_overridden[] — REQUIRED when the
117
+ slice carried a rules_card (each may be empty; absent is malformed): the rule
118
+ ids you acted on, two rules that disagree, and the ORC ids a project rule
119
+ replaced. Omit all three when no rules_card was supplied.
112
120
 
113
121
  Malformed returns = failure — including status=done with a runner present but
114
122
  no evidence, or status=done with a non-empty unmet[]. needs_context cap 2 per task.
@@ -26,6 +26,9 @@ never spawn other agents, never work outside your task slice.
26
26
  - house_rules — standing behavioral card (injected literally): surgical changes
27
27
  only, simplicity-first, no unrequested scope, boring-solution preference,
28
28
  never claim unobserved results, honest partial over false done
29
+ - rules_card — the anti-slop card (injected literally, directly under
30
+ house_rules): YOUR PROJECT'S RULES, then ORC RULES. A project rule beats an ORC
31
+ rule; house_rules beat both, but only on code and behaviour. Absent = no card
29
32
  - log_digest — decisions from earlier waves; absorb before starting
30
33
  - pattern — resolved code-pattern for your task's language, or null. Present =
31
34
  {conventions[] you MUST MATCH, invariants[] that are BLOCKING, validation_gate[]
@@ -54,7 +57,8 @@ never spawn other agents, never work outside your task slice.
54
57
  is a corruption bug), and build/test output is always read whole. Canonical:
55
58
  `.claude/skills/_shared/read-ladder.md`.
56
59
  3. Implement the task within declared_files only. Obey every house_rules
57
- line. Follow every constraint. If
60
+ line, then every rules_card rule — two rules that disagree go in
61
+ rules_conflicts[], never a silent choice. Follow every constraint. If
58
62
  `pattern` is present, MATCH its conventions, satisfy every BLOCKING invariant
59
63
  AND every enforceable validation_gate line (re-check your diff before
60
64
  returning; advisory gate lines never require new tooling). Create/update
@@ -109,6 +113,10 @@ never spawn other agents, never work outside your task slice.
109
113
  malformed. NOT required when you never repaired anything, and a loop that hit
110
114
  tdd_loop_max and stopped returns `none` — an unsolved failure is not a gotcha.
111
115
  You RETURN it; the orchestrator writes the file. Never write it yourself.
116
+ - rules_applied[] · rules_conflicts[] · rules_overridden[] — REQUIRED when the
117
+ slice carried a rules_card (each may be empty; absent is malformed): the rule
118
+ ids you acted on, two rules that disagree, and the ORC ids a project rule
119
+ replaced. Omit all three when no rules_card was supplied.
112
120
 
113
121
  Malformed returns = failure — including status=done with a runner present but
114
122
  no evidence, or status=done with a non-empty unmet[]. needs_context cap 2 per task.
@@ -26,6 +26,9 @@ never spawn other agents, never work outside your task slice.
26
26
  - house_rules — standing behavioral card (injected literally): surgical changes
27
27
  only, simplicity-first, no unrequested scope, boring-solution preference,
28
28
  never claim unobserved results, honest partial over false done
29
+ - rules_card — the anti-slop card (injected literally, directly under
30
+ house_rules): YOUR PROJECT'S RULES, then ORC RULES. A project rule beats an ORC
31
+ rule; house_rules beat both, but only on code and behaviour. Absent = no card
29
32
  - log_digest — decisions from earlier waves; absorb before starting
30
33
  - pattern — resolved code-pattern for your task's language, or null. Present =
31
34
  {conventions[] you MUST MATCH, invariants[] that are BLOCKING, validation_gate[]
@@ -54,7 +57,8 @@ never spawn other agents, never work outside your task slice.
54
57
  is a corruption bug), and build/test output is always read whole. Canonical:
55
58
  `.claude/skills/_shared/read-ladder.md`.
56
59
  3. Implement the task within declared_files only. Obey every house_rules
57
- line. Follow every constraint. If
60
+ line, then every rules_card rule — two rules that disagree go in
61
+ rules_conflicts[], never a silent choice. Follow every constraint. If
58
62
  `pattern` is present, MATCH its conventions, satisfy every BLOCKING invariant
59
63
  AND every enforceable validation_gate line (re-check your diff before
60
64
  returning; advisory gate lines never require new tooling). Create/update
@@ -109,6 +113,10 @@ never spawn other agents, never work outside your task slice.
109
113
  malformed. NOT required when you never repaired anything, and a loop that hit
110
114
  tdd_loop_max and stopped returns `none` — an unsolved failure is not a gotcha.
111
115
  You RETURN it; the orchestrator writes the file. Never write it yourself.
116
+ - rules_applied[] · rules_conflicts[] · rules_overridden[] — REQUIRED when the
117
+ slice carried a rules_card (each may be empty; absent is malformed): the rule
118
+ ids you acted on, two rules that disagree, and the ORC ids a project rule
119
+ replaced. Omit all three when no rules_card was supplied.
112
120
 
113
121
  Malformed returns = failure — including status=done with a runner present but
114
122
  no evidence, or status=done with a non-empty unmet[]. needs_context cap 2 per task.
@@ -26,6 +26,9 @@ never spawn other agents, never work outside your task slice.
26
26
  - house_rules — standing behavioral card (injected literally): surgical changes
27
27
  only, simplicity-first, no unrequested scope, boring-solution preference,
28
28
  never claim unobserved results, honest partial over false done
29
+ - rules_card — the anti-slop card (injected literally, directly under
30
+ house_rules): YOUR PROJECT'S RULES, then ORC RULES. A project rule beats an ORC
31
+ rule; house_rules beat both, but only on code and behaviour. Absent = no card
29
32
  - log_digest — decisions from earlier waves; absorb before starting
30
33
  - pattern — resolved code-pattern for your task's language, or null. Present =
31
34
  {conventions[] you MUST MATCH, invariants[] that are BLOCKING, validation_gate[]
@@ -54,7 +57,8 @@ never spawn other agents, never work outside your task slice.
54
57
  is a corruption bug), and build/test output is always read whole. Canonical:
55
58
  `.claude/skills/_shared/read-ladder.md`.
56
59
  3. Implement the task within declared_files only. Obey every house_rules
57
- line. Follow every constraint. If
60
+ line, then every rules_card rule — two rules that disagree go in
61
+ rules_conflicts[], never a silent choice. Follow every constraint. If
58
62
  `pattern` is present, MATCH its conventions, satisfy every BLOCKING invariant
59
63
  AND every enforceable validation_gate line (re-check your diff before
60
64
  returning; advisory gate lines never require new tooling). Create/update
@@ -109,6 +113,10 @@ never spawn other agents, never work outside your task slice.
109
113
  malformed. NOT required when you never repaired anything, and a loop that hit
110
114
  tdd_loop_max and stopped returns `none` — an unsolved failure is not a gotcha.
111
115
  You RETURN it; the orchestrator writes the file. Never write it yourself.
116
+ - rules_applied[] · rules_conflicts[] · rules_overridden[] — REQUIRED when the
117
+ slice carried a rules_card (each may be empty; absent is malformed): the rule
118
+ ids you acted on, two rules that disagree, and the ORC ids a project rule
119
+ replaced. Omit all three when no rules_card was supplied.
112
120
 
113
121
  Malformed returns = failure — including status=done with a runner present but
114
122
  no evidence, or status=done with a non-empty unmet[]. needs_context cap 2 per task.
@@ -0,0 +1,66 @@
1
+ ---
2
+ description: The anti-slop rules — ORC's shipped packs (read-only) and this project's own, which win on any conflict
3
+ ---
4
+
5
+ Do not use a skill. This command is a **CLI surface**, and the CLI is the only
6
+ thing that reads or writes either half.
7
+
8
+ ## What this is
9
+
10
+ Two rule sets, and they never mix:
11
+
12
+ - **ORC rules** — 65 shipped rules in four packs, tagged `ORC RULE`, **read-only**.
13
+ They change with `orc update` and with nothing else. Adapted, with credit, from
14
+ `petergyang/no-ai-slop`, `miqdadbadjuber/anti-slop`, `ehmo/slopkit`,
15
+ `BioInfo/slopless`, Andrej Karpathy's `CLAUDE.md` and Matty Cartwright's
16
+ anti-slop writing rules. `orc rules credits` names every one.
17
+ - **Your rules** — a plain text file, `.claude/orc/rules.md`, three headings
18
+ (P0, P1, P2) and as much text under each as you want. **They beat an ORC rule
19
+ outright** wherever the two disagree.
20
+
21
+ Above both sits the project's CODE house rules, which govern how a change is
22
+ made and say nothing about the words an agent writes.
23
+
24
+ ```
25
+ house rules > your rules > ORC rules
26
+ ```
27
+
28
+ `/orc-doc` reads none of this. That lane has its own ledger: `orc doc rules`.
29
+
30
+ ## Run this
31
+
32
+ ```
33
+ orc rules both halves, the ladder, the counts
34
+ orc rules packs the four packs (read-only)
35
+ orc rules show writing|code|delivery|ui one pack, rule by rule
36
+ orc rules credits every source, author and licence
37
+ orc rules user your own ledger and where it lives
38
+
39
+ orc rules add --priority P0 --text "…" append a rule, as many lines as you like
40
+ orc rules set --priority P1 --text "…" replace that whole block
41
+ orc rules clear --priority P2 empty one block
42
+ orc rules --reset back to the bare template
43
+
44
+ orc rules lint <path> | --staged | --diff the FREE check, zero tokens
45
+ ```
46
+
47
+ `orc ui` ▸ **Rules** is the same thing with a text box and a Save button.
48
+
49
+ ## Then report, in this order
50
+
51
+ 1. `orc rules` — print its output. The precedence ladder is the part people get
52
+ wrong, so it goes first and is never summarised away.
53
+ 2. If the user asked to ADD a rule, run the `add` command with their words
54
+ **verbatim**. Never re-word a standing instruction into your own phrasing:
55
+ the whole block is handed to every agent exactly as typed.
56
+ 3. If they asked to turn an ORC rule OFF, tell them how: name its id in a rule
57
+ of their own (`OSW-13: em dashes are our house voice.`). The override is then
58
+ counted, printed at preflight, and stated inside every slice.
59
+ 4. If they asked whether something IS slop, run `orc rules lint` on it and relay
60
+ the coverage line it prints — the one that says how many rules it did not
61
+ check. A clean lint is not a clean review, and that line is the difference.
62
+
63
+ Never edit `.claude/orc/rules.md` with a file tool. `orc rules` is its only
64
+ writer, and the panel goes through the same command.
65
+
66
+ What about the rules: $ARGUMENTS