@groundnuty/macf 0.2.37 → 0.2.39

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 (82) hide show
  1. package/dist/.build-info.json +2 -2
  2. package/dist/cli/claude-sh.d.ts.map +1 -1
  3. package/dist/cli/claude-sh.js +13 -0
  4. package/dist/cli/claude-sh.js.map +1 -1
  5. package/dist/cli/commands/certs.d.ts.map +1 -1
  6. package/dist/cli/commands/certs.js +6 -2
  7. package/dist/cli/commands/certs.js.map +1 -1
  8. package/dist/cli/commands/doctor.d.ts +102 -3
  9. package/dist/cli/commands/doctor.d.ts.map +1 -1
  10. package/dist/cli/commands/doctor.js +349 -55
  11. package/dist/cli/commands/doctor.js.map +1 -1
  12. package/dist/cli/commands/fleet-doctor-inject.d.ts +52 -0
  13. package/dist/cli/commands/fleet-doctor-inject.d.ts.map +1 -0
  14. package/dist/cli/commands/fleet-doctor-inject.js +100 -0
  15. package/dist/cli/commands/fleet-doctor-inject.js.map +1 -0
  16. package/dist/cli/commands/fleet-doctor.d.ts +236 -0
  17. package/dist/cli/commands/fleet-doctor.d.ts.map +1 -0
  18. package/dist/cli/commands/fleet-doctor.js +481 -0
  19. package/dist/cli/commands/fleet-doctor.js.map +1 -0
  20. package/dist/cli/commands/fleet.d.ts +83 -0
  21. package/dist/cli/commands/fleet.d.ts.map +1 -0
  22. package/dist/cli/commands/fleet.js +225 -0
  23. package/dist/cli/commands/fleet.js.map +1 -0
  24. package/dist/cli/commands/init.d.ts +24 -0
  25. package/dist/cli/commands/init.d.ts.map +1 -1
  26. package/dist/cli/commands/init.js +79 -8
  27. package/dist/cli/commands/init.js.map +1 -1
  28. package/dist/cli/commands/migrate.d.ts +1 -0
  29. package/dist/cli/commands/migrate.d.ts.map +1 -1
  30. package/dist/cli/commands/ps.d.ts +17 -0
  31. package/dist/cli/commands/ps.d.ts.map +1 -0
  32. package/dist/cli/commands/ps.js +69 -0
  33. package/dist/cli/commands/ps.js.map +1 -0
  34. package/dist/cli/commands/registry-prune.d.ts +81 -0
  35. package/dist/cli/commands/registry-prune.d.ts.map +1 -0
  36. package/dist/cli/commands/registry-prune.js +163 -0
  37. package/dist/cli/commands/registry-prune.js.map +1 -0
  38. package/dist/cli/commands/restart-self.d.ts +111 -0
  39. package/dist/cli/commands/restart-self.d.ts.map +1 -0
  40. package/dist/cli/commands/restart-self.js +312 -0
  41. package/dist/cli/commands/restart-self.js.map +1 -0
  42. package/dist/cli/commands/routing-doctor-gh.d.ts +29 -0
  43. package/dist/cli/commands/routing-doctor-gh.d.ts.map +1 -0
  44. package/dist/cli/commands/routing-doctor-gh.js +103 -0
  45. package/dist/cli/commands/routing-doctor-gh.js.map +1 -0
  46. package/dist/cli/commands/routing-doctor.d.ts +183 -0
  47. package/dist/cli/commands/routing-doctor.d.ts.map +1 -0
  48. package/dist/cli/commands/routing-doctor.js +504 -0
  49. package/dist/cli/commands/routing-doctor.js.map +1 -0
  50. package/dist/cli/commands/update.d.ts.map +1 -1
  51. package/dist/cli/commands/update.js +9 -0
  52. package/dist/cli/commands/update.js.map +1 -1
  53. package/dist/cli/config.d.ts +2 -0
  54. package/dist/cli/config.d.ts.map +1 -1
  55. package/dist/cli/config.js +16 -0
  56. package/dist/cli/config.js.map +1 -1
  57. package/dist/cli/env-files.d.ts.map +1 -1
  58. package/dist/cli/env-files.js +11 -0
  59. package/dist/cli/env-files.js.map +1 -1
  60. package/dist/cli/host-prelude.d.ts +50 -0
  61. package/dist/cli/host-prelude.d.ts.map +1 -0
  62. package/dist/cli/host-prelude.js +256 -0
  63. package/dist/cli/host-prelude.js.map +1 -0
  64. package/dist/cli/index.js +122 -5
  65. package/dist/cli/index.js.map +1 -1
  66. package/dist/cli/proc-scan.d.ts +81 -0
  67. package/dist/cli/proc-scan.d.ts.map +1 -0
  68. package/dist/cli/proc-scan.js +172 -0
  69. package/dist/cli/proc-scan.js.map +1 -0
  70. package/dist/cli/role-settings-model.d.ts +70 -0
  71. package/dist/cli/role-settings-model.d.ts.map +1 -0
  72. package/dist/cli/role-settings-model.js +90 -0
  73. package/dist/cli/role-settings-model.js.map +1 -0
  74. package/dist/cli/settings-writer.d.ts +27 -0
  75. package/dist/cli/settings-writer.d.ts.map +1 -1
  76. package/dist/cli/settings-writer.js +144 -2
  77. package/dist/cli/settings-writer.js.map +1 -1
  78. package/package.json +2 -2
  79. package/plugin/rules/coordination.md +10 -0
  80. package/plugin/rules/silent-fallback-hazards.md +19 -4
  81. package/scripts/check-gh-attribution.sh +34 -10
  82. package/scripts/emit-turn-receipt.sh +44 -4
