@itz4blitz/agentful 0.1.8 → 0.1.10

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.
@@ -0,0 +1,860 @@
1
+ ---
2
+ name: agentful-product
3
+ description: Intelligently handles all product planning scenarios - init, analysis, refinement, status, and Q&A
4
+ ---
5
+
6
+ # agentful Product Planning
7
+
8
+ This command intelligently handles all product planning scenarios with auto-detection.
9
+
10
+ ## Auto-Detection Logic
11
+
12
+ The command detects the current state and acts accordingly:
13
+
14
+ 1. **No product spec exists** → Interactive init mode
15
+ 2. **Product spec exists, never analyzed** → Run analysis
16
+ 3. **Analysis exists with unresolved blocking issues** → Refinement mode
17
+ 4. **Analysis exists, ready** → Show status report
18
+ 5. **User provides text after command** → Discussion/Q&A mode
19
+
20
+ ## Detection Algorithm
21
+
22
+ ```bash
23
+ # Step 1: Check for user text argument
24
+ user_text = extract_argument_from_command()
25
+
26
+ if user_text:
27
+ # User asked a question or wants to discuss
28
+ mode = "DISCUSSION"
29
+ goto DISCUSSION_MODE
30
+
31
+ # Step 2: Check if product spec exists
32
+ product_spec_exists = exists(".claude/product/index.md") OR exists("PRODUCT.md")
33
+
34
+ if !product_spec_exists:
35
+ # No product spec found
36
+ mode = "INIT"
37
+ goto INIT_MODE
38
+
39
+ # Step 3: Check if analysis exists
40
+ analysis_exists = exists(".claude/product/product-analysis.json")
41
+
42
+ if !analysis_exists:
43
+ # Product spec exists but never analyzed
44
+ mode = "ANALYSIS"
45
+ goto ANALYSIS_MODE
46
+
47
+ # Step 4: Read analysis to check for blocking issues
48
+ Read(".claude/product/product-analysis.json")
49
+ blocking_issues = analysis.issues.filter(i => i.severity === "blocking" && !i.resolved)
50
+
51
+ if blocking_issues.length > 0:
52
+ # Analysis exists but has unresolved blocking issues
53
+ mode = "REFINEMENT"
54
+ goto REFINEMENT_MODE
55
+
56
+ # Step 5: Analysis exists and ready
57
+ mode = "STATUS"
58
+ goto STATUS_MODE
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Mode 1: INIT (Interactive Initialization)
64
+
65
+ When no product spec exists, guide the user through creation.
66
+
67
+ ### Process
68
+
69
+ ```
70
+ 📋 Product Specification Setup
71
+
72
+ Let's define your product specification. This will guide development.
73
+
74
+ ────────────────────────────────────────────────────────
75
+
76
+ Q1: What are you building?
77
+ Describe in 1-2 sentences what your product does.
78
+
79
+ Example: "A task management app that helps teams collaborate
80
+ on projects with real-time updates and deadline tracking."
81
+
82
+ Your description:
83
+ > _______________________________
84
+
85
+ ────────────────────────────────────────────────────────
86
+
87
+ Q2: What tech stack are you using?
88
+
89
+ Common stacks:
90
+ [1] Next.js + Prisma + PostgreSQL
91
+ [2] Django + PostgreSQL
92
+ [3] Express + MongoDB
93
+ [4] Spring Boot + MySQL
94
+ [5] Rails + PostgreSQL
95
+ [6] Let me specify my own stack
96
+
97
+ Your choice:
98
+ > _______________________________
99
+
100
+ ────────────────────────────────────────────────────────
101
+
102
+ Q3: What are the core features?
103
+ List your main features (comma-separated).
104
+
105
+ Example: user authentication, task creation, team collaboration, notifications
106
+
107
+ Your features:
108
+ > _______________________________
109
+
110
+ ────────────────────────────────────────────────────────
111
+
112
+ Q4: Any constraints or requirements?
113
+ (Optional) Performance, accessibility, browser support, etc.
114
+
115
+ Your constraints:
116
+ > _______________________________
117
+
118
+ ────────────────────────────────────────────────────────
119
+ ```
120
+
121
+ ### After Input Collection
122
+
123
+ 1. Generate product spec at `.claude/product/index.md`:
124
+
125
+ ```markdown
126
+ # Product Specification
127
+
128
+ ## Overview
129
+
130
+ [User's description from Q1]
131
+
132
+ ## Goals
133
+
134
+ - [ ] [Derived from description]
135
+ - [ ] [Derived from description]
136
+ - [ ] [Derived from description]
137
+
138
+ ## Tech Stack
139
+
140
+ ### Frontend
141
+ - **Framework**: [From Q2]
142
+ - **Language**: TypeScript
143
+ - **Styling**: [Inferred from stack]
144
+ - **State Management**: [Inferred from stack]
145
+
146
+ ### Backend
147
+ - **Runtime**: [From Q2]
148
+ - **Framework**: [From Q2]
149
+ - **Language**: [From Q2]
150
+
151
+ ### Database
152
+ - **Database**: [From Q2]
153
+ - **ORM**: [From Q2]
154
+
155
+ ### Authentication
156
+ - **Method**: [Default: JWT or framework default]
157
+
158
+ ### Testing
159
+ - **Unit**: [Inferred from stack]
160
+ - **E2E**: [Playwright]
161
+
162
+ ### Deployment
163
+ - **Hosting**: [Inferred from stack]
164
+
165
+ ## Features (Priority Order)
166
+
167
+ [For each feature from Q3, create a section]
168
+
169
+ ### 1. [Feature Name] - CRITICAL
170
+ **Description**: [What this feature does]
171
+
172
+ **Acceptance Criteria**:
173
+ - [ ] [Specific requirement 1]
174
+ - [ ] [Specific requirement 2]
175
+ - [ ] [Specific requirement 3]
176
+
177
+ **User Stories**:
178
+ - As a [user type], I want [feature] so that [benefit]
179
+
180
+ **Technical Notes**:
181
+ - [Any technical details or constraints from Q4]
182
+
183
+ ---
184
+
185
+ ## Constraints
186
+
187
+ [Content from Q4]
188
+
189
+ ## Success Criteria
190
+
191
+ The product is complete when:
192
+
193
+ 1. All critical features implemented and tested
194
+ 2. All tests passing with 80%+ coverage
195
+ 3. No TypeScript errors
196
+ 4. No security vulnerabilities
197
+ 5. Deployed to production
198
+ ```
199
+
200
+ 2. **Immediately run analysis**:
201
+ ```
202
+ ✅ Product spec created at .claude/product/index.md
203
+
204
+ Running analysis to check readiness...
205
+ ```
206
+
207
+ 3. Delegate to ANALYSIS_MODE (see below)
208
+
209
+ ---
210
+
211
+ ## Mode 2: ANALYSIS (Run Product Analyzer)
212
+
213
+ When product spec exists but never analyzed, or re-analysis requested.
214
+
215
+ ### Process
216
+
217
+ ```
218
+ 🔍 Analyzing Product Specification
219
+
220
+ Reading product spec and analyzing readiness...
221
+ ```
222
+
223
+ Use the Task tool to delegate to a product analyzer agent:
224
+
225
+ ```bash
226
+ Task("product-analyzer", "Analyze .claude/product/index.md and generate product-analysis.json with readiness score and issues.")
227
+ ```
228
+
229
+ ### Product Analyzer Agent Instructions
230
+
231
+ The product analyzer should:
232
+
233
+ 1. **Read product specification**:
234
+ - `.claude/product/index.md` or `PRODUCT.md`
235
+ - Check for hierarchical structure (`.claude/product/domains/*/`)
236
+
237
+ 2. **Analyze for completeness and clarity**:
238
+
239
+ **Tech Stack Analysis:**
240
+ - ✅ All stack choices specified (not placeholders)
241
+ - ⚠️ Missing authentication method
242
+ - ❌ Database not specified
243
+
244
+ **Feature Analysis:**
245
+ - ✅ Feature description clear
246
+ - ⚠️ Acceptance criteria vague
247
+ - ❌ No acceptance criteria defined
248
+ - ⚠️ Missing user stories
249
+ - ⚠️ Technical constraints unclear
250
+
251
+ **Architecture Analysis:**
252
+ - ✅ Clear folder structure defined
253
+ - ⚠️ No architecture notes
254
+ - ❌ API structure undefined
255
+
256
+ **Blocking Issues** (must resolve before dev):
257
+ - Database technology not specified
258
+ - Authentication method not chosen
259
+ - API structure completely undefined
260
+ - No acceptance criteria for critical features
261
+
262
+ **Warnings** (should address but not blocking):
263
+ - Missing user stories (context helpful)
264
+ - Vague acceptance criteria (need more specificity)
265
+ - No performance requirements specified
266
+ - Missing error handling strategy
267
+
268
+ 3. **Generate analysis file** at `.claude/product/product-analysis.json`:
269
+
270
+ ```json
271
+ {
272
+ "analyzed_at": "2026-01-19T00:00:00Z",
273
+ "product_file": ".claude/product/index.md",
274
+ "structure_type": "flat",
275
+ "readiness_score": 65,
276
+ "issues": [
277
+ {
278
+ "id": "issue-001",
279
+ "type": "tech_stack",
280
+ "severity": "blocking",
281
+ "title": "Database not specified",
282
+ "description": "Tech stack section shows [Database placeholder] instead of actual database choice",
283
+ "context": "The authentication and user management features require database persistence",
284
+ "suggestions": [
285
+ {
286
+ "option": "A",
287
+ "label": "PostgreSQL with Prisma",
288
+ "description": "Robust relational database, excellent TypeScript support with Prisma ORM"
289
+ },
290
+ {
291
+ "option": "B",
292
+ "label": "MongoDB with Mongoose",
293
+ "description": "Flexible document database, good for evolving schemas"
294
+ },
295
+ {
296
+ "option": "C",
297
+ "label": "SQLite with Prisma",
298
+ "description": "Lightweight, serverless database, perfect for prototypes and small apps"
299
+ },
300
+ {
301
+ "option": "CUSTOM",
302
+ "label": "Specify my own approach",
303
+ "description": "I want to use a different database or configuration"
304
+ }
305
+ ],
306
+ "resolved": false
307
+ },
308
+ {
309
+ "id": "issue-002",
310
+ "type": "feature",
311
+ "severity": "blocking",
312
+ "title": "Login feature has no acceptance criteria",
313
+ "description": "Feature 1 (User Login) description is present but acceptance criteria section is empty",
314
+ "context": "Without clear acceptance criteria, implementation will be ambiguous and validation impossible",
315
+ "suggestions": [
316
+ {
317
+ "option": "A",
318
+ "label": "Standard email/password login",
319
+ "description": "Email field, password field, remember me checkbox, submit button, error handling, session management"
320
+ },
321
+ {
322
+ "option": "B",
323
+ "label": "OAuth + email/password",
324
+ "description": "Email/password login plus Google/GitHub OAuth options"
325
+ },
326
+ {
327
+ "option": "C",
328
+ "label": "Magic link login",
329
+ "description": "Passwordless authentication via email magic links"
330
+ },
331
+ {
332
+ "option": "CUSTOM",
333
+ "label": "Specify my own approach",
334
+ "description": "I have specific requirements for login functionality"
335
+ }
336
+ ],
337
+ "resolved": false
338
+ },
339
+ {
340
+ "id": "issue-003",
341
+ "type": "architecture",
342
+ "severity": "warning",
343
+ "title": "API structure not defined",
344
+ "description": "No REST endpoint conventions or API design patterns specified",
345
+ "context": "Defining API structure upfront prevents inconsistencies and rework",
346
+ "suggestions": [
347
+ {
348
+ "option": "A",
349
+ "label": "RESTful conventions",
350
+ "description": "Standard REST: /api/users, /api/auth/login, JSON responses, HTTP status codes"
351
+ },
352
+ {
353
+ "option": "B",
354
+ "label": "GraphQL",
355
+ "description": "Single endpoint with GraphQL schema, type-safe queries and mutations"
356
+ },
357
+ {
358
+ "option": "C",
359
+ "label": "tRPC",
360
+ "description": "End-to-end type-safe APIs, no code generation, perfect for TypeScript monorepos"
361
+ },
362
+ {
363
+ "option": "CUSTOM",
364
+ "label": "Specify my own approach",
365
+ "description": "I have a specific API design in mind"
366
+ }
367
+ ],
368
+ "resolved": false
369
+ }
370
+ ],
371
+ "warnings": [
372
+ {
373
+ "id": "warning-001",
374
+ "type": "feature",
375
+ "title": "Missing user stories",
376
+ "description": "Features lack user stories for context",
377
+ "recommendation": "Add 'As a [user], I want [goal] so that [benefit]' for each feature"
378
+ }
379
+ ],
380
+ "summary": {
381
+ "total_issues": 3,
382
+ "blocking_issues": 2,
383
+ "warning_issues": 1,
384
+ "tech_stack_complete": false,
385
+ "features_well_defined": false,
386
+ "architecture_clear": false,
387
+ "ready_for_development": false
388
+ }
389
+ }
390
+ ```
391
+
392
+ 4. **Display results**:
393
+
394
+ ```
395
+ 📊 Analysis Complete
396
+
397
+ Readiness Score: 65/100
398
+
399
+ ❌ Not ready for development
400
+ 2 blocking issues must be resolved
401
+
402
+ 🚨 Blocking Issues:
403
+ 1. Database not specified
404
+ 2. Login feature has no acceptance criteria
405
+
406
+ ⚠️ Warnings (1):
407
+ 1. API structure not defined
408
+
409
+ ────────────────────────────────────────────────────────
410
+
411
+ To resolve issues and refine your product spec:
412
+
413
+ Run: /agentful-product
414
+
415
+ This will walk you through each blocking issue with context-aware options.
416
+ ```
417
+
418
+ ---
419
+
420
+ ## Mode 3: REFINEMENT (Walk Through Issues)
421
+
422
+ When analysis exists with unresolved blocking issues.
423
+
424
+ ### Process
425
+
426
+ Read `.claude/product/product-analysis.json` and walk through each blocking issue one by one.
427
+
428
+ ```
429
+ 🔧 Product Specification Refinement
430
+
431
+ You have 2 blocking issues to resolve before development can begin.
432
+
433
+ Let's walk through each one...
434
+
435
+ ════════════════════════════════════════════════════════
436
+
437
+ Issue 1 of 2: Database not specified
438
+
439
+ Context:
440
+ The authentication and user management features require
441
+ database persistence. Tech stack section shows [Database
442
+ placeholder] instead of actual database choice.
443
+
444
+ Choose an option:
445
+
446
+ [A] PostgreSQL with Prisma
447
+ Robust relational database, excellent TypeScript support
448
+ with Prisma ORM. Best for: Structured data, complex queries,
449
+ referential integrity.
450
+
451
+ [B] MongoDB with Mongoose
452
+ Flexible document database, good for evolving schemas.
453
+ Best for: Rapid prototyping, flexible data models.
454
+
455
+ [C] SQLite with Prisma
456
+ Lightweight, serverless database, perfect for prototypes
457
+ and small apps. Best for: Local development, demos, MVPs.
458
+
459
+ [CUSTOM] Specify my own approach
460
+ I want to use a different database or configuration
461
+
462
+ Your choice: > _______________________________
463
+ ```
464
+
465
+ **If user selects A, B, or C:**
466
+
467
+ 1. Update `.claude/product/index.md` with the chosen option
468
+ 2. Mark issue as resolved in `product-analysis.json`
469
+ 3. Continue to next issue
470
+
471
+ **If user selects CUSTOM:**
472
+
473
+ ```
474
+ Custom Approach Selected
475
+
476
+ Please specify:
477
+ - Database: > _______________________________
478
+ - ORM (if any): > _______________________________
479
+ - Any special configuration: > _______________________________
480
+ ```
481
+
482
+ Then update the product spec and mark resolved.
483
+
484
+ **After all blocking issues resolved:**
485
+
486
+ ```
487
+ ════════════════════════════════════════════════════════
488
+
489
+ ✅ All blocking issues resolved!
490
+
491
+ Re-running analysis to validate...
492
+ ```
493
+
494
+ Re-run analysis mode. If still has blocking issues, continue refinement. If ready:
495
+
496
+ ```
497
+ ════════════════════════════════════════════════════════
498
+
499
+ 🎉 Product specification ready for development!
500
+
501
+ Readiness Score: 92/100
502
+
503
+ ✅ Tech stack complete
504
+ ✅ Features well-defined
505
+ ✅ Architecture clear
506
+
507
+ ⚠️ You still have 1 warning:
508
+ - API structure not defined
509
+
510
+ This is not blocking, but addressing it now will prevent
511
+ rework later. Would you like to resolve warnings? (y/n)
512
+
513
+ > _______________________________
514
+ ```
515
+
516
+ If yes, walk through warnings with same option pattern.
517
+
518
+ If no:
519
+
520
+ ```
521
+ ────────────────────────────────────────────────────────
522
+
523
+ Ready to start development:
524
+
525
+ Run: /agentful-start
526
+
527
+ This will analyze your tech stack, generate specialized
528
+ agents, and begin implementing your product.
529
+ ```
530
+
531
+ ---
532
+
533
+ ## Mode 4: STATUS (Show Status Report)
534
+
535
+ When analysis exists and product spec is ready (no blocking issues).
536
+
537
+ ### Process
538
+
539
+ Read `.claude/product/product-analysis.json` and display status.
540
+
541
+ ```
542
+ 📊 Product Specification Status
543
+
544
+ Last analyzed: 2 hours ago
545
+
546
+ Readiness Score: 92/100
547
+
548
+ ✅ Ready for development
549
+
550
+ ────────────────────────────────────────────────────────
551
+
552
+ Summary:
553
+ ✅ Tech stack: Complete and specified
554
+ ✅ Features: 5 features well-defined
555
+ ✅ Architecture: Clear structure and patterns
556
+ ⚠️ API design: Not defined (1 warning)
557
+
558
+ ────────────────────────────────────────────────────────
559
+
560
+ Quality Checklist:
561
+ ✅ Database specified: PostgreSQL with Prisma
562
+ ✅ Authentication method: JWT tokens
563
+ ✅ All features have acceptance criteria
564
+ ✅ Critical features have user stories
565
+ ⚠️ API structure not defined
566
+ ✅ Folder structure defined
567
+ ✅ Constraints documented
568
+
569
+ ────────────────────────────────────────────────────────
570
+
571
+ ⚠️ 1 Warning Remaining:
572
+ - API structure not defined
573
+
574
+ Would you like to:
575
+ [1] Resolve remaining warnings
576
+ [2] Re-run analysis (if you updated the spec)
577
+ [3] Start development (warnings won't block)
578
+ [4] Show product specification
579
+
580
+ Your choice: > _______________________________
581
+ ```
582
+
583
+ Handle user's choice:
584
+ - **[1]**: Enter REFINEMENT_MODE for warnings only
585
+ - **[2]**: Enter ANALYSIS_MODE
586
+ - **[3]**: Show how to run `/agentful-start`
587
+ - **[4]**: Display the product spec content
588
+
589
+ ---
590
+
591
+ ## Mode 5: DISCUSSION (Q&A and Planning)
592
+
593
+ When user provides text after the command: `/agentful-product "How should I..."`
594
+
595
+ ### Process
596
+
597
+ Analyze the user's question in context of current product spec.
598
+
599
+ ```
600
+ 💬 Product Planning Discussion
601
+
602
+ Your question: "How should I handle user permissions and roles?"
603
+
604
+ Let me analyze this in context of your product...
605
+
606
+ ────────────────────────────────────────────────────────
607
+
608
+ Context Analysis:
609
+ - Your product: Task management app for teams
610
+ - Current features: User auth, task creation, team collab
611
+ - Tech stack: Next.js + Prisma + PostgreSQL
612
+ - Stage: Product spec defined, ready for development
613
+
614
+ ────────────────────────────────────────────────────────
615
+
616
+ 💡 Recommendation:
617
+
618
+ For your task management app, I recommend a role-based
619
+ access control (RBAC) system with these roles:
620
+
621
+ 1. Owner: Full permissions, billing, team management
622
+ 2. Admin: User management, all task operations
623
+ 3. Member: Create/edit own tasks, view team tasks
624
+ 4. Guest: View-only access
625
+
626
+ Implementation approach:
627
+
628
+ 1. Add to product spec:
629
+ - New feature: "User Roles & Permissions" (HIGH priority)
630
+ - Acceptance criteria:
631
+ * Define role hierarchy
632
+ * Implement role checks in API
633
+ * Add role selection in team invites
634
+ * UI updates based on role
635
+
636
+ 2. Database schema:
637
+ - Add 'role' enum to User model
638
+ - Consider TeamMember join table with role per team
639
+
640
+ 3. Prefer in-stack solution:
641
+ - Use Prisma enums for roles (not third-party)
642
+ - Implement permission checks in API middleware
643
+ - Use Next.js middleware for route protection
644
+
645
+ Would you like me to:
646
+ [A] Add this as a feature to your product spec
647
+ [B] Show implementation example for your stack
648
+ [C] Discuss alternative approaches
649
+ [D] Continue discussion
650
+
651
+ Your choice: > _______________________________
652
+ ```
653
+
654
+ **Key principles for discussion mode:**
655
+ - Read and reference current product spec
656
+ - Provide context-aware recommendations
657
+ - Prefer in-stack solutions over third-party
658
+ - Offer to update product spec if helpful
659
+ - Ask clarifying questions when needed
660
+ - No time estimates
661
+
662
+ ---
663
+
664
+ ## Important Rules
665
+
666
+ ### Always Prefer In-Stack Solutions
667
+
668
+ When suggesting approaches, ALWAYS prefer solutions using the existing tech stack:
669
+
670
+ **Good:**
671
+ - "Use Prisma's built-in validation instead of a separate library"
672
+ - "Next.js middleware can handle this without adding a package"
673
+ - "Django's permissions system covers this use case"
674
+
675
+ **Bad:**
676
+ - "Install this third-party auth library"
677
+ - "Use this npm package for validation"
678
+ - "Add Clerk for authentication"
679
+
680
+ **Only suggest third-party when:**
681
+ - Truly complex (payment processing → Stripe)
682
+ - Security-critical (OAuth → established providers)
683
+ - Significant development time saved
684
+ - No good in-stack alternative
685
+
686
+ ### No Time Estimates
687
+
688
+ **Never provide time estimates** like:
689
+ - ❌ "This will take 2-3 days"
690
+ - ❌ "Implement in 4 hours"
691
+ - ❌ "Should be done by next week"
692
+
693
+ Instead:
694
+ - ✅ "This is a straightforward feature"
695
+ - ✅ "This is complex and will require careful planning"
696
+ - ✅ "This depends on X being completed first"
697
+
698
+ ### Context-Aware Options
699
+
700
+ When presenting options in refinement mode:
701
+ - Option A: Most common/recommended approach
702
+ - Option B: Alternative approach for different use case
703
+ - Option C: Another viable alternative
704
+ - CUSTOM: Always include this option
705
+
706
+ Make options specific to their context, NOT generic.
707
+
708
+ **Bad (generic):**
709
+ ```
710
+ [A] Use a library
711
+ [B] Build it yourself
712
+ [C] Use a service
713
+ ```
714
+
715
+ **Good (context-aware):**
716
+ ```
717
+ [A] PostgreSQL with Prisma
718
+ Robust relational database, excellent TypeScript support.
719
+ Best for: Structured data, complex queries.
720
+
721
+ [B] MongoDB with Mongoose
722
+ Flexible document database, good for evolving schemas.
723
+ Best for: Rapid prototyping, flexible data models.
724
+ ```
725
+
726
+ ### Using the Task Tool
727
+
728
+ To invoke the product analyzer agent, use:
729
+
730
+ ```bash
731
+ Task("product-analyzer", "Analyze .claude/product/index.md and generate product-analysis.json with readiness score and issues. For each blocking issue, provide 3-4 context-aware suggestions with CUSTOM option.")
732
+ ```
733
+
734
+ Since the product-analyzer agent doesn't exist as a file, the Task tool will use the conversation skill to interpret the instructions and execute them.
735
+
736
+ ---
737
+
738
+ ## File Locations
739
+
740
+ - **Product spec**: `.claude/product/index.md` (or `PRODUCT.md` for legacy)
741
+ - **Analysis results**: `.claude/product/product-analysis.json`
742
+ - **Domain structure**: `.claude/product/domains/*/index.md` (optional hierarchical)
743
+ - **Feature specs**: `.claude/product/domains/*/features/*.md` (optional hierarchical)
744
+
745
+ ---
746
+
747
+ ## Example Flows
748
+
749
+ ### Flow 1: New User, Empty Project
750
+
751
+ ```
752
+ User: /agentful-product
753
+
754
+ Command: [Detects no product spec exists]
755
+ [Enters INIT mode]
756
+
757
+ Command: "📋 Product Specification Setup..."
758
+ [Asks 4 questions]
759
+
760
+ User: [Answers questions]
761
+
762
+ Command: [Generates .claude/product/index.md]
763
+ [Runs ANALYSIS mode]
764
+ [Analysis finds 2 blocking issues]
765
+ [Shows analysis results]
766
+
767
+ User: /agentful-product
768
+
769
+ Command: [Detects blocking issues exist]
770
+ [Enters REFINEMENT mode]
771
+ [Walks through each issue]
772
+
773
+ User: [Resolves issues with options]
774
+
775
+ Command: [Updates product spec]
776
+ [Marks issues resolved]
777
+ [Re-runs analysis]
778
+ [Shows ready status]
779
+ [Suggests running /agentful-start]
780
+ ```
781
+
782
+ ### Flow 2: Existing Product Spec, Never Analyzed
783
+
784
+ ```
785
+ User: /agentful-product
786
+
787
+ Command: [Detects product spec exists]
788
+ [Detects no analysis file]
789
+ [Enters ANALYSIS mode]
790
+ [Runs analyzer]
791
+ [Shows readiness score and issues]
792
+ ```
793
+
794
+ ### Flow 3: Ready Product, Status Check
795
+
796
+ ```
797
+ User: /agentful-product
798
+
799
+ Command: [Detects product spec exists]
800
+ [Detects analysis exists]
801
+ [No blocking issues]
802
+ [Enters STATUS mode]
803
+ [Shows readiness score, warnings, next steps]
804
+ ```
805
+
806
+ ### Flow 4: User Has Question
807
+
808
+ ```
809
+ User: /agentful-product "Should I use REST or GraphQL?"
810
+
811
+ Command: [Detects user text provided]
812
+ [Enters DISCUSSION mode]
813
+ [Reads product spec for context]
814
+ [Analyzes question]
815
+ [Provides context-aware recommendation]
816
+ [Offers to update spec or continue discussion]
817
+ ```
818
+
819
+ ---
820
+
821
+ ## Quality Checklist
822
+
823
+ Before marking analysis as "ready for development", verify:
824
+
825
+ **Tech Stack:**
826
+ - [ ] All placeholders replaced with actual choices
827
+ - [ ] Framework/runtime specified
828
+ - [ ] Database and ORM specified
829
+ - [ ] Authentication method chosen
830
+ - [ ] Testing tools identified
831
+
832
+ **Features:**
833
+ - [ ] All critical features have descriptions
834
+ - [ ] All critical features have acceptance criteria
835
+ - [ ] Acceptance criteria are specific and testable
836
+ - [ ] At least one feature has user stories (for context)
837
+
838
+ **Architecture:**
839
+ - [ ] Folder structure defined (or will use framework defaults)
840
+ - [ ] API design approach specified (REST/GraphQL/tRPC)
841
+ - [ ] Error handling strategy mentioned
842
+ - [ ] Deployment target identified
843
+
844
+ **Constraints:**
845
+ - [ ] Any performance requirements documented
846
+ - [ ] Accessibility requirements noted (if applicable)
847
+ - [ ] Browser/platform support specified
848
+
849
+ ---
850
+
851
+ ## Success Criteria
852
+
853
+ This command is successful when:
854
+
855
+ 1. **INIT**: User can create a well-structured product spec through guided questions
856
+ 2. **ANALYSIS**: Clear readiness score and actionable issues identified
857
+ 3. **REFINEMENT**: Each blocking issue resolved with context-aware options
858
+ 4. **STATUS**: Current state clearly communicated with next steps
859
+ 5. **DISCUSSION**: User questions answered with specific, in-stack recommendations
860
+ 6. **HANDOFF**: Product spec ready → `/agentful-start` can begin development