moai-adk 0.5.4__py3-none-any.whl → 0.5.6__py3-none-any.whl

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.

Potentially problematic release.


This version of moai-adk might be problematic. Click here for more details.

Files changed (61) hide show
  1. moai_adk/__init__.py +1 -1
  2. moai_adk/cli/commands/init.py +4 -2
  3. moai_adk/cli/commands/status.py +4 -2
  4. moai_adk/cli/commands/update.py +4 -5
  5. moai_adk/core/project/initializer.py +13 -11
  6. moai_adk/core/project/phase_executor.py +7 -3
  7. moai_adk/core/template/processor.py +60 -1
  8. moai_adk/templates/.claude/agents/alfred/cc-manager.md +8 -0
  9. moai_adk/templates/.claude/agents/alfred/debug-helper.md +18 -0
  10. moai_adk/templates/.claude/agents/alfred/doc-syncer.md +18 -0
  11. moai_adk/templates/.claude/agents/alfred/git-manager.md +38 -2
  12. moai_adk/templates/.claude/agents/alfred/implementation-planner.md +18 -0
  13. moai_adk/templates/.claude/agents/alfred/project-manager.md +6 -0
  14. moai_adk/templates/.claude/agents/alfred/quality-gate.md +6 -0
  15. moai_adk/templates/.claude/agents/alfred/skill-factory.md +8 -0
  16. moai_adk/templates/.claude/agents/alfred/spec-builder.md +17 -0
  17. moai_adk/templates/.claude/agents/alfred/tag-agent.md +7 -1
  18. moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +18 -0
  19. moai_adk/templates/.claude/agents/alfred/trust-checker.md +6 -0
  20. moai_adk/templates/.claude/commands/alfred/0-project.md +5 -1
  21. moai_adk/templates/.claude/commands/alfred/1-plan.md +5 -1
  22. moai_adk/templates/.claude/commands/alfred/2-run.md +6 -2
  23. moai_adk/templates/.claude/commands/alfred/3-sync.md +5 -1
  24. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +5 -1
  25. moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +5 -1
  26. moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +5 -1
  27. moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +5 -1
  28. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/SKILL.md +30 -273
  29. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/examples.md +487 -129
  30. moai_adk/templates/.claude/skills/moai-alfred-interactive-questions/reference.md +603 -70
  31. moai_adk/templates/.claude/skills/moai-cc-agents/SKILL.md +22 -2
  32. moai_adk/templates/.claude/skills/moai-cc-claude-md/SKILL.md +22 -2
  33. moai_adk/templates/.claude/skills/moai-cc-commands/SKILL.md +22 -2
  34. moai_adk/templates/.claude/skills/moai-cc-hooks/SKILL.md +22 -2
  35. moai_adk/templates/.claude/skills/moai-cc-mcp-plugins/SKILL.md +22 -2
  36. moai_adk/templates/.claude/skills/moai-cc-memory/SKILL.md +22 -2
  37. moai_adk/templates/.claude/skills/moai-cc-settings/SKILL.md +22 -2
  38. moai_adk/templates/.claude/skills/moai-cc-skills/SKILL.md +25 -5
  39. moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +152 -547
  40. moai_adk/templates/.claude/skills/moai-essentials-debug/examples.md +835 -878
  41. moai_adk/templates/.claude/skills/moai-essentials-debug/reference.md +665 -1151
  42. moai_adk/templates/.claude/skills/moai-skill-factory/SKILL.md +138 -427
  43. moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +61 -53
  44. moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +99 -1181
  45. moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +541 -0
  46. moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +622 -0
  47. moai_adk/templates/.moai/config.json +5 -5
  48. moai_adk/templates/.moai/memory/CLAUDE-AGENTS-GUIDE.md +208 -0
  49. moai_adk/templates/.moai/memory/CLAUDE-PRACTICES.md +369 -0
  50. moai_adk/templates/.moai/memory/CLAUDE-RULES.md +539 -0
  51. moai_adk/templates/.moai/memory/{development-guide.md → DEVELOPMENT-GUIDE.md} +3 -3
  52. moai_adk/templates/.moai/memory/SKILLS-DESCRIPTION-POLICY.md +218 -0
  53. moai_adk/templates/.moai/memory/config-schema.md +444 -0
  54. moai_adk/templates/CLAUDE.md +149 -845
  55. {moai_adk-0.5.4.dist-info → moai_adk-0.5.6.dist-info}/METADATA +293 -335
  56. {moai_adk-0.5.4.dist-info → moai_adk-0.5.6.dist-info}/RECORD +61 -54
  57. /moai_adk/templates/.moai/memory/{gitflow-protection-policy.md → GITFLOW-PROTECTION-POLICY.md} +0 -0
  58. /moai_adk/templates/.moai/memory/{spec-metadata.md → SPEC-METADATA.md} +0 -0
  59. {moai_adk-0.5.4.dist-info → moai_adk-0.5.6.dist-info}/WHEEL +0 -0
  60. {moai_adk-0.5.4.dist-info → moai_adk-0.5.6.dist-info}/entry_points.txt +0 -0
  61. {moai_adk-0.5.4.dist-info → moai_adk-0.5.6.dist-info}/licenses/LICENSE +0 -0
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: moai-alfred-interactive-questions
3
- version: 3.0.0
3
+ version: 3.1.0
4
4
  created: 2025-10-22
