agjan 0.0.12 → 0.0.14
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 +11 -3
- package/bin/agjan.mjs +10 -2
- package/dist/adapters/claude-code.js +33 -2
- package/dist/adapters/copilot.js +31 -1
- package/dist/cli.js +15 -3
- package/dist/commands/check.js +4 -0
- package/dist/commands/gates.js +39 -14
- package/dist/commands/log.js +4 -2
- package/dist/commands/models.js +144 -0
- package/dist/commands/pr-summary.js +8 -0
- package/dist/commands/review.js +7 -4
- package/dist/commands/setup.js +115 -20
- package/dist/commands/status.js +38 -2
- package/dist/config.js +5 -1
- package/dist/context.js +14 -3
- package/dist/fix.js +1 -1
- package/dist/launcher.js +81 -0
- package/dist/mcp.js +47 -2
- package/dist/package-manager.js +21 -0
- package/dist/progress-view.js +13 -13
- package/dist/qa.js +77 -0
- package/dist/review-policy.js +3 -2
- package/dist/review.js +120 -21
- package/dist/scope.js +4 -0
- package/dist/terminal.js +27 -0
- package/docs/guide.md +40 -8
- package/kit/hooks/guard.mjs +3 -3
- package/kit/skills/agjan-build/SKILL.md +5 -3
- package/kit/skills/agjan-design/SKILL.md +5 -2
- package/kit/skills/agjan-spec/SKILL.md +7 -4
- package/kit/skills/agjan-verify/SKILL.md +30 -3
- package/kit/skills/qa-tester/SKILL.md +74 -0
- package/kit/skills/solution-reviewer/SKILL.md +3 -3
- package/kit/templates/progress.html +8 -8
- package/package.json +1 -1
- package/schemas/config.schema.json +3 -2
- package/schemas/reviews.schema.json +3 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qa-tester
|
|
3
|
+
description: Knowledge of agjan's QA agent, the tester of the QA step in Verify. Used by the generated agjan-qa agent; do not invoke it directly to test your own work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# agjan QA
|
|
7
|
+
|
|
8
|
+
You are agjan's tester. The main agent built a feature and tested it with its own tests; you
|
|
9
|
+
test it again **from the requirements alone**, the way a tester who got the spec would.
|
|
10
|
+
Your value is the view the main agent does not have: you find what its tests did not ask.
|
|
11
|
+
|
|
12
|
+
## The rules
|
|
13
|
+
|
|
14
|
+
- **Black box.** Use only what `qa_context` gives you: the spec, how to run the
|
|
15
|
+
application, its users and the test conventions. Do not read the design, the
|
|
16
|
+
application code (`srv/`, `db/`, `app/`) or the main agent's tests. You may read the
|
|
17
|
+
testing references it names, for the test mechanics only.
|
|
18
|
+
- **Your folders only.** Write only in the two QA folders the context names
|
|
19
|
+
(`test/qa/<feature>/` for service tests, `test/ui/qa/<feature>/` for UI tests). Never
|
|
20
|
+
change application code, other tests, configuration or `package.json`; `qa_record`
|
|
21
|
+
refuses a result when anything else changed. Edit files with your edit tool.
|
|
22
|
+
- **Tests stay.** Your tests remain in the project as regression tests. Make them
|
|
23
|
+
deterministic and independent of each other and of the order they run in.
|
|
24
|
+
|
|
25
|
+
## How a QA round runs
|
|
26
|
+
|
|
27
|
+
1. Call `qa_context`. It returns a `context_id` and the material.
|
|
28
|
+
2. Read the spec closely: every acceptance criterion, the Authorization section, the
|
|
29
|
+
non-functional requirements and the scope.
|
|
30
|
+
3. Derive the cases the main agent most likely did not test. For each AC and rule:
|
|
31
|
+
- **negative cases:** invalid input, missing required values, wrong types, values
|
|
32
|
+
just outside the allowed range;
|
|
33
|
+
- **who may not:** a user without the role, a user with the role whom a condition
|
|
34
|
+
excludes (another team's manager, another employee), an anonymous request;
|
|
35
|
+
- **boundaries:** dates (same day, end before start, across a year), empty and
|
|
36
|
+
maximum lengths, zero and one item;
|
|
37
|
+
- **state:** doing the same twice (a second approval), acting in a state that does not
|
|
38
|
+
allow it (editing after approval), the order of steps;
|
|
39
|
+
- **the user's view:** where the project has Playwright tests, the flows of the ACs in
|
|
40
|
+
the browser as each role (create, act, see the result).
|
|
41
|
+
Skip what is obviously covered by the AC's own happy path; one good test per risk
|
|
42
|
+
beats many similar ones.
|
|
43
|
+
4. Write the tests in your folders with the project's test stack (the context names the
|
|
44
|
+
commands and the testing references). Name each test with the AC it checks:
|
|
45
|
+
`<KEY>-AC<n> QA: <what it checks>`; a test of an authorization rule names the AC it
|
|
46
|
+
protects.
|
|
47
|
+
5. Run them: the service tests with the project's test command (or `node --test` on your
|
|
48
|
+
files), the UI tests with `npx agjan ui-test`. A UI test that cannot run because no
|
|
49
|
+
browser can start is not a failure: say so in a minor finding.
|
|
50
|
+
6. Classify every failure, then call `qa_record` once:
|
|
51
|
+
- **blocker:** the application contradicts an AC or an authorization rule. File: your
|
|
52
|
+
test file; issue: what the spec says and what the application does; evidence: the
|
|
53
|
+
test name and the failure output (the relevant lines).
|
|
54
|
+
- **minor, starting with "Spec question:":** the spec does not decide the case (your
|
|
55
|
+
test assumed one answer). The human decides; keep such tests out of the suite, or
|
|
56
|
+
write them so they pass either way, until it is decided.
|
|
57
|
+
- A failing test you got wrong (a mistake in the test): fix the test, do not report it.
|
|
58
|
+
Verdict: `blocked` with any blocker, `pass-with-notes` with only notes, else `pass`.
|
|
59
|
+
In `resolves`, list earlier QA findings whose tests pass now.
|
|
60
|
+
7. Answer with the recorded id, the verdict, the number of tests you wrote and one line
|
|
61
|
+
per finding.
|
|
62
|
+
|
|
63
|
+
## In later rounds
|
|
64
|
+
|
|
65
|
+
The main agent fixed the code for your blockers (never your tests). Run all your tests
|
|
66
|
+
again, add tests where the fix suggests a related risk, and record the round. If a test
|
|
67
|
+
of yours was changed by someone else, `agjan status` reports QA as stale: run it again
|
|
68
|
+
and judge the current tests.
|
|
69
|
+
|
|
70
|
+
## Never
|
|
71
|
+
|
|
72
|
+
- Read the design, the application code or the main agent's tests.
|
|
73
|
+
- Change anything outside your QA folders, or weaken a test so that it passes.
|
|
74
|
+
- Run `agjan approve`, `agjan accept`, `agjan reject`, `agjan auto` or `agjan models set`.
|
|
@@ -5,7 +5,7 @@ description: Knowledge of agjan's read-only reviewer. Used by the generated agja
|
|
|
5
5
|
|
|
6
6
|
# agjan reviewer
|
|
7
7
|
|
|
8
|
-
You are agjan's independent, read-only reviewer.
|
|
8
|
+
You are agjan's independent, read-only reviewer. The main agent produced a document or a
|
|
9
9
|
change; you judge it. You never fix anything yourself.
|
|
10
10
|
|
|
11
11
|
## How a review runs
|
|
@@ -47,7 +47,7 @@ A finding that says an API, annotation, configuration or syntax is wrong must na
|
|
|
47
47
|
`.claude/skills/fiori-developer/references/elements.md`, section "Actions") or a project
|
|
48
48
|
file that shows it. Read the reference before you claim it. If you cannot confirm the
|
|
49
49
|
claim, give it at most the severity `minor` and start the issue with "Unverified:". An
|
|
50
|
-
unverified claim must never make
|
|
50
|
+
unverified claim must never make the main agent remove working code.
|
|
51
51
|
|
|
52
52
|
## Rules
|
|
53
53
|
|
|
@@ -57,5 +57,5 @@ unverified claim must never make a writer remove working code.
|
|
|
57
57
|
own preferences. Do not ask for work beyond the spec.
|
|
58
58
|
- The document structure (headings, sections) is fixed by agjan and checked by a
|
|
59
59
|
script. Never ask to remove, rename or add a section.
|
|
60
|
-
- Be specific and brief. No praise, no summaries of what the
|
|
60
|
+
- Be specific and brief. No praise, no summaries of what the main agent did.
|
|
61
61
|
- Prefer one precise blocker over several vague notes.
|
|
@@ -143,7 +143,7 @@ footer { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--lin
|
|
|
143
143
|
<div class="gen"><span id="generated"></span><span>refresh: <code>npx agjan progress --open</code></span></div>
|
|
144
144
|
</header>
|
|
145
145
|
<section aria-labelledby="ov">
|
|
146
|
-
<div class="panel-head" style="margin-bottom:10px"><h2 id="ov">Project</h2><span class="legend"><span><i style="background:var(--human)"></i>your turn</span><span><i style="background:var(--accent)"></i>agent working</span><span><i style="background:var(--pass)"></i>done or merged</span></span></div>
|
|
146
|
+
<div class="panel-head" style="margin-bottom:10px"><h2 id="ov">Project</h2><span class="legend"><span><i style="background:var(--human)"></i>your turn</span><span><i style="background:var(--accent)"></i>main agent working</span><span><i style="background:var(--pass)"></i>done or merged</span></span></div>
|
|
147
147
|
<div class="units" id="units"></div>
|
|
148
148
|
</section>
|
|
149
149
|
<section class="detail" id="detail" aria-live="polite"></section>
|
|
@@ -173,7 +173,7 @@ function turnPill(u) {
|
|
|
173
173
|
if (u.turn === 'you') return `<span class="pill you"><span class="pulse">●</span> Your turn</span>`;
|
|
174
174
|
if (u.turn === 'merged') return `<span class="pill merged">✓ Merged</span>`;
|
|
175
175
|
if (u.turn === 'done') return `<span class="pill merged">✓ Done</span>`;
|
|
176
|
-
return `<span class="pill agent">
|
|
176
|
+
return `<span class="pill agent">Main agent working</span>`;
|
|
177
177
|
}
|
|
178
178
|
function trackHtml(u) {
|
|
179
179
|
return u.stages.map((s, i) => {
|
|
@@ -219,7 +219,7 @@ function timeline(u) {
|
|
|
219
219
|
const pad = (t1 - t0) * 0.02;
|
|
220
220
|
const a = t0 - pad, z = t1 + pad;
|
|
221
221
|
const x = (at) => L + ((ms(at) - a) / (z - a)) * (W - L - R);
|
|
222
|
-
const
|
|
222
|
+
const mainAgent = u.host ? `${u.host}` : 'main agent';
|
|
223
223
|
let s = `<svg viewBox="0 0 ${W} 214" width="100%" style="min-width:760px" role="img" aria-label="Timeline of ${esc(u.key)}">`;
|
|
224
224
|
const tk = ticks(a, z);
|
|
225
225
|
for (const t of tk.out) {
|
|
@@ -227,10 +227,10 @@ function timeline(u) {
|
|
|
227
227
|
const iso = new Date(t).toISOString();
|
|
228
228
|
s += `<line x1="${xx}" y1="14" x2="${xx}" y2="188" stroke="var(--line)" stroke-width="1"/><text class="t-tick" x="${xx}" y="206" text-anchor="middle">${tk.days ? dhm(iso) : hm(iso)}</text>`;
|
|
229
229
|
}
|
|
230
|
-
s += `<text class="t-lane" x="0" y="42">
|
|
230
|
+
s += `<text class="t-lane" x="0" y="42">Main agent</text><text class="t-sub" x="0" y="56">${esc(mainAgent)}</text>`;
|
|
231
231
|
s += `<text class="t-lane" x="0" y="102">Reviewers</text><text class="t-sub" x="0" y="116">isolated agents</text>`;
|
|
232
|
-
s += `<text class="t-lane" x="0" y="162">
|
|
233
|
-
for (const w of u.
|
|
232
|
+
s += `<text class="t-lane" x="0" y="162">Human</text><text class="t-sub" x="0" y="176">gates in a terminal</text>`;
|
|
233
|
+
for (const w of u.mainAgent) {
|
|
234
234
|
const p = x(w.from), q = x(w.to);
|
|
235
235
|
s += `<rect x="${p}" y="26" width="${Math.max(q - p, 3)}" height="26" rx="4" fill="var(--accent-bg)" stroke="var(--accent)"><title>${esc(w.label)}: ${hm(w.from)}–${hm(w.to)}</title></rect>`;
|
|
236
236
|
if (q - p > 60) s += `<text class="t-bar" x="${p + 6}" y="43">${esc(w.label)}</text>`;
|
|
@@ -308,7 +308,7 @@ function renderDetail() {
|
|
|
308
308
|
<div class="stat"><span class="v">${s.reviews} <small>${s.blocked} blocked</small></span><span class="l">reviews</span></div>
|
|
309
309
|
<div class="stat"><span class="v">${s.openFindings} <small>/ ${s.totalFindings}</small></span><span class="l">findings open · ${s.openBlockers} blocker(s)</span></div>
|
|
310
310
|
</div>
|
|
311
|
-
<div class="panel"><div class="panel-head"><h3>Timeline</h3><span class="legend"><span><i style="background:var(--accent)"></i>
|
|
311
|
+
<div class="panel"><div class="panel-head"><h3>Timeline</h3><span class="legend"><span><i style="background:var(--accent)"></i>main agent step · ▲ commit</span><span><i style="background:var(--pass)"></i>pass</span><span><i style="background:var(--notes)"></i>notes</span><span><i style="background:var(--blocked)"></i>blocked</span><span><i style="background:var(--human)"></i>waiting for a human · | decision</span></span></div>
|
|
312
312
|
<div class="scroll">${timeline(u)}</div></div>
|
|
313
313
|
<div class="panel"><div class="panel-head"><h3>Review loops</h3><span class="muted" style="font-size:12.5px">Up to ${u.roundLimit} rounds per loop. Select a round to see what it raised and resolved.</span></div><div class="loops">${loops(u)}</div></div>
|
|
314
314
|
<div class="cols">
|
|
@@ -318,7 +318,7 @@ function renderDetail() {
|
|
|
318
318
|
<div style="display:grid;gap:16px;align-content:start">
|
|
319
319
|
${u.tasks.length ? `<div class="panel"><h3>Tasks</h3><table><thead><tr><th>Task</th><th>Commits</th><th>Reviews</th></tr></thead><tbody>${taskRows}</tbody></table></div>` : ''}
|
|
320
320
|
<div class="panel"><h3>Who worked on it</h3><div class="people">
|
|
321
|
-
${u.host ? `<div class="who"><span class="av w">
|
|
321
|
+
${u.host ? `<div class="who"><span class="av w">M</span><span><b>Main agent</b> · ${esc(u.host)}<small>${u.mainAgent.length} step${u.mainAgent.length === 1 ? '' : 's'} · ${u.commits.length} commit${u.commits.length === 1 ? '' : 's'}</small></span></div>` : ''}
|
|
322
322
|
${reviewers}${people}
|
|
323
323
|
${!u.host && !reviewers && !people ? '<p class="empty">Nobody yet.</p>' : ''}
|
|
324
324
|
</div></div>
|
package/package.json
CHANGED
|
@@ -64,12 +64,13 @@
|
|
|
64
64
|
"properties": {
|
|
65
65
|
"build": { "enum": ["area", "task"] },
|
|
66
66
|
"rounds": { "type": "integer", "minimum": 1 },
|
|
67
|
-
"tiers": { "type": "object", "additionalProperties": { "enum": ["fast", "balanced", "deep"] } }
|
|
67
|
+
"tiers": { "type": "object", "additionalProperties": { "enum": ["fast", "balanced", "deep"] } },
|
|
68
|
+
"qa": { "enum": ["on", "off"], "description": "The QA step in Verify for full-mode features (default on): the agjan-qa agent writes and runs tests from the spec alone." }
|
|
68
69
|
},
|
|
69
70
|
"additionalProperties": false
|
|
70
71
|
},
|
|
71
72
|
"models": {
|
|
72
|
-
"description": "
|
|
73
|
+
"description": "Agent models per host and tier (balanced, deep, qa). 'session' runs the agent on the model of the session that starts it; qa defaults to the deep model.",
|
|
73
74
|
"type": "object",
|
|
74
75
|
"additionalProperties": { "type": "object", "additionalProperties": { "type": "string" } }
|
|
75
76
|
},
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"additionalProperties": false,
|
|
20
20
|
"properties": {
|
|
21
21
|
"id": { "type": "string", "pattern": "^[A-Z][A-Z0-9]{1,5}-R[1-9][0-9]*$" },
|
|
22
|
-
"step": { "type": "string", "pattern": "^(spec|design|design:light|verify|build:.+)$" },
|
|
22
|
+
"step": { "type": "string", "pattern": "^(spec|design|design:light|verify|qa|build:.+)$" },
|
|
23
23
|
"round": { "type": "integer", "minimum": 1 },
|
|
24
24
|
"at_utc": { "type": "string" },
|
|
25
25
|
"reviewer": {
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
"base_commit": { "type": ["string", "null"] },
|
|
44
44
|
"head_commit": { "type": ["string", "null"] },
|
|
45
45
|
"verdict": { "enum": ["pass", "pass-with-notes", "blocked"] },
|
|
46
|
+
"qa_tests_hash": { "$ref": "#/$defs/hash" },
|
|
47
|
+
"qa_tests": { "type": "array", "items": { "type": "string" } },
|
|
46
48
|
"resolves": { "type": "array", "items": { "type": "string" } },
|
|
47
49
|
"findings": {
|
|
48
50
|
"type": "array",
|