@dombaras/agent-harness 0.1.10 → 0.1.11
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 +5 -0
- package/package.json +1 -1
- package/templates/.agents/AGENTS.md +9 -6
- package/templates/.agents/rules/00-operating.md +3 -3
- package/templates/.agents/skills/handoff/SKILL.md +1 -0
- package/templates/.opencode/command/board.md +23 -0
- package/templates/scripts/qa/check-backlog.js +37 -0
package/README.md
CHANGED
|
@@ -108,6 +108,11 @@ warns but does not block; the guarantee only applies to registered flows.
|
|
|
108
108
|
`deepseek/deepseek-v4-pro` (default, direct API key), `zen`/`opencode` →
|
|
109
109
|
`opencode/deepseek-v4-pro` (gateway), `pickle` → `opencode/big-pickle`, or any
|
|
110
110
|
explicit `provider/model`. Restart opencode after switching (config reads once).
|
|
111
|
+
- **`/board` command** — every deploy ships an opencode command
|
|
112
|
+
(`.opencode/command/board.md`) that refreshes the canonical `BACKLOG.md` board:
|
|
113
|
+
`git pull --ff-only` (safe, never forces), then renders Open (by priority),
|
|
114
|
+
Frozen, the last few shipped rows, and the newest `.agents/memory/handoff.md`
|
|
115
|
+
delta. Read-only — it never edits the board.
|
|
111
116
|
|
|
112
117
|
## QA gates
|
|
113
118
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dombaras/agent-harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Reusable multi-agent harness for AI-assisted development: personas, skills, operating rules, model routing, and QA gates. Deploy into any project with `npx @dombaras/agent-harness init`.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"agent-harness": "bin/agent-harness.js"
|
|
@@ -103,9 +103,11 @@ The canonical rulebook. The always-loaded summary is `.agents/rules/00-operating
|
|
|
103
103
|
|
|
104
104
|
## 7. Definition of Done & Continuous Backup
|
|
105
105
|
|
|
106
|
-
Every completed task
|
|
106
|
+
Every completed task closes with this gate. **QA gates dev work only:** steps 0-2
|
|
107
|
+
run when the session touched code paths — a backlog-only (or docs-only) change skips
|
|
108
|
+
them. Steps 3-5 are the unconditional session close; they are NOT gated by QA.
|
|
107
109
|
|
|
108
|
-
0. **Feature Completeness Gate
|
|
110
|
+
0. **Feature Completeness Gate** (code changes only):
|
|
109
111
|
- [ ] 5 UI states handled on every affected screen (list them).
|
|
110
112
|
- [ ] No `catch` blocks that only `console.warn` without user-facing feedback.
|
|
111
113
|
- [ ] Haptic/feedback consistency for every user-initiated action.
|
|
@@ -113,10 +115,11 @@ Every completed task passes this gate, in order:
|
|
|
113
115
|
- [ ] Cross-screen audit if a new UX pattern was introduced.
|
|
114
116
|
- [ ] No modified file over ~500 lines without extracting components.
|
|
115
117
|
- [ ] No blanket file-level `eslint-disable`/`@ts-nocheck`/`@ts-ignore` suppressions (line-level only, each with a reason).
|
|
116
|
-
1. **QA tier** — `qa-architect` inspects the diff, picks the tier BY COVERAGE (not path-label), records the coverage map in `.agents/memory/qa-plan.md`, and authors progression tests for any GAP; if `qa-architect` is not dispatched the orchestrator plans in its place. `qa-runner` executes and makes it pass (§6). A change is not verified until `npm run test:qa-plan` passes: every changed code path covered or waivered, **and** every touched flow (`.agents/memory/flow-map.md`) has every sibling surface and declared variant addressed in the plan's `## Parallel-surface & variant audit`, **AND** the executed tier exercised the modified path.
|
|
117
|
-
2. **Security check** — apply `security-engineer` when the change touches data/auth/input/secrets/deps.
|
|
118
|
-
3. **
|
|
119
|
-
4. **
|
|
118
|
+
1. **QA tier** (code changes only) — `qa-architect` inspects the diff, picks the tier BY COVERAGE (not path-label), records the coverage map in `.agents/memory/qa-plan.md`, and authors progression tests for any GAP; if `qa-architect` is not dispatched the orchestrator plans in its place. `qa-runner` executes and makes it pass (§6). A change is not verified until `npm run test:qa-plan` passes: every changed code path covered or waivered, **and** every touched flow (`.agents/memory/flow-map.md`) has every sibling surface and declared variant addressed in the plan's `## Parallel-surface & variant audit`, **AND** the executed tier exercised the modified path.
|
|
119
|
+
2. **Security check** (code changes only) — apply `security-engineer` when the change touches data/auth/input/secrets/deps.
|
|
120
|
+
3. **Backlog write-back** (always) — move every task this session shipped from `Open` to `Archive (shipped · done)` in `BACKLOG.md` (with date/commit), then stage it explicitly: `git add BACKLOG.md` (it starts untracked — `git commit -am` / `git commit` without `add` will NOT pick it up). The board syncs across sessions only through git, so this delta is committed with the code, never left uncommitted.
|
|
121
|
+
4. **Commit** (always) — concise `feat:` / `fix:` / `refactor:` message, including the `BACKLOG.md` delta.
|
|
122
|
+
5. **Push** (always) — `git push origin main`.
|
|
120
123
|
- **Mechanical floor**: a pre-push hook should run `npm run test:quick` (project-provided; the harness does not install git hooks).
|
|
121
124
|
- **Lean permissions**: grant only the narrowest `git`/`gh` action needed; escalate only after a command has actually failed.
|
|
122
125
|
- Git may not be on PATH in the default shell — use the full path (`.agents/memory/locations.md`).
|
|
@@ -23,12 +23,12 @@ Before reading or editing any file for a task, dispatch the relevant personas vi
|
|
|
23
23
|
4. **Verify stack versions** before writing framework code (`.agents/memory/stack-versions.md`).
|
|
24
24
|
5. **Token discipline** — search before read, targeted reads, batch reads, don't re-read unchanged files, right-size QA.
|
|
25
25
|
6. **Static ≠ runtime** — never declare verified from `tsc` alone; execute a real runtime/API path that exercises the MODIFIED code — a tier label never proves coverage. `test:qa-plan` gates every changed code path to a covering assertion or waiver, and every touched flow's sibling surfaces / variants to an audit entry (`.agents/memory/flow-map.md` — "fix one, fix all").
|
|
26
|
-
7. **Commit** with `feat:`/`fix:`/`refactor:` then push to main.
|
|
26
|
+
7. **Commit** with `feat:`/`fix:`/`refactor:` then push to main — including any `BACKLOG.md` delta.
|
|
27
27
|
|
|
28
28
|
## Definition of Done
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
QA tier + security lens gate **code changes only** (a backlog-only change skips them). Every session closes with **move shipped `BACKLOG.md` rows to `Archive` → commit → push** — the backlog write-back is never QA-gated.
|
|
31
31
|
|
|
32
32
|
## Session checklist
|
|
33
33
|
|
|
34
|
-
Start: read `.agents/memory/locations.md` + `.agents/memory/model-routing.md` + `BACKLOG.md`. End: record the dispatch log and update the handoff memory.
|
|
34
|
+
Start: read `.agents/memory/locations.md` + `.agents/memory/model-routing.md` + `BACKLOG.md`. End: move shipped `BACKLOG.md` rows to `Archive`, record the dispatch log, and update the handoff memory.
|
|
@@ -48,3 +48,4 @@ Date: <YYYY-MM-DD>
|
|
|
48
48
|
- Update this at session end even if the user doesn't ask, per the DoD in `.agents/AGENTS.md` §8.
|
|
49
49
|
- Keep it under ~40 lines. Code is the source of truth; the handoff is a pointer, not a spec.
|
|
50
50
|
- Keeping `.agents/memory/locations.md` current is part of this skill. Read it first, update it last.
|
|
51
|
+
- **You only touch handoff memory.** The board write-back — moving shipped `BACKLOG.md` rows to `Archive (shipped · done)` and committing them — is the orchestrator's DoD §7 step, not yours. If it hasn't been done, call it out in your output; never edit `BACKLOG.md` or run git yourself.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Refresh the task board — pull the latest, then show BACKLOG.md open/frozen/shipped plus the newest handoff delta.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Refresh the canonical task board. Run these steps read-only, then report terse.
|
|
6
|
+
|
|
7
|
+
1. Sync the workspace (never rewrite history, never force):
|
|
8
|
+
- `git fetch --all --prune`
|
|
9
|
+
- `git pull --ff-only`
|
|
10
|
+
- If the pull fails (uncommitted local changes / conflict), do NOT force — report the failure and show the board from the current on-disk state, flagged "possibly stale".
|
|
11
|
+
|
|
12
|
+
2. Read `BACKLOG.md` (repo root) and `.agents/memory/handoff.md`.
|
|
13
|
+
|
|
14
|
+
3. Render a compact board:
|
|
15
|
+
- `Active / next` picks (if any).
|
|
16
|
+
- `Open` grouped by priority P1 → P4, each row as `ID — task (evidence)`.
|
|
17
|
+
- `Frozen` rows with their reopen condition (one line each).
|
|
18
|
+
- `Archive` — only the last ~5 shipped rows (date/commit).
|
|
19
|
+
- Latest handoff delta (planned → shipped → deferred) from `.agents/memory/handoff.md`, plus any new `git log` commits from other sessions since the last refresh.
|
|
20
|
+
|
|
21
|
+
Rules:
|
|
22
|
+
- Read-only: never edit `BACKLOG.md`, `.agents/memory/*`, or any code here.
|
|
23
|
+
- This is a status snapshot, not a report. If a field is unknown write `?` — never invent.
|
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
* 5. No duplicate IDs across the whole file.
|
|
17
17
|
* 6. `INDEX.md` / `todo.md`, if present, are pointers (content referencing
|
|
18
18
|
* BACKLOG.md), not live row lists.
|
|
19
|
+
* 7. `BACKLOG.md` is git-tracked (committed), not untracked — the board syncs
|
|
20
|
+
* across sessions only through git. Skipped outside a git repo.
|
|
19
21
|
*/
|
|
20
22
|
const fs = require("fs");
|
|
21
23
|
const path = require("path");
|
|
24
|
+
const { execFileSync } = require("child_process");
|
|
22
25
|
|
|
23
26
|
const root = path.resolve(__dirname, "..", "..");
|
|
24
27
|
|
|
@@ -41,6 +44,40 @@ if (!fs.existsSync(canonical)) {
|
|
|
41
44
|
}
|
|
42
45
|
check(true, "canonical BACKLOG.md present at repo root");
|
|
43
46
|
|
|
47
|
+
// ---- 7. BACKLOG.md must be git-tracked (committed), not untracked ----------
|
|
48
|
+
// The board syncs across sessions only through git; an untracked BACKLOG.md
|
|
49
|
+
// never reaches the shared board. Skipped outside a git repo.
|
|
50
|
+
function insideGitRepo() {
|
|
51
|
+
try {
|
|
52
|
+
const r = execFileSync("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
53
|
+
cwd: root,
|
|
54
|
+
stdio: "pipe",
|
|
55
|
+
});
|
|
56
|
+
return (r.toString() || "").trim() === "true";
|
|
57
|
+
} catch (_) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function gitTracked(rel) {
|
|
62
|
+
try {
|
|
63
|
+
const r = execFileSync("git", ["ls-files", "--error-unmatch", rel], {
|
|
64
|
+
cwd: root,
|
|
65
|
+
stdio: "pipe",
|
|
66
|
+
});
|
|
67
|
+
return (r.toString() || "").trim().length > 0;
|
|
68
|
+
} catch (_) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (insideGitRepo()) {
|
|
73
|
+
check(
|
|
74
|
+
gitTracked("BACKLOG.md"),
|
|
75
|
+
"BACKLOG.md is git-tracked (run `git add BACKLOG.md` then commit — an untracked board never syncs)"
|
|
76
|
+
);
|
|
77
|
+
} else {
|
|
78
|
+
check(true, "not a git repo \u2014 skipping BACKLOG.md tracking check");
|
|
79
|
+
}
|
|
80
|
+
|
|
44
81
|
const src = fs.readFileSync(canonical, "utf8");
|
|
45
82
|
const lines = src.split(/\r?\n/);
|
|
46
83
|
|