Repository navigation
feat(prompts): portable command conventions and first-load tool surface slimming - #2036
Open
chris-beckman wants to merge 9 commits into
Open
chris-beckman wants to merge 9 commits into
chris-beckman wants to merge 9 commits into
Conversation
…ls (PC04) Implement the PC01 findings located in shared partials, shared units, and survey guidance: teach multi-statement command programs (pipes, chains, loops, multi-file edits) in tool-turn-batch and command-surface, replace the false one-file-at-a-time and no-pipe restrictions in coordinator-text-and-citations, name the whole-document replacement edits behind the native edit limit in large-file-write-discipline, add rg -n and the search-then-slice pattern to survey-first-pass, state that any delivered source read establishes the edit base in native-edit-tool, fix the worker-tool-check grammar seam, and repair the dangling offered-schema sentence in find-specifics. The clarified copy grows the widest coordinator tripartite artifact and the plan-writer persona past their per-artifact caps, so prompt-budgets.yaml admits both with reviewer-weighable exceptions. Gates: go test ./test/contract/prompts/... ./test/contract/agentcontext/... and the budgets suites (maintainability + prompts) pass. Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…d guidance (PC05) Update coordinator-mode-implement-dispatch, implement-spawn, implementer-scoped-file, continuation-record, rewrite-structurally, path-explorer, research-addenda, security-survey-addenda, and persona contracts to use portable command registers (repo-map/survey_repo, code-rewrite, must_substrings). Remove retired http_request, process_list, and process_signal guidance fact keys from CommandGuidanceFactKeys and httpActionTools. Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…ening (PC10) Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…s (PC10) Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
Move the five terminal_* tools on the implement worker profile and the three secret_* tools on plan_write_only from sticky to true, and move the same eight tools from the implement_overlay_promote floor to its loadable list, matching implement_investigate. Their schemas and the attached terminal-no-secrets-over-pty and managed-secret-tools units now load on demand through request_tools, while the visual-show unit's visual_show_terminal_needs_request branch teaches the held-terminal load. worker_tool_surfaces.implement renders at 34,352 B, under the 40,000 default, so its exception is removed. implement_overlay_promote renders at 41,148 B, so its exception cap tightens from 82,000 to 44,000 and its reason no longer claims terminal and secret tools sit on the floor. Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
… tool ban contracts (PC10) Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
…profile The sessions contract requires terminal_open and terminal_close to be eager (allowed and sticky) on worker profiles; the first-load slimming moved them to on-demand, failing TestWorkerProfilesKeepCoreEagerAndOptionalCapabilitiesReachable. Restore sticky for those two core tools, keeping terminal_send, terminal_read, and terminal_snapshot on demand. Teach the mixed surface in the visual evidence unit: open with terminal_open, then load the remaining terminal tools with request_tools. The two eager schemas push the implement render past the default worker ceiling, so re-admit it with an exception stating the contract requirement. Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
TestForegroundCancelsTitleAcrossAliases renders the title summarizer inside a synctest bubble. When the guidance catalog is cold, that render resolves the extension catalog and contends on the cross-process extension lock, whose five-second real-clock retry deadline collapses on the bubble's fake clock; the render fails, the summarizer returns before starting the provider, and the bubble deadlocks. Reproduced deterministically on pristine main by holding the lock file, so this is a pre-existing load-sensitive flake, not a regression. Give the subtest a private config root so catalog resolution never contends on the shared lock, and select on the summarizer result so an early return fails with the real error instead of deadlocking. Signed-off-by: Chris Beckman <chris@paintedwolf.ai>
This branch has not been deployed
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
command-surface.md,tool-turn-batch.md,coordinator-text-and-citations.md,large-file-write-discipline.md,native-edit-tool.md,survey-first-pass.md,worker-tool-check.md,find-specifics.md,coordinator-mode-implement-dispatch.md,implement-spawn.md,implementer-scoped-file.md,continuation-record.md,rewrite-structurally.md,path-explorer.md,research-addenda.yaml,security-survey-addenda.yaml,_persona-contract.yaml) to teach expressive multi-statement portablecommandprograms (repo-map,replace-lines,code-rewrite,jq-edit,rg -n,sed -n, pipes, chains, and loops) without pre-portable single-file/no-pipe restrictions.summarizeincommand-surface.md({% if profile_has_summarize %}) and guardsedit --path/replace-linesinnative-edit-tool.mdandlarge-file-write-discipline.md({% if profile_command_mutation %}) so read-only command profiles never name mutation subcommands.http_request,process_list, andprocess_signalkeys fromCommandGuidanceFactKeys(),httpActionTools, andregisteredCoordinatorBooleanGates.terminal_open,terminal_send,terminal_read,terminal_snapshot, andterminal_closeonimplement.yamlandsecret_generate,secret_list, andsecret_revokeonplan_write_only.yamlfromstickytotrue(loadable), and moves the same 8 tools fromfloortoloadableonimplement_overlay_promote(coordinator-surfaces.yaml), detachingterminal-no-secrets-over-pty.mdandmanaged-secret-tools.mdfrom Turn 1 until requested viarequest_tools.worker_tool_surfaces.implementexception (46000-> fits default40000cap at34,352 B) and tightenscoordinator_tool_surfaces.implement_overlay_promote(82000->44000,41,148 B) inprompt-budgets.yamlwhile keeping all rendered personas and tripartite surfaces within default caps (plan-writer18,386 B, widest coordinator turn29,846static tokens /25.7%headroom, widest worker turn23,635static tokens /41.1%headroom).retired_tool_ban_contract_test.go(TestRenderedStockCopyNeverNamesFullyRetiredTools,TestReadOnlyCommandProfilesNeverNameMutationSubcommands,TestRenderedPhaseKicksNeverNameFullyRetiredTools).Testing
./task budgets(0 violations, 0exception_added)LYCAON_DEV=1 go test -count=1 ./internal/prompts/... ./test/contract/agentcontext/... ./test/contract/prompts/...CI fix (head 8b48074)
Both fast-tier failures fixed in two commits:
2c359b1f2f— the sessions contract requiresterminal_openandterminal_closeeager (allowed + sticky) on worker profiles; the first-load slimming had moved them to on-demand. Restoredstickyfor those two core tools (terminal_send,terminal_read,terminal_snapshotstay on demand), taught the mixed surface invisual-show-the-design.md(open withterminal_open, then load the rest withrequest_tools), and re-admitted the implement render with aworker_tool_surfaces.implementexception (cap 44000; renders at 40,195 B) since the two eager schemas exceed the default 40000 ceiling.8b480744fb— theTestForegroundCancelsTitleAcrossAliases/stream=truedeadlock is a pre-existing load-sensitive flake, not a PR regression: reproduced deterministically on pristine main (999afdfc1) by holding the cross-process extension lock. Mechanism: a cold guidance-catalog render inside the synctest bubble contends on the extension lock, whose five-second real-clock retry deadline collapses on the bubble's fake clock; the render fails, the summarizer returns before starting the provider, and the bubble deadlocks. Stabilized test-side: each subtest gets a private config root (catalog resolution never contends on the shared lock), and the body selects on the summarizer result so an early return fails with the real error instead of deadlocking.Validation (m1 runner):
./task test:digest -- ./test/contract/sessions/... ./internal/llm/... ./internal/prompts/...— passed, 24 packages, 2556 tests (receiptbd85eaa14aba41d58675d7462c1a06a7/00000000000000000001-320186474c2346739e0d08b996f28a39.json)./task budgets— passed (receipt0dd505e763a94e57afb42268e6b5c535/00000000000000000001-b0dd83f6ffee480889c5a169cfeab506.json)./task lint:full -- --scope ./internal/prompts/... --scope ./internal/llm/...— scope stage 0 issues; the whole-program deadcode stage shows only the ~41 pre-existing linux-tagged darwin findings, none in touched packagesscripts/ci_policy/static-checks.sh— passed with the repo-pinned go1.26.10 toolchain (m1's default 1.27.3 gofmt flags two pre-existing files CI does not)-count=300, and under load at-count=150