@agentsfleet/orly 0.10.8 → 0.10.10

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.
@@ -8,7 +8,7 @@ fills it; the audit checks structural consistency. None proves design quality.
8
8
 
9
9
  | Stage | Required content |
10
10
  |---|---|
11
- | Authoring | Goal, scope, existing references, decisions and prerequisites, Dimensions with test mappings, failures, interfaces, and acceptance checks |
11
+ | Authoring | Goal, scope, verified source references, enforcement mechanisms and failure assumptions, decisions and acyclic prerequisites, Dimensions with test mappings, failures, interfaces, and acceptance checks |
12
12
  | CHORE(open) | Active status, branch, full comparison revision, baseline measurement pending |
13
13
  | PLAN | Implementer's comprehension handshake; resolved scope and decisions needed by the next Section |
14
14
  | Before Pull Request | Declared unit/integration baseline counts, comparison revision, and evidence reference |
@@ -47,6 +47,18 @@ are tested, and the acceptance checks prove the goal. A structural pass does not
47
47
  mean the feature is implemented. Use `manual` for a human proof; record its
48
48
  procedure, required person, and durable evidence without inventing sign-off.
49
49
 
50
+ Apply docs/TEMPLATE.md's Implementation readiness review to the relevant surfaces.
51
+ Pin versions, constraints, privileges and ordering when changing them could
52
+ invalidate a proof; omit routine coding recipes. Verify actual client/server
53
+ behavior and distinguish source inspection from runtime evidence.
54
+ For state replacement, name the authority, commit/release boundary, retry rules,
55
+ expiry/deletion behavior and fresh/populated upgrade path. Read the real migrator
56
+ and deployment release command before calling an image rollback a safe abort.
57
+ Budget the complete request path against an identified comparable reference.
58
+ Record direct user decisions separately from reviewer suggestions; a platform
59
+ risk needs an explicit disposition, not inferred acceptance. Attack the amended
60
+ spec for counterexamples and stale requirements before reporting readiness.
61
+
50
62
  Use `{{fill:description}}` for authoring slots. Delete them and all `tpl:`
51
63
  guidance before staging. Runtime parameters such as `/items/{id}` are allowed
52
64
  when the spec defines them. Lifecycle-owned values use explicit pending text,
package/docs/TEMPLATE.md CHANGED
@@ -19,26 +19,46 @@ Three markup classes appear below the divider. The gate tells them apart mechani
19
19
 
20
20
  Everything else — headings, table skeletons, the standard rubric rows — is kept and filled. The result: the executing agent reads **100% instance content, zero template noise**, and the 320-line budget buys signal, not boilerplate.
21
21
 
22
- ## What a spec pins — and refuses to pin
22
+ ## What a spec pins
23
23
 
24
- A milestone spec is a **goal rulebook** the executing agent plans and ships from *without playing 20-questions with the author*. It pins **intent + invariants + tests + pointers**; the agent has agency on everything else. It must NOT pin implementation detail that rots within a sprint: allocator/capacity choices, library versions, line-by-line code, exact Structured Query Language (SQL) Data Definition Language (DDL), import statements — the agent derives those from the repository.
24
+ A milestone spec is a **goal rulebook** the executing agent plans and ships from without repeated architecture questions. It pins **intent, invariants, enforcement mechanisms, tests and source pointers**. Leave routine variable names, import statements and code layout to repository conventions.
25
25
 
26
- > **Pseudocode litmus.** If the spec names a version (`postcard 1.1`), a variable (`var ctx = …`), or a DDL clause (`CREATE TABLE … DEFAULT 'foo'`), it's pseudocode — it will be wrong within a sprint. Replace with *"use the project's existing X"* + a pointer to where X lives.
26
+ Pin details when changing them could invalidate a proof: client/server versions and feature support, identity scope, uniqueness and null semantics, privilege boundaries, transaction/release ordering, failure behavior and measured resource budgets. Record the supporting source revision and which proofs a version/configuration change invalidates. The manifest remains the dependency source of truth; a compatibility claim must identify the manifest it checked.
27
+
28
+ > **Mechanism litmus.** Could an implementer follow this sentence and still violate the invariant? “Preserve single use” is incomplete without the state authority, guarded transition, commit-before-release boundary and failover assumption. Name those; omit a line-by-line implementation. A bounded prototype may choose a performance parameter, but an unchosen security mitigation is not implementation-ready.
27
29
 
