@amsterdamdatalabs/enact-extensions 0.1.3 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/README.md +2 -2
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/install.d.ts.map +1 -1
  7. package/dist/install.js +15 -1
  8. package/dist/install.js.map +1 -1
  9. package/dist/internal/agents.d.ts +29 -0
  10. package/dist/internal/agents.d.ts.map +1 -0
  11. package/dist/internal/agents.js +83 -0
  12. package/dist/internal/agents.js.map +1 -0
  13. package/extensions/enact-context/hooks/hooks.json +17 -7
  14. package/extensions/enact-core/.agents/plugin.json +39 -0
  15. package/extensions/enact-core/hooks/hooks.json +14 -0
  16. package/extensions/enact-factory/.agents/plugin.json +9 -3
  17. package/extensions/enact-factory/agents/architect.toml +30 -0
  18. package/extensions/enact-factory/agents/code-reviewer.toml +29 -0
  19. package/extensions/enact-factory/agents/critic.toml +35 -0
  20. package/extensions/enact-factory/agents/executor.toml +23 -0
  21. package/extensions/enact-factory/agents/explore.toml +22 -0
  22. package/extensions/enact-factory/agents/planner.toml +23 -0
  23. package/extensions/enact-factory/agents/verifier.toml +29 -0
  24. package/extensions/enact-factory/skills/ai-slop-cleaner/SKILL.md +52 -0
  25. package/extensions/enact-factory/skills/azdo-ci-strategy/SKILL.md +262 -0
  26. package/extensions/enact-factory/skills/azdo-ci-strategy/references/build-failures.md +60 -0
  27. package/extensions/enact-factory/skills/azdo-ci-strategy/references/cli-reference.md +87 -0
  28. package/extensions/enact-factory/skills/azdo-ci-strategy/references/policies-and-pipelines.md +132 -0
  29. package/extensions/enact-factory/skills/azdo-ci-strategy/references/troubleshooting.md +53 -0
  30. package/extensions/enact-factory/skills/deep-interview/SKILL.md +72 -0
  31. package/extensions/enact-factory/skills/drive-loop/SKILL.md +259 -0
  32. package/extensions/enact-factory/skills/drive-loop/references/contract-schema.md +107 -0
  33. package/extensions/enact-factory/skills/hyperplan/SKILL.md +51 -0
  34. package/extensions/enact-factory/skills/looplan/SKILL.md +103 -0
  35. package/extensions/enact-factory/skills/plan/SKILL.md +71 -0
  36. package/extensions/enact-factory/skills/remove-deadcode/SKILL.md +41 -0
  37. package/extensions/enact-factory/skills/research/SKILL.md +73 -0
  38. package/extensions/enact-factory/skills/review/SKILL.md +48 -0
  39. package/extensions/enact-factory/skills/security-research/SKILL.md +54 -0
  40. package/extensions/enact-factory/skills/tdd/SKILL.md +56 -0
  41. package/extensions/enact-factory/skills/trace/SKILL.md +37 -0
  42. package/extensions/enact-factory/skills/ultraqa/SKILL.md +79 -0
  43. package/extensions/enact-factory/skills/work-with-workitem/SKILL.md +51 -0
  44. package/extensions/enact-factory/skills/workitem-triage/SKILL.md +15 -0
  45. package/extensions/enact-loop/.agents/plugin.json +46 -0
  46. package/extensions/enact-loop/.mcp.json +1 -0
  47. package/extensions/enact-loop/hooks/hooks.json +27 -0
  48. package/extensions/enact-loop/skills/enact-loop/SKILL.md +327 -0
  49. package/extensions/enact-operator/.agents/plugin.json +0 -1
  50. package/extensions/enact-operator/hooks/hooks.json +0 -55
  51. package/extensions/enact-wiki/skills/wiki/SKILL.md +42 -0
  52. package/extensions/plugin-dev/.agents/plugin.json +4 -6
  53. package/extensions/plugin-dev/agents/plugin-validator.md +1 -1
  54. package/extensions/plugin-dev/skills/agent-development/SKILL.md +7 -7
  55. package/extensions/plugin-dev/{commands/create-plugin.md → skills/create-plugin/SKILL.md} +44 -37
  56. package/extensions/plugin-dev/skills/plugin-dev-guide/SKILL.md +13 -14
  57. package/extensions/plugin-dev/skills/skill-development/SKILL.md +0 -2
  58. package/extensions/plugin-dev/{commands/start.md → skills/start/SKILL.md} +7 -6
  59. package/package.json +11 -6
  60. package/scripts/check-hooks.mjs +174 -0
  61. package/scripts/check-principles.mjs +101 -0
  62. package/scripts/enact-extensions.mjs +87 -3
  63. package/scripts/lib/run-validate.mjs +36 -2
  64. package/scripts/lib/ups-router.mjs +432 -0
  65. package/spec/enact.json +4 -0
  66. package/spec/enact.md +5 -2
  67. package/extensions/cmux/.agents/plugin.json +0 -37
  68. package/extensions/cmux/skills/cmux/SKILL.md +0 -82
  69. package/extensions/cmux/skills/cmux/agents/openai.yaml +0 -4
  70. package/extensions/cmux/skills/cmux/references/handles-and-identify.md +0 -35
  71. package/extensions/cmux/skills/cmux/references/panes-surfaces.md +0 -37
  72. package/extensions/cmux/skills/cmux/references/trigger-flash-and-health.md +0 -23
  73. package/extensions/cmux/skills/cmux/references/windows-workspaces.md +0 -31
  74. package/extensions/cmux/skills/cmux-vm-monitor/SKILL.md +0 -122
  75. package/extensions/cmux/skills/cmux-vm-monitor/agents/openai.yaml +0 -4
  76. package/extensions/cmux/skills/cmux-vm-monitor/references/cmux-commands.md +0 -66
  77. package/extensions/cmux/skills/cmux-vm-monitor/scripts/codex_vm_monitor.sh +0 -45
  78. package/extensions/cmux/skills/cmux-workspace/SKILL.md +0 -93
  79. package/extensions/devops/.agents/plugin.json +0 -36
  80. package/extensions/devops/skills/azure-devops-cli/SKILL.md +0 -431
  81. package/extensions/devops/skills/azure-devops-cli/agents/openai.yaml +0 -4
  82. package/extensions/devops/skills/ci-pipeline-strategy/SKILL.md +0 -217
  83. package/extensions/devops/skills/ci-pipeline-strategy/agents/openai.yaml +0 -4
  84. package/extensions/enact-factory/hooks/user-prompt-submit.mjs +0 -67
  85. package/extensions/enact-operator/commands/doctor.md +0 -39
  86. package/extensions/enact-operator/commands/setup.md +0 -51
  87. package/extensions/plugin-dev/.mcp.json +0 -3
  88. package/extensions/plugin-dev/commands/_archive/create-marketplace.md +0 -427
  89. package/extensions/plugin-dev/commands/_archive/plugin-dev-guide.md +0 -12
  90. package/extensions/plugin-dev/hooks/hooks.json +0 -3
  91. package/extensions/plugin-dev/skills/command-development/SKILL.md +0 -763
  92. package/extensions/plugin-dev/skills/command-development/examples/plugin-commands.md +0 -612
  93. package/extensions/plugin-dev/skills/command-development/examples/simple-commands.md +0 -527
  94. package/extensions/plugin-dev/skills/command-development/references/advanced-workflows.md +0 -762
  95. package/extensions/plugin-dev/skills/command-development/references/documentation-patterns.md +0 -769
  96. package/extensions/plugin-dev/skills/command-development/references/frontmatter-reference.md +0 -508
  97. package/extensions/plugin-dev/skills/command-development/references/interactive-commands.md +0 -966
  98. package/extensions/plugin-dev/skills/command-development/references/marketplace-considerations.md +0 -943
  99. package/extensions/plugin-dev/skills/command-development/references/plugin-features-reference.md +0 -637
  100. package/extensions/plugin-dev/skills/command-development/references/plugin-integration.md +0 -191
  101. package/extensions/plugin-dev/skills/command-development/references/skill-tool.md +0 -447
  102. package/extensions/plugin-dev/skills/command-development/references/testing-strategies.md +0 -723
  103. package/extensions/plugin-dev/skills/command-development/scripts/check-frontmatter.sh +0 -234
  104. package/extensions/plugin-dev/skills/command-development/scripts/validate-command.sh +0 -160
  105. /package/extensions/enact-operator/{skills/_variants.md → docs/skill-variants.md} +0 -0
