@bongos/core 1.19.37 → 1.19.38

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/.bongos-core.json CHANGED
@@ -2,22 +2,22 @@
2
2
  "artifact": "bongos-core",
3
3
  "manifest_schema": 1,
4
4
  "generator": "scripts/gds/package-core.js",
5
- "core_version": "1.19.37",
6
- "core_contract": "1.19.37",
7
- "source_commit": "606cc770b09032c6ab385e1326f79b08c19e0083",
5
+ "core_version": "1.19.38",
6
+ "core_contract": "1.19.38",
7
+ "source_commit": "ba6a8f6285476ab3cd4e33f9278b333ac0fc3a29",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-08-11T16:06:38.933Z",
9
+ "built_at": "2026-08-11T16:17:20.571Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
- "docs_redacted": 287,
12
+ "docs_redacted": 288,
13
13
  "agent_docs_stubbed": 21,
14
- "functional_verbatim": 1211,
14
+ "functional_verbatim": 1212,
15
15
  "rules": 3,
16
16
  "gate_literals": 3,
17
17
  "gate": "passed"
18
18
  },
19
- "file_count": 1519,
20
- "tree_sha256": "faa022ab6fb5e04c311cd4d24d2991b07d15fb5fa565dffa0862d87fdf1e546d",
19
+ "file_count": 1521,
20
+ "tree_sha256": "9d55773209aeb85fef771e85aa30e901c52e54e155601030e44cd16fd5c46bda",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/blocker-review/SKILL.md",
@@ -159,6 +159,11 @@
159
159
  "mode": "0000644",
160
160
  "sha256": "e0bf90fa006499aee0a7d75f10fe4b5972c9501129b1e432e7d6e192b367a54c"
161
161
  },
