@agentsfleet/orly 0.10.14 → 0.12.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.
- package/.githooks/pre-push +2 -1
- package/AGENTS.md +21 -31
- package/README.md +94 -28
- package/SOUL.md +13 -23
- package/audits/agents-md.md +67 -57
- package/audits/deinit-pairs.sh +13 -18
- package/audits/design-tokens.sh +9 -23
- package/audits/doc-read.sh +10 -33
- package/audits/doc-reads.ts +41 -0
- package/audits/error-codes.sh +18 -25
- package/audits/logging-rust.awk +145 -0
- package/audits/logging.sh +10 -166
- package/audits/msid-ui.sh +45 -18
- package/audits/rule-ledger-lib.sh +9 -6
- package/audits/rust-error.sh +20 -15
- package/audits/scope.sh +88 -0
- package/audits/spec-template.sh +2 -2
- package/audits/spec-template.ts +1 -1
- package/audits/sql-mod.sh +11 -14
- package/audits/ufs-strings.awk +164 -0
- package/audits/ufs.sh +10 -188
- package/core/operating-model.md +8 -8
- package/dispatch/edit_rules.md +8 -6
- package/dispatch/lib.sh +41 -26
- package/dispatch/lifecycle.md +12 -5
- package/dispatch/name_architecture.md +8 -3
- package/dispatch/verify.md +1 -1
- package/dispatch/write_any.md +10 -3
- package/dispatch/write_changelog.md +7 -4
- package/dispatch/write_go.md +1 -1
- package/dispatch/write_http.md +5 -7
- package/dispatch/write_python.md +1 -1
- package/dispatch/write_rust.md +17 -1
- package/dispatch/write_shell.md +1 -1
- package/dispatch/write_spec.md +3 -1
- package/dispatch/write_sql.md +28 -6
- package/dispatch/write_ts_adhere_bun.md +11 -0
- package/dispatch/write_zig.md +53 -21
- package/docs/CHANGELOG.md +10 -0
- package/docs/CHANGELOG_VOICE.md +11 -2
- package/docs/EXECUTE_DOC_READS.md +10 -10
- package/docs/HARNESS_VERIFY_OUTPUT.md +6 -3
- package/docs/JUDGMENTS.md +156 -0
- package/docs/LIFECYCLE_PATTERNS.md +26 -16
- package/docs/LOGGING_STANDARD.md +39 -19
- package/docs/ORLY_ARCHITECTURE.md +77 -6
- package/docs/RELEASE_TEMPLATE.md +21 -5
- package/docs/REST_API_DESIGN_GUIDELINES.md +86 -21
- package/docs/RULE_ENFORCEMENT.md +6 -6
- package/docs/SCHEMA_CONVENTIONS.md +24 -3
- package/docs/TEMPLATE.md +4 -4
- package/docs/VERIFY_TIERS.md +2 -2
- package/docs/greptile-learnings/RULES.md +81 -26
- package/llms.txt +46 -34
- package/package.json +6 -1
- package/packs/language/go/rules.md +1 -1
- package/packs/language/python/rules.md +1 -1
- package/packs/language/rust/rules.md +17 -1
- package/packs/language/shell/rules.md +1 -1
- package/registry.json +22 -7
- package/schemas/profile.schema.json +48 -5
- package/skills/orly-babysit-prs/SKILL.md +87 -34
- package/skills/orly-spec-new/SKILL.md +19 -6
- package/skills/orly-write-integration-test/SKILL.md +4 -4
- package/skills/orly-write-unit-test/SKILL.md +10 -1
- package/src/cli.test.ts +2 -2
- package/src/cli.ts +19 -75
- package/src/cli_help.ts +69 -0
- package/src/command_limits.ts +20 -0
- package/src/command_process.test.ts +109 -0
- package/src/command_process.ts +88 -0
- package/src/command_runner.test.ts +88 -0
- package/src/command_runner.ts +33 -0
- package/src/comprehension_cache.test.ts +123 -0
- package/src/config.test.ts +5 -4
- package/src/config.ts +26 -164
- package/src/config_discovery.ts +159 -0
- package/src/config_validation.test.ts +56 -0
- package/src/config_validation.ts +25 -0
- package/src/criteria.test.ts +1 -1
- package/src/criteria.ts +10 -26
- package/src/criteria_spec.ts +12 -20
- package/src/criteria_support.ts +2 -19
- package/src/doc_reads.test.ts +42 -0
- package/src/doc_rules.ts +2 -2
- package/src/evaluation_resources.test.ts +64 -0
- package/src/execution/config.ts +22 -0
- package/src/execution/plan.test.ts +65 -0
- package/src/execution/plan.ts +51 -0
- package/src/gates.ts +9 -6
- package/src/gates_spec.test.ts +52 -6
- package/src/gates_test_support.ts +9 -7
- package/src/install.test.ts +38 -222
- package/src/install.ts +117 -308
- package/src/install_loaders.test.ts +203 -0
- package/src/install_nested.test.ts +2 -2
- package/src/install_packs.test.ts +66 -6
- package/src/installation/hooks.ts +63 -0
- package/src/installation/lock.test.ts +97 -0
- package/src/installation/lock.ts +56 -0
- package/src/installation/migration.test.ts +212 -0
- package/src/installation/migration.ts +65 -0
- package/src/installation/plan.ts +96 -0
- package/src/installation/transaction.ts +126 -0
- package/src/installation_preservation.test.ts +48 -0
- package/src/judgments/advice.test.ts +38 -0
- package/src/judgments/advice.ts +32 -0
- package/src/judgments/command.integration.test.ts +47 -0
- package/src/judgments/command.ts +90 -0
- package/src/judgments/constants.ts +55 -0
- package/src/judgments/evidence.test.ts +48 -0
- package/src/judgments/evidence.ts +34 -0
- package/src/judgments/files.test.ts +62 -0
- package/src/judgments/files.ts +73 -0
- package/src/judgments/questions.test.ts +19 -0
- package/src/judgments/questions.ts +85 -0
- package/src/judgments/replay.test.ts +43 -0
- package/src/judgments/replay.ts +66 -0
- package/src/judgments/runner.integration.test.ts +165 -0
- package/src/judgments/runner.ts +97 -0
- package/src/judgments/scan.test.ts +19 -0
- package/src/judgments/scan.ts +40 -0
- package/src/judgments/syntax.test.ts +115 -0
- package/src/judgments/syntax.ts +71 -0
- package/src/judgments/syntax_worker.ts +70 -0
- package/src/judgments/test_support.ts +60 -0
- package/src/judgments/transport.integration.test.ts +63 -0
- package/src/judgments/transport.ts +35 -0
- package/src/judgments/types.test.ts +43 -0
- package/src/judgments/types.ts +66 -0
- package/src/judgments/wire.test.ts +48 -0
- package/src/judgments/wire.ts +40 -0
- package/src/loaders.test.ts +13 -16
- package/src/loaders.ts +28 -10
- package/src/model.test.ts +20 -3
- package/src/model.ts +7 -18
- package/src/pack_hygiene.test.ts +42 -1
- package/src/pack_hygiene.ts +18 -8
- package/src/references.ts +15 -7
- package/src/release_inventory.test.ts +80 -0
- package/src/render.test.ts +1 -1
- package/src/render.ts +3 -8
- package/src/required_scanner.test.ts +36 -0
- package/src/review_poll.test.ts +158 -0
- package/src/scanner_scope.test.ts +202 -0
- package/src/setup.test.ts +9 -6
- package/src/spec_baseline.test.ts +1 -1
- package/src/spec_completion.test.ts +74 -0
- package/src/spec_obligations.ts +64 -0
- package/src/spec_rehearsal.test.ts +182 -0
- package/src/spec_template_io.test.ts +11 -9
- package/src/surfaces.test.ts +2 -0
- package/src/surfaces.ts +1 -1
- package/src/validation.ts +7 -4
- package/src/verify.test.ts +18 -2
- package/src/verify.ts +7 -3
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Schema Conventions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## Repository policy
|
|
4
|
+
|
|
5
|
+
Read the repository's schema sources, migration registration and deployment
|
|
6
|
+
policy before changing its database. Preserve shipped migrations and live data;
|
|
7
|
+
destructive changes need the owner's approval for the specific change.
|
|
8
|
+
Never infer a disposable database from a version threshold in another product.
|
|
9
|
+
|
|
10
|
+
Use the repository's naming, identity and timestamp conventions consistently.
|
|
11
|
+
Qualify table names, grant only the operations each runtime role needs, and test
|
|
12
|
+
with the real schema through shared fixture helpers.
|
|
13
|
+
Keep migration registration and position assertions synchronized with each edit.
|
|
14
|
+
|
|
15
|
+
<!-- oracle-packs:start product.agentsfleet -->
|
|
16
|
+
Canonical reference for `agentsfleet` database schema patterns. All new tables **must** follow these conventions. Existing tables are brought into compliance when rebuilt.
|
|
4
17
|
|
|
5
18
|
## Migration Model
|
|
6
19
|
|
|
7
20
|
**Teardown-rebuild is in force for the M154 rebuild (owner decision, Indy, Jul 31, 2026).** The development database is being dropped and re-created from empty while production is undeployed, so slots `001`–`046` are **retired wholesale** and the schema is re-authored by dependency layer. During this rebuild the frozen-slot rule below does not apply, and `ALTER`/`DROP` statements are forbidden rather than required — a change belongs in the base statement it would have patched. This is the posture RULE SCH already specifies for `VERSION < 0.30.0`; the Jul 22 additive model was the deviation.
|
|
8
21
|
|
|
9
|
-
**Additive migrations resume
|
|
22
|
+
**Additive migrations resume at `VERSION >= 0.30.0`, as RULE SCH specifies.**
|
|
23
|
+
Completing the rebuild alone does not change the version boundary.
|
|
24
|
+
Every subsequent schema change is a new numbered migration file; shipped slots
|
|
25
|
+
are frozen history. Migrations are tracked incrementally through
|
|
26
|
+
`agentsfleetd doctor --schema-gate`; use `IF NOT EXISTS` where appropriate for
|
|
27
|
+
fresh bootstrap and an already provisioned database.
|
|
10
28
|
|
|
11
29
|
Destructive changes (`DROP TABLE`, `DROP COLUMN`, type rewrites) require an explicit owner decision per change — additive is the default an agent may author alone.
|
|
12
30
|
|
|
@@ -17,7 +35,9 @@ Destructive changes (`DROP TABLE`, `DROP COLUMN`, type rewrites) require an expl
|
|
|
17
35
|
- Each SQL file must be **≤100 lines** and **single-concern** (one table, one logical group, or one additive change).
|
|
18
36
|
- Files are numbered sequentially: `001_core_foundation.sql`, `002_core_workflow.sql`, etc. New migrations append the next number; shipped numbers are never reused or slid.
|
|
19
37
|
- Every SQL file must be registered in `schema/embed.zig` (compile-time embed) and `rustd/crates/afd_db/src/migration.rs` (migration version array).
|
|
20
|
-
-
|
|
38
|
+
- Below `0.30.0`, remove obsolete slots and their registrations completely;
|
|
39
|
+
no-op markers are forbidden. At and above `0.30.0`, preserve shipped slots and
|
|
40
|
+
apply changes through new migrations.
|
|
21
41
|
|
|
22
42
|
## SQL Qualification
|
|
23
43
|
|
|
@@ -91,3 +111,4 @@ Every table must have:
|
|
|
91
111
|
|
|
92
112
|
- **Always** use `std.crypto.random` (via `allocUuidV7` in `id_format.zig`).
|
|
93
113
|
- **Never** use custom RNG implementations or `std.rand`.
|
|
114
|
+
<!-- oracle-packs:end -->
|
package/docs/TEMPLATE.md
CHANGED
|
@@ -353,14 +353,14 @@ table. -->
|
|
|
353
353
|
|---|--------------------------------|---------------------|----------|----------|-----------------|
|
|
354
354
|
| R1 | {{fill:outcome the user can observe}} (§1) | `{{fill:command}}` | {{fill:exit 0 / substring / 0 matches}} | P0 | |
|
|
355
355
|
| R2 | Diff stays inside Files Changed | `git diff --name-only origin/main...HEAD` | 0 paths missing from the Files Changed table | P0 | |
|
|
356
|
-
| S1 | Conform gates green | `{{fill:conform command from .
|
|
357
|
-
| S2 | Unit tests pass | `{{fill:verify.unit command from .
|
|
356
|
+
| S1 | Conform gates green | `{{fill:conform command from .orly/orly.json, verbatim}}` | exit 0 | P0 | |
|
|
357
|
+
| S2 | Unit tests pass | `{{fill:verify.unit command from .orly/orly.json, verbatim}}` | exit 0 | P0 | |
|
|
358
358
|
| S3 | Slow tier green (code-carrying branch) | `{{fill:one row per remaining declared verify.* command, verbatim}}` | exit 0 | P0 | |
|
|
359
359
|
| S4 | No secrets | `gitleaks detect` | exit 0 | P0 | |
|
|
360
360
|
| S5 | No oversize source file | `git diff --name-only origin/main...HEAD \| grep -v '\.md$' \| xargs wc -l 2>/dev/null \| awk '$1>350 && $2!="total"'` | no output | P0 | |
|
|
361
361
|
| S6 | Orphan sweep | Dead Code Sweep greps | 0 matches | P0 | |
|
|
362
362
|
|
|
363
|
-
**Command source rule:** copy every declared `conform` and `verify.*` invocation from `.
|
|
363
|
+
**Command source rule:** copy every declared `conform` and `verify.*` invocation from `.orly/orly.json` into a Verify cell, verbatim, with an Expected value. Include conditional suites; the final gate decides applicability from the actual branch diff. Additional spec-specific commands, secret scans, and named manual checks are allowed. Missing configuration must be completed before authoring. See `dispatch/lifecycle.md` for command timing; baseline metadata is pending at opening and measured before the Pull Request.
|
|
364
364
|
|
|
365
365
|
**Grading protocol (VERIFY):** run each spec-specific Verify command verbatim; Graded = ✅/❌ + one decisive output line. Repository-command rows point to the final `orly gate pr` results in Pull Request Session Notes, so recording those results does not require another code commit and suite run. **Ship gate:** every required check must pass before the Pull Request is ready; missing evidence or any ❌ returns to EXECUTE. A P1 ❌ requires an Indy-acked deferral quote in Discovery. A P0 may also be **MOVED** — see below.
|
|
366
366
|
|
|
@@ -378,7 +378,7 @@ A MOVED row is never rendered ✅. The criterion has not been met; it has change
|
|
|
378
378
|
|
|
379
379
|
<!-- tpl: The single scoring surface — no other scoreboard. 5–12 rows after
|
|
380
380
|
pruning: one per Section outcome, failure class, or hygiene gate — never one
|
|
381
|
-
per Dimension (that ledger is the Test Specification). Repository suite commands come verbatim from `.
|
|
381
|
+
per Dimension (that ledger is the Test Specification). Repository suite commands come verbatim from `.orly/orly.json`; expand S3
|
|
382
382
|
for every remaining declared lane. Additional spec-specific checks stay explicit. Expected litmus: every Expected is
|
|
383
383
|
mechanically checkable — an exit code, a literal substring, or a match count;
|
|
384
384
|
can't write it that way → the criterion is fuzzy — fix the criterion, not the
|
package/docs/VERIFY_TIERS.md
CHANGED
|
@@ -9,12 +9,12 @@ page carries only what is specific to this repository.
|
|
|
9
9
|
| Tier | Command | When |
|
|
10
10
|
|---|---|---|
|
|
11
11
|
| conform | `make harness-verify` | Section lane and boundary, after EXECUTE and before the rest. Any 🔴 returns to EXECUTE. |
|
|
12
|
-
| lint | `make lint-all` | Boundary. Rust rides `lint-rustd` (rustfmt + Clippy, warnings are errors)
|
|
12
|
+
| lint | `make lint-all` | Boundary. Rust rides `lint-rustd` (rustfmt + Clippy, warnings are errors). |
|
|
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
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
|
-
These are the commands `.
|
|
17
|
+
These are the commands `.orly/orly.json` declares. The commit hook runs
|
|
18
18
|
conformance; `orly gate pr` runs every verification row.
|
|
19
19
|
|
|
20
20
|
The authoritative timing and gate ownership live in
|
|
@@ -131,7 +131,9 @@ every code a dispatch `.sh` emits resolves to exactly one row here.
|
|
|
131
131
|
|
|
132
132
|
## RULE XCC — Cross-compile before commit (Zig)
|
|
133
133
|
|
|
134
|
-
**Rule:**
|
|
134
|
+
**Rule:** Compile the repository's declared platform matrix and applicable test
|
|
135
|
+
graphs before its Zig verification boundary.
|
|
136
|
+
For `agentsfleet`, compile both `x86_64-linux` and `aarch64-linux`. <!-- oracle-packs:product.agentsfleet -->
|
|
135
137
|
**Why:** macOS APIs (client.open, etc.) compile locally but don't exist on Linux; CI cache hides it in dev.
|
|
136
138
|
**Tags:** zig, ci
|
|
137
139
|
**Example:** client.open compiled on macOS, absent on Linux — 3 rounds to fix. v0.4.0 bare -gnu in CI.
|
|
@@ -139,7 +141,10 @@ every code a dispatch `.sh` emits resolves to exactly one row here.
|
|
|
139
141
|
<!-- oracle-packs:start language.zig -->
|
|
140
142
|
## RULE FLS — Flush all layers — drain all results
|
|
141
143
|
|
|
142
|
-
**Rule:**
|
|
144
|
+
**Rule:** Flush every transport layer and drain query results on every exit.
|
|
145
|
+
Use the repository's query wrapper when it owns draining; otherwise release
|
|
146
|
+
results explicitly without discarding a failure silently.
|
|
147
|
+
For `agentsfleet`, use `PgQuery` as `dispatch/write_zig.md` specifies. <!-- oracle-packs:product.agentsfleet -->
|
|
143
148
|
**Why:** TLS flush only encrypts into buffer; undrained slices dangle; ::text prevents binary/text divergence across OS.
|
|
144
149
|
**Tags:** zig, tls, postgres
|
|
145
150
|
**Example:** Zig — missing socket flush → infinite hang. UUID read as binary on Linux CI, text on macOS. PgQuery wraps drain into deinit.
|
|
@@ -196,8 +201,14 @@ every code a dispatch `.sh` emits resolves to exactly one row here.
|
|
|
196
201
|
|
|
197
202
|
## RULE MIG — Migration index assertions track position
|
|
198
203
|
|
|
199
|
-
**Rule:** When inserting, splitting
|
|
200
|
-
|
|
204
|
+
**Rule:** When inserting, splitting or removing migrations, update registration
|
|
205
|
+
and every position-based assertion under the repository's live-data policy.
|
|
206
|
+
<!-- oracle-packs:start product.agentsfleet -->
|
|
207
|
+
For `agentsfleet`, RULE SCH requires complete removal below `0.30.0`, including
|
|
208
|
+
embed and migration registrations; `SELECT 1;` markers are forbidden.
|
|
209
|
+
At and above that boundary, preserve shipped slots and add forward migrations.
|
|
210
|
+
<!-- oracle-packs:end -->
|
|
211
|
+
**Why:** A stale position points at the wrong SQL file without a compile error.
|
|
201
212
|
**Tags:** zig, sql
|
|
202
213
|
**Example:** migrations[7] pointed at wrong file after a split. migrations[14]/[15] asserted dropped table names in version marker files.
|
|
203
214
|
|
|
@@ -390,20 +401,34 @@ a rename of the first would have disabled the account purge with no failing test
|
|
|
390
401
|
**Tags:** zig
|
|
391
402
|
**Example:** HMAC version "v0" derived by slicing "v0=" prefix — fixed with explicit hmac_version field.
|
|
392
403
|
|
|
393
|
-
## RULE SCH —
|
|
404
|
+
## RULE SCH — Schema removal follows the repository's live-data policy
|
|
405
|
+
|
|
406
|
+
**Rule:** Preserve shipped migrations and live data under the repository's own
|
|
407
|
+
deployment policy. A destructive change requires the owner's specific approval;
|
|
408
|
+
another product's version number never authorizes a rebuild here.
|
|
394
409
|
|
|
395
|
-
|
|
410
|
+
<!-- oracle-packs:start product.agentsfleet -->
|
|
411
|
+
|
|
412
|
+
**Rule:** While `cat VERSION` < 0.30.0 (teardown-rebuild era), removing tables MUST be a full teardown: (1) delete the SQL file (`rm schema/NNN_foo.sql`), (2) remove the `@embedFile` constant from `schema/embed.zig`, (3) remove the migration array entry from `rustd/crates/afd_db/src/migration.rs` and update its registration tests. Never write ALTER TABLE, DROP TABLE, or `SELECT 1;` placeholders. Never keep version-marker files. Migration slot numbers are not sacred pre-v0.30 — the DB is wiped on every rebuild, and gaps in numbering are fine. From VERSION >= 0.30.0 the datastore is live production data, so every removal or reshape is a numbered ALTER/DROP migration and the teardown path is closed. **Compare the version field by field, never as a string:** `0.29.0` is under the anchor, `0.30.0` is not, and a lexical compare puts `0.30.0` below `0.9.0` — the anchor moved off a major-number boundary precisely so the minor field decides.
|
|
396
413
|
**Why:** Markers accumulate dead code and still force CI to splitter-parse them. Below 0.30.0 the development database is dropped and re-created from empty, so there is no production data to protect and full removal leaves no false grep hits or stale migration slots. At 0.30.0 that stops being true: the deployment holds data nobody can re-create, which is what makes an in-place migration the only safe shape from then on.
|
|
397
414
|
**Tags:** sql, process
|
|
398
415
|
**Example:** harness teardown — supersedes prior "replace with `SELECT 1;`" guidance. Under the old rule, comment-only markers broke CI (apostrophe in "slots" opened unterminated string in splitter); full deletion avoids the marker problem entirely.
|
|
399
416
|
|
|
400
|
-
|
|
417
|
+
<!-- oracle-packs:end -->
|
|
418
|
+
## RULE EP4 — Endpoint removal follows the declared client policy
|
|
419
|
+
|
|
420
|
+
**Rule:** Check the repository's deployed clients and deprecation policy before
|
|
421
|
+
removing an endpoint. State the client-visible result and test it; installing
|
|
422
|
+
a pack cannot establish that every caller can be changed together.
|
|
423
|
+
|
|
424
|
+
<!-- oracle-packs:start product.agentsfleet -->
|
|
401
425
|
|
|
402
426
|
**Rule:** While `cat VERSION` < 0.30.0 (teardown-rebuild era), removed endpoints MAY simply 404 — API drift is allowed because no deployed client is pinned to the route. Do NOT write 410 Gone stubs for pre-v0.30 removals; they are ceremony without value. From VERSION >= 0.30.0, intentionally removed endpoints MUST return HTTP 410 Gone with a named error code — 404 implies a routing error to monitors and clients, 410 signals permanent intentional removal.
|
|
403
427
|
**Why:** Below 0.30.0 this mirrors the schema teardown policy (RULE SCH) — we tear down DB + APIs freely because nobody downstream is pinned to them. From 0.30.0 the deployment is in production and 410 becomes load-bearing for client behavior and deprecation signals.
|
|
404
428
|
**Tags:** zig, api
|
|
405
429
|
**Example:** shipped /v1/runs/* + /v1/specs as 410 stubs before this rule was scoped. removed /v1/harness/* and /v1/agents/{id} as bare 404s under the teardown-era carve-out.
|
|
406
430
|
|
|
431
|
+
<!-- oracle-packs:end -->
|
|
407
432
|
## RULE FXS — Fixed-size scan buffers are security bypasses
|
|
408
433
|
|
|
409
434
|
**Rule:** Scan security-relevant input in overlapping chunks; never silently truncate at a fixed buffer size.
|
|
@@ -420,7 +445,10 @@ a rename of the first would have disabled the account purge with no failing test
|
|
|
420
445
|
|
|
421
446
|
## RULE OBS — Every observable state must have a log/event entry
|
|
422
447
|
|
|
423
|
-
**Rule:** Every branch that changes
|
|
448
|
+
**Rule:** Every branch that changes externally observable behavior emits a
|
|
449
|
+
structured event for operators, callers or downstream consumers.
|
|
450
|
+
Apply this across the repository's runtime source paths: handlers, middleware,
|
|
451
|
+
workers, commands, lifecycle code, retries and fallbacks.
|
|
424
452
|
|
|
425
453
|
**Why:** Silent state transitions are invisible in dashboards and incident response. The code can be 100% correct on the wire and 100% opaque to the operator at the same time. A dropped GitHub webhook the user can't explain, an `agentsfleet` command that exited 0 with no output, a worker that silently skipped a job — same root cause, same fix: log the branch.
|
|
426
454
|
|
|
@@ -436,30 +464,32 @@ a rename of the first would have disabled the account purge with no failing test
|
|
|
436
464
|
|
|
437
465
|
### Per-stack convention
|
|
438
466
|
|
|
439
|
-
#### Zig —
|
|
467
|
+
#### Zig — the repository's structured logger
|
|
440
468
|
|
|
441
469
|
Every Zig source file that emits any log MUST declare a file-scoped logger with a snake_case scope tag derived from the module's job:
|
|
442
470
|
|
|
443
471
|
```zig
|
|
444
|
-
const
|
|
472
|
+
const logging = @import("log");
|
|
473
|
+
const log = logging.scoped(.module_name);
|
|
445
474
|
```
|
|
446
475
|
|
|
447
476
|
Picking the scope name:
|
|
448
477
|
- The scope IS the module identity in operator-facing logs. Choose specifically (`.webhook_sig_lookup`, `.agent_event_loop`, `.firewall`, `.clerk_webhook`) rather than generically (`.agentsfleetd`, `.utils`).
|
|
449
478
|
- One scope per file is the default. Sibling files in the same package use the same scope only if they're a single logical module split across files for length-gate reasons.
|
|
450
|
-
-
|
|
479
|
+
- Read the repository's logger exports and existing scopes before choosing a new one. For `agentsfleet`, use the named `log` module's `logging.scoped` as `docs/LOGGING_STANDARD.md` §7 specifies.
|
|
451
480
|
|
|
452
|
-
|
|
481
|
+
Emit an event name and structured fields through that logger:
|
|
453
482
|
- **state** is a short snake_case noun phrase naming the branch — `parse_failed`, `dedup_replay`, `ignored_event`, `metering_debit`, `claim_skipped`. Operators grep on `<scope>.<state>`; make it unique and stable.
|
|
454
483
|
- **key=value** pairs carry correlation IDs needed to join with downstream traces. Always include `req_id` for request-scoped paths. Add `agent_id` / `workspace_id` / `tenant_id` / `delivery` / `reason` / `err` where relevant.
|
|
455
|
-
- Severity
|
|
484
|
+
- Severity and operation pairs follow `docs/LOGGING_STANDARD.md` §4, including `debug` for per-row and hot-poll events.
|
|
456
485
|
|
|
457
486
|
```zig
|
|
458
|
-
const
|
|
487
|
+
const logging = @import("log");
|
|
488
|
+
const log = logging.scoped(.http_webhook_github);
|
|
459
489
|
// ...
|
|
460
|
-
log.
|
|
461
|
-
log.warn("
|
|
462
|
-
log.err("
|
|
490
|
+
log.debug("github_webhook_ignored_event", .{ .agent_id = agent_id, .delivery = delivery, .kind = event });
|
|
491
|
+
log.warn("github_webhook_parse_failed", .{ .reason = @errorName(err) });
|
|
492
|
+
log.err("github_webhook_enqueue_failed", .{ .error_code = code, .reason = @errorName(err) });
|
|
463
493
|
```
|
|
464
494
|
|
|
465
495
|
#### JS CLI (`agentsfleet`) — structured stderr via `writeError` + diagnostic JSON in `--json` mode
|
|
@@ -593,12 +623,21 @@ This is intentionally manual — the structural diversity of "function body" acr
|
|
|
593
623
|
**Tags:** security, architecture, multi-tenancy, confused-deputy
|
|
594
624
|
**Example:** design review — original draft proposed SQLite on a persistent host volume; rejected because agent shell tools could read sibling agents' directories. Storage moved to a dedicated Postgres database with a scoped `memory_runtime` role. The rule generalizes: it applies to any future cross-tenant data (per-workspace caches, per-customer artifacts, per-agent workspaces).
|
|
595
625
|
|
|
596
|
-
## RULE WAUTH —
|
|
597
|
-
|
|
598
|
-
**Rule:**
|
|
626
|
+
## RULE WAUTH — Authenticate and authorize workspace access before data access
|
|
627
|
+
|
|
628
|
+
**Rule:** Every workspace-scoped operation authenticates the caller and proves
|
|
629
|
+
workspace ownership before reading or writing data. Use the repository's
|
|
630
|
+
canonical guard mechanism; mounted guards count only when the route declares
|
|
631
|
+
both checks and tests prove unauthenticated and wrong-workspace callers fail.
|
|
632
|
+
<!-- oracle-packs:start product.agentsfleet -->
|
|
633
|
+
The current `agentsfleet` route row and mount perform these checks, as
|
|
634
|
+
`docs/REST_API_DESIGN_GUIDELINES.md` §7–§8 specifies; handlers do not duplicate them.
|
|
635
|
+
The former Zig `common.authenticate` and `common.authorizeWorkspace` call shape
|
|
636
|
+
below records the original finding, not the current handler API.
|
|
637
|
+
<!-- oracle-packs:end -->
|
|
599
638
|
**Why:** External agents handlers discarded the principal with `_ = common.authenticate(...)`, so any authenticated workspace owner could enumerate, create, or delete agents in a different workspace just by substituting the workspace_id in the path. Caught by greptile on PR #205 (P0).
|
|
600
|
-
**Do:**
|
|
601
|
-
**Don't:**
|
|
639
|
+
**Do:** Test the served route's unauthenticated and wrong-workspace requests.
|
|
640
|
+
**Don't:** Discard the principal or rely on an unmounted guard.
|
|
602
641
|
**Tags:** zig, security, IDOR, auth
|
|
603
642
|
**Example:** Zig — external_agents.zig — all 3 handlers missing workspace check. Fixed PR #205.
|
|
604
643
|
|
|
@@ -650,7 +689,9 @@ return switch (resp) { .integer => |n| n == 1, else => false };
|
|
|
650
689
|
|
|
651
690
|
## RULE SGR — SQL migrations must include GRANT statements for all created tables
|
|
652
691
|
|
|
653
|
-
**Rule:** Every `CREATE TABLE` migration
|
|
692
|
+
**Rule:** Every `CREATE TABLE` migration grants exactly the operations its
|
|
693
|
+
runtime callers need to the repository's actual roles; identify those roles
|
|
694
|
+
from the connection configuration rather than another product's names.
|
|
654
695
|
**Why:** PostgreSQL denies all access by default. Without grants, every query against the table fails with `permission denied` in production. This is invisible at migration time and only fails at first runtime use.
|
|
655
696
|
**Do:** Follow every `CREATE TABLE` + indices block with grants mirroring the table's callers.
|
|
656
697
|
**Don't:** Ship a migration without grants on the assumption that a superuser connection is used in production.
|
|
@@ -841,13 +882,19 @@ const handleConfirm = useCallback(async () => {
|
|
|
841
882
|
|
|
842
883
|
## RULE ITF — Integration tests use real schema via `test_fixtures_<name>.zig`
|
|
843
884
|
|
|
844
|
-
**Rule:** An integration test
|
|
885
|
+
**Rule:** An integration test exercising a production table seeds the real
|
|
886
|
+
schema through shared repository fixture helpers and asserts against that table.
|
|
887
|
+
Never mock its shape with a session-local temporary table: the mock can hide
|
|
888
|
+
schema changes that the production query would reject.
|
|
845
889
|
**Why:** Every workspace-column migration in M11 broke TEMP-TABLE-based tests silently because the temp shape still matched the old column set. Real-schema fixtures fail loudly when a NOT NULL column is added, which is the correct failure mode. Fixtures also keep auth/scope UUIDs out of production source files so `src/http/**` stays free of test scaffolding.
|
|
846
|
-
**Do:**
|
|
890
|
+
**Do:** Name fixture helpers by behavior and keep them outside production modules.
|
|
891
|
+
Use the repository's actual language, registration and cleanup conventions.
|
|
892
|
+
<!-- oracle-packs:start product.agentsfleet -->
|
|
847
893
|
- One fixture module per test scope, named `src/db/test_fixtures_<scope>.zig` with a **semantic** scope name — e.g. `test_fixtures_prompt_events.zig`, `test_fixtures_http_auth.zig`, `test_fixtures_workspace_credit.zig`. Do **not** use milestone-numbered names (`test_fixtures_uc1.zig`, `test_fixtures_m18.zig`, etc.); those rot as milestones churn and the filename stops describing the scope. Aliases inside test files should also be semantic (`credit_fx`, `billing_fx`, `proposal_fx`), never `uc1`/`uc3`.
|
|
848
894
|
- Module exports: `TENANT_ID`/`WORKSPACE_ID` constants, `seed(conn)` / `seedXxx(conn, ...)`, and an idempotent `cleanup(conn)` that deletes in FK-safe order. Reference production seed helpers (`base.seedTenantById`, `base.seedWorkspaceWithTenant`, `base.seedWorkspaceWithCreator`) rather than re-rolling INSERT SQL.
|
|
849
895
|
- Tests: `cleanup(conn)` as both pre-seed reset and `defer` bookend, then `seed(conn)` and run assertions against schema-qualified table names (`core.workspaces`, `core.prompt_lifecycle_events`, …).
|
|
850
896
|
- Tables with append-only triggers: cleanup wraps DELETEs in `SET session_replication_role = 'replica'` / `origin` (superuser-only; test DB runs as superuser via docker-compose).
|
|
897
|
+
<!-- oracle-packs:end -->
|
|
851
898
|
**Don't:**
|
|
852
899
|
- `CREATE TEMP TABLE <real_table_name>` that shadows a real table. `rls_probe`-style probe tables with no production counterpart are fine; naming an existing table is not.
|
|
853
900
|
- Inline test-fixture constants (`GUARD_TENANT_ID`, `SCOPE_WS_PRIMARY`, …) or `cleanupXxxFixtures` helpers inside production source files. Move them to the fixture module.
|
|
@@ -939,7 +986,14 @@ const handleConfirm = useCallback(async () => {
|
|
|
939
986
|
**Tags:** cli, error-messages, ux, refactor
|
|
940
987
|
**Example:** Zig — pR #258. Greptile P1 finding `3145406909`: UZ-ZMB-008 hint still said `Run 'agentsfleet install <template>'` after the legacy positional form was removed in §1 of the same PR. Sweep also caught a stale `// agentsfleet up sends both files raw` comment in `config.zig` header. Fix in commit (this commit).
|
|
941
988
|
|
|
942
|
-
## RULE NLG — No
|
|
989
|
+
## RULE NLG — No speculative compatibility shims
|
|
990
|
+
|
|
991
|
+
**Rule:** Update the existing interface and its callers together when the
|
|
992
|
+
repository's deployment policy permits it. Do not add compatibility aliases
|
|
993
|
+
without an explicit owner decision naming the external caller and migration.
|
|
994
|
+
Never infer the absence of deployed clients from another product's version.
|
|
995
|
+
|
|
996
|
+
<!-- oracle-packs:start product.agentsfleet -->
|
|
943
997
|
|
|
944
998
|
**Rule:** Until `VERSION` reaches `0.30.0`, no deployment we owe compatibility to is running: the datastore is rebuilt from empty and every caller of every interface is in this tree. Every interface change therefore extends the existing surface in place — never via a `V2`-suffixed twin, parallel "legacy" path, `if (legacy_caller)` branch, command-line alias for an old verb or flag, or backward-compat fallback. When an RPC, route, struct, table, command, flag, or config key changes, edit the existing one and update every caller in the same commit. When a behavior is replaced, delete the old code path, do not leave it `orelse` reachable. The Schema Table Removal Guard's "teardown-rebuild era" framing applies to every interface, not just SQL. `0.30.0` is the release that ends it: from there the deployment is in production, a caller can be outside this tree, and a compatibility surface is a design decision with a migration behind it — proposed to the owner, never added as a hedge. Compare the version field by field, never as a string.
|
|
945
999
|
|
|
@@ -959,6 +1013,7 @@ const handleConfirm = useCallback(async () => {
|
|
|
959
1013
|
**Tags:** architecture, refactor, versioning, plan, execute
|
|
960
1014
|
**Example:** PLAN, Apr 29, 2026. The temptation to introduce `CreateExecutionV2` to avoid editing the existing RPC and its callers came up during spec audit — rejected because (a) the executor RPC has a single in-tree caller (the worker) and (b) the release that puts us in production had not shipped, so no external compatibility was owed. Rule generalizes the call: in-place extension is the only sanctioned path until VERSION crosses 0.30.0.
|
|
961
1015
|
|
|
1016
|
+
<!-- oracle-packs:end -->
|
|
962
1017
|
## RULE RTM — Route matchers segment-based, never substring-based
|
|
963
1018
|
|
|
964
1019
|
**Rule:** All HTTP path matchers (in projects with a custom dispatch layer) operate on a canonical `Path` view — a stack-allocated array of segments parsed once at the dispatch boundary. Matchers compare by **segment count + segment[i] equality**. Do not use `startsWith` / `endsWith` / `indexOf` against the raw path. Do not encode disambiguation as call-site ordering. Reservations of literal segments live as explicit `if (p.eq(i, RESERVED)) return null` predicates inside the matchers, so any two matchers in a family are mutually exclusive by structure.
|
package/llms.txt
CHANGED
|
@@ -10,7 +10,13 @@ ignored. Hosts supported: Claude Code, Codex, OpenCode, Amp.
|
|
|
10
10
|
|
|
11
11
|
Package: `@agentsfleet/orly` (npm)
|
|
12
12
|
Source: https://github.com/agentsfleet/orly
|
|
13
|
-
License: MIT
|
|
13
|
+
License: Massachusetts Institute of Technology (MIT)
|
|
14
|
+
|
|
15
|
+
This checkout prepares the unpublished 0.12.0 candidate. Published 0.11.0 already
|
|
16
|
+
contains the same runtime commands and `.orly/` layout. The `bunx` commands below
|
|
17
|
+
fetch the published package. Use the installed local tarball for candidate checks.
|
|
18
|
+
The comparison evaluator is parked for proposed 0.13 work; do not claim measured
|
|
19
|
+
judgment improvement or enable new questions from its unfinished results.
|
|
14
20
|
|
|
15
21
|
---
|
|
16
22
|
|
|
@@ -36,19 +42,17 @@ Run from the repository root. Execute these in order and stop at the first
|
|
|
36
42
|
non-zero exit.
|
|
37
43
|
|
|
38
44
|
```bash
|
|
39
|
-
# 1.
|
|
40
|
-
bun
|
|
41
|
-
|
|
42
|
-
# 2. preview, then initialize
|
|
43
|
-
orly init --dry-run
|
|
44
|
-
orly init
|
|
45
|
+
# 1. preview, then initialize through Bun's package runner
|
|
46
|
+
bunx --bun @agentsfleet/orly init --dry-run
|
|
47
|
+
bunx --bun @agentsfleet/orly init
|
|
45
48
|
|
|
46
49
|
# 3. complete any reported setup items, then check configuration and files
|
|
47
|
-
orly doctor
|
|
50
|
+
bunx --bun @agentsfleet/orly doctor
|
|
48
51
|
```
|
|
49
52
|
|
|
50
53
|
Then commit the result. Teammates receive the rules on clone.
|
|
51
|
-
|
|
54
|
+
Generated hooks invoke the package version pinned in `.orly/orly.json` through
|
|
55
|
+
`bunx`; they do not require a global executable.
|
|
52
56
|
|
|
53
57
|
IMPORTANT: git does not clone hooks. Each checkout must run `orly init` once.
|
|
54
58
|
If a human reports that gates are not firing, this is the first thing to check.
|
|
@@ -60,15 +64,15 @@ If a human reports that gates are not firing, this is the first thing to check.
|
|
|
60
64
|
| Path | Contents | Owner |
|
|
61
65
|
|---|---|---|
|
|
62
66
|
| `AGENTS.md` | your host auto-loads this | the user — never rewrite it |
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
+
| `.orly/AGENTS.md` | generated rules: safety, dispatch router, lifecycle | orly — rewritten on update |
|
|
68
|
+
| `.orly/dispatch/*.md` | one rule page per kind of work | orly |
|
|
69
|
+
| `.orly/audits/*.sh` | the deterministic gates | orly |
|
|
70
|
+
| `.orly/docs/*.md` | the standards those rules cite | orly |
|
|
67
71
|
| `.claude/skills/`, `.agents/skills/`, `.opencode/skills/` | skills materialised per host | orly |
|
|
68
|
-
| `.
|
|
69
|
-
| `.
|
|
72
|
+
| `.orly/hooks/` | pre-commit and pre-push, wired to pinned `orly gate` | orly |
|
|
73
|
+
| `.orly/orly.json` | packs, gate commands, install record | shared — edit the commands |
|
|
70
74
|
|
|
71
|
-
`orly init` seeds `.
|
|
75
|
+
`orly init` seeds `.orly/orly.json` with gate commands found in `Makefile` or
|
|
72
76
|
`package.json`. Read the repository's build files to complete missing commands;
|
|
73
77
|
ask only when the repository does not define a check. Do not invent commands.
|
|
74
78
|
Declare `conform` and at least one named `verify.*` command. Documentation
|
|
@@ -77,12 +81,19 @@ suites. `init` reports missing configuration; `doctor` rejects it.
|
|
|
77
81
|
|
|
78
82
|
---
|
|
79
83
|
|
|
84
|
+
For a 0.10.x consumer with repository-owned hooks, run `orly update --no-hooks`
|
|
85
|
+
using the intended installed version. Change repository callers from
|
|
86
|
+
`.oracle/orly.json` to `.orly/orly.json` and shared rule/audit paths to `.orly/`.
|
|
87
|
+
Keep repository-owned scripts and documents in place. Run `orly doctor` and the
|
|
88
|
+
declared checks before accepting the migration; doctor alone does not run checks.
|
|
89
|
+
Empty old directories may remain, but contain no tracked managed files.
|
|
90
|
+
|
|
80
91
|
## 4. Read order before you edit anything
|
|
81
92
|
|
|
82
93
|
1. `AGENTS.md` — the user's own rules. **These win on any conflict.**
|
|
83
|
-
2.
|
|
84
|
-
3. The
|
|
85
|
-
4. Any
|
|
94
|
+
2. `.orly/AGENTS.md` — the generated rules and the dispatch router.
|
|
95
|
+
3. The `.orly/dispatch/*.md` page that matches the kind of file you are about to edit.
|
|
96
|
+
4. Any `.orly/docs/*.md` standard those pages cite.
|
|
86
97
|
|
|
87
98
|
Re-read step 3 for each new file kind you touch in the same task.
|
|
88
99
|
|
|
@@ -94,7 +105,7 @@ The spec is a file on disk. Its directory is the status. Only the named stages
|
|
|
94
105
|
move it. `orly gate pr` reads where it ended up.
|
|
95
106
|
|
|
96
107
|
```
|
|
97
|
-
docs/v1/pending/ spec written, committed on
|
|
108
|
+
docs/v1/pending/ spec written, committed on the detected default branch
|
|
98
109
|
│
|
|
99
110
|
│ CHORE(open) branch cut, comparison revision recorded, baseline measurement pending
|
|
100
111
|
▼
|
|
@@ -107,7 +118,7 @@ docs/v1/done/ orly gate pr green → Pull Request opens
|
|
|
107
118
|
|
|
108
119
|
Rules for you:
|
|
109
120
|
|
|
110
|
-
-
|
|
121
|
+
- Invoke `orly-spec-new` before any code exists; it uses the canonical template body.
|
|
111
122
|
- Do not write code before `CHORE(open)` has committed.
|
|
112
123
|
- Do not skip a stage. The hooks run gates on every commit and push.
|
|
113
124
|
- A red gate returns you to EXECUTE. Fix the cause; do not retry unchanged.
|
|
@@ -122,9 +133,9 @@ Rules for you:
|
|
|
122
133
|
| same gate fails twice on the same cause | stop, report the gate name and output to the user |
|
|
123
134
|
| `orly init` refuses a file | orly did not write that file. Report it. Do **not** pass `--force` on your own initiative |
|
|
124
135
|
| hooks not firing | run `git config core.hooksPath` and confirm `orly init` was run in this checkout |
|
|
125
|
-
| gate command missing from `.
|
|
136
|
+
| gate command missing from `.orly/orly.json` | read the build files and declare the existing check; ask only if none exists |
|
|
126
137
|
| `orly gate pr` red and the failure is genuinely inapplicable | ask the user; only they authorise `orly override` |
|
|
127
|
-
| gstack `/review` unavailable |
|
|
138
|
+
| gstack `/review` unavailable | record the reason and time in Pull Request Session notes; rerun before merge |
|
|
128
139
|
|
|
129
140
|
Overrides are recorded as an empty commit that rides into the Pull Request:
|
|
130
141
|
|
|
@@ -141,11 +152,13 @@ never with a placeholder reason.
|
|
|
141
152
|
|
|
142
153
|
- Never rewrite `AGENTS.md`. orly adds one delimited pointer block; leave the
|
|
143
154
|
rest alone.
|
|
144
|
-
- Never edit or delete
|
|
155
|
+
- Never edit or delete repository or installed hook and audit scripts to evade a finding.
|
|
145
156
|
- Never pass `--force` or `--no-hooks` unless the user asks for it by name.
|
|
146
|
-
- Never disable a check in `.
|
|
157
|
+
- Never disable a check in `.orly/orly.json` to get green.
|
|
147
158
|
- When the user's `AGENTS.md` and orly's rules disagree, the user's file wins.
|
|
148
|
-
- A
|
|
159
|
+
- A preflight ownership refusal preserves owner bytes. An interrupted installation
|
|
160
|
+
can leave intended new files and a recovery journal; resume with the same package
|
|
161
|
+
version after resolving the reported conflict. Do not retry with bypass flags.
|
|
149
162
|
|
|
150
163
|
---
|
|
151
164
|
|
|
@@ -166,7 +179,7 @@ never with a placeholder reason.
|
|
|
166
179
|
|
|
167
180
|
## 9. Packs
|
|
168
181
|
|
|
169
|
-
|
|
182
|
+
Language and SQL packs are selected from file extensions in the user's source.
|
|
170
183
|
orly scans four directories deep and skips `node_modules`, `target`, `.venv`,
|
|
171
184
|
and other dependency trees.
|
|
172
185
|
|
|
@@ -179,9 +192,9 @@ Seven install in every repository: `universal.authoring`, `domain.http`,
|
|
|
179
192
|
`domain.auth`, `domain.documentation`, `domain.changelog`,
|
|
180
193
|
`workflow.specifications`, `workflow.skills`.
|
|
181
194
|
|
|
182
|
-
Three install only when `.
|
|
183
|
-
(editing orly's own rules), `product.agentsfleet` (
|
|
184
|
-
|
|
195
|
+
Three install only when `.orly/orly.json` names them: `workflow.governance`
|
|
196
|
+
(editing orly's own rules), `product.agentsfleet` (audits and docs for
|
|
197
|
+
`agentsfleet`), `persona.indy` (tone and address handles only, no files).
|
|
185
198
|
|
|
186
199
|
Skills provided by `workflow.skills`, per repository: `orly-spec-new`,
|
|
187
200
|
`orly-babysit-prs`, `orly-write-unit-test`, `orly-write-integration-test`.
|
|
@@ -203,10 +216,9 @@ make audit
|
|
|
203
216
|
|
|
204
217
|
- `make audit` is the bar: typecheck and unit tests, render determinism, and
|
|
205
218
|
gate fixtures (each gate proved against one passing and one failing case).
|
|
206
|
-
Runs in parallel
|
|
207
|
-
- Coverage floor is 90% lines. Below it, the workflow fails.
|
|
219
|
+
Runs in parallel and retains full command output.
|
|
208
220
|
- `make install-evals` runs real installs into throwaway repositories. Run on
|
|
209
|
-
demand; CI runs them on every
|
|
221
|
+
demand; Continuous Integration (CI) runs them on every Pull Request and release.
|
|
210
222
|
- Render orly's own rules with `bin/orly update --no-hooks`. The `--no-hooks`
|
|
211
223
|
flag is required here because this checkout hand-wrote its `.githooks/`.
|
|
212
224
|
- Release: merge to `main` with a new `package.json` version. That publishes,
|
|
@@ -220,7 +232,7 @@ After install, verify your own understanding by answering this from the
|
|
|
220
232
|
repository, without guessing:
|
|
221
233
|
|
|
222
234
|
```
|
|
223
|
-
Read
|
|
235
|
+
Read .orly/AGENTS.md. Name which of the last ten commits would have tripped a
|
|
224
236
|
gate, and the rule that caught each one.
|
|
225
237
|
```
|
|
226
238
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentsfleet/orly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
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",
|
|
@@ -60,5 +60,10 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/bun": "1.4.0",
|
|
62
62
|
"typescript": "7.0.2"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@babel/parser": "7.29.9",
|
|
66
|
+
"@babel/types": "7.29.8",
|
|
67
|
+
"zod": "4.6.5"
|
|
63
68
|
}
|
|
64
69
|
}
|
|
@@ -31,4 +31,4 @@ Both are carve-outs for what the *language* makes unfixable, not permission —
|
|
|
31
31
|
a flag name or a label spelled inline twice is still the rule.
|
|
32
32
|
|
|
33
33
|
The repository owns formatting, vet, lint, build, and test commands — it
|
|
34
|
-
declares them in `.
|
|
34
|
+
declares them in `.orly/orly.json`.
|
|
@@ -7,4 +7,4 @@ context managers. Validate data at parse boundaries and preserve specific
|
|
|
7
7
|
exception classes until the caller can decide how to respond.
|
|
8
8
|
|
|
9
9
|
The repository owns formatting, linting, type checking, and tests — it declares
|
|
10
|
-
them in `.
|
|
10
|
+
them in `.orly/orly.json`.
|
|
@@ -10,10 +10,26 @@ Test the feature combinations the repository actually builds. Concurrency work
|
|
|
10
10
|
needs a deterministic contention test, not only a happy-path asynchronous test.
|
|
11
11
|
|
|
12
12
|
The repository owns formatting, Clippy, build, test, security, and benchmark
|
|
13
|
-
commands — it declares them in `.
|
|
13
|
+
commands — it declares them in `.orly/orly.json`.
|
|
14
14
|
|
|
15
15
|
## Reference guideline (mandatory in review)
|
|
16
16
|
|
|
17
|
+
Before designing Rust modules, read the relevant implementation in Exonum,
|
|
18
|
+
Apache Arrow's Rust implementation, or the local `agentsfleet` Rust workspace.
|
|
19
|
+
Indy's checkouts are `~/Projects/oss/rs/exonum`,
|
|
20
|
+
`~/Projects/oss/rs/arrow-rs`, `~/Projects/agentsfleet/rustd/`, and
|
|
21
|
+
`~/Projects/oss/rs/builder/components/builder-core/`.
|
|
22
|
+
Use Exonum for state and API boundaries and Arrow for typed data and workspace
|
|
23
|
+
structure. Use `agentsfleet/rustd/crates/agentsfleetd/` specifically for errors
|
|
24
|
+
and the command-line interface (CLI); inspect its actual call sites before designing.
|
|
25
|
+
Use `afd_core::env::EnvSource` for injected process and test environments.
|
|
26
|
+
Builder's `ConfigFile` trait supplies prior art for composable file loading and
|
|
27
|
+
cause-preserving parsing. Read its call sites; retain current edition safety and
|
|
28
|
+
library logging rather than copying its older global environment mutation or logger.
|
|
29
|
+
Read only relevant modules and name the pattern applied or the reason to diverge.
|
|
30
|
+
These are read-only references; consumer changes require their own authorization.
|
|
31
|
+
Other machines locate the equivalent checkout before asking to clone one.
|
|
32
|
+
|
|
17
33
|
Microsoft's Pragmatic Rust Guidelines are this pack's depth — thorough,
|
|
18
34
|
agent-facing, and continuously maintained upstream. The local copy lives at
|
|
19
35
|
`~/Projects/oss/rust-guidelines/all.txt`; fetch it when absent:
|