feat: standardize request_user_input schema across all codex skills and add config reminder

- Update all 68 .codex/skills files to use correct request_user_input schema
  (header, id, question, options with label/description)
- Remove deprecated multiSelect, type, value, prompt fields
- Add mandatory confirmation gates to planning-only skills
- Add Codex config.toml reminder to ccw install CLI
- Add Codex configuration section to README.md and README_CN.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
catlog22
2026-03-24 15:19:18 +08:00
parent ccb5f1e615
commit fe7945eaa2
72 changed files with 1020 additions and 901 deletions

View File

@@ -213,26 +213,25 @@ For new sessions, gather user preferences (skipped in auto mode or continue mode
if (!autoYes && !continueMode) { if (!autoYes && !continueMode) {
// 1. Focus areas (multi-select) // 1. Focus areas (multi-select)
// Generate directions dynamically from detected dimensions (see Dimension-Direction Mapping) // Generate directions dynamically from detected dimensions (see Dimension-Direction Mapping)
const focusAreas = AskUserQuestion({ const focusAreas = request_user_input({
questions: [{ questions: [{
header: "聚焦领域",
id: "focus",
question: "Select analysis focus areas:", question: "Select analysis focus areas:",
header: "Focus",
multiSelect: true,
options: generateFocusOptions(dimensions) // Dynamic based on dimensions options: generateFocusOptions(dimensions) // Dynamic based on dimensions
}] }]
}) })
// 2. Analysis perspectives (multi-select, max 4) // 2. Analysis perspectives (multi-select, max 4)
const perspectives = AskUserQuestion({ const perspectives = request_user_input({
questions: [{ questions: [{
header: "分析视角",
id: "perspectives",
question: "Select analysis perspectives (single = focused, multi = broader coverage):", question: "Select analysis perspectives (single = focused, multi = broader coverage):",
header: "Perspectives",
multiSelect: true,
options: [ options: [
{ label: "Technical", description: "Implementation patterns, code structure, technical feasibility" }, { label: "Technical", description: "Implementation patterns, code structure, technical feasibility" },
{ label: "Architectural", description: "System design, scalability, component interactions" }, { label: "Architectural", description: "System design, scalability, component interactions" },
{ label: "Security", description: "Vulnerabilities, authentication, access control" }, { label: "Security", description: "Vulnerabilities, authentication, access control" }
{ label: "Performance", description: "Bottlenecks, optimization, resource utilization" }
] ]
}] }]
}) })
@@ -507,16 +506,14 @@ if (round >= 2) {
// Show key points, discussion points, open questions // Show key points, discussion points, open questions
if (!autoYes) { if (!autoYes) {
const feedback = AskUserQuestion({ const feedback = request_user_input({
questions: [{ questions: [{
header: "分析方向",
id: "direction",
question: `Analysis round ${round}: Feedback on current findings?`, question: `Analysis round ${round}: Feedback on current findings?`,
header: "Direction",
multiSelect: false,
options: [ options: [
{ label: "Deepen", description: "Analysis direction is correct, investigate deeper" }, { label: "Deepen(Recommended)", description: "Analysis direction is correct, investigate deeper" },
{ label: "Agree & Suggest", description: "Agree with direction, but have specific next step in mind" },
{ label: "Adjust Direction", description: "Different understanding or focus needed" }, { label: "Adjust Direction", description: "Different understanding or focus needed" },
{ label: "Specific Questions", description: "Have specific questions to ask" },
{ label: "Analysis Complete", description: "Sufficient information obtained, proceed to synthesis" } { label: "Analysis Complete", description: "Sufficient information obtained, proceed to synthesis" }
] ]
}] }]
@@ -540,7 +537,7 @@ if (!autoYes) {
// "analyze under extreme load scenarios", // "analyze under extreme load scenarios",
// "review from security audit perspective", // "review from security audit perspective",
// "explore simpler architectural alternatives" // "explore simpler architectural alternatives"
// AskUserQuestion with generated options (single-select) // request_user_input with generated options (single-select)
// Execute selected direction via inline search tools // Execute selected direction via inline search tools
// Merge new findings into explorations.json // Merge new findings into explorations.json
// Record: Which assumptions were confirmed, specific angles for deeper exploration // Record: Which assumptions were confirmed, specific angles for deeper exploration
@@ -549,12 +546,15 @@ if (!autoYes) {
**Agree & Suggest** — user provides specific next step: **Agree & Suggest** — user provides specific next step:
```javascript ```javascript
// Ask user for their specific direction (free text input) // Ask user for their specific direction (free text input)
const userSuggestion = AskUserQuestion({ const userSuggestion = request_user_input({
questions: [{ questions: [{
header: "你的方向",
id: "your_direction",
question: "请描述您希望下一步深入的方向:", question: "请描述您希望下一步深入的方向:",
header: "Your Direction", options: [
multiSelect: false, { label: "Code Details", description: "Deeper into implementation specifics" },
options: [/* user will select "Other" to type free text */] { label: "Architecture", description: "Broader structural analysis" }
]
}] }]
}) })
// Execute user's specific direction via inline search tools // Execute user's specific direction via inline search tools
@@ -564,11 +564,11 @@ const userSuggestion = AskUserQuestion({
**Adjust Direction** — new focus area: **Adjust Direction** — new focus area:
```javascript ```javascript
// Ask user for adjusted focus // Ask user for adjusted focus
const adjustedFocus = AskUserQuestion({ const adjustedFocus = request_user_input({
questions: [{ questions: [{
header: "新焦点",
id: "new_focus",
question: "What should the new analysis focus be?", question: "What should the new analysis focus be?",
header: "New Focus",
multiSelect: false,
options: [ options: [
{ label: "Code Details", description: "Deeper into implementation specifics" }, { label: "Code Details", description: "Deeper into implementation specifics" },
{ label: "Architecture", description: "Broader structural analysis" }, { label: "Architecture", description: "Broader structural analysis" },
@@ -586,7 +586,7 @@ const adjustedFocus = AskUserQuestion({
**Specific Questions** — answer directly: **Specific Questions** — answer directly:
```javascript ```javascript
// Capture user questions via AskUserQuestion (text input) // Capture user questions via request_user_input
// Answer each question based on codebase search and analysis // Answer each question based on codebase search and analysis
// Provide evidence and file references // Provide evidence and file references
// Rate confidence for each answer (high/medium/low) // Rate confidence for each answer (high/medium/low)
@@ -772,16 +772,15 @@ for (const [index, rec] of sortedRecs.entries()) {
// Display: action, rationale, priority, steps[] (numbered sub-steps with target + verification) // Display: action, rationale, priority, steps[] (numbered sub-steps with target + verification)
// 2. Gather user review // 2. Gather user review
const review = AskUserQuestion({ const review = request_user_input({
questions: [{ questions: [{
header: `建议#${index + 1}`,
id: `rec_${index + 1}`,
question: `Recommendation #${index + 1}: "${rec.action}" (${rec.priority} priority, ${rec.steps.length} steps). Your decision:`, question: `Recommendation #${index + 1}: "${rec.action}" (${rec.priority} priority, ${rec.steps.length} steps). Your decision:`,
header: `Rec #${index + 1}`,
multiSelect: false,
options: [ options: [
{ label: "Accept", description: "Accept this recommendation as-is" }, { label: "Accept(Recommended)", description: "Accept this recommendation as-is" },
{ label: "Modify", description: "Adjust scope, steps, or priority" }, { label: "Modify", description: "Adjust scope, steps, or priority" },
{ label: "Reject", description: "Remove this recommendation" }, { label: "Reject", description: "Remove this recommendation" }
{ label: "Accept All Remaining", description: "Skip review for remaining recommendations" }
] ]
}] }]
}) })
@@ -837,11 +836,11 @@ function assessComplexity(recs) {
```javascript ```javascript
if (!autoYes) { if (!autoYes) {
const options = buildOptionsForComplexity(complexity) const options = buildOptionsForComplexity(complexity)
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
header: "下一步",
id: "next_step",
question: `Analysis complete (${recs.length} recommendations, complexity: ${complexity}). Next step:`, question: `Analysis complete (${recs.length} recommendations, complexity: ${complexity}). Next step:`,
header: "Next Step",
multiSelect: false,
options: options options: options
}] }]
}) })

View File

@@ -796,16 +796,19 @@ Append conclusions section and finalize the thinking document.
Offer user follow-up actions based on brainstorming results. Offer user follow-up actions based on brainstorming results.
**Available Options**: **Available Options** (this skill is brainstorming-only — NEVER auto-launch other skills):
| Option | Purpose | Action | | Option | Purpose | Action |
|--------|---------|--------| |--------|---------|--------|
| **创建实施计划** | Plan implementation of top idea | Launch `workflow-lite-plan` | | **显示后续命令** | Show available next-step commands | Display command list for user to manually run |
| **创建Issue** | Track top ideas for later | Launch `issue:new` with ideas |
| **深入分析** | Analyze top idea in detail | Launch `workflow:analyze-with-file` |
| **导出分享** | Generate shareable report | Create formatted report document | | **导出分享** | Generate shareable report | Create formatted report document |
| **完成** | No further action | End workflow | | **完成** | No further action | End workflow |
**Next-step commands to display** (user runs manually, NOT auto-launched):
- `/workflow-lite-plan "..."` → Generate implementation plan
- `/issue:new "..."` → Track top ideas as issues
- `/workflow:analyze-with-file "..."` → Analyze top idea in detail
**Success Criteria**: **Success Criteria**:
- `synthesis.json` created with complete synthesis - `synthesis.json` created with complete synthesis
- `brainstorm.md` finalized with all conclusions - `brainstorm.md` finalized with all conclusions
@@ -1030,4 +1033,6 @@ Final synthesis:
--- ---
**Now execute the brainstorm-with-file workflow for topic**: $TOPIC **Now start brainstorming for topic**: $TOPIC
**IMPORTANT**: This skill is brainstorming-only. It produces analysis, perspectives, and synthesis documents but NEVER executes code, modifies source files, or auto-launches other skills. All follow-up actions require user to manually run the suggested commands.

View File

@@ -5,12 +5,12 @@ description: |
(spawn_agents_on_csv) → cross-role synthesis. Single role mode: individual role analysis. (spawn_agents_on_csv) → cross-role synthesis. Single role mode: individual role analysis.
CSV-driven parallel coordination with NDJSON discovery board. CSV-driven parallel coordination with NDJSON discovery board.
argument-hint: "[-y|--yes] [--count N] [--session ID] [--skip-questions] [--style-skill PKG] \"topic\" | <role-name> [--session ID]" argument-hint: "[-y|--yes] [--count N] [--session ID] [--skip-questions] [--style-skill PKG] \"topic\" | <role-name> [--session ID]"
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, request_user_input, Read, Write, Edit, Bash, Glob, Grep
--- ---
## Auto Mode ## Auto Mode
When `--yes` or `-y`: Auto-select auto mode, auto-select recommended roles, skip all clarification questions, use defaults. When `--yes` or `-y`: Auto-select auto mode, auto-select recommended roles, skip all clarification questions, use defaults. **This skill is brainstorming-only — it produces analysis and feature specs but NEVER executes code or modifies source files.**
# Brainstorm # Brainstorm
@@ -228,11 +228,10 @@ const topic = isRole
```javascript ```javascript
if (executionMode === null) { if (executionMode === null) {
const modeAnswer = AskUserQuestion({ const modeAnswer = request_user_input({
questions: [{ questions: [{
question: "Choose brainstorming mode:", question: "Choose brainstorming mode:",
header: "Mode", header: "Mode",
multiSelect: false,
options: [ options: [
{ label: "Auto Mode (Recommended)", description: "Full pipeline: framework → parallel roles → synthesis" }, { label: "Auto Mode (Recommended)", description: "Full pipeline: framework → parallel roles → synthesis" },
{ label: "Single Role", description: "Run one role analysis independently" } { label: "Single Role", description: "Run one role analysis independently" }
@@ -325,11 +324,10 @@ TOPIC: ${topic}" --tool gemini --mode analysis --rule planning-breakdown-task-st
features.forEach(f => console.log(` - [${f.id}] ${f.title}`)) features.forEach(f => console.log(` - [${f.id}] ${f.title}`))
} }
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: "Approve brainstorm framework?", question: "Approve brainstorm framework?",
header: "Validate", header: "Validate",
multiSelect: false,
options: [ options: [
{ label: "Approve", description: "Proceed with role analysis" }, { label: "Approve", description: "Proceed with role analysis" },
{ label: "Modify Roles", description: "Change role selection" }, { label: "Modify Roles", description: "Change role selection" },
@@ -340,12 +338,11 @@ TOPIC: ${topic}" --tool gemini --mode analysis --rule planning-breakdown-task-st
if (answer.Validate === "Cancel") return if (answer.Validate === "Cancel") return
if (answer.Validate === "Modify Roles") { if (answer.Validate === "Modify Roles") {
// Allow user to adjust via AskUserQuestion // Allow user to adjust via request_user_input
const roleAnswer = AskUserQuestion({ const roleAnswer = request_user_input({
questions: [{ questions: [{
question: "Select roles for analysis:", question: "Select roles for analysis:",
header: "Roles", header: "Roles",
multiSelect: true,
options: VALID_ROLES.map(r => ({ options: VALID_ROLES.map(r => ({
label: r, label: r,
description: roles.find(sel => sel.role === r)?.focus || '' description: roles.find(sel => sel.role === r)?.focus || ''
@@ -654,6 +651,7 @@ Features synthesized: ${featureIndex.length}
${featureIndex.map(f => ` - [${f.id}] ${f.title} (${f.roles_contributing?.length || 0} roles, ${f.conflict_count || 0} conflicts)`).join('\n')} ${featureIndex.map(f => ` - [${f.id}] ${f.title} (${f.roles_contributing?.length || 0} roles, ${f.conflict_count || 0} conflicts)`).join('\n')}
### Next Steps ### Next Steps
Brainstorming complete. To continue, run one of:
- /workflow-plan --session ${sessionId} → Generate implementation plan - /workflow-plan --session ${sessionId} → Generate implementation plan
- Review: ${sessionFolder}/.brainstorming/feature-specs/ - Review: ${sessionFolder}/.brainstorming/feature-specs/
`) `)

View File

@@ -44,7 +44,7 @@ Phase 2: Drift Discovery (Subagent)
Phase 3: Confirmation Phase 3: Confirmation
├─ Validate manifest schema ├─ Validate manifest schema
├─ Display cleanup summary by category ├─ Display cleanup summary by category
├─ ASK_USER: Select categories and risk level ├─ request_user_input: Select categories and risk level
└─ Dry-run exit if --dry-run └─ Dry-run exit if --dry-run
Phase 4: Execution Phase 4: Execution
@@ -252,26 +252,30 @@ Manifest: ${sessionFolder}/cleanup-manifest.json
} }
// User confirmation // User confirmation
const selection = ASK_USER([ const selection = request_user_input({
{ questions: [
id: "categories", type: "multi-select", {
prompt: "Which categories to clean?", header: "清理类别",
options: [ id: "categories",
{ label: "Sessions", description: `${manifest.summary.by_category.stale_sessions} stale sessions` }, question: "Which categories to clean?",
{ label: "Documents", description: `${manifest.summary.by_category.drifted_documents} drifted docs` }, options: [
{ label: "Dead Code", description: `${manifest.summary.by_category.dead_code} unused files` } { label: "Sessions", description: `${manifest.summary.by_category.stale_sessions} stale sessions` },
] { label: "Documents", description: `${manifest.summary.by_category.drifted_documents} drifted docs` },
}, { label: "Dead Code", description: `${manifest.summary.by_category.dead_code} unused files` }
{ ]
id: "risk", type: "select", },
prompt: "Risk level?", {
options: [ header: "风险级别",
{ label: "Low only", description: "Safest (Recommended)" }, id: "risk",
{ label: "Low + Medium", description: "Includes likely unused" }, question: "Risk level?",
{ label: "All", description: "Aggressive" } options: [
] { label: "Low only(Recommended)", description: "Safest — only clearly stale items" },
} { label: "Low + Medium", description: "Includes likely unused" },
]) // BLOCKS (wait for user response) { label: "All", description: "Aggressive" }
]
}
]
}) // BLOCKS (wait for user response)
``` ```
--- ---
@@ -279,21 +283,24 @@ const selection = ASK_USER([
### Phase 4: Execution ### Phase 4: Execution
```javascript ```javascript
const selectedCategory = selection.answers.categories.answers[0]
const selectedRisk = selection.answers.risk.answers[0]
const riskFilter = { const riskFilter = {
'Low only': ['low'], 'Low only(Recommended)': ['low'],
'Low + Medium': ['low', 'medium'], 'Low + Medium': ['low', 'medium'],
'All': ['low', 'medium', 'high'] 'All': ['low', 'medium', 'high']
}[selection.risk] }[selectedRisk]
// Collect items to clean // Collect items to clean
const items = [] const items = []
if (selection.categories.includes('Sessions')) { if (selectedCategory === 'Sessions') {
items.push(...manifest.discoveries.stale_sessions.filter(s => riskFilter.includes(s.risk))) items.push(...manifest.discoveries.stale_sessions.filter(s => riskFilter.includes(s.risk)))
} }
if (selection.categories.includes('Documents')) { if (selectedCategory === 'Documents') {
items.push(...manifest.discoveries.drifted_documents.filter(d => riskFilter.includes(d.risk))) items.push(...manifest.discoveries.drifted_documents.filter(d => riskFilter.includes(d.risk)))
} }
if (selection.categories.includes('Dead Code')) { if (selectedCategory === 'Dead Code') {
items.push(...manifest.discoveries.dead_code.filter(c => riskFilter.includes(c.risk))) items.push(...manifest.discoveries.dead_code.filter(c => riskFilter.includes(c.risk)))
} }

View File

@@ -197,7 +197,7 @@ Use built-in tools directly to understand the task scope and identify sub-domain
- Run: `ccw spec load --category planning` (if spec system available) - Run: `ccw spec load --category planning` (if spec system available)
2. **Extract task keywords** — Identify key terms and concepts from the task description 2. **Extract task keywords** — Identify key terms and concepts from the task description
3. **Identify ambiguities** — List any unclear points or multiple possible interpretations 3. **Identify ambiguities** — List any unclear points or multiple possible interpretations
4. **Clarify with user** — If ambiguities found, use AskUserQuestion for clarification 4. **Clarify with user** — If ambiguities found, use request_user_input for clarification
5. **Identify sub-domains** — Split into 2-{maxDomains} parallelizable focus areas based on task complexity 5. **Identify sub-domains** — Split into 2-{maxDomains} parallelizable focus areas based on task complexity
6. **Assess complexity** — Evaluate overall task complexity (Low/Medium/High) 6. **Assess complexity** — Evaluate overall task complexity (Low/Medium/High)
@@ -283,14 +283,14 @@ Display identified sub-domains and confirm before starting.
```javascript ```javascript
if (!autoMode) { if (!autoMode) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
header: "确认规划",
id: "confirm",
question: `已识别 ${subDomains.length} 个子领域:\n${subDomains.map((s, i) => question: `已识别 ${subDomains.length} 个子领域:\n${subDomains.map((s, i) =>
`${i+1}. ${s.focus_area}: ${s.description}`).join('\n')}\n\n确认开始规划?`, `${i+1}. ${s.focus_area}: ${s.description}`).join('\n')}\n\n确认开始规划?`,
header: "Confirm",
multiSelect: false,
options: [ options: [
{ label: "开始规划", description: "逐域进行规划" }, { label: "开始规划(Recommended)", description: "逐域进行规划" },
{ label: "调整拆分", description: "修改子领域划分" }, { label: "调整拆分", description: "修改子领域划分" },
{ label: "取消", description: "退出规划" } { label: "取消", description: "退出规划" }
] ]
@@ -683,15 +683,14 @@ Present session statistics and next steps.
// - Execution command for next step // - Execution command for next step
if (!autoMode) { if (!autoMode) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
header: "下一步",
id: "next_step",
question: `规划完成:\n- ${subDomains.length} 个子领域\n- ${allTasks.length} 个任务\n- ${allConflicts.length} 个冲突\n\n下一步:`, question: `规划完成:\n- ${subDomains.length} 个子领域\n- ${allTasks.length} 个任务\n- ${allConflicts.length} 个冲突\n\n下一步:`,
header: "Next Step",
multiSelect: false,
options: [ options: [
{ label: "Execute Plan", description: "使用 unified-execute 执行计划" }, { label: "Execute Plan(Recommended)", description: "使用 unified-execute 执行计划" },
{ label: "Review Conflicts", description: "查看并解决冲突" }, { label: "Review Conflicts", description: "查看并解决冲突" },
{ label: "Export", description: "导出 plan.md" },
{ label: "Done", description: "保存产物,稍后执行" } { label: "Done", description: "保存产物,稍后执行" }
] ]
}] }]

View File

@@ -2,7 +2,7 @@
name: csv-wave-pipeline name: csv-wave-pipeline
description: Requirement planning to wave-based CSV execution pipeline. Decomposes requirement into dependency-sorted CSV tasks, computes execution waves, runs wave-by-wave via spawn_agents_on_csv with cross-wave context propagation. description: Requirement planning to wave-based CSV execution pipeline. Decomposes requirement into dependency-sorted CSV tasks, computes execution waves, runs wave-by-wave via spawn_agents_on_csv with cross-wave context propagation.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"requirement description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"requirement description\""
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -322,23 +322,23 @@ REQUIREMENT: ${requirement}" --tool gemini --mode analysis --rule planning-break
waveTasks.forEach(t => console.log(` - [${t.id}] ${t.title}`)) waveTasks.forEach(t => console.log(` - [${t.id}] ${t.title}`))
} }
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
header: "验证",
id: "validation",
question: "Approve task breakdown?", question: "Approve task breakdown?",
header: "Validation",
multiSelect: false,
options: [ options: [
{ label: "Approve", description: "Proceed with wave execution" }, { label: "Approve(Recommended)", description: "Proceed with wave execution" },
{ label: "Modify", description: `Edit ${sessionFolder}/tasks.csv manually, then --continue` }, { label: "Modify", description: `Edit ${sessionFolder}/tasks.csv manually, then --continue` },
{ label: "Cancel", description: "Abort" } { label: "Cancel", description: "Abort" }
] ]
}] }]
}) // BLOCKS }) // BLOCKS
if (answer.Validation === "Modify") { if (answer.answers.validation.answers[0] === "Modify") {
console.log(`Edit: ${sessionFolder}/tasks.csv\nResume: $csv-wave-pipeline --continue`) console.log(`Edit: ${sessionFolder}/tasks.csv\nResume: $csv-wave-pipeline --continue`)
return return
} else if (answer.Validation === "Cancel") { } else if (answer.answers.validation.answers[0] === "Cancel") {
return return
} }
} }
@@ -711,20 +711,20 @@ ${[...new Set(tasks.flatMap(t => (t.files_modified || '').split(';')).filter(Boo
```javascript ```javascript
if (!AUTO_YES && failed.length > 0) { if (!AUTO_YES && failed.length > 0) {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
header: "下一步",
id: "next_step",
question: `${failed.length} tasks failed. Next action?`, question: `${failed.length} tasks failed. Next action?`,
header: "Next Step",
multiSelect: false,
options: [ options: [
{ label: "Retry Failed", description: `Re-execute ${failed.length} failed tasks with updated context` }, { label: "Retry Failed(Recommended)", description: `Re-execute ${failed.length} failed tasks with updated context` },
{ label: "View Report", description: "Display context.md" }, { label: "View Report", description: "Display context.md" },
{ label: "Done", description: "Complete session" } { label: "Done", description: "Complete session" }
] ]
}] }]
}) // BLOCKS }) // BLOCKS
if (answer['Next Step'] === "Retry Failed") { if (answer.answers.next_step.answers[0] === "Retry Failed(Recommended)") {
// Reset failed tasks to pending, re-run Phase 2 for their waves // Reset failed tasks to pending, re-run Phase 2 for their waves
for (const task of failed) { for (const task of failed) {
updateMasterCsvRow(sessionFolder, task.id, { status: 'pending', error: '' }) updateMasterCsvRow(sessionFolder, task.id, { status: 'pending', error: '' })
@@ -735,7 +735,7 @@ ${[...new Set(tasks.flatMap(t => (t.files_modified || '').split(';')).filter(Boo
} }
// Re-execute Phase 2 (loop will skip already-completed tasks) // Re-execute Phase 2 (loop will skip already-completed tasks)
// → goto Phase 2 // → goto Phase 2
} else if (answer['Next Step'] === "View Report") { } else if (answer.answers.next_step.answers[0] === "View Report") {
console.log(Read(`${sessionFolder}/context.md`)) console.log(Read(`${sessionFolder}/context.md`))
} }
} }

View File

@@ -1,7 +1,7 @@
--- ---
name: issue-discover name: issue-discover
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". 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".
allowed-tools: spawn_agent, wait, send_input, close_agent, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep, mcp__ace-tool__search_context, mcp__exa__search 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
--- ---
# Issue Discover # Issue Discover
@@ -16,7 +16,7 @@ Unified issue discovery and creation skill covering three entry points: manual i
│ → Action selection → Route to phase → Execute → Summary │ │ → Action selection → Route to phase → Execute → Summary │
└───────────────┬─────────────────────────────────────────────────┘ └───────────────┬─────────────────────────────────────────────────┘
├─ ASK_USER: Select action ├─ request_user_input: Select action
┌───────────┼───────────┬───────────┐ ┌───────────┼───────────┬───────────┐
↓ ↓ ↓ │ ↓ ↓ ↓ │
@@ -50,7 +50,7 @@ Unified issue discovery and creation skill covering three entry points: manual i
## Key Design Principles ## Key Design Principles
1. **Action-Driven Routing**: ASK_USER selects action, then load single phase 1. **Action-Driven Routing**: request_user_input selects action, then load single phase
2. **Progressive Phase Loading**: Only read the selected phase document 2. **Progressive Phase Loading**: Only read the selected phase document
3. **CLI-First Data Access**: All issue CRUD via `ccw issue` CLI commands 3. **CLI-First Data Access**: All issue CRUD via `ccw issue` CLI commands
4. **Auto Mode Support**: `-y` flag skips action selection with auto-detection 4. **Auto Mode Support**: `-y` flag skips action selection with auto-detection
@@ -101,7 +101,7 @@ Action Selection:
│ ├─ Path pattern (src/**, *.ts) → Discover (Phase 2) │ ├─ Path pattern (src/**, *.ts) → Discover (Phase 2)
│ ├─ Short text (< 80 chars) → Create New (Phase 1) │ ├─ Short text (< 80 chars) → Create New (Phase 1)
│ └─ Long descriptive text (≥ 80 chars) → Discover by Prompt (Phase 3) │ └─ Long descriptive text (≥ 80 chars) → Discover by Prompt (Phase 3)
└─ Otherwise → ASK_USER to select action └─ Otherwise → request_user_input to select action
Phase Execution (load one phase): Phase Execution (load one phase):
├─ Phase 1: Create New → phases/01-issue-new.md ├─ Phase 1: Create New → phases/01-issue-new.md
@@ -168,33 +168,36 @@ function detectAction(input, flags) {
} }
``` ```
### Action Selection (ASK_USER) ### Action Selection (request_user_input)
```javascript ```javascript
// When action cannot be auto-detected // When action cannot be auto-detected
const answer = ASK_USER([{ const answer = request_user_input({
id: "action", questions: [{
type: "select", header: "Action",
prompt: "What would you like to do?", id: "action",
options: [ question: "What would you like to do?",
{ options: [
label: "Create New Issue (Recommended)", {
description: "Create issue from GitHub URL, text description, or structured input" label: "Create New Issue (Recommended)",
}, description: "Create issue from GitHub URL, text description, or structured input"
{ },
label: "Discover Issues", {
description: "Multi-perspective discovery: bug, security, test, quality, performance, etc." label: "Discover Issues",
}, description: "Multi-perspective discovery: bug, security, test, quality, performance, etc."
{ },
label: "Discover by Prompt", {
description: "Describe what to find — Gemini plans the exploration strategy iteratively" label: "Discover by Prompt",
} description: "Describe what to find — Gemini plans the exploration strategy iteratively"
] }
}]); // BLOCKS (wait for user response) ]
}]
}); // BLOCKS (wait for user response)
// Route based on selection // Route based on selection
// answer.answers.action.answers[0] → selected label
const actionMap = { const actionMap = {
"Create New Issue": "new", "Create New Issue (Recommended)": "new",
"Discover Issues": "discover", "Discover Issues": "discover",
"Discover by Prompt": "discover-by-prompt" "Discover by Prompt": "discover-by-prompt"
}; };
@@ -207,7 +210,7 @@ User Input (URL / text / path pattern / descriptive prompt)
[Parse Flags + Auto-Detect Action] [Parse Flags + Auto-Detect Action]
[Action Selection] ← ASK_USER (if needed) [Action Selection] ← request_user_input (if needed)
[Read Selected Phase Document] [Read Selected Phase Document]
@@ -305,7 +308,7 @@ close_agent({ id: agentId })
| Error | Resolution | | Error | Resolution |
|-------|------------| |-------|------------|
| No action detected | Show ASK_USER with all 3 options | | No action detected | Show request_user_input with all 3 options |
| Invalid action type | Show available actions, re-prompt | | Invalid action type | Show available actions, re-prompt |
| Phase execution fails | Report error, suggest manual intervention | | Phase execution fails | Report error, suggest manual intervention |
| No files matched (discover) | Check target pattern, verify path exists | | No files matched (discover) | Check target pattern, verify path exists |
@@ -318,31 +321,35 @@ After successful phase execution, recommend next action:
```javascript ```javascript
// After Create New (issue created) // After Create New (issue created)
ASK_USER([{ request_user_input({
id: "next_after_create", questions: [{
type: "select", header: "Next Step",
prompt: "Issue created. What next?", id: "next_after_create",
options: [ question: "Issue created. What next?",
{ label: "Plan Solution", description: "Generate solution via issue-resolve" }, options: [
{ label: "Create Another", description: "Create more issues" }, { label: "Plan Solution (Recommended)", description: "Generate solution via issue-resolve" },
{ label: "View Issues", description: "Review all issues" }, { label: "Create Another", description: "Create more issues" },
{ label: "Done", description: "Exit workflow" } { label: "Done", description: "Exit workflow" }
] ]
}]); // BLOCKS (wait for user response) }]
}); // BLOCKS (wait for user response)
// answer.answers.next_after_create.answers[0] → selected label
// After Discover / Discover by Prompt (discoveries generated) // After Discover / Discover by Prompt (discoveries generated)
ASK_USER([{ request_user_input({
id: "next_after_discover", questions: [{
type: "select", header: "Next Step",
prompt: `Discovery complete: ${findings.length} findings, ${executableFindings.length} executable. What next?`, id: "next_after_discover",
options: [ question: `Discovery complete: ${findings.length} findings, ${executableFindings.length} executable. What next?`,
{ label: "Quick Plan & Execute (Recommended)", description: `Fix ${executableFindings.length} high-confidence findings directly` }, options: [
{ label: "Export to Issues", description: "Convert discoveries to issues" }, { label: "Quick Plan & Execute (Recommended)", description: `Fix ${executableFindings.length} high-confidence findings directly` },
{ label: "Plan Solutions", description: "Plan solutions for exported issues via issue-resolve" }, { label: "Export to Issues", description: "Convert discoveries to issues" },
{ label: "Done", description: "Exit workflow" } { label: "Done", description: "Exit workflow" }
] ]
}]); // BLOCKS (wait for user response) }]
// If "Quick Plan & Execute" → Read phases/04-quick-execute.md, execute }); // BLOCKS (wait for user response)
// answer.answers.next_after_discover.answers[0] → selected label
// If "Quick Plan & Execute (Recommended)" → Read phases/04-quick-execute.md, execute
``` ```
## Related Skills & Commands ## Related Skills & Commands

View File

@@ -145,16 +145,23 @@ if (clarityScore >= 1 && clarityScore <= 2 && !issueData.affected_components?.le
```javascript ```javascript
// ONLY ask questions if clarity is low // ONLY ask questions if clarity is low
if (clarityScore < 2 && (!issueData.context || issueData.context.length < 20)) { if (clarityScore < 2 && (!issueData.context || issueData.context.length < 20)) {
const answer = ASK_USER([{ const answer = request_user_input({
id: "clarify", questions: [{
type: "input", header: "Clarify",
prompt: "Please describe the issue in more detail:", id: "clarify",
description: "Describe what, where, and expected behavior" question: "Please describe the issue in more detail.",
}]); // BLOCKS (wait for user response) options: [
{ label: "Provide Details", description: "Describe what, where, and expected behavior" },
{ label: "Skip", description: "Create issue with current information" }
]
}]
}); // BLOCKS (wait for user response)
if (answer.customText) { const selection = answer.answers.clarify.answers[0];
issueData.context = answer.customText; if (selection === "Provide Details") {
issueData.title = answer.customText.split(/[.\n]/)[0].substring(0, 60); // User provides details via follow-up
issueData.context = selection;
issueData.title = selection.split(/[.\n]/)[0].substring(0, 60);
issueData.feedback = [{ issueData.feedback = [{
type: 'clarification', type: 'clarification',
stage: 'new', stage: 'new',
@@ -228,7 +235,7 @@ Phase 2: Data Extraction (branched by clarity)
│ Score 3 │ Score 1-2 │ Score 0 │ │ Score 3 │ Score 1-2 │ Score 0 │
│ GitHub │ Text + ACE │ Vague │ │ GitHub │ Text + ACE │ Vague │
├────────────┼─────────────────┼──────────────┤ ├────────────┼─────────────────┼──────────────┤
│ gh CLI │ Parse struct │ ASK_USER │ gh CLI │ Parse struct │ request_user_input
│ → parse │ + quick hint │ (1 question) │ │ → parse │ + quick hint │ (1 question) │
│ │ (3 files max) │ → feedback │ │ │ (3 files max) │ → feedback │
└────────────┴─────────────────┴──────────────┘ └────────────┴─────────────────┴──────────────┘

View File

@@ -86,18 +86,20 @@ let selectedPerspectives = [];
if (args.perspectives) { if (args.perspectives) {
selectedPerspectives = args.perspectives.split(',').map(p => p.trim()); selectedPerspectives = args.perspectives.split(',').map(p => p.trim());
} else { } else {
// Interactive selection via ASK_USER // Interactive selection via request_user_input
const response = ASK_USER([{ const response = request_user_input({
id: "focus", questions: [{
type: "select", header: "Focus",
prompt: "Select primary discovery focus:", id: "focus",
options: [ question: "Select primary discovery focus.",
{ label: "Bug + Test + Quality", description: "Quick scan: potential bugs, test gaps, code quality (Recommended)" }, options: [
{ label: "Security + Performance", description: "System audit: security issues, performance bottlenecks" }, { label: "Bug + Test + Quality (Recommended)", description: "Quick scan: potential bugs, test gaps, code quality" },
{ label: "Maintainability + Best-practices", description: "Long-term health: coupling, tech debt, conventions" }, { label: "Security + Performance", description: "System audit: security issues, performance bottlenecks" },
{ label: "Full analysis", description: "All 8 perspectives (comprehensive, takes longer)" } { label: "Full analysis", description: "All 8 perspectives (comprehensive, takes longer)" }
] ]
}]); // BLOCKS (wait for user response) }]
}); // BLOCKS (wait for user response)
// response.answers.focus.answers[0] → selected label
selectedPerspectives = parseSelectedPerspectives(response); selectedPerspectives = parseSelectedPerspectives(response);
} }
``` ```
@@ -271,20 +273,23 @@ await updateDiscoveryState(outputDir, {
```javascript ```javascript
const hasHighPriority = issues.some(i => i.priority === 'critical' || i.priority === 'high'); const hasHighPriority = issues.some(i => i.priority === 'critical' || i.priority === 'high');
await ASK_USER([{ await request_user_input({
id: "next_step", questions: [{
type: "select", header: "Next Step",
prompt: `Discovery complete: ${issues.length} issues generated, ${prioritizedFindings.length} total findings. What next?`, id: "next_step",
options: hasHighPriority ? [ question: `Discovery complete: ${issues.length} issues generated, ${prioritizedFindings.length} total findings. What next?`,
{ label: "Export to Issues (Recommended)", description: `${issues.length} high-priority issues found - export to tracker` }, options: hasHighPriority ? [
{ label: "Open Dashboard", description: "Review findings in ccw view before exporting" }, { label: "Export to Issues (Recommended)", description: `${issues.length} high-priority issues found - export to tracker` },
{ label: "Skip", description: "Complete discovery without exporting" } { label: "Open Dashboard", description: "Review findings in ccw view before exporting" },
] : [ { label: "Skip", description: "Complete discovery without exporting" }
{ label: "Open Dashboard (Recommended)", description: "Review findings in ccw view to decide which to export" }, ] : [
{ label: "Export to Issues", description: `Export ${issues.length} issues to tracker` }, { label: "Open Dashboard (Recommended)", description: "Review findings in ccw view to decide which to export" },
{ label: "Skip", description: "Complete discovery without exporting" } { label: "Export to Issues", description: `Export ${issues.length} issues to tracker` },
] { label: "Skip", description: "Complete discovery without exporting" }
}]); // BLOCKS (wait for user response) ]
}]
}); // BLOCKS (wait for user response)
// response.answers.next_step.answers[0] → selected label
if (response === "Export to Issues") { if (response === "Export to Issues") {
await appendJsonl(`${projectRoot}/.workflow/issues/issues.jsonl`, issues); await appendJsonl(`${projectRoot}/.workflow/issues/issues.jsonl`, issues);

View File

@@ -389,17 +389,19 @@ await updateDiscoveryState(outputDir, {
}); });
// Prompt user for next action // Prompt user for next action
await ASK_USER([{ await request_user_input({
id: "next_step", questions: [{
type: "select", header: "Next Step",
prompt: `Discovery complete: ${issues.length} issues from ${cumulativeFindings.length} findings across ${iteration} iterations. What next?`, id: "next_step",
options: [ question: `Discovery complete: ${issues.length} issues from ${cumulativeFindings.length} findings across ${iteration} iterations. What next?`,
{ label: "Export to Issues (Recommended)", description: `Export ${issues.length} issues for planning` }, options: [
{ label: "Review Details", description: "View comparison analysis and iteration details" }, { label: "Export to Issues (Recommended)", description: `Export ${issues.length} issues for planning` },
{ label: "Run Deeper", description: "Continue with more iterations" }, { label: "Review Details", description: "View comparison analysis and iteration details" },
{ label: "Skip", description: "Complete without exporting" } { label: "Run Deeper", description: "Continue with more iterations" }
] ]
}]); // BLOCKS (wait for user response) }]
}); // BLOCKS (wait for user response)
// answer.answers.next_step.answers[0] → selected label
``` ```
## Dimension Agent Prompt Template ## Dimension Agent Prompt Template

View File

@@ -44,7 +44,7 @@ executableFindings = allFindings.filter(f =>
``` ```
- 如果 0 个可执行 findings → 提示 "No executable findings (all below threshold)",建议用户走 "Export to Issues" 路径 - 如果 0 个可执行 findings → 提示 "No executable findings (all below threshold)",建议用户走 "Export to Issues" 路径
- 如果超过 10 个 findings → ASK_USER 确认是否全部执行或选择子集 (Auto mode: 全部执行) - 如果超过 10 个 findings → request_user_input 确认是否全部执行或选择子集 (Auto mode: 全部执行)
**同文件聚合**: **同文件聚合**:
@@ -154,23 +154,26 @@ Quick Execute Summary:
- File conflicts: {conflicts.length} - File conflicts: {conflicts.length}
``` ```
ASK_USER: request_user_input:
```javascript ```javascript
ASK_USER([{ request_user_input({
id: "confirm_execute", questions: [{
type: "select", header: "Confirm",
prompt: `${tasks.length} tasks ready. Start execution?`, id: "confirm_execute",
options: [ question: `${tasks.length} tasks ready. Start execution?`,
{ label: "Start Execution", description: "Execute all tasks" }, options: [
{ label: "Adjust Filter", description: "Change confidence/priority threshold" }, { label: "Start Execution (Recommended)", description: "Execute all tasks" },
{ label: "Cancel", description: "Skip execution, return to post-phase options" } { label: "Adjust Filter", description: "Change confidence/priority threshold" },
] { label: "Cancel", description: "Skip execution, return to post-phase options" }
}]); ]
}]
});
// answer.answers.confirm_execute.answers[0] → selected label
// Auto mode: Start Execution // Auto mode: Start Execution
``` ```
- "Adjust Filter" → 重新 ASK_USER 输入 confidence 和 priority 阈值,返回 Step 4.1 - "Adjust Filter" → 重新 request_user_input 输入 confidence 和 priority 阈值,返回 Step 4.1
- "Cancel" → 退出 Phase 4 - "Cancel" → 退出 Phase 4
### Step 4.5: Direct Inline Execution ### Step 4.5: Direct Inline Execution
@@ -192,7 +195,7 @@ for each task in sortedTasks:
6. Update .task/TASK-{id}.json _execution status 6. Update .task/TASK-{id}.json _execution status
7. If failed: 7. If failed:
- Auto mode: Skip & Continue - Auto mode: Skip & Continue
- Interactive: ASK_USER → Retry / Skip / Abort - Interactive: request_user_input → Retry / Skip / Abort
``` ```
**可选 auto-commit**: 每个成功 task 后 `git add {files} && git commit -m "fix: {task.title}"` **可选 auto-commit**: 每个成功 task 后 `git add {files} && git commit -m "fix: {task.title}"`
@@ -209,17 +212,19 @@ for each task in sortedTasks:
// 计算未执行 findings // 计算未执行 findings
const remainingFindings = allFindings.filter(f => !executedFindingIds.has(f.id)) const remainingFindings = allFindings.filter(f => !executedFindingIds.has(f.id))
ASK_USER([{ request_user_input({
id: "post_quick_execute", questions: [{
type: "select", header: "Post Execute",
prompt: `Quick Execute: ${completedCount}/${tasks.length} succeeded. ${remainingFindings.length} findings not executed.`, id: "post_quick_execute",
options: [ question: `Quick Execute: ${completedCount}/${tasks.length} succeeded. ${remainingFindings.length} findings not executed.`,
{ label: "Retry Failed", description: `Re-execute ${failedCount} failed tasks` }, options: [
{ label: "Export Remaining", description: `Export ${remainingFindings.length} remaining findings to issues` }, { label: "Done (Recommended)", description: "End workflow" },
{ label: "View Events", description: "Display execution-events.md" }, { label: "Retry Failed", description: `Re-execute ${failedCount} failed tasks` },
{ label: "Done", description: "End workflow" } { label: "Export Remaining", description: `Export ${remainingFindings.length} remaining findings to issues` }
] ]
}]); }]
});
// answer.answers.post_quick_execute.answers[0] → selected label
// Auto mode: Done // Auto mode: Done
``` ```
@@ -231,11 +236,11 @@ ASK_USER([{
|---------|---------| |---------|---------|
| 0 个可执行 findings | 提示 "No executable findings",建议 Export to Issues | | 0 个可执行 findings | 提示 "No executable findings",建议 Export to Issues |
| 只有 1 个 finding | 正常生成 1 个 TASK-001.json简化确认对话 | | 只有 1 个 finding | 正常生成 1 个 TASK-001.json简化确认对话 |
| 超过 10 个 findings | ASK_USER 确认全部执行或选择子集 | | 超过 10 个 findings | request_user_input 确认全部执行或选择子集 |
| finding 缺少 recommendation | criteria 退化为 "Review and fix {category} in {file}:{line}" | | finding 缺少 recommendation | criteria 退化为 "Review and fix {category} in {file}:{line}" |
| finding 缺少 confidence | 默认 confidence=0.5,不满足过滤阈值 → 排除 | | finding 缺少 confidence | 默认 confidence=0.5,不满足过滤阈值 → 排除 |
| discovery 输出不存在 | 报错 "No discoveries found. Run discover first." | | discovery 输出不存在 | 报错 "No discoveries found. Run discover first." |
| .task/ 目录已存在 | ASK_USER 追加 (TASK-{max+1}) 或覆盖 | | .task/ 目录已存在 | request_user_input 追加 (TASK-{max+1}) 或覆盖 |
| 执行中文件被外部修改 | convergence verification 检测到差异,标记为 FAIL | | 执行中文件被外部修改 | convergence verification 检测到差异,标记为 FAIL |
| 所有 tasks 执行失败 | 建议 "Export to Issues → issue-resolve" 完整路径 | | 所有 tasks 执行失败 | 建议 "Export to Issues → issue-resolve" 完整路径 |
| finding 来自不同 perspective 但同文件 | 仍合并为一个 taskconvergence.criteria 保留各自标准 | | finding 来自不同 perspective 但同文件 | 仍合并为一个 taskconvergence.criteria 保留各自标准 |

View File

@@ -1,7 +1,7 @@
--- ---
name: parallel-dev-cycle name: parallel-dev-cycle
description: Multi-agent parallel development cycle with requirement analysis, exploration planning, code development, and validation. Orchestration runs inline in main flow (no separate orchestrator agent). Supports continuous iteration with markdown progress documentation. Triggers on "parallel-dev-cycle". description: Multi-agent parallel development cycle with requirement analysis, exploration planning, code development, and validation. Orchestration runs inline in main flow (no separate orchestrator agent). Supports continuous iteration with markdown progress documentation. Triggers on "parallel-dev-cycle".
allowed-tools: spawn_agent, wait, send_input, close_agent, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep allowed-tools: spawn_agent, wait, send_input, close_agent, request_user_input, Read, Write, Edit, Bash, Glob, Grep
--- ---
# Parallel Dev Cycle # Parallel Dev Cycle

View File

@@ -2,7 +2,7 @@
name: project-documentation-workflow name: project-documentation-workflow
description: Wave-based comprehensive project documentation generator with dynamic task decomposition. Analyzes project structure and generates appropriate documentation tasks, computes optimal execution waves via topological sort, produces complete documentation suite including architecture, methods, theory, features, usage, and design philosophy. description: Wave-based comprehensive project documentation generator with dynamic task decomposition. Analyzes project structure and generates appropriate documentation tasks, computes optimal execution waves via topological sort, produces complete documentation suite including architecture, methods, theory, features, usage, and design philosophy.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"project path or description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"project path or description\""
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -295,8 +295,18 @@ ${waveDistribution.map(w => `║ Wave ${w.wave}: ${w.tasks} tasks${' '.repeat(
} }
} }
const confirm = AskUserQuestion("Proceed with this task breakdown?") const answer = request_user_input({
if (!confirm) { questions: [{
header: "确认任务",
id: "confirm_tasks",
question: "Proceed with this task breakdown?",
options: [
{ label: "Proceed(Recommended)", description: "Start wave execution with this task breakdown" },
{ label: "Cancel", description: "Abort and modify tasks manually" }
]
}]
})
if (answer.answers.confirm_tasks.answers[0] !== "Proceed(Recommended)") {
console.log("Aborted. Use --continue to resume with modified tasks.") console.log("Aborted. Use --continue to resume with modified tasks.")
return return
} }

View File

@@ -6,7 +6,7 @@ argument-hint: "[-y|--yes] [-c|--continue] [-m progressive|direct|auto] \"requir
## Auto Mode ## Auto Mode
When `--yes` or `-y`: Auto-confirm strategy selection, use recommended mode, skip interactive rounds. When `--yes` or `-y`: Auto-confirm strategy selection, use recommended mode, skip interactive refinement rounds. **This skill is planning-only — it NEVER executes code or modifies source files. Output is the roadmap + issues for user review.**
# Roadmap-with-file Skill # Roadmap-with-file Skill
@@ -143,9 +143,9 @@ Strategic requirement roadmap with **iterative decomposition**. Creates a single
│ ├─ Update roadmap.md with each round │ │ ├─ Update roadmap.md with each round │
│ └─ Repeat until approved (max 5 rounds) │ │ └─ Repeat until approved (max 5 rounds) │
│ │ │ │
│ Phase 4: Handoff │ Phase 4: Handoff (PLANNING ENDS HERE)
│ ├─ Final roadmap.md with Issue ID references │ │ ├─ Final roadmap.md with Issue ID references │
│ ├─ Options: csv-wave-pipeline | view issues | done │ ├─ Options: view issues | done (show next-step commands)
│ └─ Issues ready in .workflow/issues/issues.jsonl │ │ └─ Issues ready in .workflow/issues/issues.jsonl │
│ │ │ │
└─────────────────────────────────────────────────────────────────────────┘ └─────────────────────────────────────────────────────────────────────────┘
@@ -403,20 +403,19 @@ Bash(`mkdir -p ${sessionFolder}`)
} else if (AUTO_YES) { } else if (AUTO_YES) {
selectedMode = recommendedMode selectedMode = recommendedMode
} else { } else {
const answer = ASK_USER([ const answer = request_user_input({
{ questions: [{
header: "Strategy",
id: "strategy", id: "strategy",
type: "choice", question: `Decomposition strategy:\nUncertainty: ${uncertaintyLevel}\nRecommended: ${recommendedMode}`,
prompt: `Decomposition strategy:\nUncertainty: ${uncertaintyLevel}\nRecommended: ${recommendedMode}`,
options: [ options: [
{ value: "progressive", label: recommendedMode === 'progressive' ? "Progressive (Recommended)" : "Progressive" }, { label: recommendedMode === 'progressive' ? "Progressive (Recommended)" : "Progressive" },
{ value: "direct", label: recommendedMode === 'direct' ? "Direct (Recommended)" : "Direct" } { label: recommendedMode === 'direct' ? "Direct (Recommended)" : "Direct" }
], ]
default: recommendedMode }]
} }) // BLOCKS (wait for user response)
]) // BLOCKS (wait for user response)
selectedMode = answer.strategy selectedMode = answer.answers.strategy.answers[0]
} }
``` ```
@@ -670,31 +669,36 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
while (!approved && round < 5) { while (!approved && round < 5) {
round++ round++
const feedback = ASK_USER([ const feedback = request_user_input({
{ questions: [{
header: "Validate",
id: "feedback", id: "feedback",
type: "choice", question: `Roadmap validation (round ${round}):\n${issueIds.length} issues across ${waveCount} waves. Feedback?`,
prompt: `Roadmap validation (round ${round}):\n${issueIds.length} issues across ${waveCount} waves. Feedback?`,
options: [ options: [
{ value: "approve", label: "Approve", description: "Proceed to handoff" }, { label: "Approve", description: "Proceed to handoff" },
{ value: "scope", label: "Adjust Scope", description: "Modify issue scopes" }, { label: "Adjust Scope", description: "Modify issue scopes" },
{ value: "convergence", label: "Modify Convergence", description: "Refine criteria/verification" }, { label: "Modify Convergence", description: "Refine criteria/verification" },
{ value: "replan", label: "Re-decompose", description: "Change strategy/layering" } { label: "Re-decompose", description: "Change strategy/layering" }
] ]
} }]
]) // BLOCKS (wait for user response) }) // BLOCKS (wait for user response)
if (feedback.feedback === 'approve') { const feedbackChoice = feedback.answers.feedback.answers[0]
if (feedbackChoice === 'Approve') {
approved = true approved = true
} else { } else {
// CONSTRAINT: All modifications below ONLY touch roadmap.md and issues.jsonl // CONSTRAINT: All modifications below ONLY touch roadmap.md and issues.jsonl
// NEVER modify source code or project files during interactive rounds // NEVER modify source code or project files during interactive rounds
switch (feedback.feedback) { switch (feedbackChoice) {
case 'scope': case 'Adjust Scope':
// Collect scope adjustments // Collect scope adjustments
const scopeAdjustments = ASK_USER([ const scopeAdjustments = request_user_input({
{ id: "adjustments", type: "text", prompt: "Describe scope adjustments needed:" } questions: [{
]) // BLOCKS header: "Scope",
id: "adjustments",
question: "Describe scope adjustments needed:"
}]
}) // BLOCKS
// Update ONLY roadmap.md Roadmap table + Convergence sections // Update ONLY roadmap.md Roadmap table + Convergence sections
Edit({ path: `${sessionFolder}/roadmap.md`, /* scope changes */ }) Edit({ path: `${sessionFolder}/roadmap.md`, /* scope changes */ })
@@ -702,32 +706,36 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
break break
case 'convergence': case 'Modify Convergence':
// Collect convergence refinements // Collect convergence refinements
const convergenceRefinements = ASK_USER([ const convergenceRefinements = request_user_input({
{ id: "refinements", type: "text", prompt: "Describe convergence refinements needed:" } questions: [{
]) // BLOCKS header: "Convergence",
id: "refinements",
question: "Describe convergence refinements needed:"
}]
}) // BLOCKS
// Update ONLY roadmap.md Convergence Criteria section // Update ONLY roadmap.md Convergence Criteria section
Edit({ path: `${sessionFolder}/roadmap.md`, /* convergence changes */ }) Edit({ path: `${sessionFolder}/roadmap.md`, /* convergence changes */ })
break break
case 'replan': case 'Re-decompose':
// Return to Phase 2 with new strategy // Return to Phase 2 with new strategy
const newStrategy = ASK_USER([ const newStrategy = request_user_input({
{ questions: [{
header: "Strategy",
id: "strategy", id: "strategy",
type: "choice", question: "Select new decomposition strategy:",
prompt: "Select new decomposition strategy:",
options: [ options: [
{ value: "progressive", label: "Progressive" }, { label: "Progressive" },
{ value: "direct", label: "Direct" } { label: "Direct" }
] ]
} }]
]) // BLOCKS }) // BLOCKS
selectedMode = newStrategy.strategy selectedMode = newStrategy.answers.strategy.answers[0]
// Re-execute Phase 2 (updates roadmap.md + issues.jsonl only) // Re-execute Phase 2 (updates roadmap.md + issues.jsonl only)
break break
} }
@@ -793,47 +801,42 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
if (AUTO_YES) { if (AUTO_YES) {
nextStep = "done" // Default to done in auto mode nextStep = "done" // Default to done in auto mode
} else { } else {
const answer = ASK_USER([ const answer = request_user_input({
{ questions: [{
id: "next", header: "Next Step",
type: "choice", id: "next_step",
prompt: `${issueIds.length} issues ready. Next step:`, question: `${issueIds.length} issues ready. Next step:`,
options: [ options: [
{ value: "csv-wave", label: "Execute with csv-wave-pipeline (Recommended)", description: `Run all ${issueIds.length} issues via wave-based batch execution` }, { label: "View issues", description: "Display issue details" },
{ value: "view", label: "View issues", description: "Display issue details" }, { label: "Done", description: "Planning complete — show next-step commands" }
{ value: "done", label: "Done", description: "Save and exit" }
] ]
} }]
]) // BLOCKS (wait for user response) }) // BLOCKS (wait for user response)
nextStep = answer.next nextStep = answer.answers.next_step.answers[0]
} }
``` ```
3. **Execute Selection** 3. **Execute Selection**
```javascript ```javascript
switch (nextStep) { switch (nextStep) {
case 'csv-wave':
// Launch csv-wave-pipeline for wave-based batch execution
console.log(`\nTo execute, run:\n\n $csv-wave-pipeline "${requirement}"\n`)
break
case 'view': case 'view':
// Display issues from issues.jsonl // Display issues from issues.jsonl
Bash(`ccw issue list --session ${sessionId}`) Bash(`ccw issue list --session ${sessionId}`)
break // Fall through to show next-step commands
// STOP — do not execute anything
case 'done': case 'done':
// Output paths and end // Output paths and end — this skill is planning-only
console.log([ console.log([
`Roadmap saved: ${sessionFolder}/roadmap.md`, `Roadmap saved: ${sessionFolder}/roadmap.md`,
`Issues created: ${issueIds.length}`, `Issues created: ${issueIds.length}`,
'', '',
'To execute later:', 'Planning complete. To execute, run:',
` $csv-wave-pipeline "${requirement}"`, ` $csv-wave-pipeline "${requirement}"`,
` ccw issue list --session ${sessionId}` ` ccw issue list --session ${sessionId}`
].join('\n')) ].join('\n'))
break return // STOP — this skill is planning-only, NEVER proceed to execution
} }
``` ```
@@ -865,8 +868,9 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
3. **Iterate on Roadmap**: Use feedback rounds to refine, not recreate 3. **Iterate on Roadmap**: Use feedback rounds to refine, not recreate
4. **Testable Convergence**: criteria = assertions, DoD = business language 4. **Testable Convergence**: criteria = assertions, DoD = business language
5. **Explicit Lifecycle**: Always close_agent after wait completes to free resources 5. **Explicit Lifecycle**: Always close_agent after wait completes to free resources
6. **DO NOT STOP**: Continuous workflow until handoff complete 6. **Planning-Only Skill**: This skill ONLY produces roadmap and issues. It NEVER executes code, creates source files, or runs implementation. All code changes happen via separate execution skills after user manually triggers them
7. **Plan-Only Modifications**: Interactive feedback (Phase 3) MUST only update `roadmap.md` and `issues.jsonl`. NEVER modify source code, configuration files, or any project files during interactive rounds. Code changes happen only after handoff (Phase 4) via `$csv-wave-pipeline` or other execution skills 7. **Plan-Only Modifications**: Interactive feedback (Phase 3) MUST only update `roadmap.md` and `issues.jsonl`. NEVER modify source code, configuration files, or any project files during any phase. Code changes happen only after handoff when user manually runs `$csv-wave-pipeline` or other execution skills
8. **MANDATORY CONFIRMATION GATE**: After Phase 2 decomposition completes, you MUST present the roadmap to the user and wait for confirmation (Phase 3) before proceeding to handoff. NEVER skip Phase 3 user validation
--- ---
@@ -894,4 +898,4 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
--- ---
**Now execute roadmap-with-file for**: $ARGUMENTS **Now plan roadmap for**: $ARGUMENTS

View File

@@ -2,7 +2,7 @@
name: session-sync name: session-sync
description: Quick-sync session work to specs/*.md and project-tech.json description: Quick-sync session work to specs/*.md and project-tech.json
argument-hint: "[-y|--yes] [\"what was done\"]" argument-hint: "[-y|--yes] [\"what was done\"]"
allowed-tools: AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep allowed-tools: request_user_input, Read, Write, Edit, Bash, Glob, Grep
--- ---
# Session Sync # Session Sync
@@ -136,8 +136,18 @@ Target files:
`) `)
if (!AUTO_YES) { if (!AUTO_YES) {
const approved = CONFIRM("Apply these updates? (modify/skip items if needed)") // BLOCKS (wait for user response) const answer = request_user_input({
if (!approved) { questions: [{
header: "确认同步",
id: "confirm_sync",
question: "Apply these updates? (modify/skip items if needed)",
options: [
{ label: "Apply(Recommended)", description: "Apply all extracted updates to specs and project-tech.json" },
{ label: "Cancel", description: "Abort sync, no changes made" }
]
}]
}) // BLOCKS (wait for user response)
if (answer.answers.confirm_sync.answers[0] !== "Apply(Recommended)") {
console.log('Sync cancelled.') console.log('Sync cancelled.')
return return
} }

View File

@@ -2,7 +2,7 @@
name: spec-add name: spec-add
description: Add specs, conventions, constraints, or learnings to project guidelines interactively or automatically description: Add specs, conventions, constraints, or learnings to project guidelines interactively or automatically
argument-hint: "[-y|--yes] [--type <convention|constraint|learning>] [--category <category>] [--dimension <specs|personal>] [--scope <global|project>] [--interactive] \"rule text\"" argument-hint: "[-y|--yes] [--type <convention|constraint|learning>] [--category <category>] [--dimension <specs|personal>] [--scope <global|project>] [--interactive] \"rule text\""
allowed-tools: AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep allowed-tools: request_user_input, Read, Write, Edit, Bash, Glob, Grep
--- ---
# Spec Add Command # Spec Add Command
@@ -196,17 +196,18 @@ if (useInteractiveWizard) {
if (AUTO_YES) { if (AUTO_YES) {
dimension = 'specs' // Default to project specs in auto mode dimension = 'specs' // Default to project specs in auto mode
} else { } else {
const dimensionAnswer = ASK_USER([ const dimensionAnswer = request_user_input({
{ questions: [{
id: "dimension", type: "select", header: "Dimension",
prompt: "What type of spec do you want to create?", id: "dimension",
question: "What type of spec do you want to create?",
options: [ options: [
{ label: "Project Spec", description: "Coding conventions, constraints, quality rules for this project (stored in .ccw/specs/)" }, { label: "Project Spec(Recommended)", description: "Coding conventions, constraints, quality rules for this project (stored in .ccw/specs/)" },
{ label: "Personal Spec", description: "Personal preferences and constraints that follow you across projects (stored in ~/.ccw/specs/personal/ or .ccw/specs/personal/)" } { label: "Personal Spec", description: "Personal preferences and constraints that follow you across projects (stored in ~/.ccw/specs/personal/ or .ccw/specs/personal/)" }
] ]
} }]
]) // BLOCKS (wait for user response) }) // BLOCKS (wait for user response)
dimension = dimensionAnswer.dimension === "Project Spec" ? "specs" : "personal" dimension = dimensionAnswer.answers.dimension.answers[0] === "Project Spec(Recommended)" ? "specs" : "personal"
} }
} }
@@ -215,17 +216,18 @@ if (useInteractiveWizard) {
if (AUTO_YES) { if (AUTO_YES) {
scope = 'project' // Default to project scope in auto mode scope = 'project' // Default to project scope in auto mode
} else { } else {
const scopeAnswer = ASK_USER([ const scopeAnswer = request_user_input({
{ questions: [{
id: "scope", type: "select", header: "Scope",
prompt: "Where should this personal spec be stored?", id: "scope",
question: "Where should this personal spec be stored?",
options: [ options: [
{ label: "Global (Recommended)", description: "Apply to ALL projects (~/.ccw/specs/personal/)" }, { label: "Global(Recommended)", description: "Apply to ALL projects (~/.ccw/specs/personal/)" },
{ label: "Project-only", description: "Apply only to this project (.ccw/specs/personal/)" } { label: "Project-only", description: "Apply only to this project (.ccw/specs/personal/)" }
] ]
} }]
]) // BLOCKS (wait for user response) }) // BLOCKS (wait for user response)
scope = scopeAnswer.scope.includes("Global") ? "global" : "project" scope = scopeAnswer.answers.scope.answers[0] === "Global(Recommended)" ? "global" : "project"
} }
} }
@@ -234,19 +236,19 @@ if (useInteractiveWizard) {
if (AUTO_YES) { if (AUTO_YES) {
category = 'general' // Default to general in auto mode category = 'general' // Default to general in auto mode
} else { } else {
const categoryAnswer = ASK_USER([ const categoryAnswer = request_user_input({
{ questions: [{
id: "category", type: "select", header: "Category",
prompt: "Which workflow stage does this spec apply to?", id: "category",
question: "Which workflow stage does this spec apply to?",
options: [ options: [
{ label: "General (Recommended)", description: "Applies to all stages (default)" }, { label: "General(Recommended)", description: "Applies to all stages (default)" },
{ label: "Exploration", description: "Code exploration, analysis, debugging" }, { label: "Exploration", description: "Code exploration, analysis, debugging" },
{ label: "Planning", description: "Task planning, requirements gathering" }, { label: "Planning", description: "Task planning, requirements gathering" }
{ label: "Execution", description: "Implementation, testing, deployment" }
] ]
} }]
]) // BLOCKS (wait for user response) }) // BLOCKS (wait for user response)
const categoryLabel = categoryAnswer.category const categoryLabel = categoryAnswer.answers.category.answers[0]
category = categoryLabel.includes("General") ? "general" category = categoryLabel.includes("General") ? "general"
: categoryLabel.includes("Exploration") ? "exploration" : categoryLabel.includes("Exploration") ? "exploration"
: categoryLabel.includes("Planning") ? "planning" : categoryLabel.includes("Planning") ? "planning"
@@ -259,18 +261,19 @@ if (useInteractiveWizard) {
if (AUTO_YES) { if (AUTO_YES) {
type = 'convention' // Default to convention in auto mode type = 'convention' // Default to convention in auto mode
} else { } else {
const typeAnswer = ASK_USER([ const typeAnswer = request_user_input({
{ questions: [{
id: "type", type: "select", header: "Rule Type",
prompt: "What type of rule is this?", id: "rule_type",
question: "What type of rule is this?",
options: [ options: [
{ label: "Convention", description: "Coding style preference (e.g., use functional components)" }, { label: "Convention", description: "Coding style preference (e.g., use functional components)" },
{ label: "Constraint", description: "Hard rule that must not be violated (e.g., no direct DB access)" }, { label: "Constraint", description: "Hard rule that must not be violated (e.g., no direct DB access)" },
{ label: "Learning", description: "Insight or lesson learned (e.g., cache invalidation needs events)" } { label: "Learning", description: "Insight or lesson learned (e.g., cache invalidation needs events)" }
] ]
} }]
]) // BLOCKS (wait for user response) }) // BLOCKS (wait for user response)
const typeLabel = typeAnswer.type const typeLabel = typeAnswer.answers.rule_type.answers[0]
type = typeLabel.includes("Convention") ? "convention" type = typeLabel.includes("Convention") ? "convention"
: typeLabel.includes("Constraint") ? "constraint" : typeLabel.includes("Constraint") ? "constraint"
: "learning" : "learning"
@@ -283,13 +286,17 @@ if (useInteractiveWizard) {
console.log("Error: Rule text is required in auto mode. Provide rule text as argument.") console.log("Error: Rule text is required in auto mode. Provide rule text as argument.")
return return
} }
const contentAnswer = ASK_USER([ const contentAnswer = request_user_input({
{ questions: [{
id: "content", type: "text", header: "Content",
prompt: "Enter the rule or guideline text:" id: "content",
} question: "Enter the rule or guideline text:",
]) // BLOCKS (wait for user response) options: [
ruleText = contentAnswer.content { label: "Type in Other", description: "Enter your rule text via the Other input field" }
]
}]
}) // BLOCKS (wait for user response)
ruleText = contentAnswer.answers.content.answers[0]
} }
} }

View File

@@ -1,7 +1,7 @@
--- ---
name: spec-generator name: spec-generator
description: Specification generator - 7 phase document chain producing product brief, PRD, architecture, epics, and issues. Agent-delegated heavy phases (2-5, 6.5) with Codex review gates. Triggers on "generate spec", "create specification", "spec generator", "workflow:spec". description: Specification generator - 7 phase document chain producing product brief, PRD, architecture, epics, and issues. Agent-delegated heavy phases (2-5, 6.5) with Codex review gates. Triggers on "generate spec", "create specification", "spec generator", "workflow:spec".
allowed-tools: Agent, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep, Skill allowed-tools: Agent, request_user_input, TaskCreate, TaskUpdate, TaskList, Read, Write, Edit, Bash, Glob, Grep, Skill
--- ---
# Spec Generator # Spec Generator
@@ -260,7 +260,7 @@ Bash(`mkdir -p "${workDir}"`);
3. **Auto-Continue**: All phases run autonomously; check TaskList to execute next pending phase 3. **Auto-Continue**: All phases run autonomously; check TaskList to execute next pending phase
4. **Parse Every Output**: Extract required data from each phase for next phase context 4. **Parse Every Output**: Extract required data from each phase for next phase context
5. **DO NOT STOP**: Continuous 7-phase pipeline until all phases complete or user exits 5. **DO NOT STOP**: Continuous 7-phase pipeline until all phases complete or user exits
6. **Respect -y Flag**: When auto mode, skip all AskUserQuestion calls, use recommended defaults 6. **Respect -y Flag**: When auto mode, skip all request_user_input calls, use recommended defaults
7. **Respect -c Flag**: When continue mode, load spec-config.json and resume from checkpoint 7. **Respect -c Flag**: When continue mode, load spec-config.json and resume from checkpoint
8. **Inject Glossary**: From Phase 3 onward, inject glossary.json terms into every CLI prompt 8. **Inject Glossary**: From Phase 3 onward, inject glossary.json terms into every CLI prompt
9. **Load Profile**: Read templates/profiles/{spec_type}-profile.md and inject requirements into Phase 2-5 prompts 9. **Load Profile**: Read templates/profiles/{spec_type}-profile.md and inject requirements into Phase 2-5 prompts

View File

@@ -140,12 +140,12 @@ while (!userSatisfied && requirementState.discussion_rounds < 5) {
// Format questions and suggestions from gapAnalysis for display // Format questions and suggestions from gapAnalysis for display
// Present as a structured summary to the user // Present as a structured summary to the user
AskUserQuestion({ request_user_input({
questions: [ questions: [
{ {
question: buildDiscussionPrompt(gapAnalysis, requirementState),
header: "Req Expand", header: "Req Expand",
multiSelect: false, id: "req_expand",
question: buildDiscussionPrompt(gapAnalysis, requirementState),
options: [ options: [
{ label: "I'll answer", description: "I have answers/feedback to provide (type in 'Other')" }, { label: "I'll answer", description: "I have answers/feedback to provide (type in 'Other')" },
{ label: "Accept all suggestions", description: "Accept all expansion recommendations as-is" }, { label: "Accept all suggestions", description: "Accept all expansion recommendations as-is" },
@@ -194,12 +194,12 @@ CONSTRAINTS: 避免重复已回答的问题,聚焦未覆盖的领域
// If status === "ready_for_confirmation", break to confirmation step // If status === "ready_for_confirmation", break to confirmation step
// If status === "need_more_discussion", present follow-up questions // If status === "need_more_discussion", present follow-up questions
AskUserQuestion({ request_user_input({
questions: [ questions: [
{ {
question: buildFollowUpPrompt(followUpAnalysis, requirementState),
header: "Follow-up", header: "Follow-up",
multiSelect: false, id: "follow_up",
question: buildFollowUpPrompt(followUpAnalysis, requirementState),
options: [ options: [
{ label: "I'll answer", description: "I have more feedback (type in 'Other')" }, { label: "I'll answer", description: "I have more feedback (type in 'Other')" },
{ label: "Looks good", description: "Requirements are sufficiently clear now" }, { label: "Looks good", description: "Requirements are sufficiently clear now" },
@@ -300,14 +300,14 @@ if (!autoMode) {
// Build confirmation summary from requirementState // Build confirmation summary from requirementState
const summary = buildConfirmationSummary(requirementState); const summary = buildConfirmationSummary(requirementState);
AskUserQuestion({ request_user_input({
questions: [ questions: [
{ {
question: `## Requirement Confirmation\n\n${summary}\n\nConfirm and proceed to specification generation?`,
header: "Confirm", header: "Confirm",
multiSelect: false, id: "confirm",
question: `## Requirement Confirmation\n\n${summary}\n\nConfirm and proceed to specification generation?`,
options: [ options: [
{ label: "Confirm & proceed", description: "Requirements confirmed, start spec generation" }, { label: "Confirm & proceed(Recommended)", description: "Requirements confirmed, start spec generation" },
{ label: "Need adjustments", description: "Go back and refine further" } { label: "Need adjustments", description: "Go back and refine further" }
] ]
} }

View File

@@ -159,42 +159,35 @@ Schema:
```javascript ```javascript
if (!autoMode) { if (!autoMode) {
// Confirm problem statement and select depth // Confirm problem statement and select depth
AskUserQuestion({ request_user_input({
questions: [ questions: [
{ {
question: `Problem statement: "${seedAnalysis.problem_statement}" - Is this accurate?`,
header: "Problem", header: "Problem",
multiSelect: false, id: "problem",
question: `Problem statement: "${seedAnalysis.problem_statement}" - Is this accurate?`,
options: [ options: [
{ label: "Accurate", description: "Proceed with this problem statement" }, { label: "Accurate(Recommended)", description: "Proceed with this problem statement" },
{ label: "Needs adjustment", description: "I'll refine the problem statement" } { label: "Needs adjustment", description: "I'll refine the problem statement" }
] ]
}, },
{ {
question: "What specification depth do you need?",
header: "Depth", header: "Depth",
multiSelect: false, id: "depth",
question: "What specification depth do you need?",
options: [ options: [
{ label: "Standard(Recommended)", description: "Balanced detail for most projects" },
{ label: "Light", description: "Quick overview - key decisions only" }, { label: "Light", description: "Quick overview - key decisions only" },
{ label: "Standard (Recommended)", description: "Balanced detail for most projects" },
{ label: "Comprehensive", description: "Maximum detail for complex/critical projects" } { label: "Comprehensive", description: "Maximum detail for complex/critical projects" }
] ]
}, },
{ {
question: "Which areas should we focus on?",
header: "Focus",
multiSelect: true,
options: seedAnalysis.dimensions.map(d => ({ label: d, description: `Explore ${d} in depth` }))
},
{
question: "What type of specification is this?",
header: "Spec Type", header: "Spec Type",
multiSelect: false, id: "spec_type",
question: "What type of specification is this?",
options: [ options: [
{ label: "Service (Recommended)", description: "Long-running service with lifecycle, state machine, observability" }, { label: "Service(Recommended)", description: "Long-running service with lifecycle, state machine, observability" },
{ label: "API", description: "REST/GraphQL API with endpoints, auth, rate limiting" }, { label: "API", description: "REST/GraphQL API with endpoints, auth, rate limiting" },
{ label: "Library/SDK", description: "Reusable package with public API surface, examples" }, { label: "Library/SDK", description: "Reusable package with public API surface, examples" }
{ label: "Platform", description: "Multi-component system, uses Service profile" }
] ]
} }
] ]

View File

@@ -174,18 +174,18 @@ const synthesis = {
```javascript ```javascript
if (!autoMode) { if (!autoMode) {
// Present synthesis summary to user // Present synthesis summary to user
// AskUserQuestion with: // request_user_input with:
// - Confirm vision statement // - Confirm vision statement
// - Resolve any conflicts between perspectives // - Resolve any conflicts between perspectives
// - Adjust scope if needed // - Adjust scope if needed
AskUserQuestion({ request_user_input({
questions: [ questions: [
{ {
question: "Review the synthesized product brief. Any adjustments needed?",
header: "Review", header: "Review",
multiSelect: false, id: "review",
question: "Review the synthesized product brief. Any adjustments needed?",
options: [ options: [
{ label: "Looks good", description: "Proceed to PRD generation" }, { label: "Looks good(Recommended)", description: "Proceed to PRD generation" },
{ label: "Adjust scope", description: "Narrow or expand the scope" }, { label: "Adjust scope", description: "Narrow or expand the scope" },
{ label: "Revise vision", description: "Refine the vision statement" } { label: "Revise vision", description: "Refine the vision statement" }
] ]

View File

@@ -123,24 +123,24 @@ CONSTRAINTS: Be genuinely critical. Focus on requirements that would block imple
if (!autoMode) { if (!autoMode) {
// Present requirements grouped by initial priority // Present requirements grouped by initial priority
// Allow user to adjust MoSCoW labels // Allow user to adjust MoSCoW labels
AskUserQuestion({ request_user_input({
questions: [ questions: [
{ {
question: "Review the Must-Have requirements. Any that should be reprioritized?",
header: "Must-Have", header: "Must-Have",
multiSelect: false, id: "must_have",
question: "Review the Must-Have requirements. Any that should be reprioritized?",
options: [ options: [
{ label: "All correct", description: "Must-have requirements are accurate" }, { label: "All correct(Recommended)", description: "Must-have requirements are accurate" },
{ label: "Too many", description: "Some should be Should/Could" }, { label: "Too many", description: "Some should be Should/Could" },
{ label: "Missing items", description: "Some Should requirements should be Must" } { label: "Missing items", description: "Some Should requirements should be Must" }
] ]
}, },
{ {
question: "What is the target MVP scope?",
header: "MVP Scope", header: "MVP Scope",
multiSelect: false, id: "mvp_scope",
question: "What is the target MVP scope?",
options: [ options: [
{ label: "Must-Have only (Recommended)", description: "MVP includes only Must requirements" }, { label: "Must-Have only(Recommended)", description: "MVP includes only Must requirements" },
{ label: "Must + key Should", description: "Include critical Should items in MVP" }, { label: "Must + key Should", description: "Include critical Should items in MVP" },
{ label: "Comprehensive", description: "Include all Must and Should" } { label: "Comprehensive", description: "Include all Must and Should" }
] ]

View File

@@ -154,14 +154,14 @@ CONSTRAINTS: Be genuinely critical, not just validating. Focus on actionable imp
if (!autoMode) { if (!autoMode) {
// Present ADRs with review feedback to user // Present ADRs with review feedback to user
// For each ADR where review raised concerns: // For each ADR where review raised concerns:
AskUserQuestion({ request_user_input({
questions: [ questions: [
{ {
question: "Architecture review raised concerns. How should we proceed?",
header: "ADR Review", header: "ADR Review",
multiSelect: false, id: "adr_review",
question: "Architecture review raised concerns. How should we proceed?",
options: [ options: [
{ label: "Accept as-is", description: "Architecture is sound, proceed" }, { label: "Accept as-is(Recommended)", description: "Architecture is sound, proceed" },
{ label: "Incorporate feedback", description: "Adjust ADRs based on review" }, { label: "Incorporate feedback", description: "Adjust ADRs based on review" },
{ label: "Simplify", description: "Reduce complexity, fewer components" } { label: "Simplify", description: "Reduce complexity, fewer components" }
] ]

View File

@@ -133,17 +133,16 @@ CONSTRAINTS: Focus on issues that would block execution planning. Be specific ab
```javascript ```javascript
if (!autoMode) { if (!autoMode) {
// Present Epic overview table and dependency diagram // Present Epic overview table and dependency diagram
AskUserQuestion({ request_user_input({
questions: [ questions: [
{ {
question: "Review the Epic breakdown. Any adjustments needed?",
header: "Epics", header: "Epics",
multiSelect: false, id: "epics",
question: "Review the Epic breakdown. Any adjustments needed?",
options: [ options: [
{ label: "Looks good", description: "Epic structure is appropriate" }, { label: "Looks good(Recommended)", description: "Epic structure is appropriate" },
{ label: "Merge epics", description: "Some epics should be combined" }, { label: "Merge epics", description: "Some epics should be combined" },
{ label: "Split epic", description: "An epic is too large, needs splitting" }, { label: "Split epic", description: "An epic is too large, needs splitting" }
{ label: "Adjust MVP", description: "Change which epics are in MVP" }
] ]
} }
] ]

View File

@@ -312,29 +312,21 @@ Write(`${workDir}/spec-config.json`, JSON.stringify(specConfig, null, 2));
### Step 6: Handoff Options ### Step 6: Handoff Options
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [ questions: [
{ {
question: "Specification package is complete. What would you like to do next?",
header: "Next Step", header: "Next Step",
multiSelect: false, id: "next_step",
question: "Specification package is complete. What would you like to do next?",
options: [ options: [
{
label: "Export Issues(Recommended)",
description: "Create issues per Epic with spec links and wave assignment (Phase 7)"
},
{ {
label: "Execute via lite-plan", label: "Execute via lite-plan",
description: "Start implementing with /workflow-lite-plan, one Epic at a time" description: "Start implementing with /workflow-lite-plan, one Epic at a time"
}, },
{
label: "Create roadmap",
description: "Generate execution roadmap with /workflow:req-plan-with-file"
},
{
label: "Full planning",
description: "Detailed planning with /workflow-plan for the full scope"
},
{
label: "Export Issues (Phase 7)",
description: "Create issues per Epic with spec links and wave assignment"
},
{ {
label: "Iterate & improve", label: "Iterate & improve",
description: "Re-run failed phases based on readiness report issues (max 2 iterations)" description: "Re-run failed phases based on readiness report issues (max 2 iterations)"
@@ -344,7 +336,8 @@ AskUserQuestion({
] ]
}); });
// Based on user selection, execute the corresponding handoff: // Based on user selection (answer.answers.next_step.answers[0]), execute the corresponding handoff:
const selection = answer.answers.next_step.answers[0];
if (selection === "Execute via lite-plan") { if (selection === "Execute via lite-plan") {
// lite-plan accepts a text description directly // lite-plan accepts a text description directly
@@ -489,7 +482,7 @@ ${extractSection(epicContent, "Architecture")}
} }
} }
if (selection === "Export Issues (Phase 7)") { if (selection === "Export Issues(Recommended)") {
// Proceed to Phase 7: Issue Export // Proceed to Phase 7: Issue Export
// Read phases/07-issue-export.md and execute // Read phases/07-issue-export.md and execute
} }

View File

@@ -253,25 +253,21 @@ Write(`${workDir}/spec-config.json`, JSON.stringify(specConfig, null, 2));
### Step 7: Handoff Options ### Step 7: Handoff Options
```javascript ```javascript
AskUserQuestion({ const answer = request_user_input({
questions: [ questions: [
{ {
question: `${createdIssues.length} issues created from ${epicWaves.length} Epics. What would you like to do next?`,
header: "Next Step", header: "Next Step",
multiSelect: false, id: "next_step",
question: `${createdIssues.length} issues created from ${epicWaves.length} Epics. What would you like to do next?`,
options: [ options: [
{ {
label: "Execute via team-planex", label: "Execute via team-planex(Recommended)",
description: `Execute all ${createdIssues.length} issues with coordinated team workflow` description: `Execute all ${createdIssues.length} issues with coordinated team workflow`
}, },
{ {
label: "Wave 1 only", label: "Wave 1 only",
description: `Execute ${wave1.length} MVP issues first` description: `Execute ${wave1.length} MVP issues first`
}, },
{
label: "View issues",
description: "Browse created issues before deciding"
},
{ {
label: "Done", label: "Done",
description: "Export complete, handle manually" description: "Export complete, handle manually"
@@ -282,7 +278,8 @@ AskUserQuestion({
}); });
// Based on user selection: // Based on user selection:
if (selection === "Execute via team-planex") { const selection = answer.answers.next_step.answers[0];
if (selection === "Execute via team-planex(Recommended)") {
const issueIds = createdIssues.map(i => i.issue_id).join(','); const issueIds = createdIssues.map(i => i.issue_id).join(',');
Skill({ skill: "team-planex", args: `--issues ${issueIds}` }); Skill({ skill: "team-planex", args: `--issues ${issueIds}` });
} }
@@ -292,8 +289,8 @@ if (selection === "Wave 1 only") {
Skill({ skill: "team-planex", args: `--issues ${wave1Ids}` }); Skill({ skill: "team-planex", args: `--issues ${wave1Ids}` });
} }
if (selection === "View issues") { if (selection === "Done") {
Bash(`ccw issue list --tag spec:${specConfig.session_id}`); // Export complete, handle manually
} }
``` ```

View File

@@ -2,7 +2,7 @@
name: spec-setup name: spec-setup
description: Initialize project-level state and configure specs via interactive questionnaire using cli-explore-agent description: Initialize project-level state and configure specs via interactive questionnaire using cli-explore-agent
argument-hint: "[--regenerate] [--skip-specs] [--reset]" argument-hint: "[--regenerate] [--skip-specs] [--reset]"
allowed-tools: spawn_agent, wait, send_input, close_agent, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep allowed-tools: spawn_agent, wait, send_input, close_agent, request_user_input, Read, Write, Edit, Bash, Glob, Grep
--- ---
# Workflow Spec Setup Command # Workflow Spec Setup Command
@@ -229,18 +229,18 @@ const specsData = JSON.parse(specsList)
const isPopulated = (specsData.total || 0) > 5 // More than seed docs const isPopulated = (specsData.total || 0) > 5 // More than seed docs
if (isPopulated && !reset) { if (isPopulated && !reset) {
const mode = ASK_USER([ const mode = request_user_input({
{ questions: [{
id: "mode", type: "select", header: "Guidelines",
prompt: "Project guidelines already contain entries. How would you like to proceed?", id: "mode",
question: "Project guidelines already contain entries. How would you like to proceed?",
options: [ options: [
{ label: "Append", description: "Keep existing entries and add new ones from the wizard" }, { label: "Append(Recommended)", description: "Keep existing entries and add new ones from the wizard" },
{ label: "Reset", description: "Clear all existing entries and start fresh" }, { label: "Reset", description: "Clear all existing entries and start fresh" },
{ label: "Cancel", description: "Exit without changes" } { label: "Cancel", description: "Exit without changes" }
], ]
default: "Append" }]
} }) // BLOCKS (wait for user response)
]) // BLOCKS (wait for user response)
// If Cancel -> exit // If Cancel -> exit
// If Reset -> clear all arrays before proceeding // If Reset -> clear all arrays before proceeding
@@ -273,7 +273,7 @@ const buildTools = specData.overview?.technology_stack?.build_tools || []
#### Step 5.2: Multi-Round Questionnaire #### Step 5.2: Multi-Round Questionnaire
Each round uses `ASK_USER` with project-aware options. The user can always select "Other" to provide custom input. Each round uses `request_user_input` with project-aware options. The user can always select "Other" to provide custom input.
**CRITICAL**: After each round, collect the user's answers and convert them into guideline entries. Do NOT batch all rounds -- process each round's answers before proceeding to the next. **CRITICAL**: After each round, collect the user's answers and convert them into guideline entries. Do NOT batch all rounds -- process each round's answers before proceeding to the next.
@@ -312,23 +312,26 @@ codingStyleOptions.push(
) )
// Round 1: Coding Conventions // Round 1: Coding Conventions
const round1 = ASK_USER([ const round1 = request_user_input({
{ questions: [
id: "coding_style", type: "multi-select", {
prompt: `Your project uses ${primaryLang}. Which coding style conventions do you follow?`, header: "Code Style",
options: codingStyleOptions.slice(0, 4) // Max 4 options id: "coding_style",
}, question: `Your project uses ${primaryLang}. Which coding style conventions do you follow?`,
{ options: codingStyleOptions.slice(0, 3) // Max 3 options
id: "naming", type: "multi-select", },
prompt: `What naming conventions does your ${primaryLang} project use?`, {
options: [ header: "Naming",
{ label: "camelCase variables", description: "Variables and functions use camelCase (e.g., getUserName)" }, id: "naming",
{ label: "PascalCase types", description: "Classes, interfaces, type aliases use PascalCase (e.g., UserService)" }, question: `What naming conventions does your ${primaryLang} project use?`,
{ label: "UPPER_SNAKE constants", description: "Constants use UPPER_SNAKE_CASE (e.g., MAX_RETRIES)" }, options: [
{ label: "Prefix interfaces", description: "Prefix interfaces with 'I' (e.g., IUserService)" } { label: "camelCase variables", description: "Variables and functions use camelCase (e.g., getUserName)" },
] { label: "PascalCase types", description: "Classes, interfaces, type aliases use PascalCase (e.g., UserService)" },
} { label: "UPPER_SNAKE constants", description: "Constants use UPPER_SNAKE_CASE (e.g., MAX_RETRIES)" }
]) // BLOCKS (wait for user response) ]
}
]
}) // BLOCKS (wait for user response)
``` ```
**Process Round 1 answers** -> add to `conventions.coding_style` and `conventions.naming_patterns` arrays. **Process Round 1 answers** -> add to `conventions.coding_style` and `conventions.naming_patterns` arrays.
@@ -339,28 +342,30 @@ const round1 = ASK_USER([
```javascript ```javascript
// Round 2: File Structure & Documentation // Round 2: File Structure & Documentation
const round2 = ASK_USER([ const round2 = request_user_input({
{ questions: [
id: "file_structure", type: "multi-select", {
prompt: `Your project has a ${archStyle} architecture. What file organization rules apply?`, header: "File Org",
options: [ id: "file_structure",
{ label: "Co-located tests", description: "Test files live next to source files (e.g., foo.ts + foo.test.ts)" }, question: `Your project has a ${archStyle} architecture. What file organization rules apply?`,
{ label: "Separate test dir", description: "Tests in a dedicated __tests__ or tests/ directory" }, options: [
{ label: "One export per file", description: "Each file exports a single main component/class/function" }, { label: "Co-located tests", description: "Test files live next to source files (e.g., foo.ts + foo.test.ts)" },
{ label: "Index barrels", description: "Use index.ts barrel files for clean imports from directories" } { label: "Separate test dir", description: "Tests in a dedicated __tests__ or tests/ directory" },
] { label: "One export per file", description: "Each file exports a single main component/class/function" }
}, ]
{ },
id: "documentation", type: "multi-select", {
prompt: "What documentation standards does your project follow?", header: "Docs",
options: [ id: "documentation",
{ label: "JSDoc/docstring public APIs", description: "All public functions and classes must have JSDoc/docstrings" }, question: "What documentation standards does your project follow?",
{ label: "README per module", description: "Each major module/package has its own README" }, options: [
{ label: "Inline comments for why", description: "Comments explain 'why', not 'what' -- code should be self-documenting" }, { label: "JSDoc/docstring public APIs", description: "All public functions and classes must have JSDoc/docstrings" },
{ label: "No comment requirement", description: "Code should be self-explanatory; comments only for non-obvious logic" } { label: "Inline comments for why", description: "Comments explain 'why', not 'what' -- code should be self-documenting" },
] { label: "No comment requirement", description: "Code should be self-explanatory; comments only for non-obvious logic" }
} ]
]) // BLOCKS (wait for user response) }
]
}) // BLOCKS (wait for user response)
``` ```
**Process Round 2 answers** -> add to `conventions.file_structure` and `conventions.documentation`. **Process Round 2 answers** -> add to `conventions.file_structure` and `conventions.documentation`.
@@ -390,23 +395,26 @@ archOptions.push(
) )
// Round 3: Architecture & Tech Stack Constraints // Round 3: Architecture & Tech Stack Constraints
const round3 = ASK_USER([ const round3 = request_user_input({
{ questions: [
id: "architecture", type: "multi-select", {
prompt: `Your ${archStyle} architecture uses ${archPatterns.join(', ') || 'various'} patterns. What architecture constraints apply?`, header: "Architecture",
options: archOptions.slice(0, 4) id: "architecture",
}, question: `Your ${archStyle} architecture uses ${archPatterns.join(', ') || 'various'} patterns. What architecture constraints apply?`,
{ options: archOptions.slice(0, 3)
id: "tech_stack", type: "multi-select", },
prompt: `Tech stack: ${frameworks.join(', ')}. What technology constraints apply?`, {
options: [ header: "Tech Stack",
{ label: "No new deps without review", description: "Adding new dependencies requires explicit justification and review" }, id: "tech_stack",
{ label: "Pin dependency versions", description: "All dependencies must use exact versions, not ranges" }, question: `Tech stack: ${frameworks.join(', ')}. What technology constraints apply?`,
{ label: "Prefer native APIs", description: "Use built-in/native APIs over third-party libraries when possible" }, options: [
{ label: "Framework conventions", description: `Follow official ${frameworks[0] || 'framework'} conventions and best practices` } { label: "No new deps without review", description: "Adding new dependencies requires explicit justification and review" },
] { label: "Pin dependency versions", description: "All dependencies must use exact versions, not ranges" },
} { label: "Prefer native APIs", description: "Use built-in/native APIs over third-party libraries when possible" }
]) // BLOCKS (wait for user response) ]
}
]
}) // BLOCKS (wait for user response)
``` ```
**Process Round 3 answers** -> add to `constraints.architecture` and `constraints.tech_stack`. **Process Round 3 answers** -> add to `constraints.architecture` and `constraints.tech_stack`.
@@ -417,28 +425,30 @@ const round3 = ASK_USER([
```javascript ```javascript
// Round 4: Performance & Security Constraints // Round 4: Performance & Security Constraints
const round4 = ASK_USER([ const round4 = request_user_input({
{ questions: [
id: "performance", type: "multi-select", {
prompt: "What performance requirements does your project have?", header: "Performance",
options: [ id: "performance",
{ label: "API response time", description: "API endpoints must respond within 200ms (p95)" }, question: "What performance requirements does your project have?",
{ label: "Bundle size limit", description: "Frontend bundle size must stay under 500KB gzipped" }, options: [
{ label: "Lazy loading", description: "Large modules/routes must use lazy loading / code splitting" }, { label: "API response time", description: "API endpoints must respond within 200ms (p95)" },
{ label: "No N+1 queries", description: "Database access must avoid N+1 query patterns" } { label: "Bundle size limit", description: "Frontend bundle size must stay under 500KB gzipped" },
] { label: "No N+1 queries", description: "Database access must avoid N+1 query patterns" }
}, ]
{ },
id: "security", type: "multi-select", {
prompt: "What security requirements does your project enforce?", header: "Security",
options: [ id: "security",
{ label: "Input sanitization", description: "All user input must be validated and sanitized before use" }, question: "What security requirements does your project enforce?",
{ label: "No secrets in code", description: "No API keys, passwords, or tokens in source code -- use env vars" }, options: [
{ label: "Auth on all endpoints", description: "All API endpoints require authentication unless explicitly public" }, { label: "Input sanitization", description: "All user input must be validated and sanitized before use" },
{ label: "Parameterized queries", description: "All database queries must use parameterized/prepared statements" } { label: "No secrets in code", description: "No API keys, passwords, or tokens in source code -- use env vars" },
] { label: "Auth on all endpoints", description: "All API endpoints require authentication unless explicitly public" }
} ]
]) // BLOCKS (wait for user response) }
]
}) // BLOCKS (wait for user response)
``` ```
**Process Round 4 answers** -> add to `constraints.performance` and `constraints.security`. **Process Round 4 answers** -> add to `constraints.performance` and `constraints.security`.
@@ -449,18 +459,20 @@ const round4 = ASK_USER([
```javascript ```javascript
// Round 5: Quality Rules // Round 5: Quality Rules
const round5 = ASK_USER([ const round5 = request_user_input({
{ questions: [
id: "quality", type: "multi-select", {
prompt: `Testing with ${testFrameworks.join(', ') || 'your test framework'}. What quality rules apply?`, header: "Quality",
options: [ id: "quality",
{ label: "Min test coverage", description: "Minimum 80% code coverage for new code; no merging below threshold" }, question: `Testing with ${testFrameworks.join(', ') || 'your test framework'}. What quality rules apply?`,
{ label: "No skipped tests", description: "Tests must not be skipped (.skip/.only) in committed code" }, options: [
{ label: "Lint must pass", description: "All code must pass linter checks before commit (enforced by pre-commit)" }, { label: "Min test coverage", description: "Minimum 80% code coverage for new code; no merging below threshold" },
{ label: "Type check must pass", description: "Full type checking (tsc --noEmit) must pass with zero errors" } { label: "No skipped tests", description: "Tests must not be skipped (.skip/.only) in committed code" },
] { label: "Lint must pass", description: "All code must pass linter checks before commit (enforced by pre-commit)" }
} ]
]) // BLOCKS (wait for user response) }
]
}) // BLOCKS (wait for user response)
``` ```
**Process Round 5 answers** -> add to `quality_rules` array as `{ rule, scope, enforced_by }` objects. **Process Round 5 answers** -> add to `quality_rules` array as `{ rule, scope, enforced_by }` objects.

View File

@@ -2,7 +2,7 @@
name: team-arch-opt name: team-arch-opt
description: Architecture optimization team skill. Analyzes codebase architecture, designs refactoring plans, implements changes, validates improvements, and reviews code quality via CSV wave pipeline with interactive review-fix cycles. description: Architecture optimization team skill. Analyzes codebase architecture, designs refactoring plans, implements changes, validates improvements, and reviews code quality via CSV wave pipeline with interactive review-fix cycles.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"architecture optimization task description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"architecture optimization task description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -44,7 +44,7 @@ Orchestrate multi-agent architecture optimization: analyze codebase structure, d
| Phase 0: Pre-Wave Interactive (Requirement Clarification) | | Phase 0: Pre-Wave Interactive (Requirement Clarification) |
| +- Parse user task description | | +- Parse user task description |
| +- Detect scope: targeted module vs full architecture | | +- Detect scope: targeted module vs full architecture |
| +- Clarify ambiguous requirements (AskUserQuestion) | | +- Clarify ambiguous requirements (request_user_input) |
| +- Output: refined requirements for decomposition | | +- Output: refined requirements for decomposition |
| | | |
| Phase 1: Requirement -> CSV + Classification | | Phase 1: Requirement -> CSV + Classification |
@@ -275,13 +275,13 @@ Write(`${sessionFolder}/wisdom/patterns.md`, '# Patterns & Conventions\n')
4. **Clarify if ambiguous** (skip if AUTO_YES): 4. **Clarify if ambiguous** (skip if AUTO_YES):
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Please confirm the architecture optimization scope:", question: "Please confirm the architecture optimization scope.",
header: "Architecture Scope", header: "Scope",
multiSelect: false, id: "arch_scope",
options: [ options: [
{ label: "Proceed as described", description: "Scope is clear" }, { label: "Proceed (Recommended)", description: "Scope is clear, start analysis" },
{ label: "Narrow scope", description: "Specify modules/files to focus on" }, { label: "Narrow scope", description: "Specify modules/files to focus on" },
{ label: "Add constraints", description: "Exclude areas, set priorities" } { label: "Add constraints", description: "Exclude areas, set priorities" }
] ]
@@ -522,13 +522,13 @@ Session: ${sessionFolder}
// 3. Completion action // 3. Completion action
if (!AUTO_YES) { if (!AUTO_YES) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Architecture optimization complete. What would you like to do?", question: "Architecture optimization complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" },
{ label: "Retry Failed", description: "Re-run failed tasks" } { label: "Retry Failed", description: "Re-run failed tasks" }
] ]

View File

@@ -34,7 +34,7 @@ Handle pipeline completion action for architecture optimization: present results
| `Read` | builtin | Load result artifacts | | `Read` | builtin | Load result artifacts |
| `Write` | builtin | Write export files | | `Write` | builtin | Write export files |
| `Bash` | builtin | Archive/cleanup operations | | `Bash` | builtin | Archive/cleanup operations |
| `AskUserQuestion` | builtin | Present completion choices | | `request_user_input` | builtin | Present completion choices |
--- ---
@@ -74,11 +74,11 @@ Handle pipeline completion action for architecture optimization: present results
2. Present completion action: 2. Present completion action:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Architecture optimization complete. What would you like to do?", question: "Architecture optimization complete. What would you like to do?",
header: "Completion", header: "Completion",
multiSelect: false, id: "completion_action",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work or inspection" }, { label: "Keep Active", description: "Keep session for follow-up work or inspection" },

View File

@@ -2,7 +2,7 @@
name: team-brainstorm name: team-brainstorm
description: Multi-agent brainstorming pipeline with Generator-Critic loop. Generates ideas, challenges assumptions, synthesizes themes, and evaluates proposals. Supports Quick, Deep, and Full pipeline modes. description: Multi-agent brainstorming pipeline with Generator-Critic loop. Generates ideas, challenges assumptions, synthesizes themes, and evaluates proposals. Supports Quick, Deep, and Full pipeline modes.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"topic description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"topic description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -278,16 +278,15 @@ If not AUTO_YES, present user with pipeline mode selection for confirmation:
```javascript ```javascript
if (!AUTO_YES) { if (!AUTO_YES) {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: `Topic: "${topic}"\nRecommended pipeline: ${pipeline_mode} (complexity: ${complexity_score})\nAngles: ${angles.join(', ')}\n\nApprove?`, question: `Topic: "${topic}"Recommended: ${pipeline_mode}. Approve or override?`,
header: "Pipeline Selection", header: "Pipeline",
multiSelect: false, id: "pipeline_select",
options: [ options: [
{ label: "Approve", description: `Use ${pipeline_mode} pipeline` }, { label: "Approve (Recommended)", description: `Use ${pipeline_mode} pipeline (complexity: ${complexity_score})` },
{ label: "Quick", description: "3 tasks: generate challenge synthesize" }, { label: "Quick", description: "3 tasks: generate -> challenge -> synthesize" },
{ label: "Deep", description: "6 tasks: generate → challenge → revise → re-challenge → synthesize → evaluate" }, { label: "Deep/Full", description: "6-7 tasks: parallel generation, GC loop, evaluation" }
{ label: "Full", description: "7 tasks: 3x parallel generation → challenge → revise → synthesize → evaluate" }
] ]
}] }]
}) })

View File

@@ -2,7 +2,7 @@
name: team-coordinate name: team-coordinate
description: Universal team coordination skill with dynamic role generation. Analyzes task, generates worker roles at runtime, decomposes into CSV tasks with dependency waves, dispatches parallel CSV agents per wave. Coordinator is orchestrator; all workers are CSV or interactive agents with dynamically generated instructions. description: Universal team coordination skill with dynamic role generation. Analyzes task, generates worker roles at runtime, decomposes into CSV tasks with dependency waves, dispatches parallel CSV agents per wave. Coordinator is orchestrator; all workers are CSV or interactive agents with dynamically generated instructions.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"task description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"task description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -43,7 +43,7 @@ Universal team coordination: analyze task -> detect capabilities -> generate dyn
| | | |
| Phase 0: Pre-Wave Interactive (Requirement Clarification) | | Phase 0: Pre-Wave Interactive (Requirement Clarification) |
| +- Parse user task description | | +- Parse user task description |
| +- Clarify ambiguous requirements (AskUserQuestion) | | +- Clarify ambiguous requirements (request_user_input) |
| +- Output: refined requirements for decomposition | | +- Output: refined requirements for decomposition |
| | | |
| Phase 1: Requirement -> CSV + Classification | | Phase 1: Requirement -> CSV + Classification |
@@ -245,13 +245,13 @@ Write(`${sessionFolder}/wisdom/decisions.md`, '# Decisions\n')
3. **Clarify if ambiguous** (skip if AUTO_YES): 3. **Clarify if ambiguous** (skip if AUTO_YES):
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Please confirm the task scope and deliverables:", question: "Please confirm the task scope and deliverables.",
header: "Task Clarification", header: "Scope",
multiSelect: false, id: "task_scope",
options: [ options: [
{ label: "Proceed as described", description: "Task is clear enough" }, { label: "Proceed (Recommended)", description: "Task is clear enough" },
{ label: "Narrow scope", description: "Specify files/modules/areas" }, { label: "Narrow scope", description: "Specify files/modules/areas" },
{ label: "Add constraints", description: "Timeline, tech stack, style" } { label: "Add constraints", description: "Timeline, tech stack, style" }
] ]
@@ -482,13 +482,13 @@ Session: ${sessionFolder}
// 2. Completion action // 2. Completion action
if (!AUTO_YES) { if (!AUTO_YES) {
const choice = AskUserQuestion({ const choice = request_user_input({
questions: [{ questions: [{
question: "Team pipeline complete. What would you like to do?", question: "Team pipeline complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" },
{ label: "Retry Failed", description: "Re-run failed tasks" } { label: "Retry Failed", description: "Re-run failed tasks" }
] ]
@@ -609,7 +609,7 @@ See `instructions/agent-instruction.md` for the base instruction template that i
| discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries | | discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries |
| No capabilities detected | Default to single `general` role with TASK prefix | | No capabilities detected | Default to single `general` role with TASK prefix |
| All capabilities merge to one | Valid: single-role execution, reduced overhead | | All capabilities merge to one | Valid: single-role execution, reduced overhead |
| Task description too vague | AskUserQuestion for clarification in Phase 0 | | Task description too vague | request_user_input for clarification in Phase 0 |
| Continue mode: no session found | List available sessions, prompt user to select | | Continue mode: no session found | List available sessions, prompt user to select |
| Role instruction generation fails | Fall back to generic instruction template | | Role instruction generation fails | Fall back to generic instruction template |

View File

@@ -34,7 +34,7 @@ Interactive agent for handling pipeline completion actions. Presents results sum
| Tool | Type | Purpose | | Tool | Type | Purpose |
|------|------|---------| |------|------|---------|
| `Read` | built-in | Load tasks.csv, artifacts | | `Read` | built-in | Load tasks.csv, artifacts |
| `AskUserQuestion` | built-in | Get completion choice | | `request_user_input` | built-in | Get completion choice |
| `Write` | built-in | Store completion result | | `Write` | built-in | Store completion result |
| `Bash` | built-in | Archive or export operations | | `Bash` | built-in | Archive or export operations |
@@ -74,11 +74,11 @@ Interactive agent for handling pipeline completion actions. Presents results sum
1. Present completion choice: 1. Present completion choice:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Team pipeline complete. What would you like to do?", question: "Team pipeline complete. What would you like to do?",
header: "Completion", header: "Completion",
multiSelect: false, id: "completion_action",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Mark session complete, output final summary" }, { label: "Archive & Clean (Recommended)", description: "Mark session complete, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" },

View File

@@ -36,7 +36,7 @@ Interactive agent for reviewing and approving plans before execution waves. Used
| Tool | Type | Purpose | | Tool | Type | Purpose |
|------|------|---------| |------|------|---------|
| `Read` | built-in | Load plan artifacts and context | | `Read` | built-in | Load plan artifacts and context |
| `AskUserQuestion` | built-in | Get user approval or revision feedback | | `request_user_input` | built-in | Get user approval or revision feedback |
| `Write` | built-in | Store review result | | `Write` | built-in | Store review result |
### Tool Usage Patterns ### Tool Usage Patterns
@@ -89,13 +89,13 @@ Write("<session>/interactive/<task-id>-result.json", <result>)
2. Present approval choice: 2. Present approval choice:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Review the plan and decide:", question: "Review the plan and decide:",
header: "Plan Review", header: "Plan Review",
multiSelect: false, id: "plan_review",
options: [ options: [
{ label: "Approve", description: "Proceed with execution" }, { label: "Approve (Recommended)", description: "Proceed with execution" },
{ label: "Revise", description: "Request changes to the plan" }, { label: "Revise", description: "Request changes to the plan" },
{ label: "Abort", description: "Cancel the pipeline" } { label: "Abort", description: "Cancel the pipeline" }
] ]

View File

@@ -2,7 +2,7 @@
name: team-designer name: team-designer
description: Meta-skill for generating team skills. Analyzes requirements, scaffolds directory structure, generates role definitions and specs, validates completeness. Produces complete Codex team skill packages with SKILL.md orchestrator, CSV schemas, agent instructions, and interactive agents. description: Meta-skill for generating team skills. Analyzes requirements, scaffolds directory structure, generates role definitions and specs, validates completeness. Produces complete Codex team skill packages with SKILL.md orchestrator, CSV schemas, agent instructions, and interactive agents.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"skill description with roles and domain\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"skill description with roles and domain\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode

View File

@@ -36,7 +36,7 @@ Interactive agent for gathering and refining team skill requirements from user i
| Tool | Type | Purpose | | Tool | Type | Purpose |
|------|------|---------| |------|------|---------|
| `Read` | built-in | Load reference skills, existing patterns | | `Read` | built-in | Load reference skills, existing patterns |
| `AskUserQuestion` | built-in | Gather missing details from user | | `request_user_input` | built-in | Gather missing details from user |
| `Write` | built-in | Store teamConfig.json | | `Write` | built-in | Store teamConfig.json |
| `Glob` | built-in | Find reference skill files | | `Glob` | built-in | Find reference skill files |
@@ -94,23 +94,23 @@ Write("<session>/teamConfig.json", <config>)
1. **Core Identity** -- gather if not clear from input: 1. **Core Identity** -- gather if not clear from input:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [ questions: [
{ {
question: "Team skill name? (kebab-case, e.g., team-code-review)", question: "Team skill name? (kebab-case, e.g., team-code-review)",
header: "Skill Name", header: "Skill Name",
multiSelect: false, id: "skill_name",
options: [ options: [
{ label: "<auto-suggested-name>", description: "Auto-suggested from description" }, { label: "<auto-suggested-name> (Recommended)", description: "Auto-suggested from description" },
{ label: "Custom", description: "Enter custom name" } { label: "Custom", description: "Enter custom name" }
] ]
}, },
{ {
question: "Session prefix? (3-4 chars for task IDs, e.g., TCR)", question: "Session prefix? (3-4 chars for task IDs, e.g., TCR)",
header: "Prefix", header: "Prefix",
multiSelect: false, id: "session_prefix",
options: [ options: [
{ label: "<auto-suggested-prefix>", description: "Auto-suggested" }, { label: "<auto-suggested-prefix> (Recommended)", description: "Auto-suggested" },
{ label: "Custom", description: "Enter custom prefix" } { label: "Custom", description: "Enter custom prefix" }
] ]
} }
@@ -186,16 +186,15 @@ Templates: <list or none>
2. Present confirmation: 2. Present confirmation:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Confirm this team skill configuration?", question: "Confirm this team skill configuration?",
header: "Configuration Review", header: "Config Review",
multiSelect: false, id: "config_review",
options: [ options: [
{ label: "Confirm", description: "Proceed with generation" }, { label: "Confirm (Recommended)", description: "Proceed with generation" },
{ label: "Modify Roles", description: "Add, remove, or change roles" }, { label: "Modify Roles", description: "Add, remove, or change roles" },
{ label: "Modify Pipelines", description: "Change pipeline structure" }, { label: "Modify Pipelines", description: "Change pipeline structure" }
{ label: "Cancel", description: "Abort skill generation" }
] ]
}] }]
}) })

View File

@@ -2,7 +2,7 @@
name: team-executor name: team-executor
description: Lightweight session execution skill. Resumes existing team-coordinate sessions for pure execution via worker agents. No analysis, no role generation -- only loads and executes. Session path required. description: Lightweight session execution skill. Resumes existing team-coordinate sessions for pure execution via worker agents. No analysis, no role generation -- only loads and executes. Session path required.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"--session=<path>\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"--session=<path>\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -383,13 +383,13 @@ const summary = {
console.log(`Pipeline complete: ${summary.completed}/${summary.total} tasks completed`) console.log(`Pipeline complete: ${summary.completed}/${summary.total} tasks completed`)
// Completion action // Completion action
const action = await AskUserQuestion({ const action = request_user_input({
questions: [{ questions: [{
question: "Team pipeline complete. What would you like to do?", question: "Team pipeline complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, clean up team" }, { label: "Archive (Recommended)", description: "Archive session, clean up team" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" },
{ label: "Export Results", description: "Export deliverables to target directory, then clean" } { label: "Export Results", description: "Export deliverables to target directory, then clean" }
] ]
@@ -397,7 +397,7 @@ const action = await AskUserQuestion({
}) })
// Handle completion action // Handle completion action
if (action === "Archive & Clean") { if (action.answers.completion.answers[0] === "Archive (Recommended)") {
// Update session status, cleanup team // Update session status, cleanup team
} else if (action === "Keep Active") { } else if (action === "Keep Active") {
// Update session status to paused // Update session status to paused

View File

@@ -2,7 +2,7 @@
name: team-frontend-debug name: team-frontend-debug
description: Frontend debugging team using Chrome DevTools MCP. Dual-mode -- feature-list testing or bug-report debugging. Covers reproduction, root cause analysis, code fixes, and verification. CSV wave pipeline with conditional skip and iteration loops. description: Frontend debugging team using Chrome DevTools MCP. Dual-mode -- feature-list testing or bug-report debugging. Covers reproduction, root cause analysis, code fixes, and verification. CSV wave pipeline with conditional skip and iteration loops.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"feature list or bug description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"feature list or bug description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -98,7 +98,7 @@ Dual-mode frontend debugging: feature-list testing or bug-report debugging, powe
| feature, test, list, check, verify functions, validate | `test-pipeline` | | feature, test, list, check, verify functions, validate | `test-pipeline` |
| bug, error, crash, broken, white screen, not working | `debug-pipeline` | | bug, error, crash, broken, white screen, not working | `debug-pipeline` |
| performance, slow, latency, memory leak | `debug-pipeline` (perf dimension) | | performance, slow, latency, memory leak | `debug-pipeline` (perf dimension) |
| Ambiguous / unclear | AskUserQuestion to clarify | | Ambiguous / unclear | request_user_input to clarify |
--- ---
@@ -305,19 +305,19 @@ Write(`${sessionFolder}/wisdom/learnings.md`, '# Debug Learnings\n')
|---------------|------| |---------------|------|
| Contains: feature, test, list, check, verify | `test-pipeline` | | Contains: feature, test, list, check, verify | `test-pipeline` |
| Contains: bug, error, crash, broken, not working | `debug-pipeline` | | Contains: bug, error, crash, broken, not working | `debug-pipeline` |
| Ambiguous | AskUserQuestion to clarify | | Ambiguous | request_user_input to clarify |
4. **Extract parameters by mode**: 4. **Extract parameters by mode**:
**Test Mode**: **Test Mode**:
- `base_url`: URL in text or AskUserQuestion - `base_url`: URL in text or request_user_input
- `features`: Parse feature list (bullet points, numbered list, free text) - `features`: Parse feature list (bullet points, numbered list, free text)
- Generate structured feature items with id, name, url - Generate structured feature items with id, name, url
**Debug Mode**: **Debug Mode**:
- `bug_description`: Bug description text - `bug_description`: Bug description text
- `target_url`: URL in text or AskUserQuestion - `target_url`: URL in text or request_user_input
- `reproduction_steps`: Steps in text or AskUserQuestion - `reproduction_steps`: Steps in text or request_user_input
- `evidence_plan`: Detect dimensions from keywords (UI, network, console, performance) - `evidence_plan`: Detect dimensions from keywords (UI, network, console, performance)
5. **Dimension Detection** (debug mode): 5. **Dimension Detection** (debug mode):
@@ -616,13 +616,13 @@ ${completed.map(t => ` [DONE] ${t.id} (${t.role}): ${t.findings?.substring(0, 8
`) `)
if (!AUTO_YES) { if (!AUTO_YES) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Debug pipeline complete. What would you like to do?", question: "Debug pipeline complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up debugging" }, { label: "Keep Active", description: "Keep session for follow-up debugging" },
{ label: "Export Results", description: "Export debug report and patches" } { label: "Export Results", description: "Export debug report and patches" }
] ]
@@ -732,7 +732,7 @@ After TEST-001 completes, evaluate issues:
| Condition | Action | | Condition | Action |
|-----------|--------| |-----------|--------|
| `issues_count === 0` | Skip ANALYZE/FIX/VERIFY. Pipeline complete with all-pass. | | `issues_count === 0` | Skip ANALYZE/FIX/VERIFY. Pipeline complete with all-pass. |
| Only low-severity warnings | AskUserQuestion: fix warnings or complete | | Only low-severity warnings | request_user_input: fix warnings or complete |
| High/medium severity issues | Proceed with ANALYZE -> FIX -> VERIFY | | High/medium severity issues | Proceed with ANALYZE -> FIX -> VERIFY |
--- ---

View File

@@ -34,7 +34,7 @@ Interactive agent for handling pipeline completion action. Presents debug summar
| Tool | Type | Purpose | | Tool | Type | Purpose |
|------|------|---------| |------|------|---------|
| `Read` | built-in | Load task results and artifacts | | `Read` | built-in | Load task results and artifacts |
| `AskUserQuestion` | built-in | Get user completion choice | | `request_user_input` | built-in | Get user completion choice |
| `Write` | built-in | Store completion result | | `Write` | built-in | Store completion result |
| `Bash` | built-in | Execute archive/export operations | | `Bash` | built-in | Execute archive/export operations |
@@ -79,11 +79,11 @@ Interactive agent for handling pipeline completion action. Presents debug summar
2. Present completion choice: 2. Present completion choice:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Debug pipeline complete. What would you like to do?", question: "Debug pipeline complete. What would you like to do?",
header: "Completion", header: "Completion",
multiSelect: false, id: "completion_action",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up debugging" }, { label: "Keep Active", description: "Keep session for follow-up debugging" },

View File

@@ -35,7 +35,7 @@ Interactive agent for evaluating TEST-001 results and determining whether to ski
| Tool | Type | Purpose | | Tool | Type | Purpose |
|------|------|---------| |------|------|---------|
| `Read` | built-in | Load test results and issues | | `Read` | built-in | Load test results and issues |
| `AskUserQuestion` | built-in | Get user decision on warnings | | `request_user_input` | built-in | Get user decision on warnings |
| `Write` | built-in | Store gate decision result | | `Write` | built-in | Store gate decision result |
--- ---
@@ -81,13 +81,13 @@ Interactive agent for evaluating TEST-001 results and determining whether to ski
2. If only warnings, present choice: 2. If only warnings, present choice:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Testing found only low-severity warnings. How would you like to proceed?", question: "Testing found only low-severity warnings. How would you like to proceed?",
header: "Test Results", header: "Test Results",
multiSelect: false, id: "warning_decision",
options: [ options: [
{ label: "Fix warnings", description: "Proceed with analysis and fixes for warnings" }, { label: "Fix warnings (Recommended)", description: "Proceed with analysis and fixes for warnings" },
{ label: "Complete", description: "Accept current state, skip remaining tasks" } { label: "Complete", description: "Accept current state, skip remaining tasks" }
] ]
}] }]

View File

@@ -2,7 +2,7 @@
name: team-frontend name: team-frontend
description: Frontend development team with built-in ui-ux-pro-max design intelligence. Covers requirement analysis, design system generation, frontend implementation, and quality assurance. CSV wave pipeline with interactive QA gates. description: Frontend development team with built-in ui-ux-pro-max design intelligence. Covers requirement analysis, design system generation, frontend implementation, and quality assurance. CSV wave pipeline with interactive QA gates.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"frontend task description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"frontend task description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -535,13 +535,13 @@ ${deliverables.map(d => ` - ${d.name}: ${d.path}`).join('\n')}
`) `)
if (!AUTO_YES) { if (!AUTO_YES) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Frontend pipeline complete. What would you like to do?", question: "Frontend pipeline complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" },
{ label: "Export Results", description: "Export design tokens and component specs" } { label: "Export Results", description: "Export design tokens and component specs" }
] ]
@@ -693,7 +693,7 @@ Convergence: qa.score >= 8 && qa.critical_count === 0
| discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries | | discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries |
| QA score < 6 over 2 GC rounds | Escalate to user for manual intervention | | QA score < 6 over 2 GC rounds | Escalate to user for manual intervention |
| ui-ux-pro-max unavailable | Degrade to LLM general design knowledge | | ui-ux-pro-max unavailable | Degrade to LLM general design knowledge |
| Task description too vague | AskUserQuestion for clarification in Phase 0 | | Task description too vague | request_user_input for clarification in Phase 0 |
| Continue mode: no session found | List available sessions, prompt user to select | | Continue mode: no session found | List available sessions, prompt user to select |
--- ---

View File

@@ -34,7 +34,7 @@ Interactive agent for handling pipeline completion action. Presents deliverables
| Tool | Type | Purpose | | Tool | Type | Purpose |
|------|------|---------| |------|------|---------|
| `Read` | built-in | Load task results and artifacts | | `Read` | built-in | Load task results and artifacts |
| `AskUserQuestion` | built-in | Get user completion choice | | `request_user_input` | built-in | Get user completion choice |
| `Write` | built-in | Store completion result | | `Write` | built-in | Store completion result |
| `Bash` | built-in | Execute archive/export operations | | `Bash` | built-in | Execute archive/export operations |
@@ -74,11 +74,11 @@ Interactive agent for handling pipeline completion action. Presents deliverables
2. Present completion choice: 2. Present completion choice:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Frontend pipeline complete. What would you like to do?", question: "Frontend pipeline complete. What would you like to do?",
header: "Completion", header: "Completion",
multiSelect: false, id: "completion_action",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" },

View File

@@ -36,7 +36,7 @@ Interactive agent for reviewing QA audit verdicts and handling the Generator-Cri
| Tool | Type | Purpose | | Tool | Type | Purpose |
|------|------|---------| |------|------|---------|
| `Read` | built-in | Load QA audit reports and context | | `Read` | built-in | Load QA audit reports and context |
| `AskUserQuestion` | built-in | Get user decision on QA gate | | `request_user_input` | built-in | Get user decision on QA gate |
| `Write` | built-in | Store review result | | `Write` | built-in | Store review result |
### Tool Usage Patterns ### Tool Usage Patterns
@@ -97,13 +97,13 @@ Write("<session>/interactive/<task-id>-result.json", <result>)
2. If escalation needed, present choice: 2. If escalation needed, present choice:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "QA has flagged issues after 2 fix rounds. How would you like to proceed?", question: "QA has flagged issues after 2 fix rounds. How would you like to proceed?",
header: "QA Gate", header: "QA Gate",
multiSelect: false, id: "qa_gate_decision",
options: [ options: [
{ label: "Accept current state", description: "Proceed despite remaining issues" }, { label: "Accept current state (Recommended)", description: "Proceed despite remaining issues" },
{ label: "Manual fix", description: "You will fix the issues manually" }, { label: "Manual fix", description: "You will fix the issues manually" },
{ label: "Abort pipeline", description: "Stop the pipeline" } { label: "Abort pipeline", description: "Stop the pipeline" }
] ]

View File

@@ -2,7 +2,7 @@
name: team-issue name: team-issue
description: Hybrid team skill for issue resolution. CSV wave primary for exploration, planning, integration, and implementation. Interactive agents for review gates with fix cycles. Supports Quick, Full, and Batch pipelines. description: Hybrid team skill for issue resolution. CSV wave primary for exploration, planning, integration, and implementation. Interactive agents for review gates with fix cycles. Supports Quick, Full, and Batch pipelines.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--mode=quick|full|batch] \"issue-ids or --all-pending\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--mode=quick|full|batch] \"issue-ids or --all-pending\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -226,8 +226,19 @@ if (requirement.includes('--all-pending')) {
// If no issue IDs, ask user // If no issue IDs, ask user
if (issueIds.length === 0) { if (issueIds.length === 0) {
const answer = AskUserQuestion("No issue IDs found. Please provide issue IDs (e.g., ISS-20260308-120000):") const answer = request_user_input({
issueIds = answer.match(issueIdPattern) || [] questions: [{
question: "No issue IDs found. Please provide issue IDs.",
header: "Issue IDs",
id: "issue_input",
options: [
{ label: "Enter IDs", description: "Provide issue IDs (e.g., ISS-20260308-120000)" },
{ label: "Cancel", description: "Abort the pipeline" }
]
}]
})
if (answer.answers.issue_input.answers[0] === "Cancel") return
issueIds = answer.answers.issue_input.answers[0].match(issueIdPattern) || []
if (issueIds.length === 0) return // abort if (issueIds.length === 0) return // abort
} }

View File

@@ -2,7 +2,7 @@
name: team-iterdev name: team-iterdev
description: Iterative development team with Generator-Critic loop, dynamic pipeline selection (patch/sprint/multi-sprint), task ledger for progress tracking, and shared wisdom for cross-sprint learning. description: Iterative development team with Generator-Critic loop, dynamic pipeline selection (patch/sprint/multi-sprint), task ledger for progress tracking, and shared wisdom for cross-sprint learning.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"task description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"task description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -339,16 +339,15 @@ If not AUTO_YES, present pipeline mode selection for confirmation:
```javascript ```javascript
if (!AUTO_YES) { if (!AUTO_YES) {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: `Task: "${requirement}"\nRecommended pipeline: ${pipeline_mode} (complexity: ${complexity_score})\nRoles: ${roles_needed.join(', ')}\n\nApprove?`, question: `Task: "${requirement}"Recommended: ${pipeline_mode}. Approve or override?`,
header: "Pipeline Selection", header: "Pipeline",
multiSelect: false, id: "pipeline_select",
options: [ options: [
{ label: "Approve", description: `Use ${pipeline_mode} pipeline` }, { label: "Approve (Recommended)", description: `Use ${pipeline_mode} pipeline (complexity: ${complexity_score})` },
{ label: "Patch", description: "Simple fix: DEV -> VERIFY (2 tasks)" }, { label: "Patch", description: "Simple fix: DEV -> VERIFY (2 tasks)" },
{ label: "Sprint", description: "Standard: DESIGN -> DEV -> VERIFY + REVIEW (4 tasks)" }, { label: "Sprint/Multi", description: "Standard or complex: DESIGN -> DEV -> VERIFY + REVIEW" }
{ label: "Multi-Sprint", description: "Complex: Multiple sprint cycles with incremental delivery" }
] ]
}] }]
}) })
@@ -687,13 +686,13 @@ If not AUTO_YES, offer completion actions:
```javascript ```javascript
if (!AUTO_YES) { if (!AUTO_YES) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "IterDev pipeline complete. What would you like to do?", question: "IterDev pipeline complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, generate final report" }, { label: "Archive (Recommended)", description: "Archive session, generate final report" },
{ label: "Keep Active", description: "Keep session for follow-up or inspection" }, { label: "Keep Active", description: "Keep session for follow-up or inspection" },
{ label: "Retry Failed", description: "Re-run failed tasks" } { label: "Retry Failed", description: "Re-run failed tasks" }
] ]

View File

@@ -2,7 +2,7 @@
name: team-lifecycle-v4 name: team-lifecycle-v4
description: Full lifecycle team skill — specification, planning, implementation, testing, and review. Supports spec-only, impl-only, full-lifecycle, and frontend pipelines with optional supervisor checkpoints. description: Full lifecycle team skill — specification, planning, implementation, testing, and review. Supports spec-only, impl-only, full-lifecycle, and frontend pipelines with optional supervisor checkpoints.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"task description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"task description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -294,16 +294,15 @@ If not AUTO_YES, confirm pipeline selection:
```javascript ```javascript
if (!AUTO_YES) { if (!AUTO_YES) {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: `Requirement: "${requirement}"\nDetected pipeline: ${pipeline_type} (complexity: ${complexity.level})\nRoles: ${capabilities.map(c => c.name).join(', ')}\n\nApprove?`, question: `Requirement: "${requirement}"Detected: ${pipeline_type}. Approve or override?`,
header: "Pipeline Selection", header: "Pipeline",
multiSelect: false, id: "pipeline_select",
options: [ options: [
{ label: "Approve", description: `Use ${pipeline_type} pipeline` }, { label: "Approve (Recommended)", description: `Use ${pipeline_type} pipeline (complexity: ${complexity.level})` },
{ label: "Spec Only", description: "Research -> draft specs -> quality gate" }, { label: "Spec Only", description: "Research -> draft specs -> quality gate" },
{ label: "Impl Only", description: "Plan -> implement -> test + review" }, { label: "Impl/Full", description: "Implementation pipeline or full lifecycle" }
{ label: "Full Lifecycle", description: "Spec pipeline + implementation pipeline" }
] ]
}] }]
}) })
@@ -522,10 +521,11 @@ Write report to ${sessionFolder}/artifacts/${task.id}-report.md.
// Handle verdict // Handle verdict
if (parsedVerdict === 'block') { if (parsedVerdict === 'block') {
if (!AUTO_YES) { if (!AUTO_YES) {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: `Checkpoint ${task.id} BLOCKED (score: ${parsedScore}). What to do?`, question: `Checkpoint ${task.id} BLOCKED (score: ${parsedScore}). Choose action.`,
header: "Checkpoint Blocked", header: "Blocked",
id: "blocked_action",
options: [ options: [
{ label: "Override", description: "Proceed despite block" }, { label: "Override", description: "Proceed despite block" },
{ label: "Revise upstream", description: "Go back and fix issues" }, { label: "Revise upstream", description: "Go back and fix issues" },
@@ -647,13 +647,13 @@ If not AUTO_YES, offer completion action:
```javascript ```javascript
if (!AUTO_YES) { if (!AUTO_YES) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Pipeline complete. What would you like to do?", question: "Pipeline complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session" }, { label: "Archive (Recommended)", description: "Archive session" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" },
{ label: "Export Results", description: "Export deliverables to target directory" } { label: "Export Results", description: "Export deliverables to target directory" }
] ]
@@ -713,7 +713,7 @@ All agents across all waves share `discoveries.ndjson`. This enables cross-role
| CSV agent failed | Mark as failed, skip dependent tasks in later waves | | CSV agent failed | Mark as failed, skip dependent tasks in later waves |
| Interactive agent timeout | Urge convergence via send_input, then close if still timed out | | Interactive agent timeout | Urge convergence via send_input, then close if still timed out |
| Interactive agent failed | Mark as failed, skip dependents | | Interactive agent failed | Mark as failed, skip dependents |
| Supervisor checkpoint blocked | AskUserQuestion: Override / Revise / Abort | | Supervisor checkpoint blocked | request_user_input: Override / Revise / Abort |
| Quality gate failed (< 60%) | Return to writer for rework | | Quality gate failed (< 60%) | Return to writer for rework |
| All agents in wave failed | Log error, offer retry or abort | | All agents in wave failed | Log error, offer retry or abort |
| CSV parse error | Validate CSV format before execution, show line number | | CSV parse error | Validate CSV format before execution, show line number |

View File

@@ -36,7 +36,7 @@ Evaluate quality metrics from the QUALITY-001 task, apply threshold checks, and
|------|------|---------| |------|------|---------|
| `Read` | builtin | Load quality results and task artifacts | | `Read` | builtin | Load quality results and task artifacts |
| `Bash` | builtin | Run verification commands (build check, test rerun) | | `Bash` | builtin | Run verification commands (build check, test rerun) |
| `AskUserQuestion` | builtin | Present quality summary and obtain user verdict | | `request_user_input` | builtin | Present quality summary and obtain user verdict |
--- ---
@@ -108,7 +108,7 @@ Evaluate quality metrics from the QUALITY-001 task, apply threshold checks, and
- Per-metric breakdown with actual values vs thresholds - Per-metric breakdown with actual values vs thresholds
- List of unresolved findings (if any) with severity - List of unresolved findings (if any) with severity
- Recommendation (approve / reject with reasons) - Recommendation (approve / reject with reasons)
2. Present to user via AskUserQuestion: 2. Present to user via request_user_input:
- If gate status is PASS: recommend approval - If gate status is PASS: recommend approval
- If gate status is CONDITIONAL: present risks, ask user to decide - If gate status is CONDITIONAL: present risks, ask user to decide
- If gate status is FAIL: recommend rejection with specific failures listed - If gate status is FAIL: recommend rejection with specific failures listed

View File

@@ -38,7 +38,7 @@ Parse user task input, detect pipeline signals, select execution mode, and produ
| `Glob` | builtin | Find existing artifacts in workspace | | `Glob` | builtin | Find existing artifacts in workspace |
| `Grep` | builtin | Search for keywords and patterns in artifacts | | `Grep` | builtin | Search for keywords and patterns in artifacts |
| `Bash` | builtin | Run utility commands | | `Bash` | builtin | Run utility commands |
| `AskUserQuestion` | builtin | Clarify ambiguous requirements with user | | `request_user_input` | builtin | Clarify ambiguous requirements with user |
--- ---
@@ -90,7 +90,7 @@ Parse user task input, detect pipeline signals, select execution mode, and produ
| impl keywords + existing specs | `impl-only` | | impl keywords + existing specs | `impl-only` |
| full-lifecycle keywords OR (impl keywords + no existing specs) | `full-lifecycle` | | full-lifecycle keywords OR (impl keywords + no existing specs) | `full-lifecycle` |
| frontend keywords | `frontend` | | frontend keywords | `frontend` |
| Ambiguous / conflicting signals | Ask user via AskUserQuestion | | Ambiguous / conflicting signals | Ask user via request_user_input |
2. If ambiguous, present options to user: 2. If ambiguous, present options to user:
- Describe detected signals - Describe detected signals
@@ -155,7 +155,7 @@ Parse user task input, detect pipeline signals, select execution mode, and produ
| Scenario | Resolution | | Scenario | Resolution |
|----------|------------| |----------|------------|
| Requirement text is empty or too vague | Ask user for clarification via AskUserQuestion | | Requirement text is empty or too vague | Ask user for clarification via request_user_input |
| Conflicting signals (e.g., "spec only" + "implement now") | Present conflict to user, ask for explicit choice | | Conflicting signals (e.g., "spec only" + "implement now") | Present conflict to user, ask for explicit choice |
| Existing artifacts are corrupted or incomplete | Log warning, treat as no-artifacts (full-lifecycle) | | Existing artifacts are corrupted or incomplete | Log warning, treat as no-artifacts (full-lifecycle) |
| Workspace not writable | Report error, output JSON to stdout instead | | Workspace not writable | Report error, output JSON to stdout instead |

View File

@@ -2,7 +2,7 @@
name: team-perf-opt name: team-perf-opt
description: Performance optimization team skill. Profiles application performance, identifies bottlenecks, designs optimization strategies, implements changes, benchmarks improvements, and reviews code quality via CSV wave pipeline with interactive review-fix cycles. description: Performance optimization team skill. Profiles application performance, identifies bottlenecks, designs optimization strategies, implements changes, benchmarks improvements, and reviews code quality via CSV wave pipeline with interactive review-fix cycles.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"performance optimization task description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"performance optimization task description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -44,7 +44,7 @@ Orchestrate multi-agent performance optimization: profile application, identify
| Phase 0: Pre-Wave Interactive (Requirement Clarification) | | Phase 0: Pre-Wave Interactive (Requirement Clarification) |
| +- Parse user task description | | +- Parse user task description |
| +- Detect scope: specific endpoint vs full app profiling | | +- Detect scope: specific endpoint vs full app profiling |
| +- Clarify ambiguous requirements (AskUserQuestion) | | +- Clarify ambiguous requirements (request_user_input) |
| +- Output: refined requirements for decomposition | | +- Output: refined requirements for decomposition |
| | | |
| Phase 1: Requirement -> CSV + Classification | | Phase 1: Requirement -> CSV + Classification |
@@ -276,13 +276,13 @@ Write(`${sessionFolder}/wisdom/patterns.md`, '# Patterns & Conventions\n')
4. **Clarify if ambiguous** (skip if AUTO_YES): 4. **Clarify if ambiguous** (skip if AUTO_YES):
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Please confirm the performance optimization scope:", question: "Please confirm the performance optimization scope.",
header: "Performance Scope", header: "Scope",
multiSelect: false, id: "perf_scope",
options: [ options: [
{ label: "Proceed as described", description: "Scope is clear" }, { label: "Proceed (Recommended)", description: "Scope is clear, start profiling" },
{ label: "Narrow scope", description: "Specify endpoints/modules to focus on" }, { label: "Narrow scope", description: "Specify endpoints/modules to focus on" },
{ label: "Add constraints", description: "Target metrics, acceptable trade-offs" } { label: "Add constraints", description: "Target metrics, acceptable trade-offs" }
] ]
@@ -521,13 +521,13 @@ Session: ${sessionFolder}
// 3. Completion action // 3. Completion action
if (!AUTO_YES) { if (!AUTO_YES) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Performance optimization complete. What would you like to do?", question: "Performance optimization complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" },
{ label: "Retry Failed", description: "Re-run failed tasks" } { label: "Retry Failed", description: "Re-run failed tasks" }
] ]

View File

@@ -34,7 +34,7 @@ Handle pipeline completion action for performance optimization: present results
| `Read` | builtin | Load result artifacts | | `Read` | builtin | Load result artifacts |
| `Write` | builtin | Write export files | | `Write` | builtin | Write export files |
| `Bash` | builtin | Archive/cleanup operations | | `Bash` | builtin | Archive/cleanup operations |
| `AskUserQuestion` | builtin | Present completion choices | | `request_user_input` | builtin | Present completion choices |
--- ---
@@ -74,11 +74,11 @@ Handle pipeline completion action for performance optimization: present results
2. Present completion action: 2. Present completion action:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Performance optimization complete. What would you like to do?", question: "Performance optimization complete. What would you like to do?",
header: "Completion", header: "Completion",
multiSelect: false, id: "completion_action",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work or inspection" }, { label: "Keep Active", description: "Keep session for follow-up work or inspection" },

View File

@@ -2,7 +2,7 @@
name: team-planex-v2 name: team-planex-v2
description: Hybrid team skill for plan-and-execute pipeline. CSV wave primary for planning and execution. Planner decomposes requirements into issues and solutions, then executor implements each via CLI tools. Supports issue IDs, text input, and plan file input. description: Hybrid team skill for plan-and-execute pipeline. CSV wave primary for planning and execution. Planner decomposes requirements into issues and solutions, then executor implements each via CLI tools. Supports issue IDs, text input, and plan file input.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--exec=codex|gemini] \"issue IDs or --text 'description' or --plan path\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--exec=codex|gemini] \"issue IDs or --text 'description' or --plan path\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -215,8 +215,19 @@ if (textMatch) {
// If no input detected, ask user // If no input detected, ask user
if (issueIds.length === 0 && inputType === 'issues') { if (issueIds.length === 0 && inputType === 'issues') {
const answer = AskUserQuestion("No input detected. Provide issue IDs, or use --text 'description' or --plan <path>:") const answer = request_user_input({
issueIds = answer.match(issueIdPattern) || [] questions: [{
question: "No input detected. Choose input method.",
header: "Input",
id: "input_method",
options: [
{ label: "Enter IDs", description: "Provide issue IDs (e.g., ISS-20260308-120000)" },
{ label: "Cancel", description: "Abort the pipeline" }
]
}]
})
if (answer.answers.input_method.answers[0] === "Cancel") return
issueIds = answer.answers.input_method.answers[0].match(issueIdPattern) || []
if (issueIds.length === 0 && !answer.includes('--text') && !answer.includes('--plan')) { if (issueIds.length === 0 && !answer.includes('--text') && !answer.includes('--plan')) {
inputType = 'text' inputType = 'text'
rawInput = answer rawInput = answer
@@ -225,17 +236,21 @@ if (issueIds.length === 0 && inputType === 'issues') {
// Execution method selection (interactive if no flag) // Execution method selection (interactive if no flag)
if (!execMatch && !AUTO_YES) { if (!execMatch && !AUTO_YES) {
const methodChoice = AskUserQuestion({ const methodChoice = request_user_input({
questions: [{ question: "Select execution method for implementation:", questions: [{
question: "Select execution method for implementation.",
header: "Exec Method",
id: "exec_method",
options: [ options: [
{ label: "Gemini", description: "gemini-2.5-pro (recommended for <= 3 tasks)" }, { label: "Gemini (Recommended)", description: "gemini-2.5-pro (best for <= 3 tasks)" },
{ label: "Codex", description: "gpt-5.2 (recommended for > 3 tasks)" }, { label: "Codex", description: "gpt-5.2 (best for > 3 tasks)" },
{ label: "Auto", description: "Auto-select based on task count" } { label: "Auto", description: "Auto-select based on task count" }
] ]
}] }]
}) })
if (methodChoice === 'Codex') executionMethod = 'codex' const chosen = methodChoice.answers.exec_method.answers[0]
else if (methodChoice === 'Auto') executionMethod = 'auto' if (chosen === 'Codex') executionMethod = 'codex'
else if (chosen === 'Auto') executionMethod = 'auto'
} }
const slug = (issueIds[0] || rawInput).toLowerCase() const slug = (issueIds[0] || rawInput).toLowerCase()
@@ -579,7 +594,7 @@ Both planner and executor agents share the same discoveries.ndjson file:
| All agents in wave failed | Log error, offer retry or abort | | All agents in wave failed | Log error, offer retry or abort |
| CSV parse error | Validate CSV format before execution, show line number | | CSV parse error | Validate CSV format before execution, show line number |
| discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries | | discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries |
| No input provided | Ask user for input via AskUserQuestion | | No input provided | Ask user for input via request_user_input |
| Issue creation fails (text/plan input) | Report error, suggest manual issue creation | | Issue creation fails (text/plan input) | Report error, suggest manual issue creation |
| Continue mode: no session found | List available sessions, prompt user to select | | Continue mode: no session found | List available sessions, prompt user to select |

View File

@@ -2,7 +2,7 @@
name: team-quality-assurance name: team-quality-assurance
description: Full closed-loop QA combining issue discovery and software testing. Scout -> Strategist -> Generator -> Executor -> Analyst with multi-perspective scanning, progressive test layers, GC loops, and quality scoring. Supports discovery, testing, and full QA modes. description: Full closed-loop QA combining issue discovery and software testing. Scout -> Strategist -> Generator -> Executor -> Analyst with multi-perspective scanning, progressive test layers, GC loops, and quality scoring. Supports discovery, testing, and full QA modes.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--mode=discovery|testing|full] \"task description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--mode=discovery|testing|full] \"task description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -286,16 +286,15 @@ Write(`${sessionFolder}/gc-state.json`, JSON.stringify({
4. **Clarify if ambiguous** (skip if AUTO_YES): 4. **Clarify if ambiguous** (skip if AUTO_YES):
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Detected QA mode: '" + qaMode + "'. Confirm?", question: `Detected QA mode: '${qaMode}'. Approve or override?`,
header: "QA Mode Selection", header: "QA Mode",
multiSelect: false, id: "qa_mode",
options: [ options: [
{ label: "Proceed with " + qaMode, description: "Detected mode is appropriate" }, { label: "Approve (Recommended)", description: `Use ${qaMode} mode as detected` },
{ label: "Use discovery", description: "Scout-first: scan for issues, then test" }, { label: "Discovery", description: "Scout-first: scan for issues, then test" },
{ label: "Use testing", description: "Direct testing pipeline (skip scout)" }, { label: "Testing/Full", description: "Direct testing or complete QA closed loop" }
{ label: "Use full", description: "Complete QA closed loop with regression" }
] ]
}] }]
}) })
@@ -536,13 +535,13 @@ Session: ${sessionFolder}
`) `)
if (!AUTO_YES) { if (!AUTO_YES) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Quality Assurance pipeline complete. What would you like to do?", question: "Quality Assurance pipeline complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" },
{ label: "Export Results", description: "Export deliverables to target directory" } { label: "Export Results", description: "Export deliverables to target directory" }
] ]

View File

@@ -2,7 +2,7 @@
name: team-review name: team-review
description: Multi-agent code review pipeline with scanner, reviewer, and fixer roles. Executes toolchain + LLM scan, deep analysis with root cause enrichment, and automated fixes with rollback-on-failure. description: Multi-agent code review pipeline with scanner, reviewer, and fixer roles. Executes toolchain + LLM scan, deep analysis with root cause enrichment, and automated fixes with rollback-on-failure.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--full|--fix|-q] [--dimensions=sec,cor,prf,mnt] \"target path or pattern\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--full|--fix|-q] [--dimensions=sec,cor,prf,mnt] \"target path or pattern\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -476,7 +476,7 @@ send_input({
| discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries | | discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries |
| Lifecycle leak | Cleanup all active agents via registry.json at end | | Lifecycle leak | Cleanup all active agents via registry.json at end |
| Continue mode: no session found | List available sessions, prompt user to select | | Continue mode: no session found | List available sessions, prompt user to select |
| Target path invalid | AskUserQuestion for corrected path | | Target path invalid | request_user_input for corrected path |
| Scanner finds 0 findings | Report clean, skip review + fix stages | | Scanner finds 0 findings | Report clean, skip review + fix stages |
--- ---

View File

@@ -2,7 +2,7 @@
name: team-roadmap-dev name: team-roadmap-dev
description: Roadmap-driven development with phased execution pipeline. Coordinator discusses roadmap with user, then executes plan->execute->verify cycles per phase using CSV wave execution. description: Roadmap-driven development with phased execution pipeline. Coordinator discusses roadmap with user, then executes plan->execute->verify cycles per phase using CSV wave execution.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<task-description>\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<task-description>\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -244,7 +244,7 @@ const discusser = spawn_agent({
**Instructions**: **Instructions**:
1. Analyze task description to understand scope 1. Analyze task description to understand scope
2. Propose phase breakdown to user via AskUserQuestion 2. Propose phase breakdown to user via request_user_input
3. For each phase, clarify requirements and success criteria 3. For each phase, clarify requirements and success criteria
4. Generate roadmap.md with structured phase definitions 4. Generate roadmap.md with structured phase definitions
5. Output result as JSON with roadmap_path and phase_count` 5. Output result as JSON with roadmap_path and phase_count`
@@ -343,19 +343,19 @@ writeMasterCSV(`${sessionDir}/tasks.csv`, tasksWithWaves)
// User validation (skip if autoYes) // User validation (skip if autoYes)
if (!autoYes) { if (!autoYes) {
const approval = AskUserQuestion({ const approval = request_user_input({
questions: [{ questions: [{
question: `Generated ${tasksWithWaves.length} tasks across ${phases.length} phases. Proceed?`, question: `Generated ${tasksWithWaves.length} tasks across ${phases.length} phases. Proceed?`,
header: "Task Breakdown Validation", header: "Validate",
multiSelect: false, id: "task_approval",
options: [ options: [
{ label: "Proceed", description: "Start execution" }, { label: "Proceed (Recommended)", description: "Start execution" },
{ label: "Cancel", description: "Abort workflow" } { label: "Cancel", description: "Abort workflow" }
] ]
}] }]
}) })
if (approval.answers[0] !== "Proceed") { if (approval.answers.task_approval.answers[0] !== "Proceed (Recommended)") {
throw new Error("User cancelled workflow") throw new Error("User cancelled workflow")
} }
} }
@@ -554,20 +554,20 @@ console.log(`\nResults: ${sessionDir}/results.csv`)
console.log(`Report: ${sessionDir}/context.md`) console.log(`Report: ${sessionDir}/context.md`)
// Offer next steps // Offer next steps
const nextStep = AskUserQuestion({ const nextStep = request_user_input({
questions: [{ questions: [{
question: "Roadmap Dev pipeline complete. What would you like to do?", question: "Roadmap Dev pipeline complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, clean up tasks and team resources" }, { label: "Archive (Recommended)", description: "Archive session, clean up tasks and team resources" },
{ label: "Keep Active", description: "Keep session active for follow-up work or inspection" }, { label: "Keep Active", description: "Keep session active for follow-up work or inspection" },
{ label: "Export Results", description: "Export deliverables to a specified location, then clean" } { label: "Export Results", description: "Export deliverables to a specified location, then clean" }
] ]
}] }]
}) })
if (nextStep.answers[0] === "Archive & Clean (Recommended)") { if (nextStep.answers.completion.answers[0] === "Archive (Recommended)") {
Bash(`tar -czf "${sessionDir}.tar.gz" "${sessionDir}" && rm -rf "${sessionDir}"`) Bash(`tar -czf "${sessionDir}.tar.gz" "${sessionDir}" && rm -rf "${sessionDir}"`)
console.log(`Session archived to ${sessionDir}.tar.gz`) console.log(`Session archived to ${sessionDir}.tar.gz`)
} }

View File

@@ -14,7 +14,7 @@ Interactive agent for discussing roadmap with user and generating phase plan wit
- Load role definition via MANDATORY FIRST STEPS pattern - Load role definition via MANDATORY FIRST STEPS pattern
- Produce structured output following template - Produce structured output following template
- Interact with user via AskUserQuestion - Interact with user via request_user_input
- Generate roadmap.md with phase definitions - Generate roadmap.md with phase definitions
- Include requirements (REQ-IDs) and success criteria per phase - Include requirements (REQ-IDs) and success criteria per phase
@@ -33,7 +33,7 @@ Interactive agent for discussing roadmap with user and generating phase plan wit
| Tool | Type | Purpose | | Tool | Type | Purpose |
|------|------|---------| |------|------|---------|
| `AskUserQuestion` | Human interaction | Clarify requirements, propose phase breakdown | | `request_user_input` | Human interaction | Clarify requirements, propose phase breakdown |
| `Read` | File I/O | Load project context | | `Read` | File I/O | Load project context |
| `Write` | File I/O | Generate roadmap.md | | `Write` | File I/O | Generate roadmap.md |
@@ -81,15 +81,15 @@ Interactive agent for discussing roadmap with user and generating phase plan wit
- Phase goal (one sentence) - Phase goal (one sentence)
- Key requirements (REQ-IDs) - Key requirements (REQ-IDs)
- Success criteria (measurable) - Success criteria (measurable)
4. Present to user via AskUserQuestion: 4. Present to user via request_user_input:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Proposed phase breakdown:\n\nPhase 1: [goal]\n- REQ-001: [requirement]\n- Success: [criteria]\n\nPhase 2: [goal]\n...\n\nApprove or request changes?", question: "Proposed phase breakdown:\n\nPhase 1: [goal]\n- REQ-001: [requirement]\n- Success: [criteria]\n\nPhase 2: [goal]\n...\n\nApprove or request changes?",
header: "Roadmap Discussion", header: "Roadmap",
multiSelect: false, id: "roadmap_approval",
options: [ options: [
{ label: "Approve", description: "Proceed with this breakdown" }, { label: "Approve (Recommended)", description: "Proceed with this breakdown" },
{ label: "Modify", description: "Request changes to phases" }, { label: "Modify", description: "Request changes to phases" },
{ label: "Cancel", description: "Abort workflow" } { label: "Cancel", description: "Abort workflow" }
] ]
@@ -173,4 +173,4 @@ Interactive agent for discussing roadmap with user and generating phase plan wit
| User cancels | Output partial roadmap, mark as cancelled | | User cancels | Output partial roadmap, mark as cancelled |
| Project context not found | Continue without project context, note in findings | | Project context not found | Continue without project context, note in findings |
| User requests too many phases (>10) | Warn about complexity, suggest consolidation | | User requests too many phases (>10) | Warn about complexity, suggest consolidation |
| Ambiguous requirements | Ask clarifying questions via AskUserQuestion | | Ambiguous requirements | Ask clarifying questions via request_user_input |

View File

@@ -2,7 +2,7 @@
name: team-tech-debt name: team-tech-debt
description: Systematic tech debt governance with CSV wave pipeline. Scans codebase for tech debt across 5 dimensions, assesses severity with priority matrix, plans phased remediation, executes fixes in worktree, validates with 4-layer checks. Supports scan/remediate/targeted pipeline modes with fix-verify GC loop. description: Systematic tech debt governance with CSV wave pipeline. Scans codebase for tech debt across 5 dimensions, assesses severity with priority matrix, plans phased remediation, executes fixes in worktree, validates with 4-layer checks. Supports scan/remediate/targeted pipeline modes with fix-verify GC loop.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--mode=scan|remediate|targeted] \"scope or description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--mode=scan|remediate|targeted] \"scope or description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -259,13 +259,13 @@ Write(`${sessionFolder}/wisdom/decisions.md`, '# Decisions\n')
2. **Clarify scope** (skip if AUTO_YES): 2. **Clarify scope** (skip if AUTO_YES):
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Tech debt governance scope:", question: "Select tech debt governance scope.",
header: "Scope Selection", header: "Scope",
multiSelect: false, id: "debt_scope",
options: [ options: [
{ label: "Full project scan", description: "Scan entire codebase" }, { label: "Full scan (Recommended)", description: "Scan entire codebase" },
{ label: "Specific module", description: "Target specific directory" }, { label: "Specific module", description: "Target specific directory" },
{ label: "Custom scope", description: "Specify file patterns" } { label: "Custom scope", description: "Specify file patterns" }
] ]
@@ -517,15 +517,15 @@ Session: ${sessionFolder}
// Completion action // Completion action
if (!AUTO_YES) { if (!AUTO_YES) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "What next?", question: "Tech debt governance complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Close (Recommended)", description: "Archive session" },
{ label: "New target", description: "Run another scan/fix cycle" }, { label: "New target", description: "Run another scan/fix cycle" },
{ label: "Deep fix", description: "Continue fixing remaining items" }, { label: "Deep fix", description: "Continue fixing remaining items" }
{ label: "Close", description: "Archive session" }
] ]
}] }]
}) })

View File

@@ -36,7 +36,7 @@ Interactive agent for reviewing the tech debt remediation plan at the plan appro
| Tool | Type | Purpose | | Tool | Type | Purpose |
|------|------|---------| |------|------|---------|
| `Read` | built-in | Load plan artifacts and context | | `Read` | built-in | Load plan artifacts and context |
| `AskUserQuestion` | built-in | Get user approval decision | | `request_user_input` | built-in | Get user approval decision |
| `Write` | built-in | Store approval result | | `Write` | built-in | Store approval result |
### Tool Usage Patterns ### Tool Usage Patterns
@@ -91,13 +91,13 @@ Read("<session>/assessment/priority-matrix.json")
2. Present decision: 2. Present decision:
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Remediation plan generated. Review and decide:", question: "Remediation plan generated. Review and decide:",
header: "Plan Approval Gate", header: "Plan Approval",
multiSelect: false, id: "plan_approval",
options: [ options: [
{ label: "Approve", description: "Proceed with fix execution in worktree" }, { label: "Approve (Recommended)", description: "Proceed with fix execution in worktree" },
{ label: "Revise", description: "Re-run planner with specific feedback" }, { label: "Revise", description: "Re-run planner with specific feedback" },
{ label: "Abort", description: "Stop pipeline, keep scan/assessment results" } { label: "Abort", description: "Stop pipeline, keep scan/assessment results" }
] ]

View File

@@ -2,7 +2,7 @@
name: team-testing name: team-testing
description: Multi-agent test pipeline with progressive layer coverage (L1/L2/L3), Generator-Critic loops for coverage convergence, and shared defect memory. Strategist -> Generator -> Executor -> Analyst with dynamic pipeline selection. description: Multi-agent test pipeline with progressive layer coverage (L1/L2/L3), Generator-Critic loops for coverage convergence, and shared defect memory. Strategist -> Generator -> Executor -> Analyst with dynamic pipeline selection.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"task description or scope\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"task description or scope\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -274,16 +274,15 @@ Write(`${sessionFolder}/gc-state.json`, JSON.stringify({
5. **Clarify if ambiguous** (skip if AUTO_YES): 5. **Clarify if ambiguous** (skip if AUTO_YES):
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Detected scope suggests the '" + pipeline + "' pipeline. Confirm?", question: `Detected scope suggests '${pipeline}' pipeline. Approve or override?`,
header: "Pipeline Selection", header: "Pipeline",
multiSelect: false, id: "pipeline_select",
options: [ options: [
{ label: "Proceed with " + pipeline, description: "Detected pipeline is appropriate" }, { label: "Approve (Recommended)", description: `Use ${pipeline} pipeline as detected` },
{ label: "Use targeted", description: "Minimal: L1 only" }, { label: "Targeted", description: "Minimal: L1 only" },
{ label: "Use standard", description: "Progressive: L1 + L2 + analysis" }, { label: "Standard/Full", description: "Progressive L1+L2 or comprehensive L1+L2+L3" }
{ label: "Use comprehensive", description: "Full: L1 + L2 + L3 + analysis" }
] ]
}] }]
}) })
@@ -525,13 +524,13 @@ Session: ${sessionFolder}
`) `)
if (!AUTO_YES) { if (!AUTO_YES) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Testing pipeline complete. What would you like to do?", question: "Testing pipeline complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" }, { label: "Archive (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" },
{ label: "Deepen Coverage", description: "Add more test layers or increase coverage targets" } { label: "Deepen Coverage", description: "Add more test layers or increase coverage targets" }
] ]

View File

@@ -2,7 +2,7 @@
name: team-uidesign name: team-uidesign
description: UI design team pipeline. Research existing design system, generate design tokens (W3C format), audit quality, and implement code. CSV wave pipeline with GC loop (designer <-> reviewer) and dual-track parallel support. description: UI design team pipeline. Research existing design system, generate design tokens (W3C format), audit quality, and implement code. CSV wave pipeline with GC loop (designer <-> reviewer) and dual-track parallel support.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"UI design task description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"UI design task description\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -710,7 +710,7 @@ Convergence: audit.score >= 8 AND audit.critical_count === 0
| discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries | | discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries |
| Audit score < 6 over 2 GC rounds | Escalate to user for manual intervention | | Audit score < 6 over 2 GC rounds | Escalate to user for manual intervention |
| ui-ux-pro-max unavailable | Degrade to LLM general design knowledge | | ui-ux-pro-max unavailable | Degrade to LLM general design knowledge |
| Task description too vague | AskUserQuestion for clarification in Phase 0 | | Task description too vague | request_user_input for clarification in Phase 0 |
| Continue mode: no session found | List available sessions, prompt user to select | | Continue mode: no session found | List available sessions, prompt user to select |
--- ---

View File

@@ -38,7 +38,7 @@ Handle pipeline completion action for the UI design workflow. Loads final pipeli
| `Write` | builtin | Write completion reports and session markers | | `Write` | builtin | Write completion reports and session markers |
| `Bash` | builtin | File operations for archive/export | | `Bash` | builtin | File operations for archive/export |
| `Glob` | builtin | Discover deliverable artifacts across directories | | `Glob` | builtin | Discover deliverable artifacts across directories |
| `AskUserQuestion` | builtin | Present completion options and get user choice | | `request_user_input` | builtin | Present completion options and get user choice |
--- ---
@@ -89,7 +89,7 @@ Handle pipeline completion action for the UI design workflow. Loads final pipeli
- Group by category with file counts and total size - Group by category with file counts and total size
- Highlight key artifacts (design tokens, component specs) - Highlight key artifacts (design tokens, component specs)
- Note any missing expected deliverables - Note any missing expected deliverables
3. Present three completion options to user via AskUserQuestion: 3. Present three completion options to user via request_user_input:
- **Archive & Clean**: Summarize results, mark session complete, clean temp files - **Archive & Clean**: Summarize results, mark session complete, clean temp files
- **Keep Active**: Keep session directory for follow-up iterations - **Keep Active**: Keep session directory for follow-up iterations
- **Export Results**: Copy deliverables to a user-specified location - **Export Results**: Copy deliverables to a user-specified location
@@ -118,7 +118,7 @@ Handle pipeline completion action for the UI design workflow. Loads final pipeli
- Report session ID for `--continue` flag usage - Report session ID for `--continue` flag usage
3. **Export Results**: 3. **Export Results**:
- Ask user for target export directory via AskUserQuestion - Ask user for target export directory via request_user_input
- Create export directory structure mirroring deliverable categories - Create export directory structure mirroring deliverable categories
- Copy all deliverables to target location - Copy all deliverables to target location
- Generate export manifest listing all copied files - Generate export manifest listing all copied files

View File

@@ -2,7 +2,7 @@
name: team-ultra-analyze name: team-ultra-analyze
description: Deep collaborative analysis pipeline. Multi-perspective exploration, deep analysis, user-driven discussion loops, and cross-perspective synthesis. Supports Quick, Standard, and Deep pipeline modes. description: Deep collaborative analysis pipeline. Multi-perspective exploration, deep analysis, user-driven discussion loops, and cross-perspective synthesis. Supports Quick, Standard, and Deep pipeline modes.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--mode quick|standard|deep] \"analysis topic\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] [--mode quick|standard|deep] \"analysis topic\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -282,16 +282,15 @@ If not AUTO_YES, present user with configuration for confirmation:
```javascript ```javascript
if (!AUTO_YES) { if (!AUTO_YES) {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: `Topic: "${topic}"\nPipeline: ${pipeline_mode}\nPerspectives: ${perspectives.join(', ')}\nDimensions: ${dimensions.join(', ')}\n\nApprove?`, question: `Topic: "${topic}"Pipeline: ${pipeline_mode}. Approve or override?`,
header: "Analysis Configuration", header: "Config",
multiSelect: false, id: "analysis_config",
options: [ options: [
{ label: "Approve", description: `Use ${pipeline_mode} mode with ${perspectives.length} perspectives` }, { label: "Approve (Recommended)", description: `Use ${pipeline_mode} mode with ${perspectives.length} perspectives` },
{ label: "Quick", description: "1 explorer 1 analyst synthesizer (fast)" }, { label: "Quick", description: "1 explorer -> 1 analyst -> synthesizer (fast)" },
{ label: "Standard", description: "N explorers N analysts discussion synthesizer" }, { label: "Standard/Deep", description: "N explorers -> N analysts -> discussion -> synthesizer" }
{ label: "Deep", description: "N explorers → N analysts → discussion loop (up to 5 rounds) → synthesizer" }
] ]
}] }]
}) })
@@ -661,13 +660,13 @@ If not AUTO_YES, offer completion options:
```javascript ```javascript
if (!AUTO_YES) { if (!AUTO_YES) {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: "Ultra-Analyze pipeline complete. What would you like to do?", question: "Ultra-Analyze pipeline complete. Choose next action.",
header: "Completion", header: "Done",
multiSelect: false, id: "completion",
options: [ options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session" }, { label: "Archive (Recommended)", description: "Archive session" },
{ label: "Keep Active", description: "Keep session for follow-up" }, { label: "Keep Active", description: "Keep session for follow-up" },
{ label: "Export Results", description: "Export deliverables to specified location" } { label: "Export Results", description: "Export deliverables to specified location" }
] ]

View File

@@ -13,7 +13,7 @@ Collect user feedback after a discussion round and determine next action for the
- Load role definition via MANDATORY FIRST STEPS pattern - Load role definition via MANDATORY FIRST STEPS pattern
- Present discussion results to the user clearly - Present discussion results to the user clearly
- Collect explicit user feedback via AskUserQuestion - Collect explicit user feedback via request_user_input
- Return structured decision for orchestrator to act on - Return structured decision for orchestrator to act on
- Respect max discussion round limits - Respect max discussion round limits
@@ -33,7 +33,7 @@ Collect user feedback after a discussion round and determine next action for the
| Tool | Type | Purpose | | Tool | Type | Purpose |
|------|------|---------| |------|------|---------|
| `Read` | builtin | Load discussion results and session state | | `Read` | builtin | Load discussion results and session state |
| `AskUserQuestion` | builtin | Collect user feedback on discussion | | `request_user_input` | builtin | Collect user feedback on discussion |
--- ---
@@ -75,16 +75,16 @@ Collect user feedback after a discussion round and determine next action for the
- Top open questions - Top open questions
- Round progress (current/max) - Round progress (current/max)
2. Present options via AskUserQuestion: 2. Present options via request_user_input:
``` ```
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: "Discussion round <N>/<max> complete.\n\nThemes: <themes>\nConflicts: <conflicts>\nOpen Questions: <questions>\n\nWhat next?", question: "Discussion round <N>/<max> complete.\n\nThemes: <themes>\nConflicts: <conflicts>\nOpen Questions: <questions>\n\nWhat next?",
header: "Discussion Feedback", header: "Feedback",
multiSelect: false, id: "discussion_next",
options: [ options: [
{ label: "Continue deeper", description: "Current direction is good, investigate open questions deeper" }, { label: "Continue deeper (Recommended)", description: "Current direction is good, investigate open questions deeper" },
{ label: "Adjust direction", description: "Shift analysis focus to a different area" }, { label: "Adjust direction", description: "Shift analysis focus to a different area" },
{ label: "Done", description: "Sufficient depth reached, proceed to final synthesis" } { label: "Done", description: "Sufficient depth reached, proceed to final synthesis" }
] ]
@@ -93,7 +93,7 @@ AskUserQuestion({
``` ```
3. If user chooses "Adjust direction": 3. If user chooses "Adjust direction":
- Follow up with another AskUserQuestion asking for the new focus area - Follow up with another request_user_input asking for the new focus area
- Capture the adjusted focus text - Capture the adjusted focus text
**Output**: User decision and optional adjusted focus **Output**: User decision and optional adjusted focus

View File

@@ -2,7 +2,7 @@
name: team-ux-improve name: team-ux-improve
description: Systematic UX improvement pipeline. Discovers and fixes UI/UX interaction issues including unresponsive buttons, missing feedback, and state refresh problems using scan->diagnose->design->implement->test workflow. description: Systematic UX improvement pipeline. Discovers and fixes UI/UX interaction issues including unresponsive buttons, missing feedback, and state refresh problems using scan->diagnose->design->implement->test workflow.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<project-path> [--framework react|vue]\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"<project-path> [--framework react|vue]\""
allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, spawn_agent, wait, send_input, close_agent, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -452,19 +452,19 @@ writeMasterCSV(`${sessionDir}/tasks.csv`, tasksWithWaves)
// User validation (skip if autoYes) // User validation (skip if autoYes)
if (!autoYes) { if (!autoYes) {
const approval = AskUserQuestion({ const approval = request_user_input({
questions: [{ questions: [{
id: "task_approval",
question: `Generated ${tasksWithWaves.length} tasks for ${components.length} components. Proceed?`, question: `Generated ${tasksWithWaves.length} tasks for ${components.length} components. Proceed?`,
header: "Task Breakdown Validation", header: "Validate",
multiSelect: false,
options: [ options: [
{ label: "Proceed", description: "Start UX improvement pipeline" }, { label: "Proceed (Recommended)", description: "Start UX improvement pipeline" },
{ label: "Cancel", description: "Abort workflow" } { label: "Cancel", description: "Abort workflow" }
] ]
}] }]
}) })
if (approval.answers[0] !== "Proceed") { if (approval.answers.task_approval.answers[0] !== "Proceed (Recommended)") {
throw new Error("User cancelled workflow") throw new Error("User cancelled workflow")
} }
} }
@@ -530,20 +530,19 @@ console.log(`\nResults: ${sessionDir}/results.csv`)
console.log(`Report: ${sessionDir}/context.md`) console.log(`Report: ${sessionDir}/context.md`)
// Offer next steps // Offer next steps
const nextStep = AskUserQuestion({ const nextStep = request_user_input({
questions: [{ questions: [{
id: "completion",
question: "UX Improvement pipeline complete. What would you like to do?", question: "UX Improvement pipeline complete. What would you like to do?",
header: "Completion", header: "Done",
multiSelect: false,
options: [ options: [
{ label: "Archive & Clean", description: "Archive session and clean up team resources" }, { label: "Archive (Recommended)", description: "Archive session and clean up team resources" },
{ label: "Keep Active", description: "Keep session for follow-up work" }, { label: "Keep Active", description: "Keep session for follow-up work" }
{ label: "Export Results", description: "Export deliverables to specified location" }
] ]
}] }]
}) })
if (nextStep.answers[0] === "Archive & Clean") { if (nextStep.answers.completion.answers[0] === "Archive (Recommended)") {
Bash(`tar -czf "${sessionDir}.tar.gz" "${sessionDir}" && rm -rf "${sessionDir}"`) Bash(`tar -czf "${sessionDir}.tar.gz" "${sessionDir}" && rm -rf "${sessionDir}"`)
console.log(`Session archived to ${sessionDir}.tar.gz`) console.log(`Session archived to ${sessionDir}.tar.gz`)
} }
@@ -576,7 +575,7 @@ All agents share `discoveries.ndjson` for UX findings.
| Error | Resolution | | Error | Resolution |
|-------|------------| |-------|------------|
| Framework detection fails | AskUserQuestion for framework selection | | Framework detection fails | request_user_input for framework selection |
| No components found | Complete with empty report, note in findings | | No components found | Complete with empty report, note in findings |
| Circular dependency | Detect in wave computation, abort with error | | Circular dependency | Detect in wave computation, abort with error |
| CSV agent timeout | Mark as failed, continue with wave | | CSV agent timeout | Mark as failed, continue with wave |

View File

@@ -34,7 +34,7 @@ Interactive agent for designing fix approaches for identified UX issues. Propose
|------|------|---------| |------|------|---------|
| `Read` | File I/O | Load diagnosis, exploration cache | | `Read` | File I/O | Load diagnosis, exploration cache |
| `Write` | File I/O | Generate design guide | | `Write` | File I/O | Generate design guide |
| `AskUserQuestion` | Human interaction | Clarify design decisions if needed | | `request_user_input` | Human interaction | Clarify design decisions if needed |
--- ---
@@ -132,5 +132,5 @@ Interactive agent for designing fix approaches for identified UX issues. Propose
| Scenario | Resolution | | Scenario | Resolution |
|----------|------------| |----------|------------|
| No issues found | Generate empty design guide, note in findings | | No issues found | Generate empty design guide, note in findings |
| Ambiguous fix approach | Ask user for guidance via AskUserQuestion | | Ambiguous fix approach | Ask user for guidance via request_user_input |
| Conflicting patterns | Document trade-offs, recommend approach | | Conflicting patterns | Document trade-offs, recommend approach |

View File

@@ -153,6 +153,6 @@ Interactive agent for exploring codebase to identify UI component patterns and f
| Scenario | Resolution | | Scenario | Resolution |
|----------|------------| |----------|------------|
| Framework detection fails | Ask user via AskUserQuestion | | Framework detection fails | Ask user via request_user_input |
| No components found | Return empty inventory, note in findings | | No components found | Return empty inventory, note in findings |
| Invalid project path | Report error, request valid path | | Invalid project path | Report error, request valid path |

View File

@@ -369,18 +369,19 @@ tasks.forEach(task => {
```javascript ```javascript
if (!dryRun) { if (!dryRun) {
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: `Execute ${tasks.length} tasks?\n\n${conflicts.length ? `${conflicts.length} file conflicts\n` : ''}Execution order:\n${executionOrder.map((id, i) => ` ${i+1}. ${id}: ${tasks.find(t => t.id === id).title}`).join('\n')}`,
header: "Confirm", header: "Confirm",
multiSelect: false, id: "confirm_execute",
question: `Execute ${tasks.length} tasks?`,
options: [ options: [
{ label: "Execute", description: "Start serial execution" }, { label: "Execute (Recommended)", description: "Start serial execution" },
{ label: "Dry Run", description: "Simulate without changes" }, { label: "Dry Run", description: "Simulate without changes" },
{ label: "Cancel", description: "Abort execution" } { label: "Cancel", description: "Abort execution" }
] ]
}] }]
}) })
// answer.answers.confirm_execute.answers[0] → selected label
} }
``` ```
@@ -565,19 +566,19 @@ ${task.convergence.criteria.map((c, i) => `- [${convergenceResults.verified[i] ?
failedTasks.add(task.id) failedTasks.add(task.id)
// Ask user // Ask user
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: `Task ${task.id} failed convergence verification. How to proceed?`,
header: "Failure", header: "Failure",
multiSelect: false, id: "handle_failure",
question: `Task ${task.id} failed convergence verification. How to proceed?`,
options: [ options: [
{ label: "Skip & Continue", description: "Skip this task, continue with next" }, { label: "Skip & Continue (Recommended)", description: "Skip this task, continue with next" },
{ label: "Retry", description: "Retry this task" }, { label: "Retry", description: "Retry this task" },
{ label: "Accept", description: "Mark as completed despite failure" },
{ label: "Abort", description: "Stop execution, keep progress" } { label: "Abort", description: "Stop execution, keep progress" }
] ]
}] }]
}) })
// answer.answers.handle_failure.answers[0] → selected label
} }
``` ```
@@ -697,19 +698,19 @@ tasks.forEach(task => {
### Step 4.4: Post-Completion Options ### Step 4.4: Post-Completion Options
```javascript ```javascript
AskUserQuestion({ request_user_input({
questions: [{ questions: [{
question: `Execution complete: ${completedTasks.size}/${tasks.length} succeeded (${Math.round(completedTasks.size / tasks.length * 100)}%).\nNext step:`, header: "Post Execute",
header: "Post-Execute", id: "post_execute",
multiSelect: false, question: `Execution complete: ${completedTasks.size}/${tasks.length} succeeded. Next step?`,
options: [ options: [
{ label: "Done (Recommended)", description: "End workflow" },
{ label: "Retry Failed", description: `Re-execute ${failedTasks.size} failed tasks` }, { label: "Retry Failed", description: `Re-execute ${failedTasks.size} failed tasks` },
{ label: "View Events", description: "Display execution-events.md" }, { label: "Create Issue", description: "Create issue from failed tasks" }
{ label: "Create Issue", description: "Create issue from failed tasks" },
{ label: "Done", description: "End workflow" }
] ]
}] }]
}) })
// answer.answers.post_execute.answers[0] → selected label
``` ```
| Selection | Action | | Selection | Action |

View File

@@ -6,7 +6,7 @@ description: |
wave execution via spawn_agents_on_csv → results sync. wave execution via spawn_agents_on_csv → results sync.
Task JSONs remain the rich data source; CSV is brief + execution state. Task JSONs remain the rich data source; CSV is brief + execution state.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--resume-session=ID] [--with-commit]" argument-hint: "[-y|--yes] [-c|--concurrency N] [--resume-session=ID] [--with-commit]"
allowed-tools: spawn_agents_on_csv, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep allowed-tools: spawn_agents_on_csv, request_user_input, Read, Write, Edit, Bash, Glob, Grep
--- ---
## Auto Mode ## Auto Mode
@@ -213,18 +213,18 @@ if (isResumeMode) {
return { id, path: s, progress: `${done}/${total} tasks` } return { id, path: s, progress: `${done}/${total} tasks` }
}) })
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: "Select session to execute:",
header: "Session", header: "Session",
multiSelect: false, id: "session",
question: "Select session to execute.",
options: sessionInfos.map(s => ({ options: sessionInfos.map(s => ({
label: s.id, label: s.id,
description: s.progress description: s.progress
})) }))
}] }]
}) })
sessionId = answer.Session sessionId = answer.answers.session.answers[0]
sessionFolder = `.workflow/active/${sessionId}` sessionFolder = `.workflow/active/${sessionId}`
} }
} }
@@ -546,23 +546,23 @@ if (!AUTO_YES) {
console.log(` Wave ${w}: ${waveTasks.map(t => `${t.id}(${t.agent})`).join(', ')}`) console.log(` Wave ${w}: ${waveTasks.map(t => `${t.id}(${t.agent})`).join(', ')}`)
} }
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: `Proceed with ${pendingRows.length} tasks across ${maxWave} waves?`,
header: "Confirm", header: "Confirm",
multiSelect: false, id: "confirm_execute",
question: `Proceed with ${pendingRows.length} tasks across ${maxWave} waves?`,
options: [ options: [
{ label: "Execute", description: "Proceed with wave execution" }, { label: "Execute (Recommended)", description: "Proceed with wave execution" },
{ label: "Modify", description: `Edit ${sessionFolder}/tasks.csv then --resume-session` }, { label: "Modify", description: `Edit ${sessionFolder}/tasks.csv then --resume-session` },
{ label: "Cancel", description: "Abort" } { label: "Cancel", description: "Abort" }
] ]
}] }]
}) })
if (answer.Confirm === "Modify") { if (answer.answers.confirm_execute.answers[0] === "Modify") {
console.log(`Edit: ${sessionFolder}/tasks.csv\nResume: $workflow-execute --resume-session=${sessionId}`) console.log(`Edit: ${sessionFolder}/tasks.csv\nResume: $workflow-execute --resume-session=${sessionId}`)
return return
} else if (answer.Confirm === "Cancel") { } else if (answer.answers.confirm_execute.answers[0] === "Cancel") {
return return
} }
} }
@@ -891,19 +891,19 @@ Bash(`cd "${sessionFolder}" && jq '.status = "${sessionStatus}" | .completed_at
if (AUTO_YES) { if (AUTO_YES) {
console.log(` [--yes] Session ${sessionId} ${sessionStatus}.`) console.log(` [--yes] Session ${sessionId} ${sessionStatus}.`)
} else { } else {
const nextStep = AskUserQuestion({ const nextStep = request_user_input({
questions: [{ questions: [{
question: "Execution complete. What's next?",
header: "Next Step", header: "Next Step",
multiSelect: false, id: "next_step",
question: "Execution complete. What is next?",
options: [ options: [
{ label: "Enter Review", description: "Run post-implementation review (security/quality/architecture)" }, { label: "Enter Review (Recommended)", description: "Run post-implementation review (security/quality/architecture)" },
{ label: "Complete Session", description: "Archive session and finalize" } { label: "Complete Session", description: "Archive session and finalize" }
] ]
}] }]
}) })
if (nextStep['Next Step'] === 'Enter Review') { if (nextStep.answers.next_step.answers[0] === 'Enter Review (Recommended)') {
// → Phase 6 // → Phase 6
} else { } else {
console.log(` Session ${sessionId} ${sessionStatus}.`) console.log(` Session ${sessionId} ${sessionStatus}.`)
@@ -922,20 +922,19 @@ if (AUTO_YES) {
console.log(`\n## Phase 6: Post-Implementation Review\n`) console.log(`\n## Phase 6: Post-Implementation Review\n`)
const reviewType = AUTO_YES ? 'quality' : (() => { const reviewType = AUTO_YES ? 'quality' : (() => {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: "Select review type:", header: "Review Type",
header: "Review", id: "review_type",
multiSelect: false, question: "Select review type.",
options: [ options: [
{ label: "Quality", description: "Code quality, best practices, maintainability" }, { label: "Quality (Recommended)", description: "Code quality, best practices, maintainability" },
{ label: "Security", description: "Security vulnerabilities, OWASP Top 10" }, { label: "Security", description: "Security vulnerabilities, OWASP Top 10" },
{ label: "Architecture", description: "Architecture decisions, scalability, patterns" }, { label: "Architecture", description: "Architecture decisions, scalability, patterns" }
{ label: "Action Items", description: "TODO items, tech debt, follow-ups" }
] ]
}] }]
}) })
return answer.Review.toLowerCase() return answer.answers.review_type.answers[0].toLowerCase()
})() })()
// Get list of modified files from tasks.csv // Get list of modified files from tasks.csv
@@ -967,19 +966,19 @@ console.log(` Review complete: ${sessionFolder}/REVIEW-${reviewType}.md`)
// Post-review options // Post-review options
if (!AUTO_YES) { if (!AUTO_YES) {
const postReview = AskUserQuestion({ const postReview = request_user_input({
questions: [{ questions: [{
question: "Review complete. What's next?", header: "Post Review",
header: "Post-Review", id: "post_review",
multiSelect: false, question: "Review complete. What is next?",
options: [ options: [
{ label: "Another Review", description: "Run a different review type" }, { label: "Complete Session (Recommended)", description: "Archive and finalize" },
{ label: "Complete Session", description: "Archive and finalize" } { label: "Another Review", description: "Run a different review type" }
] ]
}] }]
}) })
if (postReview['Post-Review'] === 'Another Review') { if (postReview.answers.post_review.answers[0] === 'Another Review') {
// Loop back to Phase 6 review type selection // Loop back to Phase 6 review type selection
} }
} }

View File

@@ -2,7 +2,7 @@
name: workflow-lite-plan name: workflow-lite-plan
description: Explore-first wave pipeline. Decomposes requirement into exploration angles, runs wave exploration via spawn_agents_on_csv, synthesizes findings into execution tasks with cross-phase context linking (E*→T*), then wave-executes via spawn_agents_on_csv. description: Explore-first wave pipeline. Decomposes requirement into exploration angles, runs wave exploration via spawn_agents_on_csv, synthesizes findings into execution tasks with cross-phase context linking (E*→T*), then wave-executes via spawn_agents_on_csv.
argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"requirement description\"" argument-hint: "[-y|--yes] [-c|--concurrency N] [--continue] \"requirement description\""
allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, request_user_input
--- ---
## Auto Mode ## Auto Mode
@@ -33,7 +33,7 @@ $workflow-lite-plan --continue "auth-20260228"
Explore-first wave-based pipeline using `spawn_agents_on_csv`. Two-stage CSV execution: **explore.csv** (codebase discovery) → **tasks.csv** (implementation), with cross-phase context propagation via `context_from` linking (`E*``T*`). Explore-first wave-based pipeline using `spawn_agents_on_csv`. Two-stage CSV execution: **explore.csv** (codebase discovery) → **tasks.csv** (implementation), with cross-phase context propagation via `context_from` linking (`E*``T*`).
**Core workflow**: Decompose → Wave Explore → Synthesize & Plan → Wave Execute → Aggregate **Core workflow**: Decompose → **[Confirm]** → Wave Explore → Synthesize & Plan → **[Confirm]** → Wave Execute → Aggregate
``` ```
┌──────────────────────────────────────────────────────────────────────┐ ┌──────────────────────────────────────────────────────────────────────┐
@@ -43,7 +43,7 @@ Explore-first wave-based pipeline using `spawn_agents_on_csv`. Two-stage CSV exe
│ Phase 1: Requirement → explore.csv │ │ Phase 1: Requirement → explore.csv │
│ ├─ Analyze complexity → select exploration angles (1-4) │ │ ├─ Analyze complexity → select exploration angles (1-4) │
│ ├─ Generate explore.csv (1 row per angle) │ │ ├─ Generate explore.csv (1 row per angle) │
│ └─ User validates (skip if -y) │ └─ ⛔ MANDATORY: User validates (skip ONLY if -y) │
│ │ │ │
│ Phase 2: Wave Explore (spawn_agents_on_csv) │ │ Phase 2: Wave Explore (spawn_agents_on_csv) │
│ ├─ For each explore wave: │ │ ├─ For each explore wave: │
@@ -57,7 +57,7 @@ Explore-first wave-based pipeline using `spawn_agents_on_csv`. Two-stage CSV exe
│ ├─ Resolve conflicts between angles │ │ ├─ Resolve conflicts between angles │
│ ├─ Decompose into execution tasks with context_from: E*;T* │ │ ├─ Decompose into execution tasks with context_from: E*;T* │
│ ├─ Compute dependency waves (topological sort) │ │ ├─ Compute dependency waves (topological sort) │
│ └─ User validates (skip if -y) │ └─ ⛔ MANDATORY: User validates (skip ONLY if -y) │
│ │ │ │
│ Phase 4: Wave Execute (spawn_agents_on_csv) │ │ Phase 4: Wave Execute (spawn_agents_on_csv) │
│ ├─ For each task wave: │ │ ├─ For each task wave: │
@@ -283,18 +283,19 @@ REQUIREMENT: ${requirement}" --tool gemini --mode analysis --rule planning-break
Write(`${sessionFolder}/explore.csv`, [header, ...rows].join('\n')) Write(`${sessionFolder}/explore.csv`, [header, ...rows].join('\n'))
``` ```
3. **User Validation** (skip if AUTO_YES) 3. **User Validation — MANDATORY CONFIRMATION GATE** (skip ONLY if AUTO_YES)
**CRITICAL: You MUST stop here and wait for user confirmation before proceeding to Phase 2. DO NOT skip this step. DO NOT auto-proceed.**
```javascript ```javascript
if (!AUTO_YES) { if (!AUTO_YES) {
console.log(`\n## Exploration Plan (${angles.length} angles)\n`) console.log(`\n## Exploration Plan (${angles.length} angles)\n`)
angles.forEach(a => console.log(` - [${a.id}] ${a.angle}: ${a.focus}`)) angles.forEach(a => console.log(` - [${a.id}] ${a.angle}: ${a.focus}`))
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: "Approve exploration angles?", question: "Approve exploration angles?",
header: "Validation", header: "Validation",
multiSelect: false,
options: [ options: [
{ label: "Approve", description: "Proceed with wave exploration" }, { label: "Approve", description: "Proceed with wave exploration" },
{ label: "Modify", description: `Edit ${sessionFolder}/explore.csv manually, then --continue` }, { label: "Modify", description: `Edit ${sessionFolder}/explore.csv manually, then --continue` },
@@ -567,7 +568,9 @@ REQUIREMENT: ${requirement}" --tool gemini --mode analysis --rule planning-break
Write(`${sessionFolder}/tasks.csv`, [header, ...rows].join('\n')) Write(`${sessionFolder}/tasks.csv`, [header, ...rows].join('\n'))
``` ```
4. **User Validation** (skip if AUTO_YES) 4. **User Validation — MANDATORY CONFIRMATION GATE** (skip ONLY if AUTO_YES)
**CRITICAL: You MUST stop here and wait for user confirmation before proceeding to Phase 4. DO NOT skip this step. DO NOT auto-proceed.**
```javascript ```javascript
if (!AUTO_YES) { if (!AUTO_YES) {
@@ -585,11 +588,10 @@ ${wt.map(t => ` - [${t.id}] ${t.title} (scope: ${t.scope}, from: ${t.context_fr
}).join('\n')} }).join('\n')}
`) `)
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: `Proceed with ${decomposedTasks.length} tasks across ${maxWave} waves?`, question: `Proceed with ${decomposedTasks.length} tasks across ${maxWave} waves?`,
header: "Confirm", header: "Confirm",
multiSelect: false,
options: [ options: [
{ label: "Execute", description: "Proceed with wave execution" }, { label: "Execute", description: "Proceed with wave execution" },
{ label: "Modify", description: `Edit ${sessionFolder}/tasks.csv then --continue` }, { label: "Modify", description: `Edit ${sessionFolder}/tasks.csv then --continue` },
@@ -600,17 +602,18 @@ ${wt.map(t => ` - [${t.id}] ${t.title} (scope: ${t.scope}, from: ${t.context_fr
if (answer.Confirm === "Modify") { if (answer.Confirm === "Modify") {
console.log(`Edit: ${sessionFolder}/tasks.csv\nResume: $workflow-lite-plan --continue`) console.log(`Edit: ${sessionFolder}/tasks.csv\nResume: $workflow-lite-plan --continue`)
return return // STOP — do not proceed to Phase 4
} else if (answer.Confirm === "Cancel") { } else if (answer.Confirm === "Cancel") {
return return // STOP — do not proceed to Phase 4
} }
// Only reach here if user selected "Execute"
} }
``` ```
**Success Criteria**: **Success Criteria**:
- tasks.csv created with context_from linking to E* rows - tasks.csv created with context_from linking to E* rows
- No circular dependencies - No circular dependencies
- User approved (or AUTO_YES) - User explicitly approved (or AUTO_YES) — Phase 4 MUST NOT start without this
--- ---
@@ -986,11 +989,10 @@ ${[...new Set(finalTasks.flatMap(t => (t.files_modified || '').split(';')).filte
```javascript ```javascript
if (!AUTO_YES && failed.length > 0) { if (!AUTO_YES && failed.length > 0) {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: `${failed.length} tasks failed. Next action?`, question: `${failed.length} tasks failed. Next action?`,
header: "Next Step", header: "Next Step",
multiSelect: false,
options: [ options: [
{ label: "Retry Failed", description: `Re-execute ${failed.length} failed tasks with updated context` }, { label: "Retry Failed", description: `Re-execute ${failed.length} failed tasks with updated context` },
{ label: "View Report", description: "Display context.md" }, { label: "View Report", description: "Display context.md" },
@@ -1114,7 +1116,8 @@ All agents across all phases share `discoveries.ndjson`. This eliminates redunda
6. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson 6. **Discovery Board is Append-Only**: Never clear, modify, or recreate discoveries.ndjson
7. **Skip on Failure**: If a dependency failed, skip the dependent task (cascade) 7. **Skip on Failure**: If a dependency failed, skip the dependent task (cascade)
8. **Cleanup Temp Files**: Remove wave CSVs after results are merged 8. **Cleanup Temp Files**: Remove wave CSVs after results are merged
9. **DO NOT STOP**: Continuous execution until all waves complete or all remaining tasks are skipped 9. **MANDATORY CONFIRMATION GATES**: Unless `-y`/`--yes` is set, you MUST stop and wait for user confirmation after Phase 1 (exploration plan) and Phase 3 (execution plan) before proceeding. NEVER skip these gates. Phase 4 execution MUST NOT begin until user explicitly approves
10. **Continuous Within Phase**: Within a phase (e.g., wave loop in Phase 4), execute continuously until all waves complete or all remaining tasks are skipped — but NEVER cross a confirmation gate without user approval
--- ---

View File

@@ -6,12 +6,12 @@ description: |
(spawn_agent or N+1 parallel agents) → plan verification → interactive replan. (spawn_agent or N+1 parallel agents) → plan verification → interactive replan.
Produces IMPL_PLAN.md, task JSONs, TODO_LIST.md. Produces IMPL_PLAN.md, task JSONs, TODO_LIST.md.
argument-hint: "[-y|--yes] [--session ID] \"task description\" | verify [--session ID] | replan [--session ID] [IMPL-N] \"changes\"" argument-hint: "[-y|--yes] [--session ID] \"task description\" | verify [--session ID] | replan [--session ID] [IMPL-N] \"changes\""
allowed-tools: spawn_agent, wait, send_input, close_agent, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep allowed-tools: spawn_agent, wait, send_input, close_agent, request_user_input, Read, Write, Edit, Bash, Glob, Grep
--- ---
## Auto Mode ## Auto Mode
When `--yes` or `-y`: Skip all confirmations, use defaults, auto-verify, auto-continue to execute if PROCEED. When `--yes` or `-y`: Skip all confirmations, use defaults, auto-verify. **This skill is planning-only — it NEVER executes implementation. Output is the plan for user review.**
# Workflow Plan # Workflow Plan
@@ -68,9 +68,9 @@ Multi-mode planning pipeline using subagent coordination. Plan mode runs 4 seque
│ ├─ Multi-module → N+1 parallel agents │ │ ├─ Multi-module → N+1 parallel agents │
│ └─ Output: IMPL_PLAN.md + task JSONs + TODO_LIST.md │ │ └─ Output: IMPL_PLAN.md + task JSONs + TODO_LIST.md │
│ │ │ │
│ Plan Confirmation Gate │ Plan Confirmation Gate (PLANNING ENDS HERE)
│ ├─ "Verify Plan" → Phase 5 │ │ ├─ "Verify Plan" → Phase 5 │
│ ├─ "Start Execution" → workflow-execute │ ├─ "Done" → Display next-step command for user
│ └─ "Review Status" → Display inline │ │ └─ "Review Status" → Display inline │
│ │ │ │
│ ═══ Verify Mode ═══ │ │ ═══ Verify Mode ═══ │
@@ -209,11 +209,10 @@ if (existingSessionId) {
sessionFolder = sessions[0] sessionFolder = sessions[0]
sessionId = sessions[0].split('/').pop() sessionId = sessions[0].split('/').pop()
} else { } else {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: "Multiple sessions found. Select one:", question: "Multiple sessions found. Select one:",
header: "Session", header: "Session",
multiSelect: false,
options: sessions.slice(0, 4).map(s => ({ options: sessions.slice(0, 4).map(s => ({
label: s.split('/').pop(), label: s.split('/').pop(),
description: s description: s
@@ -329,11 +328,10 @@ TASK DESCRIPTION: ${taskDescription}" --tool gemini --mode analysis --rule analy
console.log(` Strategy: ${c.strategy} | Impact: ${c.impact}`) console.log(` Strategy: ${c.strategy} | Impact: ${c.impact}`)
}) })
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: "Accept conflict resolution strategies?", question: "Accept conflict resolution strategies?",
header: "Conflicts", header: "Conflicts",
multiSelect: false,
options: [ options: [
{ label: "Accept All", description: "Apply all recommended strategies" }, { label: "Accept All", description: "Apply all recommended strategies" },
{ label: "Review Each", description: "Approve strategies individually" }, { label: "Review Each", description: "Approve strategies individually" },
@@ -479,31 +477,30 @@ Integrate ${uniqueModules.length} module plans into unified IMPL_PLAN.md.
console.log(` Plan: ${sessionFolder}/IMPL_PLAN.md`) console.log(` Plan: ${sessionFolder}/IMPL_PLAN.md`)
if (AUTO_YES) { if (AUTO_YES) {
// Auto-verify then auto-execute if PROCEED // Auto-verify plan quality
console.log(` [--yes] Auto-verifying plan...`) console.log(` [--yes] Auto-verifying plan...`)
// → Fall through to Phase 5, then Phase 5 result determines next step // → Fall through to Phase 5
} else { } else {
const nextStep = AskUserQuestion({ const nextStep = request_user_input({
questions: [{ questions: [{
question: "Plan generated. What's next?", question: "Plan generated. What's next?",
header: "Next Step", header: "Next Step",
multiSelect: false,
options: [ options: [
{ label: "Verify Plan (Recommended)", description: "Run quality verification before execution" }, { label: "Verify Plan (Recommended)", description: "Run quality verification" },
{ label: "Start Execution", description: "Proceed to workflow-execute" }, { label: "Done", description: "Planning complete — show next-step command" },
{ label: "Review Status", description: "Display plan summary inline" } { label: "Review Status", description: "Display plan summary inline" }
] ]
}] }]
}) })
if (nextStep['Next Step'] === 'Start Execution') { if (nextStep['Next Step'] === 'Done') {
console.log(`\nReady to execute. Run: $workflow-execute --session ${sessionId}`) console.log(`\nPlanning complete. To execute, run: $workflow-execute --session ${sessionId}`)
return return // STOP — this skill is planning-only
} }
if (nextStep['Next Step'] === 'Review Status') { if (nextStep['Next Step'] === 'Review Status') {
const plan = Read(`${sessionFolder}/IMPL_PLAN.md`) const plan = Read(`${sessionFolder}/IMPL_PLAN.md`)
console.log(plan) console.log(plan)
return return // STOP — this skill is planning-only
} }
// Verify → continue to Phase 5 // Verify → continue to Phase 5
} }
@@ -550,10 +547,8 @@ CONSTRAINTS: Read-only | No file modifications | Be specific about issues" --too
console.log(` Quality gate: ${qualityGate}`) console.log(` Quality gate: ${qualityGate}`)
console.log(` Report: ${sessionFolder}/.process/PLAN_VERIFICATION.md`) console.log(` Report: ${sessionFolder}/.process/PLAN_VERIFICATION.md`)
if (AUTO_YES && qualityGate === 'PROCEED') { console.log(`\nPlanning complete. To execute, run: $workflow-execute --session ${sessionId}`)
console.log(` [--yes] Plan verified. Ready for execution.`) // STOP — this skill is planning-only, NEVER proceed to execution
console.log(` Run: $workflow-execute --session ${sessionId}`)
}
} }
``` ```

View File

@@ -7,12 +7,12 @@ description: |
interactive verification. Produces IMPL_PLAN.md with Red-Green-Refactor cycles, interactive verification. Produces IMPL_PLAN.md with Red-Green-Refactor cycles,
task JSONs, TODO_LIST.md. task JSONs, TODO_LIST.md.
argument-hint: "[-y|--yes] [--session ID] \"task description\" | verify [--session ID]" argument-hint: "[-y|--yes] [--session ID] \"task description\" | verify [--session ID]"
allowed-tools: spawn_agent, wait, send_input, close_agent, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep allowed-tools: spawn_agent, wait, send_input, close_agent, request_user_input, Read, Write, Edit, Bash, Glob, Grep
--- ---
## Auto Mode ## Auto Mode
When `--yes` or `-y`: Skip all confirmations, use defaults, auto-verify, auto-continue to execute if PROCEED. When `--yes` or `-y`: Skip all confirmations, use defaults, auto-verify. **This skill is planning-only — it NEVER executes implementation. Output is the plan for user review.**
# Workflow TDD Plan # Workflow TDD Plan
@@ -75,9 +75,9 @@ Multi-mode TDD planning pipeline using subagent coordination. Plan mode runs 6 s
│ ├─ Validate Red-Green-Refactor structure │ │ ├─ Validate Red-Green-Refactor structure │
│ └─ Present Plan Confirmation Gate │ │ └─ Present Plan Confirmation Gate │
│ │ │ │
│ Plan Confirmation Gate │ Plan Confirmation Gate (PLANNING ENDS HERE)
│ ├─ "Verify TDD Compliance" → Phase 7 │ │ ├─ "Verify TDD Compliance" → Phase 7 │
│ ├─ "Start Execution" → workflow-execute │ ├─ "Done" → Display next-step command for user
│ └─ "Review Status" → Display inline │ │ └─ "Review Status" → Display inline │
│ │ │ │
│ ═══ Verify Mode ═══ │ │ ═══ Verify Mode ═══ │
@@ -228,11 +228,10 @@ if (existingSessionId) {
sessionFolder = sessions[0] sessionFolder = sessions[0]
sessionId = sessions[0].split('/').pop() sessionId = sessions[0].split('/').pop()
} else { } else {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: "Multiple sessions found. Select one:", question: "Multiple sessions found. Select one:",
header: "Session", header: "Session",
multiSelect: false,
options: sessions.slice(0, 4).map(s => ({ options: sessions.slice(0, 4).map(s => ({
label: s.split('/').pop(), label: s.split('/').pop(),
description: s description: s
@@ -422,11 +421,10 @@ TASK DESCRIPTION: ${taskDescription}" --tool gemini --mode analysis --rule analy
console.log(` Strategy: ${c.strategy} | Impact: ${c.impact}`) console.log(` Strategy: ${c.strategy} | Impact: ${c.impact}`)
}) })
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: "Accept conflict resolution strategies?", question: "Accept conflict resolution strategies?",
header: "Conflicts", header: "Conflicts",
multiSelect: false,
options: [ options: [
{ label: "Accept All", description: "Apply all recommended strategies" }, { label: "Accept All", description: "Apply all recommended strategies" },
{ label: "Review Each", description: "Approve strategies individually" }, { label: "Review Each", description: "Approve strategies individually" },
@@ -556,11 +554,10 @@ if (validationErrors.length > 0) {
validationErrors.forEach(e => console.log(` - ${e}`)) validationErrors.forEach(e => console.log(` - ${e}`))
if (!AUTO_YES) { if (!AUTO_YES) {
const answer = AskUserQuestion({ const answer = request_user_input({
questions: [{ questions: [{
question: "TDD structure validation failed. Continue anyway?", question: "TDD structure validation failed. Continue anyway?",
header: "Validation", header: "Validation",
multiSelect: false,
options: [ options: [
{ label: "Fix and Retry", description: "Regenerate tasks with correct structure" }, { label: "Fix and Retry", description: "Regenerate tasks with correct structure" },
{ label: "Continue", description: "Proceed despite errors" }, { label: "Continue", description: "Proceed despite errors" },
@@ -590,27 +587,26 @@ if (AUTO_YES) {
console.log(` [--yes] Auto-verifying TDD compliance...`) console.log(` [--yes] Auto-verifying TDD compliance...`)
// → Fall through to Phase 7 // → Fall through to Phase 7
} else { } else {
const nextStep = AskUserQuestion({ const nextStep = request_user_input({
questions: [{ questions: [{
question: "TDD plan generated. What's next?", question: "TDD plan generated. What's next?",
header: "Next Step", header: "Next Step",
multiSelect: false,
options: [ options: [
{ label: "Verify TDD Compliance (Recommended)", description: "Run full TDD compliance verification" }, { label: "Verify TDD Compliance (Recommended)", description: "Run full TDD compliance verification" },
{ label: "Start Execution", description: "Proceed to workflow-execute" }, { label: "Done", description: "Planning complete — show next-step command" },
{ label: "Review Status", description: "Display plan summary inline" } { label: "Review Status", description: "Display plan summary inline" }
] ]
}] }]
}) })
if (nextStep['Next Step'] === 'Start Execution') { if (nextStep['Next Step'] === 'Done') {
console.log(`\nReady to execute. Run: $workflow-execute --session ${sessionId}`) console.log(`\nPlanning complete. To execute, run: $workflow-execute --session ${sessionId}`)
return return // STOP — this skill is planning-only
} }
if (nextStep['Next Step'] === 'Review Status') { if (nextStep['Next Step'] === 'Review Status') {
const plan = Read(`${sessionFolder}/IMPL_PLAN.md`) const plan = Read(`${sessionFolder}/IMPL_PLAN.md`)
console.log(plan) console.log(plan)
return return // STOP — this skill is planning-only
} }
// Verify → continue to Phase 7 // Verify → continue to Phase 7
} }
@@ -703,10 +699,8 @@ BLOCKED: Critical failures, must fix before execution
console.log(` Quality gate: ${qualityGate}`) console.log(` Quality gate: ${qualityGate}`)
console.log(` Report: ${sessionFolder}/.process/TDD_COMPLIANCE_REPORT.md`) console.log(` Report: ${sessionFolder}/.process/TDD_COMPLIANCE_REPORT.md`)
if (AUTO_YES && qualityGate === 'APPROVED') { console.log(`\nPlanning complete. To execute, run: $workflow-execute --session ${sessionId}`)
console.log(` [--yes] TDD compliance verified. Ready for execution.`) // STOP — this skill is planning-only, NEVER proceed to execution
console.log(` Run: $workflow-execute --session ${sessionId}`)
}
} }
``` ```

View File

@@ -1,7 +1,7 @@
--- ---
name: workflow-test-fix-cycle name: workflow-test-fix-cycle
description: End-to-end test-fix workflow generate test sessions with progressive layers (L0-L3), then execute iterative fix cycles until pass rate >= 95%. Combines test-fix-gen and test-cycle-execute into a unified pipeline. Triggers on "workflow:test-fix-cycle". description: End-to-end test-fix workflow generate test sessions with progressive layers (L0-L3), then execute iterative fix cycles until pass rate >= 95%. Combines test-fix-gen and test-cycle-execute into a unified pipeline. Triggers on "workflow:test-fix-cycle".
allowed-tools: spawn_agent, wait, send_input, close_agent, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep allowed-tools: spawn_agent, wait, send_input, close_agent, request_user_input, Read, Write, Edit, Bash, Glob, Grep
--- ---
# Workflow Test-Fix Cycle # Workflow Test-Fix Cycle
@@ -63,7 +63,7 @@ Task Pipeline:
1. **Two-Phase Pipeline**: Generation (Phase 1) creates session + tasks, Execution (Phase 2) runs iterative fix cycles 1. **Two-Phase Pipeline**: Generation (Phase 1) creates session + tasks, Execution (Phase 2) runs iterative fix cycles
2. **Pure Orchestrator**: Dispatch to phase docs, parse outputs, pass context between phases 2. **Pure Orchestrator**: Dispatch to phase docs, parse outputs, pass context between phases
3. **Auto-Continue**: Full pipeline runs autonomously once triggered 3. **Phase 1 Auto-Continue**: Sub-phases within Phase 1 run autonomously
4. **Subagent Lifecycle**: Explicit lifecycle management with spawn_agent → wait → close_agent 4. **Subagent Lifecycle**: Explicit lifecycle management with spawn_agent → wait → close_agent
5. **Progressive Test Layers**: L0 (Static) → L1 (Unit) → L2 (Integration) → L3 (E2E) 5. **Progressive Test Layers**: L0 (Static) → L1 (Unit) → L2 (Integration) → L3 (E2E)
6. **AI Code Issue Detection**: Validates against common AI-generated code problems 6. **AI Code Issue Detection**: Validates against common AI-generated code problems
@@ -74,7 +74,7 @@ Task Pipeline:
## Auto Mode ## Auto Mode
This workflow is fully autonomous - Phase 1 generates test session and tasks, Phase 2 executes iterative fix cycles, all without user intervention until pass rate >= 95% or max iterations reached. Phase 1 generates test session and tasks. Phase 2 executes iterative fix cycles until pass rate >= 95% or max iterations reached. **Between Phase 1 and Phase 2, you MUST stop and wait for user confirmation before proceeding to execution.** Phase 2 runs autonomously once approved.
## Subagent API Reference ## Subagent API Reference
@@ -197,6 +197,10 @@ Phase 1: Test-Fix Generation (phases/01-test-fix-gen.md)
├─ Sub-phase 1.4: Generate Test Tasks (spawn_agent) → IMPL-*.json, IMPL_PLAN.md, TODO_LIST.md ├─ Sub-phase 1.4: Generate Test Tasks (spawn_agent) → IMPL-*.json, IMPL_PLAN.md, TODO_LIST.md
└─ Sub-phase 1.5: Phase 1 Summary └─ Sub-phase 1.5: Phase 1 Summary
⛔ MANDATORY CONFIRMATION GATE
│ Present plan summary → request_user_input → User approves/cancels
│ NEVER auto-proceed to Phase 2
Phase 2: Test-Cycle Execution (phases/02-test-cycle-execute.md) Phase 2: Test-Cycle Execution (phases/02-test-cycle-execute.md)
├─ Discovery: Load session, tasks, iteration state ├─ Discovery: Load session, tasks, iteration state
├─ Main Loop (for each task): ├─ Main Loop (for each task):
@@ -215,12 +219,12 @@ Phase 2: Test-Cycle Execution (phases/02-test-cycle-execute.md)
1. **Start Immediately**: First action is progress tracking initialization 1. **Start Immediately**: First action is progress tracking initialization
2. **No Preliminary Analysis**: Do not read files before Phase 1 2. **No Preliminary Analysis**: Do not read files before Phase 1
3. **Parse Every Output**: Extract data from each phase for the next 3. **Parse Every Output**: Extract data from each phase/sub-phase for the next
4. **Auto-Continue**: After each phase finishes, automatically execute next pending phase 4. **Within-Phase Auto-Continue**: Sub-phases within a phase run automatically; Phase 2 iterations run automatically once started
5. **Phase Loading**: Read phase doc on-demand (`phases/01-*.md`, `phases/02-*.md`) 5. **Phase Loading**: Read phase doc on-demand (`phases/01-*.md`, `phases/02-*.md`)
6. **Task Attachment Model**: Sub-tasks ATTACH → execute → COLLAPSE 6. **Task Attachment Model**: Sub-tasks ATTACH → execute → COLLAPSE
7. **CRITICAL: DO NOT STOP**: Continuous pipeline until Phase 2 completion 7. **MANDATORY CONFIRMATION GATE**: After Phase 1 completes, you MUST stop and present the generated plan to the user. Wait for explicit user approval via request_user_input before starting Phase 2. NEVER auto-proceed from Phase 1 to Phase 2
8. **Phase Transition**: After Phase 1 summary, immediately begin Phase 2 8. **Phase 2 Continuous**: Once user approves, Phase 2 runs continuously until pass rate >= 95% or max iterations reached
9. **Explicit Lifecycle**: Always close_agent after wait completes to free resources 9. **Explicit Lifecycle**: Always close_agent after wait completes to free resources
## Phase Execution ## Phase Execution
@@ -234,7 +238,7 @@ Phase 2: Test-Cycle Execution (phases/02-test-cycle-execute.md)
2. Gather Test Context (spawn_agent → wait → close_agent) → `contextPath` 2. Gather Test Context (spawn_agent → wait → close_agent) → `contextPath`
3. Test Generation Analysis (spawn_agent → wait → close_agent) → `TEST_ANALYSIS_RESULTS.md` 3. Test Generation Analysis (spawn_agent → wait → close_agent) → `TEST_ANALYSIS_RESULTS.md`
4. Generate Test Tasks (spawn_agent → wait → close_agent) → `IMPL-001.json`, `IMPL-001.3.json`, `IMPL-001.5.json`, `IMPL-002.json`, `IMPL_PLAN.md`, `TODO_LIST.md` 4. Generate Test Tasks (spawn_agent → wait → close_agent) → `IMPL-001.json`, `IMPL-001.3.json`, `IMPL-001.5.json`, `IMPL-002.json`, `IMPL_PLAN.md`, `TODO_LIST.md`
5. Phase 1 Summary (internal - transitions to Phase 2) 5. Phase 1 Summary **⛔ MANDATORY: Present plan and wait for user confirmation before Phase 2**
**Agents Used** (via spawn_agent): **Agents Used** (via spawn_agent):
- `test-context-search-agent` (~/.codex/agents/test-context-search-agent.md) - Context gathering (Session Mode) - `test-context-search-agent` (~/.codex/agents/test-context-search-agent.md) - Context gathering (Session Mode)
@@ -357,6 +361,12 @@ try {
- Execute 5 sub-phases with spawn_agent → wait → close_agent lifecycle - Execute 5 sub-phases with spawn_agent → wait → close_agent lifecycle
- Verify all Phase 1 outputs (4+ task JSONs, IMPL_PLAN.md, TODO_LIST.md) - Verify all Phase 1 outputs (4+ task JSONs, IMPL_PLAN.md, TODO_LIST.md)
- **Ensure all agents are closed** after each sub-phase completes - **Ensure all agents are closed** after each sub-phase completes
- **⛔ MANDATORY: Present plan summary and request_user_input for confirmation**
- Show: session ID, task count, test layers, quality gates
- Options: "Proceed to Execution" / "Review Plan" / "Cancel"
- If "Cancel" → return, do NOT start Phase 2
- If "Review Plan" → display IMPL_PLAN.md, then return
- Only proceed to Phase 2 if user selects "Proceed to Execution"
**Phase 2 (Execution)**: **Phase 2 (Execution)**:
- Read `phases/02-test-cycle-execute.md` for detailed execution logic - Read `phases/02-test-cycle-execute.md` for detailed execution logic

View File

@@ -87,6 +87,19 @@ npm install -g claude-code-workflow
ccw install -m Global ccw install -m Global
``` ```
### Codex Configuration (Required for `.codex/skills/`)
If you use **Codex CLI** with the `.codex/skills/` workflow skills, add these required features to your `~/.codex/config.toml`:
```toml
[features]
default_mode_request_user_input = true # Enable request_user_input tool for interactive confirmations
multi_agent = true # Enable multi-agent coordination (spawn_agent, wait, etc.)
enable_fanout = true # Enable spawn_agents_on_csv for parallel wave execution
```
> These features are required for workflow skills to function properly. Without them, interactive confirmation gates (`request_user_input`), subagent orchestration, and CSV-driven parallel execution will not work.
### Workflow Skills vs Commands ### Workflow Skills vs Commands
CCW uses two types of invocations: CCW uses two types of invocations:

View File

@@ -87,6 +87,19 @@ npm install -g claude-code-workflow
ccw install -m Global ccw install -m Global
``` ```
### Codex 配置(`.codex/skills/` 所需)
如果你使用 **Codex CLI** 配合 `.codex/skills/` 工作流技能,需要在 `~/.codex/config.toml` 中添加以下必要配置:
```toml
[features]
default_mode_request_user_input = true # 启用 request_user_input 工具,用于交互式确认
multi_agent = true # 启用多智能体协调spawn_agent、wait 等)
enable_fanout = true # 启用 spawn_agents_on_csv 并行波次执行
```
> 这些功能是工作流技能正常运行的必要条件。缺少它们,交互式确认门控(`request_user_input`)、子智能体编排和 CSV 驱动的并行执行将无法工作。
### 工作流 Skill 与命令 ### 工作流 Skill 与命令
CCW 使用两种调用方式: CCW 使用两种调用方式:

View File

@@ -496,6 +496,19 @@ export async function installCommand(options: InstallOptions): Promise<void> {
borderColor: 'green' borderColor: 'green'
}); });
// Show Codex config.toml reminder when .codex skills are installed
if (availableDirs.includes('.codex')) {
console.log('');
console.log(chalk.yellow.bold('⚠ Codex CLI Configuration Required'));
console.log(chalk.gray(' To use .codex/skills/ workflow skills, add the following to your'));
console.log(chalk.gray(` ${chalk.cyan('~/.codex/config.toml')}:`));
console.log('');
console.log(chalk.gray(' [features]'));
console.log(chalk.gray(' default_mode_request_user_input = true'));
console.log(chalk.gray(' multi_agent = true'));
console.log(chalk.gray(' enable_fanout = true'));
}
// Install Git Bash fix on Windows // Install Git Bash fix on Windows
if (platform() === 'win32' && !options.force) { if (platform() === 'win32' && !options.force) {
console.log(''); console.log('');