162
+ {
163
+ "path": ".claude/skills/grader-health/SKILL.md",
164
+ "mode": "0000644",
165
+ "sha256": "b9823a6a14b4197f7dae90c8ad6713fcc5b3ce672d03d7b59c8e868d5d6ba70e"
166
+ },
162
167
  {
163
168
  "path": ".claude/skills/idea-triage/SKILL.md",
164
169
  "mode": "0000644",
@@ -1357,7 +1362,7 @@
1357
1362
  {
1358
1363
  "path": "docs/file-map.md",
1359
1364
  "mode": "0000644",
1360
- "sha256": "a499551f07ce8f6382aba46641fb06fa8e499d486433ee3bf266f264abac29ca"
1365
+ "sha256": "f51d3978f50ec9b2a34dc12b8fa3b9e8874543e5ab3503f72a09d7d2b06c565b"
1361
1366
  },
1362
1367
  {
1363
1368
  "path": "docs/handoff-template.md",
@@ -4017,12 +4022,12 @@
4017
4022
  {
4018
4023
  "path": "package-lock.json",
4019
4024
  "mode": "0000644",
4020
- "sha256": "acab5dbbe8ab00da496f534457882de0c115d441e9f0e38fae6f5a901a4b3f47"
4025
+ "sha256": "413f575fce07ba5b167f6492a4f1aed1f7eacb4f4351457303d3875f04557787"
4021
4026
  },
4022
4027
  {
4023
4028
  "path": "package.json",
4024
4029
  "mode": "0000644",
4025
- "sha256": "c33f5baf3eddd6b7bdcf80af532dc04d290e394b5c51b90931aa52d0ead94e6a"
4030
+ "sha256": "d0d31ac616a949591bca2975236bbf6d98437e969d1618bd68811620c2a130c3"
4026
4031
  },
4027
4032
  {
4028
4033
  "path": "public-docs/index.html",
@@ -5642,7 +5647,7 @@
5642
5647
  {
5643
5648
  "path": "src/module-api.js",
5644
5649
  "mode": "0000644",
5645
- "sha256": "8066ee5e98e151dfc62228626a99a86f362697410aac483de27c75851cc3bdea"
5650
+ "sha256": "2dfd2867ab83689497aff7a3b7f213e756c182e047ef8da754e098a945491ce7"
5646
5651
  },
5647
5652
  {
5648
5653
  "path": "src/module-loader/loader.js",
@@ -7464,6 +7469,11 @@
7464
7469
  "mode": "0000644",
7465
7470
  "sha256": "76bed8e6fae3bd77d4b45be14d9f80bda71b2f92323fa5697a7e4f07b65d3ba2"
7466
7471
  },
7472
+ {
7473
+ "path": "tests/skill_grader_health.mjs",
7474
+ "mode": "0000644",
7475
+ "sha256": "4557c934704a009612ed8858c0f59c5b53facb5d92fa2c0740b1aecb079aa5c9"
7476
+ },
7467
7477
  {
7468
7478
  "path": "tests/skill_prefs.mjs",
7469
7479
  "mode": "0000644",
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: grader-health
3
+ description: Read-only health check over recent grades — consecutive outage runs, pass-rate drift vs baseline, per-grade cost anomalies, and stale model pins. The routine that would have caught the 21-outage 0.0-score streak on day one. Triggers when the user says "/grader-health", "check the grader", "is the grader healthy", "grader health check", "why are grades failing lately", or as part of a periodic ops sweep. Reports and emits exact remediation lines; changes nothing (ADR 0162 — no new gates, describe only). Optional --probe runs a live paid calibration (Metic+).
4
+ ---
5
+
6
+ You are running a health check over the grading panel. Everything here is **read-only**: you read live surfaces, compare against known baselines, and emit findings + exact remediation commands. You never confirm, flip, or re-grade anything yourself — the builder (or /grade-recover) acts on what you report.
7
+
8
+ ## The four axes
9
+
10
+ ### 1 — Outage runs (the pattern this skill exists to catch)
11
+
12
+ A grader outage used to be recorded as a 0.0 "quality failure": one builder accumulated **21 zero-score rows** over a month before anyone noticed, and the public tile showed a phantom 5-day 0%-pass crater. Since the outage-as-zero fix, aggregates exclude outage rounds and bucket them as `n_unavailable` — so the streak is now directly readable.
13
+
14
+ 1. Read the public trend: `node scripts/gds/api.js GET "/api/gds/public/grades?days=30"` — scan `trend[]` for days where the average is 0 (or null) with passes 0 and n ≥ 2, and for any nonzero `n_unavailable` streak.
15
+ 2. (Archon) Read the per-builder split: `node scripts/gds/api.js GET "/api/gds/grades/by-builder?days=30"` — a single builder with pass_rate 0.000 or a large `n_unavailable` bucket is the 21×0.0 shape localized to one machine or one environment.
16
+ 3. **Confirm outage vs rejection before alarming anyone.** For each task in a suspect window: `node scripts/gds/api.js GET "/api/gds/tasks/<id>?include=grade"` — `signals.panel_outcome='unavailable'` (with `grader_unavailable_reason` and per-worker errors in `signals.workers`) is an outage, **not a quality rejection**; a real FAIL carries findings in `issues[]`.
17
+ 4. For every task parked at `completed` by a confirmed outage, emit the exact remediation line, one per task:
18
+
19
+ ```bash
20
+ node scripts/gds/ship.js <id> --regrade
21
+ ```
22
+
23
+ 5. Check the local spawn leg: the panel spawns `claude -p` subprocesses, so verify the CLI is present and authenticated, and run `node scripts/gds/doctor.js` for the hooks/worktree leg.
24
+
25
+ ### 2 — Pass-rate drift
26
+
27
+ Baselines: the 14-agent evaluation window measured a **90.6%** pass rate, already above the 87% that ADR 0024 called "suspiciously high" and built the adversarial panel to fix. From `/api/gds/public/grades` compute the rolling pass rate and compare:
28
+
29
+ - **Creeping up** past the baseline → grade inflation; the panel is rubber-stamping (report; candidate causes: score compression, reused grades, trivial-path overuse).
30
+ - **Collapsing** far below it → either a real quality regression or an unconfirmed outage window — axis 1 disambiguates.
31
+
32
+ ### 3 — Cost anomalies
33
+
34
+ Benchmark: mean panel cost **$2.14** per grade, and ~90% of it is **fixed** re-exploration cost, independent of diff size. Read grader spend: `node scripts/gds/api.js GET "/api/gds/public/cost-summary?source=grader&days=30"` and divide by the grade count from axis 2's window.
35
+
36
+ - Mean drifting well above the benchmark → panel re-rolls/retries or timeout-and-retry loops (not "big diffs" — the fixed-cost share means diff size barely moves the mean).
37
+ - Near-zero spend with grades still recording → the trivial path or grade reuse dominating; spot-check that gating lenses are actually running.
38
+
39
+ ### 4 — Model pins
40
+
41
+ The evaluation found every grade ran on a generation-stale pin. Read the live pin from the repo: `DEFAULT_GRADER_MODEL` and `selectGraderModel` in `modules/grading/grader.js`, plus the rubric version in `modules/grading/grader-rubric.json`. Report when the pinned family is a generation behind the current Claude family, or when `selectGraderModel` would throw on a current builder model id (it throws on ids lacking opus/sonnet/haiku — a stranded-ship risk).
42
+
43
+ ## Optional: `--probe` (live calibration, spends real money)
44
+
45
+ With `--probe`, run the live panel calibration: `node scripts/gds/grade-smoke.js`. It grades known-good and known-bad fixtures against the real panel and reports miscalibration. **Costs ~$0.30–0.90 per run; Metic+ only.** Never run it implicitly — only when the user passed `--probe` or asked for a live calibration.
46
+
47
+ ## Report shape
48
+
49
+ End with a compact findings list, most severe first: axis, evidence (the numbers you read), verdict (outage / drift / anomaly / stale-pin / healthy), and the exact remediation command or the skill to hand off to (`/grade-recover` for a single stuck task; a GDS task via `capture.js` for systemic fixes). A clean bill of health is one line per axis.
50
+
51
+ ## Constraints
52
+
53
+ - **Read-only, describe-only (ADR 0162).** No confirms, no regrades run by this skill, no status flips, no new gates. The remediation lines are FOR the builder to run.
54
+ - **Confirm before alarming.** Axis 1's outage-vs-rejection check comes before any "the grader is down" conclusion — a real FAIL streak on one surface is signal, not outage.
55
+ - **`--probe` spends money** — explicit opt-in only, Metic+.
56
+
57
+ ## Files this skill touches
58
+
59
+ - Reads: `GET /api/gds/public/grades`, `GET /api/gds/grades/by-builder` (Archon), `GET /api/gds/public/cost-summary?source=grader`, `GET /api/gds/tasks/:id?include=grade`, `modules/grading/grader.js`, `modules/grading/grader-rubric.json`.
60
+ - Runs (read-only): `node scripts/gds/doctor.js`; with `--probe` only: `node scripts/gds/grade-smoke.js`.
61
+ - Writes: nothing.
package/docs/file-map.md CHANGED
@@ -351,6 +351,7 @@ tests/
351
351
  ├── goal-create/SKILL.md ← /goal-create — plan and create ONE goal (the module-scoped workspace between version and criteria, ADR 0086) in one session: <redacted>, scope wall, 2-4 criteria, seed tasks; also the auto-pickup when a task is created with no goal to live in (goal_advisory); Metic+ (Archon for a protected-module scope)
352
352
  ├── goal-review/SKILL.md ← /goal-review — walk the criterion review queue: each auto-flagged 'met — pending review' criterion gets confirm / reject / defer; confirming a goal's last criterion auto-achieves it (ADR 0086 §6); Metic+
353
353
  ├── grade-recover/SKILL.md ← /grade-recover N — the 'my grade failed, now what' loop: diagnose outage vs fabricated fail vs genuine fail from the persisted grade, then run the right recovery (--regrade or the auditable override-request); adds no ship-path gate (ADR 0162, task 1002655)
354
+ ├── grader-health/SKILL.md ← /grader-health — read-only grader health check: outage runs (n_unavailable streaks, outage-vs-rejection confirmation), pass-rate drift vs baseline, per-grade cost anomalies, stale model pins; emits exact --regrade remediation lines; optional --probe live calibration (Metic+, paid) (task 1002656)
354
355
  ├── idea-triage/SKILL.md ← /idea-triage — daily walk through the GDS idea_inbox (promote / discard / merge); Metic+
355
356
  ├── ideate/SKILL.md ← /ideate — ideation-session playbook for ideator-discipline tasks; inverts the loop (human drives, Claude is the sounding board) ([#1267](https://example.com/builders#/task/1267))
356
357
  ├── merge-mode/SKILL.md ← /merge-mode — manual fallback for the auto-merge: land every confirmed task (merge + smoke + deploy)
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.37",
3
+ "version": "1.19.38",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.19.37",
9
+ "version": "1.19.38",
10
10
  "license": "AGPL-3.0-or-later",
11
11
  "dependencies": {
12
12
  "express": "^4.21.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.19.37",
3
+ "version": "1.19.38",
4
4
  "description": "Cloud Bongos — the AI-first build platform core (GDS + platform surfaces + module system), installed as a versioned dependency (ADR 0108).",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "main": "src/platform-server.js",
package/src/module-api.js CHANGED
@@ -501,8 +501,10 @@ const { validateOrRespond, LIMITS, parseId, asyncHandler, corsPublicGet, parsePa
501
501
  // landed since 1.19.35 with no explicit bump. run 31509715311. (task 1002620)
502
502
  // 1.19.37 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
503
503
  // landed since 1.19.36 with no explicit bump. run 31510590459. (task 1002620)
504
+ // 1.19.38 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
505
+ // landed since 1.19.37 with no explicit bump. run 31511537558. (task 1002620)
504
506
  // ---------------------------------------------------------------------------
505
- const CORE_VERSION = '1.19.37'; // CI auto-patch carrier (ADR 0161); see changelog above
507
+ const CORE_VERSION = '1.19.38'; // CI auto-patch carrier (ADR 0161); see changelog above
506
508
 
507
509
  // A namespaced logger so a module's log lines are attributable + consistent.
508
510
  // Usage: const log = api.logger('dev-box'); log.info('mounted');
@@ -0,0 +1,48 @@
1
+ // tests/skill_grader_health.mjs — the /grader-health skill exists and covers
2
+ // the four health axes from the grader-hardening evaluation §6 (task 1002656):
3
+ // outage runs, pass-rate drift, cost anomalies, and stale model pins — reading
4
+ // LIVE data surfaces, emitting exact --regrade remediation lines, and staying
5
+ // read-only (describe, never confirm/flip — ADR 0162).
6
+ import assert from 'node:assert/strict';
7
+ import { test } from 'node:test';
8
+ import { readFileSync, existsSync } from 'node:fs';
9
+ import { fileURLToPath } from 'node:url';
10
+ import path from 'node:path';
11
+
12
+ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
13
+ const SKILL = path.join(ROOT, '.claude', 'skills', 'grader-health', 'SKILL.md');
14
+
15
+ // .claude/skills is INSTANCE-materialized; a neutral core checkout carries none
16
+ // (task 1002470) — skip there, same guard shape as file_map.mjs.
17
+ const skillsDirExists = existsSync(path.join(ROOT, '.claude', 'skills'));
18
+
19
+ test('/grader-health exists and covers the four health axes on live data', (t) => {
20
+ if (!skillsDirExists) return t.skip('.claude/skills not materialized in this checkout');
21
+ assert.ok(existsSync(SKILL), '.claude/skills/grader-health/SKILL.md must exist (task 1002656)');
22
+ const md = readFileSync(SKILL, 'utf8');
23
+
24
+ // Live data surfaces, named concretely.
25
+ assert.match(md, /\/api\/gds\/public\/grades/, 'reads the public grade trend');
26
+ assert.match(md, /\/api\/gds\/grades\/by-builder/, 'reads the per-builder split (Archon)');
27
+ assert.match(md, /\/api\/gds\/public\/cost-summary/, 'reads grader spend');
28
+
29
+ // Axis 1 — outage runs: the 21×0.0 pattern and outage-vs-rejection confirmation.
30
+ assert.match(md, /n_unavailable/, 'names the outage bucket the aggregates expose');
31
+ assert.match(md, /panel_outcome='unavailable'/, 'confirms outage vs rejection per task');
32
+
33
+ // Axis 2 — pass-rate drift vs the evaluation baseline.
34
+ assert.match(md, /90\.6%/, 'names the eval-window pass-rate baseline');
35
+
36
+ // Axis 3 — cost anomalies vs the fixed-cost benchmark.
37
+ assert.match(md, /\$2\.14/, 'names the mean per-grade cost benchmark');
38
+
39
+ // Axis 4 — model pins.
40
+ assert.match(md, /DEFAULT_GRADER_MODEL|selectGraderModel/, 'checks the live model pin');
41
+
42
+ // Remediation + probe + the read-only contract.
43
+ assert.match(md, /node scripts\/gds\/ship\.js <(?:task-)?id> --regrade/, 'emits the exact remediation line');
44
+ assert.match(md, /--probe/, 'offers the optional live calibration probe');
45
+ assert.match(md, /grade-smoke\.js/, 'names the probe script');
46
+ assert.match(md, /read-only/i, 'states the read-only contract');
47
+ assert.match(md, /ADR 0162/, 'anchors the no-new-gates constraint');
48
+ });