docs(issue): update agent/prompts to use CLI endpoints

- issue-plan-agent.md: Use `ccw issue solution` instead of Bash echo
- issue-plan.md (codex): Use `ccw issue solution` endpoint
- issue-queue.md (codex): Remove assigned_executor from schema

All solution creation now uses the dedicated CLI endpoint for:
- Auto-increment ID: SOL-{issue-id}-{seq}
- Proper JSONL format with trailing newline
- Multi-solution support per issue

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-12-29 20:28:39 +08:00
parent 7d71f603fe
commit 945fda2d14
3 changed files with 30 additions and 56 deletions

View File

@@ -182,47 +182,25 @@ function decomposeTasks(issue, exploration) {
- Task validation (all 5 phases present)
- Conflict detection (cross-issue file modifications)
**Solution Registration** (TWO-STEP: Write first, then bind):
```javascript
for (const issue of issues) {
const solutions = generatedSolutions[issue.id];
const solPath = `.workflow/issues/solutions/${issue.id}.jsonl`;
**Solution Registration** (via CLI endpoint):
// Step 1: ALWAYS write ALL solutions to JSONL (append mode)
// Each solution on a new line, preserving existing solutions
for (const sol of solutions) {
// Ensure Solution ID format: SOL-{issue-id}-{seq}
const solutionJson = JSON.stringify({
id: sol.id, // e.g., SOL-GH-123-1, SOL-GH-123-2
description: sol.description,
approach: sol.approach,
tasks: sol.tasks,
exploration_context: sol.exploration_context,
analysis: sol.analysis,
score: sol.score,
is_bound: false,
created_at: new Date().toISOString()
});
// Escape single quotes for shell safety: ' → '\''
const safeJson = solutionJson.replace(/'/g, "'\\''");
Bash(`echo '${safeJson}' >> "${solPath}"`);
}
// Step 2: Bind decision based on solution count
if (solutions.length === 1) {
// Single solution → auto-bind by ID (NOT --solution flag)
Bash(`ccw issue bind ${issue.id} ${solutions[0].id}`);
bound.push({ issue_id: issue.id, solution_id: solutions[0].id, task_count: solutions[0].tasks.length });
} else {
// Multiple solutions → already written, return for user selection
pending_selection.push({
issue_id: issue.id,
solutions: solutions.map(s => ({ id: s.id, description: s.description, task_count: s.tasks.length }))
});
}
}
**Step 1: Create solutions**
```bash
ccw issue solution <issue-id> --data '{"description":"...", "approach":"...", "tasks":[...]}'
# Output: {"id":"SOL-{issue-id}-1", ...}
```
**CLI Features:**
| Feature | Description |
|---------|-------------|
| Auto-increment ID | `SOL-{issue-id}-{seq}` (e.g., `SOL-GH-123-1`) |
| Multi-solution | Appends to existing JSONL, supports multiple per issue |
| Trailing newline | Proper JSONL format, no corruption |
**Step 2: Bind decision**
- **Single solution** → Auto-bind: `ccw issue bind <issue-id> <solution-id>`
- **Multiple solutions** → Return for user selection (no bind)
#### Phase 5: Conflict Analysis (Gemini CLI)
**Trigger**: When batch contains 2+ solutions

View File

@@ -71,25 +71,22 @@ Task rules (from schema):
### Step 5: Register & bind solutions via CLI
Create an import JSON file per solution (NOT JSONL), then bind it:
**Create solution** (via CLI endpoint):
```bash
ccw issue solution <issue-id> --data '{"description":"...", "approach":"...", "tasks":[...]}'
# Output: {"id":"SOL-{issue-id}-1", ...}
```
1. Write a file (example path):
- `.workflow/issues/solutions/_imports/<issue-id>-<timestamp>.json`
2. File contents shape (minimum):
```json
{
"description": "High-level summary",
"approach": "Technical approach",
"tasks": []
}
```
3. Register+bind in one step:
- `ccw issue bind <issue-id> --solution <import-file>`
**CLI Features:**
| Feature | Description |
|---------|-------------|
| Auto-increment ID | `SOL-{issue-id}-{seq}` (e.g., `SOL-GH-123-1`) |
| Multi-solution | Appends to existing JSONL, supports multiple per issue |
| Trailing newline | Proper JSONL format, no corruption |
If you intentionally generated multiple solutions for the same issue:
- Register each via `ccw issue bind <issue-id> <solution-id> --solution <import-file>` (do NOT bind yet).
- Present the alternatives in `pending_selection` and stop for user choice.
- Bind chosen solution with: `ccw issue bind <issue-id> <solution-id>`.
**Binding:**
- **Single solution**: Auto-bind: `ccw issue bind <issue-id> <solution-id>`
- **Multiple solutions**: Present alternatives in `pending_selection`, wait for user choice
### Step 6: Detect cross-issue file conflicts (best-effort)

View File

@@ -135,7 +135,6 @@ Group assignment:
"execution_group": "P1",
"depends_on": [],
"semantic_priority": 0.8,
"assigned_executor": "codex",
"files_touched": ["src/auth.ts"],
"task_count": 3
}