@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,107 @@
1
+ <!-- orc-rules:index -->
2
+
3
+ # ORC RULES — the anti-slop baseline
4
+
5
+ > **READ-ONLY.** Everything in this folder ships with ORC and changes only with
6
+ > `orc update`. Nothing in ORC writes here, and `orc rules set --pack …` is
7
+ > refused by name.
8
+ >
9
+ > Your own rules live in `.claude/orc/rules.md`. Write them with
10
+ > `orc rules add --priority P0 --text "…"`, or in `orc ui` ▸ **Rules**.
11
+
12
+ ORC generates a lot of text and a lot of code. Both come out carrying the same
13
+ recognisable defaults: prose that says nothing in a confident shape, and code
14
+ that is longer, more defensive and more abstract than the task asked for. These
15
+ packs are the filter.
16
+
17
+ **This is a filter, not a style guide.** It prescribes no voice, no aesthetic
18
+ and no architecture. It rejects technique without purpose, and it never invents
19
+ direction of its own.
20
+
21
+ ---
22
+
23
+ ## The packs
24
+
25
+ | Pack | File | Ids | Rules | Layer | Applies to |
26
+ |---|---|---|---|---|---|
27
+ | **Writing** | `writing.md` | `OSW-01…23` | 23 | `writing` | every word an agent writes |
28
+ | **Code** | `code.md` | `OSC-01…22` | 22 | `code` | source an agent writes or edits |
29
+ | **Delivery** | `delivery.md` | `OSD-01…10` | 10 | `core` | what an agent reports about its own work |
30
+ | **UI** | `ui.md` | `OSU-01…10` | 10 | `ui` | front-end work only, added **per task** |
31
+
32
+ **65 rules.** `orc rules --json` is the count's only source. Never compute it
33
+ here, and never compute it in a skill.
34
+
35
+ Credits, licences and what was taken from whom: `CREDITS.md`, or
36
+ `orc rules credits`.
37
+
38
+ ---
39
+
40
+ ## The three tiers
41
+
42
+ | Tier | Meaning | On a finding |
43
+ |---|---|---|
44
+ | **HARD** | Absolute. No exception, no purpose that redeems it. | A finding. |
45
+ | **PURPOSE** | The technique is allowed. It needs a written one-line reason. | Missing reason is a finding; the technique is not. |
46
+ | **LOCK** | A consistency requirement. | Reported, never blocking. |
47
+
48
+ The tier system is Miqdad Badjuber's (`miqdadbadjuber/anti-slop`). The mechanism
49
+ it exists for: a ban list alone leaves a void, and a model fills a void with its
50
+ most generic output. A purpose gate asks for the reason instead, which is the
51
+ only thing that separates craft from default.
52
+
53
+ ---
54
+
55
+ ## Precedence — three layers, and the order never changes
56
+
57
+ ```
58
+ 1. PROJECT CODE HOUSE RULES ../phases/house-rules.md + the project's CLAUDE.md P0
59
+ ├ scope: CODE and agent BEHAVIOUR only
60
+ └ beats everything below it, always
61
+
62
+ 2. USER RULES .claude/orc/rules.md (P0 > P1 > P2)
63
+ └ beats the ORC rules OUTRIGHT on any conflict
64
+
65
+ 3. ORC RULES these packs — read-only
66
+ ```
67
+
68
+ **Layer 1 is code-only.** The house card governs how a change is made: surgical,
69
+ simple, honest, in-slice. It says nothing about the words an agent writes, so it
70
+ never overrules a writing rule — it does not speak about prose at all.
71
+
72
+ **Layer 2 wins outright over layer 3.** A user rule that contradicts an ORC rule
73
+ disables that ORC rule for this project. This is never silent: the agent returns
74
+ `rules_overridden[]` naming the ORC id and the user line that replaced it, and
75
+ the preflight prints the count. A silent override is the one outcome nobody can
76
+ audit.
77
+
78
+ ---
79
+
80
+ ## The boundary
81
+
82
+ Rules govern **what is written and how it reads**, and **what shape of code is
83
+ acceptable**. They can never change how a lane **runs**: the scoring, the wave
84
+ order, the gates, the dispatch contract, the ship rules, or any lane's
85
+ structural and safety rules.
86
+
87
+ A rule that asks for one of those comes back as `unsupported_request` and is
88
+ relayed as a gap. **Never a guessed compromise.**
89
+
90
+ **There is no fake validator here.** The CLI cannot parse intent, so it does not
91
+ pretend to. It does not detect a user rule that would break a structural rule.
92
+ It **declares** the boundary — in `orc rules`, at the top of every dispatched
93
+ slice, and in the panel. This is the same decision `orc doc rules` made, and for
94
+ the same reason: a validator that sometimes works is worse than none.
95
+
96
+ ---
97
+
98
+ ## What reads these packs
99
+
100
+ - `orc rules slice --lane <lane>` is the **only** assembler. No skill builds the
101
+ card itself, so no two lanes can drift.
102
+ - `../phases/rules.md` is the phase that injects it.
103
+ - `orc rules lint` checks the mechanically checkable subset and says, in every
104
+ mode, how many rules it did **not** check.
105
+ - `/orc-doc` reads **none** of this. That lane has its own ledger, written with
106
+ `orc doc rules`, and its own frozen-per-document mechanic. The two surfaces
107
+ never mix.
@@ -0,0 +1,229 @@
1
+ <!-- orc-rules:pack id=code prefix=OSC layer=code -->
2
+
3
+ # ORC RULES · Code (`OSC`)
4
+
5
+ > **READ-ONLY.** This file ships with ORC and changes only with `orc update`.
6
+ > Your own rules go in `.claude/orc/rules.md`, and **yours win** wherever the two
7
+ > disagree.
8
+
9
+ **Applies to** source an agent writes or edits.
10
+
11
+ **Precedence note.** The project's CODE house rules
12
+ (`../phases/house-rules.md` and the project's own `CLAUDE.md` P0) beat this pack
13
+ and beat the user ledger. This pack never restates a house rule; where one
14
+ already covers the ground, the rule below cites it.
15
+
16
+ **Source.** Andrej Karpathy's `CLAUDE.md` ·
17
+ [`BioInfo/slopless`](https://github.com/BioInfo/slopless) ·
18
+ Miqdad Badjuber — [`miqdadbadjuber/anti-slop`](https://github.com/miqdadbadjuber/anti-slop), the `antislop-code` skill (MIT) ·
19
+ [Specification and Detection of LLM Code Smells](https://arxiv.org/html/2512.18020v1) ·
20
+ [AI-Generated Smells](https://arxiv.org/html/2605.02741v1) ·
21
+ [Investigating the Smells of LLM Generated Code](https://arxiv.org/pdf/2510.03029).
22
+ Full attribution in `CREDITS.md`.
23
+
24
+ ---
25
+
26
+ ### OSC-01 · HARD · A comment never restates the code
27
+
28
+ Delete a comment that repeats what the next line, the declaration or the
29
+ signature already shows: `// Initialize the variable` above `let count = 0`,
30
+ `// User class` above `class User {}`, `const userAge = 25; // User age is 25`.
31
+
32
+ It doubles the reading load and adds nothing. Remove the comment. Leave the code.
33
+
34
+ ### OSC-02 · HARD · No decorative separator
35
+
36
+ No banner built from repeated characters, no ALL-CAPS section label, no
37
+ box-drawn header: `// ==========`, `// -------- WORKFLOW --------`,
38
+ `/* ---- ROUTES ---- */`.
39
+
40
+ The decoration is the message, and the message is "generated". Use one plain
41
+ line, or nothing.
42
+
43
+ Checked by `orc rules lint`.
44
+
45
+ ### OSC-03 · HARD · No workflow narration
46
+
47
+ No `// Step 1: Validate input`, `// Step 2: Process`, `// First…`, `// Next…`,
48
+ `// Finally…`. The control flow is already visible.
49
+
50
+ If the flow is genuinely hard to follow, that is a structure problem, not a
51
+ missing comment.
52
+
53
+ Checked by `orc rules lint`.
54
+
55
+ ### OSC-04 · HARD · No empty label
56
+
57
+ No `// Main logic`, `// Core logic`, `// Business logic`, `// Helper function`,
58
+ `// Entry point`, `// Error handling`, `// Note: this is important`,
59
+ `// Important: please read`.
60
+
61
+ The label names a category, not a fact. "Note: retries happen only on 5xx" earns
62
+ its place. "Note: this is important" does not.
63
+
64
+ Checked by `orc rules lint`.
65
+
66
+ ### OSC-05 · HARD · A TODO names a task
67
+
68
+ No `// TODO: improve this`, `// Future improvements`, `// Additional
69
+ optimization can be added here`, `// Add more validation`.
70
+
71
+ A vague TODO names a feeling, not a task. Keep a TODO only when it says what to
72
+ do and carries enough context to act on. Otherwise delete it.
73
+
74
+ Checked by `orc rules lint`.
75
+
76
+ ### OSC-06 · HARD · No decorative emoji in code
77
+
78
+ No emoji as decoration in a comment, a log line or an identifier: `// ✅
79
+ Validation`, `// 🚀 Performance`, `// 🔒 Security`. Emoji is visual noise in
80
+ source, and that exact set is the generated vocabulary.
81
+
82
+ Carve-out: a string the product actually renders to a user, and a test asserting
83
+ on it.
84
+
85
+ Checked by `orc rules lint`.
86
+
87
+ ### OSC-07 · HARD · No end markers
88
+
89
+ No `} // end if`, `# End of function`, `// End processOrder`. The closing brace
90
+ already ends the block.
91
+
92
+ Checked by `orc rules lint`.
93
+
94
+ ### OSC-08 · LOCK · One line per comment
95
+
96
+ One line. Two only when the second carries a new fact. Never three.
97
+
98
+ A person leaves a note; a generator writes a case. Cut the reasoning chain, the
99
+ issue number and the version history. Keep the constraint: the platform trap,
100
+ the silent failure, the protocol rule, the performance cost.
101
+
102
+ **Value is not length.** A comment that legitimately earns its place still does
103
+ not earn a paragraph.
104
+
105
+ ### OSC-09 · HARD · Comments explain why, never what
106
+
107
+ Never strip a comment that carries: business logic and intent · an architectural
108
+ decision · a security consideration · a performance trade-off · concurrency
109
+ behaviour · a protocol detail · an API contract · a workaround · an edge case or
110
+ assumption · a licence or legal notice.
111
+
112
+ ```js
113
+ // Stripe may retry webhook deliveries for up to three days.
114
+ // Ignore duplicate events using the event ID.
115
+ ```
116
+
117
+ That comment stays. A comment earns its place when it explains something the
118
+ code does not already show.
119
+
120
+ ### OSC-10 · HARD · No speculative abstraction
121
+
122
+ Minimum code that solves the stated problem. No helper for a one-time operation.
123
+ No abstraction for a single call site. No configurability nobody asked for. No
124
+ design for a hypothetical future requirement.
125
+
126
+ Three similar lines of code beat a premature abstraction.
127
+
128
+ ### OSC-11 · HARD · No defence against impossible states
129
+
130
+ No error handling, fallback or validation for a scenario that cannot happen.
131
+ Trust internal code and framework guarantees.
132
+
133
+ Validate at system boundaries only: user input, external APIs, parsed files, and
134
+ anything crossing a process boundary.
135
+
136
+ ### OSC-12 · HARD · No backwards-compatibility shim
137
+
138
+ When the code can just change, change it. No feature flag, no compatibility
139
+ layer, no `_unused` rename, no re-export of a moved type, no `// removed`
140
+ tombstone.
141
+
142
+ If it is unused, delete it completely.
143
+
144
+ ### OSC-13 · HARD · Surgical
145
+
146
+ Every changed line traces directly to the request. Do not improve adjacent code,
147
+ comments or formatting. Do not refactor what is not broken. Do not add
148
+ docstrings or type annotations to code you did not change.
149
+
150
+ Cites house card rule 1. Where the house card and this rule differ, the house
151
+ card wins.
152
+
153
+ ### OSC-14 · HARD · Pre-existing dead code: mention, do not delete
154
+
155
+ Remove the imports, variables and functions **your** change left unused. Report
156
+ any other dead code you notice; do not remove it unless asked.
157
+
158
+ ### OSC-15 · PURPOSE · Method length
159
+
160
+ A function longer than the file's own norm is split, or the reason is written in
161
+ one line.
162
+
163
+ Stronger models write longer methods, not shorter ones: they consolidate complex
164
+ logic into a single procedural block because that is locally the most probable
165
+ continuation. This rule is the counterweight.
166
+
167
+ ### OSC-16 · PURPOSE · No Modular Mirage
168
+
169
+ New files that spread one behaviour across the tree produce structural
170
+ modularity with no semantic cohesion. If a change adds files, the reason each
171
+ boundary exists is written in one line.
172
+
173
+ Separating files is not the same as separating concerns.
174
+
175
+ ### OSC-17 · PURPOSE · No God class, no branch sink
176
+
177
+ No "manager" or "service" class that centralises every branch. No class whose
178
+ response set spans most of the module. Where one is genuinely right, write the
179
+ reason.
180
+
181
+ ### OSC-18 · HARD · Look before you write a helper
182
+
183
+ Before adding a helper, a util, a formatter or a validator, search for the one
184
+ that already exists. Redundant reimplementation is the most expensive slop in
185
+ this pack: it compiles, it passes, and it doubles the maintenance surface
186
+ silently.
187
+
188
+ ### OSC-19 · HARD · Match the existing style
189
+
190
+ Match the surrounding code's naming, comment density, error handling and file
191
+ layout, even where you would do it differently. The cached project pattern
192
+ (`orc pattern`) is the reference when one exists.
193
+
194
+ ### OSC-20 · PURPOSE · LLM-calling code is pinned and bounded
195
+
196
+ When the task writes code that calls a model, each of these is done or the
197
+ reason is written:
198
+
199
+ - Pin the model **version**, never a bare provider alias.
200
+ - Set `temperature` explicitly. Provider defaults differ and change.
201
+ - Bound max tokens, timeouts and retries. Unbounded is not "no limit", it is an
202
+ unknown limit.
203
+ - Send a system message.
204
+ - Enforce a structured output schema where the caller expects fields.
205
+
206
+ ### OSC-21 · HARD · No unrequested artifact files
207
+
208
+ Do not create a file nobody asked for: `SUMMARY.md`, `IMPLEMENTATION_NOTES.md`,
209
+ `CHANGES.md`, `NOTES.md`, `*_final`, `*_v2`, `*_new`, `*.bak`, `*.old`.
210
+
211
+ Report in the return. Do not leave a file behind as the report.
212
+
213
+ Checked by `orc rules lint` on new files.
214
+
215
+ ### OSC-22 · HARD · Introduce no OWASP Top 10 weakness
216
+
217
+ Injection, broken access control, insecure deserialisation, secrets in source,
218
+ missing authorisation on a new endpoint, unvalidated redirect. If you notice
219
+ insecure code you wrote, fix it in the same slice and say so in the return.
220
+
221
+ ---
222
+
223
+ ## Not a ban — keep these
224
+
225
+ - Every comment on the `OSC-09` list, at whatever length its facts require.
226
+ - Validation at a real system boundary (`OSC-11` is about impossible states, not
227
+ about untrusted input).
228
+ - An abstraction with two or more real call sites today.
229
+ - Defensive code the project's own pattern already established (`OSC-19` wins).
@@ -0,0 +1,114 @@
1
+ <!-- orc-rules:pack id=delivery prefix=OSD layer=core -->
2
+
3
+ # ORC RULES · Delivery (`OSD`)
4
+
5
+ > **READ-ONLY.** This file ships with ORC and changes only with `orc update`.
6
+ > Your own rules go in `.claude/orc/rules.md`, and **yours win** wherever the two
7
+ > disagree.
8
+
9
+ **Applies to** what an agent reports about its own work: a subagent return, a
10
+ phase report, a gate verdict, a ship summary, and what it says in chat.
11
+
12
+ This pack is in the **`core`** layer, so it rides in every slice of every lane
13
+ that carries rules at all. Prose style is optional in some lanes. Honesty is not.
14
+
15
+ **Source.** [`ehmo/slopkit`](https://github.com/ehmo/slopkit), the `slopgent`
16
+ skill · Miqdad Badjuber — [`miqdadbadjuber/anti-slop`](https://github.com/miqdadbadjuber/anti-slop) R-35 ·
17
+ [`BioInfo/slopless`](https://github.com/BioInfo/slopless) quality gates.
18
+ Full attribution in `CREDITS.md`.
19
+
20
+ ---
21
+
22
+ ### OSD-01 · HARD · Separate what changed from what is verified
23
+
24
+ Two different facts, always reported as two facts.
25
+
26
+ ```
27
+ Edited verifyToken at auth.ts:42. Tests not run yet.
28
+ ```
29
+
30
+ Not "fixed the token bug". Editing is an observation. Fixing is a claim, and a
31
+ claim needs a run behind it.
32
+
33
+ ### OSD-02 · HARD · Never report an unrun tool
34
+
35
+ Never say a command ran, a test passed, a build succeeded, a file was read or a
36
+ page was fetched when it did not happen in this session. Not as a summary, not
37
+ as a plan restated in the past tense, not as an inference from the diff.
38
+
39
+ This is the single most damaging rule in the pack to break, because everything
40
+ downstream trusts it.
41
+
42
+ ### OSD-03 · HARD · No invented confidence
43
+
44
+ Cut "this should work now", "definitely fixed", "should be perfect", "that ought
45
+ to do it". Confidence is reported from evidence or it is not reported.
46
+
47
+ Say what you observed and what remains unknown.
48
+
49
+ ### OSD-04 · HARD · Cut empty hedges, keep load-bearing caveats
50
+
51
+ The two look alike and are opposites.
52
+
53
+ - **Empty hedge**, cut it: "this might possibly help", "hopefully that works".
54
+ - **Load-bearing caveat**, keep it: "this only covers the JSON path; the
55
+ multipart branch is untested", "this assumes the column is already indexed".
56
+
57
+ The test is whether a reader could act on it. Scope, risk and uncertainty are
58
+ load-bearing. A "be concise" instruction cuts both; this rule cuts one.
59
+
60
+ ### OSD-05 · HARD · No apology theatre
61
+
62
+ State the cause and the fix. No "I apologise for the confusion", no "you're
63
+ absolutely right, my mistake", no paragraph of contrition before the correction.
64
+
65
+ One correction, plainly, then continue.
66
+
67
+ ### OSD-06 · LOCK · An estimate names its driving variable
68
+
69
+ Never anchor on human-effort time ("this would take a developer two days").
70
+ Name what actually creates the uncertainty — file count, test-suite size, build
71
+ repetitions, number of call sites — then pin it with a measurement where one
72
+ exists.
73
+
74
+ ### OSD-07 · LOCK · No trailing recap
75
+
76
+ No closing paragraph restating what was just done. The user reads the diff and
77
+ the return. A recap is a second copy of information they already have.
78
+
79
+ Report what is **unfinished**, **unverified** or **decided**. Not what is visible.
80
+
81
+ ### OSD-08 · HARD · An honest partial beats a false done
82
+
83
+ Report what is unmet. Never round up, never mark a criterion met because
84
+ everything around it is. A task that is 80% done is reported as 80% done with
85
+ the missing 20% named.
86
+
87
+ Cites house card rule 6.
88
+
89
+ ### OSD-09 · LOCK · One issue at a time
90
+
91
+ When raising a problem that needs the user, raise one. A list of five concerns
92
+ in one turn gets one answer covering none of them.
93
+
94
+ Exception: a batch the user explicitly asked to be batched, and a round of
95
+ questions in an interview phase, where the format is the point.
96
+
97
+ ### OSD-10 · HARD · No verification theatre
98
+
99
+ A PASS with no record of what was actually exercised is not a PASS.
100
+
101
+ Report the check element by element: the command that ran and its exit code, the
102
+ test names, the click-through if it was a UI, the file and line for each
103
+ criterion. If the deliverable could not be run, say so and say that the check
104
+ was code inspection instead. Never imply a run that did not happen.
105
+
106
+ ---
107
+
108
+ ## Not a ban — keep these
109
+
110
+ - Every caveat on the `OSD-04` load-bearing list.
111
+ - An explicit "I do not know" or "I did not check".
112
+ - A one-line correction of a real earlier error.
113
+ - The exact command, path, error code and exit status. Those are the evidence,
114
+ and they are never clutter.
@@ -0,0 +1,139 @@
1
+ <!-- orc-rules:pack id=ui prefix=OSU layer=ui -->
2
+
3
+ # ORC RULES · UI (`OSU`)
4
+
5
+ > **READ-ONLY.** This file ships with ORC and changes only with `orc update`.
6
+ > Your own rules go in `.claude/orc/rules.md`, and **yours win** wherever the two
7
+ > disagree.
8
+
9
+ **Applies to** front-end work only. This pack rides **per task**, never per lane:
10
+ the orchestrator adds it to a slice whose declared files are front-end. A UI rule
11
+ in a backend slice is tokens paid for nothing.
12
+
13
+ **This is a filter, not a style guide.** It prescribes no colour, no typeface and
14
+ no layout. It rejects **technique without purpose**. Where the project has a
15
+ design direction — a `DESIGN.md`, a brand guide, a design system — that
16
+ direction is the identity and this pack only filters on top of it. A bold palette
17
+ is identity. A blue-to-purple gradient chosen because it was the default is slop.
18
+
19
+ **Source.** Miqdad Badjuber — [`miqdadbadjuber/anti-slop`](https://github.com/miqdadbadjuber/anti-slop), rules R-01 to R-38 (MIT).
20
+ Full attribution in `CREDITS.md`.
21
+
22
+ ---
23
+
24
+ ### OSU-01 · HARD · No dead controls
25
+
26
+ Every interactive element does something real, or it does not exist:
27
+
28
+ - a link or button that reaches a destination that exists
29
+ - a modal that opens and closes, and closes on `Escape`
30
+ - a toggle that changes state
31
+ - an external action (`mailto:`, a real URL)
32
+ - a form that submits and shows feedback
33
+
34
+ A button that does nothing is a defect, not decoration. A nav item pointing at a
35
+ section that does not exist is the same defect. If it cannot have a destination
36
+ yet, remove it, or label it "Coming soon" **and** leave a `TODO` that names the
37
+ task (`OSC-05`).
38
+
39
+ ### OSU-02 · HARD · Three states minimum
40
+
41
+ Any view that displays data has an **empty** state, a **loading** state and an
42
+ **error** state. A UI built only for the ideal condition is not finished.
43
+
44
+ These are not extras. They are part of the view.
45
+
46
+ ### OSU-03 · HARD · Accessible by default
47
+
48
+ - WCAG AA contrast: 4.5:1 for body text, 3:1 for large text (18px+). Test across
49
+ the whole area the text crosses, not one point.
50
+ - Every interactive element reachable with `Tab` and `Shift+Tab`, in visual
51
+ order, and operable with `Enter` or `Space`.
52
+ - Every focused element has a visible focus indicator.
53
+ - Never `outline: none` or `outline: 0` without a better replacement.
54
+
55
+ A UI that needs a mouse is unfinished.
56
+
57
+ Partly checked by `orc rules lint` (`outline: none` with no replacement).
58
+
59
+ ### OSU-04 · HARD · Real content or an honest placeholder
60
+
61
+ No fabricated testimonial, statistic, customer logo, team member, review, or
62
+ security or compliance claim. No number without a real source.
63
+
64
+ A placeholder is written as what it is: `[REAL DATA]`, `[LOGO]`, "Coming soon".
65
+ Never disguised as final.
66
+
67
+ **An empty section beats a fabricated one.** If there are no testimonials, there
68
+ is no testimonials section.
69
+
70
+ ### OSU-05 · LOCK · No generic CTA
71
+
72
+ "Get Started", "Learn More", "Try Now", "Explore", "Discover" name no action.
73
+ Name the action: "Start the free trial", "Watch the 2-minute demo", "Create an
74
+ account".
75
+
76
+ ### OSU-06 · HARD · No buzzword UI copy
77
+
78
+ Never in shipped interface text: "AI Powered" · "Next Generation" ·
79
+ "Revolutionary" · "Seamless" · "Cutting Edge" · "Intelligent" · "Ultimate" ·
80
+ "Powerful" · "Effortless" · "Supercharged".
81
+
82
+ Say what it does. Show evidence, not adjectives.
83
+
84
+ Checked by `orc rules lint`.
85
+
86
+ ### OSU-07 · PURPOSE · Decoration needs a written reason
87
+
88
+ Each of these is **allowed** and fails only as an unexplained default. Write the
89
+ one-line reason it serves hierarchy, identity or readability:
90
+
91
+ - gradient as a primary colour (blue→purple, blue→cyan, purple→pink especially)
92
+ - glassmorphism · **dose cap: at most two elements**, never navbar + cards +
93
+ modal + sidebar together
94
+ - glow · **dose cap: at most two elements**
95
+ - capsule badge with no real status behind it
96
+ - a button arrow as every button's identity
97
+ - grid, dot, blueprint or graph-paper background
98
+ - sparkle, star, magic, lightning, diamond, orb or robot as a feature icon
99
+ - an animation stack (fade-up + float + scale + bounce) on everything
100
+ - a generic illustration set with no connection to the product
101
+
102
+ A gradient that separates one level of hierarchy from another is craft. The same
103
+ gradient covering the page is slop. The technique is not the problem.
104
+
105
+ ### OSU-08 · LOCK · Do not clone a named product
106
+
107
+ Do not build a visual that copies another product's look unless the user asked
108
+ for it by name. References are inspiration, not a template.
109
+
110
+ Models default to cloning the products that dominate their training data. Notice
111
+ when that is what is happening.
112
+
113
+ ### OSU-09 · HARD · Mobile is part of the design
114
+
115
+ No horizontal overflow. Text stays inside its container. Cards do not collide or
116
+ clip. The navbar stays usable. Tap targets meet 44px. Spacing stays consistent
117
+ across breakpoints.
118
+
119
+ Responsiveness is not an add-on and not a follow-up task.
120
+
121
+ ### OSU-10 · HARD · Every decision has a one-line reason
122
+
123
+ Before calling a UI done, write one line for each major decision: why this
124
+ colour, this layout, this typeface, this spacing, this card, this icon.
125
+
126
+ If the reason cannot be written in one line, the decision is not settled. This
127
+ is the keystone of the pack — it is what `OSU-07` checks against, and it is the
128
+ whole mechanism by which "technique with purpose" is distinguishable from
129
+ "technique by default".
130
+
131
+ ---
132
+
133
+ ## Not a ban — keep these
134
+
135
+ - Anything the project's own design direction specifies. Identity is not slop.
136
+ - A technique with its reason written. That is the pass condition, not an
137
+ exception to it.
138
+ - A deliberate uniform layout, when uniformity is the stated choice rather than
139
+ the default that happened.