@@ -0,0 +1,90 @@
1
+ /**
2
+ * DR-028 — the canonical expected-`settings.json`-per-role model.
3
+ *
4
+ * A universal **floor** + per-role **deltas**: the single source of truth that
5
+ * BOTH `macf init` (emit) and `macf doctor` (validate / `--fix`) consume, so
6
+ * init-output and doctor-expectation can't diverge. See
7
+ * `design/decisions/DR-028-expected-settings-per-role.md`.
8
+ *
9
+ * **Doctrine** (DR-028 §Decision 1): the defense is the **`deny` list + the
10
+ * PreToolUse hooks**, NOT allow-enumeration — canonical macf commands embed
11
+ * `$GH_TOKEN`/`$MACF_WORKSPACE_DIR` ("Contains simple_expansion"), which defeat
12
+ * narrow `Bash(...)` patterns, so the floor uses broad `Bash(*)`.
13
+ *
14
+ * This module is the **data model only**. The `macf init` emit and the
15
+ * `macf doctor` validate/`--fix` wiring land in follow-up increments (gated on
16
+ * DR-028 ratification, macf#539). Importing the hook-command constants from
17
+ * `settings-writer` is one-directional (settings-writer does not import this),
18
+ * so there is no import cycle.
19
+ */
20
+ import { MACF_HOOK_COMMAND, MACF_MENTION_HOOK_COMMAND, MACF_LGTM_HOOK_COMMAND, MACF_CLOSE_HOOK_COMMAND, MACF_AUDITOR_HOOK_COMMAND, MACF_TURN_RECEIPT_HOOK_COMMAND, MACF_ATTRIBUTION_HOOK_COMMAND, MACF_REFLECTION_HOOK_COMMAND, ROLE_FLOOR_ALLOW, ROLE_FLOOR_DENY, } from './settings-writer.js';
21
+ // DR-028 universal floor allow/deny live in settings-writer.ts (zero deps) to
22
+ // avoid an import cycle — this module imports the hook constants FROM there, so
23
+ // the floor data must not flow the other way. Re-exported below so the model's
24
+ // public surface (what `macf doctor` validates against) stays in one place.
25
+ export { ROLE_FLOOR_ALLOW, ROLE_FLOOR_DENY };
26
+ /** Universal floor hooks (every role) — DR-028 §Decision 1. */
27
+ export const ROLE_FLOOR_HOOKS = [
28
+ { event: 'PreToolUse', matcher: 'Bash', command: MACF_HOOK_COMMAND, required: false },
29
+ { event: 'PreToolUse', matcher: 'Bash', command: MACF_MENTION_HOOK_COMMAND, required: false },
30
+ { event: 'PreToolUse', matcher: 'Bash', command: MACF_LGTM_HOOK_COMMAND, required: false },
31
+ { event: 'PreToolUse', matcher: 'Bash', command: MACF_CLOSE_HOOK_COMMAND, required: false },
32
+ { event: 'PostToolUse', matcher: 'Bash', command: MACF_ATTRIBUTION_HOOK_COMMAND, required: false },
33
+ { event: 'UserPromptSubmit', command: MACF_TURN_RECEIPT_HOOK_COMMAND, required: false },
34
+ { event: 'PreCompact', command: MACF_REFLECTION_HOOK_COMMAND, required: false },
35
+ ];
36
+ /**
37
+ * Per-role deltas. Roles not listed get the universal floor as-is
38
+ * (code / science / devops — they all file + review PRs).
39
+ */
40
+ export const ROLE_SETTINGS_DELTAS = {
41
+ // The auditor (DR-026): the `never-acts` hook is REQUIRED — a missing one is
42
+ // an error, not drift. It STILL gets `Write`/`Edit` from the floor (it writes
43
+ // proposals/digests locally); never-acts is hook-enforced on `gh pr merge` /
44
+ // `issue close` (DR-026 §1/§4), not permission-removed.
45
+ auditor: {
46
+ hooks: [
47
+ { event: 'PreToolUse', matcher: 'Bash', command: MACF_AUDITOR_HOOK_COMMAND, required: true },
48
+ ],
49
+ },
50
+ };
51
+ /**
52
+ * The roles the framework recognizes — ships an agent template / model handling
53
+ * for (macf#551). The floor applies to ALL roles; only some carry deltas
54
+ * (`ROLE_SETTINGS_DELTAS`). An `agent_role` OUTSIDE this set is a custom role
55
+ * (legitimate — floor-only), but `macf doctor` surfaces it (INFO) so a typo on
56
+ * a delta-bearing SAFETY-critical role — e.g. `auditor-agent` instead of the
57
+ * exact `auditor`, which would silently skip the never-acts hook AND its doctor
58
+ * ERROR — becomes visible instead of degrading silently. NOTE: `auditor` has no
59
+ * `-agent` suffix (unlike `code-agent`); use the exact strings here.
60
+ */
61
+ export const KNOWN_ROLES = [
62
+ 'auditor',
63
+ 'code-agent',
64
+ 'science-agent',
65
+ 'devops-agent',
66
+ 'writing-agent',
67
+ 'exp-code-agent',
68
+ 'exp-science-code-aware',
69
+ 'exp-science-domain-only',
70
+ 'exp-single-agent',
71
+ ];
72
+ /** True if `role` is a framework-recognized role (see `KNOWN_ROLES`). */
73
+ export function isKnownRole(role) {
74
+ return KNOWN_ROLES.includes(role);
75
+ }
76
+ /** Expected hooks for a role = the floor + the role's delta hooks. */
77
+ export function expectedHooksForRole(role) {
78
+ const delta = ROLE_SETTINGS_DELTAS[role];
79
+ return delta?.hooks ? [...ROLE_FLOOR_HOOKS, ...delta.hooks] : ROLE_FLOOR_HOOKS;
80
+ }
81
+ /**
82
+ * Expected base `allow` for a role = the floor + the role's extra allow
83
+ * entries. The emitter composes `PLUGIN_SKILL_PERMISSIONS` +
84
+ * `PLUGIN_MCP_TOOL_PERMISSIONS` onto this.
85
+ */
86
+ export function expectedAllowForRole(role) {
87
+ const delta = ROLE_SETTINGS_DELTAS[role];
88
+ return delta?.allow ? [...ROLE_FLOOR_ALLOW, ...delta.allow] : ROLE_FLOOR_ALLOW;
89
+ }
90
+ //# sourceMappingURL=role-settings-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"role-settings-model.js","sourceRoot":"","sources":["../../src/cli/role-settings-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,EA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AyB,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC7F;KACF;CACF,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,WAAW,GAAsB;IAC5C,SAAS;IACT,YAAY;IACZ,eAAe;IACf,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,wBAAwB;IACxB,yBAAyB;IACzB,kBAAkB;CACnB,CAAC;AAEF,yEAAyE;AACzE,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC;AACjF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC;AACjF,CAAC"}
@@ -143,6 +143,22 @@ export declare const MACF_REFLECTION_HOOK_COMMAND = "$CLAUDE_PROJECT_DIR/.claude
143
143
  * a skill, add its pattern here + bump CLI version. macf#350 added
