Add HeadsDown call renderer - #15
Merged
Merged
Conversation
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.
TL;DR
Adds the Pi slice of the shared HeadsDown call renderer so Pi prompt and tool output can render canonical backend calls without inventing local vocabulary. This is one repo-specific slice of headsdownapp/heads_down#901, so the issue stays open for iOS and Android.
Part of headsdownapp/heads_down#901
Context
Gate A requires every client to render canonical HeadsDown calls consistently. The app/web slice is in headsdownapp/heads_down#966, and the CLI slice merged in headsdownapp/headsdown-cli#6. This PR adds the equivalent display contract helper for the Pi package.
The Pi helper is display-only. It does not derive calls from availability, status, proposals, or local policy. It accepts a backend call key plus explicit unknown-call signals and returns prompt-ready copy with backend action keys separated from UI intents.
Changes
extensions/headsdown/call-renderer.tswith canonical HeadsDown call rendering for Pi.good_to_run,keep_it_tight,not_worth_starting_now,off_the_clock,rabbit_hole_detected,ready_to_resume,all_contained, andneeds_your_yes.action=keep_queuedvsui_intent=review_request.needs_your_yesfor action, approval, risk, boundary, spend, external side effect, escalation, or ambiguous signals.keep_it_tightfor limit, scope, validation, or low-confidence uncertainty.all_containedonly when no action is needed and the run is explicitly in bounds.Verification
Run these commands from the Pi package worktree:
npm run formatnpm test -- test/call-renderer.test.tsnpm run typechecknpm testnpm run lintValidation already run:
npm test -- test/call-renderer.test.ts, 12 tests passed.npm test, 139 tests passed.npm run typecheck, passed.npm run lint, passed.git diff --check, passed.Acceptance Criteria Addressed
Still Remaining For #901