Issue #5: control chat must not create plans or rules unprompted #6
Loading…
Reference in a new issue
No description provided.
Delete branch "issue/5-chat-no-autoplan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #5.
The control-chat assistant could call create_plan / create_match_rule on its own initiative (e.g. to record work it had just done), so a chat session that ended with a plan created one the operator never asked for.
Change: create_plan and create_match_rule now require an explicit operator request in the message that started the current turn (ControlDeps.lastUserMessage, set by runControlAgent). The check is a conservative English guard rail - a request verb (create/make/add/save/build/draft/...) plus the noun plan/playbook/rule - and the tool throws, persisting nothing, otherwise. The tool descriptions state the rule; the model-visible text is net shorter than develop. UC-MW-137 updated before the behaviour change.
Commits:
7c2abe9docs(uc): UC-MW-137 gate AI plan/rule creation on operator request4a47de6feat(control): create_plan/create_match_rule require an explicit operator request9152969fix(control): keep plan/rule prompt text within the tiny context windowGates (touched surface, all green):
Known red, NOT from this diff: the full 'cd middleware && bun test' suite fails ~18 unrelated tests (cross-user isolation, secrets, /metrics, UC-MW-19) with 'PGlite is closed' / ERR_HTTP_HEADERS_SENT. The untouched base (origin/develop
33143a0) fails the same set (541 pass/20 fail vs 545/18 here), so this is pre-existing environment flakiness, not a regression. Opened as draft for that reason only.Not touched: dashboard (the manual 'Save as plan' button is already an explicit operator action) and /plans/compile (operator-initiated). A human merges into develop.
Issue #5: control chat must not create plans or rules unpromptedto WIP: Issue #5: control chat must not create plans or rules unpromptedCorrection to the gate note above: the authoritative full-suite run on this branch is 561 pass / 2 fail, not ~18. The earlier larger failure count came from two bun test runs sharing the machine (PGlite contention). The two remaining failures - UC-OP-02 /metrics counters and UC-MW-19 plan survives a second buildApp - also fail on the untouched base origin/develop
33143a0(541 pass / 20 fail there), so they are pre-existing environment issues, not from this diff.WIP: Issue #5: control chat must not create plans or rules unpromptedto Issue #5: control chat must not create plans or rules unprompted