@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.
Files changed (103) hide show
  1. package/.bongos-core.json +61 -361
  2. package/.claude/skills/planning-session/SKILL.md +2 -2
  3. package/config/scheduled-routines.json +3 -8
  4. package/docs/adr/0091-bounding-the-kernel-and-db-carve.md +1 -1
  5. package/docs/adr/0093-tranche-2-core-carve-sequence.md +1 -1
  6. package/docs/canonical-permissions.md +1 -1
  7. package/docs/file-map.md +3 -8
  8. package/docs/handoff-template.md +1 -1
  9. package/docs/module-api-changelog.md +2 -0
  10. package/docs/onboarding/diagrams/README.md +3 -7
  11. package/docs/onboarding/diagrams/assertions.json +3 -3
  12. package/docs/recipes/ops-gotchas.md +3 -1
  13. package/modules/autonomy/db.js +9 -0
  14. package/modules/autonomy/module.json +2 -2
  15. package/modules/autonomy/pollers/daily-checks.js +262 -0
  16. package/modules/autonomy/pollers/routine-timers.js +7 -5
  17. package/modules/autonomy/rank-roles.js +64 -0
  18. package/modules/autonomy/server-schedule.js +37 -0
  19. package/package-lock.json +2 -2
  20. package/package.json +1 -1
  21. package/release-notes.json +14 -0
  22. package/scripts/bongos/api-alias-caller-scan.js +2 -2
  23. package/scripts/bongos/audit-authorship.sh +0 -5
  24. package/scripts/bongos/audit-rank-roles.js +15 -56
  25. package/scripts/bongos/codemod-rename-scripts-gds.js +0 -1
  26. package/scripts/bongos/diagram-facts.js +1 -1
  27. package/scripts/bongos/do-api.js +1 -1
  28. package/scripts/bongos/fitness-checks-identity.js +4 -15
  29. package/scripts/bongos/gen-diagrams.js +3 -3
  30. package/scripts/bongos/pulse.js +5 -3
  31. package/scripts/bongos/routine-schedule.js +38 -3
  32. package/scripts/bongos/ship-regen.js +2 -3
  33. package/scripts/security/dep-audit.js +50 -124
  34. package/src/module-api.js +1 -1
  35. package/tests/autonomy_daily_checks.mjs +201 -0
  36. package/tests/claude_materialize.mjs +12 -12
  37. package/tests/effective_visibility_predicate.mjs +0 -18
  38. package/tests/routine_capture_kind.mjs +18 -7
  39. package/tests/routine_schedule.mjs +42 -0
  40. package/scripts/bongos/artifact-staleness.js +0 -267
  41. package/scripts/bongos/classify-discipline.js +0 -153
  42. package/scripts/bongos/codemod-rename-src-gds.js +0 -145
  43. package/scripts/bongos/coreB-carve-proof.sh +0 -725
  44. package/scripts/bongos/goal-names.js +0 -102
  45. package/scripts/bongos/rename-goals.js +0 -109
  46. package/scripts/bongos/seed-adopt-tasks.js +0 -75
  47. package/scripts/bongos/seed-api-contract-goal-tasks.js +0 -141
  48. package/scripts/bongos/seed-board-room-tasks.js +0 -196
  49. package/scripts/bongos/seed-bongos-app-tasks.js +0 -294
  50. package/scripts/bongos/seed-bongos-coreB-tranche1-tasks.js +0 -81
  51. package/scripts/bongos/seed-bongos-coreB-tranche2-tasks.js +0 -100
  52. package/scripts/bongos/seed-bongos-goal-hierarchy-tasks.js +0 -307
  53. package/scripts/bongos/seed-bongos-module-system-tasks.js +0 -346
  54. package/scripts/bongos/seed-bongos-tasks.js +0 -214
  55. package/scripts/bongos/seed-bongos-v1-seo-tasks.js +0 -104
  56. package/scripts/bongos/seed-bv1-community-tasks.js +0 -131
  57. package/scripts/bongos/seed-bv1-privacy-invites-tasks.js +0 -133
  58. package/scripts/bongos/seed-bv1-profile-page-tasks.js +0 -161
  59. package/scripts/bongos/seed-bv1-r01-delta-tasks.js +0 -154
  60. package/scripts/bongos/seed-bv2-tweak-mode-tasks.js +0 -277
  61. package/scripts/bongos/seed-gds-v4-tasks.js +0 -624
  62. package/scripts/bongos/seed-governance-tasks.js +0 -340
  63. package/scripts/bongos/seed-medusa-tasks.js +0 -440
  64. package/scripts/bongos/seed-module-upstreaming.js +0 -219
  65. package/scripts/bongos/seed-productization-tasks.js +0 -235
  66. package/scripts/bongos/seed-project-admin-console-tasks.js +0 -88
  67. package/scripts/bongos/seed-provisioning-tasks.js +0 -83
  68. package/scripts/bongos/seed-strict-versioning-tasks.js +0 -275
  69. package/scripts/bongos/seed-v2-world-tasks.js +0 -283
  70. package/scripts/gds/artifact-staleness.js +0 -7
  71. package/scripts/gds/classify-discipline.js +0 -7
  72. package/scripts/gds/codemod-rename-src-gds.js +0 -7
  73. package/scripts/gds/coreB-carve-proof.sh +0 -8
  74. package/scripts/gds/goal-names.js +0 -7
  75. package/scripts/gds/rename-goals.js +0 -7
  76. package/scripts/gds/seed-adopt-tasks.js +0 -7
  77. package/scripts/gds/seed-api-contract-goal-tasks.js +0 -7
  78. package/scripts/gds/seed-board-room-tasks.js +0 -6
  79. package/scripts/gds/seed-bongos-app-tasks.js +0 -7
  80. package/scripts/gds/seed-bongos-coreB-tranche1-tasks.js +0 -7
  81. package/scripts/gds/seed-bongos-coreB-tranche2-tasks.js +0 -7
  82. package/scripts/gds/seed-bongos-goal-hierarchy-tasks.js +0 -7
  83. package/scripts/gds/seed-bongos-module-system-tasks.js +0 -7
  84. package/scripts/gds/seed-bongos-tasks.js +0 -7
  85. package/scripts/gds/seed-bongos-v1-seo-tasks.js +0 -6
  86. package/scripts/gds/seed-bv1-community-tasks.js +0 -6
  87. package/scripts/gds/seed-bv1-privacy-invites-tasks.js +0 -6
  88. package/scripts/gds/seed-bv1-profile-page-tasks.js +0 -6
  89. package/scripts/gds/seed-bv1-r01-delta-tasks.js +0 -6
  90. package/scripts/gds/seed-bv2-tweak-mode-tasks.js +0 -6
  91. package/scripts/gds/seed-gds-v4-tasks.js +0 -7
  92. package/scripts/gds/seed-governance-tasks.js +0 -7
  93. package/scripts/gds/seed-medusa-tasks.js +0 -7
  94. package/scripts/gds/seed-module-upstreaming.js +0 -7
  95. package/scripts/gds/seed-productization-tasks.js +0 -7
  96. package/scripts/gds/seed-project-admin-console-tasks.js +0 -6
  97. package/scripts/gds/seed-provisioning-tasks.js +0 -7
  98. package/scripts/gds/seed-strict-versioning-tasks.js +0 -7
  99. package/scripts/gds/seed-v2-world-tasks.js +0 -7
  100. package/scripts/migrate_cost_ledger.sh +0 -178
  101. package/tests/artifact_staleness.mjs +0 -207
  102. package/tests/goal_names.mjs +0 -120
  103. package/tests/newcomer_generator.mjs +0 -48
@@ -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
- });