144
144
  * `macf-notify-peer` (operator-driven cross-agent messaging slash-command).
145
145
  */
146
+ /**
147
+ * DR-028 universal floor `allow` tools (every role). Broad `Bash(*)` — narrow
148
+ * patterns are defeated by `$GH_TOKEN`/`$MACF_WORKSPACE_DIR` "simple_expansion";
149
+ * the real defense is the `deny` floor + the PreToolUse hooks, NOT
150
+ * allow-narrowing. `Write`/`Edit` close the memory-edit prompt. Defined here
151
+ * (zero deps) so `role-settings-model.ts` re-exports it without an import cycle
152
+ * (that module imports the hook constants FROM here). See
153
+ * `design/decisions/DR-028-expected-settings-per-role.md`.
154
+ */
155
+ export declare const ROLE_FLOOR_ALLOW: readonly string[];
156
+ /**
157
+ * DR-028 universal floor `deny` — the real guardrail (seeded from devops's set,
158
+ * the most complete of the three working agents): credential/secret reads +
159
+ * config/dotfile writes + dangerous commands.
160
+ */
161
+ export declare const ROLE_FLOOR_DENY: readonly string[];
146
162
  export declare const PLUGIN_SKILL_PERMISSIONS: readonly string[];
147
163
  /**
148
164
  * Permission patterns pre-approving the MCP tools that
@@ -239,6 +255,17 @@ export declare function getPermissionsAllow(workspaceDir: string): readonly stri
239
255
  * INFO-severity classification fires on the union.
240
256
  */
241
257
  export declare function getPermissionsDeny(workspaceDir: string): readonly string[];
258
+ /**
259
+ * Read the workspace-effective set of hook command strings — the union of
260
+ * `.claude/settings.json` + `.claude/settings.local.json` across EVERY hook
261
+ * event (PreToolUse / PostToolUse / UserPromptSubmit / PreCompact / …). The
262
+ * order-/event-agnostic command list is what `macf doctor` (DR-028) validates
263
+ * against the role model: the model identifies a wired hook by its command
264
+ * string (the same identity `installGhTokenHook` writes), not by which event
265
+ * array it lives in, so a flat deduped command set is the right comparison
266
+ * surface. Throws on malformed JSON in either file (via `readSettings`).
267
+ */
268
+ export declare function getHookCommands(workspaceDir: string): readonly string[];
242
269
  /**
243
270
  * Install (or refresh) the `/proc/self/fd` entry in
244
271
  * `.claude/settings.json`'s `sandbox.filesystem.allowRead` array.
@@ -1 +1 @@
1
- {"version":3,"file":"settings-writer.d.ts","sourceRoot":"","sources":["../../src/cli/settings-writer.ts"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iBAAiB,0DAA0D,CAAC;AAEzF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,iEAAiE,CAAC;AAExG;;;;;;;;;;;;GAY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94 @@ function readSettings(path) {
207
207
  * a skill, add its pattern here + bump CLI version. macf#350 added
208
208
  * `macf-notify-peer` (operator-driven cross-agent messaging slash-command).
209
209
  */
