Merge chore/bdr-context-mod into develop

This commit is contained in:
bchanot committed 2026-10-24 03:40:31 +02:00
commit dd663792db
7 files changed
+143 -2

No files matched your search

+13 -2
View File
@@ -52,7 +52,7 @@ rules:
| BDR-028 | 2026-06-27 | Hand-curated config install-immutable (auto-revert guard) + de-vendor installer-managed skills | accepted |
| BDR-029 | 2026-06-27 | Installer auto-fixes gstack browser on an OS newer than its pinned Playwright supports | accepted |
| BDR-030 | 2026-06-27 | gstack skills activated ON-DEMAND per profile, not pre-installed; OFF by default stays | accepted |
| BDR-031 | 2026-06-27 | global CLAUDE.md lightening = COMPRESSION, not path-scope / externalization | accepted · 275-line target superseded by BDR-062 |
| BDR-031 | 2026-06-27 | global CLAUDE.md lightening = COMPRESSION, not path-scope / externalization | superseded by BDR-125 · 275-line target superseded by BDR-062 |
| BDR-032 | 2026-06-27 | skill `/validate` → `/web-validate` (rename user surface, keep internals) | accepted |
| BDR-033 | 2026-06-27 | design-gate §4: anim-lib suggestion — suggest-only, non-blocking, stateless 1-line | accepted |
| BDR-034 | 2026-06-26 | Coupled-capitalize invariant v1 — memory commit auto per dev flow (Frame 2) | accepted |
@@ -142,6 +142,7 @@ rules:
| BDR-122 | 2026-10-19 | Guardrails split: /a11y standalone on shared scan engine, injection + exposure domains, exposure proven live by read-only probe | accepted |
| BDR-123 | 2026-10-21 | Routing policy: opus session model, Fable via best-tier rows for orchestrator reflection + merge gates, sonnet writes, doctrine ceiling on Fable main; supersedes parts of BDR-066 / BDR-115 | accepted |
| BDR-124 | 2026-10-23 | Foreign code keeps its own style (lib/code-origin.sh, `git config claude.origin`), limits strict in our code only | accepted |
| BDR-125 | 2026-10-23 | Context mod: subtract-only JIT injection + deterministic guards; supersedes BDR-031 (conditional load proven reliable) | accepted · phases 0-4 planned |
---
@@ -604,7 +605,7 @@ rules:
## BDR-031 — global CLAUDE.md lightening = COMPRESSION, not path-scope / externalization
- **Date**: 2026-06-25
- **Status**: accepted
- **Status**: accepted; SUPERSEDED 2026-10-23 by [[BDR-125]] (conditional load now proven reliable + mod injection)
- **Decision**: lighten the universal global CLAUDE.md (`~/.claude/CLAUDE.md`, loaded every session in every project) by COMPRESSION only — denser prose, drop name-obvious routing lines, trim decorative whitespace. NOT by path-scoping rules under `~/.claude/rules/`, NOT by externalizing sections to on-demand files. Result: 317 → 275 lines.
- **Why**: user-level path-scoped rules (`paths:` frontmatter under `~/.claude/rules/`) do NOT load in CC 2.1.190 (#21858, [[BLK-009]]) — proven by probe. Conditional/scoped loading is therefore an unreliable lever for this user; compression is the only mechanism that actually cuts every-session token cost without depending on the broken feature.
- **Caveats**: future GLOBAL memory must stay tiny — with conditional loading broken, anything global loads in EVERY project unconditionally; fold that constraint into the global-memory design once a backup exists. Caveman pass to ~250 was explicitly DECLINED: marginal ~25-line gain vs real risk (changes the nature of instructions-to-follow; no evidence caveman is followed better than prose; CLAUDE.md is the most-edited file → caveman = painful to re-read/amend). 275 readable > 250 caveman.
@@ -1487,3 +1488,13 @@ Branch feature/user-writing-web-rules, UNMERGED (human gate).
- **Alternatives rejected**: marker file committed in foreign repo (pollutes third-party tree); limits everywhere (breaks foreign style); per-file heuristics (unverifiable).
- **Known gaps**: "Session start" rule still creates `.claude/memory/` in foreign repos (out of scope). CLAUDE.global.md now 328L > 320 warn.
- **Refs**: chore/foreign-code-style 70e0f9a 71d28f8 052a704 5c6e368, merge 1a14265. Links [[LRN-227]].
## BDR-125 — Context mod: subtract-only JIT injection + deterministic guards; supersedes BDR-031 [accepted] (2026-10-23)
- **Decision**: user ask "move always-on doctrine into a mod, make it hard". Always-on context = 30.2k tok (`/context`, opus, repo root): memory files 11.6k, skill listing 10k, agents 2.6k, system 2.5k, MCP instr 2.2k, tools 1.1k. Mod = (a) SUBTRACT a marked CLAUDE.md/rules section only when it can re-deliver it JIT on a deterministic trigger, (b) turn mechanically checkable rules into tool.call guards (deny + reason). Source text stays in CLAUDE.md/rules with markers: mod off or hook throws → hook skipped → full content loads as today (fail-safe). Per-turn rules (writing-style, communication, workflow core) stay always-on.
- **Why**: BDR-031 premise dead. Proven 2026-10-23 by throwaway probe mod + fresh `claude -p --plugin-dir` canaries (unique tokens + negative controls): `prompt.context` drops an instruction file (default-language ABSENT, writing-style PRESENT) and adds blocks; `prompt.compose` adds system section; `prompt.section` drops one (auto-memory ABSENT); `prompt.submit` `context` + `tool.call` result `context` inject; `prompt.attachment` rewrite of `skill_listing` drops a skill (scrape ABSENT, seo PRESENT); user `paths:` rules load on Read (web-security, rest-api). Facts: `agent.offer` false → agent undispatchable ("Agent type not found"); `command.describe` isHidden = typeahead only.
- **Phases** (each a future /ship-feature): 0 no mod: project CLAUDE.md sections → project `paths:` rules, higgsfield MCP declared in ~/.claude.json while toggle disabled. 1 context mod: marked-section subtraction + JIT (design, graphify, web/SPA + API + language, secure-by-default domains by fingerprint, gitflow detail, registry format, foreign/our code variant), project fingerprint, drop unused auto-memory section. 2 guards: registry writes (next ID, index row, append-only, English), merge gate (`gitflow finish` needs explicit signal in last user msg), commit msg ≤50 words, 80-col/function-length feedback on our code. 3 listings: skill listing filtered by fingerprint + descriptions restored, classifier one-line skill hint replaces routing table, agent descriptions trimmed (names kept; dispatch to verify). 4 active memory: session digest (open BLK, actionable TODO, last journal) re-injected after compaction + per-prompt local heading score (top 3-5 above threshold).
- **Est. gain**: ~13-15k of 30.2k tok (measured chars × measured chars/token ratios; estimate). Main value = relevance + hard guarantees, not tokens.
- **Constraints kept**: no forced continuation (BDR-083, BDR-087), no per-turn capitalize nag (BDR-037), hints never over-fire (LRN-091), skill hint advisory never forced invocation. Prompt cache: context/sections computed once per conversation; per-prompt context appended (no bust).
- **Alternatives rejected**: hide executor agents via `agent.offer` (breaks dispatch, proven); move writing-style/communication out (apply every turn, same cost); rewrite shown answer (`turn.complete` only appends below); Stop-hook enforcement (BDR-083).
- **Refs**: probe `scratchpad/ctxprobe` (session-local, not committed), plugin-authoring types 2.1.306 (`prompt.context`, `prompt.compose`, `prompt.section`, `prompt.attachment`, `prompt.submit`, `tool.call`). Supersedes [[BDR-031]]; links [[BLK-009]], [[LRN-175]], [[LRN-054]], [[LRN-091]], [[BDR-115]].
+1
View File
@@ -644,3 +644,4 @@ rules:
- /feat C (feature/router-keyword-cap): r1 cap in wantedModel killed by 3 BLOCKERs → r2 effort-only routes at writers + derived orchestrate (user pick), confirmation SOLID. 786ee13, verifier CONFORME 1st pass (1st died 429 Fable), auditor PASS, docs d2d590f. BLK-032 resolved, LRN-226, EVAL-048. Merge on user go.
- /reconcile TODO (chore/todo-reconcile): 2190 → ~200 lines. Done history pre-10-08 dropped (git archive), 46 open → 35 grouped (actionable, release 3.0.0, docs, user, blocked, live checks, optional, parked, known limits). Done: P16, P43, Linux run, Makefile help; obsolete: effort-pins items, fable live check; 5 hidden prose follow-ups lifted. BLK-018 status line: decide at 3.0.0. Engine gap: `reconcile_blk_open` ignores header `[resolved]` tag (BLK-032..034 false open).
- Rules check (user: facts not guesses): fresh `claude -p` in empty dir quoted always-on rules + global CLAUDE.md verbatim, negative control ABSENT; path-scoped web-security/rest-api ABSENT before, present after Read of src/api/user.ts. /hotfix settings deny: `* :*` and `* -v /:*` mixed forms never match (proven RAN), `Write(...)` deny never blocks Write tool, `Edit(...)` does; added `-v /:/*` + ` :**` (proven DENIED), additive per T41/T42 lock. Gate 429 on Fable twice (LRN-224). make test green, auditor PASS.
- Context-mod research (user: move doctrine into mods): probe mod proved prompt.context/compose/section/submit/attachment + tool.call context levers; /context 30.2k always-on. BDR-125 supersedes BDR-031, phases 0-4 planned as future /ship-feature.
+58
View File
@@ -3,6 +3,64 @@
## Open (reconciled 2026-10-23, /reconcile)
Done history before 2026-10-08 removed 2026-10-23 (git keeps it: `git log -p -- .claude/tasks/TODO.md`); decisions live in `.claude/memory/`.
### Context mod queue (BDR-125): one /ship-feature per phase, in order 0 → 5
Shared rules for every phase:
- Baseline first: `claude -p "/context"` at repo root (2026-10-23: 30.2k always-on = memory files 11.6k, skills 10k, agents 2.6k, system 2.5k, MCP instr 2.2k, tools 1.1k). Same measure after; the delta is a phase criterion.
- Proof bench: `.claude/tasks/plans/2026-10-24-context-mod-probe/` (canary per lever + negative control, fresh `claude -p --plugin-dir`). Every lever a phase uses is re-proved there before code, every "to verify" below becomes a canary criterion.
- Subtract-only: source text stays in CLAUDE.global.md / rules / CLAUDE.md, marked `<!-- jit:<id> -->` … `<!-- /jit -->`; the mod drops a marked section only where it re-delivers it on a trigger. Mod off (`~/.claude/context-mod.json` `"enabled": false`) or hook throws → full text loads as today. Guards use `.catch` deny (fail closed); injections fail open.
- Inject once per context: mod ledger in `$.state` of what it injected; reset on `session.compact` and `session.end` reason `clear`; re-inject at the next trigger. Canary test after a real compaction is a criterion (documented, not yet proved).
- Never: forced continuation / Stop block (BDR-083, BDR-087), per-turn nag (BDR-037), forced skill invocation, hiding a dispatchable agent via `agent.offer` (breaks dispatch, proved).
- Cleanup is part of each phase: delete what the phase makes obsolete (scripts, hooks, tests, doctrine lines, Makefile targets, doctor checks), grep every citer and patch in the same branch (doctrine-citers census in `make test`).
- [ ] **Phase 0, no mod: split project CLAUDE.md + fix higgsfield MCP**
- Move the 4 project CLAUDE.md sections (graphify vendored skill 1.4k chars, mods/ 1.3k, rules/ maintenance 1.3k, transient planning artifacts 0.9k) to `.claude/rules/<name>.md` with `paths:` (`skills/graphify/**`; `mods/**`, `skills/model-router`; `rules/**`; `docs/superpowers/**`). Project scope only: no ~/.claude link points at `.claude/` (checked 2026-10-24); never into `rules/` (= ~/.claude/rules, every project).
- `.gitignore:122` ignores `.claude/*`: add `!.claude/rules/`.
- Higgsfield: MCP declared user-scope in ~/.claude.json (`higgsfield` http) and connected while `toggle-external.sh` says disabled; make `toggle-external.sh enable|disable higgsfield` own `claude mcp add|remove -s user higgsfield` (the user runs the first removal), + doctor check "toggle state = MCP state".
- Proof: canary per moved rule (ABSENT at start, PRESENT after Read of a matching file); `/context` delta (~1.9k memory files + higgsfield MCP share).
- Cleanup: CLAUDE.md keeps a 2-line pointer ("rules under .claude/rules load on path"); fix citers of the moved headings.
- [ ] **Phase 1, mod `context`: marked-section subtraction + JIT injection + project fingerprint**
- New mod `mods/context/` (+ `skills/context` link, census row in mods.test.sh), config `~/.claude/context-mod.json`.
- Fingerprint at `session.start` (fs only, cached in `$.state`): stack (package.json deps astro/next/react/vue/svelte, Cargo.toml, go.mod, pyproject), web public vs app, `supabase/`, messaging deps (twilio, sendgrid, resend, mailgun), `functions/` or serverless config, `graphify-out/graph.json`, tracked code file count, code origin via `lib/code-origin.sh` (ours / foreign), gitflow repo, `.claude/memory/` present, empty dir.
- Marked sections and triggers: Design work (UI file Read/Edit or UI prompt, same detector as `hooks/design-toolchain-reminder.sh`); graphify (graph.json exists → stays in context block); Public websites never SPA + Web APIs versioned + rules/default-language.md (empty dir, or skill.prompt of init-project / ship-feature / brainstorming / refactor); secure-by-default sections 4 Supabase / 5 SMS-email / 6 cloud functions (fingerprint); gitflow detail (keep 3 core lines; full text on first Bash git/gitflow call); Memory registries format (keep 2 lines; full text on Read/Edit/Write under `.claude/memory/`); "Our code" vs "Foreign code" variant (origin → inject only the applicable one, at first code Read).
- Delivery: always-on part via `prompt.context` (drop/rewrite `claudeMd` instructionFiles); JIT via `tool.call` result `context` (Read comes before Edit, so guidance lands before the write) and `prompt.submit` `context`; skill-triggered via `skill.prompt` append.
- Drop the unused auto-memory system section (`prompt.section` name `memory`, dir `~/.claude/projects/*/memory/` empty 2026-10-23) behind a config flag.
- Proof: canary per section (ABSENT without trigger, PRESENT after it, once only, again after /clear and after a compaction); mod-off run loads everything; `claude plugin test` unit suite; `/context` delta (~4.4k est.).
- Cleanup: `hooks/design-toolchain-reminder.sh` + its settings.json registration + `lib/tests/design-toolchain-reminder.test.sh` (the mod injects the section itself); the hook's "(already in context)" text; CLAUDE.global.md lines that only pointed at the moved text; BDR-031 citers.
- [ ] **Phase 2, guards in the context mod (deny with reason, deterministic)**
- Registries: Edit/Write on `.claude/memory/{decisions,learnings,blockers,evals}.md` refused when the new heading is not `## <PFX>-<max+1> — `, the Index row is missing or mismatched, an existing entry line is removed or rewritten (append-only; status tag edits allowed by explicit rule), or the added text reads French (accent-ratio heuristic, threshold tested on the real registries: zero false positive required).
- Merge gate: Bash running `gitflow.sh finish` refused unless the last user message (recorded at `prompt.submit` origin composer) carries an explicit signal (merge it / merge le / merger / fusionne / feature OK / ship it, FR+EN list, tested on this session's real phrasings) or an AskUserQuestion answer approving the merge in the same turn.
- Commit message: `git commit -m/-F` over 50 words refused unless a project convention file exists (lib/commit-message.md lookup order).
- Code limits on OUR code only (origin from phase 1): after Edit/Write, report lines > 80 cols and functions > 25 logic lines as result `context`, never deny (language support: sh, ts/js, py, rs first; others skipped).
- Destructive guard: re-attempt G2 (BLK-022) as a `tool.call` guard in TS against `lib/tests/guard-bash.test.sh` 214 cases; if the safety classifier withholds it again, record and stop.
- Proof: one fixture per refusal + one benign twin per rule (no false positive), `.catch` fail-closed test, live canary run.
- Cleanup: doctrine prose that only restated an enforced rule shrinks to one line + pointer (gitflow "finish only on explicit human signal", commit-message limit, registry format); `lib/commit-message.md` keeps the convention lookup only if still cited.
- [ ] **Phase 3, listings: skills filtered + routing hint + agent descriptions**
- Skill listing: `prompt.attachment` type `skill_listing` (30,031 chars measured) rewritten from the fingerprint: categories per skill live in routing.json (new `contexts` field beside the phase row); a skill with no category stays SHOWN (new skills always appear); census test in make test fails on an uncategorised skill; kept skills get their full description back from SKILL.md frontmatter (LRN-175 truncation). Handle the listing delta sent mid-session.
- To verify first (canary): a skill hidden from the listing still runs when typed (`/name`) and through the Skill tool.
- Routing hint: classifier (reuse model-router's small-model call) maps a typed prompt to one skill; inject one line via `prompt.submit` `context` only above a confidence threshold, never on slash prompts, mid-turn or inside a run; names hidden skills too. Replaces the CLAUDE.global.md "Skill routing" table (2.1k chars).
- Agent listing: `agent_listing_delta` (9,098 chars) rewritten with short descriptions for skill-dispatched executors, names kept. To verify first: dispatch of a trimmed agent still works (agent.offer untouched).
- MCP: drop instructions + deferred tool names of servers the fingerprint/toggles mark irrelevant (higgsfield off, claude.ai connectors in a coding repo) via `mcp_instructions_delta` / `deferred_tools_delta`; ToolSearch still finds them.
- Proof: canaries (hidden skill ABSENT, control PRESENT, typed hidden skill runs, trimmed agent dispatches), hint precision measured on a fixed prompt set (no hint on chat/bookkeeping), `/context` delta (~5-7.5k est.).
- Cleanup: CLAUDE.global.md Skill routing section → 2 lines; LRN-043 routing-line rule superseded; doctor skill-listing budget check updated.
- [ ] **Phase 4, active memory**
- Session digest via `prompt.context` block (re-read on compaction/clear by the engine): open BLK (body status, last block wins, as lib/reconcile.sh reads it), actionable TODO items (Open § Actionable), last journal heading + line; only when `.claude/memory/` exists.
- Per-prompt retrieval: local score of registry headings (`## BDR|LRN|BLK|EVAL-` lines) against the typed prompt, top 3-5 `ID — title` lines as `prompt.submit` `context` above a threshold; no model call. Optional `memory_search` tool (`$.tool.register`, `isDeferred: false`) for skills (analyze-before-plan pass 1 calls it instead of grep).
- Capitalization proposals on observed milestones only: a `feat`/`fix` commit or a `gitflow finish` seen in `tool.call` → one context note at the next prompt (never per turn, never at Stop).
- Proof: digest canary after start, after compaction, after /clear; retrieval precision on 10 real prompts from journal history; zero note on turns without milestone.
- Cleanup: CLAUDE.global.md "Session start" step 1 (read registries) → mod; "Proactive capitalization" paragraph shrinks; analyze-before-plan pass 1 points at the tool; fix the reconcile engine gap seen 2026-10-23 (`reconcile_blk_open` ignores header `[resolved]`) since the digest reuses it.
- [ ] **Phase 5, per-project profiles, native and concurrent (user ask 2026-10-24)**
- Today `lib/profile.sh` is global (symlinks skills/ ↔ skills-disabled/, `claude plugin enable|disable` user scope): every open session shares one profile. Target: each session gets its own profile, so web in one project, full in another, backend in a third, at the same time.
- Virtual profile in the context mod: all skills stay installed; the session's profile filters the skill listing, agent descriptions and MCP names (phase 3 mechanism). Profile pick: pinned per project (mod slash command `/profile set <name>`, stored in `$.store` keyed by origin remote `host/path`), else auto from the fingerprint (astro/next site → web, Cargo.toml/go.mod without frontend → backend, else full).
- Per-skill activation: when a skill loads (`skill.prompt`), the skills/agents it needs (declared in routing.json, e.g. ship-feature → impeccable stack on a UI project) are advertised in its prompt even if the profile hides them.
- Plugins (hooks/MCP of real plugins): to verify whether project-scope `enabledPlugins` in `.claude/settings.local.json` is honoured; if yes, the mod writes nothing itself (never writes settings: BDR-116 spirit) and `/profile set` prints the line for the user; mid-session plugin toggling is not native, say so.
- Proof: two concurrent sessions in two repos with different profiles, canaries prove different listings; typed `/profile set` persists across restarts; per-skill advert canary.
- Cleanup: `lib/profile.sh set|apply|reset` symlink toggling + `skills-disabled/` (24 entries), Makefile `profile*` targets, `/profile` skill, plugin-gate prose tied to global toggling (`lib/plugin-gate.md`, plugin-probe/plugin-advisor briefs), banner hint "/plugin-check before starting a new project", doctor profile checks, profile tests; keep `lib/profiles/*.profile` as the profile definitions the mod reads.
### Actionable
- [ ] deferred (BDR-123): remap inline-writing best-tier skills (design Build stack, writing-skills, deprecation-and-migration, /tour single-project, /audit-delta 3d, /harden STEP 3); stale citers skills/feat/SKILL.md:6, skills/code-clean/SKILL.md:36; + impeccable row in routing.json (design Build stack has none; frontend-design has `reflect`; census test pins the table)
- [ ] parked (GATE 2 LOW, 5a98c2c): probe table names not checked with `IDENT.fullmatch` per table (a `/` walks a path on the approved Supabase host); `printable` lets Unicode bidi/format controls (U+202E, U+2066…) through to the tty
@@ -0,0 +1 @@
{ "name": "ctxprobe", "version": "0.1.0", "description": "Measures and probes context injection points (throwaway)" }
@@ -0,0 +1,18 @@
# context-mod probe (BDR-125 evidence + test bench)
Throwaway mod used 2026-10-23 to prove every lever of the context mod.
Each hook plants a unique canary; a fresh headless session reports
PRESENT/ABSENT per canary, with negative controls.
Run (from the repo root, real context):
printf '%s\n' "<canary questions>" \
| claude -p --model haiku --plugin-dir .claude/tasks/plans/2026-10-24-context-mod-probe
Results 2026-10-23: prompt.context drop file (default-language ABSENT,
writing-style PRESENT) + add block; prompt.compose add section;
prompt.section drop `memory`; prompt.submit `context`; tool.call result
`context` (Read); prompt.attachment `skill_listing` rewrite (scrape
ABSENT, seo PRESENT); agent.offer false = agent undispatchable;
command.describe isHidden = typeahead only. The measurement log lists
every block, instruction file, system section and attachment with sizes.
@@ -0,0 +1 @@
{ "modules": ["./register.ts"] }
@@ -0,0 +1,51 @@
import type { EngineInterface, Register } from 'claude-code'
const OUT = '/tmp/ctxprobe-out.json' // change per run
const log: Record<string, unknown>[] = []
async function save($: EngineInterface, row: Record<string, unknown>): Promise<void> {
log.push(row)
await $.fs.write(OUT, JSON.stringify(log, null, 1))
}
export const register: Register = (on) => {
on('prompt.context', async ($, e, next) => {
const files = e.instructionFiles ?? []
await save($, { ev: 'context.in', blocks: e.blocks.map(b => ({ name: b.name, len: b.text.length })),
files: files.map(f => ({ path: f.path, kind: f.kind, len: f.content.length })) })
const kept = files.filter(f => !f.path.endsWith('rules/default-language.md'))
const res = await next({ ...e, instructionFiles: kept })
const blocks = [...res.blocks, { name: 'probe', text: 'PROBE-CTX-CANARY: zebra-417' }]
await save($, { ev: 'context.out', dropped: files.length - kept.length,
blocks: blocks.map(b => ({ name: b.name, len: b.text.length })) })
return { ...res, blocks }
})
on('prompt.compose', async ($, e, next) => {
const res = await next(e)
await save($, { ev: 'compose', traits: e.traits,
sections: res.sections.map(s => ({ id: s.id, scope: s.scope, len: s.text.length })) })
return { sections: [...res.sections, { id: 'ctxprobe:canary', text: 'PROBE-SYS-CANARY: lynx-902', scope: 'session' as const }] }
})
on('prompt.attachment', async ($, e, next) => {
await save($, { ev: 'attachment', type: e.type, origin: e.origin.kind, len: e.text.length, head: e.text.slice(0, 90) })
if (e.type !== 'skill_listing') return next(e)
const text = e.text.split('\n').filter(l => !l.startsWith('- scrape')).join('\n')
await save($, { ev: 'skill_listing.rewritten', before: e.text.length, after: text.length })
return next({ ...e, text })
})
on('prompt.submit', async ($, e, next) =>
next({ ...e, context: [...(e.context ?? []), 'PROBE-SUBMIT-CANARY: otter-233'] }))
on('tool.call', { tool: 'Read' }, async ($, e, next) => {
const res = await next(e)
if ('deny' in res && res.deny) return res
return { ...res, context: [...(res.context ?? []), 'PROBE-TOOL-CANARY: heron-781'] }
})
on('command.describe', { command: 'scrape' }, async ($, e, next) => ({ ...(await next(e)), isHidden: true }))
on('agent.offer', { agent: 'interviewer' }, async () => ({ isOffered: false }))
on('prompt.section', { name: 'memory' }, async () => ({ text: null }))
}