refactor: 精简系统提示词 — 合并沟通风格段落、精简 memory/工具描述、截断 gitStatus

- 合并 getOutputEfficiencySection + getSimpleToneAndStyleSection 为精简的 Communication style
- 精简 auto memory 指令:删除 4 种类型的详细说明和示例,仅保留核心 description
- 精简 Agent 工具:删除 forkExamples 和 currentExamples 大段示例
- 精简 Bash 工具:合并 sleep 相关指导
- 精简 EnterPlanMode/ExitPlanMode:删除详细 GOOD/BAD 示例
- gitStatus MAX_STATUS_CHARS 从 2000 降到 1000
- 同步更新 prompt engineering audit 测试断言

Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
This commit is contained in:
claude-code-best
2026-05-09 17:14:41 +08:00
parent 547ce9e848
commit 2f86485d9c
9 changed files with 52 additions and 326 deletions

View File

@@ -424,8 +424,8 @@ describe('Opus 4.7 Prompt Engineering Audit', () => {
test('includes anti-postamble guidance', async () => {
const prompt = await getFullPrompt()
expect(prompt).toContain('Do not restate')
expect(prompt).toContain('the user can read the diff')
expect(prompt).toContain("don't restate")
expect(prompt).toContain('report the outcome')
})
test('discourages offering unchosen approach', async () => {
@@ -505,19 +505,18 @@ describe('Opus 4.7 Prompt Engineering Audit', () => {
describe('#11 Formatting discipline', () => {
test('prompt contains prose-first guidance (existing)', async () => {
const prompt = await getFullPrompt()
expect(prompt).toContain('direct answer in prose')
expect(prompt).toContain('prose paragraphs')
})
test('discourages over-formatting', async () => {
const prompt = await getFullPrompt()
expect(prompt).toContain('over-formatting')
expect(prompt).toContain('natural language')
expect(prompt).toContain('simple answers')
})
test('bullet points must be 1-2 sentences, not fragments', async () => {
const prompt = await getFullPrompt()
expect(prompt).toContain('1-2 sentences')
expect(prompt).toContain('not sentence fragments')
})
})
@@ -613,7 +612,8 @@ describe('Opus 4.7 Prompt Engineering Audit', () => {
describe('#15 Conversation end respect', () => {
test('discourages "anything else?" appendages', async () => {
const prompt = await getFullPrompt()
expect(prompt).toContain('the user will ask if they need more')
expect(prompt).toContain('Do not append')
expect(prompt).toContain('Is there anything else?')
})
})
@@ -656,7 +656,7 @@ describe('Opus 4.7 Prompt Engineering Audit', () => {
test('no-machinery-narration: describe in user terms', async () => {
const prompt = await getFullPrompt()
expect(prompt).toContain("Don't narrate internal machinery")
expect(prompt).toContain('Describe the action in user terms')
expect(prompt).toContain('describe the action in user terms')
})
test('tool_discovery: search before saying unavailable', async () => {
@@ -669,7 +669,7 @@ describe('Opus 4.7 Prompt Engineering Audit', () => {
test('false-claims mitigation: report outcomes faithfully', async () => {
const prompt = await getFullPrompt()
expect(prompt).toContain('Report outcomes faithfully')
expect(prompt).toContain('report the outcome')
})
test('CYBER_RISK_INSTRUCTION: allows security testing', async () => {