docs(plans): structured-intent extraction (preparatory)#2
Open
zcor wants to merge 2 commits into
Open
Conversation
Plan for replacing _PR_REQUEST_RE with JSON-envelope intent extraction from the existing Sonnet reply call. Couples reply text + dispatch decision in one LLM call so the bot literally cannot promise to file a PR without queueing the build. Motivated by 2026-05-12 hallucination incident: regex missed "make a pr" AND "filing a PR" the same day. Each miss = one regex expansion + one Commodore restart. Editor audience (the target as we widen the bot) uses no dev jargon at all — "robot fix this", "kill auctions from the nav". Plan is preparatory — implementation pending. See dev-journal entry in squid-bot: 2026-05-12-fleet-commodore-lev-dev-auth-rot.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…y, env drift Lessons from 2026-05-12 incident. Cross-references the structured-intent plan added in the same branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/plans/2026-05-11-commodore-structured-intent.md— the design for replacing_PR_REQUEST_REwith structured-intent extraction from the existing Sonnet reply call.Why
On 2026-05-12 the Commodore hallucinated dispatches twice in 30 minutes — once on "make a pr" (regex miss), once on "filing a PR" (gerund miss). PR #1 widened the regex; the structural problem remains. As the bot widens to editor users, the phrasings will be "robot fix this" / "kill auctions from the nav" / "the typo is killing me" — none contain "PR".
The plan couples reply text + dispatch decision in a single LLM call via a JSON envelope so the bot literally cannot promise to file a PR without queueing the build.
Status
Preparatory only — implementation is the follow-up PR. Shipping the plan now so it doesn't get lost.
Test plan
commodore.pyline numbers (regex L2005, generate_response L1821, BOT_IDENTITY L1755-1801, PR routing L3864)feat/intent-extractionbranchtests/test_intent_extraction.pycovering parser, routing, end-to-end editor-language phrasings🤖 Generated with Claude Code