5
- updated: 2025-10-23
5
+ updated: 2025-10-27
6
6
  status: active
7
7
  description: Guide Alfred sub-agents to actively invoke AskUserQuestion for ambiguous decisions.
8
8
  keywords: ['interactive', 'clarification', 'decision-making', 'AskUserQuestion']
@@ -17,7 +17,7 @@ allowed-tools:
17
17
  | Field | Value |
18
18
  | ----- | ----- |
19
19
  | **Skill Name** | moai-alfred-interactive-questions |
20
- | **Version** | 3.0.0 (2025-10-23) |
20
+ | **Version** | 3.1.0 (2025-10-27) |
21
21
  | **Core Tool** | `AskUserQuestion` (Claude Code built-in) |
22
22
  | **Auto-load** | When Alfred detects ambiguity in requests |
23
23
  | **Tier** | Alfred (Workflow Orchestration) |
@@ -82,9 +82,7 @@ Proceed with confirmed specifications
82
82
 
83
83
  ---
84
84
 
85
- ## AskUserQuestion API Reference
86
-
87
- ### Minimal Invocation
85
+ ## Quick Start: Minimal Invocation
88
86
 
89
87
  ```typescript
90
88
  const answer = await AskUserQuestion({
@@ -110,7 +108,9 @@ const answer = await AskUserQuestion({
110
108
  // Returns: { "Approach": "Option 1" }
111
109
  ```
112
110
 
113
- ### Key Constraints
111
+ ---
112
+
113
+ ## Key Constraints
114
114
 
115
115
  | Constraint | Reason |
116
116
  |-----------|--------|
