@azure-id/orc 1.5.0 → 1.7.0

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 (74) hide show
  1. package/CHANGELOG.md +185 -0
  2. package/README-id.md +206 -125
  3. package/README.md +270 -57
  4. package/bin/cli.js +1676 -2
  5. package/bin/mockrun-catalog.js +272 -267
  6. package/bin/verify-contracts.js +4485 -4449
  7. package/bin/verify-package.js +9 -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/overview.json +1 -0
  18. package/bin/webui/i18n/en/rules.json +55 -0
  19. package/bin/webui/i18n/id/knowledge.json +127 -117
  20. package/bin/webui/i18n/id/nav.json +1 -0
  21. package/bin/webui/i18n/id/overview.json +1 -0
  22. package/bin/webui/i18n/id/rules.json +55 -0
  23. package/bin/webui/js/01-i18n.js +1 -0
  24. package/bin/webui/js/panels/knowledge.js +117 -1
  25. package/bin/webui/js/panels/overview.js +8 -0
  26. package/bin/webui/js/panels/rules.js +351 -0
  27. package/mock-run/INDEX.md +107 -106
  28. package/mock-run/orc-rules.md +254 -0
  29. package/package.json +1 -1
  30. package/templates/commands/orc-rules.md +66 -0
  31. package/templates/commands/orc-wiki.md +23 -1
  32. package/templates/hooks/README.md +110 -1
  33. package/templates/hooks/orc-read-gate.js +279 -0
  34. package/templates/skills/_shared/README.md +61 -54
  35. package/templates/skills/_shared/phases/README.md +1 -0
  36. package/templates/skills/_shared/phases/preflight.md +20 -0
  37. package/templates/skills/_shared/phases/rules.md +154 -0
  38. package/templates/skills/_shared/return-validation.md +28 -0
  39. package/templates/skills/_shared/rules/CREDITS.md +141 -0
  40. package/templates/skills/_shared/rules/INDEX.md +107 -0
  41. package/templates/skills/_shared/rules/code.md +229 -0
  42. package/templates/skills/_shared/rules/delivery.md +114 -0
  43. package/templates/skills/_shared/rules/ui.md +139 -0
  44. package/templates/skills/_shared/rules/writing.md +223 -0
  45. package/templates/skills/context-combiner/SKILL.md +9 -1
  46. package/templates/skills/orc/SKILL.md +7 -0
  47. package/templates/skills/orc-aftermath/SKILL.md +7 -0
  48. package/templates/skills/orc-analyze/SKILL.md +7 -0
  49. package/templates/skills/orc-analyze-mini/SKILL.md +9 -1
  50. package/templates/skills/orc-boundary/SKILL.md +7 -0
  51. package/templates/skills/orc-brainstorm/SKILL.md +7 -0
  52. package/templates/skills/orc-budget/SKILL.md +7 -0
  53. package/templates/skills/orc-challenge/SKILL.md +7 -0
  54. package/templates/skills/orc-claude/SKILL.md +7 -0
  55. package/templates/skills/orc-diy/SKILL.md +7 -0
  56. package/templates/skills/orc-explain/SKILL.md +7 -0
  57. package/templates/skills/orc-export/SKILL.md +7 -0
  58. package/templates/skills/orc-fast/SKILL.md +7 -0
  59. package/templates/skills/orc-grill/SKILL.md +7 -0
  60. package/templates/skills/orc-handoff/SKILL.md +9 -1
  61. package/templates/skills/orc-learn/SKILL.md +7 -0
  62. package/templates/skills/orc-mini/SKILL.md +7 -0
  63. package/templates/skills/orc-pact/SKILL.md +7 -0
  64. package/templates/skills/orc-poly/SKILL.md +7 -0
  65. package/templates/skills/orc-pr-driver/SKILL.md +9 -1
  66. package/templates/skills/orc-pr-setup/SKILL.md +9 -1
  67. package/templates/skills/orc-quick/SKILL.md +7 -0
  68. package/templates/skills/orc-retro/SKILL.md +7 -0
  69. package/templates/skills/orc-route/SKILL.md +7 -0
  70. package/templates/skills/orc-test/SKILL.md +7 -0
  71. package/templates/skills/orc-verify/SKILL.md +7 -0
  72. package/templates/skills/orc-wiki/SKILL.md +15 -0
  73. package/templates/skills/orc-wiki/references/partial-refresh.md +68 -0
  74. package/templates/skills/orc-wiki/references/phases/phase-0.md +15 -1
