fix(intent): avoid blocking agents when no skill matches #214
MergedLadyBluenotes(GitHub profile, opens in a new tab)merged 2 commits into
main fromrefs/pull/214/headmerged by LadyBluenotes(GitHub profile, opens in a new tab) - @@ -89,7 +89,7 @@8989 expect(EDIT_TOOLS_BY_AGENT.codex.has('apply_patch')).toBe(true)9090 })919192- it('detects a prior load from observation records', () => {93- expect(hasLoadFromObservations([{ action: 'list' }])).toBe(false)92+ it('detects a prior guidance check from observation records', () => {93+ expect(hasIntentCheckFromObservations([{ action: 'list' }])).toBe(true)9494 expect(95- hasLoadFromObservations([{ action: 'list' }, { action: 'load' }]),95+ hasIntentCheckFromObservations([{ action: 'list' }, { action: 'load' }]),
Sign in to join this conversation.
📝 Walkthrough
Walkthrough#
The edit-tool gate now accepts either a recognized
intent listcommand or anintent load <skill-id>command. Session-start handling records catalog observations, and tests and documentation cover the updated behavior.Changes#
Intent check gating
packages/intent/src/hooks/policy.ts,packages/intent/tests/hooks.test.tslistandloadactions. The denial message and tests use the updated guidance-check terminology.packages/intent/src/hooks/install.ts,packages/intent/tests/hooks-install.test.ts,docs/cli/intent-hooks.md,.changeset/giant-geckos-beam.mdEstimated code review effort: 2 (Simple) | ~10 minutes
Merge Risk: 🔵 Low · up to
223bcThe hook flow now lets agents continue when no matching skill applies while retaining explicit skill loading. The remaining bounded risk is that the load-only path lacks an independent regression assertion, so a future change could break that behavior without detection; the PR is otherwise mergeable with this follow-up.
Sequence Diagram(s)#
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
Full details: Description check
Explanation
The description includes all required sections, explains the change and motivation, records focused test and typecheck results, identifies that the full test command was not run, and documents the release impact with a changeset.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 4 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
🧪 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.
❤️ Share