Skip to content

Ship keepstyle guideline split and dedupe worker report envelopes - #968

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-7654-keepstyle-guidelines-split
Sep 13, 2026
Merged

Ship keepstyle guideline split and dedupe worker report envelopes#968
TheGreatAxios merged 3 commits into
mainfrom
cl-7654-keepstyle-guidelines-split

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Splits the chat Guidelines block into five named sub-blocks (GUIDELINE_SUB_BLOCK_IDS) with an id-based omit policy, so config profiles can ship a smaller keepstyle footprint via promptSectionOmit without prose surgery.
  • Ships KEEPSTYLE_PROMPT_SECTION_OMIT: responseStyle and scope/conventions (build gate, verification evidence) stay; toolChoice, askVsProceed, and orchestration drop. Omitting the config keeps full guidelines, so the default prompt is unchanged.
  • Dedupes worker report envelopes: intern, testsmith, neckbeard, and bruckheimer packages stop re-specifying the four-heading envelope and point at the shared scaffold that owns its shape. Skywalker keeps the orchestrator-side contract (no Skywalker policy change).
  • Contract markers are substring-stable: no behavior change to marker matching.

Why: keepstyle models pay prompt tokens for guidance they never act on, and envelope re-specs drift into competing taxonomies; one policy surface and one envelope owner fix both.

Verification

  • bun test src/agent/prompts.test.ts src/agent/directors/intern/package.test.ts src/agent/directors/testsmith/package.test.ts src/agent/directors/neckbeard/package.test.ts src/agent/directors/bruckheimer/package.test.ts src/agent/directors/draper/package.test.ts — 88 pass, 0 fail (exit 0)
  • bun run check — green: lint + typecheck + build + guard, then 7137 pass, 0 fail across 488 files (exit 0)
  • Contract tests assert all five guideline markers present by default, the keepstyle omit keeps response-style/scope while dropping the three blocks, unknown omit ids are ignored, guidelineConfig threads through buildChatSystemPrompt, and the four-heading envelope appears exactly once in built sub-agent prompts; director tests assert packages no longer re-specify ## Findings / ## Blockers / ## Paths
  • Live-eval plan (unspent — no live model calls made from this branch; second-to-land rebases onto CL-7665 if it lands first, since it edits nearby guideline scope):
  • bun scripts/eval-capability.ts --matrix <cells> --dry-run — lists cases x variants with zero spend; drop --dry-run to run post-rebase with configured credentials
  • Gates on the live run: report envelope present in worker outputs per provider family, grok cell within its ≤17 gate, kimi cell (kimi-k2.7-code) included

Fixes CL-7654

@linear-code

linear-code Bot commented Sep 13, 2026

Copy link
Copy Markdown

CL-7654

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Audit: envelope direction is correct — scaffold owns the Summary/Findings/Blockers/Paths shape, lane packages point at it instead of re-specifying it. Endorsed.

Two issues to fix before merge:

  1. omit is untyped at the boundary. GuidelineConfig.omit and the buildGuidelines opts field are readonly string[], and ProfileSchema accepts "promptSectionOmit?": "string[]" — with "Unknown ids are ignored" as the documented behavior. Per the repo arktype-at-boundaries rule, constrain omit to the GuidelineSubBlockId union and validate promptSectionOmit against GUIDELINE_SUB_BLOCK_IDS at profile load (type.enumerated(...) matches the existing settings.ts pattern) instead of silently ignoring unknown strings. A typo in a profile today vanishes without a trace.
  2. KEEPSTYLE_PROMPT_SECTION_OMIT is a dead export: nothing outside prompts.test.ts references it — no keepstyle profile or call site is wired to it. Either wire a keepstyle profile to it or drop the export (and its tests) rather than shipping plumbing with no consumer.

Note: this PR wins the envelope question vs #954#954 must yield its in-package report format to this scaffold-owned shape.

Reject unknown promptSectionOmit ids in ProfileSchema via
type.enumerated over GUIDELINE_SUB_BLOCK_IDS so profile typos fail
closed at load instead of silently keeping the full guidelines.
Type omit as GuidelineSubBlockId end to end and drop the unwired
KEEPSTYLE_PROMPT_SECTION_OMIT export.
@TheGreatAxios
TheGreatAxios merged commit d9ec82c into main Sep 13, 2026
9 checks passed
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.

1 participant