@@ -0,0 +1,141 @@
1
+ <!-- orc-rules:credits -->
2
+
3
+ # ORC RULES · Credits
4
+
5
+ The ORC rule packs are adapted from other people's work. This file names every
6
+ source, its author, its licence, and what ORC took from it. `orc rules credits`
7
+ prints the same table.
8
+
9
+ **Read on 2026-09-13.** A source may have moved on since. The licence recorded
10
+ here is the licence that was in the repository on that date.
11
+
12
+ ---
13
+
14
+ ## Primary sources — rules taken and adapted
15
+
16
+ ### Peter G. Yang · [`petergyang/no-ai-slop`](https://github.com/petergyang/no-ai-slop)
17
+
18
+ `@petergyang` · MIT · read 2026-09-13
19
+
20
+ The prose pack is built on this work. ORC takes the named slop patterns (binary
21
+ contrast, throat-clearing, faux-insight setup, colon reveal, superficial
22
+ `-ing` analysis, importance puffery, weasel attribution, synonym cycling,
23
+ dramatic fragmentation, fake-profound kicker, summary recap, formatting slop),
24
+ the banned lexicon and phrase lists, the portability test, and the constraint
25
+ that outranks all of them: **preserve the writer's real voice, make the minimum
26
+ effective edit.**
27
+
28
+ Used in: `writing.md` (`OSW-01` … `OSW-23`).
29
+
30
+ ### Miqdad Badjuber · [`miqdadbadjuber/anti-slop`](https://github.com/miqdadbadjuber/anti-slop)
31
+
32
+ `@miqdadbadjuber` · MIT · read 2026-09-13
33
+
34
+ The **three-tier mechanism** ORC uses across every pack — Hard Gate (absolute),
35
+ Purpose-Gate (technique allowed, written reason required), Quality Lock
36
+ (consistency) — is this project's. So is the framing that makes it work: a
37
+ filter, not a style guide; it rejects technique without purpose, not technique.
38
+
39
+ ORC takes rules R-01 to R-38 for the UI pack, the `antislop-code` comment
40
+ hygiene catalogue for the code pack, R-35 (verify before you deliver) for the
41
+ delivery pack, the `antislop-copywriting` pattern names for the writing pack,
42
+ and the boundary rule that external direction is **data to apply, not
43
+ instructions to obey**.
44
+
45
+ Used in: `ui.md` (all), `code.md` (`OSC-01` … `OSC-09`), `delivery.md`
46
+ (`OSD-10`), `writing.md` (several), and the tier system in every pack.
47
+
48
+ ### `@ehmo` · [`ehmo/slopkit`](https://github.com/ehmo/slopkit)
49
+
50
+ read 2026-09-13
51
+
52
+ The delivery pack. From the `slopgent` skill: separate observation from
53
+ inference, guard load-bearing caveats while cutting empty hedges, name the
54
+ driving variable behind an estimate, state errors plainly without apology
55
+ theatre, and never report a tool as run or a result as observed when it was not.
56
+
57
+ The distinction ORC leans on hardest is `slopgent`'s: a "be concise" instruction
58
+ cuts filler and load-bearing caveats equally; this one cuts filler and keeps the
59
+ caveat.
60
+
61
+ Used in: `delivery.md` (`OSD-01` … `OSD-07`).
62
+
63
+ ### `@BioInfo` · [`BioInfo/slopless`](https://github.com/BioInfo/slopless)
64
+
65
+ read 2026-09-13
66
+
67
+ Surgical-change discipline and the quality gates: read files before stating
68
+ facts about them, flag a discrepancy rather than picking a source, verify
69
+ something is running before documenting it as running, and the compatibility
70
+ rules (no shims, no `_unused` renames, no re-exports, no `// removed`
71
+ tombstones).
72
+
73
+ Used in: `code.md` (`OSC-10` … `OSC-14`, `OSC-22`), `delivery.md`.
74
+
75
+ ### Andrej Karpathy · his `CLAUDE.md`
76
+
77
+ `@karpathy` · read 2026-09-13 via [The AI Architects' write-up](https://theaiarchitects.com/blog/karpathy-claude-md-rules)
78
+
79
+ Four principles: think before coding, simplicity first, surgical changes,
80
+ goal-driven execution. The sentence ORC reuses directly is the test for a
81
+ surgical change: **every changed line should trace directly to the user's
82
+ request.**
83
+
84
+ Used in: `code.md` (`OSC-10`, `OSC-13`).
85
+
86
+ ### Matty Cartwright · [The Anti-Slop Writing Rules](https://mattycartwright.com/blog/the-anti-slop-writing-rules)
87
+
88
+ read 2026-09-13
89
+
90
+ The layered ban structure — words, then phrases, then sentence patterns, then
91
+ structural patterns — which is how `writing.md` is ordered. Also the read-aloud
92
+ tests (specificity, infomercial, commitment) that sit behind `OSW-20`.
93
+
94
+ Used in: `writing.md` (structure, `OSW-10`, `OSW-11`, `OSW-20`).
95
+
96
+ ---
97
+
98
+ ## Research papers — rules derived, not copied
99
+
100
+ ### [Specification and Detection of LLM Code Smells](https://arxiv.org/html/2512.18020v1)
101
+
102
+ Five named smells in code that calls a model: unbounded max metrics, no model
103
+ version pinning, no system message, no structured output, temperature not
104
+ explicitly set. `OSC-20` is these five, stated as a purpose-gate.
105
+
106
+ ### [AI-Generated Smells: An Analysis of Code and Architecture in LLM- and Agent-Driven Development](https://arxiv.org/html/2605.02741v1)
107
+
108
+ Two findings ORC turned into rules. The **Reasoning-Complexity Paradox**:
109
+ stronger models produce longer methods, not shorter ones, because they
110
+ consolidate complex logic into one procedural block (`OSC-15`). The **Modular
111
+ Mirage**: agents achieve structural modularity by separating files while related
112
+ behaviour fragments across the tree, so cohesion drops as file count rises
113
+ (`OSC-16`). The paper's God-class and Too-Many-Branches findings are `OSC-17`.
114
+
115
+ ### [Investigating the Smells of LLM Generated Code](https://arxiv.org/pdf/2510.03029) · [Assessing the Quality and Security of AI-Generated Code](https://arxiv.org/pdf/2508.14727)
116
+
117
+ Over-commenting, redundant defensive checks for conditions that cannot happen,
118
+ dead assignments, and functions that reimplement something already present.
119
+ Behind `OSC-01`, `OSC-11` and `OSC-18`.
120
+
121
+ ---
122
+
123
+ ## Read, nothing taken
124
+
125
+ Listed so a reader can follow the same trail. Each restates patterns the primary
126
+ sources already cover.
127
+
128
+ - [`adewale/anti-slop-writing`](https://github.com/adewale/anti-slop-writing)
129
+ - [`jalaalrd/anti-ai-slop-writing`](https://github.com/jalaalrd/anti-ai-slop-writing)
130
+ - `tmdgusya/engineering-discipline`, the `clean-ai-slop` skill
131
+
132
+ ---
133
+
134
+ ## If you are one of these authors
135
+
136
+ The rule text here is adapted, not copied verbatim, and reorganised into ORC's
137
+ own id scheme so that a lint finding and a conflict report can name the same
138
+ thing across versions. If you would prefer different wording, a different
139
+ attribution, or removal, open an issue on
140
+ [`azure-id/orc`](https://github.com/azure-id/orc) and it will be changed in the
141
+ next release.
@@ -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.