@agentsfleet/orly 0.6.7 → 0.6.8

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.
package/AGENTS.md CHANGED
@@ -144,6 +144,7 @@ Guards fire pre-hoc regardless of lifecycle stage. Override: `<GATE>: SKIPPED pe
144
144
  | write auth-flow / token-minting files | `write_auth` | `dispatch/write_auth.md` — auth invariants; reads the product repo's `docs/AUTH.md` before · 🟣 delegated (product repo). |
145
145
  | write published docs / OpenAPI prose | `write_documentation` | `dispatch/write_documentation.md` → `docs/DOCUMENTATION_RULES.md` before narrower guides; page, fragment, API, changelog scopes differ · 🟣 delegated to repository pre-commit checks. |
146
146
  | write a changelog entry | `write_changelog` | `dispatch/write_changelog.md` — changelog voice (one headline, no marketing words, `**Bold lead-noun**` bullets, history append-only); reads `docs/CHANGELOG_VOICE.md` · 🤔 judgment-only. |
147
+ | write/update a PR or MR body or its session notes | `write_pr_description` | `dispatch/write_pr_description.md` — append numbered `Session notes`, `Review`, and `Make`; measured fenced diagrams; review dispositions; commands with real output. |
147
148
  | claim "tests pass / ready / shipping" | `verify` | `dispatch/verify.md` — verification tiers (`make` canonical; package-scoped runners are **not** verification), done-message glyph format · 🤔 judgment-only, `VERIFY GATE: <target> skipped per environment constraint (reason: ...)` only when genuinely unrunnable. |
148
149
  | name a stream/channel/Redis namespace/queue/RPC/Postgres schema, or describe a flow | `name_architecture` | `dispatch/name_architecture.md` — architecture-consult discipline; grep relevant `docs/architecture/` (chat brainstorming counts) · **no override** — doc wins until reconciled. |
149
150
  | run a lifecycle stage (open→close a stream, worktree setup, milestone bootstrap) | `lifecycle` | `dispatch/lifecycle.md` — stage runbooks: CHORE(open/close) checklists, PLAN expansions, spec discipline, deferral format, pre-PR gates, LAND · 🤔 judgment-only. |
@@ -240,7 +241,7 @@ Required when spec involved — after last COMMIT, before PR. Also runs when par
240
241
 
241
242
  **PR budget — one per milestone.** One ready PR plus one follow-up is the ceiling. Fold new scope into the open PR (reopen `done/`→`active/` if needed), not a third.
242
243
 
243
- **Required outputs** — full checklist in `dispatch/lifecycle.md`: all Dimensions/Sections `DONE` (`IN_PROGRESS` if parked) · spec → `docs/v*/done/` iff complete · new changelog `<Update>` **and** the affected `~/Projects/docs/` pages revised · `docs/architecture/**` diff or Session-Notes why-not · PR `## Session notes` (decisions, deferrals, skill + babysit outcomes) · orphan sweep (RULE ORP) · ephemeral `HANDOFF*` docs deleted · `git status -uall` audit, **empty post-commit** before the PR · version sync (`make check-version` passes).
244
+ **Required outputs** — full checklist in `dispatch/lifecycle.md`: all Dimensions/Sections `DONE` (`IN_PROGRESS` if parked) · spec → `docs/v*/done/` iff complete · new changelog `<Update>` **and** the affected `~/Projects/docs/` pages revised · `docs/architecture/**` diff or Session-Notes why-not · PR body per `dispatch/write_pr_description.md` · orphan sweep (RULE ORP) · ephemeral `HANDOFF*` docs deleted · `git status -uall` audit, **empty post-commit** before the PR · version sync (`make check-version` passes).
244
245
 
245
246
  **Deferral discipline.** A "deferred to follow-up" claim requires an **user-acked verbatim quote** in PR Session Notes (or spec Discovery); agent-unilateral deferral = incomplete scope, not deferral — CHORE(close) blocks until the item lands or the quote is captured. Quote format + HANDOFF faithfulness: `dispatch/lifecycle.md`.
246
247
 
@@ -269,7 +269,7 @@ The questionnaire is organised by scenario. Each scenario corresponds to a momen
269
269
 
270
270
  This scenario exists because the most likely failure of the operating model is
271
271
  not a missing rule — it's the *agent misreading a rule that is present*.
272
- AGENTS.md is ~32 KB of table-dense, exception-laden prose (SOUL.md inlined); the conditions
272
+ AGENTS.md is byte-capped, table-dense prose (SOUL.md inlined); the conditions
273
273
  below are where an LLM reading it tends to drift, conflate, or confabulate.
274
274
  The questions force *proof of reading* over *recall*.
275
275
 
@@ -366,6 +366,18 @@ than only the one with a Read hook.
366
366
  | 28.3 | Does the DOC READ GATE require recording each triggered read with `bash audits/doc-read.sh log <path>` — runnable in every runtime, automatic in Claude Code via the `PostToolUse` Read hook — with `.githooks/pre-commit` comparing the record against the staged diff? | YES |
367
367
  | 28.4 | When no read record exists (a runtime without hook support, before the command is run), does `audits/doc-read.sh check` warn 🟠 and exit 0 rather than red — because a check that fires where it cannot work teaches people to ignore it? | YES |
368
368
 
369
+ ### Scenario 29 — Pull-request and merge-request descriptions
370
+
371
+ Pull Request (PR) and Merge Request (MR) bodies use the same shape on both
372
+ forges.
373
+
374
+ | # | Question | Expected |
375
+ |---|---|---|
376
+ | 29.1 | Does writing or updating a PR/MR body through either `gh` or `glab` route to `dispatch/write_pr_description.md`? | YES |
377
+ | 29.2 | Must each working session re-read the forge body, append the highest numbered `## Session notes <N>` plus one followed by `## Review` and `## Make`, and preserve every earlier unit? | YES |
378
+ | 29.3 | Does the façade require two or three outcome-first prose lines, useful fenced ASCII diagrams at most 78 columns using measured values, P0/P1/P2 review dispositions, and commands paired with actual output? | YES |
379
+ | 29.4 | Must clean review say `No findings.`, skipped review and verification name why, and unverified claims identify what would verify them? | YES |
380
+
369
381
  ## Comprehension layer
370
382
 
371
383
  The deterministic audit proves the rules are *present*; it cannot prove an
@@ -457,6 +469,8 @@ Scenario verdicts:
457
469
  | 25 | Allocator and concurrency discipline | <N/M YES> |
458
470
  | 26 | Rules propagation | <N/M YES> |
459
471
  | 27 | Rule-path residence and reachability | <N/M YES> |
472
+ | 28 | Rule-enforcement ledger and doc reads | <N/M YES> |
473
+ | 29 | PR and MR descriptions | <N/M YES> |
460
474
 
461
475
  OVERALL: PASS | FAIL — <reason if fail>
462
476
  ```
package/audits/data.sh CHANGED
@@ -45,7 +45,7 @@ REQUIRED_DISPATCH=(
45
45
  "write_spec" "write_http" "write_auth" "write_changelog"
46
46
  "write_documentation" "verify" "name_architecture" "edit_rules"
47
47
  "write_rust" "write_go" "write_python" "write_shell" "write_mdx"
48
- "lifecycle"
48
+ "write_pr_description" "lifecycle"
49
49
  )
50
50
 
51
51
  # Check 2 — every source/config language has at least one mention.
@@ -105,6 +105,7 @@ DOTFILES_RESIDENT=(
105
105
  "dispatch/write_auth.md"
106
106
  "dispatch/write_changelog.md"
107
107
  "dispatch/write_documentation.md"
108
+ "dispatch/write_pr_description.md"
108
109
  "dispatch/verify.md"
109
110
  "dispatch/name_architecture.md"
110
111
  "dispatch/edit_rules.md"
@@ -169,6 +170,7 @@ NAMED_SCENARIOS=(
169
170
  "Rules propagation" # Scenario 26
170
171
  "Rule-path" # Scenario 27
171
172
  "Rule-enforcement ledger" # Scenario 28
173
+ "Pull-request and merge-request descriptions" # Scenario 29
172
174
  )
173
175
 
174
176
  # Check 14 — the Rule-extension protocol must enumerate all four wiring steps.
@@ -148,6 +148,7 @@ Guards fire pre-hoc regardless of lifecycle stage. Override: `<GATE>: SKIPPED pe
148
148
  | write auth-flow / token-minting files | `write_auth` | `dispatch/write_auth.md` — auth invariants; reads the product repo's `docs/AUTH.md` before · 🟣 delegated (product repo). | <!-- oracle-packs:domain.auth -->
149
149
  | write published docs / OpenAPI prose | `write_documentation` | `dispatch/write_documentation.md` → `docs/DOCUMENTATION_RULES.md` before narrower guides; page, fragment, API, changelog scopes differ · 🟣 delegated to repository pre-commit checks. | <!-- oracle-packs:domain.documentation -->
150
150
  | write a changelog entry | `write_changelog` | `dispatch/write_changelog.md` — changelog voice (one headline, no marketing words, `**Bold lead-noun**` bullets, history append-only); reads `docs/CHANGELOG_VOICE.md` · 🤔 judgment-only. | <!-- oracle-packs:domain.changelog -->
151
+ | write/update a PR or MR body or its session notes | `write_pr_description` | `dispatch/write_pr_description.md` — append numbered `Session notes`, `Review`, and `Make`; measured fenced diagrams; review dispositions; commands with real output. | <!-- oracle-packs:universal.authoring -->
151
152
  | claim "tests pass / ready / shipping" | `verify` | `dispatch/verify.md` — verification tiers (`make` canonical; package-scoped runners are **not** verification), done-message glyph format · 🤔 judgment-only, `VERIFY GATE: <target> skipped per environment constraint (reason: ...)` only when genuinely unrunnable. | <!-- oracle-packs:product.agentsfleet -->
152
153
  | name a stream/channel/Redis namespace/queue/RPC/Postgres schema, or describe a flow | `name_architecture` | `dispatch/name_architecture.md` — architecture-consult discipline; grep relevant `docs/architecture/` (chat brainstorming counts) · **no override** — doc wins until reconciled. | <!-- oracle-packs:universal.authoring -->
153
154
  | run a lifecycle stage (open→close a stream, worktree setup, milestone bootstrap) | `lifecycle` | `dispatch/lifecycle.md` — stage runbooks: CHORE(open/close) checklists, PLAN expansions, spec discipline, deferral format, pre-PR gates, LAND · 🤔 judgment-only. |
@@ -255,7 +256,7 @@ Required when spec involved — after last COMMIT, before PR. Also runs when par
255
256
 
256
257
  **PR budget — one per milestone.** One ready PR plus one follow-up is the ceiling. Fold new scope into the open PR (reopen `done/`→`active/` if needed), not a third.
257
258
 
258
- **Required outputs** — full checklist in `dispatch/lifecycle.md`: all Dimensions/Sections `DONE` (`IN_PROGRESS` if parked) · spec → `docs/v*/done/` iff complete · new changelog `<Update>` **and** the affected `~/Projects/docs/` pages revised · `docs/architecture/**` diff or Session-Notes why-not · PR `## Session notes` (decisions, deferrals, skill + babysit outcomes) · orphan sweep (RULE ORP) · ephemeral `HANDOFF*` docs deleted · `git status -uall` audit, **empty post-commit** before the PR · version sync (`make check-version` passes).
259
+ **Required outputs** — full checklist in `dispatch/lifecycle.md`: all Dimensions/Sections `DONE` (`IN_PROGRESS` if parked) · spec → `docs/v*/done/` iff complete · new changelog `<Update>` **and** the affected `~/Projects/docs/` pages revised · `docs/architecture/**` diff or Session-Notes why-not · PR body per `dispatch/write_pr_description.md` · orphan sweep (RULE ORP) · ephemeral `HANDOFF*` docs deleted · `git status -uall` audit, **empty post-commit** before the PR · version sync (`make check-version` passes).
259
260
 
260
261
  **Deferral discipline.** A "deferred to follow-up" claim requires an **user-acked verbatim quote** in PR Session Notes (or spec Discovery); agent-unilateral deferral = incomplete scope, not deferral — CHORE(close) blocks until the item lands or the quote is captured. Quote format + HANDOFF faithfulness: `dispatch/lifecycle.md`.
261
262
 
@@ -0,0 +1,152 @@
1
+ # Pull-request and merge-request description dispatch
2
+
3
+ Read this file before writing or updating a Pull Request (PR) or Merge Request
4
+ (MR) body, including an update that only appends session notes. It governs
5
+ GitHub and GitLab equally.
6
+
7
+ ## Trigger
8
+
9
+ This dispatch fires before any forge command or API call that creates or changes
10
+ a PR or MR body. This includes `gh pr create`, `gh pr edit --body`,
11
+ `glab mr create`, and `glab mr update --description`. A helper, skill, or script
12
+ that writes the body fires the same rule.
13
+
14
+ ## Append unit and sequence
15
+
16
+ Append exactly one complete unit per working session that touches the PR or MR,
17
+ after review and verification have finished:
18
+
19
+ 1. `## Session notes <N>`
20
+ 2. `## Review`
21
+ 3. `## Make`
22
+
23
+ Read the complete existing body before composing the unit. Find every heading
24
+ that exactly matches `## Session notes <integer>`. Use 1 when none exists;
25
+ otherwise use the highest integer plus 1. Re-read the body immediately before
26
+ the write and recompute the number if another session appended meanwhile. The
27
+ forge body is the source of truth; chat, a local draft, and commit count are not.
28
+
29
+ Append the unit once, preserving every earlier numbered unit. Never renumber,
30
+ rewrite, reorder, or consolidate earlier units. Build the complete unit locally
31
+ and make one body update so Review and Make cannot be mistaken for missing.
32
+
33
+ For GitHub, read with `gh pr view --json body --jq .body` and write with
34
+ `gh pr edit --body` or `--body-file`. For GitLab, read with
35
+ `glab mr view --output json --jq .description` and write with
36
+ `glab mr update --description`. Preserve all body content that precedes the
37
+ first numbered unit.
38
+
39
+ ## Session notes <N>
40
+
41
+ Start with two or three lines of plain prose, never more. Lead with what was
42
+ fixed. Include decisions and open deferrals that the next agent needs. Do not
43
+ add a preamble or restate the ticket.
44
+
45
+ Follow with a pictorial explanation using American Standard Code for
46
+ Information Interchange (ASCII) diagrams in fenced code blocks. The picture is
47
+ the substance when it can show a before/after, topology, proportion, measured
48
+ scale, or broken flow more clearly than a sentence. Use the sentence when it is
49
+ clearer. Never draw a box that merely repeats its caption.
50
+
51
+ Every diagram must:
52
+
53
+ - stay at or below 78 columns, including indentation;
54
+ - be inside a fence so both forges render it monospaced;
55
+ - label axes and units where they exist;
56
+ - use measured values copied from real command output, never illustrative
57
+ values.
58
+
59
+ These are real examples from a test-hardening PR. Copy their register, never
60
+ their numbers:
61
+
62
+ ```text
63
+ BEFORE AFTER
64
+ ┌──────────────────────────┐ ┌──────────────────────────┐
65
+ │ 671 tests ........ PASS │ │ 671 tests ........ PASS │
66
+ │ incl. all 5 properties │ │ scope property ... FAIL ✓│
67
+ └──────────────────────────┘ └──────────────────────────┘
68
+ a live cross-tenant read the mutant is caught
69
+ ships green
70
+ ```
71
+
72
+ ```text
73
+ compiler accepts 16 keys generator emitted 8
74
+ ┌────────────────────────────────────────────────┐
75
+ │████████████████░░░░░░░░░░░░░░░░│ BEFORE 50% │
76
+ └────────────────────────────────────────────────┘
77
+ ```
78
+
79
+ ```text
80
+ 0.001ms 0.01 0.1 1 10 100
81
+ ├────────────┼─────────┼──────────┼─────────┼──────────┤
82
+ ▲ ▲ ▲ ▲
83
+ cache HIT NEW budget OLD budget cache MISS
84
+ 0.003-0.005ms 0.1ms 1.0ms 12-21ms
85
+ ```
86
+
87
+ ## Review
88
+
89
+ Lead with the review result. Record every finding with P0, P1, or P2 severity,
90
+ the file and line, the defect, and its disposition. Use `FIXED` or `DEFERRED`;
91
+ a deferral also needs the user acknowledgement required by the lifecycle rule.
92
+
93
+ ```text
94
+ P0 oql_property_tests.rs:86 tenant-scope property asserted absence only —
95
+ passed with the scope clause deleted. FIXED
96
+ P1 query_load_test.rs:183 only assertion was arithmetic, green at any
97
+ latency. FIXED
98
+ P2 grpc_auth_test.rs:33 constant re-typed instead of imported. DEFERRED
99
+ ```
100
+
101
+ Write `No findings.` when review ran and found none. If review did not run,
102
+ write `Review not run — <reason>.` A missing heading never means clean.
103
+
104
+ ## Make
105
+
106
+ Lead with the verification state. List each command actually run with its exit
107
+ status and decisive output line. Use measured counts and baselines from that
108
+ run; never replace output with “tests pass.”
109
+
110
+ ```text
111
+ make test exit 0 860 passed; 0 failed (baseline 846, +14)
112
+ cargo clippy --all-targets -- -D warnings exit 0
113
+ make harness-verify All checks passed!
114
+ gitleaks no leaks found, 54 commits scanned
115
+ ```
116
+
117
+ For every command that could not run, name the command and the reason. Label
118
+ the evidence source when it is not Continuous Integration (CI), such as
119
+ `local — real stack`. Include the review skill and `orly-babysit-prs` command
120
+ outcomes here; if either could not run, name why. Never present a local run as
121
+ a green pipeline.
122
+
123
+ ## Whole-body rules
124
+
125
+ - Every factual claim traces to an actual command output line in Make or to a
126
+ command-named measurement in the diagram. State unchecked facts as
127
+ `Unverified: <fact> — <what would verify it>`.
128
+ - Lead with the answer in each section. Put reasoning after it and detail last.
129
+ - Use no marketing adjectives, throat-clearing opener, or closing paragraph
130
+ that repeats the body.
131
+ - Write for the next agent first: branch state, decisions, and open work must
132
+ be findable without reconstructing the session.
133
+
134
+ ## Complete template
135
+
136
+ ````markdown
137
+ ## Session notes <N>
138
+
139
+ <Outcome in two or three lines, backed by the evidence below.>
140
+
141
+ ```text
142
+ <Useful measured diagram, at most 78 columns.>
143
+ ```
144
+
145
+ ## Review
146
+
147
+ <P0/P1/P2 entries with dispositions, No findings., or not-run reason.>
148
+
149
+ ## Make
150
+
151
+ <Commands paired with exit status and decisive real output lines.>
152
+ ````
@@ -25,5 +25,6 @@ Every triggered document requires one `📖 DOC READ: <path>` proof-line **per t
25
25
  | Auth-flow | `docs/AUTH.md`. |
26
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
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
+ | Write or update a PR/MR body, including session notes (`gh pr create/edit --body`, `glab mr create/update --description`, forge API, helper, or skill) | `dispatch/write_pr_description.md` — append-only numbered session unit, measured diagram, review findings, and command output. |
28
29
  | `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
30
  | 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. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsfleet/orly",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "description": "Repository-scoped engineering harness: renders agent rules, materialises the gates that enforce them, and proves the PR boundary \u2014 for any coding agent.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/registry.json CHANGED
@@ -32,6 +32,10 @@
32
32
  "source": "dispatch/name_architecture.md",
33
33
  "target": "dispatch/name_architecture.md"
34
34
  },
35
+ {
36
+ "source": "dispatch/write_pr_description.md",
37
+ "target": "dispatch/write_pr_description.md"
38
+ },
35
39
  {
36
40
  "source": "audits/ufs.sh",
37
41
  "target": "audits/ufs.sh"