@bongos/core 1.19.185 → 1.19.186

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,11 +2,11 @@
2
2
  "artifact": "bongos-core",
3
3
  "manifest_schema": 1,
4
4
  "generator": "scripts/gds/package-core.js",
5
- "core_version": "1.19.185",
6
- "core_contract": "1.19.185",
7
- "source_commit": "c725667c9921ff8e8dce9113f3f11a230ca9ce15",
5
+ "core_version": "1.19.186",
6
+ "core_contract": "1.19.186",
7
+ "source_commit": "6cbbcc0e845fce8a100732deadbed810ed8b7a0c",
8
8
  "source_ref": "HEAD",
9
- "built_at": "2026-08-16T22:31:52.623Z",
9
+ "built_at": "2026-08-16T22:45:57.773Z",
10
10
  "redaction": {
11
11
  "model": "docs-redacted+functional-verbatim",
12
12
  "docs_redacted": 308,
@@ -17,7 +17,7 @@
17
17
  "gate": "passed"
18
18
  },
19
19
  "file_count": 1610,
20
- "tree_sha256": "076b2c5942c82770787a176f2f500059304f8ddc297dc8fe580d0f3e035a4f67",
20
+ "tree_sha256": "18131419ad0fd9f0d498fad1bd304caefa22719a484a3e7c92d50ad798a5dfb4",
21
21
  "files": [
22
22
  {
23
23
  "path": ".claude/skills/blocker-review/SKILL.md",
@@ -367,7 +367,7 @@
367
367
  {
368
368
  "path": "clients/bongos-client/index.d.ts",
369
369
  "mode": "0000644",
370
- "sha256": "1efedc7f78c88bcc7ce8ca5523915258273063a575481504bd046ed905d9e41a"
370
+ "sha256": "b37e4a561554ec579b525ff660246d350a70c4acdda9a16d8e6521c38180bae6"
371
371
  },
372
372
  {
373
373
  "path": "clients/bongos-client/index.mjs",
@@ -1367,7 +1367,7 @@
1367
1367
  {
1368
1368
  "path": "docs/api/openapi.json",
1369
1369
  "mode": "0000644",
1370
- "sha256": "3a3fd517cd4aff7e29f8c298d9099af7fe7b3282f74e437a2fbbce300da8b46d"
1370
+ "sha256": "051c79468a982cd07b8a398b81346aed6c366b3d35347243891a2cebe79805fb"
1371
1371
  },
1372
1372
  {
1373
1373
  "path": "docs/architecture.md",
@@ -2887,7 +2887,7 @@
2887
2887
  {
2888
2888
  "path": "modules/government/catalog.js",
2889
2889
  "mode": "0000644",
2890
- "sha256": "4ebb584351a14dc849be7e06a92a3f9056cca4347e6b1b9e3d041ad8b407d7ee"
2890
+ "sha256": "461a836f14eef90c2e1fcb2f6a3641e952a5904ef95fd0adc64bbf24d2bdc908"
2891
2891
  },
2892
2892
  {
2893
2893
  "path": "modules/government/config.js",
@@ -2897,7 +2897,7 @@
2897
2897
  {
2898
2898
  "path": "modules/government/db.js",
2899
2899
  "mode": "0000644",
2900
- "sha256": "e7c4d26ed0b5efe6426426d486170f5a1de106fe16071a050c77d45a25c66233"
2900
+ "sha256": "250edf5a95aadb06b6b4229bb202ae138c13585caa09f5d8cfeff4c1a982bcc9"
2901
2901
  },
2902
2902
  {
2903
2903
  "path": "modules/government/migrations/governance_001_tables.sql",
@@ -2972,12 +2972,12 @@
2972
2972
  {
2973
2973
  "path": "modules/government/routes/government.js",
2974
2974
  "mode": "0000644",
2975
- "sha256": "d29087432cdb8f5c42f756924d326246517c81bb59065bddfce1e8c95794339f"
2975
+ "sha256": "8fd54465c050cd1e648e419df89ed4c39a853068fd792c5321e10f2ae691bf1d"
2976
2976
  },
2977
2977
  {
2978
2978
  "path": "modules/government/routes/rank-sync.js",
2979
2979
  "mode": "0000644",
2980
- "sha256": "7934d1d1db163b20403c98afc4670e44ab926cf21123c8be1764172df4eb3290"
2980
+ "sha256": "55b6e1c2c5d02c71b319b40f19676f2e780c58fba5e4767a9b335919bfa13ff0"
2981
2981
  },
2982
2982
  {
2983
2983
  "path": "modules/government/session-scopes.js",
@@ -3182,7 +3182,7 @@
3182
3182
  {
3183
3183
  "path": "modules/hall-ui/public/gate.js",
3184
3184
  "mode": "0000644",
3185
- "sha256": "16cdabe86d1deef19de5604aeeab69037c67fae0e92ffa7c93a3c0892242581e"
3185
+ "sha256": "0d3c92f77b90bce0d8e44045aedd8673ba2516bf4a0512c3a5abfa5c4f73375c"
3186
3186
  },
3187
3187
  {
3188
3188
  "path": "modules/hall-ui/public/goal-inbox.js",
@@ -3210,19 +3210,19 @@
3210
3210
  "sha256": "9cdbc14c1709dcc26fe9b8c85b2bfd08685a2925c9855758ca8e758455d1bc5c"
3211
3211
  },
3212
3212
  {
3213
- "path": "modules/hall-ui/public/governance.css",
3213
+ "path": "modules/hall-ui/public/government.css",
3214
3214
  "mode": "0000644",
3215
- "sha256": "f51e53cba5b1e1853de2682ca4909530925547691af93ccc772aa2e3c3598833"
3215
+ "sha256": "0b59d6379cb7c61f270676db628c738aadfb24141ee7fdc29d194fae4e63637e"
3216
3216
  },
3217
3217
  {
3218
- "path": "modules/hall-ui/public/governance.html",
3218
+ "path": "modules/hall-ui/public/government.html",
3219
3219
  "mode": "0000644",
3220
- "sha256": "605a6456c163cbff579d3f742a7da6f54e487b4764e33890c216f65dbd3be92b"
3220
+ "sha256": "7c923d794a0c69e5e4ed48eeae326ce9ae070c896a693264de2882a99583ca52"
3221
3221
  },
3222
3222
  {
3223
- "path": "modules/hall-ui/public/governance.js",
3223
+ "path": "modules/hall-ui/public/government.js",
3224
3224
  "mode": "0000644",
3225
- "sha256": "68a9b5f21246c2b476f78793e60056341ad15699bb56d3a3ff9a72d0661ba7a1"
3225
+ "sha256": "98e28a3a54fddc29481645223e5f15bd295899cdbdc557c20a3b37f56335f978"
3226
3226
  },
3227
3227
  {
3228
3228
  "path": "modules/hall-ui/public/hall-kit.js",
@@ -3247,7 +3247,7 @@
3247
3247
  {
3248
3248
  "path": "modules/hall-ui/public/harbor.js",
3249
3249
  "mode": "0000644",
3250
- "sha256": "43377715522a948d23d1f07a1062bc73bc0f96342e165eb42591baa54df6c4d9"
3250
+ "sha256": "7a102f4fd675910b0c80416c3ed05397d38f977e647fffb00c593732d05a3712"
3251
3251
  },
3252
3252
  {
3253
3253
  "path": "modules/hall-ui/public/index.html",
@@ -3417,7 +3417,7 @@
3417
3417
  {
3418
3418
  "path": "modules/hall-ui/public/shell.js",
3419
3419
  "mode": "0000644",
3420
- "sha256": "2b393108bd61a33dea9dc590c8acd346922e84ba1582ecf1a5ae220def1f2d29"
3420
+ "sha256": "f9b6d2ddd7b27e37a4be64dea8e767de43ad89a2d9999a566245a42d1d6196e1"
3421
3421
  },
3422
3422
  {
3423
3423
  "path": "modules/hall-ui/public/style.css",
@@ -3452,7 +3452,7 @@
3452
3452
  {
3453
3453
  "path": "modules/hall-ui/public/watch.js",
3454
3454
  "mode": "0000644",
3455
- "sha256": "0c9fa898f0dcf34ed92c3b096c72fb41d88bec871f36b19b954a71b672a932ed"
3455
+ "sha256": "9fbaee78276658ca61631e2849d8c8b34e708d3074c2739f1c0ae0cd8a048c78"
3456
3456
  },
3457
3457
  {
3458
3458
  "path": "modules/hall-ui/public/work.css",
@@ -4257,12 +4257,12 @@
4257
4257
  {
4258
4258
  "path": "package-lock.json",
4259
4259
  "mode": "0000644",
4260
- "sha256": "285a39e688ff084805cf3cc403ffc2affbf3efd85eccefa1661e932c912db9a9"
4260
+ "sha256": "169da149860df789f1900e847fa5f87394e13bddd9399eddd6e015d8b0290a26"
4261
4261
  },
4262
4262
  {
4263
4263
  "path": "package.json",
4264
4264
  "mode": "0000644",
4265
- "sha256": "699b38fd120a85262b8040961b95881039b6050263f8e9a72e61ad7c2f72fa6b"
4265
+ "sha256": "f42ff0f356c3390d07015cc5c3fdebc8352e62f329f891ea25027739f0178bb2"
4266
4266
  },
4267
4267
  {
4268
4268
  "path": "public-docs/index.html",
@@ -5522,7 +5522,7 @@
5522
5522
  {
5523
5523
  "path": "scripts/hall-preview/server.js",
5524
5524
  "mode": "0000644",
5525
- "sha256": "1cd66475d610b107b0f3b7f19688133e7c482b41b034e2cef6009d552df31cb2"
5525
+ "sha256": "384b6ee204f1ca1bb0f352d6a879f7674c9e7741999e584b72dfe4bf1983d0d1"
5526
5526
  },
5527
5527
  {
5528
5528
  "path": "scripts/migrate.sh",
@@ -5627,7 +5627,7 @@
5627
5627
  {
5628
5628
  "path": "src/bongos/auth.js",
5629
5629
  "mode": "0000644",
5630
- "sha256": "acabbb5f2586adbb3b3bd25eca0a258ab16095669f298f71e4a7c5e64d9c02a2"
5630
+ "sha256": "0d173ce76410884480e5545aad4201da26ff661516e6096de7a2ff2bd2a4015c"
5631
5631
  },
5632
5632
  {
5633
5633
  "path": "src/bongos/cascade-dispatch.js",
@@ -5832,7 +5832,7 @@
5832
5832
  {
5833
5833
  "path": "src/bongos/serve-internal.js",
5834
5834
  "mode": "0000644",
5835
- "sha256": "473f4d8021f6996eac64e5d2e5c712eeaf8a6de561864d98c9d777e0a71868ed"
5835
+ "sha256": "94af8e061c690b6fb979cd95ec3a65e21b0f830898a05ab868c5a9f34d9dee72"
5836
5836
  },
5837
5837
  {
5838
5838
  "path": "src/bongos/stealth-gate.js",
@@ -5867,7 +5867,7 @@
5867
5867
  {
5868
5868
  "path": "src/module-api.js",
5869
5869
  "mode": "0000644",
5870
- "sha256": "ae7d472a89aace19a9544a330a8c1859680a3fd88f29358c6d4c1e905305aae7"
5870
+ "sha256": "8381e5e0b51bce1387c53e9518d693e74ac93f640d29dee0daa35931cdf2d4f5"
5871
5871
  },
5872
5872
  {
5873
5873
  "path": "src/module-loader/catalog.js",
@@ -6067,7 +6067,7 @@
6067
6067
  {
6068
6068
  "path": "tests/auth_resolve_failure.mjs",
6069
6069
  "mode": "0000644",
6070
- "sha256": "8d40fbb16a8b6256551eb014ba3a209b577548fe1e61ccd965227422ac238d90"
6070
+ "sha256": "25271ff1abef5600fab6b9d768c0f94965ffdea4d926b6a60344676f5392f9f1"
6071
6071
  },
6072
6072
  {
6073
6073
  "path": "tests/auth_session_ttl.mjs",
@@ -6772,7 +6772,7 @@
6772
6772
  {
6773
6773
  "path": "tests/governance_abuse_matrix.mjs",
6774
6774
  "mode": "0000644",
6775
- "sha256": "9950499be79588f6b0f2fd34e7fedd534c5ac69e66890e81e80c3e486be073f8"
6775
+ "sha256": "ddec9f958d49c45e140006d97f91ff9ffdcd0cf49b6041cc5098f6f46ee27597"
6776
6776
  },
6777
6777
  {
6778
6778
  "path": "tests/governance_catalog.mjs",
@@ -6812,7 +6812,7 @@
6812
6812
  {
6813
6813
  "path": "tests/governance_page_gates.mjs",
6814
6814
  "mode": "0000644",
6815
- "sha256": "b0df520ae8492533e660052fd4da8895c378de63fe90122f1b01790e7bad537e"
6815
+ "sha256": "a1ef5da5f04e3bd82584e618b5be830c470d3c7f319de81d6ed41bddd954c8c0"
6816
6816
  },
6817
6817
  {
6818
6818
  "path": "tests/governance_parity.mjs",
@@ -6847,7 +6847,7 @@
6847
6847
  {
6848
6848
  "path": "tests/governance_routes.mjs",
6849
6849
  "mode": "0000644",
6850
- "sha256": "14788e7c215ea8fda120ca6138073d728ec9ac8271420b47b6d13fb1b5672a80"
6850
+ "sha256": "efc7bfe423db45280ae2ccdfccec2ab1e15e29b604052f1a36b732ac8edf9a73"
6851
6851
  },
6852
6852
  {
6853
6853
  "path": "tests/governance_seed.mjs",
@@ -6932,12 +6932,12 @@
6932
6932
  {
6933
6933
  "path": "tests/hall_nav.mjs",
6934
6934
  "mode": "0000644",
6935
- "sha256": "b0da8fb0e46c57419821dbf8cb5ddeda3c98da76d1b2918c3ce77798ee2768fb"
6935
+ "sha256": "1a8d9bffb258d8338fd5367796bd19d4a31265f591b6d0e941bc1bcf5e2dc4cc"
6936
6936
  },
6937
6937
  {
6938
6938
  "path": "tests/hall_page_gate_map.mjs",
6939
6939
  "mode": "0000644",
6940
- "sha256": "667f291c94e5770c703bae8566e3eb73e86b40baef0e5e9474d92410623b123a"
6940
+ "sha256": "9488c26f674a3e76ea3e7d4319f9c20ad392d1b7376dfb60dba18183c2d04e3e"
6941
6941
  },
6942
6942
  {
6943
6943
  "path": "tests/hall_palette.mjs",
@@ -43,7 +43,7 @@ export interface GetGoalsIdSuggestCriteriaResponse { goal_id: unknown; suggestio
43
43
  export interface GetGoalsResponse { goals: unknown }
44
44
  export interface GetGovernmentAssignmentsResponse { assignments: unknown }
45
45
  export interface GetGovernmentPermissionsResponse { permissions: unknown; principals: unknown }
46
- export interface GetGovernmentRanksResponse { roles: unknown }
46
+ export interface GetGovernmentRanksResponse { ranks: unknown }
47
47
  export interface GetGradesByBuilderResponse { window_days: unknown; builders: unknown }
48
48
  export interface GetHealthzResponse { ok: boolean; auth_configured: unknown }
49
49
  export interface GetInboxIdResponse { idea: unknown }
@@ -228,7 +228,7 @@ export interface PostGoalsResponse { ok: boolean; goal: unknown; succeeds_goal_i
228
228
  export interface PostGovernmentAssignmentsRequest { builder_id: number; rank_key: string }
229
229
  export interface PostGovernmentRanksRankKeyResetResponse { ok: boolean; rank_key: unknown; seeded_rank: unknown; permission_count: unknown }
230
230
  export interface PostGovernmentRanksRequest { rank_key: string; label: string; description?: string }
231
- export interface PostGovernmentRanksResponse { role: unknown }
231
+ export interface PostGovernmentRanksResponse { rank: unknown }
232
232
  export interface PostInboxIdRatifyRequest { notes_md?: string }
233
233
  export interface PostInboxRequest { title: string; body_md?: string; kind?: string; suggested_version?: string; suggested_priority?: number; grade?: string; template_key?: string; field_values?: Record<string, unknown> }
234
234
  export interface PostLearningsRequest { title: string; body_md: string; tags?: string[]; related_files?: string[]; source?: string; source_ref?: string; task_id?: number }
@@ -13000,10 +13000,10 @@
13000
13000
  "GetGovernmentRanksResponse": {
13001
13001
  "type": "object",
13002
13002
  "properties": {
13003
- "roles": {}
13003
+ "ranks": {}
13004
13004
  },
13005
13005
  "required": [
13006
- "roles"
13006
+ "ranks"
13007
13007
  ]
13008
13008
  },
13009
13009
  "GetGradesByBuilderResponse": {
@@ -15709,10 +15709,10 @@
15709
15709
  "PostGovernmentRanksResponse": {
15710
15710
  "type": "object",
15711
15711
  "properties": {
15712
- "role": {}
15712
+ "rank": {}
15713
15713
  },
15714
15714
  "required": [
15715
- "role"
15715
+ "rank"
15716
15716
  ]
15717
15717
  },
15718
15718
  "PostInboxIdRatifyRequest": {
@@ -104,12 +104,12 @@ const PERMISSIONS = [
104
104
  { key: 'task.confirm.grade_bypass', system: true, floor: 'archon', guards: 'POST /tasks/:id/confirm — ratify past a failed grade (env-relaxable, ADR 0041)' },
105
105
  { key: 'dependency.cross_tier.manage', system: true, floor: 'archon', guards: 'POST|DELETE /dependencies — cross-tier structural edges (ADR 0086)' },
106
106
  { key: 'goal.scope.manage', system: true, floor: 'archon', guards: 'cross-tier goal-scope edges + protected-scope admission (ADR 0086)' },
107
- { key: 'government.manage', system: true, floor: 'archon', guards: 'the governance tab routes (roles/perms/assignments CRUD, reads included — R110) — meta-escalation' },
107
+ { key: 'government.manage', system: true, floor: 'archon', guards: 'the Government tab routes (ranks/perms/assignments CRUD, reads included — R110) — meta-escalation' },
108
108
  { key: 'gate_approval.decide', system: true, floor: 'archon', guards: 'POST /gate-approvals/:pr/approve — CI deploy-gate override' },
109
109
  { key: 'deploy.push_main', system: true, substrate: true, floor: 'archon', guards: 'git push origin main / the deploy — substrate-enforced (pre-push, main-audit)' },
110
110
  { key: 'path.protected.modify', system: true, substrate: true, floor: 'archon', guards: 'modifying a PROTECTED_GLOBS path below the Metic floor — substrate (ADR 0043)' },
111
111
  { key: 'infra.ssh', system: true, substrate: true, floor: 'archon', guards: 'ssh to the droplet / operator surface — substrate (credential placement)' },
112
- { key: 'principal.bfg', system: true, floor: null, principal: 'bfg', guards: '/memory/bfg/* — requireBfgPrincipal (exact system_role=bfg; NO rank-role holds it)' },
112
+ { key: 'principal.bfg', system: true, floor: null, principal: 'bfg', guards: '/memory/bfg/* — requireBfgPrincipal (exact system_role=bfg; NO rank holds it)' },
113
113
  { key: 'principal.discord_bot', system: true, floor: null, principal: 'discord_bot', guards: 'Discord bot routes — requireDiscordBot (exact system_role; dormant)' },
114
114
 
115
115
  // ── operational — floor archon (admin ops; grantable to a custom role) ────────
@@ -235,10 +235,10 @@ const PERMISSIONS = [
235
235
  { key: 'page.view.public', system: false, floor: 'xenos', guards: 'public read surfaces (incl. xenos)' },
236
236
  // ADR 0157: floor archon→metic, which is what opens /watch, /harbor and /gate to the
237
237
  // working rank. The gate FUNCTION was renamed to match (`requireArchonPage` →
238
- // `requireGovernancePage`) once the floor moved. Viewing is all this grants: every
238
+ // `requireGovernmentPage`) once the floor moved. Viewing is all this grants: every
239
239
  // write those pages reach is its own atom, and `government.manage` (the
240
240
  // roles/permissions tab) stayed archon.
241
- { key: 'page.view.government', system: false, floor: 'metic', guards: 'the governance/monitoring pages — /watch, /harbor, /gate (requireGovernancePage; write = government.manage, archon)' },
241
+ { key: 'page.view.government', system: false, floor: 'metic', guards: 'the government/monitoring pages — /watch, /harbor, /gate (requireGovernmentPage; write = government.manage, archon)' },
242
242
  ];
243
243
 
244
244
  // ── invariants asserted at module load (fail loud on an authoring typo) ─────────
@@ -120,7 +120,7 @@ async function syncRank(client, { builderId, rank } = {}) {
120
120
  //
121
121
  // The db half of the governance API routes. Deliberately DUMB writes: the
122
122
  // authority invariants (system perms non-grantable, seeded rank-roles immutable
123
- // through the API) are enforced in routes/governance.js against the catalog —
123
+ // through the API) are enforced in routes/government.js against the catalog —
124
124
  // the same split governance_001 documents (permission_key is validated app-side,
125
125
  // not a FK). Grant/assign are ON CONFLICT DO NOTHING so the tab's toggle is
126
126
  // idempotent; each returns whether a row actually changed.
@@ -213,8 +213,8 @@ module.exports = function buildGovernanceRouter() {
213
213
  // rank: perm government.manage — the full role list with each role's grants.
214
214
  router.get('/government/ranks', api.requireBuilder, api.requirePermission('government.manage'), async (req, res) => {
215
215
  try {
216
- const roles = await db.listRolesWithGrants();
217
- res.json({ roles });
216
+ const ranks = await db.listRolesWithGrants();
217
+ res.json({ ranks });
218
218
  } catch (err) {
219
219
  console.error('[gds] GET /government/ranks', err);
220
220
  res.fail('roles_list_failed', { status: 500, message: 'internal error' });
@@ -269,13 +269,13 @@ module.exports = function buildGovernanceRouter() {
269
269
  return res.fail('bad_rank_key', 400, { rank_key: rankKey, expected: 'a kebab-case slug (^[a-z][a-z0-9-]*$)' });
270
270
  }
271
271
  try {
272
- const role = await db.createRole({
272
+ const rank = await db.createRole({
273
273
  rankKey,
274
274
  label: req.body.label,
275
275
  description: req.body.description ?? null,
276
276
  createdBy: req.builder.id,
277
277
  });
278
- res.status(201).json({ role: { ...role, permissions: [] } });
278
+ res.status(201).json({ rank: { ...rank, permissions: [] } });
279
279
  } catch (err) {
280
280
  if (err && err.code === '23505') {
281
281
  return res.fail('rank_exists', 409, { rank_key: rankKey });
@@ -2,7 +2,7 @@
2
2
 
3
3
  // The governance module's rank-role SYNC port (ADR 0151, BV1.R95b).
4
4
  //
5
- // A second, deliberately tiny kernel port beside `governance` (routes/governance.js).
5
+ // A second, deliberately tiny kernel port beside `government` (routes/government.js).
6
6
  // `governance` is the READ surface every gate resolves on every request; this is the
7
7
  // single WRITE core needs — "this builder's rank is now X, make their seeded
8
8
  // rank-role match". They are kept apart on purpose:
@@ -14,7 +14,7 @@
14
14
  // The port name is namespaced (`government.rankSync`) like the `ideas.capture` /
15
15
  // `art.getBuilderGeminiKeyRow` / `grade.builderRollingAvgGrade` ports.
16
16
  //
17
- // Registered from a route factory for the same reason routes/governance.js is:
17
+ // Registered from a route factory for the same reason routes/government.js is:
18
18
  // mountModuleRoutes is the one boot hook that runs BOTH in the live server and
19
19
  // whenever a test rebuilds the router, and registration is hasProvider-guarded so a
20
20
  // rebuild never trips the seam's single-provider duplicate guard.
@@ -10,7 +10,7 @@
10
10
  // Like The Watch + The Harbor, this reads /api/bongos/me to show a Sealed notice for
11
11
  // non-Archons — DEFENCE IN DEPTH only. GET /gate-approvals + POST
12
12
  // /gate-approvals/:pr/approve are ALSO archon-gated server-side (ADR 0016), and
13
- // the page itself is gated by server.js requireGovernancePage. On 401 → web sign-in.
13
+ // the page itself is gated by server.js requireGovernmentPage. On 401 → web sign-in.
14
14
 
15
15
  (() => {
16
16
  'use strict';
@@ -218,7 +218,7 @@
218
218
  }
219
219
  const rank = (me && (me.builder || me).rank || '').toLowerCase();
220
220
  // ADR 0157: the Gate page sits at the `page.view.government` floor (metic). The
221
- // server's requireGovernancePage is the wall — this only decides whether to render the
221
+ // server's requireGovernmentPage is the wall — this only decides whether to render the
222
222
  // body or the sealed notice, so it must agree or a Metic sees "sealed" on a page
223
223
  // they were just admitted to.
224
224
  if (rank !== 'metic' && rank !== 'archon') { showSealed(); return; }
@@ -6,28 +6,28 @@
6
6
  .gov-h { color: var(--ink); font-size: 16px; font-weight: 600; margin: 22px 0 8px; }
7
7
  .gov-h--minor { font-size: 13px; margin: 18px 0 6px; }
8
8
  .gov-grid-note { color: var(--ink-soft); font-size: 12.5px; margin: 0 0 12px; }
9
- /* Holds the rank-role reset button. Empty for every other role, so it collapses
9
+ /* Holds the ladder-rank reset button. Empty for every other rank, so it collapses
10
10
  rather than reserving a gap — hence no margin on the empty box itself. */
11
11
  .gov-grid-actions:not(:empty) { margin: 0 0 14px; }
12
12
  .gov-sealed, .gov-empty { color: var(--ink-soft); padding: 16px 0; }
13
13
 
14
- /* Two columns on wide screens: role rail left, permission grid right. */
14
+ /* Two columns on wide screens: rank rail left, permission grid right. */
15
15
  .gov-layout { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
16
16
  @media (max-width: 760px) { .gov-layout { grid-template-columns: 1fr; } }
17
17
 
18
- /* ---- role list ---------------------------------------------------------- */
19
- .gov-role-list { display: flex; flex-direction: column; gap: 8px; }
20
- .gov-role {
18
+ /* ---- rank list ---------------------------------------------------------- */
19
+ .gov-rank-list { display: flex; flex-direction: column; gap: 8px; }
20
+ .gov-rank {
21
21
  text-align: left; font: inherit; cursor: pointer;
22
22
  border: 1px solid var(--border); border-radius: var(--radius-sm);
23
23
  background: var(--surface); padding: 10px 12px;
24
24
  display: flex; flex-direction: column; gap: 4px;
25
25
  }
26
- .gov-role:hover { background: var(--surface-2); }
27
- .gov-role[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
28
- .gov-role__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
29
- .gov-role__label { font-weight: 600; color: var(--ink); font-size: 13.5px; }
30
- .gov-role__meta { color: var(--ink-faint); font-size: 11.5px; }
26
+ .gov-rank:hover { background: var(--surface-2); }
27
+ .gov-rank[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
28
+ .gov-rank__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
29
+ .gov-rank__label { font-weight: 600; color: var(--ink); font-size: 13.5px; }
30
+ .gov-rank__meta { color: var(--ink-faint); font-size: 11.5px; }
31
31
 
32
32
  .gov-pill {
33
33
  font-size: 10.5px; font-weight: 600;
@@ -3,16 +3,16 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <title>Governance — {{worldName}}</title>
7
- <meta name="description" content="Roles and permissions — create a custom role, grant everyday permissions, assign it to a builder. Trust-boundary powers stay locked.">
6
+ <title>Government — {{worldName}}</title>
7
+ <meta name="description" content="Ranks and permissions — create a custom rank, grant everyday permissions, assign it to a builder. Trust-boundary powers stay locked.">
8
8
  <link rel="icon" href="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><text x='16' y='24' font-size='24' text-anchor='middle' font-family='sans-serif'>⌂</text></svg>">
9
9
  <link rel="preconnect" href="https://fonts.googleapis.com">
10
10
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
11
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
12
12
  <link rel="stylesheet" href="/builders/style.css?v=2026-07-02-shell1">
13
- <link rel="stylesheet" href="/builders/governance.css">
13
+ <link rel="stylesheet" href="/builders/government.css">
14
14
  </head>
15
- <body data-page="governance" data-page-title="Governance">
15
+ <body data-page="government" data-page-title="Government">
16
16
 
17
17
  <div class="app">
18
18
  <aside class="app-sidebar" id="app-sidebar" aria-label="Primary"></aside>
@@ -27,15 +27,15 @@
27
27
 
28
28
  <section id="gov-body" hidden>
29
29
  <div class="gov-layout">
30
- <div class="gov-roles-col">
31
- <h2 class="gov-h">Roles</h2>
32
- <div class="gov-role-list" id="gov-role-list"></div>
30
+ <div class="gov-ranks-col">
31
+ <h2 class="gov-h">Ranks</h2>
32
+ <div class="gov-rank-list" id="gov-rank-list"></div>
33
33
  <form class="gov-create" id="gov-create-form" autocomplete="off">
34
- <h3 class="gov-h gov-h--minor">New custom role</h3>
35
- <input class="gov-input" id="gov-create-key" placeholder="role-key (kebab-case)" maxlength="64" required>
34
+ <h3 class="gov-h gov-h--minor">New custom rank</h3>
35
+ <input class="gov-input" id="gov-create-key" placeholder="rank-key (kebab-case)" maxlength="64" required>
36
36
  <input class="gov-input" id="gov-create-label" placeholder="Label" maxlength="200" required>
37
37
  <input class="gov-input" id="gov-create-desc" placeholder="Description (optional)" maxlength="2000">
38
- <button class="gov-btn" type="submit">Create role</button>
38
+ <button class="gov-btn" type="submit">Create rank</button>
39
39
  </form>
40
40
  </div>
41
41
 
@@ -48,16 +48,16 @@
48
48
  </div>
49
49
 
50
50
  <h2 class="gov-h">Assignments</h2>
51
- <p class="gov-grid-note">Hand a custom role to a builder. Rank roles are assigned by rank itself and cannot be granted here.</p>
51
+ <p class="gov-grid-note">Hand a custom rank to a builder. The four ladder ranks are assigned by rank itself and cannot be granted here.</p>
52
52
  <form class="gov-assign" id="gov-assign-form" autocomplete="off">
53
53
  <input class="gov-input gov-input--id" id="gov-assign-builder" type="number" min="1" placeholder="Builder id" required>
54
- <select class="gov-input" id="gov-assign-role" required></select>
54
+ <select class="gov-input" id="gov-assign-rank" required></select>
55
55
  <button class="gov-btn" type="submit">Assign</button>
56
56
  </form>
57
57
  <div id="gov-assignments"></div>
58
58
 
59
59
  <h2 class="gov-h">Machine principals</h2>
60
- <p class="gov-grid-note">Capabilities held by a machine identity, never by a person or a role. Shown for completeness — nothing here can be granted.</p>
60
+ <p class="gov-grid-note">Capabilities held by a machine identity, never by a person or a rank. Shown for completeness — nothing here can be granted.</p>
61
61
  <div id="gov-principals"></div>
62
62
  </section>
63
63
  </main>
@@ -73,6 +73,6 @@
73
73
  <!-- jump palette (Ctrl/Cmd-K). Optional by design: without it the shell's slot stays hidden. -->
74
74
  <script src="/builders/palette.js" defer></script>
75
75
  <script src="/builders/dom-utils.js?v=2026-06-16-gate"></script>
76
- <script src="/builders/governance.js?v=2026-08-06-governance"></script>
76
+ <script src="/builders/government.js?v=2026-08-06-governance"></script>
77
77
  </body>
78
78
  </html>