28
30
  ## Anti-patterns (reject on sight)
29
31
 
30
32
  | # | Anti-pattern | Do instead |
31
33
  |---|---|---|
32
- | 1 | Code blocks inside section bodies | Describe WHAT the slice delivers; pin precise behaviour as a Test. Prose code drifts; tests don't. |
34
+ | 1 | Implementation listings inside section bodies | State the mechanism and behavioral proof. Keep code to necessary interface examples, reproducible evidence commands or a referenced diagnostic. |
33
35
  | 2 | Listing every variable name | Point at an existing implementation to mirror; names match local style. |
34
- | 3 | SQL DDL line-by-line | Table shape + constraints in prose; the agent conforms to existing migrations. |
35
- | 4 | Pinning library versions | *"Use the existing Redis client"* + import pointer; the package manifest is the source of truth. |
36
- | 5 | Step-by-step ordering ("Step 1… Step 2…") | **Sections** (value slices); the agent sequences within. |
36
+ | 3 | SQL DDL line-by-line | Pin identity, null/deletion semantics, atomic effects and grants; use new migrations according to the repository's current migration policy. |
37
+ | 4 | Assuming a client supports a server feature | Verify both sides at named revisions; pin the compatibility baseline and required reruns, including managed-service differences. |
38
+ | 5 | Incidental coding recipes or circular Section dependencies | Declare an acyclic prerequisite order; explicitly pin commit/release, migration and deployment ordering when correctness depends on it. |
37
39
  | 6 | Test code in the spec | Name tests + assert behaviour in prose; the agent writes them in project style. |
38
40
  | 7 | One rubric row per Dimension, or pasted evidence walls | 5–12 outcome rows; Graded = ✅/❌ + one decisive output line. The Test Specification is the per-Dimension ledger. |
39
41
  | 8 | Template guidance surviving in the filled spec | Delete every `tpl:` comment; the executor reads instance content only. |
40
42
 
