feat(agents): the coding prompt names the title gate before the description is submitted - #1014
Merged
coreplane-switchboard[bot] merged 1 commit intoSep 14, 2026
Conversation
…iption is submitted
coreplane-switchboard
Bot
requested a review
from justinhelmer
as a code owner
September 14, 2026 04:11
Contributor
Author
There was a problem hiding this comment.
LGTM: Small, correct change: coding prompt names the title gate via the contract's exported constant, with positive and negative prompt tests; spec coverage and test-guard clean.
Verdict: approve — no findings.
PR #1014 (head 801a453, 2 files, +23/−3 — fully covered by the diff I read):
src/agents/registry.tsimportsPR_TITLE_GUARDfromsrc/core/ship/contract.ts(confirmed exported there — U1 has merged) and adds one sentence toPR_DESCRIPTION_TEMPLATEtelling coding runs to judge the title with thecheck:pr-titlegate (npm run check:pr-title -- "<title>") before submitting. Since the template is interpolated into both the coding preset'ssystemandresidentSystem, one spelling serves both — matching the contract's goal that prompt and contract cannot drift.src/agents/registry.test.tsadds the two test scenarios the unit contract lists: both coding prompts contain the gate name (via the constant) and the command; review, research, explore and general prompts (including resident variants) do not — exactly as specified.
Checks: specs:coverage — every changed path covered; test-guard ok — nothing removed; no spec contradictions (the touched specs' prompt behaviors are additive here). Contract: no spec rows named; both test scenarios present. The command string npm run check:pr-title -- "<title>" is a literal rather than derived from the constant, but the gate name rides the constant as the unit asked — not worth a finding.
coreplane-switchboard
Bot
deleted the
plan/2026-09-14-001-feat-title-gate-in-the-child-contract-plan/u2-the-coding-prompt-names
branch
September 14, 2026 04:17
This was referenced Sep 14, 2026
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
The coding preset's system prompt now tells every coding run to judge its PR title with the
check:pr-titlegate (npm run check:pr-title -- "<title>") before submitting the PR description. The gate's name is spelled through thePR_TITLE_GUARDconstant exported by the contract module, so the prompt and the child contract can never say two different things.What & why
Unit U2 of the plan docs/plans/2026-09-14-001-feat-title-gate-in-the-child-contract-plan.md. U1 made the child contract name
check:pr-titleamong its guards; this unit makes the coding prompt itself instruct running the same gate before the description is submitted, importing the guard name fromsrc/core/ship/contract.tsso a rename there flows into both places. Presets that open no pull request (review, research, explore, general) carry no such text.Tour
1. One sentence in the shared PR-description guidance
The PR_DESCRIPTION_TEMPLATE — carried verbatim by both coding prompts (sandbox and resident) and by no other preset — now tells the run to judge its title with the gate before submitting, spelling the gate's name through the imported PR_TITLE_GUARD constant so one spelling serves the contract and the prompt.
Look for: The sentence names the constant-interpolated gate and the exact command
npm run check:pr-title -- "<title>".switchboard/src/agents/registry.ts
Line 100 in 801a453
2. The import from the contract module
PR_TITLE_GUARD joins the contract headings the file already imports from src/core/ship/contract.ts — the pattern the unit names.
switchboard/src/agents/registry.ts
Line 5 in 801a453
3. Tests: the gate is in the coding prompts and nowhere else
Both coding prompts must contain the gate's name and the command; the review, research, explore and general prompts must not carry the command. Red before the change (the first test failed), green after.
https://github.com/coreplanelabs/switchboard/blob/801a453f9cb980af8e3c1a473915013f5d78b2c5/src/agents/registry.test.ts#L796-L815
4. Remaining changes
Decisions
check:pr-titlelegitimately appears in prompts that quote AGENTS.md's guard list; the command formnpm run check:pr-title -- "<title>"is the instruction this unit adds, so absence is asserted on that.Risks & implications
Minimal: a prompt-text-only change to the coding preset plus tests. No behavior, routing, or contract rendering changes; the constant import already existed as a pattern in the file.
Validation
Red-first test, then full verify green.
npm cifixed an unrelated pre-existing sandbox-pair dep drift in the resident environment)🤖 Generated with Claude Code