@bongos/core 1.21.176 → 1.21.177
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 +61 -361
- package/.claude/skills/planning-session/SKILL.md +2 -2
- package/config/scheduled-routines.json +3 -8
- package/docs/adr/0091-bounding-the-kernel-and-db-carve.md +1 -1
- package/docs/adr/0093-tranche-2-core-carve-sequence.md +1 -1
- package/docs/canonical-permissions.md +1 -1
- package/docs/file-map.md +3 -8
- package/docs/handoff-template.md +1 -1
- package/docs/module-api-changelog.md +2 -0
- package/docs/onboarding/diagrams/README.md +3 -7
- package/docs/onboarding/diagrams/assertions.json +3 -3
- package/docs/recipes/ops-gotchas.md +3 -1
- package/modules/autonomy/db.js +9 -0
- package/modules/autonomy/module.json +2 -2
- package/modules/autonomy/pollers/daily-checks.js +262 -0
- package/modules/autonomy/pollers/routine-timers.js +7 -5
- package/modules/autonomy/rank-roles.js +64 -0
- package/modules/autonomy/server-schedule.js +37 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +14 -0
- package/scripts/bongos/api-alias-caller-scan.js +2 -2
- package/scripts/bongos/audit-authorship.sh +0 -5
- package/scripts/bongos/audit-rank-roles.js +15 -56
- package/scripts/bongos/codemod-rename-scripts-gds.js +0 -1
- package/scripts/bongos/diagram-facts.js +1 -1
- package/scripts/bongos/do-api.js +1 -1
- package/scripts/bongos/fitness-checks-identity.js +4 -15
- package/scripts/bongos/gen-diagrams.js +3 -3
- package/scripts/bongos/pulse.js +5 -3
- package/scripts/bongos/routine-schedule.js +38 -3
- package/scripts/bongos/ship-regen.js +2 -3
- package/scripts/security/dep-audit.js +50 -124
- package/src/module-api.js +1 -1
- package/tests/autonomy_daily_checks.mjs +201 -0
- package/tests/claude_materialize.mjs +12 -12
- package/tests/effective_visibility_predicate.mjs +0 -18
- package/tests/routine_capture_kind.mjs +18 -7
- package/tests/routine_schedule.mjs +42 -0
- package/scripts/bongos/artifact-staleness.js +0 -267
- package/scripts/bongos/classify-discipline.js +0 -153
- package/scripts/bongos/codemod-rename-src-gds.js +0 -145
- package/scripts/bongos/coreB-carve-proof.sh +0 -725
- package/scripts/bongos/goal-names.js +0 -102
- package/scripts/bongos/rename-goals.js +0 -109
- package/scripts/bongos/seed-adopt-tasks.js +0 -75
- package/scripts/bongos/seed-api-contract-goal-tasks.js +0 -141
- package/scripts/bongos/seed-board-room-tasks.js +0 -196
- package/scripts/bongos/seed-bongos-app-tasks.js +0 -294
- package/scripts/bongos/seed-bongos-coreB-tranche1-tasks.js +0 -81
- package/scripts/bongos/seed-bongos-coreB-tranche2-tasks.js +0 -100
- package/scripts/bongos/seed-bongos-goal-hierarchy-tasks.js +0 -307
- package/scripts/bongos/seed-bongos-module-system-tasks.js +0 -346
- package/scripts/bongos/seed-bongos-tasks.js +0 -214
- package/scripts/bongos/seed-bongos-v1-seo-tasks.js +0 -104
- package/scripts/bongos/seed-bv1-community-tasks.js +0 -131
- package/scripts/bongos/seed-bv1-privacy-invites-tasks.js +0 -133
- package/scripts/bongos/seed-bv1-profile-page-tasks.js +0 -161
- package/scripts/bongos/seed-bv1-r01-delta-tasks.js +0 -154
- package/scripts/bongos/seed-bv2-tweak-mode-tasks.js +0 -277
- package/scripts/bongos/seed-gds-v4-tasks.js +0 -624
- package/scripts/bongos/seed-governance-tasks.js +0 -340
- package/scripts/bongos/seed-medusa-tasks.js +0 -440
- package/scripts/bongos/seed-module-upstreaming.js +0 -219
- package/scripts/bongos/seed-productization-tasks.js +0 -235
- package/scripts/bongos/seed-project-admin-console-tasks.js +0 -88
- package/scripts/bongos/seed-provisioning-tasks.js +0 -83
- package/scripts/bongos/seed-strict-versioning-tasks.js +0 -275
- package/scripts/bongos/seed-v2-world-tasks.js +0 -283
- package/scripts/gds/artifact-staleness.js +0 -7
- package/scripts/gds/classify-discipline.js +0 -7
- package/scripts/gds/codemod-rename-src-gds.js +0 -7
- package/scripts/gds/coreB-carve-proof.sh +0 -8
- package/scripts/gds/goal-names.js +0 -7
- package/scripts/gds/rename-goals.js +0 -7
- package/scripts/gds/seed-adopt-tasks.js +0 -7
- package/scripts/gds/seed-api-contract-goal-tasks.js +0 -7
- package/scripts/gds/seed-board-room-tasks.js +0 -6
- package/scripts/gds/seed-bongos-app-tasks.js +0 -7
- package/scripts/gds/seed-bongos-coreB-tranche1-tasks.js +0 -7
- package/scripts/gds/seed-bongos-coreB-tranche2-tasks.js +0 -7
- package/scripts/gds/seed-bongos-goal-hierarchy-tasks.js +0 -7
- package/scripts/gds/seed-bongos-module-system-tasks.js +0 -7
- package/scripts/gds/seed-bongos-tasks.js +0 -7
- package/scripts/gds/seed-bongos-v1-seo-tasks.js +0 -6
- package/scripts/gds/seed-bv1-community-tasks.js +0 -6
- package/scripts/gds/seed-bv1-privacy-invites-tasks.js +0 -6
- package/scripts/gds/seed-bv1-profile-page-tasks.js +0 -6
- package/scripts/gds/seed-bv1-r01-delta-tasks.js +0 -6
- package/scripts/gds/seed-bv2-tweak-mode-tasks.js +0 -6
- package/scripts/gds/seed-gds-v4-tasks.js +0 -7
- package/scripts/gds/seed-governance-tasks.js +0 -7
- package/scripts/gds/seed-medusa-tasks.js +0 -7
- package/scripts/gds/seed-module-upstreaming.js +0 -7
- package/scripts/gds/seed-productization-tasks.js +0 -7
- package/scripts/gds/seed-project-admin-console-tasks.js +0 -6
- package/scripts/gds/seed-provisioning-tasks.js +0 -7
- package/scripts/gds/seed-strict-versioning-tasks.js +0 -7
- package/scripts/gds/seed-v2-world-tasks.js +0 -7
- package/scripts/migrate_cost_ledger.sh +0 -178
- package/tests/artifact_staleness.mjs +0 -207
- package/tests/goal_names.mjs +0 -120
- package/tests/newcomer_generator.mjs +0 -48
package/tests/goal_names.mjs
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
// tests/goal_names.mjs — the goal rename mapping (task 1003225, goal 1000072,
|
|
2
|
-
// criterion legibility-goal-names-and-claude-text).
|
|
3
|
-
//
|
|
4
|
-
// The mapping IS the decision, so these tests are the review that a shell
|
|
5
|
-
// history could never get: no name may still carry its own explanation, no two
|
|
6
|
-
// goals may end up with the same name, and re-running must be a no-op.
|
|
7
|
-
import { strict as assert } from 'node:assert';
|
|
8
|
-
import { test } from 'node:test';
|
|
9
|
-
import { createRequire } from 'node:module';
|
|
10
|
-
import path from 'node:path';
|
|
11
|
-
import { fileURLToPath } from 'node:url';
|
|
12
|
-
|
|
13
|
-
const require = createRequire(import.meta.url);
|
|
14
|
-
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
15
|
-
const { GOAL_NAMES, ALREADY_NAMES, SEPARATOR } = require(path.join(ROOT, 'scripts', 'bongos', 'goal-names.js'));
|
|
16
|
-
const { planFor } = require(path.join(ROOT, 'scripts', 'bongos', 'rename-goals.js'));
|
|
17
|
-
|
|
18
|
-
const entries = () => Object.entries(GOAL_NAMES).map(([id, v]) => [Number(id), v]);
|
|
19
|
-
|
|
20
|
-
test('THE POINT: no new title carries its own explanation', () => {
|
|
21
|
-
// A dash or a colon in the name means the split did not happen.
|
|
22
|
-
for (const [id, v] of entries()) {
|
|
23
|
-
assert.ok(!SEPARATOR.test(v.title), `${id} still jams its explanation into the name: ${v.title}`);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
test('no two goals end up with the same name', () => {
|
|
28
|
-
// The failure a mechanical split would have produced: 1000038/39/40 all head
|
|
29
|
-
// "Agents module", so splitting on the separator leaves three identical names.
|
|
30
|
-
const seen = new Map();
|
|
31
|
-
for (const [id, v] of entries()) {
|
|
32
|
-
const key = v.title.toLowerCase();
|
|
33
|
-
assert.ok(!seen.has(key), `${id} and ${seen.get(key)} would both be named "${v.title}"`);
|
|
34
|
-
seen.set(key, id);
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
test('the three Agents goals are genuinely distinguishable', () => {
|
|
39
|
-
const [a, b, c] = [1000038, 1000039, 1000040].map((id) => GOAL_NAMES[id]);
|
|
40
|
-
for (const g of [a, b, c]) assert.ok(g, 'all three are mapped');
|
|
41
|
-
const names = new Set([a.title, b.title, c.title]);
|
|
42
|
-
assert.equal(names.size, 3, 'three distinct names');
|
|
43
|
-
// And each says what IT is, not merely that it is an agents goal.
|
|
44
|
-
for (const g of [a, b, c]) {
|
|
45
|
-
assert.ok(g.title.length > 'Agents module'.length, `"${g.title}" must add something`);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
test('every goal keeps an explanation — nothing is dropped', () => {
|
|
50
|
-
for (const [id, v] of entries()) {
|
|
51
|
-
assert.equal(typeof v.subtitle, 'string', `${id} has a subtitle`);
|
|
52
|
-
assert.ok(v.subtitle.trim().length >= 20, `${id}'s subtitle must carry the real explanation, not a stub`);
|
|
53
|
-
assert.notEqual(v.subtitle.trim().toLowerCase(), v.title.trim().toLowerCase(), `${id} must not restate its name`);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
test('a name reads as a name, not a sentence', () => {
|
|
58
|
-
for (const [id, v] of entries()) {
|
|
59
|
-
assert.ok(v.title.length <= 40, `${id} "${v.title}" is ${v.title.length} chars — too long to scan in a list`);
|
|
60
|
-
assert.ok(!v.title.endsWith('.'), `${id} "${v.title}" should not be punctuated like prose`);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
test('every name written with JUDGMENT records why', () => {
|
|
65
|
-
// Where the new name is not simply the old head, the reason is part of the
|
|
66
|
-
// artifact — that is what makes this reviewable rather than asserted.
|
|
67
|
-
for (const id of [1000003, 1000038, 1000039, 1000040, 1000053, 1000064, 1000075, 1000077, 1000078]) {
|
|
68
|
-
const v = GOAL_NAMES[id];
|
|
69
|
-
assert.ok(v, `${id} is mapped`);
|
|
70
|
-
assert.ok(v.why && v.why.length > 25, `${id} must record why its name was rewritten`);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
test('the mapping and the leave-alone list are disjoint', () => {
|
|
75
|
-
for (const id of ALREADY_NAMES) {
|
|
76
|
-
assert.ok(!GOAL_NAMES[id], `${id} cannot be both renamed and deliberately untouched`);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
test('mapping + leave-alone accounts for every open goal', () => {
|
|
81
|
-
// 38 = 32 mapping entries + 6 already-names. This is a fact about THIS FILE, not
|
|
82
|
-
// about how many goals are currently open — the two drifted apart and saying
|
|
83
|
-
// otherwise is how the first version of this comment became false.
|
|
84
|
-
//
|
|
85
|
-
// The live BONGOS-V1 open set is 37: goal 1000077 was mapped and renamed while
|
|
86
|
-
// open and has since been ACHIEVED, so 31 of the 32 entries have an open goal to
|
|
87
|
-
// apply to (hence the applier's 'applied: 31'), and 31 + 6 = 37 covers every open
|
|
88
|
-
// goal. A stale entry is harmless — planFor is idempotent and simply never matches.
|
|
89
|
-
//
|
|
90
|
-
// Pinned rather than derived on purpose: derived from the live set it would pass
|
|
91
|
-
// forever and never catch a NEW goal. That pin is what surfaced 1000080.
|
|
92
|
-
assert.equal(Object.keys(GOAL_NAMES).length + ALREADY_NAMES.length, 38);
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
test('re-running is a no-op — planFor is idempotent', () => {
|
|
96
|
-
const want = GOAL_NAMES[1000027];
|
|
97
|
-
const already = { id: 1000027, title: want.title, subtitle: want.subtitle };
|
|
98
|
-
assert.deepEqual(planFor(already, want), {}, 'nothing to patch when already correct');
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
test('planFor patches only what differs', () => {
|
|
102
|
-
const want = GOAL_NAMES[1000027];
|
|
103
|
-
const titleOnly = { id: 1, title: 'Findability — the grep path (ADR 0095)', subtitle: want.subtitle };
|
|
104
|
-
assert.deepEqual(Object.keys(planFor(titleOnly, want)), ['title']);
|
|
105
|
-
const subOnly = { id: 1, title: want.title, subtitle: '' };
|
|
106
|
-
assert.deepEqual(Object.keys(planFor(subOnly, want)), ['subtitle']);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
test('a NULL subtitle is treated as absent, not as a value', () => {
|
|
110
|
-
const want = GOAL_NAMES[1000027];
|
|
111
|
-
const fresh = { id: 1, title: want.title, subtitle: null };
|
|
112
|
-
assert.deepEqual(Object.keys(planFor(fresh, want)), ['subtitle'], 'null must still be filled in');
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
test('the version catch-all is named for what it is', () => {
|
|
116
|
-
const v = GOAL_NAMES[1000003];
|
|
117
|
-
assert.ok(!/BONGOS-V1/.test(v.title), 'a version id is not a name');
|
|
118
|
-
assert.ok(!/general/i.test(v.title), '"general" names nothing');
|
|
119
|
-
assert.match(v.subtitle, /catch-all/i, 'and the subtitle says what it actually is');
|
|
120
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// tests/newcomer_generator.mjs — the daily newcomer-generator routine runs to the end.
|
|
2
|
-
//
|
|
3
|
-
// task 1004860: the routine's artist lane read a curated prompt library from
|
|
4
|
-
// modules/art-pipeline/template/, a module this core no longer carries. The read
|
|
5
|
-
// threw ENOENT, so every run exited 1 straight after the engineer lane. The lane is
|
|
6
|
-
// gone; this drives a whole run through an injected API and checks it finishes.
|
|
7
|
-
|
|
8
|
-
import { test } from 'node:test';
|
|
9
|
-
import assert from 'node:assert/strict';
|
|
10
|
-
import { createRequire } from 'node:module';
|
|
11
|
-
|
|
12
|
-
const require = createRequire(import.meta.url);
|
|
13
|
-
const { main } = require('../.claude/scheduled-tasks/newcomer-generator/generate.js');
|
|
14
|
-
|
|
15
|
-
function fakeApi() {
|
|
16
|
-
const calls = [];
|
|
17
|
-
const api = async (method, p, body) => {
|
|
18
|
-
calls.push({ method, p, body });
|
|
19
|
-
if (method === 'GET' && p.startsWith('/api/bongos/tasks')) return { ok: true, data: { tasks: [] } };
|
|
20
|
-
if (method === 'GET' && p.startsWith('/api/bongos/inbox')) {
|
|
21
|
-
return { ok: true, data: { ideas: [{ id: 7, title: 'Tidy a helper', kind: 'cleanup', priority: 5, body_md: 'x' }] } };
|
|
22
|
-
}
|
|
23
|
-
if (method === 'POST') return { ok: true, data: { task: { id: 99, title: body.title } } };
|
|
24
|
-
if (method === 'PATCH') return { ok: true, data: {} };
|
|
25
|
-
return { ok: false, status: 404, data: {} };
|
|
26
|
-
};
|
|
27
|
-
return { api, calls };
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
test('a below-target run tops up the engineer lane and finishes without reading a prompt library', async () => {
|
|
31
|
-
// Arrange
|
|
32
|
-
const { api, calls } = fakeApi();
|
|
33
|
-
const log = console.log;
|
|
34
|
-
console.log = () => {};
|
|
35
|
-
|
|
36
|
-
// Act
|
|
37
|
-
try {
|
|
38
|
-
await main({ apiCall: api });
|
|
39
|
-
} finally {
|
|
40
|
-
console.log = log;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Assert
|
|
44
|
-
const created = calls.filter((c) => c.method === 'POST');
|
|
45
|
-
assert.equal(created.length, 1, 'exactly one task is created');
|
|
46
|
-
assert.equal(created[0].body.discipline, 'engineer');
|
|
47
|
-
assert.ok(calls.some((c) => c.method === 'PATCH' && c.p === '/api/bongos/inbox/7'), 'the idea is marked promoted');
|
|
48
|
-
});
|