41
- Slipped into one? The fix is usually **point at a file** (read-first pointer) or **delete the detail** (the agent figures it out).
43
+ Use source pointers to avoid duplicating code, but do not delegate a missing safety mechanism to the implementer's imagination.
44
+
45
+ ## Implementation readiness review
46
+
47
+ Before finalizing a spec, attack the proposed design using the applicable rows below. Put the resulting requirements in the existing Sections, Failure Modes, Invariants, Tests, Files Changed and Discovery; do not copy this whole table into every spec or create another scoring surface. Small changes need only the relevant checks.
48
+
49
+ | Surface | What the author must resolve |
50
+ |---|---|
51
+ | Real execution path | Trace actual producers, readers, side effects, backgrounds and cleanup. Separate an implemented caller from a comment, fixture or proposed feature; verify critical claims regardless of who wrote the review. |
52
+ | Safety and authority | Name one authority per invariant, the guarded state change, commit/release point and retry behavior. Attack lost replies, concurrent calls, owner failover and snapshot rollback separately; an acknowledgment is not automatically durable failover proof. Preserve intentional idempotent response retries. |
53
+ | Identity and history | State identity scope across tenants/streams, ordering and cursor tie-breaks, nulls, deletion and expiry. Trace all conflict writers and downstream consumers such as billing enforcement. Separate pre-existing defects from new risks; name irrecoverable history and a bounded disposition instead of an impossible backfill. |
54
+ | Schema and privileges | Follow the current shipped-migration policy. For populated changes, cover fresh bootstrap, incremental upgrade, interrupted rerun and old/new build compatibility. Test successful operations under the actual role, including SELECT needed by UPDATE, as well as forbidden writes. |
55
+ | Client, server and platform | Check pinned client routing/reconnect/push behavior against the server and managed service. Probe advertised nodes, TLS, required commands and real access-control-list grants. Local source inspection and successful seed connection are not managed-service evidence. |
56
+ | Deployment and recovery | Identify the actual deployment graph, secret staging, writer fence, restart/autostart paths, import authorization and empty/nonempty deploy shape. Prove pre-mutation refusal, abort/forward recovery and later ordinary deploys; inventory ephemeral auth and provider deliveries during the fence too. |
57
+ | Performance and scope | Budget the whole request path: transaction/commit rate, fan-out, sequential round trips, connection pools, write-ahead log, memory, backlog/drain and cost. Prefer the existing layout unless measurements require partitioning, batching or another subsystem. Name each comparison reference and prove workload/resource equivalence; distinguish planning inputs from measured thresholds. |
58
+ | Evidence and proof tier | Bind raw output to revision, parameters, resources and run identity; include lockfile/resolved production dependency closure for bench-only baselines. Distinguish inspected, proposed, NOT RUN and observed results. Unit stubs do not prove deployments; local tests do not prove Cloud. |
59
+ | Decisions and prerequisites | Record agent defaults, measured outputs and required user decisions separately. Attribute only real quotes and explicit overrides; do not infer risk acceptance from reviewer advice. Name the first executable slice and the boundary each unresolved prerequisite blocks. |
60
+
61
+ After editing, run a separate adversarial pass: search for stale/superseded requirements and circular dependencies; try to violate each critical invariant while obeying the text. Report remaining blockers by boundary (start, dependent integration, load or rollout), with a named resolving action. Do not promise that document checks prove runtime readiness.
42
62
 
43
63
  ## Hierarchy & terminology
44
64
 
@@ -108,11 +128,11 @@ SPEC AUTHORING RULES (load-bearing — the one comment that survives):
108
128
  **Provenance:** human-written | LLM-drafted ({{fill:model}}, {{fill:date}}) | agent-generated (pre-spec, {{fill:source doc}})
109
129
  **Canonical architecture:** `docs/architecture/{{fill:relevant-doc}}.md` §{{fill:N}}
110
130
 
111
- <!-- tpl: Provenance is load-bearing — the implementing agent calibrates trust by
112
- who wrote the spec: LLM-drafted gets extra cross-checking against the codebase;
113
- human-written assumes the author read the relevant code. Canonical architecture:
114
- the docs/architecture/ directory is the source of truth (Architecture Consult &
115
- Update Gate); greenfield → point at the doc that defines the shape. -->
131
+ <!-- tpl: Provenance records origin, not proof. Cross-check correctness-critical
132
+ claims against the actual caller, schema and pinned dependencies regardless of
133
+ author. Distinguish source-verified behavior, proposed mechanisms and observed
134
+ runtime results. Canonical architecture: docs/architecture/ owns the detailed
135
+ mechanism; keep spec defaults and acceptance tests consistent with it. -->
116
136
 
117
137
  ---
118
138
 
@@ -159,7 +179,11 @@ orphan sweeps, and review effort; per AGENTS.md the executing agent may only
159
179
  edit files in this table without explicit override. List FILES and ROLES —
160
180
  never line numbers or function names (they drift). Teardown/rename/flip specs
161
181
  open with a blast-radius grep first: git grep -rn -w '<token>' from repo root,
162
- no path filter (dispatch/write_spec.md, Authoring discipline). -->
182
+ no path filter (dispatch/write_spec.md, Authoring discipline). Include all real
183
+ writers/readers, schema registration, role grants, recovery tools, fixtures,
184
+ deployment/secret references and protocol docs affected by the chosen mechanism.
185
+ Distinguish source references from files to edit; do not schedule edits to
186
+ frozen migration history. Expand planned file scopes before implementation. -->
163
187
 
164
188
  ## Applicable Rules
165
189
 
