Repository navigation
Closes the curator-active shared-worktree gap that let subagents cat/head/grep files already bundled inline, and fixes /df:discover so it stops relaying raw Explore file lists as if they were answers.
What's new
- Shell file reads are now blocked for subagents in
df/curator-active. Previouslycat foo.go,head -100 bar.go, andgrep -n pattern src/slipped through because role inference returns null for the shared worktree (no per-task probe suffix). Subagents receive full file content INLINE per the curator pattern — re-reading via Bash burned cache tokens for nothing. Now blocked with a message pointing at theCONTEXT_INSUFFICIENT: <path>escape hatch. /df:discovernow reads + synthesizes after Explore returns paths. Thedf-explore-protocolhook constrains Explore output tofilepath:startLine-endLinelines only, but the old/df:discoverprompt asked it to "summarize" — so the curator just relayed a raw location list to you as if it were the answer. Now: Explore locates, the curatorReads the ranges, and you get factual observations.- URL fetching in
/df:discoverskips the agent layer.Skill(browse-fetch)is called directly (withWebFetchfallback) since the explore-protocol output format doesn't fit URL content. - Heredoc forms (
cat <<EOF) still pass. The new read-verb deny has a negative lookahead — heredocs write inline files, they don't read, so they're exempt.
Fixes & internals
hooks/lib/bash-scopes.js: newREAD_STYLE_VERB_DENYadded toIMPL_DENY(affects df-implement / df-test / df-integration / df-optimize viadenyOverride).hooks/df-bash-scope.js: new Layer 1.6 fires inside.deepflow/worktrees/*when role inference fails — closes the curator-active gap without affectingdf-spike(which runs in probe sub-worktrees where role IS inferred and keeps its exploration scope).src/commands/df/discover.md:allowed-toolsgainsRead,Skill,WebFetch; the verbatim-relay rule is replaced with a 3-step locate→read→synthesize protocol.- Test suites updated to assert the new contract (in-slice
cat foo.gonow blocks instead of passes). 275/275 tests pass across bash-scope, delegation-contract, implement-protocol, and bash-rewrite suites.