@thebattlearena/corner 0.10.0 → 0.10.1-beta.78
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/README.md +46 -26
- package/package.json +1 -1
- package/ring/agents/cornerman.md +14 -5
- package/ring/agents/rudo.md +2 -1
- package/ring/agents/wrestler.md +8 -4
- package/ring/hooks/hooks.json +22 -0
- package/ring/scripts/brief-build.mjs +130 -0
- package/ring/scripts/brief-guard.mjs +154 -0
- package/ring/scripts/brief.mjs +272 -0
- package/ring/scripts/compact-hook.mjs +110 -0
- package/ring/scripts/config.mjs +24 -0
- package/ring/scripts/findings.mjs +79 -2
- package/ring/scripts/rule-ids.mjs +124 -0
- package/ring/skills/referee/SKILL.md +46 -15
- package/ring/skills/referee/references/rulebook.md +33 -3
- package/ring/skills/referee/templates/cornerman-batch.md +17 -11
- package/ring/skills/referee/templates/cornerman-concept.md +28 -30
- package/ring/skills/referee/templates/cornerman-range.md +16 -11
- package/ring/skills/referee/templates/wrestler-brief.md +28 -44
- package/ring/skills/referee/templates/wrestler-cutoff.md +4 -0
- package/ring/skills/referee/templates/wrestler-resume.md +4 -0
- package/ring/skills/sparring/SKILL.md +3 -2
- package/ring/skills/title-defense/SKILL.md +2 -2
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: referee
|
|
3
|
-
description: Orchestrates a refactor or a large delivery on a backend, frontend or mobile PR as its referee, at the venue the PR belongs to. One
|
|
3
|
+
description: Orchestrates a refactor or a large delivery on a backend, frontend or mobile PR as its referee, at the venue the PR belongs to. One wrestler (Sonnet, effort high by default) writes in its own worktree; you (effort high) review each commit range with read-only cornermen against a numbered rulebook, every brief generated by `brief.mjs` with the rules embedded, send one rebound package at a time, open small do-not-merge round-bell PRs so the human reviews early, decide design doubts yourself from the rulebook and precedents (escalating only a short hard list), and keep a durable judges card so any new session can resume. Invoke with `/ring:referee start <pr>`, `/ring:referee resume [<pr>]`, `/ring:referee close`, "referee the refactor of #N", "resume the bout".
|
|
4
4
|
argument-hint: "start <pr> | start --from-sparring <slug> | resume [<pr>] | close"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# referee
|
|
8
8
|
|
|
9
|
-
You do not write production code. You write
|
|
10
|
-
|
|
9
|
+
You do not write production code. You write rebounds, round-bell bodies, escalations and the
|
|
10
|
+
judges card; the briefs of the wrestler and the cornermen are generated by `brief.mjs` from the
|
|
11
|
+
templates, with the rules embedded in full, and you only give them your values. You are the only one who talks to the human. Under the default delegation you
|
|
11
12
|
also decide every design doubt yourself, write down why, and keep the bout moving: only the hard
|
|
12
13
|
list reaches the human.
|
|
13
14
|
|
|
@@ -41,7 +42,8 @@ list reaches the human.
|
|
|
41
42
|
5. **State lives in `~/.claude/ring/<owner>/<repo>/<pr>/`** (`node "$RING/scripts/judges-card.mjs"
|
|
42
43
|
path <pr>`; owner and repo lowercased, `local/<name>` for a repo without an origin remote;
|
|
43
44
|
`RING_HOME` overrides the root), never in the session scratchpad: the scratchpad is wiped when
|
|
44
|
-
the session restarts.
|
|
45
|
+
the session restarts. Neither criteria nor notes live there either: what the human asks for
|
|
46
|
+
goes to `decisions.md` or the technical plan, and `brief.mjs` refuses a scratchpad path. A bout in the old flat layout (`<owner>-<repo>/<pr>/`) is moved there the
|
|
45
47
|
first time a script resolves it; if both exist, the new one wins and the old one is reported on
|
|
46
48
|
stderr, untouched.
|
|
47
49
|
6. **The base is a remote ref.** In every git command and every brief, `<base>` means
|
|
@@ -50,9 +52,22 @@ path <pr>`; owner and repo lowercased, `local/<name>` for a repo without an orig
|
|
|
50
52
|
thousands of files that are not the PR's. What the scripts store stays the branch name:
|
|
51
53
|
`judges-card.mjs open --base <stack base>` (never `origin/…`), since round-bell adds `origin/`
|
|
52
54
|
itself.
|
|
53
|
-
7. **
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
7. **Every brief from `brief.mjs`, with its model and effort.** Before every Agent call to a
|
|
56
|
+
wrestler or a cornerman, write only your values to a JSON under `<bout dir>/tools/` and run
|
|
57
|
+
`node "$RING/scripts/brief.mjs" wrestler|cornerman <pr> --mode <mode> --vars <file>`: it fills
|
|
58
|
+
the template with the bout's state, the venue's gates and lenses, the commits of the range, the
|
|
59
|
+
decisions (every foul, the ones on those files, the last 20) and **the rules in full**, seals
|
|
60
|
+
it, logs it in `<bout dir>/briefs/index.jsonl`, and prints the file and the Agent call with the
|
|
61
|
+
role's model and effort (`config.agents`: the wrestler and the rudo on `sonnet` at `high`, the
|
|
62
|
+
cornerman on `opus` at `high`, unless the host's `.claude/ring.json` says otherwise). Launch
|
|
63
|
+
with `prompt: "ring-brief: <the file>"`, with that `model` and `effort` (PR16): the
|
|
64
|
+
`brief-guard` hook checks the seal (generated, untouched, on today's rules, of this bout and
|
|
65
|
+
role), puts the file's text in the prompt and sets the role's model and effort. A brief that
|
|
66
|
+
does not hold is reported to you (`briefGuard: "warn"`, the default) or refused (`"block"`).
|
|
67
|
+
Never write a brief by hand: a brief written from memory is what lost the rules in bout #1223.
|
|
68
|
+
`brief.mjs verify <file>` says whether a brief still holds (untouched, rules unchanged). After a
|
|
69
|
+
compaction, a SessionStart hook puts back the bout, its checklist, its fouls and the card's
|
|
70
|
+
«how to resume»: reread the card before acting.
|
|
56
71
|
8. **Who decides** (`config.delegation`, rulebook "Who decides"):
|
|
57
72
|
- **`referee`** (default): you decide design, pattern, layer, naming, style, scope inside the
|
|
58
73
|
assignment, test strategy, and which option to take when a measurement shows a risk. Under
|
|
@@ -161,8 +176,10 @@ way out, and it refuses without a KO. Then the bout runs as always, with three i
|
|
|
161
176
|
cornermen in **batch** mode in parallel, ≤20 files each (`templates/cornerman-batch.md`),
|
|
162
177
|
`effort: "high"`. Decide their open questions yourself under `referee` (recorded as in §0.8);
|
|
163
178
|
bring the human only the hard-list ones, or all of them under `human`.
|
|
164
|
-
8. **Launch one wrestler**: `
|
|
165
|
-
|
|
179
|
+
8. **Launch one wrestler**: `brief.mjs wrestler <pr> --mode start --vars <file>` (your values:
|
|
180
|
+
`assignment`, `flowChange`, `concepts`, `frozen`, `waitingOnHuman`, and `comments` and
|
|
181
|
+
`referencePattern` when there are), then `Agent{subagent_type: "ring:wrestler", model, effort
|
|
182
|
+
(as printed), run_in_background: true, prompt: "ring-brief: <the file>"}`. The first concept is a
|
|
166
183
|
**pilot**: one small concept as a sample for the human. Note the agent id in the judges card
|
|
167
184
|
("What I did"). If the harness exposes how the subagent ran, check it ran at medium.
|
|
168
185
|
Give every Agent call a short `description` (its first three words label its chip in Ringside);
|
|
@@ -178,9 +195,12 @@ run_in_background: true, prompt: <templates/wrestler-brief.md filled>}`. The fir
|
|
|
178
195
|
never in bulk**: a range is 2–3 commits or ~200 lines (`reviewEvery` in the host config, 3
|
|
179
196
|
commits / 200 lines by default). `mask-guard` holds the wrestler's next commit once the
|
|
180
197
|
unreviewed range reaches that cap, until you mark it (step 4).
|
|
181
|
-
- each new range: `
|
|
182
|
-
|
|
183
|
-
|
|
198
|
+
- each new range: `brief.mjs cornerman <pr> --mode range --vars <file>` (≤15 lines; the range
|
|
199
|
+
is `lastReviewed..HEAD` unless you pass `--range`; your value: `claims`);
|
|
200
|
+
- when the wrestler closes a concept: `--mode concept` (your values: `invariants`, numbered,
|
|
201
|
+
and `claims`; `designReference` at a UI venue), over ranges already reviewed one by one. It
|
|
202
|
+
also reads the concept as one piece through the venue's lenses: what no single range shows;
|
|
203
|
+
- a design review: `--mode batch --files <f1,f2,…>`.
|
|
184
204
|
If the wrestler claimed something ("does not change counter X"), hand the claim to the
|
|
185
205
|
cornerman to verify against the base. The cornerman always checks the format of the range
|
|
186
206
|
(`format-gate.mjs check`); an unclean file is a finding like any other, fixed by the wrestler
|
|
@@ -205,6 +225,16 @@ run_in_background: true, prompt: <templates/wrestler-brief.md filled>}`. The fir
|
|
|
205
225
|
before anything else: `node "$RING/scripts/findings.mjs" add <pr> --source range --range
|
|
206
226
|
<from>..<to> --file <report>` (one finding per line; `--source batch` without a range for a
|
|
207
227
|
design review), or `findings.mjs clean <pr> --range <from>..<to>` when it found nothing.
|
|
228
|
+
**Every finding cites a rule**: `add` refuses a line whose second field is not a rule id of the
|
|
229
|
+
venue (`<file:line> — R11 — …`). Rebound the report to the cornerman ("cite the rule"), or take
|
|
230
|
+
the line as yours with `--rule <id>`, logged with you as its author. A finding no rule covers
|
|
231
|
+
carries `X0`: it lands by itself in "For the rulebook / precedents" of the judges card, since a
|
|
232
|
+
gap the rulebook does not name is a rule it lacks.
|
|
233
|
+
**The human's own reviews are findings too.** When the human reviews code on video (a Tape of
|
|
234
|
+
the Battle Arena QA sessions, `qa_session_overview <link>`) or in a message, each pending item
|
|
235
|
+
becomes a finding with `--source human`, the rule it falls under, `X0` when none does, and the
|
|
236
|
+
link in its text: it runs through the same states as a cornerman's, and the rule it breaks
|
|
237
|
+
goes on the architecture checklist of the next briefs.
|
|
208
238
|
`lookout.mjs mark` refuses a range whose findings are not registered. Check every BLOCKER:
|
|
209
239
|
`git -C <wt> show <base>:<path>`. An assertion in a test created in this branch is not a base
|
|
210
240
|
assertion (T1). Never forward a report you have not read. Every finding ends in exactly one
|
|
@@ -304,7 +334,7 @@ sha>`. When the cornerman **approved** it: `node "$RING/scripts/lookout.mjs" app
|
|
|
304
334
|
9. **A concept that needs a new or changed endpoint, database model or native surface** goes
|
|
305
335
|
contract first (§2b) before any implementation.
|
|
306
336
|
|
|
307
|
-
If the wrestler is cut off (API error, limit), send it
|
|
337
|
+
If the wrestler is cut off (API error, limit), send it `brief.mjs wrestler <pr> --mode cutoff`. If the
|
|
308
338
|
whole session restarted, see §5.
|
|
309
339
|
|
|
310
340
|
## 2b · Contract first: the API and the database models are the judge's
|
|
@@ -495,8 +525,9 @@ and runs the fixes through this same cycle (§2).
|
|
|
495
525
|
unreviewed commits, open rebounds, decisions and the judges card. Read the rulebook and both precedent files in full again (§0.4).
|
|
496
526
|
3. Review the unreviewed commits first (§2.1–2.4).
|
|
497
527
|
4. A new session cannot talk to the old wrestler: its agent id does not survive. Relaunch it
|
|
498
|
-
**without `isolation`**, on the existing worktree, with
|
|
499
|
-
`
|
|
528
|
+
**without `isolation`**, on the existing worktree, with
|
|
529
|
+
`brief.mjs wrestler <pr> --mode resume --vars <file>` (add `nextConcept` to your values) and
|
|
530
|
+
the model and effort it prints.
|
|
500
531
|
5. Restart the lookout (§3) and carry on with the cycle.
|
|
501
532
|
|
|
502
533
|
For unattended work (the human goes to sleep), use `/ring:no-surrender` on top of an active bout.
|
|
@@ -106,7 +106,35 @@ https://refactoring.guru/design-patterns), citing the measured `file:line`. A pa
|
|
|
106
106
|
when it is simpler than the conditional it removes; a discarded pattern is written down with its
|
|
107
107
|
reason so it is not proposed again. Example: five chained `if`s assigning a number, with the
|
|
108
108
|
exclusivity rule repeated in three files, become one `AssignmentRule` per rule, reused by the
|
|
109
|
-
backfill.
|
|
109
|
+
backfill. The same for code that names each channel, provider or flavor it serves (`if chat … if
|
|
110
|
+
voice … if whatsapp`): the core does not know which ones exist; each one is a strategy it delegates
|
|
111
|
+
to, and effects between them travel as events (publish and subscribe).
|
|
112
|
+
|
|
113
|
+
**R23. A ternary that fills a gap means the gap should not exist.** `x ? x : []`, `x ?? []` repeated
|
|
114
|
+
downstream or a `map` guarded against `undefined` say the value was born optional when it has a
|
|
115
|
+
default: the default lives where the value is born (an empty list, not an optional list), and the
|
|
116
|
+
code downstream stops asking. Every ternary that stays names its two business cases; one that
|
|
117
|
+
cannot is replaced by a named function or a strategy (R22).
|
|
118
|
+
|
|
119
|
+
**R24. Types come from their source.** A shape the SDK, the API spec or a validation schema already
|
|
120
|
+
defines is imported or derived from it (generated types, the schema's inferred type, the SDK's own
|
|
121
|
+
enums), never rewritten by hand, so it follows the source when the source changes. Closed sets of
|
|
122
|
+
strings (statuses, operations, channels) are those constants or value objects (R6), never loose
|
|
123
|
+
literals compared in an `if`.
|
|
124
|
+
|
|
125
|
+
**R25. What a provider returns crosses an anti-corruption layer.** A provider's response is
|
|
126
|
+
validated and transformed at the edge, by a schema, into our own model; neither the domain nor the
|
|
127
|
+
client ever receives the raw response. An optional field of the provider is optional only with the
|
|
128
|
+
evidence of when it does not arrive (the provider's docs, a captured response), never by
|
|
129
|
+
assumption.
|
|
130
|
+
|
|
131
|
+
**R26. Business metrics are not monitoring.** Product analytics records business events, each one
|
|
132
|
+
naming the business question it answers; errors go to the monitoring tool (error tracking,
|
|
133
|
+
alarms, F4). A failed operation is not a business event, and an error is never tracked as one.
|
|
134
|
+
|
|
135
|
+
**R27. A cross-cutting precondition is checked once, where it is born.** The selected workspace,
|
|
136
|
+
the session, the tenant: validated at one global point (a guard, a provider, a resolver), not in
|
|
137
|
+
every component, hook or handler that uses it (R8).
|
|
110
138
|
|
|
111
139
|
## T · Tests as a contract
|
|
112
140
|
|
|
@@ -221,8 +249,10 @@ decides it and records why, or, for the hard list or under `delegation: "human"`
|
|
|
221
249
|
human with two options, their cost and a recommendation. Meanwhile the author does not touch that
|
|
222
250
|
part and works on something else.
|
|
223
251
|
|
|
224
|
-
**P10.
|
|
225
|
-
|
|
252
|
+
**P10. Model and effort by role**: whoever writes runs on the cheaper model at high effort (the
|
|
253
|
+
wrestler and the rudo on Sonnet); whoever orchestrates, reviews or gives feedback runs on the
|
|
254
|
+
strongest model at high effort. The host can change either per role (`agents` in
|
|
255
|
+
`.claude/ring.json`). Set both explicitly on every launch; never let them be inherited.
|
|
226
256
|
|
|
227
257
|
**P11. When the host forbids them (`forbidAiTrailers`, the default), commits carry no AI
|
|
228
258
|
attribution trailers**; human co-authors are always fine. Stage by explicit paths.
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
you read: cite the lines of the moment. Rulebook `<absolute rulebook path>`.
|
|
1
|
+
Mode: **batch**. Read only. Worktree `{{worktree}}` at its live HEAD; the tree may change while
|
|
2
|
+
you read: cite the lines of the moment. The decisions taken are near the end of this brief and the
|
|
3
|
+
rules after them, at its end (the architecture checklist first). Ring scripts `{{ring}}/scripts`
|
|
4
|
+
(the format gate is `format-gate.mjs` there).
|
|
6
5
|
|
|
7
6
|
Files (≤20):
|
|
8
|
-
|
|
7
|
+
{{files}}
|
|
8
|
+
|
|
9
|
+
Review in two passes and report both together.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
1. **Sweep.** Read each file whole, then go through it lens by lens, every lens of this venue:
|
|
12
|
+
{{lenses}}. Report everything wrong you find, production risk and behavior as much as design.
|
|
13
|
+
There is no cap on findings, and a problem no rule fits is still a finding.
|
|
14
|
+
2. **Checklist.** Go over the architecture checklist at the end of this brief against each file
|
|
15
|
+
and add what the sweep missed.
|
|
12
16
|
|
|
13
|
-
Return per file the findings
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
Return per file the findings, one per line, as `<file:line> — <rule id> — <what is wrong> — <how
|
|
18
|
+
it must be>`. The rule id is one from the rules at the end of this brief, or `X0` when none covers
|
|
19
|
+
it: never drop a finding because no rule fits (the referee registers each line with
|
|
20
|
+
`findings.mjs add --source batch --file`, which refuses a line without a valid id). Then the
|
|
21
|
+
**open design questions**, numbered, each with two options, their cost and your recommendation.
|
|
@@ -1,44 +1,42 @@
|
|
|
1
|
-
<!-- Agent{subagent_type: "ring:cornerman", effort: "high"}. When a concept closes. -->
|
|
2
|
-
|
|
3
1
|
Mode: **concept**. You are the high-effort reviewer. Read only: no edits, no commits, no index or
|
|
4
2
|
tree writes in the wrestler's worktree.
|
|
5
3
|
|
|
6
|
-
Worktree
|
|
7
|
-
|
|
4
|
+
Worktree `{{worktree}}`, base `{{base}}`, range `{{range}}`. The decisions taken are near the end of
|
|
5
|
+
this brief and the rules after them, at its end. Ring scripts `{{ring}}/scripts`.
|
|
8
6
|
|
|
9
|
-
Commits
|
|
10
|
-
|
|
7
|
+
Commits of the concept:
|
|
8
|
+
{{commits}}
|
|
11
9
|
|
|
12
|
-
Author claims to verify against the base:
|
|
10
|
+
Author claims to verify against the base: {{claims}}
|
|
13
11
|
|
|
14
12
|
**Behavior: what matters most; any change is a BLOCKER.** Invariants, numbered:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
and the path of an export of that node made after its last change. Compare the screenshots of the venue's matrix against them:
|
|
31
|
-
<design file · node id · measurements · export path · screenshots>. A difference not listed by the
|
|
32
|
-
author is a finding; text is judged by the node's content, never by a layer name.
|
|
13
|
+
{{invariants}}
|
|
14
|
+
Base test assertions: none may change (`git show {{base}}:<path>` before calling it a blocker).
|
|
15
|
+
|
|
16
|
+
How to test: `git -C {{worktree}} archive <tip> | tar -x -C <new temp dir>`; install there if
|
|
17
|
+
needed; only the tests of the area, each through `node {{ring}}/scripts/one-at-a-time.mjs run --
|
|
18
|
+
<command>`; never a test run and a typecheck at the same time. For a pure-calculation refactor, a
|
|
19
|
+
differential check old vs new that fails if you remove the key piece.
|
|
20
|
+
|
|
21
|
+
**Design, the whole concept at once** (what a range-by-range review cannot see): read the concept
|
|
22
|
+
as one piece through the lenses of this venue, {{lenses}}. An anemic aggregate built across several
|
|
23
|
+
commits, a dependency that points outward once the pieces are together, a condition repeated
|
|
24
|
+
across the files of the concept: each is a finding with its rule id.
|
|
25
|
+
|
|
26
|
+
**Design of a screen (UI venues):** {{designReference}}. A difference from the reference not
|
|
27
|
+
listed by the author is a finding; text is judged by the node's content, never by a layer name.
|
|
33
28
|
|
|
34
29
|
**Leftovers (every concept close):**
|
|
30
|
+
|
|
35
31
|
- Symbols left without production callers: grep, on your copy, every exported or public symbol the
|
|
36
32
|
range touched and every symbol whose caller the range deleted; one used only by its own spec, or
|
|
37
33
|
by nobody, is dead code.
|
|
38
|
-
- Narrating, stale or now-wrong comments in the files the assignment covers:
|
|
39
|
-
ones this range did not edit.
|
|
40
|
-
- Commit messages of the range (`git -C
|
|
34
|
+
- Narrating, stale or now-wrong comments in the files the assignment covers: {{leftoverPaths}},
|
|
35
|
+
including the ones this range did not edit.
|
|
36
|
+
- Commit messages of the range (`git -C {{worktree}} log --format=%B {{range}}`) carrying bout ids
|
|
41
37
|
(D12, P7, HP3, PR5…).
|
|
42
38
|
|
|
43
|
-
Return: a table per file
|
|
44
|
-
totals, and a one-line verdict:
|
|
39
|
+
Return: a table per file (one finding per row, `| <file:line> | <rule id> | <what> | <how> |`), a
|
|
40
|
+
table per invariant (holds / broken + evidence), the leftovers, totals, and a one-line verdict:
|
|
41
|
+
`APPROVED` or `REBOUND: <n> blockers, <m> fixes`. Every finding cites one of the rules at the end of this brief, or
|
|
42
|
+
`X0` when none covers it.
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
<!-- Agent{subagent_type: "ring:cornerman", effort: "high"} -->
|
|
2
|
-
|
|
3
1
|
Mode: **range**. Read only: no edits, no commits, no index or tree writes in any worktree.
|
|
4
2
|
|
|
5
|
-
Worktree
|
|
6
|
-
`git -C
|
|
7
|
-
the decisions
|
|
3
|
+
Worktree `{{worktree}}`, base `{{base}}`, range `{{range}}`. Review each commit with
|
|
4
|
+
`git -C {{worktree}} show <sha>` against the rules at the end of this brief (the architecture
|
|
5
|
+
checklist first) and the decisions at its end. Only the lines these commits add or change. Ring
|
|
6
|
+
scripts `{{ring}}/scripts`.
|
|
7
|
+
|
|
8
|
+
Commits of the range:
|
|
9
|
+
{{commits}}
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
Author claims to verify against the base (if a single counter, event or payload changes, it is a
|
|
12
|
+
BLOCKER): {{claims}}
|
|
11
13
|
|
|
12
|
-
Return
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
Return one finding per line, exactly `<file:line> — <rule id> — <what is wrong> — <how it must be>`.
|
|
15
|
+
The rule id is the second field and must be one of the rules at the end of this brief (several as `R11/R22`); a
|
|
16
|
+
finding no rule covers carries `X0`, and the referee proposes the rule it lacks. A changed base
|
|
17
|
+
test assertion or a renamed telemetry event goes first, marked BLOCKER. "<sha>: no findings" when a
|
|
18
|
+
commit complies. No taste, no pre-existing debt. **At most 15 lines.** The referee registers each
|
|
19
|
+
line as a finding (`findings.mjs add --file`), which refuses a line without a valid rule id, so
|
|
20
|
+
never wrap one across lines.
|
|
@@ -1,61 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
Agent{subagent_type: "ring:wrestler", effort: "medium", run_in_background: true}.
|
|
3
|
-
Never `isolation: "worktree"`: that creates a new tree on another branch. -->
|
|
1
|
+
Assignment: {{assignment}}. PR #{{pr}}, branch `{{branch}}`, stack base `{{base}}`.
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
Flow change (P15): {{flowChange}}
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Start with: `git -C <worktree> fetch -q origin && git -C <worktree> checkout -B <branch> origin/<branch>`.
|
|
12
|
-
Ring scripts: `<absolute ring path>/scripts` (one-at-a-time.mjs lives there).
|
|
13
|
-
Bout dir: `<bout dir>`. A helper script you need goes in `<bout dir>/tools/`, never in the repo.
|
|
5
|
+
Worktree: `{{worktree}}`. Your cwd resets: every git command is `git -C {{worktree}} …`.
|
|
6
|
+
Start with: `git -C {{worktree}} fetch -q origin && git -C {{worktree}} checkout -B {{branch}} origin/{{branch}}`.
|
|
7
|
+
Ring scripts: `{{ring}}/scripts` (one-at-a-time.mjs lives there).
|
|
8
|
+
Bout dir: `{{boutDir}}`. A helper script you need goes in `{{boutDir}}/tools/`, never in the repo.
|
|
14
9
|
Write only inside your worktree; never in the main checkout or any other tree.
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Decisions already taken (do not reopen them):
|
|
11
|
+
Rules: the rulebook and the precedents of this venue ({{venue}}) are at the end of this brief, in
|
|
12
|
+
full. They are the ones in force: apply them while you write, not only when a rebound cites them,
|
|
13
|
+
and check the architecture checklist before every commit.
|
|
14
|
+
Decisions already taken (do not reopen them): the excerpt before the rules; the whole
|
|
15
|
+
ledger is `{{boutDir}}/decisions.md`.
|
|
20
16
|
|
|
21
|
-
Comments to address:
|
|
22
|
-
Reference pattern:
|
|
17
|
+
Comments to address: {{comments}}
|
|
18
|
+
Reference pattern: {{referencePattern}}
|
|
23
19
|
|
|
24
|
-
Order of concepts:
|
|
20
|
+
Order of concepts: {{concepts}}
|
|
21
|
+
One commit per theme, never one commit for a whole concept: a removal goes with the tests it
|
|
22
|
+
updates; a behavior change (what the flow-change line names, or an error that now surfaces
|
|
23
|
+
differently) goes in its own commit with the test that pins it (T6); renames and formatting go
|
|
24
|
+
apart from logic.
|
|
25
25
|
Commit locally and never push: when you close 2–3 commits (or ~200 lines), report the range and
|
|
26
26
|
keep going only if I have not stopped you. The PR branch receives what the cornerman approved, and I
|
|
27
|
-
push it; every commit you close is backed up for you to `
|
|
28
|
-
reached, report the range and wait for me.
|
|
27
|
+
push it; every commit you close is backed up for you to `{{backupBranch}}`, approved or not. If
|
|
28
|
+
mask-guard says the review cap is reached, report the range and wait for me.
|
|
29
29
|
|
|
30
|
-
Frozen zones (do not touch):
|
|
31
|
-
WAITING ON THE HUMAN (hard list; do not touch):
|
|
30
|
+
Frozen zones (do not touch): {{frozen}}.
|
|
31
|
+
WAITING ON THE HUMAN (hard list; do not touch): {{waitingOnHuman}}.
|
|
32
32
|
Design doubts go to me, never to the human: I decide them (or escalate them) and tell you.
|
|
33
33
|
|
|
34
34
|
Gates (from `.claude/ring.json`, each through one-at-a-time; a long run such as a battery adds
|
|
35
35
|
`--monitor <id>` when its command does not match a declared monitor, so it shows on the Scorecard):
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
36
|
+
|
|
37
|
+
- typecheck: `{{gateTypecheck}}`
|
|
38
|
+
- tests of what you touched: `{{gateTest}}`
|
|
39
|
+
- lint: `{{gateLint}}`
|
|
39
40
|
|
|
40
41
|
Standing conditions: behavior identical; no base test assertion changes (if one has to, stop and
|
|
41
42
|
tell me first); no new flags or env vars; one heavy command at a time; stage by paths;
|
|
42
|
-
forbidAiTrailers is
|
|
43
|
-
fine); disk floor
|
|
43
|
+
forbidAiTrailers is {{forbidAiTrailers}} (when true, no AI attribution trailers; human co-authors
|
|
44
|
+
are fine); disk floor {{diskFloor}} GB.
|
|
44
45
|
Do NOT run reviewers, review loops or Copilot. Do NOT open ready PRs. Do NOT merge or change bases.
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Resume variant (a new session relaunches the wrestler)
|
|
49
|
-
|
|
50
|
-
Same brief, plus at the top:
|
|
51
|
-
|
|
52
|
-
You are resuming bout #<pr>; the previous wrestler stopped at `<sha>` while working on
|
|
53
|
-
"<last subject>". First `git -C <worktree> status` and `git -C <worktree> diff`: finish and commit
|
|
54
|
-
what was left uncommitted. Then read the open rebounds (`<bout dir>/rebounds.md`) and report the
|
|
55
|
-
commit you are on before continuing with <concept>.
|
|
56
|
-
|
|
57
|
-
## Cut-off variant (the same wrestler lost its connection)
|
|
58
|
-
|
|
59
|
-
The API cut you off mid-edit (you were on "<last subject>"). `git status` and `git diff`, finish
|
|
60
|
-
what was left uncommitted, commit it, read the last rebound (`<bout dir>/rebounds.md`) and report
|
|
61
|
-
the commit you are on.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
The API cut you off mid-edit (you were on "{{lastSubject}}", at `{{headSha}}`). `git -C {{worktree}} status`
|
|
2
|
+
and `git -C {{worktree}} diff`, finish what was left uncommitted, commit it, read the last rebound
|
|
3
|
+
(`{{boutDir}}/rebounds.md`) and report the commit you are on. The rules you work by are the ones
|
|
4
|
+
your first brief embedded; nothing about them changed.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
You are a new wrestler on bout #{{pr}}. The previous one stopped at `{{headSha}}` ("{{lastSubject}}").
|
|
2
|
+
First `git -C {{worktree}} status` and `git -C {{worktree}} diff`: finish and commit what was left
|
|
3
|
+
uncommitted. Then read the open rebounds (`{{boutDir}}/rebounds.md`) and report the commit you are
|
|
4
|
+
on before continuing with {{nextConcept}}.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sparring
|
|
3
|
-
description: Opens a sparring, a quick and deliberately low-quality draft (one PR per repo it touches, back and front included) that only proves whether a feature is worth building, before anyone pays for building it well. A rudo per repo (effort
|
|
3
|
+
description: Opens a sparring, a quick and deliberately low-quality draft (one PR per repo it touches, back and front included) that only proves whether a feature is worth building, before anyone pays for building it well. A rudo per repo (Sonnet at effort high by default) writes it inside a timebox in its own worktree; the draft PR (labels sparring + do-not-merge) is the event the host project's CI catches to deploy a preview; credentials travel by name only. The judge calls KO, rematch or discard, in two out of three falls: a KO passes the host gates (vestidor), faces the team's Tapes until a bell (unless «sin equipo»), keeps or loses the mask, and then hands each branch to a ring bout. Invoke with `/ring:sparring <idea | Linear ticket>`, `/ring:sparring preview <slug>`, `/ring:sparring verdict <slug>`, `/ring:sparring list`, "make a quick draft of this to try it", "spar this feature first".
|
|
4
4
|
argument-hint: '<idea | ticket> | preview <slug> | verdict <slug> | vestidor <slug> | list'
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -122,7 +122,8 @@ defense|bell|mask-kept|mask-lost|no-team` the rest).
|
|
|
122
122
|
for its repo (scope, designs, the other repos and what they exchange):
|
|
123
123
|
|
|
124
124
|
```
|
|
125
|
-
Agent{subagent_type: "ring:rudo",
|
|
125
|
+
Agent{subagent_type: "ring:rudo", model: "<config.agents.rudo.model>",
|
|
126
|
+
effort: "<config.agents.rudo.effort>", run_in_background: true,
|
|
126
127
|
description: "Rudo: <slug> <repo>", prompt: <the brief>}
|
|
127
128
|
```
|
|
128
129
|
|
|
@@ -57,8 +57,8 @@ list, judges card, `decisions.md` and `rebounds.md`, and the same `mask-guard` r
|
|
|
57
57
|
`--raw` to see the body as is when something looks off. Add human PR comments (`gh pr view <pr> --comments`).
|
|
58
58
|
**A review whose commit is not the PR head is stale**: it describes code that no longer
|
|
59
59
|
exists; re-request instead of acting on it.
|
|
60
|
-
2. **Verify and classify** with a cornerman in concept mode (`
|
|
61
|
-
|
|
60
|
+
2. **Verify and classify** with a cornerman in concept mode (`brief.mjs cornerman <pr> --mode
|
|
61
|
+
concept`, with the model and effort it prints, read-only), giving it every finding. Each one gets a class and a severity
|
|
62
62
|
with one line of business impact ("a contact is lost", "cross-tenant read", "double side
|
|
63
63
|
effect", "reporting only"):
|
|
64
64
|
- **BUG-INTRODUCED**: this PR created it.
|