@@ -225,16 +249,20 @@ defined in docs/architecture/{{fill:doc}}.md." -->
225
249
  <!-- tpl: State prerequisites and who resolves each decision: agent choice,
226
250
  measured preparation output, or required human decision. A preparation Section
227
251
  may establish budgets or fixtures needed by later Sections; name its completion
228
- condition. Each Section: WHAT one slice delivers and WHY (not how); numbered
229
- Dimensions map 1:1 to Tests and get marked DONE in the same commit as their
230
- code. The agent picks each Implementation default unless it has evidence to
231
- deviate. Good: "§3 — Replay idempotency. Receiver dedupes on the delivery id.
232
- Implementation default: 24h dedupe window matching the upstream retry window;
233
- storage is a Redis key with a Time To Live (TTL) — the agent picks the key
234
- shape from existing dedupe patterns. Dimension 3.1 → test_dedupes_within_window;
235
- 3.2 → test_evicts_after_ttl." Bad: "§3 — Use redis.SET(\"webhook:dedupe:\"+id,
236
- \"1\",\"NX\",\"EX\",86400) and check the return." — pseudocode; the agent reads
237
- the existing dedupe pattern and writes the call. -->
252
+ condition and what missing evidence blocks; prerequisites must be acyclic.
253
+ Each Section names the delivered behavior, required mechanism and proof, without
254
+ coding recipes. For prototypes, name setup, fault, pass/fail evidence and the
255
+ selected safe design or bounded decision rule before dependent integration.
256
+ Do not leave a security invariant as "prototype, then find a mitigation".
257
+ Numbered Dimensions map 1:1 to Tests and get marked DONE with their code.
258
+ The agent follows each Implementation default unless evidence requires an
259
+ amended design. Good: "§3 — Replay-safe admission. Uniqueness covers provider,
260
+ tenant and delivery identity; acceptance and dispatch intent commit together
261
+ before acknowledgment. Retention covers the provider retry window and unfinished
262
+ work. Dimensions prove concurrent retries and crash recovery; storage follows
263
+ the canonical outbox design." Bad: "Set a dedupe key, then append" without an
264
+ atomicity/recovery rule, or a line-by-line Redis/SQL recipe. The agent writes
265
+ the calls; the spec must already establish why a crash cannot lose acceptance. -->
238
266
 
239
267
  ## Interfaces
240
268
 
@@ -256,15 +284,21 @@ implementation. -->
256
284
  <!-- tpl: Every failure path the agent must handle; each row → a negative/
257
285
  integration test in the Test Specification. Cover at minimum: timeout,
258
286
  malformed input, auth failure, network blip, race, replay, exceeded quota,
259
- dependency unavailable. -->
287
+ dependency unavailable where applicable. For stateful work, distinguish timeout
288
+ from rollback, acknowledgment from durable recovery, and automatic failover
289
+ from operator restore. State which protected response or side effect remains
290
+ closed on uncertainty; name recovery instead of promising to resolve it later. -->
260
291
 
261
292
  ## Invariants
262
293
 
263
294
  1. {{fill:Invariant}} — {{fill:how it's enforced}}
264
295
 
265
296
  <!-- tpl: Each MUST be enforceable by code (compiler, lint, comptime assertion,
266
- runtime check) — NOT by review discipline. If a human can violate it silently,
267
- it's not an invariant. None → "N/A — no invariants." -->
297
+ runtime check) — NOT by review discipline. Name the authority, enforcement
298
+ mechanism and failure assumptions; database-backed does not itself prove safe
299
+ replica promotion. Test the shortest counterexample across the commit/release
300
+ boundary. An operator procedure is an operational prerequisite, not an invisible
301
+ runtime guard. None → "N/A — no invariants." -->
268
302
 
269
303
  ## Metrics & Observability
270
304
 
@@ -302,7 +336,12 @@ real HTTP request / rendered UI); a unit test is not a substitute. Also
302
336
  include regression rows (pre-existing behaviour that must not change — "N/A —
303
337
  greenfield" if none) and idempotency/replay rows (any retry semantics).
304
338
  Human acceptance uses tier manual, with its procedure, required person, and
305
- durable evidence. An agent cannot manufacture human sign-off.
339
+ durable evidence. An agent cannot manufacture human sign-off. Label stubbed
340
+ workflow decisions as unit proofs, local multi-node behavior as integration,
341
+ and actual deploy/managed-failover results at their operational boundary.
342
+ For state replacement, include concurrency, ambiguous commit, expiry/deletion,
343
+ identity collisions and fresh/populated upgrade where relevant. N/A applies
344
+ only to demonstrably unnecessary assertions, never an unrun base behavior.
306
345
  Non-self-evident input shape → point at a fixture
307
346
  (samples/fixtures/m{{fill:N}}-fixtures/{{fill:name}}.json); don't inline JSON. Hard-to-
308
347
  describe behaviour in prose ⇒ the Goal is fuzzy — fix the Goal, not this
@@ -419,11 +458,14 @@ platform constants (docs/architecture/direction.md). -->
419
458
 
420
459
  ## Discovery (consult log)
421
460
 
422
- - **Consults** — Architecture / Legacy-Design / gate-flag triage: the question asked + Indy's decision.
461
+ - **Consults** — Architecture / Legacy-Design / gate-flag triage: source/revision, question, actual decision and provenance. Separate direct quotes, confirmed decisions, reviewer suggestions and agent choices; never manufacture authorization.
423
462
  - **Metrics review** — events added, extra events found during `/review`, analytics/funnel playbook update or the explicit no-change reason.
424
463
  - **Skill-chain outcomes** — `/orly-write-unit-test`, `/review`, `orly-babysit-prs` results (order per `AGENTS.md` CHORE(close); iteration counts, findings dispositioned).
425
464
  - **Deferrals** — every "deferred to follow-up" needs an **Indy-acked verbatim quote** here, format `> Indy (YYYY-MM-DD HH:MM): "<quote>" — context: <which item, why>`. An agent-unilateral deferral is **incomplete scope, not deferral**, and blocks CHORE(close) until the item lands or the quote is captured.
426
465
 
427
- <!-- tpl: Empty at creation (keep the four bullet headers). This is the spec's
428
- running record — where deferrals and skill outcomes are proven as the work
429
- proceeds. -->
466
+ <!-- tpl: Keep the four bullet headers. At authoring, record consultations,
467
+ source findings and user decisions already supplied; leave future skill/runtime
468
+ outcomes pending and all Graded cells empty. A confirmed planning input is not a
469
+ measured service-level objective; a proposed risk exception is not approval.
470
+ Record superseded requirements explicitly and update canonical docs/tests so old
471
+ alternatives cannot be mistaken for simultaneous requirements. -->
@@ -12,7 +12,7 @@ page carries only what is specific to this repository.
12
12
  | lint | `make lint-all` | Boundary. Rust rides `lint-rustd` (rustfmt + Clippy, warnings are errors); script self-tests ride `lint-scripts`. |
13
13
  | unit | `make test-unit-all` | Boundary. The cargo workspace plus every TypeScript package coverage gate. |
14
14
  | version | `make check-version` | Boundary. `VERSION` against `build.zig.zon`, `cli/package.json` and both `rustd/Cargo.toml` sites. |
15
- | integration | `make test-integration-rustd` | Boundary. Live Postgres and Redis via docker compose, schemas reset per run. `orly gate pr` skips it on a branch carrying no code. |
15
+ | integration | `make test-integration-rustd` | Boundary. Live Postgres and Dragonfly via docker compose, schemas reset per run. `orly gate pr` skips it on a branch carrying no code. |
16
16
 
17
17
  These are the commands `.oracle/orly.json` declares. The commit hook runs
18
18
  conformance; `orly gate pr` runs every verification row.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsfleet/orly",
3
- "version": "0.10.8",
3
+ "version": "0.10.10",
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",