Add comprehensive workflows for CLI tools usage, coding philosophy, context requirements, file modification, and CodexLens auto hybrid mode

- Introduced a detailed guide for intelligent tools selection strategy, including quick reference, tool specifications, prompt templates, and best practices for CLI execution.
- Established a coding philosophy document outlining core beliefs, simplicity principles, and guidelines for effective coding practices.
- Created context requirements documentation emphasizing the importance of understanding existing patterns and dependencies before implementation.
- Developed a file modification workflow detailing the use of edit_file and write_file MCP tools, along with priority logic for file reading and editing.
- Implemented CodexLens auto hybrid mode, enhancing the CLI with automatic vector embedding generation and default hybrid search mode based on embedding availability.
This commit is contained in:
catlog22
2025-12-17 09:53:30 +08:00
parent 154a9283b5
commit d06a3ca12e
18 changed files with 619 additions and 313 deletions

View File

@@ -473,7 +473,7 @@ Detailed plan: ${executionContext.session.artifacts.plan}`)
return prompt
}
ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode auto
ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode write
```
**Execution with fixed IDs** (predictable ID pattern):
@@ -496,8 +496,8 @@ const previousCliId = batch.resumeFromCliId || null
// Build command with fixed ID (and optional resume for continuation)
const cli_command = previousCliId
? `ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode auto --id ${fixedExecutionId} --resume ${previousCliId}`
: `ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode auto --id ${fixedExecutionId}`
? `ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode write --id ${fixedExecutionId} --resume ${previousCliId}`
: `ccw cli exec "${buildCLIPrompt(batch)}" --tool codex --mode write --id ${fixedExecutionId}`
bash_result = Bash(
command=cli_command,
@@ -519,7 +519,7 @@ if (bash_result.status === 'failed' || bash_result.status === 'timeout') {
⚠️ Execution incomplete. Resume available:
Fixed ID: ${fixedExecutionId}
Lookup: ccw cli detail ${fixedExecutionId}
Resume: ccw cli exec "Continue tasks" --resume ${fixedExecutionId} --tool codex --mode auto --id ${fixedExecutionId}-retry
Resume: ccw cli exec "Continue tasks" --resume ${fixedExecutionId} --tool codex --mode write --id ${fixedExecutionId}-retry
`)
// Store for potential retry in same session
@@ -582,7 +582,7 @@ ccw cli exec "[Shared Prompt Template with artifacts]" --tool qwen --mode analys
# Same prompt as Gemini, different execution engine
# Method 4: Codex Review (autonomous)
ccw cli exec "[Verify plan acceptance criteria at ${plan.json}]" --tool codex --mode auto
ccw cli exec "[Verify plan acceptance criteria at ${plan.json}]" --tool codex --mode write
```
**Multi-Round Review with Fixed IDs**:
@@ -744,5 +744,5 @@ Appended to `previousExecutionResults` array for context continuity in multi-exe
ccw cli detail ${fixedCliId}
# Resume with new fixed ID for retry
ccw cli exec "Continue from where we left off" --resume ${fixedCliId} --tool codex --mode auto --id ${fixedCliId}-retry
ccw cli exec "Continue from where we left off" --resume ${fixedCliId} --tool codex --mode write --id ${fixedCliId}-retry
```

View File

@@ -255,7 +255,7 @@ Based on userConfig.executionMethod:
CLI Resume Support (MANDATORY for all CLI commands):
- Use --resume parameter to continue from previous task execution
- Read previous task's cliExecutionId from session state
- Format: ccw cli exec "[prompt]" --resume ${previousCliId} --tool ${tool} --mode auto
- Format: ccw cli exec "[prompt]" --resume ${previousCliId} --tool ${tool} --mode write
## EXPLORATION CONTEXT (from context-package.exploration_results)
- Load exploration_results from context-package.json