@agentsfleet/orly 0.5.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 (112) hide show
  1. package/.githooks/pre-commit +42 -0
  2. package/.githooks/pre-push +67 -0
  3. package/AGENTS.md +348 -0
  4. package/LICENSE +21 -0
  5. package/README.md +249 -0
  6. package/SOUL.md +90 -0
  7. package/audits/agents-md.md +497 -0
  8. package/audits/agents-md.sh +353 -0
  9. package/audits/cross-tier-rates.sh +105 -0
  10. package/audits/data.sh +185 -0
  11. package/audits/deinit-pairs.sh +224 -0
  12. package/audits/design-tokens.sh +143 -0
  13. package/audits/doc-read.sh +183 -0
  14. package/audits/error-codes.sh +221 -0
  15. package/audits/fixtures/clean.diff +15 -0
  16. package/audits/fixtures/dirty.diff +16 -0
  17. package/audits/lifecycle-anchors.sh +22 -0
  18. package/audits/logging.sh +217 -0
  19. package/audits/msid-ui.sh +144 -0
  20. package/audits/parity-dispatch.sh +51 -0
  21. package/audits/rule-ledger-lib.sh +264 -0
  22. package/audits/rule-ledger.sh +225 -0
  23. package/audits/rule-paths.sh +108 -0
  24. package/audits/spec-template.sh +258 -0
  25. package/audits/sql-mod.sh +102 -0
  26. package/audits/ufs.sh +303 -0
  27. package/bin/orly +26 -0
  28. package/core/operating-model.md +256 -0
  29. package/dispatch/edit_rules.md +69 -0
  30. package/dispatch/lib.sh +213 -0
  31. package/dispatch/lifecycle.md +187 -0
  32. package/dispatch/name_architecture.md +93 -0
  33. package/dispatch/verify.md +111 -0
  34. package/dispatch/write_any.md +740 -0
  35. package/dispatch/write_any.sh +49 -0
  36. package/dispatch/write_auth.md +36 -0
  37. package/dispatch/write_changelog.md +64 -0
  38. package/dispatch/write_documentation.md +45 -0
  39. package/dispatch/write_go.md +24 -0
  40. package/dispatch/write_http.md +45 -0
  41. package/dispatch/write_mdx.md +7 -0
  42. package/dispatch/write_python.md +8 -0
  43. package/dispatch/write_rust.md +38 -0
  44. package/dispatch/write_shell.md +8 -0
  45. package/dispatch/write_spec.md +105 -0
  46. package/dispatch/write_sql.md +112 -0
  47. package/dispatch/write_sql.sh +36 -0
  48. package/dispatch/write_ts_adhere_bun.md +493 -0
  49. package/dispatch/write_ts_adhere_bun.sh +37 -0
  50. package/dispatch/write_zig.md +852 -0
  51. package/dispatch/write_zig.sh +40 -0
  52. package/docs/CHANGELOG_VOICE.md +18 -0
  53. package/docs/DISPATCH_ARCHITECTURE.md +664 -0
  54. package/docs/DISPATCH_REVIEW_DISPOSITION.md +65 -0
  55. package/docs/DOCUMENTATION_RULES.md +209 -0
  56. package/docs/EXECUTE_DOC_READS.md +29 -0
  57. package/docs/HARNESS_VERIFY_OUTPUT.md +40 -0
  58. package/docs/LIFECYCLE_PATTERNS.md +316 -0
  59. package/docs/LOGGING_STANDARD.md +397 -0
  60. package/docs/ORLY_ARCHITECTURE.md +129 -0
  61. package/docs/REST_API_DESIGN_GUIDELINES.md +783 -0
  62. package/docs/RULE_ENFORCEMENT.md +41 -0
  63. package/docs/SCHEMA_CONVENTIONS.md +93 -0
  64. package/docs/TEMPLATE.md +411 -0
  65. package/docs/VERIFY_TIERS.md +57 -0
  66. package/docs/greptile-learnings/README.md +51 -0
  67. package/docs/greptile-learnings/RULES.md +1045 -0
  68. package/fixtures/registry-invalid.json +1 -0
  69. package/fixtures/registry-valid.json +18 -0
  70. package/fixtures/unclosed-pack-block.md +8 -0
  71. package/package.json +63 -0
  72. package/packs/language/go/rules.md +24 -0
  73. package/packs/language/mdx/rules.md +7 -0
  74. package/packs/language/python/rules.md +8 -0
  75. package/packs/language/rust/rules.md +38 -0
  76. package/packs/language/shell/rules.md +8 -0
  77. package/registry.json +405 -0
  78. package/schemas/evidence.schema.json +43 -0
  79. package/schemas/profile.schema.json +12 -0
  80. package/schemas/registry.schema.json +12 -0
  81. package/skills/orly-babysit-prs/SKILL.md +326 -0
  82. package/skills/orly-spec-new/SKILL.md +157 -0
  83. package/skills/orly-write-integration-test/SKILL.md +470 -0
  84. package/skills/orly-write-unit-test/SKILL.md +520 -0
  85. package/src/cli.test.ts +70 -0
  86. package/src/cli.ts +287 -0
  87. package/src/config.test.ts +226 -0
  88. package/src/config.ts +288 -0
  89. package/src/criteria.test.ts +137 -0
  90. package/src/criteria.ts +166 -0
  91. package/src/criteria_spec.ts +127 -0
  92. package/src/criteria_support.ts +53 -0
  93. package/src/gates.test.ts +183 -0
  94. package/src/gates.ts +169 -0
  95. package/src/gates_spec.test.ts +98 -0
  96. package/src/gates_test_support.ts +194 -0
  97. package/src/git_env.ts +20 -0
  98. package/src/install.test.ts +514 -0
  99. package/src/install.ts +447 -0
  100. package/src/install_nested.test.ts +32 -0
  101. package/src/model.test.ts +31 -0
  102. package/src/model.ts +245 -0
  103. package/src/references.test.ts +47 -0
  104. package/src/references.ts +147 -0
  105. package/src/render.test.ts +60 -0
  106. package/src/render.ts +94 -0
  107. package/src/surfaces.test.ts +43 -0
  108. package/src/surfaces.ts +89 -0
  109. package/src/validation.test.ts +11 -0
  110. package/src/validation.ts +87 -0
  111. package/src/verify.test.ts +13 -0
  112. package/src/verify.ts +59 -0
