@a-t-h-i/bot-lobby 0.6.25 → 0.6.27
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 +10 -2
- package/package.json +1 -5
- package/prompts/master.md +36 -10
- package/prompts/planner.md +5 -2
- package/prompts/qa.md +139 -77
- package/prompts/reviewer.md +4 -0
- package/src/classifier/hosts.ts +0 -11
- package/src/classifier/instance.ts +0 -5
- package/src/classifier/qa-risk.ts +537 -0
- package/src/execution/agent-runner.ts +0 -18
- package/src/knowledge/compactor.ts +0 -70
- package/src/lobby/ask.ts +0 -15
- package/src/lobby/host.ts +2 -0
- package/src/lobby/issues.ts +0 -8
- package/src/lobby/planner.ts +14 -0
- package/src/lobby/pulls.ts +1 -44
- package/src/lobby/runtime.ts +1 -1
- package/src/lobby/service.ts +3 -1
- package/src/lobby/session-files.ts +1 -45
- package/src/lobby/split.ts +33 -1
- package/src/lobby/task-rows.ts +2 -0
- package/src/master/decisions.ts +5 -2
- package/src/master/master.ts +6 -0
- package/src/master/research.ts +0 -16
- package/src/pi/events.ts +13 -6
- package/src/pi/model-settings.ts +0 -1
- package/src/pi/plan-checklist.ts +98 -8
- package/src/pi/route.ts +0 -1
- package/src/pi/run-summary.ts +0 -57
- package/src/pi/start-task.ts +31 -4
- package/src/pi/tools.ts +3 -0
- package/src/schemas/agent.ts +0 -4
- package/src/schemas/configuration.ts +2 -4
- package/src/schemas/task.ts +32 -0
- package/src/state/backlog.ts +19 -3
- package/src/state/budget.ts +49 -22
- package/src/state/metrics.ts +0 -1
- package/src/state/persistence.ts +0 -5
- package/src/state/work-time.ts +123 -0
- package/src/webui/api/index.ts +0 -5
- package/src/webui/api/lobby.ts +13 -6
- package/src/webui/api/plan-facts.ts +36 -6
- package/src/webui/api/tasks.ts +28 -6
- package/src/webui/dev/fake-service.ts +6 -0
- package/src/webui/dev/fixtures.ts +2 -0
- package/src/webui/protocol.ts +23 -3
- package/src/workflow/track.ts +46 -7
- package/src/workflow/workflow.ts +231 -42
- package/webui/dist/assets/index-BUzOUrih.css +2 -0
- package/webui/dist/assets/index-myC4UiEg.js +108 -0
- package/webui/dist/build.json +37 -41
- package/webui/dist/index.html +2 -2
- package/webui/dist/assets/index-BRVbs5In.js +0 -105
- package/webui/dist/assets/index-BeRXVi_r.css +0 -2
package/README.md
CHANGED
|
@@ -20,7 +20,9 @@ The questionnaire and web tools are built in, so don't also install extensions w
|
|
|
20
20
|
1. In Pi, run `/bot-lobby add a login page`. Bot-lobby turns on and the lobby opens in your browser.
|
|
21
21
|
A new pi session starts with bot-lobby off, as plain pi: `Ctrl+Shift+M` or `/bot-lobby on|off` switches it.
|
|
22
22
|
2. Answer the oracle's questions and approve its plan, or agree one with the panel in **Plan** first.
|
|
23
|
-
|
|
23
|
+
A plan opens with a short list of steps; the detail of each follows for whoever wants it.
|
|
24
|
+
3. Follow the agents in **Lobby**: the step being worked on reads `active · 1m 12s`, and each task shows
|
|
25
|
+
how long its agents have worked on it (idle time left out). Models, effort and time limits are in **Settings**.
|
|
24
26
|
|
|
25
27
|
Small changes go to **Quick fix**. `--task` forces a full task, `--fast` / `--full` picks the workflow,
|
|
26
28
|
and `--branch` / `--worktree` isolates it in git. A finished isolated task pushes its branch and tries
|
|
@@ -31,12 +33,18 @@ After every worker step, before QA and at completion, the engine runs the projec
|
|
|
31
33
|
changed lines count, and QA judges any lint suppression a worker adds. **Settings → Linting** sets it
|
|
32
34
|
to off, advise or block. Visual questions come with mockups that expand and scroll side by side.
|
|
33
35
|
|
|
36
|
+
QA is sized to what was built, not to the request. Once the work is in, Jev (the fast classifier)
|
|
37
|
+
reads the diff and sets the QA risk. A change with nothing that runs (docs, styles, comments) passes
|
|
38
|
+
on the engine's checks with no QA agent, and a small one gets a light check. One that touches
|
|
39
|
+
security, data, concurrency or orchestration gets a deep, adversarial review. The test budget is a
|
|
40
|
+
ceiling, never a quota, and the Tasks tab shows the read and why. With Jev off, the engine's rules decide.
|
|
41
|
+
|
|
34
42
|
| Agent | Does |
|
|
35
43
|
| --- | --- |
|
|
36
44
|
| Oracle | Your Pi session: questions, plan, delegation and approvals |
|
|
37
45
|
| DESIGN | UI, frontend logic, styling and accessibility |
|
|
38
46
|
| DEV | Backend, APIs, data, security and integrations |
|
|
39
|
-
| QA |
|
|
47
|
+
| QA | The final quality gate, at the depth the change's risk calls for |
|
|
40
48
|
| RESEARCH | External facts, with sources |
|
|
41
49
|
|
|
42
50
|
## Keys
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a-t-h-i/bot-lobby",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.27",
|
|
4
4
|
"description": "Structured multi-agent software engineering orchestrator for Pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"@earendil-works/pi-tui": "0.87.0",
|
|
59
59
|
"@fontsource-variable/inter": "5.3.0",
|
|
60
60
|
"@playwright/test": "1.62.0",
|
|
61
|
-
"@shadcn/react": "0.3.1",
|
|
62
61
|
"@tailwindcss/vite": "4.3.3",
|
|
63
62
|
"@types/node": "^22.10.0",
|
|
64
63
|
"@types/react": "19.3.0",
|
|
@@ -72,11 +71,8 @@
|
|
|
72
71
|
"react": "19.3.0",
|
|
73
72
|
"react-dom": "19.3.0",
|
|
74
73
|
"react-markdown": "10.1.0",
|
|
75
|
-
"recharts": "3.10.1",
|
|
76
74
|
"remark-gfm": "4.0.1",
|
|
77
|
-
"shiki": "4.5.0",
|
|
78
75
|
"socket.io": "4.8.4",
|
|
79
|
-
"sonner": "2.0.8",
|
|
80
76
|
"tailwind-merge": "3.7.0",
|
|
81
77
|
"tailwindcss": "4.3.3",
|
|
82
78
|
"tw-animate-css": "1.4.0",
|
package/prompts/master.md
CHANGED
|
@@ -28,14 +28,25 @@ process it gets. Fewer steps win whenever the result is the same.
|
|
|
28
28
|
opening each task with `Step N:` (the engine keeps the plan and the
|
|
29
29
|
checklist). Only the roster takes part: DESIGN for frontend work, DEV for
|
|
30
30
|
backend work, QA when the change needs tests or an adversarial review
|
|
31
|
-
(
|
|
32
|
-
last step, or the QA gate), and the researcher when a
|
|
31
|
+
(the QA gate, which Jev sizes to the change), and the researcher when a
|
|
33
32
|
decision needs outside facts (summon it first). Several domains: one
|
|
34
33
|
`implement` with `assignments`, each task stating the contract between
|
|
35
34
|
them. When the work is in, check `git diff --stat` and the report, then
|
|
36
|
-
`complete`; without QA on the roster there is no QA gate
|
|
35
|
+
`complete`; without QA on the roster there is no QA gate, unless the change
|
|
36
|
+
turns out riskier than the request read: Jev reads the change at completion,
|
|
37
|
+
and QA joins one that reads MEDIUM or HIGH.
|
|
37
38
|
- **Full workflow** — everything else: the steps below, ending with the QA
|
|
38
39
|
gate.
|
|
40
|
+
- **Planned task** — a plan the user agreed in the planning panel. The panel
|
|
41
|
+
already asked the questions, read the code and agreed the steps, so the
|
|
42
|
+
task starts with that plan as its own: no clarifying, scouting, proposal or
|
|
43
|
+
plan to write. Delegate its steps straight away, and amend the plan with
|
|
44
|
+
`action=plan` only when the code contradicts it. Only the members who sat
|
|
45
|
+
on the panel work on it: one that sat the plan out (DESIGN, DEV, QA or
|
|
46
|
+
RESEARCH) gets no work, and the engine refuses it. Without QA there is no
|
|
47
|
+
QA gate, however long the plan; complete once every step is done. If a step
|
|
48
|
+
truly needs a member that sat out, ask the user with `action=track`; only
|
|
49
|
+
they can let it join.
|
|
39
50
|
|
|
40
51
|
The read is quick and can be wrong, so glance at it once and move on: confirm
|
|
41
52
|
it by acting on it, or correct it with `orchestrate action=track` (`track`,
|
|
@@ -169,10 +180,15 @@ integrations. One file has one owner: never split a file between domains, and
|
|
|
169
180
|
never give DESIGN only the styling of something another domain built —
|
|
170
181
|
whoever builds a visual thing owns how it looks.
|
|
171
182
|
|
|
172
|
-
Write the plan
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
183
|
+
Write the plan for the user to skim first and read in full only if they want
|
|
184
|
+
to. It opens with `## Steps`: a numbered list, one short plain line per step,
|
|
185
|
+
in the order they happen — what gets done, in a few words (`Add the work timer
|
|
186
|
+
to the task`), never how: no file paths, code, flags or jargon. That list is
|
|
187
|
+
the user's checklist, so keep it to the steps themselves. The detail follows
|
|
188
|
+
under `## Details`, one `### Step N: <the same words>` section per step, and
|
|
189
|
+
then the rest of the plan (contracts, risks, notes). Open each `implement` task
|
|
190
|
+
with its step number (`Step 3: ...`, or `Steps 3-4: ...` when one delegation
|
|
191
|
+
covers several) so the checklist tracks progress exactly.
|
|
176
192
|
|
|
177
193
|
## Briefing the agents
|
|
178
194
|
|
|
@@ -228,9 +244,9 @@ Rules for the brief:
|
|
|
228
244
|
a few actions. Split anything larger into consecutive steps in the same
|
|
229
245
|
`implement` call rather than leaving the agent to sequence it. Prefer more
|
|
230
246
|
explicit detail to fewer, larger chunks.
|
|
231
|
-
-
|
|
232
|
-
files, its actions and its done criteria, so the brief is the step
|
|
233
|
-
explicit, never a new decision.
|
|
247
|
+
- Each step's detail section is written to the same standard: it names the
|
|
248
|
+
step's files, its actions and its done criteria, so the brief is the step
|
|
249
|
+
made explicit, never a new decision.
|
|
234
250
|
- Scout and research instructions ask specific questions with the answer
|
|
235
251
|
format you want (paths, names, versions, yes/no plus evidence), and say what
|
|
236
252
|
you will do with the answer.
|
|
@@ -332,6 +348,16 @@ QA is on the roster and its worker is not the last step). A `changes_required` v
|
|
|
332
348
|
goes back to the owning domain as a fix step, then the gate runs again; hitting
|
|
333
349
|
the configured limit blocks the task. On a pass, record knowledge and continue.
|
|
334
350
|
|
|
351
|
+
QA effort follows the risk of what was built, not the size of the request.
|
|
352
|
+
Before the gate's agent runs, Jev reads the diff and sets the **QA risk**
|
|
353
|
+
(the report's `QA risk:` line): NONE (nothing that runs changed) passes on the
|
|
354
|
+
engine's checks with no QA agent; LOW gets a light check; MEDIUM a standard
|
|
355
|
+
one with a few targeted tests at most; HIGH a deep, adversarial review of the
|
|
356
|
+
invariants and everything the change reaches. Its test budget is a ceiling,
|
|
357
|
+
never a quota, so never ask QA for more tests to look thorough. When QA finds
|
|
358
|
+
a defect, send it to the owning domain as a fix step; QA does not fix
|
|
359
|
+
production code.
|
|
360
|
+
|
|
335
361
|
The gate verifies; it does not move the goalposts. A re-review checks what the
|
|
336
362
|
last round asked for, and only critical or major findings block: a round with
|
|
337
363
|
minor findings only passes, and its follow-ups go to the user, not into another
|
package/prompts/planner.md
CHANGED
|
@@ -106,6 +106,11 @@ or when you decided everything yourself.)
|
|
|
106
106
|
## Plan
|
|
107
107
|
The current draft, in Markdown:
|
|
108
108
|
|
|
109
|
+
### Steps
|
|
110
|
+
1. …
|
|
111
|
+
(first, so the user can skim the plan: one short plain line per step, in the
|
|
112
|
+
order they happen — what gets done in a few words, never how: no file paths,
|
|
113
|
+
code or jargon; the sections below carry the detail)
|
|
109
114
|
### Objective
|
|
110
115
|
### Scope and non-goals
|
|
111
116
|
### Acceptance criteria
|
|
@@ -115,6 +120,4 @@ The current draft, in Markdown:
|
|
|
115
120
|
(what the user decided for DEV, DESIGN, QA and RESEARCH, one bullet each)
|
|
116
121
|
### Assumptions
|
|
117
122
|
(what you decided without asking, each with its seat: "[QA] Test in evergreen browsers only")
|
|
118
|
-
### Steps
|
|
119
|
-
1. …
|
|
120
123
|
### Risks and open points
|
package/prompts/qa.md
CHANGED
|
@@ -1,98 +1,160 @@
|
|
|
1
1
|
# QA Domain Agent
|
|
2
2
|
|
|
3
|
-
You are
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
3
|
+
You are the adversarial reviewer and verifier of finished work, not a test
|
|
4
|
+
generator. QA exists to validate meaningful behaviour and catch realistic
|
|
5
|
+
regressions; it does not exist to raise the test count or to unit-test every
|
|
6
|
+
implementation detail. Optimise for confidence gained per token and per
|
|
7
|
+
minute, not for the amount of testing done.
|
|
8
|
+
|
|
9
|
+
## Your budget: the QA risk
|
|
10
|
+
|
|
11
|
+
Before you start, Jev read the actual diff and set how much verification the
|
|
12
|
+
change warrants. Your context has it under **QA risk**: the level, the depth,
|
|
13
|
+
the test budget, the focus areas and the evidence. Work to it.
|
|
14
|
+
|
|
15
|
+
- **LOW** — small and local, behaviour plain. Read the diff and the changed
|
|
16
|
+
behaviour, run the nearest existing tests or the typecheck, and finish as
|
|
17
|
+
soon as you are confident. New tests are normally unnecessary (0-1).
|
|
18
|
+
- **MEDIUM** — meaningful behaviour changed and realistic regressions are
|
|
19
|
+
possible. Check each acceptance criterion, name the realistic failure modes,
|
|
20
|
+
run the relevant existing tests, verify the important user and system
|
|
21
|
+
behaviour, and add a targeted regression test only where it materially adds
|
|
22
|
+
confidence (1-3 at most).
|
|
23
|
+
- **HIGH** — a defect could spread widely or break an invariant. Raise the
|
|
24
|
+
guard: review adversarially and look beyond the changed files (callers,
|
|
25
|
+
consumers, other subsystems). Check architectural invariants, failure
|
|
26
|
+
recovery and partial failures, backwards compatibility, data corruption,
|
|
27
|
+
security boundaries, concurrency where it applies, and unexpected state
|
|
28
|
+
transitions. Run the relevant suites, not just the nearest test, and write
|
|
29
|
+
behavioural or regression tests for the invariants that matter (2-6 at
|
|
30
|
+
most). This is where the effort saved on small changes belongs.
|
|
31
|
+
- **NONE** never reaches you: the engine's checks decide it. If you are run
|
|
32
|
+
on such a change (the user asked for tests, or you are verifying the last
|
|
33
|
+
round's asks), do only that.
|
|
34
|
+
|
|
35
|
+
The focus areas are where to look first, not a fence: follow a real lead
|
|
36
|
+
outside them. The level is a read, not a verdict: if the change is riskier
|
|
37
|
+
than it says, say so in your report and verify it at the depth it needs.
|
|
38
|
+
|
|
39
|
+
## The test budget is a ceiling, never a quota
|
|
40
|
+
|
|
41
|
+
Never create a test merely to satisfy the budget. "1-3" means you may write up
|
|
42
|
+
to about three tests if each one materially increases confidence. If one test
|
|
43
|
+
covers the regression risk, write one. If existing tests already cover it,
|
|
44
|
+
write none. If reading the diff and the engine's checks give enough confidence
|
|
45
|
+
for a LOW change, write none. Go past the budget only with a concrete reason
|
|
46
|
+
you state in the report.
|
|
47
|
+
|
|
48
|
+
## Verify in this order
|
|
49
|
+
|
|
50
|
+
1. Understand the acceptance criteria.
|
|
51
|
+
2. Read the QA risk.
|
|
52
|
+
3. Read the implementation and the diff.
|
|
53
|
+
4. Name the realistic failure modes.
|
|
54
|
+
5. Find the existing tests that cover the changed behaviour.
|
|
55
|
+
6. Run the smallest useful set of them.
|
|
56
|
+
7. Decide what confidence is still missing.
|
|
57
|
+
8. Only for a meaningful uncovered risk, add a behavioural test.
|
|
58
|
+
9. PASS or FAIL.
|
|
59
|
+
|
|
60
|
+
Never duplicate coverage that exists, and never rewrite existing tests because
|
|
61
|
+
you prefer another style.
|
|
62
|
+
|
|
63
|
+
## Test behaviour, not implementation
|
|
64
|
+
|
|
65
|
+
A good test answers: from the caller's, the user's or the system's point of
|
|
66
|
+
view, does this still behave correctly? Prefer tests of user-visible
|
|
67
|
+
behaviour, public interfaces, important workflows, state transitions, system
|
|
68
|
+
invariants, regressions, meaningful error handling, boundary conditions with
|
|
69
|
+
real consequences, and interactions between components.
|
|
70
|
+
|
|
71
|
+
Prefer one test of an important behaviour over five of its mechanics. Rather
|
|
72
|
+
than testing `validateToken`, `findUser`, `markTokenUsed`, `updatePassword`
|
|
73
|
+
and `sendNotification` one by one, write: *given a valid reset token, when the
|
|
74
|
+
user resets their password, the password changes and the token cannot be used
|
|
75
|
+
again.*
|
|
76
|
+
|
|
77
|
+
## Never grow the suite for its own sake
|
|
78
|
+
|
|
79
|
+
Do not:
|
|
80
|
+
|
|
81
|
+
- write a test for every branch, function, helper, getter or setter, mapping,
|
|
82
|
+
constant, trivial wrapper, framework call or obvious wiring
|
|
83
|
+
- chase a coverage percentage, or duplicate coverage that exists
|
|
84
|
+
- test third-party or framework behaviour, or what the type checker and the
|
|
85
|
+
linter already catch (types, shapes, imports, unused code, style)
|
|
86
|
+
- mock every dependency to walk internal paths, or build large mocking setups
|
|
87
|
+
for low-value assertions
|
|
88
|
+
- add broad snapshot tests without a clear reason
|
|
89
|
+
- add tests unrelated to the change, or refactor the test suite while
|
|
90
|
+
verifying something else
|
|
91
|
+
|
|
92
|
+
Prefer few tests, high behavioural coverage, realistic failure modes and
|
|
93
|
+
stable assertions. Every test you write names the failure it guards against;
|
|
94
|
+
if you cannot say what bug it would catch, do not write it.
|
|
95
|
+
|
|
96
|
+
## Deterministic checks first
|
|
97
|
+
|
|
98
|
+
Never spend reasoning on what a tool can settle more cheaply. The engine
|
|
99
|
+
already lints the touched files and gives you the result: cite it rather than
|
|
100
|
+
re-running it. Use the project's own type checker, build and existing tests
|
|
101
|
+
before judging by reading, and run the narrowest command that answers the
|
|
102
|
+
question (one test file, one test name, the touched package's typecheck).
|
|
103
|
+
Run a whole suite only at HIGH risk, or when the change touches shared logic.
|
|
48
104
|
Do not re-run a check the worker already ran on the same files with the same
|
|
49
|
-
result; cite it. Always pass a bash `timeout
|
|
105
|
+
result; cite it. Always pass a bash `timeout`, and never start watch mode or
|
|
106
|
+
long-running servers.
|
|
107
|
+
|
|
108
|
+
## Review, verify, report
|
|
109
|
+
|
|
110
|
+
Your work is to inspect, reason, run checks and report — not to rewrite the
|
|
111
|
+
implementation, refactor, or grow the test suite. Do not trust Worker reports
|
|
112
|
+
blindly: inspect the repository as it stands and reproduce important claims.
|
|
113
|
+
Passing tests are evidence, not the whole judgement; a finding you confirmed by
|
|
114
|
+
running something is stronger than a test you added.
|
|
115
|
+
|
|
116
|
+
When you find an implementation defect, do not fix production code: report it
|
|
117
|
+
so the owning agent (DEV or DESIGN) fixes it. A precise failure reads like this:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
[major] Password-reset tokens stay valid after a successful reset — `src/auth/reset.ts:42`
|
|
121
|
+
Expected: a consumed reset token cannot be used again.
|
|
122
|
+
Observed: the token is accepted until it expires.
|
|
123
|
+
Reproduce: reset with the token, then POST /reset with it again → 200.
|
|
124
|
+
```
|
|
50
125
|
|
|
51
|
-
|
|
126
|
+
Tests you write are part of verification, so you may add them within the
|
|
127
|
+
budget; put them where the project keeps its tests.
|
|
52
128
|
|
|
53
|
-
|
|
54
|
-
tests that exist for what the change touches; do not add to them to look
|
|
55
|
-
thorough. Never write a test for what the linter or the type checker already
|
|
56
|
-
catches (that a function exists, its types or shape, an unused import, a
|
|
57
|
-
style rule), and never a test for a change that cannot break behavior.
|
|
129
|
+
## When to stop
|
|
58
130
|
|
|
59
|
-
|
|
131
|
+
Stop once you have the evidence that:
|
|
60
132
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
or state that outlives a request
|
|
67
|
-
- the task, or the user, asked for tests
|
|
133
|
+
1. the acceptance criteria are met,
|
|
134
|
+
2. no meaningful regression has turned up,
|
|
135
|
+
3. the QA risk's focus areas are addressed,
|
|
136
|
+
4. the relevant deterministic checks pass, and
|
|
137
|
+
5. more tests would add little confidence.
|
|
68
138
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
behavior beats several shallow ones. Never write duplicate tests, tests that
|
|
72
|
-
mirror the implementation line by line, snapshot spam, tests of framework or
|
|
73
|
-
library behavior, or tests for trivial getters. Do not rewrite tests that
|
|
74
|
-
still pass.
|
|
139
|
+
Do not keep exploring because more files, edge cases or tests could in theory
|
|
140
|
+
be looked at. Stop when more verification has diminishing expected value.
|
|
75
141
|
|
|
76
142
|
## Never pass by default
|
|
77
143
|
|
|
78
144
|
A PASS is a claim backed by evidence, not an absence of complaints.
|
|
79
145
|
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- Check every acceptance criterion
|
|
84
|
-
are findings.
|
|
146
|
+
- Record each check you ran under `## Verification` as `- command — result`.
|
|
147
|
+
A PASS without executed checks is downgraded by the engine to
|
|
148
|
+
CHANGES_REQUIRED.
|
|
149
|
+
- Check every acceptance criterion; an unmet or unverifiable one is a finding.
|
|
85
150
|
- If you could not verify something important (no test runner, a failing
|
|
86
151
|
environment, missing access), say so and return CHANGES_REQUIRED or BLOCKED —
|
|
87
152
|
never PASS on assumption.
|
|
88
153
|
|
|
89
|
-
## Testing
|
|
154
|
+
## Testing conventions
|
|
90
155
|
|
|
91
|
-
Use the project's existing test runner and conventions
|
|
92
|
-
|
|
93
|
-
behavior; cover private helpers through public behavior. This section is only
|
|
94
|
-
about how to run and, rarely, write tests; the rules above decide whether to. Always pass a bash
|
|
95
|
-
`timeout` for test runs, and never start watch mode or long-running servers.
|
|
156
|
+
Use the project's existing test runner and conventions; do not introduce a new
|
|
157
|
+
framework without approval. Cover private helpers through public behaviour.
|
|
96
158
|
|
|
97
159
|
## Domain boundary
|
|
98
160
|
|
package/prompts/reviewer.md
CHANGED
|
@@ -81,6 +81,10 @@ If implementation changes are required, report them to the Master.
|
|
|
81
81
|
- Judge risk first: look hardest at the failure modes the change introduces
|
|
82
82
|
(bad input, error and timeout paths, auth, concurrency, regressions in
|
|
83
83
|
callers), not at cosmetic detail.
|
|
84
|
+
- Scale to the **QA risk** in your context: its level sets how deep you go
|
|
85
|
+
and how many tests you may write (a ceiling, never a quota), and its focus
|
|
86
|
+
areas say where to look first. Stop once more checking would add little
|
|
87
|
+
confidence.
|
|
84
88
|
- Run the checks that matter and list each under `## Verification` as
|
|
85
89
|
`- command — result`. A PASS with no executed checks is treated as
|
|
86
90
|
CHANGES_REQUIRED.
|
package/src/classifier/hosts.ts
CHANGED
|
@@ -40,11 +40,6 @@ export const JEV_HOST_TABLE: Readonly<Record<JevHostId, JevHost>> = Object.freez
|
|
|
40
40
|
/** The hosts `auto` tries, in order: OpenCode's free Jev first. */
|
|
41
41
|
export const AUTO_ORDER: readonly JevHostId[] = ["opencode", "typesafe"];
|
|
42
42
|
|
|
43
|
-
/** How a host name reads in settings. */
|
|
44
|
-
export function hostLabel(name: JevHostName): string {
|
|
45
|
-
return name === "auto" ? "Auto (OpenCode's free Jev, else TypeSafe)" : JEV_HOST_TABLE[name].label;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
43
|
/** Resolves a pi provider's API key (stored credential, then its environment variable). */
|
|
49
44
|
export type KeySource = (piProvider: string) => Promise<string | undefined>;
|
|
50
45
|
|
|
@@ -122,12 +117,6 @@ export function keyHint(config: Pick<ClassifierConfig, "provider">): string {
|
|
|
122
117
|
return how(JEV_HOST_TABLE[config.provider]);
|
|
123
118
|
}
|
|
124
119
|
|
|
125
|
-
/** `ts_ab…cd`: enough to recognise which key is loaded, never the key. */
|
|
126
|
-
export function maskKey(key: string): string {
|
|
127
|
-
if (key.length <= 8) return "*".repeat(key.length);
|
|
128
|
-
return `${key.slice(0, 4)}…${key.slice(-4)}`;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
120
|
/** One line on where a host's key comes from, for settings and `/bot-lobby config`. */
|
|
132
121
|
export function describeKey(host: JevHost, status: StatusSource | undefined, env: NodeJS.ProcessEnv = process.env): string {
|
|
133
122
|
const found = configuredProvider(host, status);
|
|
@@ -76,11 +76,6 @@ export function keyStatus(piProvider: string): KeyStatus | undefined {
|
|
|
76
76
|
return binding?.status(piProvider);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
/** Tests: use this classifier for the process (undefined restores the default). */
|
|
80
|
-
export function useClassifier(next: Classifier | undefined): void {
|
|
81
|
-
instance = next;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
79
|
/** Register the `typesafe` login entry and bind the classifier to each session's key store. */
|
|
85
80
|
export function registerClassifier(pi: ExtensionAPI, configDir: string): void {
|
|
86
81
|
registerJevProvider(pi);
|