Skip to content

docs(plans): structured-intent extraction (preparatory)#2

Open
zcor wants to merge 2 commits into
mainfrom
docs/plan-structured-intent
Open

docs(plans): structured-intent extraction (preparatory)#2
zcor wants to merge 2 commits into
mainfrom
docs/plan-structured-intent

Conversation

@zcor

@zcor zcor commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds docs/plans/2026-05-11-commodore-structured-intent.md — the design for replacing _PR_REQUEST_RE with 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

  • Plan reviewed against commodore.py line numbers (regex L2005, generate_response L1821, BOT_IDENTITY L1755-1801, PR routing L3864)
  • Implementation PR opens against fleet-commodore main with feat/intent-extraction branch
  • Implementation includes tests/test_intent_extraction.py covering parser, routing, end-to-end editor-language phrasings

🤖 Generated with Claude Code

zcor and others added 2 commits May 14, 2026 02:54
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant