Skip to content

FE-1122: Walkthrough doctor-pass scoping — findings ledger, scope cards, plan frontier#286

Open
lunelson wants to merge 10 commits into
ln/fe-xxx-plan-plane-redesignfrom
ln/fe-1122-walkthrough-fixes
Open

FE-1122: Walkthrough doctor-pass scoping — findings ledger, scope cards, plan frontier#286
lunelson wants to merge 10 commits into
ln/fe-xxx-plan-plane-redesignfrom
ln/fe-1122-walkthrough-fixes

Conversation

@lunelson

@lunelson lunelson commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

FE-1122: Walkthrough doctor-pass scoping — findings ledger, scope cards, plan frontier

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

FE-1122: Guard kick provider prompts

FE-1122: Mirror origination decisions at boot

FE-1122: Collapse thinking by default

FE-1122: Show deterministic Brunch welcome

FE-1122: Show kick activity status

FE-1122 refine elicitor prompt guidance

FE-1122 avoid duplicate Other choice comments

FE-1122: Oracle design, exchange-presentation arc, findings beats 2-3

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

FE-1122: Ledger kick-activity message_start listener in registry test

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

lunelson commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@cursor

cursor Bot commented Jul 2, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes alter every provider system prompt on kick and elicitation-in-one-run paths (high behavioral impact) but are guarded by new tests and idempotent merge logic; remaining risk is payload-shape coverage across providers and the registry message_start ordering note (F12).

Overview
FE-1122 walkthrough fixes land the doctor-pass batch from TESTING_FINDINGS.md: kick and in-run request_response turns now get the composed Brunch foreground prompt via a new before_provider_request merge (idempotent with before_agent_start), with tests covering triggerTurn payloads and duplicate-append safety.

Observability and kick UX: origination decision is mirrored to .brunch/debug at boot before the kick outcome; the TUI shows a kick activity status cleared on first assistant message_start; new-spec/new-session headers add a deterministic Welcome to Brunch block; default hideThinkingBlock: true collapses thinking in the shell.

Elicitor / exchange polish: elicitor.md and present_question gain concision and multi-select guidance; read_specification_context copy drops retired “ranked elicitation gaps”; Other choices no longer duplicate typed text into comment (schema + choice-source + test).

Docs / plan: adds the walkthrough findings ledger, expands TESTING_PLAN.md (settlement watch, mode-switch/reboot scenario, tier-2 probe), opens the exchange-presentation arc (exchange-rendering, exchange-answering-chrome), records walkthrough-fixes as built pending PR, and documents exchange-render oracle design in memory/SPEC.md. F7/F8 transcript picker rendering stays deferred.

Reviewed by Cursor Bugbot for commit 6e26378. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6e26378. Configure here.

return {
...payload,
[payload.messages === messages ? 'messages' : 'input']: nextMessages,
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug mirror misses input prompts

Medium Severity

The new before_provider_request guard appends the composed Brunch prompt onto provider payloads via input/developer (and instructions/systemInstruction), but mirrorSystemPromptToDebugCache still only reads system, systemPrompt, and messages with role system. Kick and triggerTurn paths can therefore send the full elicitor prompt while .brunch/debug/system-prompt.md still shows the base text, breaking F1-style observability.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6e26378. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR captures a 2026-07-02 “doctor-pass” walkthrough as durable artifacts (testing plan + findings ledger) and folds the resulting decisions into Brunch’s prompt/runtime wiring, TUI chrome behavior, and planning/spec documentation.

Changes:

  • Add walkthrough artifacts (TESTING_PLAN.md updates + new TESTING_FINDINGS.md) and reflect new/renamed frontiers in memory/PLAN.md plus oracle design in memory/SPEC.md.
  • Fix kickoff prompt application by extending Brunch prompt composition to also guard before_provider_request payloads (for kick/triggerTurn paths that bypass before_agent_start).
  • Improve early-session UX + exchange answering correctness: hide thinking blocks by default, add kick activity status + welcome header logic, and stop duplicating “Other” answers into both label and comment (with schema/test updates).

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
TESTING_PLAN.md Adds two open design questions and a new scenario for mode-switch/reboot evidence capture.
TESTING_FINDINGS.md New walkthrough findings ledger with classification and scoped-fix pointers.
src/probes/deterministic-exchange-script.ts Updates comment to reflect scratchpad vs retired ranked-gaps framing.
src/graph/tests/elicitation-gap-guidance-closure.test.ts Extends banned identifier list to catch stale “ranked elicitation gaps” text.
src/app/pi-settings.ts Sets hideThinkingBlock: true in Brunch settings policy (and audits getter).
src/app/pi-extensions.ts Re-exports chrome status key for app-layer use.
src/app/brunch-tui.ts Writes origination decision record earlier; adds kick activity status set/clear around kick.
src/app/tests/brunch-tui.test.ts Verifies hideThinkingBlock default + mutability through SettingsManager.
src/agents/runtime/elicitor/tests/compose-live-prompt.test.ts Ensures live prompt includes new elicitor style + multi-select guidance.
src/agents/prompts/elicitor.md Adds explicit style discipline + multi-select guidance to elicitor persona.
src/.pi/extensions/exchanges/shared/choice-source.ts Stops “Other” input from being duplicated into comment.
src/.pi/extensions/exchanges/schemas/request.ts Requires comments only for none (not other) choice answers.
src/.pi/extensions/exchanges/present-question.ts Adds prompt guideline to prefer multiple: true when options aren’t mutually exclusive.
src/.pi/extensions/chrome/index.ts Adds kick status key, threads startup decision into header, and clears kick status on first assistant message.
src/.pi/extensions/brunch-data/context/index.ts Updates read_specification_context description/snippet/guidelines away from ranked gaps to scratchpad.
src/.pi/extensions/agent-runtime/system-prompts/index.ts Adds before_provider_request prompt-append guard and makes prompt append idempotent.
src/.pi/extensions/tests/registry.test.ts Updates expected registered Pi event set to include message_start.
src/.pi/extensions/tests/exchanges-schemas.test.ts Updates schema test expectations for “other” answers without required comment.
src/.pi/extensions/tests/exchanges-present-request.test.ts Adds test asserting “Other” label isn’t duplicated as comment and rendered output omits Comment section.
src/.pi/extensions/tests/exchanges-extension.test.ts Verifies new present_question guidance string is included.
src/.pi/extensions/tests/dev-mode-introspection.test.ts Asserts origination mirror writes decision-time record before outcome.
src/.pi/extensions/tests/chrome.test.ts Verifies welcome copy gating, kick-status clearing on assistant message_start, and command hints.
src/.pi/extensions/tests/agent-runtime-system-prompts.test.ts Adds tests for triggerTurn prompt repair and idempotence of provider-request guard.
src/.pi/components/chrome-header.ts Adds conditional welcome intro lines for new-spec/new-session headers; refines fallback copy.
memory/SPEC.md Adds exchange-presentation oracle design notes and blind-spot entries.
memory/PLAN.md Adds exchange-presentation arc, renames/reshapes related frontiers, and records FE-1122 batch status.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +141 to +146
const replacements = [
appendToStringProperty(payload, 'instructions', prompt),
appendToStringProperty(payload, 'systemInstruction', prompt),
appendToStringOrBlocksProperty(payload, 'system', prompt),
appendToMessageArray(payload, prompt),
];
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.

2 participants