@feigi/fleet-ctl 0.0.0 → 3.16.3
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/{fleet-implementer.agent.md → fleet-implementer-slow-high.agent.md} +23 -2
- package/agents/fleet-implementer-slow-medium.agent.md +231 -0
- package/agents/fleet-implementer-smol-high.agent.md +231 -0
- package/agents/{fleet-implementer-alt.agent.md → fleet-implementer-task-high.agent.md} +23 -2
- package/agents/fleet-implementer-task-max.agent.md +231 -0
- package/agents/fleet-review-comments.agent.md +4 -2
- package/agents/fleet-review-correctness.agent.md +2 -1
- package/agents/fleet-review-runner.agent.md +14 -10
- package/agents/fleet-review-silent-failure.agent.md +4 -3
- package/agents/fleet-review-simplify.agent.md +2 -1
- package/agents/fleet-review-snapshot.agent.md +2 -1
- package/agents/fleet-review-test-run.agent.md +29 -0
- package/agents/fleet-review-tests.agent.md +10 -5
- package/agents/fleet-review-types.agent.md +4 -2
- package/agents/fleet-review-verifier.agent.md +4 -3
- package/commands/review-and-fix.md +7 -6
- package/commands/run-merge-bot.md +14 -4
- package/package.json +4 -2
- package/scripts/agent-test.test.mjs +36 -32
- package/scripts/ambient-git-vars-mjs-prose.test.mjs +23 -13
- package/scripts/apply-ruleset.test.mjs +4 -3
- package/scripts/arg-header-probes-prose.test.mjs +1 -0
- package/scripts/arg.test.mjs +18 -18
- package/scripts/board-cli.test.mjs +18 -21
- package/scripts/board-identity.test.mjs +9 -9
- package/scripts/board-liveness-banner.test.mjs +6 -6
- package/scripts/board-prev-shape.test.mjs +12 -13
- package/scripts/board-tryparse-null.test.mjs +7 -7
- package/scripts/board.mjs +4 -7
- package/scripts/board.test.mjs +57 -61
- package/scripts/candidates.test.mjs +228 -17
- package/scripts/ci-completes-premise-prose.test.mjs +1 -1
- package/scripts/ci-state-prose.test.mjs +2 -2
- package/scripts/ci-state.mjs +389 -187
- package/scripts/ci-state.test.mjs +458 -165
- package/scripts/citation-sweep-prose.test.mjs +59 -1
- package/scripts/claim-lifecycle.test.mjs +2 -1
- package/scripts/claim-ticket.test.mjs +35 -34
- package/scripts/closing-keyword-prose.test.mjs +1 -1
- package/scripts/cockpit-tick-nonblocking.test.mjs +8 -8
- package/scripts/compute-board.mjs +13 -3
- package/scripts/compute-board.test.mjs +64 -1
- package/scripts/compute-spend.mjs +46 -8
- package/scripts/compute-spend.test.mjs +64 -10
- package/scripts/cross-repo-citation-prose.test.mjs +18 -19
- package/scripts/delete-merged-branch.sh +218 -0
- package/scripts/delete-merged-branch.test.mjs +576 -0
- package/scripts/derive-testcmd.sh +18 -7
- package/scripts/derive-testcmd.test.mjs +9 -8
- package/scripts/diff-stats.mjs +2 -2
- package/scripts/diff-stats.test.mjs +7 -11
- package/scripts/dispatch-block-golden-prose.test.mjs +111 -6
- package/scripts/dispatch-block-pins-prose.test.mjs +5 -5
- package/scripts/dispositions-check.mjs +507 -0
- package/scripts/dispositions-check.test.mjs +843 -0
- package/scripts/dispositions-gate-prose.test.mjs +114 -0
- package/scripts/drop-merged-label.test.mjs +3 -4
- package/scripts/exec-stub.mjs +93 -0
- package/scripts/exec-stub.test.mjs +69 -0
- package/scripts/filing-bar-seat-prose.test.mjs +1 -1
- package/scripts/finisher-test-verdict-prose.test.mjs +102 -0
- package/scripts/fix-applier-correction-rules-prose.test.mjs +11 -10
- package/scripts/fleet-bootstrap +5 -20
- package/scripts/fleet-bootstrap.test.mjs +75 -0
- package/scripts/fleet-heartbeat.mjs +2 -2
- package/scripts/fleet-provenance +15 -24
- package/scripts/fleet-provenance.test.mjs +86 -12
- package/scripts/fleet-run.test.mjs +5 -5
- package/scripts/fleet-state.mjs +33 -11
- package/scripts/fleet-state.test.mjs +90 -3
- package/scripts/fleet-tick.mjs +346 -70
- package/scripts/fleet-tick.test.mjs +566 -16
- package/scripts/force-with-lease-reason-prose.test.mjs +1 -1
- package/scripts/frontmatter-check.mjs +3 -2
- package/scripts/frontmatter-check.test.mjs +6 -6
- package/scripts/immutable-body-claim-prose.test.mjs +53 -262
- package/scripts/implementer-model-tier.test.mjs +98 -506
- package/scripts/inflight.test.mjs +18 -127
- package/scripts/is-cli.mjs +26 -0
- package/scripts/is-cli.test.mjs +99 -0
- package/scripts/json.test.mjs +3 -3
- package/scripts/ledger-dispatch.test.mjs +368 -7
- package/scripts/ledger-grammar.mjs +85 -1
- package/scripts/ledger-grammar.test.mjs +86 -1
- package/scripts/ledger-read-require-file.test.mjs +7 -7
- package/scripts/ledger-rotate.test.mjs +142 -0
- package/scripts/ledger.mjs +181 -17
- package/scripts/ledger.test.mjs +12 -130
- package/scripts/main-checkout.mjs +312 -0
- package/scripts/main-checkout.test.mjs +332 -0
- package/scripts/member-outcomes-header.test.mjs +3 -3
- package/scripts/member-outcomes.mjs +4 -5
- package/scripts/member-outcomes.test.mjs +92 -18
- package/scripts/member-prompt-prose.test.mjs +17 -13
- package/scripts/member-record.mjs +8 -3
- package/scripts/member-record.test.mjs +5 -5
- package/scripts/member-write-guard.mjs +5 -5
- package/scripts/member-write-guard.test.mjs +6 -3
- package/scripts/no-undo-audit.sh +24 -21
- package/scripts/no-undo-audit.test.mjs +9 -13
- package/scripts/pointer-target-prose.test.mjs +1 -1
- package/scripts/pr-overlap.test.mjs +6 -9
- package/scripts/prompt-renderer.mjs +10 -9
- package/scripts/prose-pin.mjs +10 -11
- package/scripts/prove-merge.test.mjs +3 -3
- package/scripts/quiet-payload-prose.test.mjs +1 -1
- package/scripts/reap.test.mjs +3 -4
- package/scripts/release-label-split-prose.test.mjs +17 -2
- package/scripts/release-ticket.test.mjs +35 -44
- package/scripts/review-core-cwd-isolation.test.mjs +7 -6
- package/scripts/review-core-reads.test.mjs +1 -1
- package/scripts/review-core-scratch-refusal.test.mjs +64 -0
- package/scripts/review-core-shared-test-run.test.mjs +238 -0
- package/scripts/review-core-snapshot-path.test.mjs +59 -12
- package/scripts/review-core-specialist-scratch.test.mjs +12 -10
- package/scripts/review-core-testcmd.test.mjs +76 -45
- package/scripts/review-core-unrun.test.mjs +154 -168
- package/scripts/review-core.mjs +250 -56
- package/scripts/review-eval.mjs +11 -4
- package/scripts/review-host-fixture.mjs +12 -3
- package/scripts/review-in-run-retry.test.mjs +27 -3
- package/scripts/review-runner-spawns.test.mjs +5 -3
- package/scripts/review-runner.test.mjs +14 -3
- package/scripts/review-tier-audit.test.mjs +1 -1
- package/scripts/run-merge-bot-prose.test.mjs +29 -6
- package/scripts/scratch-partition-invariant-prose.test.mjs +1 -1
- package/scripts/section-between-guard-prose.test.mjs +4 -3
- package/scripts/select-dimensions.test.mjs +1 -1
- package/scripts/shell-traps-prose.test.mjs +6 -9
- package/scripts/shortlist.mjs +4 -1
- package/scripts/shortlist.test.mjs +30 -16
- package/scripts/snapshot-repo.test.mjs +177 -4
- package/scripts/stash-prohibition-prose.test.mjs +1 -1
- package/scripts/temp-dir.mjs +47 -0
- package/scripts/tier-check.mjs +95 -28
- package/scripts/tier-check.test.mjs +131 -29
- package/scripts/tier-outcomes-header.test.mjs +11 -54
- package/scripts/tier-outcomes.mjs +34 -12
- package/scripts/tier-outcomes.test.mjs +157 -4
- package/scripts/tier-roles.mjs +118 -29
- package/scripts/tier-roles.test.mjs +226 -61
- package/scripts/tracker-block-copy-prose.test.mjs +3 -3
- package/scripts/verify-sha.test.mjs +4 -5
- package/scripts/watcher-degraded-block.test.mjs +5 -8
- package/scripts/within-run-pair-prose.test.mjs +43 -75
- package/scripts/worktree-audit.test.mjs +2 -1
- package/skills/next-ticket/SKILL.md +2 -2
- package/skills/run-team/SKILL.md +433 -303
- package/skills/run-team/references/ci-and-staleness.md +7 -6
- package/skills/run-team/references/correction-tickets.md +3 -3
- package/skills/run-team/references/isolation.md +1 -1
- package/skills/sizing-a-ticket/SKILL.md +8 -8
- package/scripts/tier-guard-gate-prose.test.mjs +0 -216
|
@@ -29,7 +29,7 @@ const REPO = join(import.meta.dirname, "..");
|
|
|
29
29
|
const NEXT_TICKET = readFileSync(join(REPO, "skills", "next-ticket", "SKILL.md"), "utf8");
|
|
30
30
|
|
|
31
31
|
const step7 = () =>
|
|
32
|
-
between(NEXT_TICKET, "## 7. When the
|
|
32
|
+
between(NEXT_TICKET, "## 7. When the sizing-a-ticket path reports done", "## Red flags", "next-ticket/SKILL.md step 7");
|
|
33
33
|
|
|
34
34
|
// Narrow to the note itself before pinning anything, the way
|
|
35
35
|
// candidates-exit3-prose.test.mjs narrows to one table row. A positive
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
|
|
44
44
|
import { readFileSync } from "node:fs";
|
|
45
45
|
import { dirname, join } from "node:path";
|
|
46
|
-
import { fileURLToPath
|
|
46
|
+
import { fileURLToPath } from "node:url";
|
|
47
|
+
import { isCLI } from "./is-cli.mjs";
|
|
47
48
|
|
|
48
49
|
const NAME = "frontmatter-check";
|
|
49
50
|
const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url));
|
|
@@ -253,4 +254,4 @@ function main() {
|
|
|
253
254
|
process.exit(anyViolation ? 1 : 0);
|
|
254
255
|
}
|
|
255
256
|
|
|
256
|
-
if (import.meta.url
|
|
257
|
+
if (isCLI(import.meta.url)) main();
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
import { test } from "node:test";
|
|
21
21
|
import assert from "node:assert/strict";
|
|
22
22
|
import { spawnSync } from "node:child_process";
|
|
23
|
-
import {
|
|
23
|
+
import { writeFileSync, readFileSync, mkdirSync, existsSync } from "node:fs";
|
|
24
24
|
import { join } from "node:path";
|
|
25
|
-
import {
|
|
25
|
+
import { tempDir } from "./temp-dir.mjs";
|
|
26
26
|
import { fileURLToPath } from "node:url";
|
|
27
27
|
import {
|
|
28
28
|
parseAllowlist, kindForPath, parseFrontmatter, checkFields, formatViolation,
|
|
@@ -33,7 +33,7 @@ const REAL_ALLOWLIST_PATH = fileURLToPath(new URL("./frontmatter-allowlist.json"
|
|
|
33
33
|
const REPO = fileURLToPath(new URL("..", import.meta.url));
|
|
34
34
|
|
|
35
35
|
function dir() {
|
|
36
|
-
return
|
|
36
|
+
return tempDir("frontmatter-check-");
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function runCli(argv, cwd) {
|
|
@@ -110,7 +110,7 @@ test("parseAllowlist: a kind section with forbidden as an array (wrong shape) is
|
|
|
110
110
|
// ---------------------------------------------------------------------------
|
|
111
111
|
|
|
112
112
|
test("kindForPath: classifies agents, skills, commands under a plugin/ prefix", () => {
|
|
113
|
-
assert.equal(kindForPath("plugin/agents/fleet-implementer.agent.md"), "agents");
|
|
113
|
+
assert.equal(kindForPath("plugin/agents/fleet-implementer-slow-high.agent.md"), "agents");
|
|
114
114
|
assert.equal(kindForPath("plugin/skills/run-team/SKILL.md"), "skills");
|
|
115
115
|
assert.equal(kindForPath("plugin/commands/review-and-fix.md"), "commands");
|
|
116
116
|
});
|
|
@@ -422,8 +422,8 @@ test("MUTATION PROOF: an unknown key introduced -> red; reverted -> green", () =
|
|
|
422
422
|
// ---------------------------------------------------------------------------
|
|
423
423
|
|
|
424
424
|
test("REAL TREE: every tracked agents/skills/commands frontmatter file in this checkout passes the real allow-list", () => {
|
|
425
|
-
const agentFiles = ["
|
|
426
|
-
.map((
|
|
425
|
+
const agentFiles = ["slow-high", "slow-medium", "task-high", "task-max", "smol-high"]
|
|
426
|
+
.map((cell) => `agents/fleet-implementer-${cell}.agent.md`);
|
|
427
427
|
const skillFiles = ["next-ticket", "run-team", "sizing-a-ticket"].map((s) => `skills/${s}/SKILL.md`);
|
|
428
428
|
const commandFiles = ["review-and-fix.md", "run-merge-bot.md"].map((f) => `commands/${f}`);
|
|
429
429
|
const all = [...agentFiles, ...skillFiles, ...commandFiles];
|
|
@@ -1,77 +1,33 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// pushed
|
|
4
|
-
//
|
|
5
|
-
//
|
|
1
|
+
// A claim written into a commit body or a PR body needs its settling command
|
|
2
|
+
// re-run at the commit that ships it, written inline beside it, because a
|
|
3
|
+
// pushed body cannot be edited and none of the diff-scoped rules reach it. The
|
|
4
|
+
// rule itself and the literal-text `-F` rule live in the claim-discipline block
|
|
5
|
+
// every implementer agent body carries; run-team's SKILL.md keeps the rationale
|
|
6
|
+
// paragraph and the two settling-command paragraphs that follow it. This file
|
|
7
|
+
// pins both homes. The same block's anti-count rule is pinned in
|
|
8
|
+
// `fix-applier-correction-rules-prose.test.mjs`, as one ordered span.
|
|
6
9
|
//
|
|
7
10
|
// Measured against `origin/main` before this file existed: no test read the
|
|
8
11
|
// words `commit body` in `run-team/SKILL.md` at all, so the whole rule could be
|
|
9
12
|
// deleted with the suite green.
|
|
10
13
|
//
|
|
11
|
-
// SHAPE
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
// whole; that slice is large enough that presence checks inside it prove
|
|
18
|
-
// nothing about this rule.
|
|
14
|
+
// SHAPE. The SKILL.md slice runs from the rationale paragraph to the
|
|
15
|
+
// `#### Fallback` heading that follows the settling-command paragraphs —
|
|
16
|
+
// bounded at both ends, so a presence check inside it says something about
|
|
17
|
+
// these paragraphs and not about the rest of the Reviewers section. The agent
|
|
18
|
+
// body's block is sliced from its own lead to the commit-incrementally block
|
|
19
|
+
// that follows it.
|
|
19
20
|
//
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
// the
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
// #1002 measured: these are pins on text being PRESENT and adjacent. A sentence
|
|
31
|
-
// APPENDED after a pinned one that carves an exception out of it — "a claim
|
|
32
|
-
// already settled earlier in the branch needs no re-run" — touches no pinned
|
|
33
|
-
// fragment and stays green. Measured, not assumed: that mutant was run against
|
|
34
|
-
// this file and passed. Do not read a green run here as "no carve-out was
|
|
35
|
-
// added to this rule".
|
|
36
|
-
//
|
|
37
|
-
// AND IT STAYS OPEN HERE, by ruling rather than by neglect. #1002 closed the
|
|
38
|
-
// same ceiling for the verbatim dispatch BLOCKS, with a whole-block golden
|
|
39
|
-
// fixture (`dispatch-block-golden-prose.test.mjs`); its own out-of-scope is
|
|
40
|
-
// explicit that the golden form is justified by those blocks being
|
|
41
|
-
// change-controlled — they exist to reach a member unchanged — and that the
|
|
42
|
-
// argument does not carry to ordinary prose. The rule this file pins is
|
|
43
|
-
// ordinary prose: not a blockquote, not carried verbatim to anyone, and edited
|
|
44
|
-
// by whoever next touches the correction-discipline block. A golden over it
|
|
45
|
-
// would red on every legitimate rewording, with no change-control convention to
|
|
46
|
-
// make that red a review point rather than an obstacle.
|
|
47
|
-
//
|
|
48
|
-
// That appended-clause half is the KNOWN ceiling, and it is what #1002 records
|
|
49
|
-
// and measures. A second half is not: a MEANING-CHANGING clause inserted
|
|
50
|
-
// MID-GAP — between the two anchors of one ordered span, touching no pinned
|
|
51
|
-
// fragment — is absorbed wherever that span's `.{0,N}?` still has headroom, and
|
|
52
|
-
// the suite stays green. The tolerance exists so a meaning-PRESERVING copy-edit
|
|
53
|
-
// does not red the pin, and an insertion that changes the rule's meaning inside
|
|
54
|
-
// the same gap is a different case no assertion here sees.
|
|
55
|
-
//
|
|
56
|
-
// Measured on this file, not assumed, and the property is per-gap headroom
|
|
57
|
-
// rather than one every span here has. Re-derive by inserting the literal into
|
|
58
|
-
// `run-team/SKILL.md` and running this file: `unless it names a public source, `
|
|
59
|
-
// in the ranking span's gap stayed green, `nobody relies on ` in the
|
|
60
|
-
// `Verified:` span stayed green, and `, for correction tickets only` in the
|
|
61
|
-
// hand-over span stayed green — while `, unless re-running it is impractical`
|
|
62
|
-
// in the endings span pushed past that gap's cap and RED it.
|
|
63
|
-
//
|
|
64
|
-
// Tightening the gaps is not the fix, and NOT for the reason that first comes to
|
|
65
|
-
// mind. Reflow is not what a tight gap costs: `flatten` collapses whitespace
|
|
66
|
-
// before matching, so re-wrapping the source leaves the gap's flattened length
|
|
67
|
-
// identical. Measured — the endings gap narrowed to its exact content (84
|
|
68
|
-
// chars, zero headroom) stayed GREEN through a hard re-wrap of the whole rule
|
|
69
|
-
// at 42 columns. What a tight gap costs is word-level copy-editing: the same
|
|
70
|
-
// zero-headroom gap RED on inserting the single word `it` into "not one to
|
|
71
|
-
// assert bare". That is a meaning-preserving edit, and a pin that reds on one
|
|
72
|
-
// is a pin the next person to touch this prose weakens or deletes.
|
|
73
|
-
// The mechanism has to change, which was #1002's conclusion — and where it
|
|
74
|
-
// changed is the dispatch blocks, not here. See the ruling above.
|
|
21
|
+
// THE CEILING, the same one `dispatch-block-pins-prose.test.mjs` records:
|
|
22
|
+
// these are pins on text being PRESENT. A sentence APPENDED after a pinned one
|
|
23
|
+
// that carves an exception out of it — "a claim already settled earlier in the
|
|
24
|
+
// branch needs no re-run" — touches no pinned fragment and stays green here.
|
|
25
|
+
// For the agent body that ceiling is closed elsewhere: the claim-discipline
|
|
26
|
+
// block is verbatim dispatch text, so `dispatch-block-golden-prose.test.mjs`
|
|
27
|
+
// holds a whole-block golden fixture of it and an appended carve-out reds
|
|
28
|
+
// there. The SKILL.md paragraphs are ordinary prose, and stay presence-pinned
|
|
29
|
+
// by ruling: a golden over them would red on every legitimate rewording, with
|
|
30
|
+
// no change-control convention to make that red a review point.
|
|
75
31
|
import { test } from "node:test";
|
|
76
32
|
import assert from "node:assert/strict";
|
|
77
33
|
import { readFileSync } from "node:fs";
|
|
@@ -103,132 +59,16 @@ const flatten = (s) =>
|
|
|
103
59
|
.join(" ")
|
|
104
60
|
.trim();
|
|
105
61
|
|
|
106
|
-
const FROM = "
|
|
62
|
+
const FROM = "Every implementer body carries the";
|
|
107
63
|
const TO = "#### Fallback: hand-dispatched reviewer member";
|
|
108
|
-
const rule = () => flatten(between(RUN_TEAM, FROM, TO, "the
|
|
64
|
+
const rule = () => flatten(between(RUN_TEAM, FROM, TO, "the claim-discipline rationale and settling-command rules"));
|
|
109
65
|
|
|
110
|
-
// The
|
|
111
|
-
//
|
|
112
|
-
//
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
test("the rule reaches the immutable body the diff does not carry, and says why review-time is too late", () => {
|
|
117
|
-
const r = rule();
|
|
118
|
-
// The artifacts, bound to the reason they need their own rule. "commit body"
|
|
119
|
-
// alone is satisfied by any passing mention; what makes this a rule is that
|
|
120
|
-
// the body is not in the diff every other rule here scopes to.
|
|
121
|
-
assert.match(
|
|
122
|
-
r,
|
|
123
|
-
/a claim written into a commit body or a PR body.{0,400}?a pushed commit body is not in the diff/,
|
|
124
|
-
"the rule no longer covers a commit or PR body as something the diff-scoped rules cannot reach",
|
|
125
|
-
);
|
|
126
|
-
// Immutability bound to the consequence that makes a later fix no exit. With
|
|
127
|
-
// only "cannot be edited" the reader concludes the remedy is a follow-up
|
|
128
|
-
// commit, which is a fresh instance of the same generator.
|
|
129
|
-
assert.match(
|
|
130
|
-
r,
|
|
131
|
-
phrase("only retracted by a later commit, which is itself a fresh unverified historical claim"),
|
|
132
|
-
"the rule no longer says a retraction is itself an unverified claim — read without it, 'fix it later' looks like an exit",
|
|
133
|
-
);
|
|
134
|
-
assert.match(
|
|
135
|
-
r,
|
|
136
|
-
phrase("So the check has to sit at write time, and review-time is already too late"),
|
|
137
|
-
"the rule no longer places the check at write time, so it now reads as something a reviewer could catch instead",
|
|
138
|
-
);
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
test("the settling command is pinned to the shipping commit, against the motivating one", () => {
|
|
142
|
-
// One ordered span, not two presence checks. `ships` and `motivated` both
|
|
143
|
-
// appear either way round, and the reversed reading — settle at the commit
|
|
144
|
-
// that motivated the work — is exactly the generator this rule exists to
|
|
145
|
-
// stop: it is what makes a number correct when it was learned and wrong when
|
|
146
|
-
// it shipped.
|
|
147
|
-
assert.match(
|
|
148
|
-
rule(),
|
|
149
|
-
phrase("re-run at the commit that ships it, not at the commit that motivated it"),
|
|
150
|
-
"re-running the settling command is no longer pinned to the shipping commit against the motivating one, or the two have been swapped",
|
|
151
|
-
);
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
test("the claim types stay at the widened scope, with attribution ranked above a line number", () => {
|
|
155
|
-
const r = rule();
|
|
156
|
-
// The whole list as one span. A separate presence check on each noun is
|
|
157
|
-
// vacuous in this slice: the anti-count rule it opens on already carries
|
|
158
|
-
// "count", so a narrowing back to measurement counts — the ticket's title
|
|
159
|
-
// scope, which the brief ruled out — would leave that check green.
|
|
160
|
-
assert.match(
|
|
161
|
-
r,
|
|
162
|
-
phrase("a line number, a SHA, an attribution of who said what, a positional reference and a count all rot the same way"),
|
|
163
|
-
"the claim types narrowed — the rule no longer covers line numbers, SHAs, attributions and positional references alongside counts",
|
|
164
|
-
);
|
|
165
|
-
// The ranking, bound to the reason for it and to the case it is ranked
|
|
166
|
-
// against. This is the brief's decisive point, and it inverts cleanly: "a
|
|
167
|
-
// wrong line number is the worst of them" reads as sound advice and reds
|
|
168
|
-
// here.
|
|
169
|
-
assert.match(
|
|
170
|
-
r,
|
|
171
|
-
/an attribution is the worst of them, because the argument it carries collapses.{0,120}?while a wrong line number leaves the surrounding reasoning standing/,
|
|
172
|
-
"the rule no longer ranks a false attribution above a wrong line number, or no longer gives the reason — that an attribution's argument collapses with it",
|
|
173
|
-
);
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
test("the inline form is bound to what it buys, and to the claim that has to be dropped instead", () => {
|
|
177
|
-
const r = rule();
|
|
178
|
-
assert.match(
|
|
179
|
-
r,
|
|
180
|
-
phrase("the command goes inline, beside the claim"),
|
|
181
|
-
"the rule no longer requires the settling command inline beside the claim it settles",
|
|
182
|
-
);
|
|
183
|
-
// The endings that make the rule decidable. "Write the command inline" alone
|
|
184
|
-
// leaves a writer with an unsettleable claim no instruction at all, and the
|
|
185
|
-
// reachable move there is to assert it bare. The marker ending is load-bearing
|
|
186
|
-
// and not decorative: the cross-repo citation convention in this block —
|
|
187
|
-
// pinned by `cross-repo-citation-prose.test.mjs` — directs foreign evidence to
|
|
188
|
-
// be asserted as prose saying it cannot be settled from this repo, and a
|
|
189
|
-
// settle-or-drop binary reads as a ban on exactly that, since a foreign
|
|
190
|
-
// claim's settling command cannot be written HERE. Pinned as one ordered span
|
|
191
|
-
// so the binary cannot come back by dropping the marker ending.
|
|
192
|
-
assert.match(
|
|
193
|
-
r,
|
|
194
|
-
/can be re-run instead of trusted.{0,120}?settle it inline, mark it unsettleable from this repo per the citation convention above, or drop it/,
|
|
195
|
-
"the rule no longer offers the unsettleable-from-this-repo marker as an ending — a settle-or-drop binary bans what the citation convention above sanctions",
|
|
196
|
-
);
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
test("the `Verified:` header carries the rationale — a wrong figure under it is worse than none", () => {
|
|
200
|
-
// The ticket's own "why a rule and not just a fix". Before this assert the
|
|
201
|
-
// sentence sat in an unpinned gap: the ranking span stops at "leaves the
|
|
202
|
-
// surrounding reasoning standing" and the worked-instance span starts at
|
|
203
|
-
// "`f961cf2` and `acce6ee`", so deleting it left the whole suite green.
|
|
204
|
-
// One ordered span, because `Verified:` alone recurs in this slice and a bare
|
|
205
|
-
// presence check on it is satisfied by the `f961cf2`/`acce6ee` worked
|
|
206
|
-
// instance. The single `*` in `*instead of*` is live text here — see the
|
|
207
|
-
// `flatten` note — and this is the assertion that makes leaving it unstripped
|
|
208
|
-
// load-bearing.
|
|
209
|
-
assert.match(
|
|
210
|
-
rule(),
|
|
211
|
-
/`Verified:` is the construct a later reader trusts \*instead of\* re-deriving.{0,80}?worse than no figure at all/,
|
|
212
|
-
"the rule no longer says why `Verified:` is the header that makes a wrong figure worse than none",
|
|
213
|
-
);
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
test("the worked instance names both commits and the command that settles what they shipped", () => {
|
|
217
|
-
const r = rule();
|
|
218
|
-
// The example is the rule applied to itself: a claim about two commit bodies,
|
|
219
|
-
// carrying the command that reads them. Pinning the SHAs alone would survive
|
|
220
|
-
// the command being dropped, which is the half a reader needs to re-derive.
|
|
221
|
-
assert.match(
|
|
222
|
-
r,
|
|
223
|
-
/`f961cf2` and `acce6ee` both close `Verified:` with `86\/86 across both test files`/,
|
|
224
|
-
"the worked instance no longer names both commits that shipped the claim",
|
|
225
|
-
);
|
|
226
|
-
assert.match(
|
|
227
|
-
r,
|
|
228
|
-
phrase("`git log -1 --format=%b <sha> | grep -A2 Verified:` shows what each shipped"),
|
|
229
|
-
"the worked instance lost its settling command — the rule now demonstrates the failure it forbids",
|
|
230
|
-
);
|
|
231
|
-
});
|
|
66
|
+
// The claim-discipline block of the implementer agent body — the hand-over
|
|
67
|
+
// itself, since the harness injects that body as every implementer's system
|
|
68
|
+
// prompt.
|
|
69
|
+
const AGENT = readFileSync(join(REPO, "agents", "fleet-implementer-slow-high.agent.md"), "utf8");
|
|
70
|
+
const discipline = () =>
|
|
71
|
+
flatten(between(AGENT, "**Claim discipline, on every ticket:**", "Commit incrementally as you go", "the agent body's claim-discipline block"));
|
|
232
72
|
|
|
233
73
|
test("the literal-path grep is forbidden AND the method that replaces it is given", () => {
|
|
234
74
|
const r = rule();
|
|
@@ -299,80 +139,33 @@ test("a settling command over literal text takes -F, and its zero counts only af
|
|
|
299
139
|
);
|
|
300
140
|
});
|
|
301
141
|
|
|
302
|
-
test("
|
|
303
|
-
|
|
304
|
-
// nothing in this repo renders this block into a member prompt verbatim, so
|
|
305
|
-
// the enumerated sentences ARE the hand-over. Settle with
|
|
306
|
-
// `grep -rn "correction-ticket discipline" skills/ agents/` — every hit
|
|
307
|
-
// selects, annotates or pins the discipline, and none renders it. That a
|
|
308
|
-
// controller in practice relays the enumeration and leaves the block behind
|
|
309
|
-
// is a fleet-run observation and cannot be settled from this repo.
|
|
310
|
-
//
|
|
311
|
-
// The refuters' point stands and is not the defect: the block already carried
|
|
312
|
-
// rules these enumerations omit. The anti-count rule was one, absent from the
|
|
313
|
-
// phase-0 parenthetical before #402 —
|
|
314
|
-
// `git show 38d9d15:skills/run-team/SKILL.md | sed -n '303,310p'
|
|
315
|
-
// | grep -in "count\|tally"` exits 1 — which is why the phase-0 asserts cover
|
|
316
|
-
// it too.
|
|
317
|
-
assert.match(
|
|
318
|
-
rule(),
|
|
319
|
-
/The immutable-body rule earns the same place.{0,80}?every claim a commit body or a PR body asserts needs its settling command re-run at the commit that ships it, and written inline beside it/,
|
|
320
|
-
"the hand-over enumeration no longer names this rule as one to give every implementer — a controller relaying the list drops it",
|
|
321
|
-
);
|
|
322
|
-
const phase0 = flatten(
|
|
323
|
-
between(RUN_TEAM, PHASE0_FROM, PHASE0_TO, "the phase-0 hand-over enumeration"),
|
|
324
|
-
);
|
|
142
|
+
test("the rationale says why every implementer gets the discipline and why a body claim is settled at write time", () => {
|
|
143
|
+
const r = rule();
|
|
325
144
|
assert.match(
|
|
326
|
-
|
|
327
|
-
phrase("
|
|
328
|
-
"the
|
|
145
|
+
r,
|
|
146
|
+
phrase("Nothing before dispatch can see the diff, so the discipline goes to every implementer"),
|
|
147
|
+
"the rationale no longer says why the discipline reaches every implementer rather than a selected few",
|
|
329
148
|
);
|
|
330
149
|
assert.match(
|
|
331
|
-
|
|
332
|
-
phrase("
|
|
333
|
-
"the
|
|
150
|
+
r,
|
|
151
|
+
phrase("A pushed commit body cannot be edited, so its claims are settled at write time"),
|
|
152
|
+
"the rationale no longer says why a commit-body claim is settled at write time",
|
|
334
153
|
);
|
|
335
154
|
});
|
|
336
155
|
|
|
337
|
-
test("
|
|
338
|
-
// #1087, follow-up (#2109). The rule the paragraph below states in full —
|
|
339
|
-
// "A settling command over literal text uses `grep -F`, and its zero
|
|
340
|
-
// counts only after the same command finds a line known to match" —
|
|
341
|
-
// reached neither enumeration when #2104 shipped it: #2109's own
|
|
342
|
-
// `sed -n '598,608p;2565,2579p' SKILL.md | grep -cF -- '-F'` returned 0
|
|
343
|
-
// against the pre-PR tree, scoped to exactly those two enumerations. The
|
|
344
|
-
// wider rule() slice below is not 0 there — it already carries the
|
|
345
|
-
// rule's own pre-existing paragraph further down the same block, which
|
|
346
|
-
// already said `-F`.
|
|
347
|
-
//
|
|
348
|
-
// The "Two of the rules above" list earns a new member by the SAME
|
|
349
|
-
// criterion it already states for its other members: a measured incident.
|
|
350
|
-
// #1087 is that incident here, and it fired TWICE in one run — two
|
|
351
|
-
// members, two different literal patterns, each read as a regex, each
|
|
352
|
-
// answering the benign zero — the same shape the list's own opening
|
|
353
|
-
// paragraph cites for #756/#768.
|
|
354
|
-
assert.match(
|
|
355
|
-
rule(),
|
|
356
|
-
phrase("a settling command over literal text uses `grep -F`"),
|
|
357
|
-
"the hand-over list no longer tells an implementer that literal text is grepped with -F",
|
|
358
|
-
);
|
|
359
|
-
assert.match(
|
|
360
|
-
rule(),
|
|
361
|
-
phrase("its zero counts only after the same command, with the same flags, finds a line known to match"),
|
|
362
|
-
"the hand-over list no longer requires a zero to be checked against a known match before it is trusted",
|
|
363
|
-
);
|
|
364
|
-
const phase0 = flatten(
|
|
365
|
-
between(RUN_TEAM, PHASE0_FROM, PHASE0_TO, "the phase-0 hand-over enumeration"),
|
|
366
|
-
);
|
|
156
|
+
test("the agent body hands every implementer the commit/PR-body rule", () => {
|
|
367
157
|
assert.match(
|
|
368
|
-
|
|
369
|
-
phrase("
|
|
370
|
-
"the
|
|
158
|
+
discipline(),
|
|
159
|
+
phrase("Every claim in a commit body or PR body gets its settling command re-run at the commit that ships it, written inline beside the claim"),
|
|
160
|
+
"the agent body no longer carries the commit/PR-body rule",
|
|
371
161
|
);
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
test("the agent body hands every implementer the literal-text -F rule, positive control included", () => {
|
|
372
165
|
assert.match(
|
|
373
|
-
|
|
374
|
-
phrase("its zero
|
|
375
|
-
"the
|
|
166
|
+
discipline(),
|
|
167
|
+
phrase("A settling command over literal text uses `grep -F`, and its zero counts only after the same command, with the same flags, finds a line known to match"),
|
|
168
|
+
"the agent body no longer tells an implementer that literal text is grepped with -F, its zero trusted only after a known match",
|
|
376
169
|
);
|
|
377
170
|
});
|
|
378
171
|
|
|
@@ -383,7 +176,7 @@ test("a rewrapped rule still matches — these pins refuse drift, not reflow", (
|
|
|
383
176
|
// one turns every reword into a red on the fixture guard rather than on the
|
|
384
177
|
// pin, which is an accept control that reddens on the edits it exists to
|
|
385
178
|
// accept.
|
|
386
|
-
const raw = between(RUN_TEAM, FROM, TO, "the
|
|
179
|
+
const raw = between(RUN_TEAM, FROM, TO, "the claim-discipline rationale and settling-command rules");
|
|
387
180
|
const body = raw.replace(/\n*#*\s*$/, "");
|
|
388
181
|
// Re-wrapped narrower than the file's ~80 columns, so every wrap point lands
|
|
389
182
|
// somewhere different from today's. At word boundaries, not one word per
|
|
@@ -404,10 +197,8 @@ test("a rewrapped rule still matches — these pins refuse drift, not reflow", (
|
|
|
404
197
|
// interpreted in the latter, and this slice carries a `$` today in `%b`'s
|
|
405
198
|
// neighbourhood the moment anyone adds a shell variable to the example.
|
|
406
199
|
const flat = flatten(between(RUN_TEAM.replace(raw, () => narrow), FROM, TO, "rewrapped rule"));
|
|
407
|
-
assert.match(flat, phrase("
|
|
408
|
-
assert.match(flat, phrase("the command goes inline, beside the claim"));
|
|
200
|
+
assert.match(flat, phrase("A pushed commit body cannot be edited, so its claims are settled at write time"));
|
|
409
201
|
assert.match(flat, phrase("that answers which ones depend on its contents"));
|
|
410
202
|
assert.match(flat, phrase("A zero or an absence counts only after the same command, with the same flags, finds a line known to match"));
|
|
411
|
-
assert.match(flat, phrase("
|
|
412
|
-
assert.match(flat, phrase("its zero counts only after the same command, with the same flags, finds a line known to match"));
|
|
203
|
+
assert.match(flat, phrase("A settling command over literal text uses `grep -F`"));
|
|
413
204
|
});
|