P6 retrieval-discipline reflex: /kg for discovery, never substrate grep (BRO-1426)#74
Conversation
…trate grep Track A of BRO-1426. Agents reflexively find/grep/cat over research/entities/ instead of /kg, bypassing the routing layer. Two observed failure modes: silent miss (a guessed slug that doesn't exist returns nothing, swallowed by 2>/dev/null — agent reasons over a false-complete context) and recall miss (hand-picked slugs miss the relevant entities catalog routing surfaces). Add a P6 retrieval-discipline sub-rule (read companion to the existing substrate-edit write rule) to the canonical spec (references/primitives.md §P6) and the install template (assets/templates/AGENTS.md.template §P6), so bstack bootstrap/repair propagate it to every workspace. Reasoning-enforced reflex — no hook/gate — consistent with the P6/P9 reflexive-trigger pattern. No primitive-count change (sub-rule, not a new primitive). Evidence: research/entities/pattern/substrate-grep-bypasses-routing.md + the BRO-1425 benchmark. Workspace AGENTS.md §P6 updated in lockstep. BRO-1426 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 51 minutes and 46 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…les (P20 review) Cross-review (SHIP) flagged two wording MINORs: the carve-out could be read as a blanket substrate-grep ban, and the silent-miss masking examples differed across surfaces. Name the legitimate non-discovery greps (confirmed known file, tooling/skill internals incl. /kg's own body-grep + bookkeeping lint/index, bulk edits/counting) so it can't be over-read; equalize the masking set across primitives.md + template + workspace AGENTS.md. BRO-1426 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Why
Agents reflexively
find/grep/catoverresearch/entities/instead of/kg, bypassing the routing layer. Two observed failure modes (the find-vs-/kg incident):2>/dev/null/if [ -n "$f" ]. The agent believes it loaded N entities when it loaded fewer and reasons over a false-complete context. (Real incident: agent hand-picked 4 slugs; 1 was a doc not an entity; never noticed.)/kgsurfaced 2 highly-relevant entities the agent never named;/kg --termsrecovered the union.Change
A P6 retrieval-discipline sub-rule — the read companion to the existing substrate-edit write rule — added to:
references/primitives.md§P6 (canonical spec)assets/templates/AGENTS.md.template§P6 (sobstack bootstrap/repairpropagate it on install — this is the "install bstack updates the rules" mechanism)Rule: knowledge-graph discovery →
/kg load <topic>(+--termsfor paraphrase/jargon);Readonly on a catalog-confirmed slug; neverfind -name "$slug.md"as discovery.Reasoning-enforced reflex (no hook/gate), consistent with the P6/P9 reflexive-trigger pattern. No primitive-count change (sub-rule, not a new primitive) — 20 primitives intact in both files.
Evidence
research/entities/pattern/substrate-grep-bypasses-routing.md+ the BRO-1425 benchmark. WorkspaceAGENTS.md§P6 updated in lockstep (Self-Documenting Standards: same reflex across all three surfaces).Closes BRO-1426 (bstack/governance half)
🤖 Generated with Claude Code