@@ -1,966 +0,0 @@
1
- # Interactive Command Patterns
2
-
3
- Comprehensive guide to creating commands that gather user feedback and make decisions through the AskUserQuestion tool.
4
-
5
- ## Overview
6
-
7
- Some commands need user input that doesn't work well with simple arguments. For example:
8
-
9
- - Choosing between multiple complex options with trade-offs
10
- - Selecting multiple items from a list
11
- - Making decisions that require explanation
12
- - Gathering preferences or configuration interactively
13
-
14
- For these cases, use the **AskUserQuestion tool** within command execution rather than relying on command arguments.
15
-
16
- ## When to Use AskUserQuestion
17
-
18
- ### Use AskUserQuestion When
19
-
20
- 1. **Multiple choice decisions** with explanations needed
21
- 2. **Complex options** that require context to choose
22
- 3. **Multi-select scenarios** (choosing multiple items)
23
- 4. **Preference gathering** for configuration
24
- 5. **Interactive workflows** that adapt based on answers
25
-
26
- ### Use Command Arguments When
27
-
28
- 1. **Simple values** (file paths, numbers, names)
29
- 2. **Known inputs** user already has
30
- 3. **Scriptable workflows** that should be automatable
31
- 4. **Fast invocations** where prompting would slow down
32
-
33
- ## AskUserQuestion Basics
34
-
35
- ### Tool Parameters
36
-
37
- ```typescript
38
- {
39
- questions: [
40
- {
41
- question: "Which authentication method should we use?",
42
- header: "Auth method", // Short label (max 12 chars)
43
- multiSelect: false, // true for multiple selection
44
- options: [
45
- {
46
- label: "OAuth 2.0",
47
- description: "Industry standard, supports multiple providers",
48
- },
49
- {
50
- label: "JWT",
51
- description: "Stateless, good for APIs",
52
- },
53
- {
54
- label: "Session",
55
- description: "Traditional, server-side state",
56
- },
57
- ],
58
- },
59
- ];
60
- }
61
- ```
62
-
63
- **Key points:**
64
-
65
- - Users can always choose "Other" to provide custom input (automatic)
66
- - `multiSelect: true` allows selecting multiple options
67
- - Options should be 2-4 choices (not more)
68
- - Can ask 1-4 questions per tool call
69
-
70
- ## Command Pattern for User Interaction
71
-
72
- ### Basic Interactive Command
73
-
74
- ```markdown
75
- ---
76
- description: Interactive setup command
77
- allowed-tools: AskUserQuestion, Write
78
- ---
79
-
80
- # Interactive Plugin Setup
81
-
82
- This command will guide you through configuring the plugin with a series of questions.
83
-
84
- ## Step 1: Gather Configuration
85
-
86
- Use the AskUserQuestion tool to ask:
87
-
88
- **Question 1 - Deployment target:**
89
-
90
- - header: "Deploy to"
91
- - question: "Which deployment platform will you use?"
92
- - options:
93
- - AWS (Amazon Web Services with ECS/EKS)
94
- - GCP (Google Cloud with GKE)
95
- - Azure (Microsoft Azure with AKS)
96
- - Local (Docker on local machine)
97
-
98
- **Question 2 - Environment strategy:**
99
-
100
- - header: "Environments"
101
- - question: "How many environments do you need?"
102
- - options:
103
- - Single (Just production)
104
- - Standard (Dev, Staging, Production)
105
- - Complete (Dev, QA, Staging, Production)
106
-
107
- **Question 3 - Features to enable:**
108
-
109
- - header: "Features"
110
- - question: "Which features do you want to enable?"
111
- - multiSelect: true
112
- - options:
113
- - Auto-scaling (Automatic resource scaling)
114
- - Monitoring (Health checks and metrics)
115
- - CI/CD (Automated deployment pipeline)
116
- - Backups (Automated database backups)
117
-
118
- ## Step 2: Process Answers
119
-
120
- Based on the answers received from AskUserQuestion:
121
-
122
- 1. Parse the deployment target choice
123
- 2. Set up environment-specific configuration
124
- 3. Enable selected features
125
- 4. Generate configuration files
126
-
127
- ## Step 3: Generate Configuration
128
-
129
- Create `.claude/plugin-name.local.md` with:
130
-
131
- ## \`\`\`yaml
132
-
133
- deployment_target: [answer from Q1]
134
- environments: [answer from Q2]
135
- features:
136
- auto_scaling: [true if selected in Q3]
137
- monitoring: [true if selected in Q3]
138
- ci_cd: [true if selected in Q3]
139
- backups: [true if selected in Q3]
140
-
141
- ---
142
-
143
- # Plugin Configuration
144
-
145
- Generated: [timestamp]
146
- Target: [deployment_target]
147
- Environments: [environments]
148
- \`\`\`
149
-
150
- ## Step 4: Confirm and Next Steps
151
-
152
- Confirm configuration created and guide user on next steps.
153
- ```
154
-
155
- ### Multi-Stage Interactive Workflow
156
-
157
- ```markdown
158
- ---
159
- description: Multi-stage interactive workflow
160
- allowed-tools: AskUserQuestion, Read, Write, Bash
161
- ---
162
-
163
- # Multi-Stage Deployment Setup
164
-
165
- This command walks through deployment setup in stages, adapting based on your answers.
166
-
167
- ## Stage 1: Basic Configuration
168
-
169
- Use AskUserQuestion to ask about deployment basics.
170
-
171
- Based on answers, determine which additional questions to ask.
172
-
173
- ## Stage 2: Advanced Options (Conditional)
174
-
175
- If user selected "Advanced" deployment in Stage 1:
176
-
177
- Use AskUserQuestion to ask about:
178
-
179
- - Load balancing strategy
180
- - Caching configuration
181
- - Security hardening options
182
-
183
- If user selected "Simple" deployment:
184
-
185
- - Skip advanced questions
186
- - Use sensible defaults
187
-
188
- ## Stage 3: Confirmation
189
-
190
- Show summary of all selections.
191
-
192
- Use AskUserQuestion for final confirmation:
193
-
194
- - header: "Confirm"
195
- - question: "Does this configuration look correct?"
196
- - options:
197
- - Yes (Proceed with setup)
198
- - No (Start over)
199
- - Modify (Let me adjust specific settings)
200
-
201
- If "Modify", ask which specific setting to change.
202
-
203
- ## Stage 4: Execute Setup
204
-
205
- Based on confirmed configuration, execute setup steps.
206
- ```
207
-
208
- ## Interactive Question Design
209
-
210
- ### Question Structure
211
-
212
- **Good questions:**
213
-
214
- ```markdown
215
- Question: "Which database should we use for this project?"
216
- Header: "Database"
217
- Options:
218
-
219
- - PostgreSQL (Relational, ACID compliant, best for complex queries)
220
- - MongoDB (Document store, flexible schema, best for rapid iteration)
221
- - Redis (In-memory, fast, best for caching and sessions)
222
- ```
223
-
224
- **Poor questions:**
225
-
226
- ```markdown
227
- Question: "Database?" // Too vague
228
- Header: "DB" // Unclear abbreviation
229
- Options:
230
-
231
- - Option 1 // Not descriptive
232
- - Option 2
233
- ```
234
-
235
- ### Option Design Best Practices
236
-
237
- **Clear labels:**
238
-
239
- - Use 1-5 words
240
- - Specific and descriptive
241
- - No jargon without context
242
-
243
- **Helpful descriptions:**
244
-
245
- - Explain what the option means
246
- - Mention key benefits or trade-offs
247
- - Help user make informed decision
248
- - Keep to 1-2 sentences
249
-
250
- **Appropriate number:**
251
-
252
- - 2-4 options per question
253
- - Don't overwhelm with too many choices
254
- - Group related options
255
- - "Other" automatically provided
256
-
257
- ### Multi-Select Questions
258
-
259
- **When to use multiSelect:**
260
-
261
- ```markdown
262
- Use AskUserQuestion for enabling features:
263
-
264
- Question: "Which features do you want to enable?"
265
- Header: "Features"
266
- multiSelect: true // Allow selecting multiple
267
- Options:
268
-
269
- - Logging (Detailed operation logs)
270
- - Metrics (Performance monitoring)
271
- - Alerts (Error notifications)
272
- - Backups (Automatic backups)
273
- ```
274
-
275
- User can select any combination: none, some, or all.
276
-
277
- **When NOT to use multiSelect:**
278
-
279
- ```markdown
280
- Question: "Which authentication method?"
281
- multiSelect: false // Only one auth method makes sense
282
- ```
283
-
284
- Mutually exclusive choices should not use multiSelect.
285
-
286
- ## Command Patterns with AskUserQuestion
287
-
288
- ### Pattern 1: Simple Yes/No Decision
289
-
290
- ```markdown
291
- ---
292
- description: Command with confirmation
293
- allowed-tools: AskUserQuestion, Bash
294
- ---
295
-
296
- # Destructive Operation
297
-
298
- This operation will delete all cached data.
299
-
300
- Use AskUserQuestion to confirm:
301
-
302
- Question: "This will delete all cached data. Are you sure?"
303
- Header: "Confirm"
304
- Options:
305
-
306
- - Yes (Proceed with deletion)
307
- - No (Cancel operation)
308
-
309
- If user selects "Yes":
310
- Execute deletion
311
- Report completion
312
-
313
- If user selects "No":
314
- Cancel operation
315
- Exit without changes
316
- ```
317
-
318
- ### Pattern 2: Multiple Configuration Questions
319
-
320
- ```markdown
321
- ---
322
- description: Multi-question configuration
323
- allowed-tools: AskUserQuestion, Write
324
- ---
325
-
326
- # Project Configuration Setup
327
-
328
- Gather configuration through multiple questions.
329
-
330
- Use AskUserQuestion with multiple questions in one call:
331
-
332
- **Question 1:**
333
-
334
- - question: "Which programming language?"
335
- - header: "Language"
336
- - options: Python, TypeScript, Go, Rust
337
-
338
- **Question 2:**
339
-
340
- - question: "Which test framework?"
341
- - header: "Testing"
342
- - options: Jest, PyTest, Go Test, Cargo Test
343
- (Adapt based on language from Q1)
344
-
345
- **Question 3:**
346
-
347
- - question: "Which CI/CD platform?"
348
- - header: "CI/CD"
349
- - options: GitHub Actions, GitLab CI, CircleCI
350
-
351
- **Question 4:**
352
-
353
- - question: "Which features do you need?"
354
- - header: "Features"
355
- - multiSelect: true
356
- - options: Linting, Type checking, Code coverage, Security scanning
357
-
358
- Process all answers together to generate cohesive configuration.
359
- ```
360
-
361
- ### Pattern 3: Conditional Question Flow
362
-
363
- ```markdown
364
- ---
365
- description: Conditional interactive workflow
366
- allowed-tools: AskUserQuestion, Read, Write
367
- ---
368
-
369
- # Adaptive Configuration
370
-
371
- ## Question 1: Deployment Complexity
372
-
373
- Use AskUserQuestion:
374
-
375
- Question: "How complex is your deployment?"
376
- Header: "Complexity"
377
- Options:
378
-
379
- - Simple (Single server, straightforward)
380
- - Standard (Multiple servers, load balancing)
381
- - Complex (Microservices, orchestration)
382
-
383
- ## Conditional Questions Based on Answer
384
-
385
- If answer is "Simple":
386
-
387
- - No additional questions
388
- - Use minimal configuration
389
-
390
- If answer is "Standard":
391
-
392
- - Ask about load balancing strategy
393
- - Ask about scaling policy
394
-
395
- If answer is "Complex":
396
-
397
- - Ask about orchestration platform (Kubernetes, Docker Swarm)
398
- - Ask about service mesh (Istio, Linkerd, None)
399
- - Ask about monitoring (Prometheus, Datadog, CloudWatch)
400
- - Ask about logging aggregation
401
-
402
- ## Process Conditional Answers
403
-
404
- Generate configuration appropriate for selected complexity level.
405
- ```
406
-
407
- ### Pattern 4: Iterative Collection
408
-
409
- ```markdown
410
- ---
411
- description: Collect multiple items iteratively
412
- allowed-tools: AskUserQuestion, Write
413
- ---
414
-
415
- # Collect Team Members
416
-
417
- We'll collect team member information for the project.
418
-
419
- ## Question: How many team members?
420
-
421
- Use AskUserQuestion:
422
-
423
- Question: "How many team members should we set up?"
424
- Header: "Team size"
425
- Options:
426
-
427
- - 2 people
428
- - 3 people
429
- - 4 people
430
- - 6 people
431
-
432
- ## Iterate Through Team Members
433
-
434
- For each team member (1 to N based on answer):
435
-
436
- Use AskUserQuestion for member details:
437
-
438
- Question: "What role for team member [number]?"
439
- Header: "Role"
440
- Options:
441
-
442
- - Frontend Developer
443
- - Backend Developer
444
- - DevOps Engineer
445
- - QA Engineer
446
- - Designer
447
-
448
- Store each member's information.
449
-
450
- ## Generate Team Configuration
451
-
452
- After collecting all N members, create team configuration file with all members and their roles.
453
- ```
454
-
455
- ### Pattern 5: Dependency Selection
456
-
457
- ```markdown
458
- ---
459
- description: Select dependencies with multi-select
460
- allowed-tools: AskUserQuestion
461
- ---
462
-
463
- # Configure Project Dependencies
464
-
465
- ## Question: Required Libraries
466
-
467
- Use AskUserQuestion with multiSelect:
468
-
469
- Question: "Which libraries does your project need?"
470
- Header: "Dependencies"
471
- multiSelect: true
472
- Options:
473
-
474
- - React (UI framework)
475
- - Express (Web server)
476
- - TypeORM (Database ORM)
477
- - Jest (Testing framework)
478
- - Axios (HTTP client)
479
-
480
- User can select any combination.
481
-
482
- ## Process Selections
483
-
484
- For each selected library:
485
-
486
- - Add to package.json dependencies
487
- - Generate sample configuration
488
- - Create usage examples
489
- - Update documentation
490
- ```
491
-
492
- ## Best Practices for Interactive Commands
493
-
494
- ### Question Design
495
-
496
- 1. **Clear and specific**: Question should be unambiguous
497
- 2. **Concise header**: Max 12 characters for clean display
498
- 3. **Helpful options**: Labels are clear, descriptions explain trade-offs
499
- 4. **Appropriate count**: 2-4 options per question, 1-4 questions per call
500
- 5. **Logical order**: Questions flow naturally
501
-
502
- ### Error Handling
503
-
504
- ```markdown
505
- # Handle AskUserQuestion Responses
506
-
507
- After calling AskUserQuestion, verify answers received:
508
-
509
- If answers are empty or invalid:
510
- Something went wrong gathering responses.
511
-
512
- Please try again or provide configuration manually:
513
- [Show alternative approach]
514
-
515
- Exit.
516
-
517
- If answers look correct:
518
- Process as expected
519
- ```
520
-
521
- ### Progressive Disclosure
522
-
523
- ```markdown
524
- # Start Simple, Get Detailed as Needed
525
-
526
- ## Question 1: Setup Type
527
-
528
- Use AskUserQuestion:
529
-
530
- Question: "How would you like to set up?"
531
- Header: "Setup type"
532
- Options:
533
-
534
- - Quick (Use recommended defaults)
535
- - Custom (Configure all options)
536
- - Guided (Step-by-step with explanations)
537
-
538
- If "Quick":
539
- Apply defaults, minimal questions
540
-
541
- If "Custom":
542
- Ask all available configuration questions
543
-
544
- If "Guided":
545
- Ask questions with extra explanation
546
- Provide recommendations along the way
547
- ```
548
-
549
- ### Multi-Select Guidelines
550
-
551
- **Good multi-select use:**
552
-
553
- ```markdown
554
- Question: "Which features do you want to enable?"
555
- multiSelect: true
556
- Options:
557
-
558
- - Logging
559
- - Metrics
560
- - Alerts
561
- - Backups
562
-
563
- Reason: User might want any combination
564
- ```
565
-
566
- **Bad multi-select use:**
567
-
568
- ```markdown
569
- Question: "Which database engine?"
570
- multiSelect: true // ❌ Should be single-select
571
-
572
- Reason: Can only use one database engine
573
- ```
574
-
575
- ## Advanced Patterns
576
-
577
- ### Validation Loop
578
-
579
- ```markdown
580
- ---
581
- description: Interactive with validation
582
- allowed-tools: AskUserQuestion, Bash
583
- ---
584
-
585
- # Setup with Validation
586
-
587
- ## Gather Configuration
588
-
589
- Use AskUserQuestion to collect settings.
590
-
591
- ## Validate Configuration
592
-
593
- Check if configuration is valid:
594
-
595
- - Required dependencies available?
596
- - Settings compatible with each other?
597
- - No conflicts detected?
598
-
599
- If validation fails:
600
- Show validation errors
601
-
602
- Use AskUserQuestion to ask:
603
-
604
- Question: "Configuration has issues. What would you like to do?"
605
- Header: "Next step"
606
- Options: - Fix (Adjust settings to resolve issues) - Override (Proceed despite warnings) - Cancel (Abort setup)
607
-
608
- Based on answer, retry or proceed or exit.
609
- ```
610
-
611
- ### Build Configuration Incrementally
612
-
613
- ```markdown
614
- ---
615
- description: Incremental configuration builder
616
- allowed-tools: AskUserQuestion, Write, Read
617
- ---
618
-
619
- # Incremental Setup
620
-
621
- ## Phase 1: Core Settings
622
-
623
- Use AskUserQuestion for core settings.
624
-
625
- Save to `.claude/config-partial.yml`
626
-
627
- ## Phase 2: Review Core Settings
628
-
629
- Show user the core settings:
630
-
631
- Based on these core settings, you need to configure:
632
-
633
- - [Setting A] (because you chose [X])
634
- - [Setting B] (because you chose [Y])
635
-
636
- Ready to continue?
637
-
638
- ## Phase 3: Detailed Settings
639
-
640
- Use AskUserQuestion for settings based on Phase 1 answers.
641
-
642
- Merge with core settings.
643
-
644
- ## Phase 4: Final Review
645
-
646
- Present complete configuration.
647
-
648
- Use AskUserQuestion for confirmation:
649
-
650
- Question: "Is this configuration correct?"
651
- Options:
652
-
653
- - Yes (Save and apply)
654
- - No (Start over)
655
- - Modify (Edit specific settings)
656
- ```
657
-
658
- ### Dynamic Options Based on Context
659
-
660
- ```markdown
661
- ---
662
- description: Context-aware questions
663
- allowed-tools: AskUserQuestion, Bash, Read
664
- ---
665
-
666
- # Context-Aware Setup
667
-
668
- ## Detect Current State
669
-
670
- Check existing configuration:
671
-
672
- - Current language: `detect-language.sh`
673
- - Existing frameworks: `detect-frameworks.sh`
674
- - Available tools: `check-tools.sh`
675
-
676
- ## Ask Context-Appropriate Questions
677
-
678
- Based on detected language, ask relevant questions.
679
-
680
- If language is TypeScript:
681
-
682
- Use AskUserQuestion:
683
-
684
- Question: "Which TypeScript features should we enable?"
685
- Options: - Strict Mode (Maximum type safety) - Decorators (Experimental decorator support) - Path Mapping (Module path aliases)
686
-
687
- If language is Python:
688
-
689
- Use AskUserQuestion:
690
-
691
- Question: "Which Python tools should we configure?"
692
- Options: - Type Hints (mypy for type checking) - Black (Code formatting) - Pylint (Linting and style)
693
-
694
- Questions adapt to project context.
695
- ```
696
-
697
- ## Real-World Example: Multi-Agent Swarm Launch
698
-
699
- **From multi-agent-swarm plugin:**
700
-
701
- ```markdown
702
- ---
703
- description: Launch multi-agent swarm
704
- allowed-tools: AskUserQuestion, Read, Write, Bash
705
- ---
706
-
707
- # Launch Multi-Agent Swarm
708
-
709
- ## Interactive Mode (No Task List Provided)
710
-
711
- If user didn't provide task list file, help create one interactively.
712
-
713
- ### Question 1: Agent Count
714
-
715
- Use AskUserQuestion:
716
-
717
- Question: "How many agents should we launch?"
718
- Header: "Agent count"
719
- Options:
720
-
721
- - 2 agents (Best for simple projects)
722
- - 3 agents (Good for medium projects)
723
- - 4 agents (Standard team size)
724
- - 6 agents (Large projects)
725
- - 8 agents (Complex multi-component projects)
726
-
727
- ### Question 2: Task Definition Approach
728
-
729
- Use AskUserQuestion:
730
-
731
- Question: "How would you like to define tasks?"
732
- Header: "Task setup"
733
- Options:
734
-
735
- - File (I have a task list file ready)
736
- - Guided (Help me create tasks interactively)
737
- - Custom (Other approach)
738
-
739
- If "File":
740
- Ask for file path
741
- Validate file exists and has correct format
742
-
743
- If "Guided":
744
- Enter iterative task creation mode (see below)
745
-
746
- ### Question 3: Coordination Mode
747
-
748
- Use AskUserQuestion:
749
-
750
- Question: "How should agents coordinate?"
751
- Header: "Coordination"
752
- Options:
753
-
754
- - Team Leader (One agent coordinates others)
755
- - Collaborative (Agents coordinate as peers)
756
- - Autonomous (Independent work, minimal coordination)
757
-
758
- ### Iterative Task Creation (If "Guided" Selected)
759
-
760
- For each agent (1 to N from Question 1):
761
-
762
- **Question A: Agent Name**
763
- Question: "What should we call agent [number]?"
764
- Header: "Agent name"
765
- Options:
766
-
767
- - auth-agent
768
- - api-agent
769
- - ui-agent
770
- - db-agent
771
- (Provide relevant suggestions based on common patterns)
772
-
773
- **Question B: Task Type**
774
- Question: "What task for [agent-name]?"
775
- Header: "Task type"
776
- Options:
777
-
778
- - Authentication (User auth, JWT, OAuth)
779
- - API Endpoints (REST/GraphQL APIs)
780
- - UI Components (Frontend components)
781
- - Database (Schema, migrations, queries)
782
- - Testing (Test suites and coverage)
783
- - Documentation (Docs, README, guides)
784
-
785
- **Question C: Dependencies**
786
- Question: "What does [agent-name] depend on?"
787
- Header: "Dependencies"
788
- multiSelect: true
789
- Options:
790
-
791
- - [List of previously defined agents]
792
- - No dependencies
793
-
794
- **Question D: Base Branch**
795
- Question: "Which base branch for PR?"
796
- Header: "PR base"
797
- Options:
798
-
799
- - main
800
- - staging
801
- - develop
802
-
803
- Store all task information for each agent.
804
-
805
- ### Generate Task List File
806
-
807
- After collecting all agent task details:
808
-
809
- 1. Ask for project name
810
- 2. Generate task list in proper format
811
- 3. Save to `.daisy/swarm/tasks.md`
812
- 4. Show user the file path
813
- 5. Proceed with launch using generated task list
814
- ```
815
-
816
- ## Best Practices
817
-
818
- ### Question Writing
819
-
820
- 1. **Be specific**: "Which database?" not "Choose option?"
821
- 2. **Explain trade-offs**: Describe pros/cons in option descriptions
822
- 3. **Provide context**: Question text should stand alone
823
- 4. **Guide decisions**: Help user make informed choice
824
- 5. **Keep concise**: Header max 12 chars, descriptions 1-2 sentences
825
-
826
- ### Option Design
827
-
828
- 1. **Meaningful labels**: Specific, clear names
829
- 2. **Informative descriptions**: Explain what each option does
830
- 3. **Show trade-offs**: Help user understand implications
831
- 4. **Consistent detail**: All options equally explained
832
- 5. **2-4 options**: Not too few, not too many
833
-
834
- ### Flow Design
835
-
836
- 1. **Logical order**: Questions flow naturally
837
- 2. **Build on previous**: Later questions use earlier answers
838
- 3. **Minimize questions**: Ask only what's needed
839
- 4. **Group related**: Ask related questions together
840
- 5. **Show progress**: Indicate where in flow
841
-
842
- ### User Experience
843
-
844
- 1. **Set expectations**: Tell user what to expect
845
- 2. **Explain why**: Help user understand purpose
846
- 3. **Provide defaults**: Suggest recommended options
847
- 4. **Allow escape**: Let user cancel or restart
848
- 5. **Confirm actions**: Summarize before executing
849
-
850
- ## Common Patterns
851
-
852
- ### Pattern: Feature Selection
853
-
854
- ```markdown
855
- Use AskUserQuestion:
856
-
857
- Question: "Which features do you need?"
858
- Header: "Features"
859
- multiSelect: true
860
- Options:
861
-
862
- - Authentication
863
- - Authorization
864
- - Rate Limiting
865
- - Caching
866
- ```
867
-
868
- ### Pattern: Environment Configuration
869
-
870
- ```markdown
871
- Use AskUserQuestion:
872
-
873
- Question: "Which environment is this?"
874
- Header: "Environment"
875
- Options:
876
-
877
- - Development (Local development)
878
- - Staging (Pre-production testing)
879
- - Production (Live environment)
880
- ```
881
-
882
- ### Pattern: Priority Selection
883
-
884
- ```markdown
885
- Use AskUserQuestion:
886
-
887
- Question: "What's the priority for this task?"
888
- Header: "Priority"
889
- Options:
890
-
891
- - Critical (Must be done immediately)
892
- - High (Important, do soon)
893
- - Medium (Standard priority)
894
- - Low (Nice to have)
895
- ```
896
-
897
- ### Pattern: Scope Selection
898
-
899
- ```markdown
900
- Use AskUserQuestion:
901
-
902
- Question: "What scope should we analyze?"
903
- Header: "Scope"
904
- Options:
905
-
906
- - Current file (Just this file)
907
- - Current directory (All files in directory)
908
- - Entire project (Full codebase scan)
909
- ```
910
-
911
- ## Combining Arguments and Questions
912
-
913
- ### Use Both Appropriately
914
-
915
- **Arguments for known values:**
916
-
917
- ```markdown
918
- ---
919
- argument-hint: [project-name]
920
- allowed-tools: AskUserQuestion, Write
921
- ---
922
-
923
- Setup for project: $1
924
-
925
- Now gather additional configuration...
926
-
927
- Use AskUserQuestion for options that require explanation.
928
- ```
929
-
930
- **Questions for complex choices:**
931
-
932
- ```markdown
933
- Project name from argument: $1
934
-
935
- Now use AskUserQuestion to choose:
936
-
937
- - Architecture pattern
938
- - Technology stack
939
- - Deployment strategy
940
-
941
- These require explanation, so questions work better than arguments.
942
- ```
943
-
944
- ## Troubleshooting
945
-
946
- **Questions not appearing:**
947
-
948
- - Verify AskUserQuestion in allowed-tools
949
- - Check question format is correct
950
- - Ensure options array has 2-4 items
951
-
952
- **User can't make selection:**
953
-
954
- - Check option labels are clear
955
- - Verify descriptions are helpful
956
- - Consider if too many options
957
- - Ensure multiSelect setting is correct
958
-
959
- **Flow feels confusing:**
960
-
961
- - Reduce number of questions
962
- - Group related questions
963
- - Add explanation between stages
964
- - Show progress through workflow
965
-
966
- With AskUserQuestion, commands become interactive wizards that guide users through complex decisions while maintaining the clarity that simple arguments provide for straightforward inputs.