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
This commit is contained in:
catlog22
2026-01-17 21:30:05 +08:00
parent 1e691fa751
commit 5b5dc85677
21 changed files with 136 additions and 95 deletions

View File

@@ -114,10 +114,10 @@ plan → planning/architecture-planning.txt | planning/task-breakdown.txt
bug-fix → development/bug-diagnosis.txt
```
**3. RULES Field**:
- Use `--rule <template>` option to auto-load protocol + template as `$PROTO` and `$TMPL`
**3. CONSTRAINTS Field**:
- Use `--rule <template>` option to auto-load protocol + template (appended to prompt)
- Template names: `category-function` format (e.g., `analysis-code-patterns`, `development-feature`)
- NEVER escape: `\$`, `\"`, `\'` breaks variable expansion
- NEVER escape: `\"`, `\'` breaks shell parsing
**4. Structured Prompt**:
```bash
@@ -126,7 +126,7 @@ TASK: {specific_task_with_details}
MODE: {analysis|write|auto}
CONTEXT: {structured_file_references}
EXPECTED: {clear_output_expectations}
RULES: $PROTO $TMPL | {constraints}
CONSTRAINTS: {constraints}
```
---
@@ -157,7 +157,7 @@ TASK: {task}
MODE: analysis
CONTEXT: @**/*
EXPECTED: {output}
RULES: $PROTO $TMPL
CONSTRAINTS: {constraints}
" --tool gemini --mode analysis --rule analysis-code-patterns --cd {dir}
# Qwen fallback: Replace '--tool gemini' with '--tool qwen'