perf(prompts): shrink Layer 1 to lower 8k-ctx token cost#111
Closed
hqhq1025 wants to merge 1 commit intowt/progressive-promptfrom
Closed
perf(prompts): shrink Layer 1 to lower 8k-ctx token cost#111hqhq1025 wants to merge 1 commit intowt/progressive-promptfrom
hqhq1025 wants to merge 1 commit intowt/progressive-promptfrom
Conversation
…-slop-digest Compress three always-on Layer 1 prompt sections to lower token cost for small-context models (e.g. minimax-m2.5:free at 8k ctx): - workflow.v1.txt: 2724 -> 1556 bytes - pre-flight.v1.txt: 2241 -> 1434 bytes - anti-slop-digest.v1.txt: 1698 -> 1203 bytes All rules preserved; dropped only explanatory prose, rationale paragraphs, and framing copy. Pre-flight beats and section headings kept verbatim so the existing drift / beat-coverage tests pass unchanged. Matched dashboard prompt: ~22.6 KB -> 20.1 KB (about 2.5 KB / 600 token saving per Layer 1 request).
There was a problem hiding this comment.
Findings
- None.
Summary
- Review mode: initial
- No high-confidence issues found in added/modified lines of this diff.
- Residual risk/testing gap: prompt behavior quality and token-efficiency impacts were not executable-verified in this environment.
Testing
- Not run (automation):
pnpmis not available in this runner.
open-codesign Bot
3 tasks
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
Compress the three always-on Layer 1 prompt sections shipped in #109 so small-context models (e.g. minimax-m2.5:free at 8k ctx) get a meaningfully lighter system prompt without losing any rules.
Section sizes (.txt source = TS constant, byte-for-byte)
workflow.v1.txtpre-flight.v1.txtanti-slop-digest.v1.txtComposed prompt size (verification script)
composeSystemPrompt({ mode: 'create' })(full)做个数据看板(matched dashboard)xyzzy nothing(no-match → Layer 1 + full craft)What changed
Pre-flight checklist,Revision workflow, etc.) and pre-flight beat labels (Artifact type,Emotional posture, ...) verbatim — drift / beat-coverage tests still pass.Test plan
pnpm --filter @open-codesign/core test— 158 / 158 pass (drift test green)pnpm --filter @open-codesign/core typecheck— cleanpnpm exec biome check packages/core/src/prompts/— cleanPRINCIPLES §5b
.v1.txtfiles unchanged)