Skip to content

FE-1122: Walkthrough doctor-pass fixes: kick prompt, origination record, kick chrome, elicitor prompt refinements#286

Merged
lunelson merged 10 commits into
nextfrom
ln/fe-1122-walkthrough-fixes
Jul 3, 2026
Merged

FE-1122: Walkthrough doctor-pass fixes: kick prompt, origination record, kick chrome, elicitor prompt refinements#286
lunelson merged 10 commits into
nextfrom
ln/fe-1122-walkthrough-fixes

Conversation

@lunelson

@lunelson lunelson commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Stack Context

This branch closes the first doctor-pass walkthrough defect batch before the exchange-rendering and batch-2 walkthrough branches continue the same evidence loop.

What changed

  • Scoped and ledgered the first walkthrough findings.
  • Ensured kick turns receive the composed foreground prompt and mirror origination decisions at boot.
  • Improved entry chrome: deterministic welcome, collapsed thinking, and kick activity status.
  • Refined elicitor prompt guidance and duplicate Other-choice handling.
  • Added oracle/design notes for the exchange-presentation follow-on work.

Why

The walkthrough exposed settled-seam defects that made new sessions misleading or noisy before users reached the deeper exchange-rendering problems. This branch fixes those first-contact defects and records the remaining findings in the right follow-on frontiers.

@cursor

cursor Bot commented Jul 2, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes the provider system prompt on kick and every provider request (agent-behavior critical) but behind new unit tests and walkthrough-scoped seams; TUI/settings defaults are user-visible but low blast radius outside session start.

Overview
Walkthrough doctor-pass (FE-1122) addresses first-contact defects from the 2026-07-02 audit so new Specify sessions see the right model context and clearer TUI chrome before deeper exchange-rendering work.

Prompt / kick path: registerBrunchPrompting now also merges the composed foreground prompt in before_provider_request, idempotently, so Pi’s triggerTurn kick path (and in-run request_response cycles that never re-fire before_agent_start) still send # Elicitor, skills manifest, and tool policy to the provider. Tests cover repair without mutating tools and no double-append after a normal turn start.

Observability: Boot writes an origination decision to .brunch/debug/origination.md at decision time; completion outcome still appends later when the kick finishes.

TUI chrome: Deterministic “Welcome to Brunch” copy on new spec/session startup (suppressed on resume); hideThinkingBlock: true by default; kick shows opening assistant turn… status until the first assistant message_start clears it.

Elicitor / exchanges: elicitor.md and present_question guidelines add concision and multi-select nudges; read_specification_context copy drops retired “ranked elicitation gaps” for scratchpad wording. Other choices store label only (no duplicated comment); schema allows other without mandatory comment.

Planning only (no product render sweep): TESTING_FINDINGS.md, expanded TESTING_PLAN.md, memory/PLAN.md / memory/SPEC.md ledger the remaining F7/F8/F11 findings and define the exchange-presentation arc (exchange-rendering, exchange-answering-chrome) and verification oracles.

Reviewed by Cursor Bugbot for commit 14a7b85. 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.

Comment thread src/.pi/extensions/agent-runtime/system-prompts/index.ts

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),
];
@lunelson lunelson changed the title FE-1122: Walkthrough doctor-pass scoping — findings ledger, scope cards, plan frontier FE-1122: Walkthrough doctor-pass fixes: kick prompt, origination record, kick chrome, elicitor prompt refinements Jul 3, 2026
@graphite-app graphite-app Bot changed the base branch from ln/fe-xxx-plan-plane-redesign to graphite-base/286 July 3, 2026 12:22
@lunelson lunelson force-pushed the graphite-base/286 branch from 74aacb3 to 98fa6c6 Compare July 3, 2026 12:46
@lunelson lunelson force-pushed the ln/fe-1122-walkthrough-fixes branch from 6e26378 to 14a7b85 Compare July 3, 2026 12:46
@graphite-app graphite-app Bot changed the base branch from graphite-base/286 to next July 3, 2026 12:46
@graphite-app

graphite-app Bot commented Jul 3, 2026

Copy link
Copy Markdown

Merge activity

  • Jul 3, 12:46 PM UTC: Graphite rebased this pull request, because this pull request is set to merge when ready.

@lunelson lunelson merged commit 6fbf523 into next Jul 3, 2026
12 checks passed
@lunelson lunelson deleted the ln/fe-1122-walkthrough-fixes branch July 3, 2026 14:02
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