Skip to content

Commit 28502c6

Browse files
committed
chore(ui/.claude): delete the nested guard hooks that no session loads
After the monorepo merge `ui/` is no session's project root, so Claude Code reads the root `.claude/settings.json` and never the nested one. The four ui guard hooks (guard-main-checkout, guard-main-checkout-bash, guard-shared-stash, guard-tree-enum, each with its self-test) never fire, yet they read as live guardrails. The root `.claude/hooks/` carries the same four guards with identical verdict logic and wires them in the root settings. Delete the eight files and the `hooks` block of `ui/.claude/settings.json` that wired them; the file keeps its permissions block and stays valid JSON. Move the `ui-claude-tree` specimen in check-governed-merges' self-test to `ui/.claude/skills/verify/SKILL.md`, a surviving file under the row, so the row's Tier H assertions keep their teeth. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cxp4Fjwh9pEpn19fBR
1 parent 8c7021d commit 28502c6

10 files changed

Lines changed: 1 addition & 2846 deletions

‎scripts/pm/check-governed-merges.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4516,7 +4516,7 @@ async function selfTest() {
45164516
battery('the nested `ui/` workspace rows, on the register (#25712)');
45174517
const UI_ROWS = GOVERNED_SURFACES.filter((s) => s.id.startsWith('ui-'));
45184518
const ROOT_ROWS = Object.freeze(GOVERNED_SURFACES.filter((s) => !s.id.startsWith('ui-')));
4519-
const UI_SPECIMENS = { 'ui-adr': 'ui/docs/adr/0001-master-detail-subform.md', 'ui-claude-tree': 'ui/.claude/hooks/guard-main-checkout.sh', 'ui-skills-catalog': 'ui/skills/objectui/SKILL.md', 'ui-agents-md': 'ui/AGENTS.md', 'ui-claude-md': 'ui/CLAUDE.md', 'ui-workflows': 'ui/.github/workflows/ci.yml' };
4519+
const UI_SPECIMENS = { 'ui-adr': 'ui/docs/adr/0001-master-detail-subform.md', 'ui-claude-tree': 'ui/.claude/skills/verify/SKILL.md', 'ui-skills-catalog': 'ui/skills/objectui/SKILL.md', 'ui-agents-md': 'ui/AGENTS.md', 'ui-claude-md': 'ui/CLAUDE.md', 'ui-workflows': 'ui/.github/workflows/ci.yml' };
45204520
assert('the-ui-rows-are-six-well-formed-register-rows', UI_ROWS.length === 6 && UI_ROWS.every((r) => (r.prefix ? r.prefix.endsWith('/') && r.glob === `${r.prefix}**` && r.exact === undefined : r.glob === r.exact) && r.tier === GOVERNED_TIER_H && r.tierRepos === undefined && surfaceRepos(r).join() === 'objectstack') && new Set(GOVERNED_SURFACES.map((r) => r.id)).size === GOVERNED_SURFACES.length, JSON.stringify(UI_ROWS.map((r) => r.id)));
45214521
assert('the-ui-rows-mirror-the-six-rows-objectui-governs-each-under-ui', UI_ROWS.map((r) => r.glob).join() === ROOT_ROWS.filter((s) => s.id !== 'north-star').map((s) => `ui/${s.glob}`).join(), UI_ROWS.map((r) => r.glob).join());
45224522
for (const row of UI_ROWS) {

‎ui/.claude/hooks/guard-main-checkout-bash.selftest.sh‎

Lines changed: 0 additions & 443 deletions
This file was deleted.

‎ui/.claude/hooks/guard-main-checkout-bash.sh‎

Lines changed: 0 additions & 665 deletions
This file was deleted.

‎ui/.claude/hooks/guard-main-checkout.selftest.sh‎

Lines changed: 0 additions & 473 deletions
This file was deleted.

‎ui/.claude/hooks/guard-main-checkout.sh‎

Lines changed: 0 additions & 141 deletions
This file was deleted.

0 commit comments

Comments
 (0)