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) {
// 1. Focus areas (multi-select)
// Generate directions dynamically from detected dimensions (see Dimension-Direction Mapping)
const focusAreas = AskUserQuestion({
const focusAreas = request_user_input({
questions: [{
header: "聚焦领域",
id: "focus",
question: "Select analysis focus areas:",
header: "Focus",
multiSelect: true,
options: generateFocusOptions(dimensions) // Dynamic based on dimensions
}]
})
// 2. Analysis perspectives (multi-select, max 4)
const perspectives = AskUserQuestion({
const perspectives = request_user_input({
questions: [{
header: "分析视角",
id: "perspectives",
question: "Select analysis perspectives (single = focused, multi = broader coverage):",
header: "Perspectives",
multiSelect: true,
options: [
{ label: "Technical", description: "Implementation patterns, code structure, technical feasibility" },
{ label: "Architectural", description: "System design, scalability, component interactions" },
{ label: "Security", description: "Vulnerabilities, authentication, access control" },
{ label: "Performance", description: "Bottlenecks, optimization, resource utilization" }
{ label: "Security", description: "Vulnerabilities, authentication, access control" }
]
}]
})
@@ -507,16 +506,14 @@ if (round >= 2) {
// Show key points, discussion points, open questions
if (!autoYes) {
const feedback = AskUserQuestion({
const feedback = request_user_input({
questions: [{
header: "分析方向",
id: "direction",
question: `Analysis round ${round}: Feedback on current findings?`,
header: "Direction",
multiSelect: false,
options: [
{ label: "Deepen", description: "Analysis direction is correct, investigate deeper" },
{ label: "Agree & Suggest", description: "Agree with direction, but have specific next step in mind" },
{ label: "Deepen(Recommended)", description: "Analysis direction is correct, investigate deeper" },
{ 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" }
]
}]
@@ -540,7 +537,7 @@ if (!autoYes) {
// "analyze under extreme load scenarios",
// "review from security audit perspective",
// "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
// Merge new findings into explorations.json
// Record: Which assumptions were confirmed, specific angles for deeper exploration
@@ -549,12 +546,15 @@ if (!autoYes) {
**Agree & Suggest** — user provides specific next step:
```javascript
// Ask user for their specific direction (free text input)
const userSuggestion = AskUserQuestion({
const userSuggestion = request_user_input({
questions: [{
header: "你的方向",
id: "your_direction",
question: "请描述您希望下一步深入的方向:",
header: "Your Direction",
multiSelect: false,
options: [/* user will select "Other" to type free text */]
options: [
{ label: "Code Details", description: "Deeper into implementation specifics" },
{ label: "Architecture", description: "Broader structural analysis" }
]
}]
})
// Execute user's specific direction via inline search tools
@@ -564,11 +564,11 @@ const userSuggestion = AskUserQuestion({
**Adjust Direction** — new focus area:
```javascript
// Ask user for adjusted focus
const adjustedFocus = AskUserQuestion({
const adjustedFocus = request_user_input({
questions: [{
header: "新焦点",
id: "new_focus",
question: "What should the new analysis focus be?",
header: "New Focus",
multiSelect: false,
options: [
{ label: "Code Details", description: "Deeper into implementation specifics" },
{ label: "Architecture", description: "Broader structural analysis" },
@@ -586,7 +586,7 @@ const adjustedFocus = AskUserQuestion({
**Specific Questions** — answer directly:
```javascript
// Capture user questions via AskUserQuestion (text input)
// Capture user questions via request_user_input
// Answer each question based on codebase search and analysis
// Provide evidence and file references
// 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)
// 2. Gather user review
const review = AskUserQuestion({
const review = request_user_input({
questions: [{
header: `建议#${index + 1}`,
id: `rec_${index + 1}`,
question: `Recommendation #${index + 1}: "${rec.action}" (${rec.priority} priority, ${rec.steps.length} steps). Your decision:`,
header: `Rec #${index + 1}`,
multiSelect: false,
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: "Reject", description: "Remove this recommendation" },
{ label: "Accept All Remaining", description: "Skip review for remaining recommendations" }
{ label: "Reject", description: "Remove this recommendation" }
]
}]
})
@@ -837,11 +836,11 @@ function assessComplexity(recs) {
```javascript
if (!autoYes) {
const options = buildOptionsForComplexity(complexity)
AskUserQuestion({
request_user_input({
questions: [{
header: "下一步",
id: "next_step",
question: `Analysis complete (${recs.length} recommendations, complexity: ${complexity}). Next step:`,
header: "Next Step",
multiSelect: false,
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.
**Available Options**:
**Available Options** (this skill is brainstorming-only — NEVER auto-launch other skills):
| Option | Purpose | Action |
|--------|---------|--------|
| **创建实施计划** | Plan implementation of top idea | Launch `workflow-lite-plan` |
| **创建Issue** | Track top ideas for later | Launch `issue:new` with ideas |
| **深入分析** | Analyze top idea in detail | Launch `workflow:analyze-with-file` |
| **显示后续命令** | Show available next-step commands | Display command list for user to manually run |
| **导出分享** | Generate shareable report | Create formatted report document |
| **完成** | 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**:
- `synthesis.json` created with complete synthesis
- `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.
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]"
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
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
@@ -228,11 +228,10 @@ const topic = isRole
```javascript
if (executionMode === null) {
const modeAnswer = AskUserQuestion({
const modeAnswer = request_user_input({
questions: [{
question: "Choose brainstorming mode:",
header: "Mode",
multiSelect: false,
options: [
{ label: "Auto Mode (Recommended)", description: "Full pipeline: framework → parallel roles → synthesis" },
{ 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}`))
}
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: "Approve brainstorm framework?",
header: "Validate",
multiSelect: false,
options: [
{ label: "Approve", description: "Proceed with role analysis" },
{ 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 === "Modify Roles") {
// Allow user to adjust via AskUserQuestion
const roleAnswer = AskUserQuestion({
// Allow user to adjust via request_user_input
const roleAnswer = request_user_input({
questions: [{
question: "Select roles for analysis:",
header: "Roles",
multiSelect: true,
options: VALID_ROLES.map(r => ({
label: r,
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')}
### Next Steps
Brainstorming complete. To continue, run one of:
- /workflow-plan --session ${sessionId} → Generate implementation plan
- Review: ${sessionFolder}/.brainstorming/feature-specs/
`)

View File

@@ -44,7 +44,7 @@ Phase 2: Drift Discovery (Subagent)
Phase 3: Confirmation
├─ Validate manifest schema
├─ 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
Phase 4: Execution
@@ -252,10 +252,12 @@ Manifest: ${sessionFolder}/cleanup-manifest.json
}
// User confirmation
const selection = ASK_USER([
const selection = request_user_input({
questions: [
{
id: "categories", type: "multi-select",
prompt: "Which categories to clean?",
header: "清理类别",
id: "categories",
question: "Which categories to clean?",
options: [
{ label: "Sessions", description: `${manifest.summary.by_category.stale_sessions} stale sessions` },
{ label: "Documents", description: `${manifest.summary.by_category.drifted_documents} drifted docs` },
@@ -263,15 +265,17 @@ const selection = ASK_USER([
]
},
{
id: "risk", type: "select",
prompt: "Risk level?",
header: "风险级别",
id: "risk",
question: "Risk level?",
options: [
{ label: "Low only", description: "Safest (Recommended)" },
{ label: "Low only(Recommended)", description: "Safest — only clearly stale items" },
{ label: "Low + Medium", description: "Includes likely unused" },
{ label: "All", description: "Aggressive" }
]
}
]) // BLOCKS (wait for user response)
]
}) // BLOCKS (wait for user response)
```
---
@@ -279,21 +283,24 @@ const selection = ASK_USER([
### Phase 4: Execution
```javascript
const selectedCategory = selection.answers.categories.answers[0]
const selectedRisk = selection.answers.risk.answers[0]
const riskFilter = {
'Low only': ['low'],
'Low only(Recommended)': ['low'],
'Low + Medium': ['low', 'medium'],
'All': ['low', 'medium', 'high']
}[selection.risk]
}[selectedRisk]
// Collect items to clean
const items = []
if (selection.categories.includes('Sessions')) {
if (selectedCategory === 'Sessions') {
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)))
}
if (selection.categories.includes('Dead Code')) {
if (selectedCategory === 'Dead Code') {
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)
2. **Extract task keywords** — Identify key terms and concepts from the task description
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
6. **Assess complexity** — Evaluate overall task complexity (Low/Medium/High)
@@ -283,14 +283,14 @@ Display identified sub-domains and confirm before starting.
```javascript
if (!autoMode) {
AskUserQuestion({
request_user_input({
questions: [{
header: "确认规划",
id: "confirm",
question: `已识别 ${subDomains.length} 个子领域:\n${subDomains.map((s, i) =>
`${i+1}. ${s.focus_area}: ${s.description}`).join('\n')}\n\n确认开始规划?`,
header: "Confirm",
multiSelect: false,
options: [
{ label: "开始规划", description: "逐域进行规划" },
{ label: "开始规划(Recommended)", description: "逐域进行规划" },
{ label: "调整拆分", description: "修改子领域划分" },
{ label: "取消", description: "退出规划" }
]
@@ -683,15 +683,14 @@ Present session statistics and next steps.
// - Execution command for next step
if (!autoMode) {
AskUserQuestion({
request_user_input({
questions: [{
header: "下一步",
id: "next_step",
question: `规划完成:\n- ${subDomains.length} 个子领域\n- ${allTasks.length} 个任务\n- ${allConflicts.length} 个冲突\n\n下一步:`,
header: "Next Step",
multiSelect: false,
options: [
{ label: "Execute Plan", description: "使用 unified-execute 执行计划" },
{ label: "Execute Plan(Recommended)", description: "使用 unified-execute 执行计划" },
{ label: "Review Conflicts", description: "查看并解决冲突" },
{ label: "Export", description: "导出 plan.md" },
{ label: "Done", description: "保存产物,稍后执行" }
]
}]

View File

@@ -2,7 +2,7 @@
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.
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
@@ -322,23 +322,23 @@ REQUIREMENT: ${requirement}" --tool gemini --mode analysis --rule planning-break
waveTasks.forEach(t => console.log(` - [${t.id}] ${t.title}`))
}
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
header: "验证",
id: "validation",
question: "Approve task breakdown?",
header: "Validation",
multiSelect: false,
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: "Cancel", description: "Abort" }
]
}]
}) // BLOCKS
if (answer.Validation === "Modify") {
if (answer.answers.validation.answers[0] === "Modify") {
console.log(`Edit: ${sessionFolder}/tasks.csv\nResume: $csv-wave-pipeline --continue`)
return
} else if (answer.Validation === "Cancel") {
} else if (answer.answers.validation.answers[0] === "Cancel") {
return
}
}
@@ -711,20 +711,20 @@ ${[...new Set(tasks.flatMap(t => (t.files_modified || '').split(';')).filter(Boo
```javascript
if (!AUTO_YES && failed.length > 0) {
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
header: "下一步",
id: "next_step",
question: `${failed.length} tasks failed. Next action?`,
header: "Next Step",
multiSelect: false,
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: "Done", description: "Complete session" }
]
}]
}) // 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
for (const task of failed) {
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)
// → 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`))
}
}

View File

@@ -1,7 +1,7 @@
---
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".
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
@@ -16,7 +16,7 @@ Unified issue discovery and creation skill covering three entry points: manual i
│ → 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
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
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
@@ -101,7 +101,7 @@ Action Selection:
│ ├─ Path pattern (src/**, *.ts) → Discover (Phase 2)
│ ├─ Short text (< 80 chars) → Create New (Phase 1)
│ └─ 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 1: Create New → phases/01-issue-new.md
@@ -168,14 +168,15 @@ function detectAction(input, flags) {
}
```
### Action Selection (ASK_USER)
### Action Selection (request_user_input)
```javascript
// When action cannot be auto-detected
const answer = ASK_USER([{
const answer = request_user_input({
questions: [{
header: "Action",
id: "action",
type: "select",
prompt: "What would you like to do?",
question: "What would you like to do?",
options: [
{
label: "Create New Issue (Recommended)",
@@ -190,11 +191,13 @@ const answer = ASK_USER([{
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
// answer.answers.action.answers[0] → selected label
const actionMap = {
"Create New Issue": "new",
"Create New Issue (Recommended)": "new",
"Discover Issues": "discover",
"Discover by Prompt": "discover-by-prompt"
};
@@ -207,7 +210,7 @@ User Input (URL / text / path pattern / descriptive prompt)
[Parse Flags + Auto-Detect Action]
[Action Selection] ← ASK_USER (if needed)
[Action Selection] ← request_user_input (if needed)
[Read Selected Phase Document]
@@ -305,7 +308,7 @@ close_agent({ id: agentId })
| 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 |
| Phase execution fails | Report error, suggest manual intervention |
| No files matched (discover) | Check target pattern, verify path exists |
@@ -318,31 +321,35 @@ After successful phase execution, recommend next action:
```javascript
// After Create New (issue created)
ASK_USER([{
request_user_input({
questions: [{
header: "Next Step",
id: "next_after_create",
type: "select",
prompt: "Issue created. What next?",
question: "Issue created. What next?",
options: [
{ label: "Plan Solution", description: "Generate solution via issue-resolve" },
{ label: "Plan Solution (Recommended)", description: "Generate solution via issue-resolve" },
{ label: "Create Another", description: "Create more issues" },
{ label: "View Issues", description: "Review all issues" },
{ 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)
ASK_USER([{
request_user_input({
questions: [{
header: "Next Step",
id: "next_after_discover",
type: "select",
prompt: `Discovery complete: ${findings.length} findings, ${executableFindings.length} executable. What next?`,
question: `Discovery complete: ${findings.length} findings, ${executableFindings.length} executable. What next?`,
options: [
{ label: "Quick Plan & Execute (Recommended)", description: `Fix ${executableFindings.length} high-confidence findings directly` },
{ label: "Export to Issues", description: "Convert discoveries to issues" },
{ label: "Plan Solutions", description: "Plan solutions for exported issues via issue-resolve" },
{ 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

View File

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

View File

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

View File

@@ -389,17 +389,19 @@ await updateDiscoveryState(outputDir, {
});
// Prompt user for next action
await ASK_USER([{
await request_user_input({
questions: [{
header: "Next Step",
id: "next_step",
type: "select",
prompt: `Discovery complete: ${issues.length} issues from ${cumulativeFindings.length} findings across ${iteration} iterations. What next?`,
question: `Discovery complete: ${issues.length} issues from ${cumulativeFindings.length} findings across ${iteration} iterations. What next?`,
options: [
{ label: "Export to Issues (Recommended)", description: `Export ${issues.length} issues for planning` },
{ label: "Review Details", description: "View comparison analysis and iteration details" },
{ label: "Run Deeper", description: "Continue with more iterations" },
{ 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

View File

@@ -44,7 +44,7 @@ executableFindings = allFindings.filter(f =>
```
- 如果 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}
```
ASK_USER:
request_user_input:
```javascript
ASK_USER([{
request_user_input({
questions: [{
header: "Confirm",
id: "confirm_execute",
type: "select",
prompt: `${tasks.length} tasks ready. Start execution?`,
question: `${tasks.length} tasks ready. Start execution?`,
options: [
{ label: "Start Execution", description: "Execute all tasks" },
{ label: "Start Execution (Recommended)", description: "Execute all tasks" },
{ 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
```
- "Adjust Filter" → 重新 ASK_USER 输入 confidence 和 priority 阈值,返回 Step 4.1
- "Adjust Filter" → 重新 request_user_input 输入 confidence 和 priority 阈值,返回 Step 4.1
- "Cancel" → 退出 Phase 4
### Step 4.5: Direct Inline Execution
@@ -192,7 +195,7 @@ for each task in sortedTasks:
6. Update .task/TASK-{id}.json _execution status
7. If failed:
- 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}"`
@@ -209,17 +212,19 @@ for each task in sortedTasks:
// 计算未执行 findings
const remainingFindings = allFindings.filter(f => !executedFindingIds.has(f.id))
ASK_USER([{
request_user_input({
questions: [{
header: "Post Execute",
id: "post_quick_execute",
type: "select",
prompt: `Quick Execute: ${completedCount}/${tasks.length} succeeded. ${remainingFindings.length} findings not executed.`,
question: `Quick Execute: ${completedCount}/${tasks.length} succeeded. ${remainingFindings.length} findings not executed.`,
options: [
{ label: "Done (Recommended)", description: "End workflow" },
{ label: "Retry Failed", description: `Re-execute ${failedCount} failed tasks` },
{ label: "Export Remaining", description: `Export ${remainingFindings.length} remaining findings to issues` },
{ label: "View Events", description: "Display execution-events.md" },
{ 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
```
@@ -231,11 +236,11 @@ ASK_USER([{
|---------|---------|
| 0 个可执行 findings | 提示 "No executable findings",建议 Export to Issues |
| 只有 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 缺少 confidence | 默认 confidence=0.5,不满足过滤阈值 → 排除 |
| discovery 输出不存在 | 报错 "No discoveries found. Run discover first." |
| .task/ 目录已存在 | ASK_USER 追加 (TASK-{max+1}) 或覆盖 |
| .task/ 目录已存在 | request_user_input 追加 (TASK-{max+1}) 或覆盖 |
| 执行中文件被外部修改 | convergence verification 检测到差异,标记为 FAIL |
| 所有 tasks 执行失败 | 建议 "Export to Issues → issue-resolve" 完整路径 |
| finding 来自不同 perspective 但同文件 | 仍合并为一个 taskconvergence.criteria 保留各自标准 |

View File

@@ -1,7 +1,7 @@
---
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".
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

View File

@@ -2,7 +2,7 @@
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.
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
@@ -295,8 +295,18 @@ ${waveDistribution.map(w => `║ Wave ${w.wave}: ${w.tasks} tasks${' '.repeat(
}
}
const confirm = AskUserQuestion("Proceed with this task breakdown?")
if (!confirm) {
const answer = request_user_input({
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.")
return
}

View File

@@ -6,7 +6,7 @@ argument-hint: "[-y|--yes] [-c|--continue] [-m progressive|direct|auto] \"requir
## 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
@@ -143,9 +143,9 @@ Strategic requirement roadmap with **iterative decomposition**. Creates a single
│ ├─ Update roadmap.md with each round │
│ └─ Repeat until approved (max 5 rounds) │
│ │
│ Phase 4: Handoff
│ Phase 4: Handoff (PLANNING ENDS HERE)
│ ├─ 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 │
│ │
└─────────────────────────────────────────────────────────────────────────┘
@@ -403,20 +403,19 @@ Bash(`mkdir -p ${sessionFolder}`)
} else if (AUTO_YES) {
selectedMode = recommendedMode
} else {
const answer = ASK_USER([
{
const answer = request_user_input({
questions: [{
header: "Strategy",
id: "strategy",
type: "choice",
prompt: `Decomposition strategy:\nUncertainty: ${uncertaintyLevel}\nRecommended: ${recommendedMode}`,
question: `Decomposition strategy:\nUncertainty: ${uncertaintyLevel}\nRecommended: ${recommendedMode}`,
options: [
{ value: "progressive", label: recommendedMode === 'progressive' ? "Progressive (Recommended)" : "Progressive" },
{ value: "direct", label: recommendedMode === 'direct' ? "Direct (Recommended)" : "Direct" }
],
default: recommendedMode
}
]) // BLOCKS (wait for user response)
{ label: recommendedMode === 'progressive' ? "Progressive (Recommended)" : "Progressive" },
{ label: recommendedMode === 'direct' ? "Direct (Recommended)" : "Direct" }
]
}]
}) // 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) {
round++
const feedback = ASK_USER([
{
const feedback = request_user_input({
questions: [{
header: "Validate",
id: "feedback",
type: "choice",
prompt: `Roadmap validation (round ${round}):\n${issueIds.length} issues across ${waveCount} waves. Feedback?`,
question: `Roadmap validation (round ${round}):\n${issueIds.length} issues across ${waveCount} waves. Feedback?`,
options: [
{ value: "approve", label: "Approve", description: "Proceed to handoff" },
{ value: "scope", label: "Adjust Scope", description: "Modify issue scopes" },
{ value: "convergence", label: "Modify Convergence", description: "Refine criteria/verification" },
{ value: "replan", label: "Re-decompose", description: "Change strategy/layering" }
{ label: "Approve", description: "Proceed to handoff" },
{ label: "Adjust Scope", description: "Modify issue scopes" },
{ label: "Modify Convergence", description: "Refine criteria/verification" },
{ 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
} else {
// CONSTRAINT: All modifications below ONLY touch roadmap.md and issues.jsonl
// NEVER modify source code or project files during interactive rounds
switch (feedback.feedback) {
case 'scope':
switch (feedbackChoice) {
case 'Adjust Scope':
// Collect scope adjustments
const scopeAdjustments = ASK_USER([
{ id: "adjustments", type: "text", prompt: "Describe scope adjustments needed:" }
]) // BLOCKS
const scopeAdjustments = request_user_input({
questions: [{
header: "Scope",
id: "adjustments",
question: "Describe scope adjustments needed:"
}]
}) // BLOCKS
// Update ONLY roadmap.md Roadmap table + Convergence sections
Edit({ path: `${sessionFolder}/roadmap.md`, /* scope changes */ })
@@ -702,32 +706,36 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
break
case 'convergence':
case 'Modify Convergence':
// Collect convergence refinements
const convergenceRefinements = ASK_USER([
{ id: "refinements", type: "text", prompt: "Describe convergence refinements needed:" }
]) // BLOCKS
const convergenceRefinements = request_user_input({
questions: [{
header: "Convergence",
id: "refinements",
question: "Describe convergence refinements needed:"
}]
}) // BLOCKS
// Update ONLY roadmap.md Convergence Criteria section
Edit({ path: `${sessionFolder}/roadmap.md`, /* convergence changes */ })
break
case 'replan':
case 'Re-decompose':
// Return to Phase 2 with new strategy
const newStrategy = ASK_USER([
{
const newStrategy = request_user_input({
questions: [{
header: "Strategy",
id: "strategy",
type: "choice",
prompt: "Select new decomposition strategy:",
question: "Select new decomposition strategy:",
options: [
{ value: "progressive", label: "Progressive" },
{ value: "direct", label: "Direct" }
{ label: "Progressive" },
{ label: "Direct" }
]
}
]) // BLOCKS
}]
}) // BLOCKS
selectedMode = newStrategy.strategy
selectedMode = newStrategy.answers.strategy.answers[0]
// Re-execute Phase 2 (updates roadmap.md + issues.jsonl only)
break
}
@@ -793,47 +801,42 @@ ${selectedMode === 'progressive' ? `**Progressive Mode**:
if (AUTO_YES) {
nextStep = "done" // Default to done in auto mode
} else {
const answer = ASK_USER([
{
id: "next",
type: "choice",
prompt: `${issueIds.length} issues ready. Next step:`,
const answer = request_user_input({
questions: [{
header: "Next Step",
id: "next_step",
question: `${issueIds.length} issues ready. Next step:`,
options: [
{ value: "csv-wave", label: "Execute with csv-wave-pipeline (Recommended)", description: `Run all ${issueIds.length} issues via wave-based batch execution` },
{ value: "view", label: "View issues", description: "Display issue details" },
{ value: "done", label: "Done", description: "Save and exit" }
{ label: "View issues", description: "Display issue details" },
{ label: "Done", description: "Planning complete — show next-step commands" }
]
}
]) // BLOCKS (wait for user response)
}]
}) // BLOCKS (wait for user response)
nextStep = answer.next
nextStep = answer.answers.next_step.answers[0]
}
```
3. **Execute Selection**
```javascript
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':
// Display issues from issues.jsonl
Bash(`ccw issue list --session ${sessionId}`)
break
// Fall through to show next-step commands
// STOP — do not execute anything
case 'done':
// Output paths and end
// Output paths and end — this skill is planning-only
console.log([
`Roadmap saved: ${sessionFolder}/roadmap.md`,
`Issues created: ${issueIds.length}`,
'',
'To execute later:',
'Planning complete. To execute, run:',
` $csv-wave-pipeline "${requirement}"`,
` ccw issue list --session ${sessionId}`
].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
4. **Testable Convergence**: criteria = assertions, DoD = business language
5. **Explicit Lifecycle**: Always close_agent after wait completes to free resources
6. **DO NOT STOP**: Continuous workflow until handoff complete
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
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 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
description: Quick-sync session work to specs/*.md and project-tech.json
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
@@ -136,8 +136,18 @@ Target files:
`)
if (!AUTO_YES) {
const approved = CONFIRM("Apply these updates? (modify/skip items if needed)") // BLOCKS (wait for user response)
if (!approved) {
const answer = request_user_input({
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.')
return
}

View File

@@ -2,7 +2,7 @@
name: spec-add
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\""
allowed-tools: AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep
allowed-tools: request_user_input, Read, Write, Edit, Bash, Glob, Grep
---
# Spec Add Command
@@ -196,17 +196,18 @@ if (useInteractiveWizard) {
if (AUTO_YES) {
dimension = 'specs' // Default to project specs in auto mode
} else {
const dimensionAnswer = ASK_USER([
{
id: "dimension", type: "select",
prompt: "What type of spec do you want to create?",
const dimensionAnswer = request_user_input({
questions: [{
header: "Dimension",
id: "dimension",
question: "What type of spec do you want to create?",
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/)" }
]
}
]) // BLOCKS (wait for user response)
dimension = dimensionAnswer.dimension === "Project Spec" ? "specs" : "personal"
}]
}) // BLOCKS (wait for user response)
dimension = dimensionAnswer.answers.dimension.answers[0] === "Project Spec(Recommended)" ? "specs" : "personal"
}
}
@@ -215,17 +216,18 @@ if (useInteractiveWizard) {
if (AUTO_YES) {
scope = 'project' // Default to project scope in auto mode
} else {
const scopeAnswer = ASK_USER([
{
id: "scope", type: "select",
prompt: "Where should this personal spec be stored?",
const scopeAnswer = request_user_input({
questions: [{
header: "Scope",
id: "scope",
question: "Where should this personal spec be stored?",
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/)" }
]
}
]) // BLOCKS (wait for user response)
scope = scopeAnswer.scope.includes("Global") ? "global" : "project"
}]
}) // BLOCKS (wait for user response)
scope = scopeAnswer.answers.scope.answers[0] === "Global(Recommended)" ? "global" : "project"
}
}
@@ -234,19 +236,19 @@ if (useInteractiveWizard) {
if (AUTO_YES) {
category = 'general' // Default to general in auto mode
} else {
const categoryAnswer = ASK_USER([
{
id: "category", type: "select",
prompt: "Which workflow stage does this spec apply to?",
const categoryAnswer = request_user_input({
questions: [{
header: "Category",
id: "category",
question: "Which workflow stage does this spec apply to?",
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: "Planning", description: "Task planning, requirements gathering" },
{ label: "Execution", description: "Implementation, testing, deployment" }
{ label: "Planning", description: "Task planning, requirements gathering" }
]
}
]) // BLOCKS (wait for user response)
const categoryLabel = categoryAnswer.category
}]
}) // BLOCKS (wait for user response)
const categoryLabel = categoryAnswer.answers.category.answers[0]
category = categoryLabel.includes("General") ? "general"
: categoryLabel.includes("Exploration") ? "exploration"
: categoryLabel.includes("Planning") ? "planning"
@@ -259,18 +261,19 @@ if (useInteractiveWizard) {
if (AUTO_YES) {
type = 'convention' // Default to convention in auto mode
} else {
const typeAnswer = ASK_USER([
{
id: "type", type: "select",
prompt: "What type of rule is this?",
const typeAnswer = request_user_input({
questions: [{
header: "Rule Type",
id: "rule_type",
question: "What type of rule is this?",
options: [
{ 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: "Learning", description: "Insight or lesson learned (e.g., cache invalidation needs events)" }
]
}
]) // BLOCKS (wait for user response)
const typeLabel = typeAnswer.type
}]
}) // BLOCKS (wait for user response)
const typeLabel = typeAnswer.answers.rule_type.answers[0]
type = typeLabel.includes("Convention") ? "convention"
: typeLabel.includes("Constraint") ? "constraint"
: "learning"
@@ -283,13 +286,17 @@ if (useInteractiveWizard) {
console.log("Error: Rule text is required in auto mode. Provide rule text as argument.")
return
}
const contentAnswer = ASK_USER([
{
id: "content", type: "text",
prompt: "Enter the rule or guideline text:"
}
]) // BLOCKS (wait for user response)
ruleText = contentAnswer.content
const contentAnswer = request_user_input({
questions: [{
header: "Content",
id: "content",
question: "Enter the rule or guideline text:",
options: [
{ 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
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
@@ -260,7 +260,7 @@ Bash(`mkdir -p "${workDir}"`);
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
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
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

View File

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

View File

@@ -159,42 +159,35 @@ Schema:
```javascript
if (!autoMode) {
// Confirm problem statement and select depth
AskUserQuestion({
request_user_input({
questions: [
{
question: `Problem statement: "${seedAnalysis.problem_statement}" - Is this accurate?`,
header: "Problem",
multiSelect: false,
id: "problem",
question: `Problem statement: "${seedAnalysis.problem_statement}" - Is this accurate?`,
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" }
]
},
{
question: "What specification depth do you need?",
header: "Depth",
multiSelect: false,
id: "depth",
question: "What specification depth do you need?",
options: [
{ label: "Standard(Recommended)", description: "Balanced detail for most projects" },
{ 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" }
]
},
{
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",
multiSelect: false,
id: "spec_type",
question: "What type of specification is this?",
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: "Library/SDK", description: "Reusable package with public API surface, examples" },
{ label: "Platform", description: "Multi-component system, uses Service profile" }
{ label: "Library/SDK", description: "Reusable package with public API surface, examples" }
]
}
]

View File

@@ -174,18 +174,18 @@ const synthesis = {
```javascript
if (!autoMode) {
// Present synthesis summary to user
// AskUserQuestion with:
// request_user_input with:
// - Confirm vision statement
// - Resolve any conflicts between perspectives
// - Adjust scope if needed
AskUserQuestion({
request_user_input({
questions: [
{
question: "Review the synthesized product brief. Any adjustments needed?",
header: "Review",
multiSelect: false,
id: "review",
question: "Review the synthesized product brief. Any adjustments needed?",
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: "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) {
// Present requirements grouped by initial priority
// Allow user to adjust MoSCoW labels
AskUserQuestion({
request_user_input({
questions: [
{
question: "Review the Must-Have requirements. Any that should be reprioritized?",
header: "Must-Have",
multiSelect: false,
id: "must_have",
question: "Review the Must-Have requirements. Any that should be reprioritized?",
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: "Missing items", description: "Some Should requirements should be Must" }
]
},
{
question: "What is the target MVP scope?",
header: "MVP Scope",
multiSelect: false,
id: "mvp_scope",
question: "What is the target MVP scope?",
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: "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) {
// Present ADRs with review feedback to user
// For each ADR where review raised concerns:
AskUserQuestion({
request_user_input({
questions: [
{
question: "Architecture review raised concerns. How should we proceed?",
header: "ADR Review",
multiSelect: false,
id: "adr_review",
question: "Architecture review raised concerns. How should we proceed?",
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: "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
if (!autoMode) {
// Present Epic overview table and dependency diagram
AskUserQuestion({
request_user_input({
questions: [
{
question: "Review the Epic breakdown. Any adjustments needed?",
header: "Epics",
multiSelect: false,
id: "epics",
question: "Review the Epic breakdown. Any adjustments needed?",
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: "Split epic", description: "An epic is too large, needs splitting" },
{ label: "Adjust MVP", description: "Change which epics are in MVP" }
{ label: "Split epic", description: "An epic is too large, needs splitting" }
]
}
]

View File

@@ -312,29 +312,21 @@ Write(`${workDir}/spec-config.json`, JSON.stringify(specConfig, null, 2));
### Step 6: Handoff Options
```javascript
AskUserQuestion({
request_user_input({
questions: [
{
question: "Specification package is complete. What would you like to do next?",
header: "Next Step",
multiSelect: false,
id: "next_step",
question: "Specification package is complete. What would you like to do next?",
options: [
{
label: "Export Issues(Recommended)",
description: "Create issues per Epic with spec links and wave assignment (Phase 7)"
},
{
label: "Execute via lite-plan",
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",
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") {
// 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
// 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
```javascript
AskUserQuestion({
const answer = request_user_input({
questions: [
{
question: `${createdIssues.length} issues created from ${epicWaves.length} Epics. What would you like to do next?`,
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: [
{
label: "Execute via team-planex",
label: "Execute via team-planex(Recommended)",
description: `Execute all ${createdIssues.length} issues with coordinated team workflow`
},
{
label: "Wave 1 only",
description: `Execute ${wave1.length} MVP issues first`
},
{
label: "View issues",
description: "Browse created issues before deciding"
},
{
label: "Done",
description: "Export complete, handle manually"
@@ -282,7 +278,8 @@ AskUserQuestion({
});
// 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(',');
Skill({ skill: "team-planex", args: `--issues ${issueIds}` });
}
@@ -292,8 +289,8 @@ if (selection === "Wave 1 only") {
Skill({ skill: "team-planex", args: `--issues ${wave1Ids}` });
}
if (selection === "View issues") {
Bash(`ccw issue list --tag spec:${specConfig.session_id}`);
if (selection === "Done") {
// Export complete, handle manually
}
```

View File

@@ -2,7 +2,7 @@
name: spec-setup
description: Initialize project-level state and configure specs via interactive questionnaire using cli-explore-agent
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
@@ -229,18 +229,18 @@ const specsData = JSON.parse(specsList)
const isPopulated = (specsData.total || 0) > 5 // More than seed docs
if (isPopulated && !reset) {
const mode = ASK_USER([
{
id: "mode", type: "select",
prompt: "Project guidelines already contain entries. How would you like to proceed?",
const mode = request_user_input({
questions: [{
header: "Guidelines",
id: "mode",
question: "Project guidelines already contain entries. How would you like to proceed?",
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: "Cancel", description: "Exit without changes" }
],
default: "Append"
}
]) // BLOCKS (wait for user response)
]
}]
}) // BLOCKS (wait for user response)
// If Cancel -> exit
// 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
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.
@@ -312,23 +312,26 @@ codingStyleOptions.push(
)
// 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?`,
options: codingStyleOptions.slice(0, 4) // Max 4 options
header: "Code Style",
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?`,
header: "Naming",
id: "naming",
question: `What naming conventions does your ${primaryLang} project use?`,
options: [
{ 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)" },
{ label: "Prefix interfaces", description: "Prefix interfaces with 'I' (e.g., IUserService)" }
{ 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.
@@ -339,28 +342,30 @@ const round1 = ASK_USER([
```javascript
// 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",
id: "file_structure",
question: `Your project has a ${archStyle} architecture. What file organization rules apply?`,
options: [
{ label: "Co-located tests", description: "Test files live next to source files (e.g., foo.ts + foo.test.ts)" },
{ 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" },
{ label: "Index barrels", description: "Use index.ts barrel files for clean imports from directories" }
{ 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",
id: "documentation",
question: "What documentation standards does your project follow?",
options: [
{ label: "JSDoc/docstring public APIs", description: "All public functions and classes must have JSDoc/docstrings" },
{ label: "README per module", description: "Each major module/package has its own README" },
{ 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`.
@@ -390,23 +395,26 @@ archOptions.push(
)
// 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?`,
options: archOptions.slice(0, 4)
header: "Architecture",
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?`,
header: "Tech Stack",
id: "tech_stack",
question: `Tech stack: ${frameworks.join(', ')}. What technology constraints apply?`,
options: [
{ 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" },
{ label: "Framework conventions", description: `Follow official ${frameworks[0] || 'framework'} conventions and best practices` }
{ 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`.
@@ -417,28 +425,30 @@ const round3 = ASK_USER([
```javascript
// 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",
id: "performance",
question: "What performance requirements does your project have?",
options: [
{ label: "API response time", description: "API endpoints must respond within 200ms (p95)" },
{ label: "Bundle size limit", description: "Frontend bundle size must stay under 500KB gzipped" },
{ label: "Lazy loading", description: "Large modules/routes must use lazy loading / code splitting" },
{ 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",
id: "security",
question: "What security requirements does your project enforce?",
options: [
{ label: "Input sanitization", description: "All user input must be validated and sanitized before use" },
{ 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" },
{ label: "Parameterized queries", description: "All database queries must use parameterized/prepared statements" }
{ 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`.
@@ -449,18 +459,20 @@ const round4 = ASK_USER([
```javascript
// 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",
id: "quality",
question: `Testing with ${testFrameworks.join(', ') || 'your test framework'}. What quality rules apply?`,
options: [
{ label: "Min test coverage", description: "Minimum 80% code coverage for new code; no merging below threshold" },
{ 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)" },
{ label: "Type check must pass", description: "Full type checking (tsc --noEmit) must pass with zero errors" }
{ 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.

View File

@@ -2,7 +2,7 @@
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.
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
@@ -44,7 +44,7 @@ Orchestrate multi-agent architecture optimization: analyze codebase structure, d
| Phase 0: Pre-Wave Interactive (Requirement Clarification) |
| +- Parse user task description |
| +- Detect scope: targeted module vs full architecture |
| +- Clarify ambiguous requirements (AskUserQuestion) |
| +- Clarify ambiguous requirements (request_user_input) |
| +- Output: refined requirements for decomposition |
| |
| 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):
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Please confirm the architecture optimization scope:",
header: "Architecture Scope",
multiSelect: false,
question: "Please confirm the architecture optimization scope.",
header: "Scope",
id: "arch_scope",
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: "Add constraints", description: "Exclude areas, set priorities" }
]
@@ -522,13 +522,13 @@ Session: ${sessionFolder}
// 3. Completion action
if (!AUTO_YES) {
AskUserQuestion({
request_user_input({
questions: [{
question: "Architecture optimization complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Architecture optimization complete. Choose next action.",
header: "Done",
id: "completion",
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: "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 |
| `Write` | builtin | Write export files |
| `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:
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Architecture optimization complete. What would you like to do?",
header: "Completion",
multiSelect: false,
id: "completion_action",
options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work or inspection" },

View File

@@ -2,7 +2,7 @@
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.
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
@@ -278,16 +278,15 @@ If not AUTO_YES, present user with pipeline mode selection for confirmation:
```javascript
if (!AUTO_YES) {
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: `Topic: "${topic}"\nRecommended pipeline: ${pipeline_mode} (complexity: ${complexity_score})\nAngles: ${angles.join(', ')}\n\nApprove?`,
header: "Pipeline Selection",
multiSelect: false,
question: `Topic: "${topic}"Recommended: ${pipeline_mode}. Approve or override?`,
header: "Pipeline",
id: "pipeline_select",
options: [
{ label: "Approve", description: `Use ${pipeline_mode} pipeline` },
{ label: "Quick", description: "3 tasks: generate challenge synthesize" },
{ label: "Deep", description: "6 tasks: generate → challenge → revise → re-challenge → synthesize → evaluate" },
{ label: "Full", description: "7 tasks: 3x parallel generation → challenge → revise → synthesize → evaluate" }
{ label: "Approve (Recommended)", description: `Use ${pipeline_mode} pipeline (complexity: ${complexity_score})` },
{ label: "Quick", description: "3 tasks: generate -> challenge -> synthesize" },
{ label: "Deep/Full", description: "6-7 tasks: parallel generation, GC loop, evaluation" }
]
}]
})

View File

@@ -2,7 +2,7 @@
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.
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
@@ -43,7 +43,7 @@ Universal team coordination: analyze task -> detect capabilities -> generate dyn
| |
| Phase 0: Pre-Wave Interactive (Requirement Clarification) |
| +- Parse user task description |
| +- Clarify ambiguous requirements (AskUserQuestion) |
| +- Clarify ambiguous requirements (request_user_input) |
| +- Output: refined requirements for decomposition |
| |
| Phase 1: Requirement -> CSV + Classification |
@@ -245,13 +245,13 @@ Write(`${sessionFolder}/wisdom/decisions.md`, '# Decisions\n')
3. **Clarify if ambiguous** (skip if AUTO_YES):
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Please confirm the task scope and deliverables:",
header: "Task Clarification",
multiSelect: false,
question: "Please confirm the task scope and deliverables.",
header: "Scope",
id: "task_scope",
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: "Add constraints", description: "Timeline, tech stack, style" }
]
@@ -482,13 +482,13 @@ Session: ${sessionFolder}
// 2. Completion action
if (!AUTO_YES) {
const choice = AskUserQuestion({
const choice = request_user_input({
questions: [{
question: "Team pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Team pipeline complete. Choose next action.",
header: "Done",
id: "completion",
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: "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 |
| No capabilities detected | Default to single `general` role with TASK prefix |
| 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 |
| 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 |
|------|------|---------|
| `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 |
| `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:
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Team pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
id: "completion_action",
options: [
{ label: "Archive & Clean (Recommended)", description: "Mark session complete, output final summary" },
{ 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 |
|------|------|---------|
| `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 |
### Tool Usage Patterns
@@ -89,13 +89,13 @@ Write("<session>/interactive/<task-id>-result.json", <result>)
2. Present approval choice:
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Review the plan and decide:",
header: "Plan Review",
multiSelect: false,
id: "plan_review",
options: [
{ label: "Approve", description: "Proceed with execution" },
{ label: "Approve (Recommended)", description: "Proceed with execution" },
{ label: "Revise", description: "Request changes to the plan" },
{ label: "Abort", description: "Cancel the pipeline" }
]

View File

@@ -2,7 +2,7 @@
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.
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

View File

@@ -36,7 +36,7 @@ Interactive agent for gathering and refining team skill requirements from user i
| Tool | Type | Purpose |
|------|------|---------|
| `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 |
| `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:
```javascript
AskUserQuestion({
request_user_input({
questions: [
{
question: "Team skill name? (kebab-case, e.g., team-code-review)",
header: "Skill Name",
multiSelect: false,
id: "skill_name",
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" }
]
},
{
question: "Session prefix? (3-4 chars for task IDs, e.g., TCR)",
header: "Prefix",
multiSelect: false,
id: "session_prefix",
options: [
{ label: "<auto-suggested-prefix>", description: "Auto-suggested" },
{ label: "<auto-suggested-prefix> (Recommended)", description: "Auto-suggested" },
{ label: "Custom", description: "Enter custom prefix" }
]
}
@@ -186,16 +186,15 @@ Templates: <list or none>
2. Present confirmation:
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Confirm this team skill configuration?",
header: "Configuration Review",
multiSelect: false,
header: "Config Review",
id: "config_review",
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 Pipelines", description: "Change pipeline structure" },
{ label: "Cancel", description: "Abort skill generation" }
{ label: "Modify Pipelines", description: "Change pipeline structure" }
]
}]
})

View File

@@ -2,7 +2,7 @@
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.
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
@@ -383,13 +383,13 @@ const summary = {
console.log(`Pipeline complete: ${summary.completed}/${summary.total} tasks completed`)
// Completion action
const action = await AskUserQuestion({
const action = request_user_input({
questions: [{
question: "Team pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Team pipeline complete. Choose next action.",
header: "Done",
id: "completion",
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: "Export Results", description: "Export deliverables to target directory, then clean" }
]
@@ -397,7 +397,7 @@ const action = await AskUserQuestion({
})
// Handle completion action
if (action === "Archive & Clean") {
if (action.answers.completion.answers[0] === "Archive (Recommended)") {
// Update session status, cleanup team
} else if (action === "Keep Active") {
// Update session status to paused

View File

@@ -2,7 +2,7 @@
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.
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
@@ -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` |
| bug, error, crash, broken, white screen, not working | `debug-pipeline` |
| 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: bug, error, crash, broken, not working | `debug-pipeline` |
| Ambiguous | AskUserQuestion to clarify |
| Ambiguous | request_user_input to clarify |
4. **Extract parameters by 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)
- Generate structured feature items with id, name, url
**Debug Mode**:
- `bug_description`: Bug description text
- `target_url`: URL in text or AskUserQuestion
- `reproduction_steps`: Steps in text or AskUserQuestion
- `target_url`: URL in text or request_user_input
- `reproduction_steps`: Steps in text or request_user_input
- `evidence_plan`: Detect dimensions from keywords (UI, network, console, performance)
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) {
AskUserQuestion({
request_user_input({
questions: [{
question: "Debug pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Debug pipeline complete. Choose next action.",
header: "Done",
id: "completion",
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: "Export Results", description: "Export debug report and patches" }
]
@@ -732,7 +732,7 @@ After TEST-001 completes, evaluate issues:
| Condition | Action |
|-----------|--------|
| `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 |
---

View File

@@ -34,7 +34,7 @@ Interactive agent for handling pipeline completion action. Presents debug summar
| Tool | Type | Purpose |
|------|------|---------|
| `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 |
| `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:
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Debug pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
id: "completion_action",
options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" },
{ 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 |
|------|------|---------|
| `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 |
---
@@ -81,13 +81,13 @@ Interactive agent for evaluating TEST-001 results and determining whether to ski
2. If only warnings, present choice:
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Testing found only low-severity warnings. How would you like to proceed?",
header: "Test Results",
multiSelect: false,
id: "warning_decision",
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" }
]
}]

View File

@@ -2,7 +2,7 @@
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.
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
@@ -535,13 +535,13 @@ ${deliverables.map(d => ` - ${d.name}: ${d.path}`).join('\n')}
`)
if (!AUTO_YES) {
AskUserQuestion({
request_user_input({
questions: [{
question: "Frontend pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Frontend pipeline complete. Choose next action.",
header: "Done",
id: "completion",
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: "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 |
| QA score < 6 over 2 GC rounds | Escalate to user for manual intervention |
| 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 |
---

View File

@@ -34,7 +34,7 @@ Interactive agent for handling pipeline completion action. Presents deliverables
| Tool | Type | Purpose |
|------|------|---------|
| `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 |
| `Bash` | built-in | Execute archive/export operations |
@@ -74,11 +74,11 @@ Interactive agent for handling pipeline completion action. Presents deliverables
2. Present completion choice:
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Frontend pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
id: "completion_action",
options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" },
{ 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 |
|------|------|---------|
| `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 |
### Tool Usage Patterns
@@ -97,13 +97,13 @@ Write("<session>/interactive/<task-id>-result.json", <result>)
2. If escalation needed, present choice:
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "QA has flagged issues after 2 fix rounds. How would you like to proceed?",
header: "QA Gate",
multiSelect: false,
id: "qa_gate_decision",
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: "Abort pipeline", description: "Stop the pipeline" }
]

View File

@@ -2,7 +2,7 @@
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.
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
@@ -226,8 +226,19 @@ if (requirement.includes('--all-pending')) {
// If no issue IDs, ask user
if (issueIds.length === 0) {
const answer = AskUserQuestion("No issue IDs found. Please provide issue IDs (e.g., ISS-20260308-120000):")
issueIds = answer.match(issueIdPattern) || []
const answer = request_user_input({
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
}

View File

@@ -2,7 +2,7 @@
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.
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
@@ -339,16 +339,15 @@ If not AUTO_YES, present pipeline mode selection for confirmation:
```javascript
if (!AUTO_YES) {
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: `Task: "${requirement}"\nRecommended pipeline: ${pipeline_mode} (complexity: ${complexity_score})\nRoles: ${roles_needed.join(', ')}\n\nApprove?`,
header: "Pipeline Selection",
multiSelect: false,
question: `Task: "${requirement}"Recommended: ${pipeline_mode}. Approve or override?`,
header: "Pipeline",
id: "pipeline_select",
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: "Sprint", description: "Standard: DESIGN -> DEV -> VERIFY + REVIEW (4 tasks)" },
{ label: "Multi-Sprint", description: "Complex: Multiple sprint cycles with incremental delivery" }
{ label: "Sprint/Multi", description: "Standard or complex: DESIGN -> DEV -> VERIFY + REVIEW" }
]
}]
})
@@ -687,13 +686,13 @@ If not AUTO_YES, offer completion actions:
```javascript
if (!AUTO_YES) {
AskUserQuestion({
request_user_input({
questions: [{
question: "IterDev pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "IterDev pipeline complete. Choose next action.",
header: "Done",
id: "completion",
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: "Retry Failed", description: "Re-run failed tasks" }
]

View File

@@ -2,7 +2,7 @@
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.
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
@@ -294,16 +294,15 @@ If not AUTO_YES, confirm pipeline selection:
```javascript
if (!AUTO_YES) {
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: `Requirement: "${requirement}"\nDetected pipeline: ${pipeline_type} (complexity: ${complexity.level})\nRoles: ${capabilities.map(c => c.name).join(', ')}\n\nApprove?`,
header: "Pipeline Selection",
multiSelect: false,
question: `Requirement: "${requirement}"Detected: ${pipeline_type}. Approve or override?`,
header: "Pipeline",
id: "pipeline_select",
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: "Impl Only", description: "Plan -> implement -> test + review" },
{ label: "Full Lifecycle", description: "Spec pipeline + implementation pipeline" }
{ label: "Impl/Full", description: "Implementation pipeline or full lifecycle" }
]
}]
})
@@ -522,10 +521,11 @@ Write report to ${sessionFolder}/artifacts/${task.id}-report.md.
// Handle verdict
if (parsedVerdict === 'block') {
if (!AUTO_YES) {
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: `Checkpoint ${task.id} BLOCKED (score: ${parsedScore}). What to do?`,
header: "Checkpoint Blocked",
question: `Checkpoint ${task.id} BLOCKED (score: ${parsedScore}). Choose action.`,
header: "Blocked",
id: "blocked_action",
options: [
{ label: "Override", description: "Proceed despite block" },
{ label: "Revise upstream", description: "Go back and fix issues" },
@@ -647,13 +647,13 @@ If not AUTO_YES, offer completion action:
```javascript
if (!AUTO_YES) {
AskUserQuestion({
request_user_input({
questions: [{
question: "Pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Pipeline complete. Choose next action.",
header: "Done",
id: "completion",
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: "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 |
| Interactive agent timeout | Urge convergence via send_input, then close if still timed out |
| 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 |
| All agents in wave failed | Log error, offer retry or abort |
| 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 |
| `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
- List of unresolved findings (if any) with severity
- 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 CONDITIONAL: present risks, ask user to decide
- 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 |
| `Grep` | builtin | Search for keywords and patterns in artifacts |
| `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` |
| full-lifecycle keywords OR (impl keywords + no existing specs) | `full-lifecycle` |
| 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:
- Describe detected signals
@@ -155,7 +155,7 @@ Parse user task input, detect pipeline signals, select execution mode, and produ
| 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 |
| Existing artifacts are corrupted or incomplete | Log warning, treat as no-artifacts (full-lifecycle) |
| Workspace not writable | Report error, output JSON to stdout instead |

View File

@@ -2,7 +2,7 @@
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.
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
@@ -44,7 +44,7 @@ Orchestrate multi-agent performance optimization: profile application, identify
| Phase 0: Pre-Wave Interactive (Requirement Clarification) |
| +- Parse user task description |
| +- Detect scope: specific endpoint vs full app profiling |
| +- Clarify ambiguous requirements (AskUserQuestion) |
| +- Clarify ambiguous requirements (request_user_input) |
| +- Output: refined requirements for decomposition |
| |
| 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):
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Please confirm the performance optimization scope:",
header: "Performance Scope",
multiSelect: false,
question: "Please confirm the performance optimization scope.",
header: "Scope",
id: "perf_scope",
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: "Add constraints", description: "Target metrics, acceptable trade-offs" }
]
@@ -521,13 +521,13 @@ Session: ${sessionFolder}
// 3. Completion action
if (!AUTO_YES) {
AskUserQuestion({
request_user_input({
questions: [{
question: "Performance optimization complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Performance optimization complete. Choose next action.",
header: "Done",
id: "completion",
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: "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 |
| `Write` | builtin | Write export files |
| `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:
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Performance optimization complete. What would you like to do?",
header: "Completion",
multiSelect: false,
id: "completion_action",
options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session, output final summary" },
{ label: "Keep Active", description: "Keep session for follow-up work or inspection" },

View File

@@ -2,7 +2,7 @@
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.
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
@@ -215,8 +215,19 @@ if (textMatch) {
// If no input detected, ask user
if (issueIds.length === 0 && inputType === 'issues') {
const answer = AskUserQuestion("No input detected. Provide issue IDs, or use --text 'description' or --plan <path>:")
issueIds = answer.match(issueIdPattern) || []
const answer = request_user_input({
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')) {
inputType = 'text'
rawInput = answer
@@ -225,17 +236,21 @@ if (issueIds.length === 0 && inputType === 'issues') {
// Execution method selection (interactive if no flag)
if (!execMatch && !AUTO_YES) {
const methodChoice = AskUserQuestion({
questions: [{ question: "Select execution method for implementation:",
const methodChoice = request_user_input({
questions: [{
question: "Select execution method for implementation.",
header: "Exec Method",
id: "exec_method",
options: [
{ label: "Gemini", description: "gemini-2.5-pro (recommended for <= 3 tasks)" },
{ label: "Codex", description: "gpt-5.2 (recommended for > 3 tasks)" },
{ label: "Gemini (Recommended)", description: "gemini-2.5-pro (best for <= 3 tasks)" },
{ label: "Codex", description: "gpt-5.2 (best for > 3 tasks)" },
{ label: "Auto", description: "Auto-select based on task count" }
]
}]
})
if (methodChoice === 'Codex') executionMethod = 'codex'
else if (methodChoice === 'Auto') executionMethod = 'auto'
const chosen = methodChoice.answers.exec_method.answers[0]
if (chosen === 'Codex') executionMethod = 'codex'
else if (chosen === 'Auto') executionMethod = 'auto'
}
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 |
| CSV parse error | Validate CSV format before execution, show line number |
| 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 |
| Continue mode: no session found | List available sessions, prompt user to select |

View File

@@ -2,7 +2,7 @@
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.
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
@@ -286,16 +286,15 @@ Write(`${sessionFolder}/gc-state.json`, JSON.stringify({
4. **Clarify if ambiguous** (skip if AUTO_YES):
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Detected QA mode: '" + qaMode + "'. Confirm?",
header: "QA Mode Selection",
multiSelect: false,
question: `Detected QA mode: '${qaMode}'. Approve or override?`,
header: "QA Mode",
id: "qa_mode",
options: [
{ label: "Proceed with " + qaMode, description: "Detected mode is appropriate" },
{ label: "Use discovery", description: "Scout-first: scan for issues, then test" },
{ label: "Use testing", description: "Direct testing pipeline (skip scout)" },
{ label: "Use full", description: "Complete QA closed loop with regression" }
{ label: "Approve (Recommended)", description: `Use ${qaMode} mode as detected` },
{ label: "Discovery", description: "Scout-first: scan for issues, then test" },
{ label: "Testing/Full", description: "Direct testing or complete QA closed loop" }
]
}]
})
@@ -536,13 +535,13 @@ Session: ${sessionFolder}
`)
if (!AUTO_YES) {
AskUserQuestion({
request_user_input({
questions: [{
question: "Quality Assurance pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Quality Assurance pipeline complete. Choose next action.",
header: "Done",
id: "completion",
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: "Export Results", description: "Export deliverables to target directory" }
]

View File

@@ -2,7 +2,7 @@
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.
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
@@ -476,7 +476,7 @@ send_input({
| discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries |
| Lifecycle leak | Cleanup all active agents via registry.json at end |
| 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 |
---

View File

@@ -2,7 +2,7 @@
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.
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
@@ -244,7 +244,7 @@ const discusser = spawn_agent({
**Instructions**:
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
4. Generate roadmap.md with structured phase definitions
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)
if (!autoYes) {
const approval = AskUserQuestion({
const approval = request_user_input({
questions: [{
question: `Generated ${tasksWithWaves.length} tasks across ${phases.length} phases. Proceed?`,
header: "Task Breakdown Validation",
multiSelect: false,
header: "Validate",
id: "task_approval",
options: [
{ label: "Proceed", description: "Start execution" },
{ label: "Proceed (Recommended)", description: "Start execution" },
{ 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")
}
}
@@ -554,20 +554,20 @@ console.log(`\nResults: ${sessionDir}/results.csv`)
console.log(`Report: ${sessionDir}/context.md`)
// Offer next steps
const nextStep = AskUserQuestion({
const nextStep = request_user_input({
questions: [{
question: "Roadmap Dev pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Roadmap Dev pipeline complete. Choose next action.",
header: "Done",
id: "completion",
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: "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}"`)
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
- Produce structured output following template
- Interact with user via AskUserQuestion
- Interact with user via request_user_input
- Generate roadmap.md with phase definitions
- 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 |
|------|------|---------|
| `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 |
| `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)
- Key requirements (REQ-IDs)
- Success criteria (measurable)
4. Present to user via AskUserQuestion:
4. Present to user via request_user_input:
```javascript
AskUserQuestion({
request_user_input({
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?",
header: "Roadmap Discussion",
multiSelect: false,
header: "Roadmap",
id: "roadmap_approval",
options: [
{ label: "Approve", description: "Proceed with this breakdown" },
{ label: "Approve (Recommended)", description: "Proceed with this breakdown" },
{ label: "Modify", description: "Request changes to phases" },
{ 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 |
| Project context not found | Continue without project context, note in findings |
| 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
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\""
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
@@ -259,13 +259,13 @@ Write(`${sessionFolder}/wisdom/decisions.md`, '# Decisions\n')
2. **Clarify scope** (skip if AUTO_YES):
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Tech debt governance scope:",
header: "Scope Selection",
multiSelect: false,
question: "Select tech debt governance scope.",
header: "Scope",
id: "debt_scope",
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: "Custom scope", description: "Specify file patterns" }
]
@@ -517,15 +517,15 @@ Session: ${sessionFolder}
// Completion action
if (!AUTO_YES) {
AskUserQuestion({
request_user_input({
questions: [{
question: "What next?",
header: "Completion",
multiSelect: false,
question: "Tech debt governance complete. Choose next action.",
header: "Done",
id: "completion",
options: [
{ label: "Close (Recommended)", description: "Archive session" },
{ label: "New target", description: "Run another scan/fix cycle" },
{ label: "Deep fix", description: "Continue fixing remaining items" },
{ label: "Close", description: "Archive session" }
{ label: "Deep fix", description: "Continue fixing remaining items" }
]
}]
})

View File

@@ -36,7 +36,7 @@ Interactive agent for reviewing the tech debt remediation plan at the plan appro
| Tool | Type | Purpose |
|------|------|---------|
| `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 |
### Tool Usage Patterns
@@ -91,13 +91,13 @@ Read("<session>/assessment/priority-matrix.json")
2. Present decision:
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Remediation plan generated. Review and decide:",
header: "Plan Approval Gate",
multiSelect: false,
header: "Plan Approval",
id: "plan_approval",
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: "Abort", description: "Stop pipeline, keep scan/assessment results" }
]

View File

@@ -2,7 +2,7 @@
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.
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
@@ -274,16 +274,15 @@ Write(`${sessionFolder}/gc-state.json`, JSON.stringify({
5. **Clarify if ambiguous** (skip if AUTO_YES):
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: "Detected scope suggests the '" + pipeline + "' pipeline. Confirm?",
header: "Pipeline Selection",
multiSelect: false,
question: `Detected scope suggests '${pipeline}' pipeline. Approve or override?`,
header: "Pipeline",
id: "pipeline_select",
options: [
{ label: "Proceed with " + pipeline, description: "Detected pipeline is appropriate" },
{ label: "Use targeted", description: "Minimal: L1 only" },
{ label: "Use standard", description: "Progressive: L1 + L2 + analysis" },
{ label: "Use comprehensive", description: "Full: L1 + L2 + L3 + analysis" }
{ label: "Approve (Recommended)", description: `Use ${pipeline} pipeline as detected` },
{ label: "Targeted", description: "Minimal: L1 only" },
{ label: "Standard/Full", description: "Progressive L1+L2 or comprehensive L1+L2+L3" }
]
}]
})
@@ -525,13 +524,13 @@ Session: ${sessionFolder}
`)
if (!AUTO_YES) {
AskUserQuestion({
request_user_input({
questions: [{
question: "Testing pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Testing pipeline complete. Choose next action.",
header: "Done",
id: "completion",
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: "Deepen Coverage", description: "Add more test layers or increase coverage targets" }
]

View File

@@ -2,7 +2,7 @@
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.
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
@@ -710,7 +710,7 @@ Convergence: audit.score >= 8 AND audit.critical_count === 0
| discoveries.ndjson corrupt | Ignore malformed lines, continue with valid entries |
| Audit score < 6 over 2 GC rounds | Escalate to user for manual intervention |
| 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 |
---

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 |
| `Bash` | builtin | File operations for archive/export |
| `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
- Highlight key artifacts (design tokens, component specs)
- 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
- **Keep Active**: Keep session directory for follow-up iterations
- **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
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
- Copy all deliverables to target location
- Generate export manifest listing all copied files

View File

@@ -2,7 +2,7 @@
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.
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
@@ -282,16 +282,15 @@ If not AUTO_YES, present user with configuration for confirmation:
```javascript
if (!AUTO_YES) {
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: `Topic: "${topic}"\nPipeline: ${pipeline_mode}\nPerspectives: ${perspectives.join(', ')}\nDimensions: ${dimensions.join(', ')}\n\nApprove?`,
header: "Analysis Configuration",
multiSelect: false,
question: `Topic: "${topic}"Pipeline: ${pipeline_mode}. Approve or override?`,
header: "Config",
id: "analysis_config",
options: [
{ label: "Approve", description: `Use ${pipeline_mode} mode with ${perspectives.length} perspectives` },
{ label: "Quick", description: "1 explorer 1 analyst synthesizer (fast)" },
{ label: "Standard", description: "N explorers N analysts discussion synthesizer" },
{ label: "Deep", description: "N explorers → N analysts → discussion loop (up to 5 rounds) → synthesizer" }
{ label: "Approve (Recommended)", description: `Use ${pipeline_mode} mode with ${perspectives.length} perspectives` },
{ label: "Quick", description: "1 explorer -> 1 analyst -> synthesizer (fast)" },
{ label: "Standard/Deep", description: "N explorers -> N analysts -> discussion -> synthesizer" }
]
}]
})
@@ -661,13 +660,13 @@ If not AUTO_YES, offer completion options:
```javascript
if (!AUTO_YES) {
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: "Ultra-Analyze pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
question: "Ultra-Analyze pipeline complete. Choose next action.",
header: "Done",
id: "completion",
options: [
{ label: "Archive & Clean (Recommended)", description: "Archive session" },
{ label: "Archive (Recommended)", description: "Archive session" },
{ label: "Keep Active", description: "Keep session for follow-up" },
{ 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
- 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
- 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 |
|------|------|---------|
| `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
- Round progress (current/max)
2. Present options via AskUserQuestion:
2. Present options via request_user_input:
```
AskUserQuestion({
request_user_input({
questions: [{
question: "Discussion round <N>/<max> complete.\n\nThemes: <themes>\nConflicts: <conflicts>\nOpen Questions: <questions>\n\nWhat next?",
header: "Discussion Feedback",
multiSelect: false,
header: "Feedback",
id: "discussion_next",
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: "Done", description: "Sufficient depth reached, proceed to final synthesis" }
]
@@ -93,7 +93,7 @@ AskUserQuestion({
```
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
**Output**: User decision and optional adjusted focus

View File

@@ -2,7 +2,7 @@
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.
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
@@ -452,19 +452,19 @@ writeMasterCSV(`${sessionDir}/tasks.csv`, tasksWithWaves)
// User validation (skip if autoYes)
if (!autoYes) {
const approval = AskUserQuestion({
const approval = request_user_input({
questions: [{
id: "task_approval",
question: `Generated ${tasksWithWaves.length} tasks for ${components.length} components. Proceed?`,
header: "Task Breakdown Validation",
multiSelect: false,
header: "Validate",
options: [
{ label: "Proceed", description: "Start UX improvement pipeline" },
{ label: "Proceed (Recommended)", description: "Start UX improvement pipeline" },
{ 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")
}
}
@@ -530,20 +530,19 @@ console.log(`\nResults: ${sessionDir}/results.csv`)
console.log(`Report: ${sessionDir}/context.md`)
// Offer next steps
const nextStep = AskUserQuestion({
const nextStep = request_user_input({
questions: [{
id: "completion",
question: "UX Improvement pipeline complete. What would you like to do?",
header: "Completion",
multiSelect: false,
header: "Done",
options: [
{ label: "Archive & Clean", description: "Archive session and clean up team resources" },
{ label: "Keep Active", description: "Keep session for follow-up work" },
{ label: "Export Results", description: "Export deliverables to specified location" }
{ label: "Archive (Recommended)", description: "Archive session and clean up team resources" },
{ label: "Keep Active", description: "Keep session for follow-up work" }
]
}]
})
if (nextStep.answers[0] === "Archive & Clean") {
if (nextStep.answers.completion.answers[0] === "Archive (Recommended)") {
Bash(`tar -czf "${sessionDir}.tar.gz" "${sessionDir}" && rm -rf "${sessionDir}"`)
console.log(`Session archived to ${sessionDir}.tar.gz`)
}
@@ -576,7 +575,7 @@ All agents share `discoveries.ndjson` for UX findings.
| 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 |
| Circular dependency | Detect in wave computation, abort with error |
| 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 |
| `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 |
|----------|------------|
| 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 |

View File

@@ -153,6 +153,6 @@ Interactive agent for exploring codebase to identify UI component patterns and f
| 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 |
| Invalid project path | Report error, request valid path |

View File

@@ -369,18 +369,19 @@ tasks.forEach(task => {
```javascript
if (!dryRun) {
AskUserQuestion({
request_user_input({
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",
multiSelect: false,
id: "confirm_execute",
question: `Execute ${tasks.length} tasks?`,
options: [
{ label: "Execute", description: "Start serial execution" },
{ label: "Execute (Recommended)", description: "Start serial execution" },
{ label: "Dry Run", description: "Simulate without changes" },
{ 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)
// Ask user
AskUserQuestion({
request_user_input({
questions: [{
question: `Task ${task.id} failed convergence verification. How to proceed?`,
header: "Failure",
multiSelect: false,
id: "handle_failure",
question: `Task ${task.id} failed convergence verification. How to proceed?`,
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: "Accept", description: "Mark as completed despite failure" },
{ 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
```javascript
AskUserQuestion({
request_user_input({
questions: [{
question: `Execution complete: ${completedTasks.size}/${tasks.length} succeeded (${Math.round(completedTasks.size / tasks.length * 100)}%).\nNext step:`,
header: "Post-Execute",
multiSelect: false,
header: "Post Execute",
id: "post_execute",
question: `Execution complete: ${completedTasks.size}/${tasks.length} succeeded. Next step?`,
options: [
{ label: "Done (Recommended)", description: "End workflow" },
{ 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: "Done", description: "End workflow" }
{ label: "Create Issue", description: "Create issue from failed tasks" }
]
}]
})
// answer.answers.post_execute.answers[0] → selected label
```
| Selection | Action |

View File

@@ -6,7 +6,7 @@ description: |
wave execution via spawn_agents_on_csv → results sync.
Task JSONs remain the rich data source; CSV is brief + execution state.
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
@@ -213,18 +213,18 @@ if (isResumeMode) {
return { id, path: s, progress: `${done}/${total} tasks` }
})
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: "Select session to execute:",
header: "Session",
multiSelect: false,
id: "session",
question: "Select session to execute.",
options: sessionInfos.map(s => ({
label: s.id,
description: s.progress
}))
}]
})
sessionId = answer.Session
sessionId = answer.answers.session.answers[0]
sessionFolder = `.workflow/active/${sessionId}`
}
}
@@ -546,23 +546,23 @@ if (!AUTO_YES) {
console.log(` Wave ${w}: ${waveTasks.map(t => `${t.id}(${t.agent})`).join(', ')}`)
}
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: `Proceed with ${pendingRows.length} tasks across ${maxWave} waves?`,
header: "Confirm",
multiSelect: false,
id: "confirm_execute",
question: `Proceed with ${pendingRows.length} tasks across ${maxWave} waves?`,
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: "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}`)
return
} else if (answer.Confirm === "Cancel") {
} else if (answer.answers.confirm_execute.answers[0] === "Cancel") {
return
}
}
@@ -891,19 +891,19 @@ Bash(`cd "${sessionFolder}" && jq '.status = "${sessionStatus}" | .completed_at
if (AUTO_YES) {
console.log(` [--yes] Session ${sessionId} ${sessionStatus}.`)
} else {
const nextStep = AskUserQuestion({
const nextStep = request_user_input({
questions: [{
question: "Execution complete. What's next?",
header: "Next Step",
multiSelect: false,
id: "next_step",
question: "Execution complete. What is next?",
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" }
]
}]
})
if (nextStep['Next Step'] === 'Enter Review') {
if (nextStep.answers.next_step.answers[0] === 'Enter Review (Recommended)') {
// → Phase 6
} else {
console.log(` Session ${sessionId} ${sessionStatus}.`)
@@ -922,20 +922,19 @@ if (AUTO_YES) {
console.log(`\n## Phase 6: Post-Implementation Review\n`)
const reviewType = AUTO_YES ? 'quality' : (() => {
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: "Select review type:",
header: "Review",
multiSelect: false,
header: "Review Type",
id: "review_type",
question: "Select review type.",
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: "Architecture", description: "Architecture decisions, scalability, patterns" },
{ label: "Action Items", description: "TODO items, tech debt, follow-ups" }
{ label: "Architecture", description: "Architecture decisions, scalability, patterns" }
]
}]
})
return answer.Review.toLowerCase()
return answer.answers.review_type.answers[0].toLowerCase()
})()
// Get list of modified files from tasks.csv
@@ -967,19 +966,19 @@ console.log(` Review complete: ${sessionFolder}/REVIEW-${reviewType}.md`)
// Post-review options
if (!AUTO_YES) {
const postReview = AskUserQuestion({
const postReview = request_user_input({
questions: [{
question: "Review complete. What's next?",
header: "Post-Review",
multiSelect: false,
header: "Post Review",
id: "post_review",
question: "Review complete. What is next?",
options: [
{ label: "Another Review", description: "Run a different review type" },
{ label: "Complete Session", description: "Archive and finalize" }
{ label: "Complete Session (Recommended)", 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
}
}

View File

@@ -2,7 +2,7 @@
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.
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
@@ -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*`).
**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 │
│ ├─ Analyze complexity → select exploration angles (1-4) │
│ ├─ 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) │
│ ├─ 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 │
│ ├─ Decompose into execution tasks with context_from: E*;T* │
│ ├─ 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) │
│ ├─ 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'))
```
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
if (!AUTO_YES) {
console.log(`\n## Exploration Plan (${angles.length} angles)\n`)
angles.forEach(a => console.log(` - [${a.id}] ${a.angle}: ${a.focus}`))
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: "Approve exploration angles?",
header: "Validation",
multiSelect: false,
options: [
{ label: "Approve", description: "Proceed with wave exploration" },
{ 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'))
```
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
if (!AUTO_YES) {
@@ -585,11 +588,10 @@ ${wt.map(t => ` - [${t.id}] ${t.title} (scope: ${t.scope}, from: ${t.context_fr
}).join('\n')}
`)
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: `Proceed with ${decomposedTasks.length} tasks across ${maxWave} waves?`,
header: "Confirm",
multiSelect: false,
options: [
{ label: "Execute", description: "Proceed with wave execution" },
{ 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") {
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") {
return
return // STOP — do not proceed to Phase 4
}
// Only reach here if user selected "Execute"
}
```
**Success Criteria**:
- tasks.csv created with context_from linking to E* rows
- 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
if (!AUTO_YES && failed.length > 0) {
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: `${failed.length} tasks failed. Next action?`,
header: "Next Step",
multiSelect: false,
options: [
{ label: "Retry Failed", description: `Re-execute ${failed.length} failed tasks with updated context` },
{ 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
7. **Skip on Failure**: If a dependency failed, skip the dependent task (cascade)
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.
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\""
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
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
@@ -68,9 +68,9 @@ Multi-mode planning pipeline using subagent coordination. Plan mode runs 4 seque
│ ├─ Multi-module → N+1 parallel agents │
│ └─ Output: IMPL_PLAN.md + task JSONs + TODO_LIST.md │
│ │
│ Plan Confirmation Gate
│ Plan Confirmation Gate (PLANNING ENDS HERE)
│ ├─ "Verify Plan" → Phase 5 │
│ ├─ "Start Execution" → workflow-execute
│ ├─ "Done" → Display next-step command for user
│ └─ "Review Status" → Display inline │
│ │
│ ═══ Verify Mode ═══ │
@@ -209,11 +209,10 @@ if (existingSessionId) {
sessionFolder = sessions[0]
sessionId = sessions[0].split('/').pop()
} else {
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: "Multiple sessions found. Select one:",
header: "Session",
multiSelect: false,
options: sessions.slice(0, 4).map(s => ({
label: s.split('/').pop(),
description: s
@@ -329,11 +328,10 @@ TASK DESCRIPTION: ${taskDescription}" --tool gemini --mode analysis --rule analy
console.log(` Strategy: ${c.strategy} | Impact: ${c.impact}`)
})
const answer = AskUserQuestion({
const answer = request_user_input({
questions: [{
question: "Accept conflict resolution strategies?",
header: "Conflicts",
multiSelect: false,
options: [
{ label: "Accept All", description: "Apply all recommended strategies" },
{ 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`)
if (AUTO_YES) {
// Auto-verify then auto-execute if PROCEED
// Auto-verify plan quality
console.log(` [--yes] Auto-verifying plan...`)
// → Fall through to Phase 5, then Phase 5 result determines next step
// → Fall through to Phase 5
} else {
const nextStep = AskUserQuestion({
const nextStep = request_user_input({
questions: [{
question: "Plan generated. What's next?",
header: "Next Step",
multiSelect: false,
options: [
{ label: "Verify Plan (Recommended)", description: "Run quality verification before execution" },
{ label: "Start Execution", description: "Proceed to workflow-execute" },
{ label: "Verify Plan (Recommended)", description: "Run quality verification" },
{ label: "Done", description: "Planning complete — show next-step command" },
{ label: "Review Status", description: "Display plan summary inline" }
]
}]
})
if (nextStep['Next Step'] === 'Start Execution') {
console.log(`\nReady to execute. Run: $workflow-execute --session ${sessionId}`)
return
if (nextStep['Next Step'] === 'Done') {
console.log(`\nPlanning complete. To execute, run: $workflow-execute --session ${sessionId}`)
return // STOP — this skill is planning-only
}
if (nextStep['Next Step'] === 'Review Status') {
const plan = Read(`${sessionFolder}/IMPL_PLAN.md`)
console.log(plan)
return
return // STOP — this skill is planning-only
}
// 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(` Report: ${sessionFolder}/.process/PLAN_VERIFICATION.md`)
if (AUTO_YES && qualityGate === 'PROCEED') {
console.log(` [--yes] Plan verified. Ready for execution.`)
console.log(` Run: $workflow-execute --session ${sessionId}`)
}
console.log(`\nPlanning complete. To execute, run: $workflow-execute --session ${sessionId}`)
// STOP — this skill is planning-only, NEVER proceed to execution
}
```

View File

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

View File

@@ -1,7 +1,7 @@
---
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".
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
@@ -63,7 +63,7 @@ Task Pipeline:
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
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
5. **Progressive Test Layers**: L0 (Static) → L1 (Unit) → L2 (Integration) → L3 (E2E)
6. **AI Code Issue Detection**: Validates against common AI-generated code problems
@@ -74,7 +74,7 @@ Task Pipeline:
## 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
@@ -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.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)
├─ Discovery: Load session, tasks, iteration state
├─ 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
2. **No Preliminary Analysis**: Do not read files before Phase 1
3. **Parse Every Output**: Extract data from each phase for the next
4. **Auto-Continue**: After each phase finishes, automatically execute next pending phase
3. **Parse Every Output**: Extract data from each phase/sub-phase for the next
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`)
6. **Task Attachment Model**: Sub-tasks ATTACH → execute → COLLAPSE
7. **CRITICAL: DO NOT STOP**: Continuous pipeline until Phase 2 completion
8. **Phase Transition**: After Phase 1 summary, immediately begin Phase 2
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 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
## 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`
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`
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):
- `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
- Verify all Phase 1 outputs (4+ task JSONs, IMPL_PLAN.md, TODO_LIST.md)
- **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)**:
- 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
```
### 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
CCW uses two types of invocations:

View File

@@ -87,6 +87,19 @@ npm install -g claude-code-workflow
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 与命令
CCW 使用两种调用方式:

View File

@@ -496,6 +496,19 @@ export async function installCommand(options: InstallOptions): Promise<void> {
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
if (platform() === 'win32' && !options.force) {
console.log('');