@agentsfleet/orly 0.10.4 → 0.10.6
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 +5 -5
- package/README.md +26 -8
- package/audits/agents-md.md +7 -3
- package/audits/spec-template.sh +30 -113
- package/audits/spec-template.ts +193 -0
- package/core/operating-model.md +5 -5
- package/dispatch/lifecycle.md +98 -42
- package/dispatch/verify.md +30 -48
- package/dispatch/write_spec.md +56 -82
- package/docs/ORLY_ARCHITECTURE.md +13 -3
- package/docs/RULE_ENFORCEMENT.md +2 -2
- package/docs/TEMPLATE.md +93 -76
- package/docs/VERIFY_TIERS.md +20 -26
- package/llms.txt +17 -12
- package/package.json +1 -1
- package/registry.json +4 -0
- package/skills/orly-spec-new/SKILL.md +3 -1
- package/skills/orly-write-integration-test/SKILL.md +1 -1
- package/skills/orly-write-unit-test/SKILL.md +1 -1
- package/src/cli.ts +14 -16
- package/src/criteria.test.ts +47 -6
- package/src/criteria.ts +30 -49
- package/src/criteria_spec.ts +53 -6
- package/src/criteria_support.ts +5 -4
- package/src/gates.test.ts +2 -2
- package/src/gates_spec.test.ts +40 -1
- package/src/gates_test_support.ts +18 -4
- package/src/install.ts +16 -81
- package/src/render.test.ts +5 -7
- package/src/setup.test.ts +116 -0
- package/src/spec_baseline.test.ts +96 -0
- package/src/spec_template.test.ts +109 -0
- package/src/spec_template_io.test.ts +97 -0
- package/src/validation.ts +9 -0
package/dispatch/lifecycle.md
CHANGED
|
@@ -12,55 +12,108 @@ are entering, not the whole file.
|
|
|
12
12
|
|
|
13
13
|
## What runs at each stage
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
`.oracle/orly.json` commands and never invents one.
|
|
15
|
+
This is the authoritative sequence. Commands come from the repository's
|
|
16
|
+
`.oracle/orly.json`; the engine contains no product-specific build recipes.
|
|
18
17
|
|
|
19
|
-
| Stage | Runs |
|
|
18
|
+
| Stage | Runs | Owner |
|
|
20
19
|
|---|---|---|
|
|
21
|
-
| CHORE(open) | the
|
|
22
|
-
| PLAN |
|
|
23
|
-
| EXECUTE |
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
20
|
+
| CHORE(open) | Record the comparison commit and pending baseline; create the tree, carry owned changes, commit metadata | Agent; commit hook still runs |
|
|
21
|
+
| PLAN | Resolve references, scope, decisions, and proof mapping; no application build | Agent |
|
|
22
|
+
| EXECUTE | Read triggered rules; implement one Section and its tests | Agent |
|
|
23
|
+
| First Section verification | Hydrate only the touched surfaces; format, lint, and execute Section proofs | Agent |
|
|
24
|
+
| Later Section verification | Reuse the tree; repeat affected formatting, lint, and proof commands | Agent |
|
|
25
|
+
| COMMIT | Declared `conform` over staged changes | `orly gate work` in pre-commit |
|
|
26
|
+
| Push | Documentation check and declared non-test verification commands | `orly gate verify` in generated pre-push |
|
|
27
|
+
| Before PR | Measure the comparison revision's unit and integration lanes; review results and fix final-branch failures | Agent |
|
|
28
|
+
| CHORE(close) | Branch and spec criteria, exact upstream revision, every declared `verify.*` command | `orly gate pr` |
|
|
29
|
+
| LAND | Pull and clean up the merged stream | Agent after merge |
|
|
30
|
+
|
|
31
|
+
`verify.unit`, `verify.integration`, and `verify.memory` belong to the PR
|
|
32
|
+
boundary. Other `verify.*` commands also run at push and are checked again at
|
|
33
|
+
that independent boundary. Full suites run once per PR-gate invocation;
|
|
34
|
+
failures or later changes require a new invocation. No verification cache is
|
|
35
|
+
kept, and a custom hook cannot silently remove final verification.
|
|
36
|
+
`conform` remains the commit hook's responsibility because it may read the
|
|
37
|
+
index. A bare `orly gate` runs all groups and stops at the first red group.
|
|
38
|
+
|
|
39
|
+
Formatting and lint do not prove behavior. A Section is complete only when its
|
|
40
|
+
Dimensions have passing proofs. Use existing repository test lanes; if a lane
|
|
41
|
+
runs a whole workspace, describe it honestly and add a supported filter to that
|
|
42
|
+
recipe when narrower Section checks are needed. Boundary commands remain
|
|
43
|
+
unfiltered. Rust projects run `cargo fmt` in their Rust workspace, followed by
|
|
44
|
+
the declared lint wrapper covering Clippy and the shipping build configuration.
|
|
45
|
+
Other languages use their own declared formatter and lint commands.
|
|
39
46
|
|
|
40
47
|
## CHORE (open) — runbook
|
|
41
48
|
|
|
42
49
|
1. Spec `docs/v*/pending/` → `active/`; `Status: IN_PROGRESS`; `Branch:` set.
|
|
43
|
-
2. **Test Baseline** —
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
2. **Test Baseline** — record `**Baseline revision:** <full commit>` and
|
|
51
|
+
`**Test Baseline:** pending — measured before the Pull Request`. Run no
|
|
52
|
+
application suite at opening. Before the PR, obtain both declared baseline
|
|
53
|
+
lanes (`verify.unit` and `verify.integration`) for that exact revision from
|
|
54
|
+
matching successful run evidence or an isolated checkout of that revision.
|
|
55
|
+
Never assume the default checkout stayed at the comparison commit. Keep
|
|
56
|
+
baseline and final integration environments separate; neither may reset a
|
|
57
|
+
shared deployment. Record passed, failed, and skipped counts per lane in a
|
|
58
|
+
report, with commands, revision, and environment; put totals in the header
|
|
59
|
+
and the report path or run URL in `**Baseline evidence:**`.
|
|
60
|
+
A missing or failed baseline run is recorded honestly; fix failures in the
|
|
61
|
+
implementation branch and keep the historical result unchanged. Baseline
|
|
62
|
+
failures never permit final failures. Compare like-for-like lanes and report
|
|
63
|
+
added, removed, or changed test selections rather than inventing a delta.
|
|
64
|
+
`n/a — <reason>` is valid only when there is no code or no baseline lane.
|
|
65
|
+
The gate validates counts, revision ancestry, and the evidence reference;
|
|
66
|
+
the agent reviews the report's contents. Performance baselines required by
|
|
67
|
+
a spec remain due before the changes they measure.
|
|
68
|
+
3. Create the worktree and carry the base checkout's uncommitted work into it;
|
|
69
|
+
verify CWD is inside it (`pwd` + `git worktree list`).
|
|
49
70
|
4. Commit the four steps on the feature branch. No code until the commit lands.
|
|
50
71
|
|
|
72
|
+
**The base checkout's uncommitted work moves with the stream.** A worktree cut
|
|
73
|
+
from a dirty base strands that work on the default branch, where it is neither
|
|
74
|
+
committed, nor reviewed, nor in the tree the stream is about to gate — and the
|
|
75
|
+
next `git status` there reads as drift nobody owns. So step 3 moves it, before
|
|
76
|
+
any spec edit:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
git -C <base> status --porcelain -uall # nothing? the step is a no-op
|
|
80
|
+
git -C <base> stash push --include-untracked -m "chore(open): <branch>"
|
|
81
|
+
git -C <worktree> stash pop
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`git stash` is per-repository, not per-worktree, so the entry the base pushes is
|
|
85
|
+
the entry the worktree pops. **Move, never copy** — work left in both places is
|
|
86
|
+
committed twice and conflicts on the merge. Name what came across in the
|
|
87
|
+
CHORE(open) report; a carry-over nobody announced is indistinguishable from
|
|
88
|
+
scope that wandered in. A pop that conflicts KEEPS the stash: stop there and
|
|
89
|
+
resolve before step 4, because a half-applied carry-over is worse than a dirty
|
|
90
|
+
base. Work that does not belong to this stream is the one exception — leave it,
|
|
91
|
+
and say so.
|
|
92
|
+
|
|
51
93
|
<!-- oracle-packs:start product.agentsfleet -->
|
|
52
94
|
## Worktree recipe (agentsfleet)
|
|
53
95
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
96
|
+
```bash
|
|
97
|
+
cd ~/Projects/agentsfleet && git checkout main
|
|
98
|
+
git status --porcelain -uall # dirty? carry it over — the two stash lines below
|
|
99
|
+
git stash push --include-untracked -m "chore(open): feat/mNN-name"
|
|
100
|
+
git branch feat/mNN-name
|
|
101
|
+
git worktree add ../agentsfleet-mNN-name feat/mNN-name
|
|
102
|
+
cd ../agentsfleet-mNN-name && git stash pop
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Omit stash operations when the base is clean. Identify the saved stash entry
|
|
106
|
+
explicitly when other streams exist, restore its staged state, and remove only
|
|
107
|
+
that entry after successful restoration. Leave changes owned by another stream
|
|
108
|
+
in place and report them. No application installation or build runs here.
|
|
109
|
+
`git worktree add` may run the repository's cheap environment-link hook.
|
|
110
|
+
|
|
111
|
+
At first Section verification, install dependencies for the surfaces being
|
|
112
|
+
verified: root `bun install` for the JavaScript workspace; `cli/` has its own
|
|
113
|
+
install and build. Rust checks run from `rustd/` using `make lint-rustd` after
|
|
114
|
+
`cargo fmt`. The first compilation resolves Rust dependencies; later Sections
|
|
115
|
+
reuse the build artifacts. Missing environment links follow the repository's
|
|
116
|
+
provisioning instructions before a check that needs them.
|
|
64
117
|
|
|
65
118
|
**agentsfleet CHORE(close) paths:** the `<Update>` lands in
|
|
66
119
|
`~/Projects/docs/changelog.mdx` (template + version-bump matrix:
|
|
@@ -99,8 +152,9 @@ into a separate tree.
|
|
|
99
152
|
guesses `surfaces`.
|
|
100
153
|
First session in a repository whose config is still that seed:
|
|
101
154
|
1. Read the build files properly. Fill every `verify.*` the repository really
|
|
102
|
-
has — the
|
|
103
|
-
|
|
155
|
+
has — the gate ownership is fixed: `conform` at commit, non-test checks at
|
|
156
|
+
push, all `verify.*` at the PR boundary; only integration and memory
|
|
157
|
+
skip on branches with no code.
|
|
104
158
|
2. Set `surfaces.user` and `surfaces.docs` to real path prefixes, or the docs
|
|
105
159
|
gate can never fire and a user-visible change ships undocumented.
|
|
106
160
|
3. Add any opt-in pack the repository's own sources cannot imply
|
|
@@ -108,8 +162,10 @@ into a separate tree.
|
|
|
108
162
|
`orly update` so they materialise.
|
|
109
163
|
4. Commit it. Every teammate and every later session reads this file, and
|
|
110
164
|
`orly` never rewrites it — so an edit here is permanent.
|
|
111
|
-
|
|
112
|
-
|
|
165
|
+
Setup requires `conform` and at least one named `verify.*` command.
|
|
166
|
+
A documentation repository can declare `verify.docs` for its site and link
|
|
167
|
+
checks without application unit or integration suites. `init` reports
|
|
168
|
+
missing commands; `doctor` and the gates reject incomplete setup.
|
|
113
169
|
- **Priming:** (1) Human runs `playbooks/founding/01_bootstrap/001_playbook.md`.
|
|
114
170
|
(2) Agent runs `./playbooks/founding/02_preflight/00_gate.sh` (green before
|
|
115
171
|
next). (3) Agent runs `playbooks/founding/03_priming_infra/001_playbook.md`.
|
package/dispatch/verify.md
CHANGED
|
@@ -25,58 +25,40 @@ Only when a target is genuinely unrunnable (e.g. Docker missing for integration
|
|
|
25
25
|
tests). Surface the limitation in the done message — never dress a skip as "tests
|
|
26
26
|
pass".
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Repository commands are canonical
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
The commands in `.oracle/orly.json` define full verification. Use repository
|
|
31
|
+
Make targets where declared; a repository may also declare its native tools
|
|
32
|
+
directly. A narrower package run never substitutes for a declared full check.
|
|
33
|
+
Documentation repositories may use `verify.docs` for site and link checks;
|
|
34
|
+
application test suites are required only when the repository declares them.
|
|
33
35
|
|
|
34
36
|
## Two cadences, one boundary
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
the pre-push `orly gate verify` already graded. A bare `orly gate` chains all
|
|
61
|
-
three gates — use it on a branch whose earlier gates never ran.
|
|
62
|
-
|
|
63
|
-
| Target | When |
|
|
64
|
-
|---|---|
|
|
65
|
-
| `make harness-verify` | Section lane and boundary. The declared `conform` — the deterministic gate audit. |
|
|
66
|
-
| `make lint-all` | Boundary. The declared `verify.lint`. |
|
|
67
|
-
| `make test-unit-all` | Boundary. The declared `verify.unit` — the cargo workspace plus every package coverage gate. |
|
|
68
|
-
| `make check-version` | Boundary. The declared `verify.version`. |
|
|
69
|
-
| `make test-integration-rustd` | Boundary. The declared `verify.integration` — live Postgres and Redis; `orly gate pr` skips it on a branch carrying no code. |
|
|
70
|
-
| `make wire-fixtures` | The `/v1/runners` wire types changed. Regenerate, then review the diff — a changed fixture IS the wire change. |
|
|
71
|
-
| `make bench` (local) | Diff touches request-path code, allocator wiring, or startup/shutdown sequencing. |
|
|
72
|
-
| `API_BENCH_URL=https://api-dev.agentsfleet.net/healthz make bench` | After branch deploys to dev. |
|
|
73
|
-
| `/orly-write-integration-test` (skill) | With `/orly-write-unit-test` at VERIFY when the diff crosses module boundaries with real I/O; otherwise record `N/A — <reason>`. |
|
|
74
|
-
| Acceptance e2e (live tier) | Diff touches a surface the live/acceptance tier covers — relevant suites green, or their opt-in skip matrix recorded. |
|
|
75
|
-
|
|
76
|
-
The declared set in `.oracle/orly.json` is the source of truth for what exists,
|
|
77
|
-
and a lane listed there is a lane that runs at the boundary — including the slow
|
|
78
|
-
tier. A package-scoped runner (`cargo test -p afd_wire`, `bun run test` inside a
|
|
79
|
-
package) proves that package and never the repository, at either cadence.
|
|
38
|
+
The command ownership and chronological sequence live in
|
|
39
|
+
`dispatch/lifecycle.md` §What runs at each stage. Read that table before
|
|
40
|
+
verification; this page defines what counts as evidence.
|
|
41
|
+
|
|
42
|
+
- **Section proof:** format, lint, and run the tests covering the changed
|
|
43
|
+
Dimensions. Hydrate the required application dependencies at the first
|
|
44
|
+
Section verification, then reuse that worktree. Passing lint alone never
|
|
45
|
+
marks a behavior DONE.
|
|
46
|
+
- **Baseline:** before the Pull Request, measure the recorded comparison
|
|
47
|
+
revision's declared unit and integration lanes. Keep commands, counts, and
|
|
48
|
+
output in an evidence report. Compare equivalent selections; explain removed
|
|
49
|
+
tests. A historical failure never exempts the final branch.
|
|
50
|
+
- **Final verification:** `orly gate pr` runs every declared `verify.*` command
|
|
51
|
+
itself. It does not infer success from a pushed branch or an installed hook.
|
|
52
|
+
Capture full command output and the decisive counts, not only exit codes.
|
|
53
|
+
Custom hooks may run additional checks but cannot replace the final gate.
|
|
54
|
+
- **Repeat only for cause:** a failure or a subsequent change invalidating the
|
|
55
|
+
result requires a rerun. Run the final gate once per candidate; do not also
|
|
56
|
+
launch its full suites manually as an unrecorded duplicate.
|
|
57
|
+
|
|
58
|
+
Use repository-owned Make targets where declared. A narrower package run is
|
|
59
|
+
Section evidence only, never a substitute for the full declared boundary.
|
|
60
|
+
When a diff crosses a module boundary with real input/output, apply
|
|
61
|
+
`orly-write-integration-test`; otherwise record why it does not apply.
|
|
80
62
|
|
|
81
63
|
## Wire-fixture evidence rule
|
|
82
64
|
|
package/dispatch/write_spec.md
CHANGED
|
@@ -1,91 +1,65 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Spec authoring
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
`docs/
|
|
5
|
-
|
|
6
|
-
the dispatch model — `docs/TEMPLATE.md` remains the canonical section source.)
|
|
3
|
+
Read this before editing a spec under `docs/v*/{pending,active,done}/`, or
|
|
4
|
+
`docs/TEMPLATE.md`. The template defines the document shape. The authoring skill
|
|
5
|
+
fills it; the audit checks structural consistency. None proves design quality.
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## What must be ready, and when
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
| Stage | Required content |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Authoring | Goal, scope, existing references, decisions and prerequisites, Dimensions with test mappings, failures, interfaces, and acceptance checks |
|
|
12
|
+
| CHORE(open) | Active status, branch, full comparison revision, baseline measurement pending |
|
|
13
|
+
| PLAN | Implementer's comprehension handshake; resolved scope and decisions needed by the next Section |
|
|
14
|
+
| Before Pull Request | Declared unit/integration baseline counts, comparison revision, and evidence reference |
|
|
15
|
+
| Completion | Passing behavior proofs, final repository checks, and any required human evidence |
|
|
16
|
+
|
|
17
|
+
The sequence and hydration timing live in `dispatch/lifecycle.md`. A preparation
|
|
18
|
+
Section may establish inputs for later Sections when the spec states its output
|
|
19
|
+
and who may decide it. A required human sign-off remains a human dependency.
|
|
20
|
+
|
|
21
|
+
## Mechanical checks
|
|
22
|
+
|
|
23
|
+
`audits/spec-template.sh` is the entry point; its Bun helper
|
|
24
|
+
`audits/spec-template.ts` reads headings, lists, and tables from the runtime's
|
|
25
|
+
parsed Markdown tree. Code examples and quoted headings cannot supply sections.
|
|
26
|
+
|
|
27
|
+
- Prohibited authoring estimates, ownership labels, and completion percentages.
|
|
28
|
+
- Required sections with content, known placeholder residue, and the spec length cap.
|
|
29
|
+
- Existing repository files or URLs in the read-first list. Planned CREATE files
|
|
30
|
+
belong in Files Changed, not in the existing-reference list.
|
|
31
|
+
- Each Dimension names a proof and has a matching tiered Test Specification row
|
|
32
|
+
with an assertion. Duplicate identifiers and orphan test rows fail.
|
|
33
|
+
- The rubric's Verify cells contain the exact declared `conform` and `verify.*`
|
|
34
|
+
commands, with Expected values. Include conditional suites; the final gate
|
|
35
|
+
decides their applicability from the actual branch diff. Additional
|
|
36
|
+
spec-specific commands and explicitly named manual checks remain valid.
|
|
37
|
+
|
|
38
|
+
`--staged` reads spec contents, configuration, and local references from the Git
|
|
39
|
+
index. `--file <path>` checks the working copy. Missing runtime or configuration
|
|
40
|
+
fails these readiness checks. Bulk `--all` and `--include-done` scans retain
|
|
41
|
+
prohibited-pattern checks only; they do not retrofit historical documents.
|
|
42
|
+
|
|
43
|
+
## Author review
|
|
44
|
+
|
|
45
|
+
Check that required content is meaningful, prerequisites are attainable, failures
|
|
46
|
+
are tested, and the acceptance checks prove the goal. A structural pass does not
|
|
47
|
+
mean the feature is implemented. Use `manual` for a human proof; record its
|
|
48
|
+
procedure, required person, and durable evidence without inventing sign-off.
|
|
49
|
+
|
|
50
|
+
Use `{{fill:description}}` for authoring slots. Delete them and all `tpl:`
|
|
51
|
+
guidance before staging. Runtime parameters such as `/items/{id}` are allowed
|
|
52
|
+
when the spec defines them. Lifecycle-owned values use explicit pending text,
|
|
53
|
+
not unfilled authoring slots. Existing specs follow current rules; examples do
|
|
54
|
+
not override them.
|
|
14
55
|
|
|
15
|
-
|
|
56
|
+
**Override:** `SPEC TEMPLATE GATE: SKIPPED per user override (reason: ...)`.
|
|
57
|
+
User-invokable only; an external constraint must explain the exception.
|
|
16
58
|
|
|
17
|
-
|
|
18
|
-
- `docs/TEMPLATE.md` itself.
|
|
19
|
-
- Any `*.md` whose body carries the spec frontmatter pattern (`^**Milestone:** M\d+`).
|
|
59
|
+
## Required output
|
|
20
60
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
external constraint (vendor doc requirement, regulatory format), never internal
|
|
24
|
-
preference.
|
|
25
|
-
|
|
26
|
-
## What this covers
|
|
27
|
-
|
|
28
|
-
**Family 1 — prohibited patterns (negative space).** `docs/TEMPLATE.md`
|
|
29
|
-
"Prohibited" forbids: time/effort estimates, effort columns, complexity ratings,
|
|
30
|
-
percentage-complete fields, assigned owners, implementation dates. Specs created
|
|
31
|
-
from the template don't carry the Prohibited section forward — only the body
|
|
32
|
-
below the divider gets copied — so without enforcement these drift back in.
|
|
33
|
-
|
|
34
|
-
**Family 2 — required-present + no-placeholder (positive space).** The
|
|
35
|
-
agent-facing template mandates the determinism sections the executing agent reads
|
|
36
|
-
to emit invariant output: PR Intent & comprehension handshake, Applicable Rules,
|
|
37
|
-
Applicable Gates, Overview, Prior-Art / Reference Implementations, Files Changed,
|
|
38
|
-
Decomposition & alternatives, Sections, Metrics & Observability, Interfaces,
|
|
39
|
-
Failure Modes, Invariants, Test Specification, Acceptance Rubric (legacy heading `Acceptance Criteria` accepted), Product Clarity (authoring record), Discovery. A spec missing one — or
|
|
40
|
-
leaving template residue (`path/to/file.ext`, `test_<short_name>`,
|
|
41
|
-
`{one-line reason}`, any surviving `tpl:` guidance comment — the template's fill
|
|
42
|
-
grammar deletes them all at authoring) — forces the agent to guess intent.
|
|
43
|
-
|
|
44
|
-
**Family 2b — declared-command parity.** A staged `pending/` or `active/`
|
|
45
|
-
spec's Acceptance Rubric must quote the repository's declared `conform` and
|
|
46
|
-
`verify.unit` commands (`.oracle/orly.json`) **verbatim** — the same set
|
|
47
|
-
`orly gate` runs, so the rubric and the mechanical PR gate grade one boundary.
|
|
48
|
-
Missing → BLOCK. No config, no bun, or no declared commands → NOTE + skip.
|
|
49
|
-
Done specs are historical records and are never retrofitted.
|
|
50
|
-
|
|
51
|
-
**Scope (no legacy carve-out).** Family 2 fires in `--staged` only — the spec
|
|
52
|
-
being authored now (the agent's own output): BLOCK. Bulk scans (`--all` /
|
|
53
|
-
`--include-done`, which `make harness-verify` runs) execute Family 1 only, so they
|
|
54
|
-
behave identically over the corpus and never break an existing spec.
|
|
55
|
-
|
|
56
|
-
## Pre-edit check
|
|
57
|
-
|
|
58
|
-
| Pattern | Rule |
|
|
59
|
-
|---|---|
|
|
60
|
-
| `## Estimated effort` (any heading variant) | Forbidden. Delete the section. |
|
|
61
|
-
| `## Effort` / `## Complexity` / `## Sizing` | Forbidden. Use Priority. |
|
|
62
|
-
| `\b\d+\s*[-–]\s*\d+\s*h\b` (hour ranges like "10-14h") | Forbidden. |
|
|
63
|
-
| `\b\d+\s*hours?\b` / `\b\d+\s*days?\b` / `\b\d+\s*min(utes?)?\b` | Forbidden. |
|
|
64
|
-
| `\b(low|medium|high|small|large)\s*[:|-]\s*(effort|complexity)\b` | Forbidden. |
|
|
65
|
-
| `\d+%\s*complete` / `\b\d+/\d+\b\s*tasks` | Forbidden — binary PENDING/IN_PROGRESS/DONE. |
|
|
66
|
-
| `**Owner:**` / `**Assigned to:**` | Forbidden — use git history. |
|
|
67
|
-
| `**Due:**` / `**Deadline:**` (with date) | Forbidden — use Priority. |
|
|
68
|
-
| Missing a required determinism section in a **staged** spec | BLOCK — add it. |
|
|
69
|
-
| Rubric missing a declared `conform`/`verify.unit` command (**staged** pending/active) | BLOCK — copy it verbatim from `.oracle/orly.json`. |
|
|
70
|
-
| Unfilled template residue in a **staged** spec | BLOCK — fill the section. |
|
|
71
|
-
| Surviving `tpl:` guidance comment in a **staged** spec | BLOCK — delete it; the executor reads instance content only. |
|
|
72
|
-
| Spec without the SPEC AUTHORING RULES banner | Informational — reminds future edits. |
|
|
73
|
-
|
|
74
|
-
## Required output (default — one line)
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
SPEC TEMPLATE GATE: <file> | prohibited:<0|list> required-sections:<all-present|missing-list — staged only> placeholders:<0|list> banner:<yes|no>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Full multi-line block fires on violation (prohibited sections / time estimates /
|
|
81
|
-
effort fields / %-complete / owner-date fields, each with line numbers, plus the
|
|
82
|
-
`audits/spec-template.sh` staged-diff finding count).
|
|
83
|
-
|
|
84
|
-
## Scope
|
|
85
|
-
|
|
86
|
-
`audits/spec-template.sh` walks the **full pending+active spec set** via `git ls-files`;
|
|
87
|
-
the index includes staged-but-uncommitted content, so a fix staged in pre-commit
|
|
88
|
-
satisfies the check on the same hook run. `--staged` is the opt-in narrowing mode.
|
|
61
|
+
Report structural findings with file paths. Report an implementation verdict
|
|
62
|
+
only after the spec's behavior and repository checks have run.
|
|
89
63
|
|
|
90
64
|
## Authoring discipline (judgment layer)
|
|
91
65
|
|
|
@@ -71,9 +71,14 @@ determinism proof is unchanged by any of this.
|
|
|
71
71
|
|
|
72
72
|
| Gate | Proves |
|
|
73
73
|
|---|---|
|
|
74
|
-
| `work` |
|
|
75
|
-
| `verify` |
|
|
76
|
-
| `pr` |
|
|
74
|
+
| `work` | repository configuration and the declared `conform` command over the staged change |
|
|
75
|
+
| `verify` | documentation checks and non-test `verify.*` commands; unfinished Sections may be pushed |
|
|
76
|
+
| `pr` | exact pushed revision, branch/spec criteria, docs surface, and every declared `verify.*` command |
|
|
77
|
+
|
|
78
|
+
The authoritative sequence is `dispatch/lifecycle.md`. Full unit, integration,
|
|
79
|
+
and memory suites run at the PR boundary. No stored verification cache or
|
|
80
|
+
assumption about a custom pre-push hook can remove them. Baselines name an
|
|
81
|
+
immutable comparison revision and are measured before the Pull Request.
|
|
77
82
|
|
|
78
83
|
Every criterion is mechanical — it reads an exit code or a file. Claims that
|
|
79
84
|
cannot be proven that way stay prose and are graded by the spec's rubric; they
|
|
@@ -121,6 +126,11 @@ surfaces:
|
|
|
121
126
|
```
|
|
122
127
|
|
|
123
128
|
Orly owns policy and invokes these commands. The repository owns what they do.
|
|
129
|
+
Setup requires `conform` and at least one named `verify.*` command.
|
|
130
|
+
Documentation repositories can use `verify.docs` for site validation and link
|
|
131
|
+
checks without declaring application test suites. `init` reports missing
|
|
132
|
+
commands; `doctor` rejects incomplete setup without running those commands.
|
|
133
|
+
The final tree check includes the spec, so its evidence must be committed.
|
|
124
134
|
|
|
125
135
|
## Usage telemetry
|
|
126
136
|
|
package/docs/RULE_ENFORCEMENT.md
CHANGED
|
@@ -12,9 +12,9 @@ regenerates this file and fails on any difference. To update it, run
|
|
|
12
12
|
| `docs/DOCUMENTATION_RULES.md` | — | 0 | 0 | 0/22 | latent |
|
|
13
13
|
| `docs/LIFECYCLE_PATTERNS.md` | — | 0 | 0 | 0/22 | mechanical |
|
|
14
14
|
| `docs/CHANGELOG_VOICE.md` | — | 0 | 0 | 0/3 | latent |
|
|
15
|
-
| `docs/VERIFY_TIERS.md` | — | 0 | 0 | 0/
|
|
15
|
+
| `docs/VERIFY_TIERS.md` | — | 0 | 0 | 0/6 | uncited |
|
|
16
16
|
| `docs/greptile-learnings/RULES.md` | — | 0 | 0 | 0/114 | mechanical |
|
|
17
|
-
| **corpus** | | | | **30/
|
|
17
|
+
| **corpus** | | | | **30/278** | |
|
|
18
18
|
|
|
19
19
|
## How to read this
|
|
20
20
|
|