@@ -0,0 +1,65 @@
1
+ # Dispatch Review — Finding Disposition
2
+
3
+ Date: Jun 04, 2026
4
+ Companion to `DISPATCH_ARCHITECTURE.md` (v2). Source: the 7-lens adversarial
5
+ CTO review (38 confirmed, 22 refuted) + the v2 coverage check.
6
+
7
+ Every **confirmed** finding, with its v2 disposition — so the 38 that survived
8
+ cross-examination are tracked in the repo, not just in an ephemeral run log.
9
+
10
+ - **resolved** — v2 has a concrete mechanism that closes it (section cited).
11
+ - **partial** — v2 SPECIFIES the fix; implementation is pending (**Stage 0** /
12
+ §13 acceptance criteria). NOT a doc defect: the v1-era WIP code (`lib.sh`,
13
+ `write_zig.sh`) has not yet been reworked to the spec. The 17 partials ARE
14
+ the Stage-0 backlog.
15
+ - **Refuted (22, excluded here):** raised criticisms the skeptic layer disproved
16
+ (bogus / already-handled / speculative). Not real problems — not tracked.
17
+
18
+ Coverage: **21 resolved · 17 partial · 0 unresolved · 0 regressed** (of 38).
19
+ Severity: P0 9R/10P · P1 10R/6P · P2 2R/1P.
20
+
21
+ | # | Sev | Dimension | Finding | v2 status | v2 §refs |
22
+ |---|---|---|---|---|---|
23
+ | 1 | P0 | cross-repo | Dissolving docs/gates/ hard-fails the repo's own audit (gate-parity check) — the determinism | resolved | §0, §13, §8, §9 |
24
+ | 2 | P0 | cross-repo | Dissolving gates breaks the LLM-judge eval golden-set the proposal claims to extend | partial | §13, §6.2, §8 |
25
+ | 3 | P0 | cross-repo | dispatch/write_zig.sh delegates to leaf scripts that cannot run where the dispatch lives — | partial | §0, §10, §10.3, §13, §6.3, §7 |
26
+ | 4 | P0 | determinism-feasibility | `--staged` file discovery and leaf-check scope read two different git repos — CWD vs RESOLVE | partial | §0, §10, §10.4, §7 |
27
+ | 5 | P0 | drift-coherence | Coherence audit proves symbol presence, not rule enforcement — the central anti-drift claim | resolved | §0, §1, §12, §2, §3, §3.1, §4, §6.1, §6.3 |
28
+ | 6 | P0 | drift-coherence | Missing leaf helper returns exit 0 with a 🟣 row — a deterministic check silently becomes a n | partial | §0, §10, §12, §14, §6.3 |
29
+ | 7 | P0 | drift-coherence | Dissolving docs/gates/ and renaming ZIG_RULES.md/BUN_RULES.md detonates the in-repo invarian | resolved | §0, §11, §8, §9 |
30
+ | 8 | P0 | ergonomics-robustness | Invariance audit's gate-parity check hard-fails the moment docs/gates/ is dissolved — the ve | resolved | §0, §13, §8, §9 |
31
+ | 9 | P0 | ergonomics-robustness | DOTFILES_RESIDENT and seven referencing docs still point at docs/ZIG_RULES.md / BUN_RULES.md | partial | §6.5, §8 |
32
+ | 10 | P0 | ergonomics-robustness | dispatch_run_helper returns 0 when the leaf script is absent — silent false-green in the rep | partial | §0, §10.2, §10.3, §12, §14, §6.1, §6.3 |
33
+ | 11 | P0 | eval-loop | §6.2 "extend existing audits/llmevals/" is a category error — the existing harness is an ex | partial | §0, §13, §6.2, §6.3 |
34
+ | 12 | P0 | eval-loop | Dissolving docs/gates/ deletes the context the existing llmevals harness embeds in every pro | resolved | §13, §14, §6.2, §8, §9 |
35
+ | 13 | P0 | eval-loop | agents-md.sh is hard-bound to docs/gates/ in four checks; dissolving the directory mak | resolved | §13, §8, §9 |
36
+ | 14 | P0 | gate-dissolution | Dissolving docs/gates/ hard-fails the no-override Invariance Suite Gate — the audit asserts | partial | §0, §13, §5, §8, §9 |
37
+ | 15 | P0 | gate-dissolution | Cross-cutting non-language gates have no coherent home in a per-language facade model — and | resolved | §0, §5 |
38
+ | 16 | P0 | gate-dissolution | "merge-then-delete, nothing unique dies" has no proving mechanism — the coherence audit chec | partial | §13, §14, §2, §6.5, §9 |
39
+ | 17 | P0 | yellow-mechanism | Dissolving docs/gates/ detonates the deterministic invariance audit — every gate-parity, gat | resolved | §0, §13, §8, §9 |
40
+ | 18 | P0 | yellow-mechanism | 🟡 JUDGMENT has zero machine backstop and the one prose backstop (CONFORM) has no row | partial | §0, §1, §11, §16 |
41
+ | 19 | P0 | yellow-mechanism | DOTFILES_RESIDENT + cross-reference + cross-agent-eval all pin docs/ZIG_RULES.md & BUN_RULES | resolved | §8, §9 |
42
+ | 20 | P1 | cross-repo | §11 cross-repo blast-radius enumeration is materially incomplete — it omits the audit/eval/s | resolved | §0, §10, §11, §13, §6.3, §8 |
43
+ | 21 | P1 | cross-repo | The negative-test harness (test-audit) copies and asserts on specific gate bodies that the d | resolved | §13, §8, §9 |
44
+ | 22 | P1 | cross-repo | audits/agents-md.md hardcodes docs/gates/ paths and a 'Scope (M70)' per-body requirement; d | partial | §6.5, §8 |
45
+ | 23 | P1 | cross-repo | The dispatch absorbs the FILE cap but silently drops the function/method length sub-gate the | resolved | §0, §13, §5 |
46
+ | 24 | P1 | determinism-feasibility | 🟡 'blocks the turn not the script' has no machine enforcement — the determinism anchor canno | partial | §0, §11, §3.1, §6.2 |
47
+ | 25 | P1 | determinism-feasibility | Merge-then-delete of 20 gate cards into prose will silently drop machine-relevant trigger de | partial | §0, §13, §5, §6.3, §6.5, §9 |
48
+ | 26 | P1 | drift-coherence | llmevals (latent-space eval) loses its rule context the moment gates dissolve — and the prop | resolved | §13, §14, §6.2, §8, §9 |
49
+ | 27 | P1 | drift-coherence | 'Merge-then-delete, nothing unique dies' is an unverifiable promise — no mechanism diffs gat | resolved | §0, §12, §2, §6.5, §9 |
50
+ | 28 | P1 | ergonomics-robustness | Hook path mismatch: proposal wires .git/hooks/pre-commit but the canonical, audited hook is | resolved | §0, §13, §14, §7, §8 |
51
+ | 29 | P1 | eval-loop | 🟡 YELLOW is redefined to mean the opposite of its established meaning in HARNESS_VERIFY_OUTP | resolved | §0, §11, §12, §13, §3.1, §4, §8 |
52
+ | 30 | P1 | eval-loop | dispatch-coverage.sh asserts a scenario EXISTS, not that it is discriminating — one pa | partial | §3, §6.1, §6.3 |
53
+ | 31 | P1 | gate-dissolution | llmevals harness cat's docs/gates/*.md into every model prompt under set -e — dissolving the | resolved | §13, §14, §6.2, §6.5, §8 |
54
+ | 32 | P1 | gate-dissolution | DOTFILES_RESIDENT and EXECUTE_DOC_READS still hard-reference docs/ZIG_RULES.md and docs/BUN_ | resolved | §0, §11, §13, §8, §9 |
55
+ | 33 | P1 | gate-dissolution | The 🟡-blocks-the-turn-not-the-script mechanism has no enforcer — it relies on agent self-rep | partial | §0, §11, §16, §3.1, §6.2 |
56
+ | 34 | P1 | yellow-mechanism | The coherence audit (the proposal's keystone) does not exist and is under-specified to the p | resolved | §13, §3, §6.3 |
57
+ | 35 | P1 | yellow-mechanism | Rule-extension protocol is now violated by the proposal's own structure and the gloss map re | partial | §13, §6.4, §8 |
58
+ | 36 | P2 | cross-repo | Gloss map has a silent FLL/LENGTH duplication and the architecture-doc gloss table omits hal | resolved | §12, §13, §6.3, §6.4 |
59
+ | 37 | P2 | ergonomics-robustness | pre-commit latency: 5 dispatch each shell out to git diff + multiple full-tree audits on ev | partial | §7 |
60
+ | 38 | P2 | eval-loop | dispatch_run_helper calls ufs.sh --all on the WHOLE tree per edit, contradicting the " | resolved | §7 |
61
+
62
+ **Refuted ≠ dropped.** The 22 refuted findings were independently disproven by
63
+ a skeptic agent (try-to-refute pass); excluding them is the quality filter, not
64
+ an oversight. As Stage 0 reworks the code + adds the eval/audit scripts, the
65
+ partial rows flip to resolved.
@@ -0,0 +1,209 @@
1
+ # Documentation rules
2
+
3
+ > Parent: [`../AGENTS.md`](../AGENTS.md) §Documentation voice. Read this before
4
+ > any narrower guide such as `CHANGELOG_VOICE.md` or before editing documentation
5
+ > about the dispatch model.
6
+
7
+ These rules govern customer-facing `agentsfleet` documentation. They keep pages
8
+ short, accurate, and usable by a first-day reader. Compliance is binary. A
9
+ rejection cites the Documentation (DOC) rule identifier that failed.
10
+
11
+ ## Scope and precedence
12
+
13
+ - **DOC-S1 — Published pages.** A standalone Markdown JSX (MDX) file listed in
14
+ `docs.json` follows every applicable rule in this document.
15
+ - **DOC-S2 — Generated API pages.** OpenAPI source follows the reference-page
16
+ intent through summaries, descriptions, parameters, examples, responses, and
17
+ stable errors. Generated pages do not need MDX front matter.
18
+ - **DOC-S3 — Fragments.** `snippets/*.mdx` files are reusable fragments. They
19
+ follow language and content rules, but not page front matter or skeletons.
20
+ - **DOC-S4 — Changelog archive.** `changelog.mdx` follows
21
+ `CHANGELOG_VOICE.md`. Historical entries are not rewritten and do not follow
22
+ the page skeletons below.
23
+ - **DOC-S5 — Repository terms win.** Write the product as `agentsfleet`. Use the
24
+ repository glossary and content boundaries when they are stricter than this
25
+ document.
26
+ - **DOC-S6 — Source wins.** Runtime code is the source of truth. OpenAPI and the
27
+ command-line interface follow runtime behavior. Published pages follow all
28
+ three.
29
+
30
+ ## Required front matter
31
+
32
+ Every published page carries these fields:
33
+
34
+ ```yaml
35
+ type: tutorial | how-to | reference | explanation | troubleshooting
36
+ audience: user | operator | contributor
37
+ verified: YYYY-MM-DD
38
+ product_version: x.y.z
39
+ executable: true | false
40
+ ```
41
+
42
+ - **DOC-F1 — Valid values.** Use only the values shown above.
43
+ - **DOC-F2 — Freshness.** `verified` records the last source check, not the last
44
+ prose edit. `product_version` matches the repository's configured docs
45
+ version.
46
+ - **DOC-F3 — Executable pages.** Set `executable: true` only when the page
47
+ contains runnable commands that the repository checker can validate.
48
+
49
+ ## Required page skeletons
50
+
51
+ Use the headings in the listed order. The page may add a heading only when the
52
+ task cannot be completed clearly without it.
53
+
54
+ | Type | Required headings, in order |
55
+ |---|---|
56
+ | tutorial | What you will build → Before you begin → Steps → Verify it works → What you learned → Related pages |
57
+ | how-to | What this does → Before you begin → Steps → Verify it works → Common problems → Remove or undo → Related pages |
58
+ | reference | Synopsis → Example with output → Options → Errors → Related pages |
59
+ | explanation | What it is → Why it exists → How it behaves → Limits → Related pages |
60
+ | troubleshooting | Symptom → Why it happened → How to fix it → How to prevent it |
61
+
62
+ - **DOC-P1 — One purpose.** Pick the page type that matches the reader's goal.
63
+ Do not mix a tutorial and full reference on one page.
64
+ - **DOC-P2 — Honest empty sections.** If a required section does not apply,
65
+ state that in one sentence. Do not invent behavior to fill a heading.
66
+
67
+ ## Language
68
+
69
+ 1. **DOC-01 — First-day reader.** Assume no product knowledge.
70
+ 2. **DOC-02 — Short sentences.** Use one idea per sentence. Prose sentences have
71
+ at most 25 words.
72
+ 3. **DOC-03 — Short paragraphs.** Use at most three sentences per paragraph.
73
+ 4. **DOC-04 — Active voice.** You act, or `agentsfleet` acts. Do not write “the
74
+ system”.
75
+ 5. **DOC-05 — Plain words.** Do not use “utilise”, “facilitate”, “leverage”,
76
+ “orchestrate”, “instantiate”, “terminate”, “provision”, “execute”, “persist”,
77
+ “hydrate”, or “artifact”. Prefer “use”, “help”, “manage”, “create”, “stop”,
78
+ “run”, “save”, “load”, or “file”.
79
+ 6. **DOC-06 — Precise meaning.** Never simplify a sentence if the shorter form
80
+ changes its meaning. Define a necessary technical term in the glossary.
81
+ 7. **DOC-07 — No marketing words.** Do not use “powerful”, “revolutionary”,
82
+ “enterprise-grade”, “seamless”, “cutting-edge”, “robust”, “next-generation”,
83
+ “world-class”, or “intelligent”.
84
+ 8. **DOC-08 — Explain automation.** “Automatically” and “as needed” must state
85
+ the trigger, timing, and effect.
86
+ 9. **DOC-09 — One name.** Use one canonical name for each concept. The project
87
+ glossary wins.
88
+ 10. **DOC-10 — Expand abbreviations.** Expand each non-obvious abbreviation once
89
+ per page, such as Secure Shell (SSH).
90
+ 11. **DOC-11 — Customer language.** State the user-visible action. Keep internal
91
+ queue, lease, process, and storage mechanics out of customer pages.
92
+ 12. **DOC-12 — Clear referents.** Every pronoun names one clear subject. Repeat
93
+ the noun when the reference could be ambiguous.
94
+ 13. **DOC-13 — Reading level.** Target grade 8 prose. Code and tables are exempt.
95
+ 14. **DOC-14 — One dialect.** Use one spelling dialect across all pages.
96
+
97
+ ### DOC-14b — No AI slop
98
+
99
+ Cut these on sight. They read as machine prose and they hide the point.
100
+
101
+ | Pattern | Example to kill | Write instead |
102
+ |---|---|---|
103
+ | Binary contrast | "This is not X. It's Y." | State Y. |
104
+ | Throat-clearing | "Here's the thing," "Let me be clear" | The point. |
105
+ | Faux-insight | "What most people get wrong" | The claim, standing alone. |
106
+ | Colon reveal | "The detail that makes it work: a second pass." | A plain sentence. |
107
+ | Superficial `-ing` | "adds search, highlighting our commitment" | "adds search, so you find old drafts." |
108
+ | Importance puffery | "marks a pivotal moment" | The fact; let the reader judge. |
109
+ | Weasel attribution | "experts agree", "studies show" | Name the source or cut the claim. |
110
+ | Fake-profound kicker | a closing metaphor or mic-drop | End on the last concrete sentence. |
111
+ | Summary recap | "In conclusion", "Overall" | Stop. The reader was just there. |
112
+
113
+ Also banned, on top of DOC-05 and DOC-07: delve, foster, elevate, harness,
114
+ supercharge, embark, ever-evolving, tapestry, realm, paradigm shift, game
115
+ changer. Em dashes are not a rhythm crutch: none in short copy, at most two per
116
+ long page, and only where they beat a comma or a period.
117
+
118
+ ## Content
119
+
120
+ 15. **DOC-15 — Command output.** Every runnable command is followed by its
121
+ expected output. Mark changing output as `<varies>`.
122
+ 16. **DOC-16 — Placeholders.** Use `<UPPER_SNAKE>` placeholders. State where each
123
+ value comes from in the sentence before or after the example.
124
+ 17. **DOC-17 — Fake credentials.** Example credentials are clearly fake, such as
125
+ `af_test_00000000`.
126
+ 18. **DOC-18 — Destructive actions.** Warn before the command. State what is
127
+ lost. Show `--dry-run` first when the command supports it.
128
+ 19. **DOC-19 — Complete options.** Every option states its effect, default,
129
+ unit, and valid range. Write “none” when no default or range exists.
130
+ 20. **DOC-20 — Resource lifecycle.** Every resource states who creates, owns,
131
+ and deletes it. State the limit and the behavior at that limit.
132
+ 21. **DOC-21 — Failure behavior.** Every feature states what fails, what retries,
133
+ the retry count and delay, what data is lost, and what survives.
134
+ 22. **DOC-22 — Audience boundary.** User pages state guarantees, not internals.
135
+ Operator pages state exact dependencies and versions.
136
+ 23. **DOC-23 — Units and time.** Numbers carry units. Dates use ISO 8601. Times
137
+ use Coordinated Universal Time (UTC).
138
+ 24. **DOC-24 — Stable errors.** Every product error has a stable Identifier (ID)
139
+ and an anchor that explains why it happened, how to fix it, and how to
140
+ prevent it.
141
+
142
+ ## Structure
143
+
144
+ 25. **DOC-25 — Heading order.** Use one level-one (H1) heading. Do not skip heading levels.
145
+ Page renames require redirects.
146
+ 26. **DOC-26 — Procedures.** Use numbered lists. Each item carries one action.
147
+ Each runnable block carries one command.
148
+ 27. **DOC-27 — Tables.** Use tables for comparisons. Never put procedures in a
149
+ table.
150
+ 28. **DOC-28 — Fence intent.** Use `bash` for runnable commands, `yaml` or `json`
151
+ for configuration, and `text` for output.
152
+ 29. **DOC-29 — Self-contained task.** A page completes its stated task alone.
153
+ Links add depth and never hide a prerequisite.
154
+ 30. **DOC-30 — User interface paths.** Write paths as **Settings → API Keys →
155
+ Create Key**. Screenshots never carry unique instructions.
156
+
157
+ ## Freshness
158
+
159
+ 31. **DOC-31 — Required version fields.** `verified` and `product_version` are
160
+ mandatory. A page two releases stale is rejected until rechecked.
161
+ 32. **DOC-32 — Runnable examples.** Repository checks run the fenced commands on
162
+ every `executable: true` page for each release. A failing example blocks the
163
+ release.
164
+
165
+ ## Enforcement
166
+
167
+ 33. **DOC-33 — Mechanical checks.** Pre-commit checks block banned words,
168
+ undefined abbreviations, long sentences, long paragraphs, missing front
169
+ matter, missing or unordered sections, command blocks without output,
170
+ options without defaults, heading violations, and procedures in tables.
171
+ 34. **DOC-34 — Review checks.** Review checks one-idea sentences, pronoun
172
+ clarity, resource lifecycle, failure behavior, implementation leaks, and
173
+ meaning preserved by simplification.
174
+ 35. **DOC-35 — Exceptions.** A page may list at most three exceptions in front
175
+ matter. Each uses `lint-ignore: DOC-NN — reason`. Review recurring exceptions
176
+ as a rule defect instead of copying them forward.
177
+
178
+ ## Reading joy — contributor architecture sets
179
+
180
+ These apply to contributor-facing architecture sets (`docs/architecture/**`,
181
+ `AUTH*.md`, `development.md`) in product repos, on top of everything above
182
+ where the two do not conflict. They exist so those pages stay a pleasure to
183
+ read, not just correct.
184
+
185
+ 36. **DOC-36 — Answer first.** A Facts table or a "read this when" line opens
186
+ the page. Reasoning follows the answer, never the other way around.
187
+ 37. **DOC-37 — Questions are the index.** The set's index maps a reader's
188
+ question or symptom to one section. No two index rows share a target.
189
+ 38. **DOC-38 — One fact, one home.** A fact lives on the page that owns it;
190
+ every other mention is a pointer. Nothing to reconcile, nothing to drift.
191
+ 39. **DOC-39 — Pictures where structure beats prose.** Topology gets a box
192
+ diagram, flows get a sequence, comparisons get a table, reasoning stays
193
+ prose. A diagram's borders align; a broken box is a defect, not a style.
194
+ 40. **DOC-40 — Color that means something.** Typed callouts (note, tip,
195
+ important, warning) for asides by kind; real brand marks where a product
196
+ is named; concept emoji only in tables and lists. Never inside headings —
197
+ specs cite heading text verbatim.
198
+ 41. **DOC-41 — Errors say what to do.** A failure is a code, its cause, and
199
+ the exact fix command, linking to the published error registry when the
200
+ user-facing page carries more.
201
+ 42. **DOC-42 — Same zoom, named lens.** When one story is told at several
202
+ zoom levels, the page names each lens and when to read it, and the lenses
203
+ do not repeat each other.
204
+
205
+ ## Closing standard
206
+
207
+ A page is complete when a human and a Large Language Model (LLM) can answer how,
208
+ what, and why without guessing. The source check, page check, and reviewer must
209
+ all pass.
@@ -0,0 +1,29 @@
1
+ # EXECUTE — Doc reads by trigger
2
+
3
+ > Parent: [`../AGENTS.md`](../AGENTS.md) §EXECUTE. Each dispatch entry's trigger header reads its façade — sectioned: scan headers, read the sections the diff shape touches; this table is the canonical trigger→doc map, enforced by the `📖 DOC READ: <path>` proof-line.
4
+
5
+ Every triggered document requires one `📖 DOC READ: <path>` proof-line **per turn** — before the turn's first triggering edit — citing §N applied, or the cited-skip variant when nothing in the doc applies. Auto-mode and prior-turn reads never excuse the line (already-loaded sections are cited, not re-read); a triggering turn without the line is a violation regardless of whether the edits happen to be clean.
6
+
7
+ | Trigger | Read |
8
+ |---|---|
9
+ | Always (universal) | `docs/greptile-learnings/RULES.md` — at EXECUTE start read the Rule-code gloss legend + the sections named by the spec's "Applicable Rules" list (canonical); the full file belongs to `/review`, not EXECUTE. On sub-task shape change, section-scan (`grep -n "^## "`) and read only newly-touched sections, cited in the proof-line — never the full file again. |
10
+ | `core/**`, `packs/**`, `schemas/**`, `src/**`, `registry.json`, agent-home instruction links, repository rules synchronization, or governance hooks | `dispatch/edit_rules.md` + `docs/ORLY_ARCHITECTURE.md` — canonical sources, profiles, snapshots, refusal boundaries, and evidence. |
11
+ | Lifecycle stage transition (CHORE(open)/PLAN/CHORE(close)/LAND, worktree setup, milestone bootstrap) | `dispatch/lifecycle.md` — the entered stage's runbook section only (section-scan; fires on the transition itself, not on an Edit/Write). |
12
+ | Any source file (cross-cutting authoring) | `dispatch/write_any.md` — length, logging, milestone-id, error-registry, UFS, greptile read, legacy-workaround family. |
13
+ | Spec's "Applicable Rules" | Each rule (canonical). Missing → the cross-cutting codes of `dispatch/write_any.md` are the floor; surface omission. |
14
+ | `*.zig` | `dispatch/write_zig.md`. ZIG GATE per edit. |
15
+ | `*.ts`/`*.tsx`/`*.js`/`*.jsx` | `dispatch/write_ts_adhere_bun.md` — TS FILE SHAPE DECISION (§1) at PLAN, const/import/Bun-primitive discipline, anti-patterns. |
16
+ | `*.rs` | `dispatch/write_rust.md` — ownership, error variants, feature combinations, and contention tests. | <!-- oracle-packs:language.rust -->
17
+ | `*.py` | `dispatch/write_python.md` — parsing boundaries, resource ownership, and specific exceptions. |
18
+ | `*.sh` | `dispatch/write_shell.md` — quoting, array arguments, cleanup, input safety, and shell compatibility. |
19
+ | `*.mdx` | `dispatch/write_mdx.md` — structure, front matter, links, code fences, accessibility, and Mintlify isolation. | <!-- oracle-packs:language.mdx -->
20
+ | Log emit (any language; see LOGGING GATE triggers) | `docs/LOGGING_STANDARD.md` — wire format (logfmt), severity ladder, error-code embedding, scope/event discipline, PII redaction, §10A tightenings. LOGGING GATE per edit. |
21
+ | Lifecycle method in `*.zig` (`init|deinit|close|release|destroy|shutdown|dispose|free`) | `docs/LIFECYCLE_PATTERNS.md` — init/deinit pairing, errdefer placement, allocator ownership, defer/errdefer mutual exclusion, §10A tightenings. LIFECYCLE GATE per edit. |
22
+ | `src/agentsfleetd/http/handlers/**` or `public/openapi/**` | `docs/REST_API_DESIGN_GUIDELINES.md` — Quick Checklist; §1–§5 (URL/method/body/response/error), §6 (OpenAPI), §7 (6-place route registration), §8 (`Hx` handler interface), §10 (pre-PR gates). |
23
+ | `ui/packages/**/*.{tsx,jsx,css}`, `app/**/*.{tsx,jsx,css}`, `components/**/*.{tsx,jsx,css}`, repo-root `globals.css`, or any file changing visual tokens / motion / typography | `DESIGN.md` (repo root) or `docs/DESIGN_SYSTEM.md` — whichever the repo carries. Design system source of truth: typography stack, color tokens, the single accent and its currency rule, motion signature, spacing/density, component principles, CLI palette mapping. DOC READ proof-line per turn. |
24
+ | `*.tsx` / `*.jsx` under `ui/packages/{app,website}/` | `dispatch/write_ts_adhere_bun.md` (Design Tokens) — token-utility table (text/tracking/leading/max-w/min-w/spacing/motion/radius/color). DESIGN TOKEN GATE fires per edit; audit via project-side `audits/design-tokens.sh`. |
25
+ | Auth-flow | `docs/AUTH.md`. |
26
+ | Published `*.mdx`, reusable Markdown JSX (MDX) fragment, customer readme, or public OpenAPI prose | `dispatch/write_documentation.md` → `docs/DOCUMENTATION_RULES.md` — establish page, fragment, API, or changelog scope before narrower guides. |
27
+ | Changelog `<Update>` / release note (`changelog.mdx`) | First `dispatch/write_documentation.md`, then `dispatch/write_changelog.md` → `docs/CHANGELOG_VOICE.md`; internal-only ⇒ no entry. |
28
+ | `schema/*.sql` / migration | `dispatch/write_sql.md` + `docs/SCHEMA_CONVENTIONS.md` — naming/type conventions, schema/migration rules + Schema Table Removal Guard. Re-print Schema Guard output. |
29
+ | Any spec under `docs/v*/{pending,active,done}/` or `docs/TEMPLATE.md` | `docs/TEMPLATE.md` "Prohibited" section — no time/effort estimates, no complexity ratings, no percentage-complete, no owners/dates. SPEC TEMPLATE GATE per edit. |
@@ -0,0 +1,40 @@
1
+ # CONFORM — Required output block
2
+
3
+ > Parent: [`../AGENTS.md`](../AGENTS.md) §CONFORM. This file retains its name
4
+ > because `agentsfleet` retains the repository command `make harness-verify`.
5
+
6
+ Runs after EXECUTE, before VERIFY. Aggregates every gate verdict; lifecycle cannot advance without enumerating the audit. Any "fail" / remaining violations → return to EXECUTE.
7
+
8
+ ## Combined end-of-turn audit
9
+
10
+ Single awk over `git diff -U0 HEAD`, replaces 4 separate self-audits. For every `+` line:
11
+
12
+ - Emit `MS-ID:` hits when file is source/config and matches `M[0-9]+_[0-9]+|§[0-9]+(\.[0-9]+)+|\bT[0-9]+\b|\bdim [0-9]+\.[0-9]+\b`.
13
+ - Emit `PUB:` hits when `*.zig` and line matches `^\+(pub | *pub fn | *[A-Z][a-zA-Z]+,$)`.
14
+ - Emit `UI:` hits when under `ui/packages/app/**.{tsx,jsx}` and line contains `<(section|button|input|dialog|article|nav|header|form)\b`.
15
+
16
+ Non-empty = address before CONFORM passes.
17
+
18
+ ## Required output
19
+
20
+ Verdict cells use ✅ pass · 🟣 n/a · 🔴 fail · 🟡 violations addressed.
21
+
22
+ ```
23
+ 🔴 CONFORM: <branch>
24
+ | Gate | Verdict |
25
+ | FILE SHAPE | ✅ pass | 🟣 n/a |
26
+ | PUB GATE | ✅ pass | 🟣 n/a |
27
+ | LENGTH GATE | ✅ pass | 🟡 files at cap: … |
28
+ | MILESTONE-ID GATE | ✅ pass — combined audit, 0 hits |
29
+ | ZIG GATE | ✅ pass | 🟣 n/a |
30
+ | UI GATE | ✅ pass | 🟣 n/a |
31
+ | DESIGN TOKEN GATE | ✅ pass | 🟡 N arbitraries addressed | 🔴 N unresolved |
32
+ | UFS GATE | ✅ pass | 🟡 N violations addressed | 🔴 N unresolved |
33
+ | SCHEMA GUARD | ✅ pass | 🟣 n/a |
34
+ | GREPTILE GATE | ✅ pass | 🟡 N violations addressed |
35
+ | Architecture consult | ✅ doc updated same commit | 🟣 n/a |
36
+ | Coverage | ✅ backend N% ≥ min · UI N% ≥ min | 🟣 n/a |
37
+ | /orly-write-unit-test | ✅ clean | 🟡 N tests added |
38
+ ```
39
+
40
+ Any 🔴 in the table → return to EXECUTE; the lifecycle does NOT advance.