feat: chat refinement + write-mode badges on proposals card#44
Closed
gabe-lyons wants to merge 1 commit intofeat/mcp-appsfrom
Closed
feat: chat refinement + write-mode badges on proposals card#44gabe-lyons wants to merge 1 commit intofeat/mcp-appsfrom
gabe-lyons wants to merge 1 commit intofeat/mcp-appsfrom
Conversation
Turns /improve-context into a fully interactive component:
- ProposalItem gains write_mode ("direct" | "needs_approval") so the agent
can label the blast radius of each proposal. UI renders a green
ShieldCheck (writes directly) or amber ShieldAlert (needs approval) badge
per row with a tooltip explaining the consequence.
- Adds an inline chat input to the proposals card so users can refine
("drop #3, add one about churn") before submitting. Refinement turns flow
through a new sendProposalRefinement helper tagged source="proposal_chat"
with origin_message_id, render as a normal user bubble, and don't put the
card into the submitted state — selection still requires the Submit button.
- Skill prompt teaches the agent when to label needs_approval vs direct,
and how to handle proposal_chat follow-ups (clarify in plain text, or
re-emit present_proposals with a revised list for material changes).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author
|
Closed — opened in error. |
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
Stacked on top of #28. Turns
/improve-contextfrom a one-shot checkbox flow into a fully interactive component: the user can chat with the proposals card to refine the list before submitting, and each proposal carries a visible write-mode badge so they see the blast radius up front.ProposalItemgainswrite_mode: "direct" | "needs_approval"(defaults toneeds_approval). UI renders a green ShieldCheck ("Writes directly") or amber ShieldAlert ("Needs approval") with a tooltip.Entersubmits,Shift+Enternewlines. Sent viasendProposalRefinementwithsource: \"proposal_chat\"+origin_message_id, renders as a normal user bubble, does not flip the card to the submitted state — Submit is still the only action that consumes the proposals.improve-context/SKILL.mdupdated with the labeling rule (touches shared DataHub metadata →needs_approval; user-scoped →direct) and how to handleproposal_chatturns (clarify in text, or re-emitpresent_proposalswith a revised list).Out of scope (intentional): no actual approval gate or split-write routing — the badge is informational. Future work could branch the submit path on
write_mode.Test plan
uv run pytest tests/unit/— 88 passedpnpm tsc --noEmit— clean/improve-contextafter a substantive question, verify badges render correctly per proposal🤖 Generated with Claude Code