claude-code-workflow 7.2.23 → 7.2.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ccw/workflows/cli-tools-usage.md +123 -521
- package/.claude/skills/brainstorm/SKILL.md +408 -408
- package/.claude/skills/review-cycle/SKILL.md +132 -132
- package/.claude/skills/spec-generator/SKILL.md +1 -1
- package/.claude/skills/team-designer/phases/02-scaffold-generation.md +1 -1
- package/.claude/skills/team-lifecycle-v4/SKILL.md +1 -1
- package/.claude/skills/team-review/SKILL.md +1 -1
- package/.claude/skills/team-ultra-analyze/SKILL.md +1 -1
- package/.claude/skills/workflow-multi-cli-plan/SKILL.md +1 -1
- package/.claude/skills/workflow-plan/SKILL.md +1 -1
- package/.claude/skills/workflow-test-fix/SKILL.md +1 -1
- package/.codex/skills/analyze-with-file/SKILL.md +966 -966
- package/.codex/skills/issue-discover/SKILL.md +361 -361
- package/.codex/skills/review-cycle/SKILL.md +1 -1
- package/.codex/skills/roadmap-with-file/SKILL.md +901 -901
- package/.codex/skills/spec-generator/SKILL.md +425 -425
- package/.codex/skills/spec-setup/SKILL.md +669 -669
- package/.codex/skills/team-arch-opt/SKILL.md +242 -175
- package/.codex/skills/team-arch-opt/roles/analyzer/role.md +78 -78
- package/.codex/skills/team-arch-opt/roles/coordinator/commands/analyze.md +57 -57
- package/.codex/skills/team-arch-opt/roles/coordinator/commands/monitor.md +246 -204
- package/.codex/skills/team-arch-opt/roles/coordinator/role.md +196 -184
- package/.codex/skills/team-arch-opt/roles/designer/role.md +115 -115
- package/.codex/skills/team-arch-opt/roles/refactorer/role.md +102 -102
- package/.codex/skills/team-arch-opt/roles/reviewer/role.md +111 -111
- package/.codex/skills/team-arch-opt/roles/validator/role.md +115 -115
- package/.codex/skills/team-arch-opt/specs/pipelines.md +102 -102
- package/.codex/skills/team-brainstorm/SKILL.md +72 -4
- package/.codex/skills/team-brainstorm/roles/challenger/role.md +61 -61
- package/.codex/skills/team-brainstorm/roles/coordinator/commands/analyze.md +58 -58
- package/.codex/skills/team-brainstorm/roles/coordinator/commands/monitor.md +212 -171
- package/.codex/skills/team-brainstorm/roles/coordinator/role.md +172 -160
- package/.codex/skills/team-brainstorm/roles/evaluator/role.md +56 -56
- package/.codex/skills/team-brainstorm/roles/ideator/role.md +69 -69
- package/.codex/skills/team-brainstorm/roles/synthesizer/role.md +57 -57
- package/.codex/skills/team-brainstorm/specs/pipelines.md +72 -72
- package/.codex/skills/team-coordinate/SKILL.md +71 -3
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +45 -5
- package/.codex/skills/team-coordinate/roles/coordinator/role.md +402 -389
- package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +111 -111
- package/.codex/skills/team-coordinate/specs/pipelines.md +97 -97
- package/.codex/skills/team-coordinate/specs/quality-gates.md +112 -112
- package/.codex/skills/team-designer/SKILL.md +153 -153
- package/.codex/skills/team-designer/phases/01-requirements-analysis.md +250 -250
- package/.codex/skills/team-designer/phases/02-scaffold-generation.md +228 -228
- package/.codex/skills/team-designer/phases/03-content-generation.md +330 -330
- package/.codex/skills/team-designer/phases/04-validation.md +320 -320
- package/.codex/skills/team-executor/SKILL.md +29 -2
- package/.codex/skills/team-executor/roles/executor/commands/monitor.md +23 -15
- package/.codex/skills/team-frontend/SKILL.md +77 -3
- package/.codex/skills/team-frontend/roles/analyst/role.md +92 -92
- package/.codex/skills/team-frontend/roles/architect/role.md +86 -86
- package/.codex/skills/team-frontend/roles/coordinator/commands/analyze.md +52 -52
- package/.codex/skills/team-frontend/roles/coordinator/commands/monitor.md +222 -188
- package/.codex/skills/team-frontend/roles/coordinator/role.md +189 -177
- package/.codex/skills/team-frontend/roles/developer/role.md +93 -93
- package/.codex/skills/team-frontend/roles/qa/role.md +79 -79
- package/.codex/skills/team-frontend/specs/pipelines.md +76 -76
- package/.codex/skills/team-frontend-debug/SKILL.md +66 -3
- package/.codex/skills/team-frontend-debug/roles/analyzer/role.md +208 -208
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +174 -174
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/dispatch.md +198 -198
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/monitor.md +177 -143
- package/.codex/skills/team-frontend-debug/roles/coordinator/role.md +164 -152
- package/.codex/skills/team-frontend-debug/roles/fixer/role.md +147 -147
- package/.codex/skills/team-frontend-debug/roles/reproducer/role.md +147 -147
- package/.codex/skills/team-frontend-debug/roles/tester/role.md +231 -231
- package/.codex/skills/team-frontend-debug/roles/verifier/role.md +172 -172
- package/.codex/skills/team-frontend-debug/specs/debug-tools.md +215 -215
- package/.codex/skills/team-frontend-debug/specs/pipelines.md +94 -94
- package/.codex/skills/team-issue/SKILL.md +83 -4
- package/.codex/skills/team-issue/roles/coordinator/commands/analyze.md +64 -64
- package/.codex/skills/team-issue/roles/coordinator/commands/dispatch.md +273 -273
- package/.codex/skills/team-issue/roles/coordinator/commands/monitor.md +235 -194
- package/.codex/skills/team-issue/roles/coordinator/role.md +206 -194
- package/.codex/skills/team-issue/roles/explorer/role.md +94 -94
- package/.codex/skills/team-issue/roles/implementer/role.md +87 -87
- package/.codex/skills/team-issue/roles/integrator/role.md +84 -84
- package/.codex/skills/team-issue/roles/planner/role.md +81 -81
- package/.codex/skills/team-issue/roles/reviewer/role.md +86 -86
- package/.codex/skills/team-issue/specs/pipelines.md +124 -124
- package/.codex/skills/team-lifecycle-v4/MIGRATION-PLAN.md +6 -6
- package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -242
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +1 -1
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +66 -24
- package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +13 -1
- package/.codex/skills/team-lifecycle-v4/roles/supervisor/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/templates/architecture.md +254 -254
- package/.codex/skills/team-lifecycle-v4/templates/epics.md +196 -196
- package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +133 -133
- package/.codex/skills/team-lifecycle-v4/templates/requirements.md +224 -224
- package/.codex/skills/team-perf-opt/SKILL.md +68 -3
- package/.codex/skills/team-perf-opt/roles/benchmarker/role.md +89 -89
- package/.codex/skills/team-perf-opt/roles/coordinator/commands/analyze.md +61 -61
- package/.codex/skills/team-perf-opt/roles/coordinator/commands/monitor.md +35 -1
- package/.codex/skills/team-perf-opt/roles/coordinator/role.md +179 -167
- package/.codex/skills/team-perf-opt/roles/optimizer/role.md +97 -97
- package/.codex/skills/team-perf-opt/roles/profiler/role.md +73 -73
- package/.codex/skills/team-perf-opt/roles/reviewer/role.md +75 -75
- package/.codex/skills/team-perf-opt/roles/strategist/role.md +94 -94
- package/.codex/skills/team-perf-opt/specs/pipelines.md +65 -65
- package/.codex/skills/team-planex/SKILL.md +65 -3
- package/.codex/skills/team-planex/roles/coordinator/commands/analyze.md +52 -52
- package/.codex/skills/team-planex/roles/coordinator/commands/monitor.md +210 -164
- package/.codex/skills/team-planex/roles/coordinator/role.md +171 -159
- package/.codex/skills/team-planex/roles/executor/role.md +91 -91
- package/.codex/skills/team-planex/roles/planner/role.md +112 -112
- package/.codex/skills/team-planex/specs/pipelines.md +93 -93
- package/.codex/skills/team-quality-assurance/SKILL.md +60 -3
- package/.codex/skills/team-quality-assurance/roles/analyst/role.md +80 -80
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -72
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +108 -108
- package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +243 -209
- package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +176 -164
- package/.codex/skills/team-quality-assurance/roles/executor/role.md +66 -66
- package/.codex/skills/team-quality-assurance/roles/generator/role.md +68 -68
- package/.codex/skills/team-quality-assurance/roles/scout/role.md +67 -67
- package/.codex/skills/team-quality-assurance/roles/strategist/role.md +71 -71
- package/.codex/skills/team-quality-assurance/specs/pipelines.md +115 -115
- package/.codex/skills/team-review/SKILL.md +58 -3
- package/.codex/skills/team-review/roles/coordinator/commands/analyze.md +71 -71
- package/.codex/skills/team-review/roles/coordinator/commands/dispatch.md +90 -90
- package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +225 -185
- package/.codex/skills/team-review/roles/coordinator/role.md +175 -163
- package/.codex/skills/team-review/roles/fixer/role.md +76 -76
- package/.codex/skills/team-review/roles/reviewer/role.md +68 -68
- package/.codex/skills/team-review/roles/scanner/role.md +71 -71
- package/.codex/skills/team-review/specs/pipelines.md +102 -102
- package/.codex/skills/team-roadmap-dev/SKILL.md +55 -3
- package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/analyze.md +61 -61
- package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +502 -468
- package/.codex/skills/team-roadmap-dev/roles/coordinator/role.md +335 -322
- package/.codex/skills/team-roadmap-dev/roles/executor/role.md +71 -71
- package/.codex/skills/team-roadmap-dev/roles/planner/role.md +76 -76
- package/.codex/skills/team-roadmap-dev/roles/verifier/role.md +74 -74
- package/.codex/skills/team-roadmap-dev/specs/pipelines.md +93 -93
- package/.codex/skills/team-tech-debt/SKILL.md +56 -3
- package/.codex/skills/team-tech-debt/roles/assessor/role.md +69 -69
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -47
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +272 -231
- package/.codex/skills/team-tech-debt/roles/coordinator/role.md +172 -160
- package/.codex/skills/team-tech-debt/roles/executor/role.md +76 -76
- package/.codex/skills/team-tech-debt/roles/planner/role.md +69 -69
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +82 -82
- package/.codex/skills/team-tech-debt/roles/validator/role.md +75 -75
- package/.codex/skills/team-tech-debt/specs/pipelines.md +47 -47
- package/.codex/skills/team-testing/SKILL.md +72 -3
- package/.codex/skills/team-testing/roles/analyst/role.md +95 -95
- package/.codex/skills/team-testing/roles/coordinator/commands/analyze.md +70 -70
- package/.codex/skills/team-testing/roles/coordinator/commands/dispatch.md +106 -106
- package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +283 -242
- package/.codex/skills/team-testing/roles/coordinator/role.md +184 -172
- package/.codex/skills/team-testing/roles/executor/role.md +96 -96
- package/.codex/skills/team-testing/roles/generator/role.md +95 -95
- package/.codex/skills/team-testing/roles/strategist/role.md +83 -83
- package/.codex/skills/team-testing/specs/pipelines.md +101 -101
- package/.codex/skills/team-uidesign/SKILL.md +65 -3
- package/.codex/skills/team-uidesign/roles/coordinator/commands/analyze.md +59 -59
- package/.codex/skills/team-uidesign/roles/coordinator/commands/dispatch.md +156 -156
- package/.codex/skills/team-uidesign/roles/coordinator/commands/monitor.md +234 -194
- package/.codex/skills/team-uidesign/roles/coordinator/role.md +211 -199
- package/.codex/skills/team-uidesign/roles/designer/role.md +69 -69
- package/.codex/skills/team-uidesign/roles/implementer/role.md +72 -72
- package/.codex/skills/team-uidesign/roles/researcher/role.md +82 -82
- package/.codex/skills/team-uidesign/roles/reviewer/role.md +67 -67
- package/.codex/skills/team-uidesign/specs/pipelines.md +76 -76
- package/.codex/skills/team-ultra-analyze/SKILL.md +73 -3
- package/.codex/skills/team-ultra-analyze/roles/analyst/role.md +90 -90
- package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/analyze.md +73 -73
- package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +50 -9
- package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +255 -243
- package/.codex/skills/team-ultra-analyze/roles/discussant/role.md +104 -104
- package/.codex/skills/team-ultra-analyze/roles/explorer/role.md +74 -74
- package/.codex/skills/team-ultra-analyze/roles/synthesizer/role.md +78 -78
- package/.codex/skills/team-ultra-analyze/specs/pipelines.md +64 -64
- package/.codex/skills/team-ux-improve/SKILL.md +64 -3
- package/.codex/skills/team-ux-improve/roles/coordinator/commands/analyze.md +62 -62
- package/.codex/skills/team-ux-improve/roles/coordinator/commands/dispatch.md +233 -233
- package/.codex/skills/team-ux-improve/roles/coordinator/commands/monitor.md +195 -160
- package/.codex/skills/team-ux-improve/roles/coordinator/role.md +170 -158
- package/.codex/skills/team-ux-improve/roles/designer/role.md +122 -122
- package/.codex/skills/team-ux-improve/roles/diagnoser/role.md +93 -93
- package/.codex/skills/team-ux-improve/roles/explorer/role.md +77 -77
- package/.codex/skills/team-ux-improve/roles/implementer/role.md +102 -102
- package/.codex/skills/team-ux-improve/roles/scanner/role.md +93 -93
- package/.codex/skills/team-ux-improve/roles/tester/role.md +84 -84
- package/.codex/skills/team-ux-improve/specs/pipelines.md +54 -54
- package/.codex/skills/workflow-test-fix-cycle/SKILL.md +402 -402
- package/README.md +1 -0
- package/package.json +1 -1
- package/.claude/skills/team-iterdev/SKILL.md +0 -127
- package/.claude/skills/team-iterdev/roles/architect/role.md +0 -65
- package/.claude/skills/team-iterdev/roles/coordinator/commands/analyze.md +0 -62
- package/.claude/skills/team-iterdev/roles/coordinator/commands/dispatch.md +0 -234
- package/.claude/skills/team-iterdev/roles/coordinator/commands/monitor.md +0 -182
- package/.claude/skills/team-iterdev/roles/coordinator/role.md +0 -153
- package/.claude/skills/team-iterdev/roles/developer/role.md +0 -74
- package/.claude/skills/team-iterdev/roles/reviewer/role.md +0 -66
- package/.claude/skills/team-iterdev/roles/tester/role.md +0 -88
- package/.claude/skills/team-iterdev/specs/pipelines.md +0 -94
- package/.claude/skills/team-iterdev/specs/team-config.json +0 -172
- package/.codex/skills/team-iterdev/SKILL.md +0 -158
- package/.codex/skills/team-iterdev/roles/architect/role.md +0 -65
- package/.codex/skills/team-iterdev/roles/coordinator/commands/analyze.md +0 -62
- package/.codex/skills/team-iterdev/roles/coordinator/commands/dispatch.md +0 -187
- package/.codex/skills/team-iterdev/roles/coordinator/commands/monitor.md +0 -186
- package/.codex/skills/team-iterdev/roles/coordinator/role.md +0 -181
- package/.codex/skills/team-iterdev/roles/developer/role.md +0 -74
- package/.codex/skills/team-iterdev/roles/reviewer/role.md +0 -66
- package/.codex/skills/team-iterdev/roles/tester/role.md +0 -88
- package/.codex/skills/team-iterdev/specs/pipelines.md +0 -94
- package/.codex/skills/team-iterdev/specs/team-config.json +0 -172
|
@@ -1,361 +1,361 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: issue-discover
|
|
3
|
-
description: Unified issue discovery and creation. Create issues from GitHub/text, discover issues via multi-perspective analysis, or prompt-driven iterative exploration. Triggers on "issue:new", "issue:discover", "issue:discover-by-prompt", "create issue", "discover issues", "find issues".
|
|
4
|
-
allowed-tools: spawn_agent, wait, send_input, close_agent, request_user_input, Read, Write, Edit, Bash, Glob, Grep, mcp__ace-tool__search_context, mcp__exa__search
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Issue Discover
|
|
8
|
-
|
|
9
|
-
Unified issue discovery and creation skill covering three entry points: manual issue creation, perspective-based discovery, and prompt-driven exploration.
|
|
10
|
-
|
|
11
|
-
## Architecture Overview
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
15
|
-
│ Issue Discover Orchestrator (SKILL.md) │
|
|
16
|
-
│ → Action selection → Route to phase → Execute → Summary │
|
|
17
|
-
└───────────────┬─────────────────────────────────────────────────┘
|
|
18
|
-
│
|
|
19
|
-
├─ request_user_input: Select action
|
|
20
|
-
│
|
|
21
|
-
┌───────────┼───────────┬───────────┐
|
|
22
|
-
↓ ↓ ↓ │
|
|
23
|
-
┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
24
|
-
│ Phase 1 │ │ Phase 2 │ │ Phase 3 │ │
|
|
25
|
-
│ Create │ │Discover │ │Discover │ │
|
|
26
|
-
│ New │ │ Multi │ │by Prompt│ │
|
|
27
|
-
└─────────┘ └─────────┘ └─────────┘ │
|
|
28
|
-
↓ ↓ ↓ │
|
|
29
|
-
Issue Discoveries Discoveries │
|
|
30
|
-
(registered) (export) (export) │
|
|
31
|
-
│ │ │ │
|
|
32
|
-
│ ├───────────┤ │
|
|
33
|
-
│ ↓ │
|
|
34
|
-
│ ┌───────────┐ │
|
|
35
|
-
│ │ Phase 4 │ │
|
|
36
|
-
│ │Quick Plan │ │
|
|
37
|
-
│ │& Execute │ │
|
|
38
|
-
│ └─────┬─────┘ │
|
|
39
|
-
│ ↓ │
|
|
40
|
-
│ .task/*.json │
|
|
41
|
-
│ ↓ │
|
|
42
|
-
│ Direct Execution │
|
|
43
|
-
│ │ │
|
|
44
|
-
└───────────┴──────────────────────┘
|
|
45
|
-
↓ (fallback/remaining)
|
|
46
|
-
issue-resolve (plan/queue)
|
|
47
|
-
↓
|
|
48
|
-
/issue:execute
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Key Design Principles
|
|
52
|
-
|
|
53
|
-
1. **Action-Driven Routing**: request_user_input selects action, then load single phase
|
|
54
|
-
2. **Progressive Phase Loading**: Only read the selected phase document
|
|
55
|
-
3. **CLI-First Data Access**: All issue CRUD via `ccw issue` CLI commands
|
|
56
|
-
4. **Auto Mode Support**: `-y` flag skips action selection with auto-detection
|
|
57
|
-
5. **Subagent Lifecycle**: Explicit lifecycle management with spawn_agent → wait → close_agent
|
|
58
|
-
6. **Role Path Loading**: Subagent roles loaded via path reference in MANDATORY FIRST STEPS
|
|
59
|
-
|
|
60
|
-
## Auto Mode
|
|
61
|
-
|
|
62
|
-
When `--yes` or `-y`: Skip action selection, auto-detect action from input type.
|
|
63
|
-
|
|
64
|
-
## Usage
|
|
65
|
-
|
|
66
|
-
```
|
|
67
|
-
issue-discover <input>
|
|
68
|
-
issue-discover [FLAGS] "<input>"
|
|
69
|
-
|
|
70
|
-
# Flags
|
|
71
|
-
-y, --yes Skip all confirmations (auto mode)
|
|
72
|
-
--action <type> Pre-select action: new|discover|discover-by-prompt
|
|
73
|
-
|
|
74
|
-
# Phase-specific flags
|
|
75
|
-
--priority <1-5> Issue priority (new mode)
|
|
76
|
-
--perspectives <list> Comma-separated perspectives (discover mode)
|
|
77
|
-
--external Enable Exa research (discover mode)
|
|
78
|
-
--scope <pattern> File scope (discover/discover-by-prompt mode)
|
|
79
|
-
--depth <level> standard|deep (discover-by-prompt mode)
|
|
80
|
-
--max-iterations <n> Max exploration iterations (discover-by-prompt mode)
|
|
81
|
-
|
|
82
|
-
# Examples
|
|
83
|
-
issue-discover https://github.com/org/repo/issues/42 # Create from GitHub
|
|
84
|
-
issue-discover "Login fails with special chars" # Create from text
|
|
85
|
-
issue-discover --action discover src/auth/** # Multi-perspective discovery
|
|
86
|
-
issue-discover --action discover src/api/** --perspectives=security,bug # Focused discovery
|
|
87
|
-
issue-discover --action discover-by-prompt "Check API contracts" # Prompt-driven discovery
|
|
88
|
-
issue-discover -y "auth broken" # Auto mode create
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Execution Flow
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
Input Parsing:
|
|
95
|
-
└─ Parse flags (--action, -y, --perspectives, etc.) and positional args
|
|
96
|
-
|
|
97
|
-
Action Selection:
|
|
98
|
-
├─ --action flag provided → Route directly
|
|
99
|
-
├─ Auto-detect from input:
|
|
100
|
-
│ ├─ GitHub URL or #number → Create New (Phase 1)
|
|
101
|
-
│ ├─ Path pattern (src/**, *.ts) → Discover (Phase 2)
|
|
102
|
-
│ ├─ Short text (< 80 chars) → Create New (Phase 1)
|
|
103
|
-
│ └─ Long descriptive text (≥ 80 chars) → Discover by Prompt (Phase 3)
|
|
104
|
-
└─ Otherwise → request_user_input to select action
|
|
105
|
-
|
|
106
|
-
Phase Execution (load one phase):
|
|
107
|
-
├─ Phase 1: Create New → phases/01-issue-new.md
|
|
108
|
-
├─ Phase 2: Discover → phases/02-discover.md
|
|
109
|
-
└─ Phase 3: Discover by Prompt → phases/03-discover-by-prompt.md
|
|
110
|
-
|
|
111
|
-
Post-Phase:
|
|
112
|
-
└─ Summary + Next steps recommendation
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Phase Reference Documents
|
|
116
|
-
|
|
117
|
-
| Phase | Document | Load When | Purpose |
|
|
118
|
-
|-------|----------|-----------|---------|
|
|
119
|
-
| Phase 1 | [phases/01-issue-new.md](phases/01-issue-new.md) | Action = Create New | Create issue from GitHub URL or text description |
|
|
120
|
-
| Phase 2 | [phases/02-discover.md](phases/02-discover.md) | Action = Discover | Multi-perspective issue discovery (bug, security, test, etc.) |
|
|
121
|
-
| Phase 3 | [phases/03-discover-by-prompt.md](phases/03-discover-by-prompt.md) | Action = Discover by Prompt | Prompt-driven iterative exploration with Gemini planning |
|
|
122
|
-
| Phase 4 | [phases/04-quick-execute.md](phases/04-quick-execute.md) | Post-Phase = Quick Plan & Execute | Convert high-confidence findings to tasks and execute directly |
|
|
123
|
-
|
|
124
|
-
## Core Rules
|
|
125
|
-
|
|
126
|
-
1. **Action Selection First**: Always determine action before loading any phase
|
|
127
|
-
2. **Single Phase Load**: Only read the selected phase document, never load all phases
|
|
128
|
-
3. **CLI Data Access**: Use `ccw issue` CLI for all issue operations, NEVER read files directly
|
|
129
|
-
4. **Content Preservation**: Each phase contains complete execution logic from original commands
|
|
130
|
-
5. **Auto-Detect Input**: Smart input parsing reduces need for explicit --action flag
|
|
131
|
-
6. **⚠️ CRITICAL: DO NOT STOP**: Continuous multi-phase workflow. After completing each phase, immediately proceed to next
|
|
132
|
-
7. **Progressive Phase Loading**: Read phase docs ONLY when that phase is about to execute
|
|
133
|
-
8. **Explicit Lifecycle**: Always close_agent after wait completes to free resources
|
|
134
|
-
|
|
135
|
-
## Input Processing
|
|
136
|
-
|
|
137
|
-
### Auto-Detection Logic
|
|
138
|
-
|
|
139
|
-
```javascript
|
|
140
|
-
function detectAction(input, flags) {
|
|
141
|
-
// 1. Explicit --action flag
|
|
142
|
-
if (flags.action) return flags.action;
|
|
143
|
-
|
|
144
|
-
const trimmed = input.trim();
|
|
145
|
-
|
|
146
|
-
// 2. GitHub URL → new
|
|
147
|
-
if (trimmed.match(/github\.com\/[\w-]+\/[\w-]+\/issues\/\d+/) || trimmed.match(/^#\d+$/)) {
|
|
148
|
-
return 'new';
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// 3. Path pattern (contains **, /, or --perspectives) → discover
|
|
152
|
-
if (trimmed.match(/\*\*/) || trimmed.match(/^src\//) || flags.perspectives) {
|
|
153
|
-
return 'discover';
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// 4. Short text (< 80 chars, no special patterns) → new
|
|
157
|
-
if (trimmed.length > 0 && trimmed.length < 80 && !trimmed.includes('--')) {
|
|
158
|
-
return 'new';
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// 5. Long descriptive text → discover-by-prompt
|
|
162
|
-
if (trimmed.length >= 80) {
|
|
163
|
-
return 'discover-by-prompt';
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// Cannot auto-detect → ask user
|
|
167
|
-
return null;
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### Action Selection (request_user_input)
|
|
172
|
-
|
|
173
|
-
```javascript
|
|
174
|
-
// When action cannot be auto-detected
|
|
175
|
-
const answer = request_user_input({
|
|
176
|
-
questions: [{
|
|
177
|
-
header: "Action",
|
|
178
|
-
id: "action",
|
|
179
|
-
question: "What would you like to do?",
|
|
180
|
-
options: [
|
|
181
|
-
{
|
|
182
|
-
label: "Create New Issue (Recommended)",
|
|
183
|
-
description: "Create issue from GitHub URL, text description, or structured input"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
label: "Discover Issues",
|
|
187
|
-
description: "Multi-perspective discovery: bug, security, test, quality, performance, etc."
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
label: "Discover by Prompt",
|
|
191
|
-
description: "Describe what to find — Gemini plans the exploration strategy iteratively"
|
|
192
|
-
}
|
|
193
|
-
]
|
|
194
|
-
}]
|
|
195
|
-
}); // BLOCKS (wait for user response)
|
|
196
|
-
|
|
197
|
-
// Route based on selection
|
|
198
|
-
// answer.answers.action.answers[0] → selected label
|
|
199
|
-
const actionMap = {
|
|
200
|
-
"Create New Issue (Recommended)": "new",
|
|
201
|
-
"Discover Issues": "discover",
|
|
202
|
-
"Discover by Prompt": "discover-by-prompt"
|
|
203
|
-
};
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
## Data Flow
|
|
207
|
-
|
|
208
|
-
```
|
|
209
|
-
User Input (URL / text / path pattern / descriptive prompt)
|
|
210
|
-
↓
|
|
211
|
-
[Parse Flags + Auto-Detect Action]
|
|
212
|
-
↓
|
|
213
|
-
[Action Selection] ← request_user_input (if needed)
|
|
214
|
-
↓
|
|
215
|
-
[Read Selected Phase Document]
|
|
216
|
-
↓
|
|
217
|
-
[Execute Phase Logic]
|
|
218
|
-
↓
|
|
219
|
-
[Summary + Next Steps]
|
|
220
|
-
├─ After Create → Suggest issue-resolve (plan solution)
|
|
221
|
-
└─ After Discover → Suggest export to issues, then issue-resolve
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
## Subagent API Reference
|
|
225
|
-
|
|
226
|
-
### spawn_agent
|
|
227
|
-
|
|
228
|
-
Create a new subagent with task assignment.
|
|
229
|
-
|
|
230
|
-
```javascript
|
|
231
|
-
const agentId = spawn_agent({
|
|
232
|
-
agent_type: "{agent_type}",
|
|
233
|
-
message: `
|
|
234
|
-
## TASK ASSIGNMENT
|
|
235
|
-
|
|
236
|
-
### MANDATORY FIRST STEPS (Agent Execute)
|
|
237
|
-
1. Execute: ccw spec load --category exploration
|
|
238
|
-
2. Execute: ccw spec load --category debug (known issues cross-reference)
|
|
239
|
-
|
|
240
|
-
## TASK CONTEXT
|
|
241
|
-
${taskContext}
|
|
242
|
-
|
|
243
|
-
## DELIVERABLES
|
|
244
|
-
${deliverables}
|
|
245
|
-
`
|
|
246
|
-
})
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### wait
|
|
250
|
-
|
|
251
|
-
Get results from subagent (only way to retrieve results).
|
|
252
|
-
|
|
253
|
-
```javascript
|
|
254
|
-
const result = wait({
|
|
255
|
-
ids: [agentId],
|
|
256
|
-
timeout_ms: 600000 // 10 minutes
|
|
257
|
-
})
|
|
258
|
-
|
|
259
|
-
if (result.timed_out) {
|
|
260
|
-
// Handle timeout - can continue waiting or send_input to prompt completion
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// Check completion status
|
|
264
|
-
if (result.status[agentId].completed) {
|
|
265
|
-
const output = result.status[agentId].completed;
|
|
266
|
-
}
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
### send_input
|
|
270
|
-
|
|
271
|
-
Continue interaction with active subagent (for clarification or follow-up).
|
|
272
|
-
|
|
273
|
-
```javascript
|
|
274
|
-
send_input({
|
|
275
|
-
id: agentId,
|
|
276
|
-
message: `
|
|
277
|
-
## CLARIFICATION ANSWERS
|
|
278
|
-
${answers}
|
|
279
|
-
|
|
280
|
-
## NEXT STEP
|
|
281
|
-
Continue with plan generation.
|
|
282
|
-
`
|
|
283
|
-
})
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### close_agent
|
|
287
|
-
|
|
288
|
-
Clean up subagent resources (irreversible).
|
|
289
|
-
|
|
290
|
-
```javascript
|
|
291
|
-
close_agent({ id: agentId })
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
## Core Guidelines
|
|
295
|
-
|
|
296
|
-
**Data Access Principle**: Issues files can grow very large. To avoid context overflow:
|
|
297
|
-
|
|
298
|
-
| Operation | Correct | Incorrect |
|
|
299
|
-
|-----------|---------|-----------|
|
|
300
|
-
| List issues (brief) | `ccw issue list --status pending --brief` | `Read('issues.jsonl')` |
|
|
301
|
-
| Read issue details | `ccw issue status <id> --json` | `Read('issues.jsonl')` |
|
|
302
|
-
| Create issue | `echo '...' \| ccw issue create` | Direct file write |
|
|
303
|
-
| Update status | `ccw issue update <id> --status ...` | Direct file edit |
|
|
304
|
-
|
|
305
|
-
**ALWAYS** use CLI commands for CRUD operations. **NEVER** read entire `issues.jsonl` directly.
|
|
306
|
-
|
|
307
|
-
## Error Handling
|
|
308
|
-
|
|
309
|
-
| Error | Resolution |
|
|
310
|
-
|-------|------------|
|
|
311
|
-
| No action detected | Show request_user_input with all 3 options |
|
|
312
|
-
| Invalid action type | Show available actions, re-prompt |
|
|
313
|
-
| Phase execution fails | Report error, suggest manual intervention |
|
|
314
|
-
| No files matched (discover) | Check target pattern, verify path exists |
|
|
315
|
-
| Gemini planning failed (discover-by-prompt) | Retry with qwen fallback |
|
|
316
|
-
| Agent lifecycle errors | Ensure close_agent in error paths to prevent resource leaks |
|
|
317
|
-
|
|
318
|
-
## Post-Phase Next Steps
|
|
319
|
-
|
|
320
|
-
After successful phase execution, recommend next action:
|
|
321
|
-
|
|
322
|
-
```javascript
|
|
323
|
-
// After Create New (issue created)
|
|
324
|
-
request_user_input({
|
|
325
|
-
questions: [{
|
|
326
|
-
header: "Next Step",
|
|
327
|
-
id: "next_after_create",
|
|
328
|
-
question: "Issue created. What next?",
|
|
329
|
-
options: [
|
|
330
|
-
{ label: "Plan Solution (Recommended)", description: "Generate solution via issue-resolve" },
|
|
331
|
-
{ label: "Create Another", description: "Create more issues" },
|
|
332
|
-
{ label: "Done", description: "Exit workflow" }
|
|
333
|
-
]
|
|
334
|
-
}]
|
|
335
|
-
}); // BLOCKS (wait for user response)
|
|
336
|
-
// answer.answers.next_after_create.answers[0] → selected label
|
|
337
|
-
|
|
338
|
-
// After Discover / Discover by Prompt (discoveries generated)
|
|
339
|
-
request_user_input({
|
|
340
|
-
questions: [{
|
|
341
|
-
header: "Next Step",
|
|
342
|
-
id: "next_after_discover",
|
|
343
|
-
question: `Discovery complete: ${findings.length} findings, ${executableFindings.length} executable. What next?`,
|
|
344
|
-
options: [
|
|
345
|
-
{ label: "Quick Plan & Execute (Recommended)", description: `Fix ${executableFindings.length} high-confidence findings directly` },
|
|
346
|
-
{ label: "Export to Issues", description: "Convert discoveries to issues" },
|
|
347
|
-
{ label: "Done", description: "Exit workflow" }
|
|
348
|
-
]
|
|
349
|
-
}]
|
|
350
|
-
}); // BLOCKS (wait for user response)
|
|
351
|
-
// answer.answers.next_after_discover.answers[0] → selected label
|
|
352
|
-
// If "Quick Plan & Execute (Recommended)" → Read phases/04-quick-execute.md, execute
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
## Related Skills & Commands
|
|
356
|
-
|
|
357
|
-
- `issue-resolve` - Plan solutions, convert artifacts, form queues, from brainstorm
|
|
358
|
-
- `issue-manage` - Interactive issue CRUD operations
|
|
359
|
-
- `/issue:execute` - Execute queue with DAG-based parallel orchestration
|
|
360
|
-
- `ccw issue list` - List all issues
|
|
361
|
-
- `ccw issue status <id>` - View issue details
|
|
1
|
+
---
|
|
2
|
+
name: issue-discover
|
|
3
|
+
description: "Unified issue discovery and creation. Create issues from GitHub/text, discover issues via multi-perspective analysis, or prompt-driven iterative exploration. Triggers on \"issue:new\", \"issue:discover\", \"issue:discover-by-prompt\", \"create issue\", \"discover issues\", \"find issues\"."
|
|
4
|
+
allowed-tools: spawn_agent, wait, send_input, close_agent, request_user_input, Read, Write, Edit, Bash, Glob, Grep, mcp__ace-tool__search_context, mcp__exa__search
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Issue Discover
|
|
8
|
+
|
|
9
|
+
Unified issue discovery and creation skill covering three entry points: manual issue creation, perspective-based discovery, and prompt-driven exploration.
|
|
10
|
+
|
|
11
|
+
## Architecture Overview
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
15
|
+
│ Issue Discover Orchestrator (SKILL.md) │
|
|
16
|
+
│ → Action selection → Route to phase → Execute → Summary │
|
|
17
|
+
└───────────────┬─────────────────────────────────────────────────┘
|
|
18
|
+
│
|
|
19
|
+
├─ request_user_input: Select action
|
|
20
|
+
│
|
|
21
|
+
┌───────────┼───────────┬───────────┐
|
|
22
|
+
↓ ↓ ↓ │
|
|
23
|
+
┌─────────┐ ┌─────────┐ ┌─────────┐ │
|
|
24
|
+
│ Phase 1 │ │ Phase 2 │ │ Phase 3 │ │
|
|
25
|
+
│ Create │ │Discover │ │Discover │ │
|
|
26
|
+
│ New │ │ Multi │ │by Prompt│ │
|
|
27
|
+
└─────────┘ └─────────┘ └─────────┘ │
|
|
28
|
+
↓ ↓ ↓ │
|
|
29
|
+
Issue Discoveries Discoveries │
|
|
30
|
+
(registered) (export) (export) │
|
|
31
|
+
│ │ │ │
|
|
32
|
+
│ ├───────────┤ │
|
|
33
|
+
│ ↓ │
|
|
34
|
+
│ ┌───────────┐ │
|
|
35
|
+
│ │ Phase 4 │ │
|
|
36
|
+
│ │Quick Plan │ │
|
|
37
|
+
│ │& Execute │ │
|
|
38
|
+
│ └─────┬─────┘ │
|
|
39
|
+
│ ↓ │
|
|
40
|
+
│ .task/*.json │
|
|
41
|
+
│ ↓ │
|
|
42
|
+
│ Direct Execution │
|
|
43
|
+
│ │ │
|
|
44
|
+
└───────────┴──────────────────────┘
|
|
45
|
+
↓ (fallback/remaining)
|
|
46
|
+
issue-resolve (plan/queue)
|
|
47
|
+
↓
|
|
48
|
+
/issue:execute
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Key Design Principles
|
|
52
|
+
|
|
53
|
+
1. **Action-Driven Routing**: request_user_input selects action, then load single phase
|
|
54
|
+
2. **Progressive Phase Loading**: Only read the selected phase document
|
|
55
|
+
3. **CLI-First Data Access**: All issue CRUD via `ccw issue` CLI commands
|
|
56
|
+
4. **Auto Mode Support**: `-y` flag skips action selection with auto-detection
|
|
57
|
+
5. **Subagent Lifecycle**: Explicit lifecycle management with spawn_agent → wait → close_agent
|
|
58
|
+
6. **Role Path Loading**: Subagent roles loaded via path reference in MANDATORY FIRST STEPS
|
|
59
|
+
|
|
60
|
+
## Auto Mode
|
|
61
|
+
|
|
62
|
+
When `--yes` or `-y`: Skip action selection, auto-detect action from input type.
|
|
63
|
+
|
|
64
|
+
## Usage
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
issue-discover <input>
|
|
68
|
+
issue-discover [FLAGS] "<input>"
|
|
69
|
+
|
|
70
|
+
# Flags
|
|
71
|
+
-y, --yes Skip all confirmations (auto mode)
|
|
72
|
+
--action <type> Pre-select action: new|discover|discover-by-prompt
|
|
73
|
+
|
|
74
|
+
# Phase-specific flags
|
|
75
|
+
--priority <1-5> Issue priority (new mode)
|
|
76
|
+
--perspectives <list> Comma-separated perspectives (discover mode)
|
|
77
|
+
--external Enable Exa research (discover mode)
|
|
78
|
+
--scope <pattern> File scope (discover/discover-by-prompt mode)
|
|
79
|
+
--depth <level> standard|deep (discover-by-prompt mode)
|
|
80
|
+
--max-iterations <n> Max exploration iterations (discover-by-prompt mode)
|
|
81
|
+
|
|
82
|
+
# Examples
|
|
83
|
+
issue-discover https://github.com/org/repo/issues/42 # Create from GitHub
|
|
84
|
+
issue-discover "Login fails with special chars" # Create from text
|
|
85
|
+
issue-discover --action discover src/auth/** # Multi-perspective discovery
|
|
86
|
+
issue-discover --action discover src/api/** --perspectives=security,bug # Focused discovery
|
|
87
|
+
issue-discover --action discover-by-prompt "Check API contracts" # Prompt-driven discovery
|
|
88
|
+
issue-discover -y "auth broken" # Auto mode create
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Execution Flow
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Input Parsing:
|
|
95
|
+
└─ Parse flags (--action, -y, --perspectives, etc.) and positional args
|
|
96
|
+
|
|
97
|
+
Action Selection:
|
|
98
|
+
├─ --action flag provided → Route directly
|
|
99
|
+
├─ Auto-detect from input:
|
|
100
|
+
│ ├─ GitHub URL or #number → Create New (Phase 1)
|
|
101
|
+
│ ├─ Path pattern (src/**, *.ts) → Discover (Phase 2)
|
|
102
|
+
│ ├─ Short text (< 80 chars) → Create New (Phase 1)
|
|
103
|
+
│ └─ Long descriptive text (≥ 80 chars) → Discover by Prompt (Phase 3)
|
|
104
|
+
└─ Otherwise → request_user_input to select action
|
|
105
|
+
|
|
106
|
+
Phase Execution (load one phase):
|
|
107
|
+
├─ Phase 1: Create New → phases/01-issue-new.md
|
|
108
|
+
├─ Phase 2: Discover → phases/02-discover.md
|
|
109
|
+
└─ Phase 3: Discover by Prompt → phases/03-discover-by-prompt.md
|
|
110
|
+
|
|
111
|
+
Post-Phase:
|
|
112
|
+
└─ Summary + Next steps recommendation
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Phase Reference Documents
|
|
116
|
+
|
|
117
|
+
| Phase | Document | Load When | Purpose |
|
|
118
|
+
|-------|----------|-----------|---------|
|
|
119
|
+
| Phase 1 | [phases/01-issue-new.md](phases/01-issue-new.md) | Action = Create New | Create issue from GitHub URL or text description |
|
|
120
|
+
| Phase 2 | [phases/02-discover.md](phases/02-discover.md) | Action = Discover | Multi-perspective issue discovery (bug, security, test, etc.) |
|
|
121
|
+
| Phase 3 | [phases/03-discover-by-prompt.md](phases/03-discover-by-prompt.md) | Action = Discover by Prompt | Prompt-driven iterative exploration with Gemini planning |
|
|
122
|
+
| Phase 4 | [phases/04-quick-execute.md](phases/04-quick-execute.md) | Post-Phase = Quick Plan & Execute | Convert high-confidence findings to tasks and execute directly |
|
|
123
|
+
|
|
124
|
+
## Core Rules
|
|
125
|
+
|
|
126
|
+
1. **Action Selection First**: Always determine action before loading any phase
|
|
127
|
+
2. **Single Phase Load**: Only read the selected phase document, never load all phases
|
|
128
|
+
3. **CLI Data Access**: Use `ccw issue` CLI for all issue operations, NEVER read files directly
|
|
129
|
+
4. **Content Preservation**: Each phase contains complete execution logic from original commands
|
|
130
|
+
5. **Auto-Detect Input**: Smart input parsing reduces need for explicit --action flag
|
|
131
|
+
6. **⚠️ CRITICAL: DO NOT STOP**: Continuous multi-phase workflow. After completing each phase, immediately proceed to next
|
|
132
|
+
7. **Progressive Phase Loading**: Read phase docs ONLY when that phase is about to execute
|
|
133
|
+
8. **Explicit Lifecycle**: Always close_agent after wait completes to free resources
|
|
134
|
+
|
|
135
|
+
## Input Processing
|
|
136
|
+
|
|
137
|
+
### Auto-Detection Logic
|
|
138
|
+
|
|
139
|
+
```javascript
|
|
140
|
+
function detectAction(input, flags) {
|
|
141
|
+
// 1. Explicit --action flag
|
|
142
|
+
if (flags.action) return flags.action;
|
|
143
|
+
|
|
144
|
+
const trimmed = input.trim();
|
|
145
|
+
|
|
146
|
+
// 2. GitHub URL → new
|
|
147
|
+
if (trimmed.match(/github\.com\/[\w-]+\/[\w-]+\/issues\/\d+/) || trimmed.match(/^#\d+$/)) {
|
|
148
|
+
return 'new';
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// 3. Path pattern (contains **, /, or --perspectives) → discover
|
|
152
|
+
if (trimmed.match(/\*\*/) || trimmed.match(/^src\//) || flags.perspectives) {
|
|
153
|
+
return 'discover';
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// 4. Short text (< 80 chars, no special patterns) → new
|
|
157
|
+
if (trimmed.length > 0 && trimmed.length < 80 && !trimmed.includes('--')) {
|
|
158
|
+
return 'new';
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// 5. Long descriptive text → discover-by-prompt
|
|
162
|
+
if (trimmed.length >= 80) {
|
|
163
|
+
return 'discover-by-prompt';
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Cannot auto-detect → ask user
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Action Selection (request_user_input)
|
|
172
|
+
|
|
173
|
+
```javascript
|
|
174
|
+
// When action cannot be auto-detected
|
|
175
|
+
const answer = request_user_input({
|
|
176
|
+
questions: [{
|
|
177
|
+
header: "Action",
|
|
178
|
+
id: "action",
|
|
179
|
+
question: "What would you like to do?",
|
|
180
|
+
options: [
|
|
181
|
+
{
|
|
182
|
+
label: "Create New Issue (Recommended)",
|
|
183
|
+
description: "Create issue from GitHub URL, text description, or structured input"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
label: "Discover Issues",
|
|
187
|
+
description: "Multi-perspective discovery: bug, security, test, quality, performance, etc."
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
label: "Discover by Prompt",
|
|
191
|
+
description: "Describe what to find — Gemini plans the exploration strategy iteratively"
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}]
|
|
195
|
+
}); // BLOCKS (wait for user response)
|
|
196
|
+
|
|
197
|
+
// Route based on selection
|
|
198
|
+
// answer.answers.action.answers[0] → selected label
|
|
199
|
+
const actionMap = {
|
|
200
|
+
"Create New Issue (Recommended)": "new",
|
|
201
|
+
"Discover Issues": "discover",
|
|
202
|
+
"Discover by Prompt": "discover-by-prompt"
|
|
203
|
+
};
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Data Flow
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
User Input (URL / text / path pattern / descriptive prompt)
|
|
210
|
+
↓
|
|
211
|
+
[Parse Flags + Auto-Detect Action]
|
|
212
|
+
↓
|
|
213
|
+
[Action Selection] ← request_user_input (if needed)
|
|
214
|
+
↓
|
|
215
|
+
[Read Selected Phase Document]
|
|
216
|
+
↓
|
|
217
|
+
[Execute Phase Logic]
|
|
218
|
+
↓
|
|
219
|
+
[Summary + Next Steps]
|
|
220
|
+
├─ After Create → Suggest issue-resolve (plan solution)
|
|
221
|
+
└─ After Discover → Suggest export to issues, then issue-resolve
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Subagent API Reference
|
|
225
|
+
|
|
226
|
+
### spawn_agent
|
|
227
|
+
|
|
228
|
+
Create a new subagent with task assignment.
|
|
229
|
+
|
|
230
|
+
```javascript
|
|
231
|
+
const agentId = spawn_agent({
|
|
232
|
+
agent_type: "{agent_type}",
|
|
233
|
+
message: `
|
|
234
|
+
## TASK ASSIGNMENT
|
|
235
|
+
|
|
236
|
+
### MANDATORY FIRST STEPS (Agent Execute)
|
|
237
|
+
1. Execute: ccw spec load --category exploration
|
|
238
|
+
2. Execute: ccw spec load --category debug (known issues cross-reference)
|
|
239
|
+
|
|
240
|
+
## TASK CONTEXT
|
|
241
|
+
${taskContext}
|
|
242
|
+
|
|
243
|
+
## DELIVERABLES
|
|
244
|
+
${deliverables}
|
|
245
|
+
`
|
|
246
|
+
})
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### wait
|
|
250
|
+
|
|
251
|
+
Get results from subagent (only way to retrieve results).
|
|
252
|
+
|
|
253
|
+
```javascript
|
|
254
|
+
const result = wait({
|
|
255
|
+
ids: [agentId],
|
|
256
|
+
timeout_ms: 600000 // 10 minutes
|
|
257
|
+
})
|
|
258
|
+
|
|
259
|
+
if (result.timed_out) {
|
|
260
|
+
// Handle timeout - can continue waiting or send_input to prompt completion
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// Check completion status
|
|
264
|
+
if (result.status[agentId].completed) {
|
|
265
|
+
const output = result.status[agentId].completed;
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### send_input
|
|
270
|
+
|
|
271
|
+
Continue interaction with active subagent (for clarification or follow-up).
|
|
272
|
+
|
|
273
|
+
```javascript
|
|
274
|
+
send_input({
|
|
275
|
+
id: agentId,
|
|
276
|
+
message: `
|
|
277
|
+
## CLARIFICATION ANSWERS
|
|
278
|
+
${answers}
|
|
279
|
+
|
|
280
|
+
## NEXT STEP
|
|
281
|
+
Continue with plan generation.
|
|
282
|
+
`
|
|
283
|
+
})
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### close_agent
|
|
287
|
+
|
|
288
|
+
Clean up subagent resources (irreversible).
|
|
289
|
+
|
|
290
|
+
```javascript
|
|
291
|
+
close_agent({ id: agentId })
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
## Core Guidelines
|
|
295
|
+
|
|
296
|
+
**Data Access Principle**: Issues files can grow very large. To avoid context overflow:
|
|
297
|
+
|
|
298
|
+
| Operation | Correct | Incorrect |
|
|
299
|
+
|-----------|---------|-----------|
|
|
300
|
+
| List issues (brief) | `ccw issue list --status pending --brief` | `Read('issues.jsonl')` |
|
|
301
|
+
| Read issue details | `ccw issue status <id> --json` | `Read('issues.jsonl')` |
|
|
302
|
+
| Create issue | `echo '...' \| ccw issue create` | Direct file write |
|
|
303
|
+
| Update status | `ccw issue update <id> --status ...` | Direct file edit |
|
|
304
|
+
|
|
305
|
+
**ALWAYS** use CLI commands for CRUD operations. **NEVER** read entire `issues.jsonl` directly.
|
|
306
|
+
|
|
307
|
+
## Error Handling
|
|
308
|
+
|
|
309
|
+
| Error | Resolution |
|
|
310
|
+
|-------|------------|
|
|
311
|
+
| No action detected | Show request_user_input with all 3 options |
|
|
312
|
+
| Invalid action type | Show available actions, re-prompt |
|
|
313
|
+
| Phase execution fails | Report error, suggest manual intervention |
|
|
314
|
+
| No files matched (discover) | Check target pattern, verify path exists |
|
|
315
|
+
| Gemini planning failed (discover-by-prompt) | Retry with qwen fallback |
|
|
316
|
+
| Agent lifecycle errors | Ensure close_agent in error paths to prevent resource leaks |
|
|
317
|
+
|
|
318
|
+
## Post-Phase Next Steps
|
|
319
|
+
|
|
320
|
+
After successful phase execution, recommend next action:
|
|
321
|
+
|
|
322
|
+
```javascript
|
|
323
|
+
// After Create New (issue created)
|
|
324
|
+
request_user_input({
|
|
325
|
+
questions: [{
|
|
326
|
+
header: "Next Step",
|
|
327
|
+
id: "next_after_create",
|
|
328
|
+
question: "Issue created. What next?",
|
|
329
|
+
options: [
|
|
330
|
+
{ label: "Plan Solution (Recommended)", description: "Generate solution via issue-resolve" },
|
|
331
|
+
{ label: "Create Another", description: "Create more issues" },
|
|
332
|
+
{ label: "Done", description: "Exit workflow" }
|
|
333
|
+
]
|
|
334
|
+
}]
|
|
335
|
+
}); // BLOCKS (wait for user response)
|
|
336
|
+
// answer.answers.next_after_create.answers[0] → selected label
|
|
337
|
+
|
|
338
|
+
// After Discover / Discover by Prompt (discoveries generated)
|
|
339
|
+
request_user_input({
|
|
340
|
+
questions: [{
|
|
341
|
+
header: "Next Step",
|
|
342
|
+
id: "next_after_discover",
|
|
343
|
+
question: `Discovery complete: ${findings.length} findings, ${executableFindings.length} executable. What next?`,
|
|
344
|
+
options: [
|
|
345
|
+
{ label: "Quick Plan & Execute (Recommended)", description: `Fix ${executableFindings.length} high-confidence findings directly` },
|
|
346
|
+
{ label: "Export to Issues", description: "Convert discoveries to issues" },
|
|
347
|
+
{ label: "Done", description: "Exit workflow" }
|
|
348
|
+
]
|
|
349
|
+
}]
|
|
350
|
+
}); // BLOCKS (wait for user response)
|
|
351
|
+
// answer.answers.next_after_discover.answers[0] → selected label
|
|
352
|
+
// If "Quick Plan & Execute (Recommended)" → Read phases/04-quick-execute.md, execute
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
## Related Skills & Commands
|
|
356
|
+
|
|
357
|
+
- `issue-resolve` - Plan solutions, convert artifacts, form queues, from brainstorm
|
|
358
|
+
- `issue-manage` - Interactive issue CRUD operations
|
|
359
|
+
- `/issue:execute` - Execute queue with DAG-based parallel orchestration
|
|
360
|
+
- `ccw issue list` - List all issues
|
|
361
|
+
- `ccw issue status <id>` - View issue details
|