From 5b5dc85677bfab3e0fea94a17bb59cad41d2da02 Mon Sep 17 00:00:00 2001 From: catlog22 Date: Sat, 17 Jan 2026 21:30:05 +0800 Subject: [PATCH] refactor(cli): change from env var injection to direct prompt concatenation - Replace $PROTO/$TMPL environment variable injection with systemRules/roles direct concatenation - Append rules to END of prompt instead of prepending - Change prompt field name from RULES to CONSTRAINTS in all prompts - Default to universal-rigorous-style template when --rule not specified - Update all .claude documentation, agents, commands, and skills - Add streaming_content type support for Gemini delta messages Breaking: Prompts now use CONSTRAINTS field instead of RULES --- .claude/agents/cli-discuss-agent.md | 2 +- .claude/agents/cli-execution-agent.md | 10 ++-- .claude/agents/cli-lite-planning-agent.md | 2 +- .claude/agents/cli-planning-agent.md | 2 +- .claude/agents/debug-explore-agent.md | 6 +-- .claude/agents/doc-generator.md | 4 +- .claude/agents/issue-queue-agent.md | 2 +- .claude/commands/cli/codex-review.md | 12 ++--- .claude/commands/issue/discover-by-prompt.md | 2 +- .claude/commands/issue/plan.md | 2 +- .claude/commands/memory/swagger-docs.md | 14 ++--- .claude/commands/workflow/lite-execute.md | 2 +- .claude/commands/workflow/lite-lite-lite.md | 4 +- .../workflow/tools/conflict-resolution.md | 2 +- .../skill-generator/specs/cli-integration.md | 26 ++++------ .../workflow-skill-conflict-patterns.txt | 2 +- .../workflow-skill-lessons-learned.txt | 2 +- .claude/workflows/cli-tools-usage.md | 52 +++++++++---------- ccw/src/commands/cli.ts | 52 +++++++++++++++---- ccw/src/tools/cli-executor-core.ts | 2 +- ccw/src/tools/cli-output-converter.ts | 29 +++++++++-- 21 files changed, 136 insertions(+), 95 deletions(-) diff --git a/.claude/agents/cli-discuss-agent.md b/.claude/agents/cli-discuss-agent.md index a4f6cdfd..7636ba2c 100644 --- a/.claude/agents/cli-discuss-agent.md +++ b/.claude/agents/cli-discuss-agent.md @@ -215,7 +215,7 @@ CONTEXT: @**/* | Memory: {ace_context_summary} EXPECTED: JSON with feasibility_score, findings, implementation_approaches, technical_concerns, code_locations -RULES: $PROTO | +CONSTRAINTS: - Specific file:line references - Quantify effort estimates - Concrete pros/cons diff --git a/.claude/agents/cli-execution-agent.md b/.claude/agents/cli-execution-agent.md index c22b4836..50401179 100644 --- a/.claude/agents/cli-execution-agent.md +++ b/.claude/agents/cli-execution-agent.md @@ -114,10 +114,10 @@ plan → planning/architecture-planning.txt | planning/task-breakdown.txt bug-fix → development/bug-diagnosis.txt ``` -**3. RULES Field**: -- Use `--rule