@@ -121,292 +121,58 @@ const answer = await AskUserQuestion({
121
121
  | **Description required** | Enables informed choice |
122
122
  | **Auto "Other" option** | Always available for custom input |
123
123
 
124
- ### Question Types
125
-
126
- **Single-Select** (`multiSelect: false`):
127
- - Mutually exclusive: "Choose ONE database"
128
- - Returns: `{ "Header": "Selected Label" }`
129
-
130
- **Multi-Select** (`multiSelect: true`):
131
- - Independent options: "Which features to enable?" (check multiple)
132
- - Returns: `{ "Header": ["Label1", "Label2"] }`
133
-
134
124
  ---
135
125
 
136
- ## Usage Patterns (Top 5)
126
+ ## Top 5 Usage Patterns
137
127
 
138
128
  ### Pattern 1: Implementation Approach
139
-
140
129
  **Trigger**: "Add feature X" or "Build Y" without specifics
141
130
 
142
- ```typescript
143
- await AskUserQuestion({
144
- questions: [{
145
- question: "How should we implement this feature?",
146
- header: "Approach",
147
- multiSelect: false,
148
- options: [
149
- { label: "New standalone component", description: "Isolated, reusable." },
150
- { label: "Extend existing component", description: "Shared state, simpler." },
151
- { label: "Use environment flag", description: "Conditional visibility." }
152
- ]
153
- }]
154
- });
155
- ```
156
-
157
131
  ### Pattern 2: Confirmation (Risky Operations)
158
-
159
132
  **Trigger**: Destructive action (delete, migrate, reset)
160
133
 
161
- ```typescript
162
- await AskUserQuestion({
163
- questions: [{
164
- question: "This will permanently delete 50 records. Proceed?",
165
- header: "Confirm",
166
- multiSelect: false,
167
- options: [
168
- { label: "Yes, proceed", description: "Irreversible. Continue." },
169
- { label: "No, cancel", description: "Abort operation." }
170
- ]
171
- }]
172
- });
173
- ```
174
-
175
134
  ### Pattern 3: Multi-Option Feature Selection
176
-
177
135
  **Trigger**: "Which framework/library/approach?"
178
136
 
179
- ```typescript
180
- await AskUserQuestion({
181
- questions: [{
182
- question: "Which i18n library?",
183
- header: "Library",
184
- multiSelect: false,
185
- options: [
186
- { label: "next-intl", description: "Next.js 15+ native, best DX." },
187
- { label: "react-i18next", description: "Popular, flexible, more setup." },
188
- { label: "Format.js", description: "ICU format, powerful, complex." }
189
- ]
190
- }]
191
- });
192
- ```
193
-
194
137
  ### Pattern 4: Multi-Select (Independent Features)
195
-
196
138
  **Trigger**: "Which features to enable/include?"
197
139
 
198
- ```typescript
199
- await AskUserQuestion({
200
- questions: [{
201
- question: "Which testing frameworks?",
202
- header: "Test Tools",
203
- multiSelect: true, // Multiple selections allowed
204
- options: [
205
- { label: "Unit tests (Vitest)", description: "Fast, modern." },
206
- { label: "E2E tests (Playwright)", description: "Browser automation." },
207
- { label: "Visual regression", description: "Screenshot comparison." }
208
- ]
209
- }]
210
- });
211
- ```
212
-
213
140
  ### Pattern 5: Sequential Questions (Conditional Flow)
214
-
215
141
  **Trigger**: Dependent decisions (Q2 depends on Q1 answer)
216
142
 
217
- ```typescript
218
- // Question 1
219
- const q1 = await AskUserQuestion({
220
- questions: [{
221
- question: "Enable authentication?",
222
- header: "Auth",
223
- options: [
224
- { label: "Yes", description: "User login required." },
225
- { label: "No", description: "Public access." }
226
- ]
227
- }]
228
- });
143
+ > **Detailed examples and code**: See [examples.md](examples.md)
229
144
 
230
- // Question 2 (only if Q1 = "Yes")
231
- if (q1["Auth"] === "Yes") {
232
- const q2 = await AskUserQuestion({
233
- questions: [{
234
- question: "Which auth provider?",
235
- header: "Provider",
236
- options: [
237
- { label: "JWT + email", description: "Traditional." },
238
- { label: "OAuth", description: "Third-party." }
239
- ]
240
- }]
241
- });
242
- }
243
- ```
145
+ ---
146
+
147
+ ## Integration with Alfred Sub-agents
148
+
149
+ | Sub-agent | When to Ask | Example Trigger |
150
+ |-----------|-------------|-----------------|
151
+ | **spec-builder** (`/alfred:1-plan`) | SPEC title vague, scope undefined | "Add feature" without specifics |
152
+ | **code-builder** (`/alfred:2-run`) | Implementation approach unclear | Multiple valid implementation paths |
153
+ | **doc-syncer** (`/alfred:3-sync`) | Sync scope unclear | Full vs partial sync decision |
154
+
155
+ > **Detailed integration patterns**: See [reference.md](reference.md)
244
156
 
245
157
  ---
246
158
 
247
- ## Best Practices
159
+ ## Best Practices Summary
248
160
 
249
161
  ### ✅ DO
250
-
251
162
  - **Be specific**: "Which database type?" not "What should we use?"
252
163
  - **Provide context**: Include file names, scope, or impact
253
164
  - **Order logically**: General → Specific; safest option first
254
165
  - **Flag risks**: Use "NOT RECOMMENDED" or "CAUTION:" prefixes
255
166
  - **Explain trade-offs**: Mention time, resources, complexity
256
- - **Single-select for exclusive**: "Choose ONE"
257
- - **Multi-select for combinable**: "Check any that apply"
258
- - **Include descriptions**: Every option needs rationale
259
- - **Keep headers short**: "Approach" not "Implementation Strategy"
260
- - **Batch related questions**: Ask 2-3 at once if they flow naturally
261
167
 
262
168
  ### ❌ DON'T
263
-
264
169
  - **Overuse questions**: Only ask when ambiguous
265
170
  - **Too many options**: 2-4 per question max
266
171
  - **Vague labels**: "Option A", "Use tokens", "Option 2"
267
172
  - **Skip descriptions**: User needs rationale
268
173
  - **Hide trade-offs**: Always mention implications
269
- - **Make destructive default**: Risky option = NOT pre-selected
270
- - **Mix concerns**: One decision per question
271
- - **Manually add "Other"**: It's auto-provided
272
- - **Nest more than 2 levels deep**: Keep flow linear
273
-
274
- ---
275
174
 
276
- ## Integration with Alfred Sub-agents
277
-
278
- ### spec-builder (`/alfred:1-plan`)
279
-
280
- **When to ask**:
281
- - SPEC title is vague ("Add feature")
282
- - Scope undefined (what exactly?)
283
- - Domain prefix unclear (AUTH vs UI vs DATA?)
284
-
285
- **Example**:
286
- ```typescript
287
- if (titleIsAmbiguous(specTitle)) {
288
- const answer = await AskUserQuestion({
289
- questions: [{
290
- question: "Can you clarify what this SPEC should cover?",
291
- header: "Scope",
292
- options: [...]
293
- }]
294
- });
295
- specTitle = answer["Scope"];
296
- }
297
- ```
298
-
299
- ### code-builder (`/alfred:2-run`)
300
-
301
- **When to ask**:
302
- - Implementation approach unclear
303
- - Multiple valid paths exist
304
- - Error recovery needed (failing tests)
305
-
306
- **Example**:
307
- ```typescript
308
- if (multipleValidImplementationPaths) {
309
- const answer = await AskUserQuestion({
310
- questions: [{
311
- question: "How should we implement this?",
312
- header: "Approach",
313
- options: [...]
314
- }]
315
- });
316
- implementationStrategy = answer["Approach"];
317
- }
318
- ```
319
-
320
- ### doc-syncer (`/alfred:3-sync`)
321
-
322
- **When to ask**:
323
- - Sync scope unclear (full vs partial)
324
- - PR Ready status uncertain
325
- - Documentation coverage decision needed
326
-
327
- **Example**:
328
- ```typescript
329
- const syncMode = await AskUserQuestion({
330
- questions: [{
331
- question: "Which sync mode?",
332
- header: "Mode",
333
- options: [
334
- { label: "auto", description: "Smart detection." },
335
- { label: "force", description: "Regenerate all." }
336
- ]
337
- }]
338
- });
339
- ```
340
-
341
- ---
342
-
343
- ## Real-World Examples
344
-
345
- ### Example: Vague Feature Request
346
-
347
- **User**: "Add a completion page for the competition."
348
-
349
- **Alfred detects ambiguity**:
350
- - Where should it live? (new route vs modify existing)
351
- - Who can access it? (public vs authenticated)
352
- - What should it display? (results vs simple message)
353
-
354
- **AskUserQuestion invocation**:
355
- ```typescript
356
- const answer = await AskUserQuestion({
357
- questions: [
358
- {
359
- question: "How should the completion page be implemented?",
360
- header: "Approach",
361
- multiSelect: false,
362
- options: [
363
- { label: "New public route", description: "New page visible to all visitors." },
364
- { label: "Modify existing page", description: "Add conditional logic to /end page." },
365
- { label: "Environment flag", description: "Set NEXT_PUBLIC_COMPETITION_CLOSED=true." }
366
- ]
367
- },
368
- {
369
- question: "For logged-in participants?",
370
- header: "Behavior",
371
- multiSelect: false,
372
- options: [
373
- { label: "Show full results", description: "Redirect to /end page with history." },
374
- { label: "Show simple message", description: "Display 'Competition concluded' only." }
375
- ]
376
- }
377
- ]
378
- });
379
- ```
380
-
381
- **Result**: Alfred knows exactly what to build.
382
-
383
- ---
384
-
385
- ## Anti-Patterns to Avoid
386
-
387
- ### ❌ Too Many Options
388
- ```typescript
389
- // 8+ options = choice paralysis
390
- options: [
391
- { label: "PostgreSQL" }, { label: "MySQL" }, { label: "MariaDB" },
392
- { label: "SQLite" }, { label: "MongoDB" }, { label: "CouchDB" },
393
- { label: "Cassandra" }, { label: "Redis" }
394
- ]
395
- ```
396
-
397
- ### ✅ Group Options
398
- ```typescript
399
- // First ask: which TYPE? Then: specific within type
400
- questions: [{
401
- question: "Database type?",
402
- header: "DB Type",
403
- options: [
404
- { label: "Relational (SQL)", description: "PostgreSQL, MySQL, etc." },
405
- { label: "Document (NoSQL)", description: "MongoDB, CouchDB, etc." },
406
- { label: "Key-Value", description: "Redis, Memcached, etc." }
407
- ]
408
- }]
409
- ```
175
+ > **Complete best practices guide**: See [reference.md](reference.md)
410
176
 
411
177
  ---
412
178
 
@@ -427,35 +193,21 @@ try {
427
193
  const answer = await AskUserQuestion({...});
428
194
 
429
195
  if (answer["Header"] === "Other" || !VALID_OPTIONS.includes(answer["Header"])) {
430
- // Handle custom input validation
431
196
  validateCustomInput(answer["Header"]);
432
197
  }
433
198
  ```
434
199
 
435
200
  ---
436
201
 
437
- ## Performance Tips
438
-
439
- - **Batch questions**: Ask 2-3 related questions in one call
440
- - **Minimize calls**: Don't ask sequentially unless truly dependent
441
- - **Pre-generate options**: Analyze codebase once to generate all options
442
-
443
- ---
444
-
445
- ## References
446
-
447
- **Official Claude Code Documentation**:
448
- - AskUserQuestion tool (built-in Claude Code)
449
- - Interactive Prompting (CLAUDE.md § Clarification & Interactive Prompting)
202
+ ## Related Skills
450
203
 
451
- **Related Skills**:
452
204
  - `moai-alfred-spec-metadata-validation` (SPEC clarity)
453
205
  - `moai-alfred-ears-authoring` (requirement phrasing)
454
206
  - `moai-foundation-specs` (SPEC structure)
455
207
 
456
208
  ---
457
209
 
458
- ## Summary
210
+ ## Quick Reference
459
211
 
460
212
  **When to use**:
461
213
  - User intent is ambiguous
@@ -477,4 +229,9 @@ if (answer["Header"] === "Other" || !VALID_OPTIONS.includes(answer["Header"])) {
477
229
 
478
230
  ---
479
231
 
480
- **End of Skill** | Refactored 2025-10-23
232
+ **For detailed API specifications**: [reference.md](reference.md)
233
+ **For real-world examples**: [examples.md](examples.md)
234
+
235
+ ---
236
+
237
+ **End of Skill** | Refactored 2025-10-27