prd-cli 1.0.0

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,707 @@
1
+ # Product Development Process v2.0
2
+
3
+ A quality-gated, AI-native process for building features from idea to production. Built for Cursor AI agents with slash commands, PRD verification, and real-time visibility.
4
+
5
+ ## Overview
6
+
7
+ Four phases, clear ownership, slash command execution:
8
+
9
+ ```
10
+ PM creates & verifies → Dev builds & tests → Team releases & documents
11
+ ```
12
+
13
+ | Phase | Command | Owner | What Happens |
14
+ |-------|---------|-------|--------------|
15
+ | **Create** | `/create "description" @backlog.md` | PM | Define → Verify → Extract Features → PRD approved |
16
+ | **Verify** | `/verify US-{ID}` | PM | Quality check existing PRD (optional standalone) |
17
+ | **Dev** | `/dev US-{ID}` | Developer | Kickoff → Code → Test → PR ready |
18
+ | **Release** | `/release US-{ID}` | Team | Review → Merge → Deploy → Document → Shipped! 🚀 |
19
+
20
+ ---
21
+
22
+ ## What's New in v2.0
23
+
24
+ | Feature | Description |
25
+ |---------|-------------|
26
+ | **Slash Commands** | `/create`, `/verify`, `/dev`, `/release` work in Cursor |
27
+ | **PRD Verification** | Automated gap analysis before approval |
28
+ | **Feature Extraction** | MoSCoW-prioritized features generated from PRD |
29
+ | **RULES.md** | Project-level technical standards for AI consistency |
30
+ | **Dashboard Metadata** | YAML frontmatter enables visibility dashboard |
31
+ | **Resumable Workflows** | `/dev` detects and continues previous work |
32
+
33
+ ---
34
+
35
+ ## Workspace Setup
36
+
37
+ Your Cursor workspace needs **two folders**:
38
+
39
+ 1. **product-docs** — PRDs, backlogs, process, RULES.md (PM-managed)
40
+ 2. **dev repo** (e.g., `my-app`) — code, tests, docs (dev-managed)
41
+
42
+ **Setup:** Open the `.code-workspace` file generated by `prd init` — both folders are pre-configured.
43
+
44
+ ---
45
+
46
+ ## Repository Structure
47
+
48
+ ### product-docs repo:
49
+ ```
50
+ product-docs/
51
+ ├── PROCESS.md # This file
52
+ ├── README.md # Project registry + next story ID
53
+ └── {project-name}/
54
+ ├── backlog.md # Project backlog
55
+ ├── RULES.md # Technical standards (NEW)
56
+ └── US-XXX.md # Story files (with YAML metadata)
57
+ ```
58
+
59
+ ### dev repo:
60
+ ```
61
+ {project-name}/
62
+ ├── src/ # Source code
63
+ ├── tests/ # Tests
64
+ ├── CHANGELOG.md # Shipped changes
65
+ └── README.md # Setup instructions
66
+ ```
67
+
68
+ ---
69
+
70
+ ## PRD Metadata Format
71
+
72
+ All PRDs must include YAML frontmatter for dashboard visibility:
73
+
74
+ ```yaml
75
+ ---
76
+ id: US-027
77
+ project: {project-name}
78
+ status: create | approved | dev | done
79
+ phase: planning | development | testing | review | deployed
80
+ progress: 0-100
81
+ ac_total: 7
82
+ ac_complete: 0
83
+ verified: true | false | skipped
84
+ created: 2026-02-03
85
+ updated: 2026-02-03
86
+ branch: feature/US-027-slug
87
+ pr: 123
88
+ dependencies: [US-019, US-020]
89
+ blockers: []
90
+ ---
91
+ ```
92
+
93
+ | Field | Values | Description |
94
+ |-------|--------|-------------|
95
+ | `status` | create, approved, dev, done | Current workflow status |
96
+ | `phase` | planning, development, testing, review, deployed | Detailed phase within status |
97
+ | `progress` | 0-100 | Percentage complete (AC or task based) |
98
+ | `verified` | true, false, skipped | PRD passed verification |
99
+ | `blockers` | [] or list | Issues blocking progress |
100
+
101
+ ---
102
+
103
+ ## Story Referencing
104
+
105
+ Use `@` tags in Cursor chat:
106
+ - `@US-027.md` — finds the story automatically
107
+ - `@{project-name}/backlog.md` — project backlog
108
+ - `@{project-name}/RULES.md` — technical standards
109
+ - `@README.md` — project registry
110
+
111
+ ---
112
+
113
+ ## The Four Phases
114
+
115
+ ### Phase 1: /create
116
+
117
+ **Owner:** Product Manager
118
+ **Goal:** Verified, approved PRD with extracted features
119
+
120
+ **Usage:**
121
+ ```
122
+ /create "Add email notifications for users" @{project-name}/backlog.md
123
+ ```
124
+
125
+ **Workflow:**
126
+
127
+ ```
128
+ Initialize → Refine Requirements → Verify PRD → Extract Features → Approve
129
+ ```
130
+
131
+ #### Step 1: Initialize Story
132
+ - Read `@README.md` for next ID (e.g., US-027)
133
+ - Create `{project}/US-027.md` with metadata template
134
+ - Add entry to `{project}/backlog.md`
135
+ - Increment ID in `README.md`
136
+
137
+ #### Step 2: Refine Requirements (Interactive)
138
+
139
+ Agent asks questions in batches:
140
+
141
+ **Batch 1 - Problem & Users:**
142
+ - What problem does this solve?
143
+ - Who are the target users?
144
+ - What's the current workaround?
145
+
146
+ **Batch 2 - Scope & Behavior:**
147
+ - What are the acceptance criteria?
148
+ - What's out of scope? (Non-Goals)
149
+ - Any constraints? (performance, security)
150
+
151
+ **Batch 3 - Edge Cases & NFRs:**
152
+ - Edge cases to handle?
153
+ - Non-functional requirements?
154
+ - Dependencies on other stories?
155
+
156
+ PM can say `refine [section]` or `add [detail]` to iterate.
157
+
158
+ #### Step 3: Verify PRD (Quality Gate)
159
+
160
+ Agent runs automated verification:
161
+
162
+ ```
163
+ 📋 PRD Verification Results
164
+
165
+ ✅ Passed: 8 checks
166
+ ⚠️ Gaps Found: 3 items
167
+
168
+ 🔴 High Priority:
169
+ 1. AC2 is not testable → Add specific condition
170
+
171
+ 🟡 Medium Priority:
172
+ 1. Missing error handling for network failure
173
+
174
+ Options:
175
+ - `apply` - Apply suggested fixes
176
+ - `manual` - I'll fix manually
177
+ - `skip` - Proceed without fixing
178
+ ```
179
+
180
+ PM must acknowledge verification before proceeding.
181
+
182
+ #### Step 4: Extract Features
183
+
184
+ After verification approved, agent extracts:
185
+
186
+ ```markdown
187
+ ## Features (from US-027)
188
+
189
+ | ID | Feature | Priority | Complexity |
190
+ |----|---------|----------|------------|
191
+ | F1 | Email template | Must | Medium |
192
+ | F2 | User preferences | Should | Low |
193
+ | F3 | Retry logic | Could | High |
194
+ ```
195
+
196
+ Generates ≤8 dev tasks from features.
197
+
198
+ #### Step 5: Approve
199
+
200
+ PM types `approve`:
201
+
202
+ ```
203
+ ✅ US-027 approved and committed!
204
+
205
+ 📊 Summary:
206
+ - AC: 7 defined
207
+ - Features: 5 extracted
208
+ - Dev Tasks: 6 planned
209
+
210
+ 🚀 Ready for: /dev US-027
211
+ ```
212
+
213
+ **Exit Criteria:**
214
+ - PRD verified (or explicitly skipped)
215
+ - Features extracted with priorities
216
+ - Dev tasks generated
217
+ - Committed to product-docs
218
+
219
+ ---
220
+
221
+ ### Phase 2: /verify (Optional Standalone)
222
+
223
+ **Owner:** PM or Anyone
224
+ **Goal:** Check PRD quality before or after creation
225
+
226
+ **Usage:**
227
+ ```
228
+ /verify US-027
229
+ ```
230
+
231
+ **When to use:**
232
+ - After initial `/create` if skipped verification
233
+ - Before starting `/dev` to ensure readiness
234
+ - When revisiting old PRDs
235
+
236
+ **Verification Areas:**
237
+
238
+ | Area | What's Checked |
239
+ |------|----------------|
240
+ | **Fundamentals** | Problem statement, target users, success metrics, non-goals |
241
+ | **AC Quality** | Testable, specific, complete, no ambiguous language |
242
+ | **Edge Cases** | Empty states, error handling, boundary conditions |
243
+ | **Feasibility** | Dependencies, NFRs measurable, RULES.md alignment |
244
+ | **Completeness** | All sections filled, dev tasks derivable |
245
+
246
+ **Output:**
247
+ - Score (1-10)
248
+ - Gaps by priority (High/Medium/Low)
249
+ - Suggested fixes
250
+ - Option to auto-apply fixes
251
+
252
+ ---
253
+
254
+ ### Phase 3: /dev
255
+
256
+ **Owner:** Developer
257
+ **Goal:** Working, tested code with PR ready
258
+
259
+ **Usage:**
260
+ ```
261
+ /dev US-027
262
+ ```
263
+
264
+ **Workflow:**
265
+
266
+ ```
267
+ Kickoff → [Task Loop: Code → Test → Verify AC] → PR Prep → Ready
268
+ ```
269
+
270
+ #### Step 1: Kickoff
271
+
272
+ Agent loads context:
273
+ - PRD summary (Goal, AC, NFRs)
274
+ - Dev tasks list
275
+ - Project `RULES.md` (technical standards)
276
+ - Existing branch/progress (if resuming)
277
+
278
+ ```
279
+ 🔧 Kickoff: US-027
280
+
281
+ PRD: Add email notifications
282
+ AC: 7 criteria
283
+ Tasks: 6 planned
284
+
285
+ Branch: feature/US-027-email-notifications
286
+ Status: New (or Resuming from Task 3)
287
+
288
+ Ready to start? (yes/review PRD/check RULES.md)
289
+ ```
290
+
291
+ #### Step 2: Iterative Development
292
+
293
+ For each task:
294
+ 1. **Propose** - Show approach and files to change
295
+ 2. **Implement** - Apply changes following RULES.md
296
+ 3. **Test** - Run relevant tests
297
+ 4. **Verify** - Check AC coverage
298
+ 5. **Progress** - Update tracker and continue
299
+
300
+ ```
301
+ 📊 Progress: 4/6 tasks complete (67%)
302
+
303
+ AC Coverage:
304
+ - AC1: ✅ Covered
305
+ - AC2: ✅ Covered
306
+ - AC3: 🔄 In progress
307
+ - AC4-7: ⏳ Pending
308
+ ```
309
+
310
+ **Resumability:** If interrupted, run `/dev US-027` again:
311
+ ```
312
+ 📂 Resuming US-027...
313
+ Tasks 1-3 complete. Continuing with Task 4.
314
+ ```
315
+
316
+ #### Step 3: PR Preparation
317
+
318
+ When all tasks complete:
319
+ - Generate PR title and body
320
+ - AC checklist for reviewers
321
+ - List files changed
322
+ - Deployment notes
323
+
324
+ ```bash
325
+ git push -u origin feature/US-027-email-notifications
326
+ gh pr create --title "US-027: Add email notifications" --body "..."
327
+ ```
328
+
329
+ #### Step 4: Ready Checkpoint
330
+
331
+ ```
332
+ ✅ US-027 Development Complete!
333
+
334
+ - Tasks: 6/6 ✅
335
+ - Tests: 47 passing
336
+ - AC: 7/7 covered
337
+
338
+ PR: #123
339
+
340
+ 🚀 Ready for: /release US-027
341
+ ```
342
+
343
+ **Exit Criteria:**
344
+ - All tasks complete
345
+ - Tests passing
346
+ - All AC covered
347
+ - PR created
348
+
349
+ ---
350
+
351
+ ### Phase 4: /release
352
+
353
+ **Owner:** PM/Team
354
+ **Goal:** Code merged, deployed, documented
355
+
356
+ **Usage:**
357
+ ```
358
+ /release US-027
359
+ ```
360
+
361
+ **Workflow:**
362
+
363
+ ```
364
+ Review PR → Approve → Merge → Deploy → Document → Celebrate! 🚀
365
+ ```
366
+
367
+ #### Step 1: Pre-Release Review
368
+
369
+ ```
370
+ 📦 Release Review: US-027
371
+
372
+ AC Verification:
373
+ - [ ] AC1: Email displays correctly
374
+ - [ ] AC2: Responsive on mobile
375
+ ...
376
+
377
+ Test Status: ✅ All passing
378
+ CI/CD: ✅ Green
379
+ PR: #123 (2 approvals)
380
+
381
+ Blockers: None
382
+
383
+ Ready to merge? (approve/review AC/hold)
384
+ ```
385
+
386
+ #### Step 2: Merge & Deploy
387
+
388
+ On `approve`:
389
+ ```bash
390
+ gh pr merge 123 --squash --delete-branch
391
+ ```
392
+
393
+ Monitor deployment:
394
+ ```
395
+ 🚀 Deploying...
396
+ - Build: ✅ Complete
397
+ - Deploy: ✅ Production live
398
+
399
+ URL: https://your-app.example.com
400
+ ```
401
+
402
+ #### Step 3: Documentation
403
+
404
+ Agent updates:
405
+ - **CHANGELOG.md** (dev repo) - New entry for this release
406
+ - **PRD** (product-docs) - QA Results section, status → done
407
+ - **backlog.md** (product-docs) - Status → done, PR → merged
408
+
409
+ #### Step 4: Celebrate!
410
+
411
+ ```
412
+ 🎉 US-027 Released!
413
+
414
+ Timeline: Created → Approved → Dev → Shipped
415
+ AC: 7/7 verified
416
+ PR: #123 merged
417
+
418
+ 📍 Live at: https://your-app.example.com
419
+
420
+ What's next?
421
+ - /create "next feature" @backlog.md
422
+ ```
423
+
424
+ ---
425
+
426
+ ## RULES.md - Technical Standards
427
+
428
+ Each project has a `RULES.md` defining technical standards:
429
+
430
+ ```
431
+ {project}/RULES.md
432
+ ```
433
+
434
+ **Purpose:**
435
+ - Ensures AI implements features consistently
436
+ - Documents tech stack, patterns, conventions
437
+ - Reduces "how should I implement this?" questions
438
+ - Speeds up `/dev` by providing clear guidance
439
+
440
+ **Contents:**
441
+ - Technology stack with versions
442
+ - Code organization (folders, naming)
443
+ - State management patterns
444
+ - Testing requirements
445
+ - Performance standards
446
+ - Security practices
447
+
448
+ **Referenced by:**
449
+ - `/create` - Ensures NFRs align with standards
450
+ - `/dev` - Agent follows patterns during implementation
451
+ - `/verify` - Checks PRD doesn't conflict with rules
452
+
453
+ ---
454
+
455
+ ## Complete Workflow Example
456
+
457
+ ### PM creates the story:
458
+ ```
459
+ > /create "Add email notifications" @{project-name}/backlog.md
460
+
461
+ Agent: Creating US-027... What problem does this solve?
462
+ PM: Users want summaries emailed instead of only viewing on web
463
+ Agent: Who will use this?
464
+ PM: All users, opt-in setting
465
+ Agent: [continues refinement...]
466
+
467
+ Agent: 📋 Running verification...
468
+ ✅ 10 checks passed, 1 medium-priority gap
469
+ AC3 needs error handling. Apply fix? (apply/manual/skip)
470
+ PM: apply
471
+
472
+ Agent: ✅ Fixed. Extracting features...
473
+ 5 features identified (3 Must, 1 Should, 1 Could)
474
+ 6 dev tasks generated
475
+
476
+ Agent: Ready to approve PRD? (approve/refine)
477
+ PM: approve
478
+
479
+ Agent: ✅ US-027 approved! Ready for: /dev US-027
480
+ ```
481
+
482
+ ### Dev builds it:
483
+ ```
484
+ > /dev US-027
485
+
486
+ Agent: Loading context...
487
+ PRD: Add email notifications
488
+ Tasks: 6 planned
489
+ RULES.md: React 19, TypeScript, Vitest
490
+
491
+ Branch: feature/US-027-email-notifications
492
+ Ready? (yes/review)
493
+ Dev: yes
494
+
495
+ Agent: Task 1/6: Create email template component
496
+ [proposes code...]
497
+ Dev: looks good
498
+
499
+ Agent: Implementing... Tests pass ✅
500
+ Progress: 1/6 tasks (17%)
501
+
502
+ [continues through all tasks...]
503
+
504
+ Agent: ✅ All tasks complete!
505
+ Tests: 47 passing
506
+ AC: 7/7 covered
507
+ PR #123 created
508
+
509
+ Ready for: /release US-027
510
+ ```
511
+
512
+ ### Team ships it:
513
+ ```
514
+ > /release US-027
515
+
516
+ Agent: 📦 Release Review
517
+ AC: All verified ✅
518
+ Tests: Passing ✅
519
+ PR: #123 approved
520
+
521
+ Ready to merge? (approve/hold)
522
+ PM: approve
523
+
524
+ Agent: Merging... Deploying...
525
+ ✅ Production live!
526
+
527
+ Updating CHANGELOG, PRD, backlog...
528
+
529
+ Agent: 🎉 US-027 released!
530
+ URL: https://your-app.example.com
531
+ ```
532
+
533
+ ---
534
+
535
+ ## Workflow Variations
536
+
537
+ ### Verify Existing PRD
538
+ ```
539
+ /verify US-025
540
+ ```
541
+ Runs verification on any PRD, shows gaps and fixes.
542
+
543
+ ### Resume Development
544
+ ```
545
+ /dev US-027
546
+ ```
547
+ Automatically detects previous progress and continues.
548
+
549
+ ### Quick Story (Skip Verification)
550
+ During `/create`, when verification shows:
551
+ ```
552
+ PM: skip
553
+ ```
554
+ PRD is marked `verified: skipped` and proceeds.
555
+
556
+ ### Refine After Approval
557
+ ```
558
+ /create US-027 --refine
559
+ ```
560
+ Re-enters refinement mode for an existing PRD.
561
+
562
+ ---
563
+
564
+ ## Personas & Responsibilities
565
+
566
+ ### Product Manager
567
+ - **Commands:** `/create`, `/verify`, `/release`
568
+ - **Responsibilities:**
569
+ - Define problems and requirements
570
+ - Approve verification results
571
+ - Final release approval
572
+ - **Focus:** product-docs repo
573
+
574
+ ### Developer
575
+ - **Commands:** `/dev`
576
+ - **Responsibilities:**
577
+ - Implement following RULES.md
578
+ - Write tests
579
+ - Create PR
580
+ - **Focus:** dev repo (product-docs read-only)
581
+
582
+ ### Team
583
+ - **Commands:** `/release`
584
+ - **Responsibilities:**
585
+ - Final approval
586
+ - Deployment verification
587
+ - Documentation
588
+
589
+ ---
590
+
591
+ ## Definitions
592
+
593
+ **Definition of Ready (DoR):**
594
+ - PRD verified (or explicitly skipped)
595
+ - Features extracted with priorities
596
+ - Dev tasks identified (≤8)
597
+ - Test strategy defined
598
+ - No open blockers
599
+ - PM approved
600
+
601
+ **Definition of Done (DoD):**
602
+ - All AC implemented and verified
603
+ - Tests pass (per RULES.md coverage)
604
+ - Code reviewed and PR approved
605
+ - Merged to main
606
+ - Deployed to production
607
+ - CHANGELOG updated
608
+ - PRD marked done with QA results
609
+ - Backlog updated
610
+
611
+ ---
612
+
613
+ ## Testing Strategy
614
+
615
+ Per RULES.md requirements:
616
+ - **Unit tests** — Logic and utilities
617
+ - **Integration tests** — API, services (mocked externals)
618
+ - **E2E tests** — Critical happy paths only
619
+ - **Manual tests** — AC verification checklist
620
+
621
+ Testing happens during `/dev` and is validated before PR.
622
+
623
+ ---
624
+
625
+ ## Tips & Best Practices
626
+
627
+ **For PMs:**
628
+ - Be specific in initial description (saves refinement)
629
+ - Don't skip verification for complex stories
630
+ - Use `/verify` before handoff to dev
631
+
632
+ **For Devs:**
633
+ - Read RULES.md before starting
634
+ - Ask questions early during kickoff
635
+ - Commit frequently, run tests after each task
636
+ - Use `pause` if you need to stop
637
+
638
+ **For Teams:**
639
+ - Branch naming: `feature/US-{ID}-slug`
640
+ - Commit messages: `US-{ID}: description`
641
+ - Update backlog promptly after release
642
+ - Celebrate wins! 🎉
643
+
644
+ ---
645
+
646
+ ## Troubleshooting
647
+
648
+ **Q: Verification found gaps but I want to proceed**
649
+ A: Say `skip` during verification. PRD is marked `verified: skipped`.
650
+
651
+ **Q: Need to pause during /dev**
652
+ A: Say `pause` or just stop. Resume with `/dev US-{ID}`.
653
+
654
+ **Q: PRD needs changes after approval**
655
+ A: Use `/create US-{ID} --refine` to update sections.
656
+
657
+ **Q: Tests keep failing**
658
+ A: Agent will help debug. Use `debug` command. Can also `skip-test` with TODO.
659
+
660
+ **Q: Can I skip phases?**
661
+ A: No. Each phase builds on previous. Move fast if requirements are simple.
662
+
663
+ ---
664
+
665
+ ## Industry Alignment
666
+
667
+ | Our Process | Maps To |
668
+ |-------------|---------|
669
+ | `/create` + `/verify` | **Dual-Track Agile** Discovery / **Shape Up** Shaping |
670
+ | `/dev` | **Dual-Track Agile** Delivery / **Shape Up** Building |
671
+ | `/release` | **Lean** Measure / **Shape Up** Shipping |
672
+
673
+ **Benefits:**
674
+ - Quality gates prevent ambiguous requirements
675
+ - Clear separation of concerns
676
+ - AI-native with slash commands
677
+ - Resumable and interruptible
678
+ - Full visibility via metadata
679
+
680
+ ---
681
+
682
+ ## Quick Reference
683
+
684
+ ```bash
685
+ # Start new feature
686
+ /create "description" @project/backlog.md
687
+
688
+ # Verify PRD quality (optional)
689
+ /verify US-027
690
+
691
+ # Build the feature
692
+ /dev US-027
693
+
694
+ # Ship it
695
+ /release US-027
696
+ ```
697
+
698
+ Four commands. Quality gates. Conversation-driven. Dashboard-ready.
699
+
700
+ ---
701
+
702
+ ## Version History
703
+
704
+ | Version | Date | Changes |
705
+ |---------|------|---------|
706
+ | 2.0 | 2026-02-03 | Slash commands, verification, RULES.md, dashboard metadata |
707
+ | 1.0 | 2025-12-01 | Initial process (story:create, story:dev, story:release) |