refactor(prompts): dedup agent/kit prompts against helper scripts - #8
Merged
Conversation
消除常駐 prompt 與 helper script 之間的重複死碼,省 token 且消除漂移風險: - engineer.md: 合併亂序 Step 散文段 + 重複總覽表格為單一權威清單(158→120),gate 全保留 - engineer-kit §4a/§4c: 手打 deliver-first 4 步 / ready-merge 3 步 → 改指向 helper script - ui-designer-kit §5a/§5c: 同型死碼 → 改指向 deliver-first.sh / ready-and-merge.sh - start/SKILL: 純說明散文「為什麼不 per-PR review / e2e 上 CI」外移 docs/DESIGN-RATIONALE.md - 手打版 bash 缺 retry/idempotent 防護,留著比刪掉更危險 selftest 8/8 PASS;engineer gate 10/10 存活。 Co-Authored-By: Claude <noreply@anthropic.com>
Owner
Author
實驗驗證結果A. Token 省幅(常駐 prompt,每次 agent spawn 載入)
engineer 每次 spawn 省 ~669 tok;四檔每輪合計 ~-960 tok。 B. Helper script 端到端驗證(本次改動引入的唯一新風險:prompt 全委派 script、無手打後備)沙盒實測
手打版 bash 無 idempotency/兜底 → 刪手打版改走 script 是可靠度提升。gh+PR 部分由本 PR 在真實 remote 活體驗證。 C. 待辦:完整 sprint benchmark需 demo repo + 多 background agent 實跑一輪(before/after sub-agent cap 命中率、merge 成功率),屬獨立的高成本操作,待 scope 後執行。 |
gpwork4u
added a commit
that referenced
this pull request
May 22, 2026
squash of PR #9(feat/design-bundle-support,stacked on #8)。實跑請假系統 benchmark 驗證瘦身後 prompt + 系統性找出並修復 13 個缺陷: contract-check 永遠 exit 0、frontend-scaffold 摧毀 backend、sync-design 不吃 bundle、testid 抽取假設、specs 未版控、node_modules 誤報、Check5 插值誤判、 local-checks full-mode、compose build context、ready-and-merge billing、 YAML lint、review/verifier 不寫報告。詳見 docs/BENCHMARK-2026-05.md。 Co-authored-by: Claude <noreply@anthropic.com>
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
消除常駐 prompt 與 helper script 之間的重複死碼,省 token 且修掉漂移風險。淨 -60 行(85+ / 145-)。不砍規則,只砍同一條規則的副本。
Changes
deliver-first.sh/ready-and-merge.sh(保留 PR body 範本)docs/DESIGN-RATIONALE.md(給人看,不入 prompt)為什麼安全
手打版 bash 缺
deliver-first.sh的 retry / idempotent / API-indexing-race 防護——留著不只浪費 token,還是漂移地雷(有人照舊版手打就繞過防護)。改成單一指標後真相只有一份。Test Plan
bash .claude/scripts/selftest.sh→ 8/8 PASS🤖 Generated with Claude Code