210
+ /**
211
+ * DR-028 universal floor `allow` tools (every role). Broad `Bash(*)` — narrow
212
+ * patterns are defeated by `$GH_TOKEN`/`$MACF_WORKSPACE_DIR` "simple_expansion";
213
+ * the real defense is the `deny` floor + the PreToolUse hooks, NOT
214
+ * allow-narrowing. `Write`/`Edit` close the memory-edit prompt. Defined here
215
+ * (zero deps) so `role-settings-model.ts` re-exports it without an import cycle
216
+ * (that module imports the hook constants FROM here). See
217
+ * `design/decisions/DR-028-expected-settings-per-role.md`.
218
+ */
219
+ export const ROLE_FLOOR_ALLOW = [
220
+ 'Bash(*)',
221
+ 'Read',
222
+ 'Write',
223
+ 'Edit',
224
+ 'Glob',
225
+ 'Grep',
226
+ 'WebFetch',
227
+ 'WebSearch',
228
+ 'Agent',
229
+ ];
230
+ /**
231
+ * DR-028 universal floor `deny` — the real guardrail (seeded from devops's set,
232
+ * the most complete of the three working agents): credential/secret reads +
233
+ * config/dotfile writes + dangerous commands.
234
+ */
235
+ export const ROLE_FLOOR_DENY = [
236
+ // credential / secret reads
237
+ 'Read(~/.ssh/id_*)',
238
+ 'Read(~/.ssh/*.pem)',
239
+ 'Read(~/.aws/**)',
240
+ 'Read(~/.gnupg/**)',
241
+ 'Read(~/.kube/**)',
242
+ 'Read(~/.config/gcloud/**)',
243
+ 'Read(~/.netrc)',
244
+ 'Read(~/.config/gh/**)',
245
+ 'Read(~/.bash_history)',
246
+ 'Read(~/.zsh_history)',
247
+ // config / dotfile writes
248
+ 'Write(~/.claude/settings.json)',
249
+ 'Edit(~/.claude/settings.json)',
250
+ 'Write(~/.claude.json)',
251
+ 'Edit(~/.claude.json)',
252
+ 'Write(~/.ssh/**)',
253
+ 'Edit(~/.ssh/**)',
254
+ 'Write(~/.aws/**)',
255
+ 'Edit(~/.aws/**)',
256
+ 'Write(~/.gnupg/**)',
257
+ 'Edit(~/.gnupg/**)',
258
+ 'Write(~/.kube/**)',
259
+ 'Edit(~/.kube/**)',
260
+ 'Write(~/.config/gcloud/**)',
261
+ 'Edit(~/.config/gcloud/**)',
262
+ 'Write(~/.gitconfig)',
263
+ 'Edit(~/.gitconfig)',
264
+ 'Write(~/.npmrc)',
265
+ 'Edit(~/.npmrc)',
266
+ 'Write(~/.pypirc)',
267
+ 'Edit(~/.pypirc)',
268
+ 'Write(~/.docker/config.json)',
269
+ 'Edit(~/.docker/config.json)',
270
+ 'Write(~/.netrc)',
271
+ 'Edit(~/.netrc)',
272
+ 'Write(~/.config/gh/**)',
273
+ 'Edit(~/.config/gh/**)',
274
+ 'Write(~/.bashrc)',
275
+ 'Edit(~/.bashrc)',
276
+ 'Write(~/.zshrc)',
277
+ 'Edit(~/.zshrc)',
278
+ 'Write(~/.profile)',
279
+ 'Edit(~/.profile)',
280
+ 'Write(~/.bash_profile)',
281
+ 'Edit(~/.bash_profile)',
282
+ 'Write(~/.zprofile)',
283
+ 'Edit(~/.zprofile)',
284
+ 'Write(~/.zshenv)',
285
+ 'Edit(~/.zshenv)',
286
+ // dangerous commands
287
+ 'Bash(sudo *)',
288
+ 'Bash(rm -rf /)',
289
+ 'Bash(git push --force*)',
290
+ 'Bash(git push * --force*)',
291
+ 'Bash(git push -f)',
292
+ 'Bash(git push -f *)',
293
+ 'Bash(git push * -f)',
294
+ 'Bash(git push * -f *)',
295
+ 'Bash(git commit --no-verify *)',
296
+ 'Bash(git commit -n *)',
297
+ ];
210
298
  export const PLUGIN_SKILL_PERMISSIONS = [
211
299
  'Skill(macf-agent:macf-status)',
212
300
  'Skill(macf-agent:macf-issues)',
@@ -351,6 +439,37 @@ export function getPermissionsDeny(workspaceDir) {
351
439
  const local = readPermissionsArray(join(claudeDir, 'settings.local.json'), 'deny');
352
440
  return Array.from(new Set([...main, ...local]));
353
441
  }
442
+ /**
443
+ * Read the workspace-effective set of hook command strings — the union of
444
+ * `.claude/settings.json` + `.claude/settings.local.json` across EVERY hook
445
+ * event (PreToolUse / PostToolUse / UserPromptSubmit / PreCompact / …). The
446
+ * order-/event-agnostic command list is what `macf doctor` (DR-028) validates
447
+ * against the role model: the model identifies a wired hook by its command
448
+ * string (the same identity `installGhTokenHook` writes), not by which event
449
+ * array it lives in, so a flat deduped command set is the right comparison
450
+ * surface. Throws on malformed JSON in either file (via `readSettings`).
451
+ */
452
+ export function getHookCommands(workspaceDir) {
453
+ const absDir = resolve(workspaceDir);
454
+ const claudeDir = join(absDir, '.claude');
455
+ const commands = [];
456
+ for (const file of ['settings.json', 'settings.local.json']) {
457
+ const settings = readSettings(join(claudeDir, file));
458
+ const hooks = settings.hooks ?? {};
459
+ for (const event of Object.keys(hooks)) {
460
+ const entries = hooks[event];
461
+ if (!Array.isArray(entries))
462
+ continue;
463
+ for (const entry of entries) {
464
+ for (const h of entry.hooks ?? []) {
465
+ if (typeof h.command === 'string')
466
+ commands.push(h.command);
467
+ }
468
+ }
469
+ }
470
+ }
471
+ return Array.from(new Set(commands));
472
+ }
354
473
  /**
355
474
  * Legacy MACF-managed patterns that earlier CLI versions wrote to
356
475
  * `allowRead`. Dropped from the array before installing the current
@@ -641,17 +760,40 @@ export function installPluginSkillPermissions(workspaceDir) {
641
760
  return false;
642
761
  return true;
643
762
  });
644
- const allow = [
645
- ...preserved,
763
+ // DR-028 (macf#534): emit the role-aware floor — not just skill/mcp perms.
764
+ // `Bash(*)` + Read/Write/Edit/etc close the "pure-init agent prompts on every
765
+ // command" + the memory-edit gaps; `deny` is the real guardrail. Dedup so a
766
+ // workspace whose hand-wired settings already carry the floor (the substrate)
767
+ // doesn't double entries. Floor + plugin perms FIRST, then preserved operator
768
+ // extras (minus the stale macf-managed skill/mcp entries dropped above + any
769
+ // floor entry already present, to avoid duplicates).
770
+ const floorAndPlugin = [
771
+ ...ROLE_FLOOR_ALLOW,
646
772
  ...PLUGIN_SKILL_PERMISSIONS,
647
773
  ...PLUGIN_MCP_TOOL_PERMISSIONS,
648
774
  ];
775
+ const floorSet = new Set(floorAndPlugin);
776
+ const allow = [
777
+ ...floorAndPlugin,
778
+ ...preserved.filter((e) => !(typeof e === 'string' && floorSet.has(e))),
779
+ ];
780
+ // DR-028 deny floor — union with operator-authored deny entries (preserve
781
+ // extras, dedup, idempotent on re-run).
782
+ const existingDeny = Array.isArray(settings['permissions'] && settings['permissions']['deny'])
783
+ ? settings['permissions'].deny
784
+ : [];
785
+ const denySet = new Set(ROLE_FLOOR_DENY);
786
+ const deny = [
787
+ ...ROLE_FLOOR_DENY,
788
+ ...existingDeny.filter((e) => !(typeof e === 'string' && denySet.has(e))),
789
+ ];
649
790
  const existingPermissions = settings['permissions'] ?? {};
650
791
  const updated = {
651
792
  ...settings,
652
793
  permissions: {
653
794
  ...existingPermissions,
654
795
  allow,
796
+ deny,
655
797
  },
656
798
  };
657
799
  writeFileSync(path, JSON.stringify(updated, null, 2) + '\n');
@@ -1 +1 @@
1
- {"version":3,"file":"settings-writer.js","sourceRoot":"","sources":["../../src/cli/settings-writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,uDAAuD,CAAC;AAEzF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,8DAA8D,CAAC;AAExG;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,wDAAwD,CAAC;AAE/F;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,4DAA4D,CAAC;AAEpG;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,iEAAi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AAG,kBAAkB,CAAC;SACzD;KACF,CAAC;IAEF,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AAC/D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groundnuty/macf",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "description": "Multi-Agent Coordination Framework CLI — coordinate Claude Code agents via GitHub. Installs as `macf` binary; use `macf init` to set up an agent workspace, `macf update` to refresh rules + version pins.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "test:watch": "vitest"
36
36
  },
37
37
  "dependencies": {
38
- "@groundnuty/macf-core": "0.2.37",
38
+ "@groundnuty/macf-core": "0.2.39",
39
39
  "commander": "^14.0.3",
40
40
  "reflect-metadata": "^0.2.2",
41
41
  "zod": "^4.0.0"
@@ -136,6 +136,16 @@ The rules here are topology-agnostic: they work whether the project uses a scien
136
136
 
137
137
  **Verified motivation:** three operator-surfaced stalls where a peer's review request sat idle (42 min in one case; ~2.5 h in another) because the reviewer went idle without sweeping — the ping had arrived during a long single-threaded task and was never picked back up. In each case the peer's PR was blocked the entire time on a formal approval that never came.
138
138
 
139
+ **(c) Sweep your GATES against GitHub state — don't wait for a ping that may never come.** §5(a)/(b) cover the REVIEWER's inbound obligation (review requests addressed to you). The symmetric gap they don't cover: when YOUR next action is gated on a review/approval landing on **someone else's PR** — you are the *gate-owner*, not the PR author and not the requested reviewer — `route-by-pr-review-state` notifies only the **PR author**, NOT you. A review that clears your gate fires **no signal to you**, and your gate silently reads "pending" (this is `silent-fallback-hazards.md` Instance 13: reviewer ≠ next-actor, which is the *common* case once a fleet collaborates freely). Before recording a gate as satisfied OR as still-blocked, assert its artifact directly:
140
+
141
+ # Does the approval my next step is gated on actually exist?
142
+ gh pr view <N> --repo <owner>/<repo> --json reviews \
143
+ --jq '[.reviews[] | select(.author.login=="<gate-reviewer>" and .state=="APPROVED")] | length'
144
+
145
+ This is the result-invariant (Pattern A) at the **gate boundary** — clear the gate from GitHub state, never from "did I get pinged." It generalizes §5(b)'s reviewer-sweep from the *requested-reviewer* side to the *gate-owner* side. A reviewer **SHOULD** also @mention a known gate-owner in the review body (`route-by-mention` carries it) as a courtesy — but that depends on the reviewer remembering, so the gate-owner's own sweep is the load-bearing defense, not the courtesy.
146
+
147
+ **Verified motivation:** `groundnuty/macf` PR #574 (2026-06-26) — code-agent's approval was the framework-feasibility gate devops's impl work depended on; `route-by-pr-review-state` notified the PR author (science) only, devops received no signal, and its gate read "code's review still pending" though the APPROVED review existed. Resolved only by a manual relay + an operator-prompted direct channel push. A one-line gate-sweep would have cleared it immediately.
148
+
139
149
  ---
140
150
 
141
151
  ## When You're Stuck — Escalation
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **Workspaces without full `macf init`** (e.g. `groundnuty/macf` itself, or any Claude Code workspace operated by a bot that isn't a MACF-registered agent) can still get this canonical rule via `macf rules refresh --dir <workspace>`. Same copy, no App credentials or registry required.
6
6
 
7
- This rule names the CLASS so agents recognize the shape on first encounter rather than re-discovering each instance from scratch. Eleven active instances are documented below as worked examples spanning different architectural layers (identity, parsing, TUI binding, observability routing, config substitution, multi-agent coordination protocol, metric-instrumentation lifecycle, observability-endpoint routing, release-pipeline-partial-publish, third-party-action retry-exhaustion, credential-refresh temporal-binding). (Instance 10 — a legacy substrate-routing receipt-gap — was retired 2026-06-07; its number is kept, not reused.) Ten of eleven active instances have structural defenses applied or in flight — the pattern of defense generalizes alongside the pattern of hazard.
7
+ This rule names the CLASS so agents recognize the shape on first encounter rather than re-discovering each instance from scratch. Twelve active instances are documented below as worked examples spanning different architectural layers (identity, parsing, TUI binding, observability routing, config substitution, multi-agent coordination protocol, metric-instrumentation lifecycle, observability-endpoint routing, release-pipeline-partial-publish, third-party-action retry-exhaustion, credential-refresh temporal-binding, multi-agent review-gate routing). (Instance 10 — a legacy substrate-routing receipt-gap — was retired 2026-06-07; its number is kept, not reused.) Eleven of twelve active instances have structural defenses applied or in flight — the pattern of defense generalizes alongside the pattern of hazard.
8
8
 
9
9
  Instance 9 is annotated as **sister-shape** (failure correctly surfaced + partial side-effect breaks retry idempotency) — listed here for cross-reference convenience but warrants a sibling canonical rule (`partial-side-effect-hazards.md`) if more instances surface. The two classes share "multi-step pipeline where consumer assumes atomicity" but the failure surface differs: silent-fallback hides at the API boundary; partial-side-effect surfaces loudly but persists semi-state.
10
10
 
@@ -219,6 +219,20 @@ Two adjacent sub-failures: **(a)** `export X=$(helper)` masks a fail-loud helper
219
219
 
220
220
  ---
221
221
 
222
+ ### Instance 13 — PR-review-state routing strands interested third-party gate-owners (reviewer ≠ next-actor)
223
+
224
+ **Surface:** `route-by-pr-review-state` (macf-actions v3.3.0+) — fires on `pull_request_review.submitted` (state in {approved, changes_requested}) and notifies the **PR author's** channel-server.
225
+
226
+ **Failure shape:** the review is submitted + routed successfully (API success: webhook fires, author notified, HTTP 200). But in a multi-agent fleet the party who needs to know a review landed is frequently NOT the author — it is a **third agent whose own work is gated on that review** (build-gate owner, downstream implementer, coordinator). `route-by-pr-review-state` has no path to that third party; the blocked agent receives nothing and its gate **silently reads "pending"** though the review exists — invisible until the gate stalls and a human notices. `route-by-mention` CAN reach a third party IF the reviewer @mentions them in the review body, but the body is naturally addressed to the author, so the convention is forgotten: the capability exists, the discipline doesn't.
227
+
228
+ **Recurrence:** First confirmed — `groundnuty/macf` PR #574 (2026-06-26). `macf-devops-agent` APPROVED `17:07:10Z`, then was gated for its impl work on `macf-code-agent`'s framework-feasibility approval; code-agent APPROVED 31 s later (`17:07:41Z`); `route-by-pr-review-state` notified the author (`macf-science-agent`) only, and code's review body @mentioned only science, never devops (auditor-re-verified against the `/pulls/574/reviews` API + bodies + thread). The downstream consequence (devops's gate read "pending"; resolved by a manual relay + an operator-prompted direct channel push) is code-agent's reported channel trace, not GitHub-re-verifiable — the GitHub-observable structure above fully supports the mechanism regardless. **Scales worse with fleet size:** in a 2-agent author↔reviewer loop the author IS the next actor; in an N-agent fleet where a review unblocks a *different* agent, "reviewer ≠ next-actor" is the common case — which is why this surfaced exactly as the fleet began collaborating more freely.
229
+
230
+ **Defense status:** Pattern A (result-invariant at the gate boundary) is load-bearing — a gate-owner clears its gate by **asserting the artifact exists on GitHub** (does an APPROVED review exist on the PR my gate depends on?), never by waiting for a ping. Codified as the `coordination.md §Communication 5(c)` gate-sweep refinement (cheap, immediate, no code change) — it generalizes the existing §5(b) reviewer-sweep from the *requested-reviewer* side to the *gate-owner* side. Deeper structural retirement (cf. Instances 3/6): extend `route-by-pr-review-state` to also route to review-body @mentions — a macf-actions follow-up (filed as `groundnuty/macf-actions#57`). Reviewer-@mentions-the-gate-owner is a complementary courtesy folded into §5(c) as a SHOULD, not load-bearing (it depends on the reviewer remembering).
231
+
232
+ **Pattern:** A (gate-side result-invariant assert) + structural route-extension.
233
+
234
+ ---
235
+
222
236
  ## How to recognize the class on first encounter
223
237
 
224
238
  When investigating a "the operation completed but the outcome is wrong" incident, suspect silent-fallback if ANY of:
@@ -360,7 +374,7 @@ Silent-fallback hazards are **architectural**, not implementation bugs. They eme
360
374
 
361
375
  For coordination-system safety analysis: this is a class of hazards multi-agent systems must explicitly defend against. Each new instance teaches the same lesson; the class-name is what makes the lesson transferable across agents.
362
376
 
363
- ### Defense-pattern emergence (9-of-10 active instances have structural defense applied or shipped)
377
+ ### Defense-pattern emergence (11-of-12 active instances have structural defense applied or shipped)
364
378
 
365
379
  | Instance | Surface | Structural defense | Pattern |
366
380
  |---|---|---|---|
@@ -375,8 +389,9 @@ For coordination-system safety analysis: this is a class of hazards multi-agent
375
389
  | 9 — Sigstore TLOG orphans on failed npm publish (sister-class) | npm publish + sigstore attestation pipeline | Three-defense composite: bump-version recovery (DR-022 Amendment L) + pre-flight registry-collision check (Pattern D analog, macf#380) + TLOG-state observability (devops-toolkit#74+#77 Grafana dashboard live) | Pattern D analog (pre-flight precheck) + recovery-procedure-codification |
376
390
  | 11 — Third-party retry-wrapping action exits 0 on retry-exhaustion | Consumer-CI connect/auth via third-party action (tailnet, OTLP, cloud-auth, registry-login) | SHIPPED — "Verify <resource> is up" step immediately after the connect asserts the connection's result-invariant (e.g. `tailscale status` `BackendState == "Running"`) + fails LOUD; never trusts the action's exit code about its own retry exhaustion (macf#461) | Pattern A (post-connect result-invariant assert) + Pattern D flavor (precheck-before-downstream) |
377
391
  | 12 — PreToolUse credential-guard validates ambient token, blind to inline reassignment | gh-token PreToolUse hook + inline `export GH_TOKEN=$(...) && gh` (refresh-chain or file-cache) | DOC shipped (de-footgun `gh-token-refresh.md` + atomic-validated cache) + STRUCTURAL in flight (Pattern A result-invariant PostToolUse whoami post-check, macf#489) | Pattern A (result-invariant post-check — a wrong-temporal-level precondition can't see the inline clobber) |
392
+ | 13 — PR-review-state routing strands third-party gate-owners (reviewer ≠ next-actor) | `route-by-pr-review-state` notifies the PR author only; a review that clears a *third* agent's gate fires no signal to that agent | Codified — `coordination.md §Communication 5(c)` gate-sweep (assert the APPROVED review exists on GitHub, don't wait for a ping); generalizes the §5(b) reviewer-sweep to the gate-owner side. Structural retirement (route review-state to body-@mentions) is a macf-actions follow-up | Pattern A (gate-side result-invariant assert) + structural route-extension |
378
393
 
379
- Ten of eleven active instances have structural defense applied, shipped, or in flight. Defense patterns (A, B, C, D, E) generalize across instances — they're reusable defense templates, not case-specific fixes. **Pattern A (result-invariant assertion at the boundary) bears the most weight** — it's the structural defense for instances 4, 7, 8, 11, AND 12 (5 of 11), each at a different architectural boundary (logs pipeline, metric counter, observability endpoint, third-party-action connect-verify, credential-refresh temporal-binding). Instance 8's five-surface defense topology (consumer canonical + cluster-side compat port-map + concrete Pattern A impl) demonstrates that structural defense at the observability-pipeline-class can compose across architectural layers — the canonical-distribution layer + the cluster-infrastructure layer + the assertion-script layer all reinforce each other rather than substituting for each other. Instance 9 demonstrates that the Pattern D template generalizes from workflow-secrets-prechecks to release-pipeline-prechecks AND that recovery-procedure-codification (DR-022 Amendment L's bump-version-not-tag-retry) is its own defense category — distinct from detection-pre-merge defenses (Patterns A/B/D) and discrimination-at-receiver defenses (Pattern E).
394
+ Eleven of twelve active instances have structural defense applied, shipped, or in flight. Defense patterns (A, B, C, D, E) generalize across instances — they're reusable defense templates, not case-specific fixes. **Pattern A (result-invariant assertion at the boundary) bears the most weight** — it's the structural defense for instances 4, 7, 8, 11, 12, AND 13 (6 of 12), each at a different architectural boundary (logs pipeline, metric counter, observability endpoint, third-party-action connect-verify, credential-refresh temporal-binding, multi-agent review-gate boundary). Instance 8's five-surface defense topology (consumer canonical + cluster-side compat port-map + concrete Pattern A impl) demonstrates that structural defense at the observability-pipeline-class can compose across architectural layers — the canonical-distribution layer + the cluster-infrastructure layer + the assertion-script layer all reinforce each other rather than substituting for each other. Instance 9 demonstrates that the Pattern D template generalizes from workflow-secrets-prechecks to release-pipeline-prechecks AND that recovery-procedure-codification (DR-022 Amendment L's bump-version-not-tag-retry) is its own defense category — distinct from detection-pre-merge defenses (Patterns A/B/D) and discrimination-at-receiver defenses (Pattern E).
380
395
 
381
396
  The breadth of layers spanned by 5 different defense patterns (identity, parsing, TUI binding, observability routing, config substitution, multi-agent coordination protocol, metric-instrumentation lifecycle, observability-endpoint routing, release-pipeline-partial-publish, third-party-action retry-exhaustion, credential-refresh temporal-binding) is independent evidence that the hazard CLASS is real. If silent-fallback was a single-instance accident, no defense pattern would emerge. **Pattern A's recurrence across 3 different observability boundaries (logs / metrics / endpoint) is the strongest signal that result-invariant assertion is the load-bearing structural-defense template for the entire observability-pipeline-class** of silent fallback.
382
397
 
@@ -392,7 +407,7 @@ Add when ALL of the following hold:
392
407
 
393
408
  The class-name is what makes the lesson transferable, not multi-agent witness. A single-agent-confirmed instance with a concrete trace + identified defense pattern is sufficient for canonicalization (instances 4, 5, 7, 8 are all single-agent-confirmed). Cross-agent triangulation strengthens the framing but isn't a precondition.
394
409
 
395
- Add as a new numbered section (the next number is **13** — numbering is append-only; retired instances keep their slot, see Instance 10) with the same fields: Surface / Failure shape / Recurrence / Defense status. Increment the intro paragraph's active-instance count + the Defense-pattern emergence header's `N-of-M active instances` count too.
410
+ Add as a new numbered section (the next number is **14** — numbering is append-only; retired instances keep their slot, see Instance 10) with the same fields: Surface / Failure shape / Recurrence / Defense status. Increment the intro paragraph's active-instance count + the Defense-pattern emergence header's `N-of-M active instances` count too.
396
411
 
397
412
  ---
398
413
 
@@ -135,20 +135,36 @@ ACTUAL_TYPE="$(jq -r '.type // ""' <<<"$RESP" 2>/dev/null || echo "")"
135
135
  # Couldn't extract an author at all → fail open.
136
136
  [[ -z "$ACTUAL_LOGIN" ]] && exit 0
137
137
 
138
- # ── Resolve the EXPECTED bot login (first hit wins; may be empty) ─────────
139
- # 1. $MACF_EXPECTED_BOT_LOGIN explicit operator/test override.
140
- # 2. .macf/macf-agent.jsonderive `<name>[bot]` from the workspace config.
141
- # The canonical workspace field is `agent_name`; the repo-side
142
- # agent-config.json carries `app_name`. Accept either (agent_name first).
143
- # 3. empty — fall back to the type-based check below.
138
+ # ── Resolve the EXPECTED bot login + whether it is AUTHORITATIVE ──────────
139
+ # AUTHORITATIVE sources (a mismatch is a real trap, even vs a different Bot):
140
+ # 1. $MACF_EXPECTED_BOT_LOGINexplicit operator/test override.
141
+ # 2. .macf/macf-agent.json `.github_app.bot_login` the App's real bot login
142
+ # (App slug + `[bot]`), written by macf init/doctor (DR-028). Authoritative.
143
+ # NON-authoritative HINT:
144
+ # 3. .macf/macf-agent.json `.agent_name` / `.app_name` — a derived guess that
145
+ # assumes agent_name == App slug, which is NOT always true (macf#535: the
146
+ # auditor's agent_name is "auditor" but its App slug is macf-auditor-agent).
147
+ # A mismatch on this guess is trapped ONLY when a User authored it (the
148
+ # Instance-12 trap); a Bot author that just doesn't match the guess is the
149
+ # name!=slug case and is allowed (no false positive).
150
+ # 4. empty — fall back to the type-based check below.
144
151
  EXPECTED_LOGIN="${MACF_EXPECTED_BOT_LOGIN:-}"
152
+ EXPECTED_AUTHORITATIVE=0
153
+ [[ -n "$EXPECTED_LOGIN" ]] && EXPECTED_AUTHORITATIVE=1
145
154
  if [[ -z "$EXPECTED_LOGIN" ]]; then
146
155
  AGENT_JSON="${CLAUDE_PROJECT_DIR:-.}/.macf/macf-agent.json"
147
156
  if [[ -f "$AGENT_JSON" ]]; then
148
- AGENT_NAME="$(jq -r '.agent_name // .app_name // ""' "$AGENT_JSON" 2>/dev/null || echo "")"
149
- if [[ -n "$AGENT_NAME" ]]; then
157
+ BOT_LOGIN="$(jq -r '.github_app.bot_login // .bot_login // ""' "$AGENT_JSON" 2>/dev/null || echo "")"
158
+ if [[ -n "$BOT_LOGIN" ]]; then
150
159
  # Append `[bot]` exactly once (tolerate a config that already carries it).
151
- EXPECTED_LOGIN="${AGENT_NAME%"[bot]"}[bot]"
160
+ EXPECTED_LOGIN="${BOT_LOGIN%"[bot]"}[bot]"
161
+ EXPECTED_AUTHORITATIVE=1
162
+ else
163
+ AGENT_NAME="$(jq -r '.agent_name // .app_name // ""' "$AGENT_JSON" 2>/dev/null || echo "")"
164
+ if [[ -n "$AGENT_NAME" ]]; then
165
+ # Non-authoritative guess (see note above) — leave AUTHORITATIVE=0.
166
+ EXPECTED_LOGIN="${AGENT_NAME%"[bot]"}[bot]"
167
+ fi
152
168
  fi
153
169
  fi
154
170
  fi
@@ -171,7 +187,15 @@ if [[ -n "$EXPECTED_LOGIN" ]]; then
171
187
  if [[ "$NORM_ACTUAL" == "$NORM_EXPECTED" ]]; then
172
188
  exit 0
173
189
  fi
174
- MISMATCH=1
190
+ # Mismatch. Trap if the expectation is AUTHORITATIVE (env / bot_login — a
191
+ # different author, even a Bot, is wrong), OR a User authored it (the
192
+ # Instance-12 trap, regardless of source). A Bot author that only mismatches
193
+ # a NON-authoritative agent_name guess is the name!=slug case (macf#535) → ok.
194
+ if [[ "$EXPECTED_AUTHORITATIVE" == "1" || "$ACTUAL_TYPE" != "Bot" ]]; then
195
+ MISMATCH=1
196
+ else
197
+ exit 0
198
+ fi
175
199
  else
176
200
  # No expected login known — best verifiable signal is the author TYPE.
177
201
  # A Bot authored it → trust it (some bot posted; correct by design).