@nudata/nu-claude-pm 0.1.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,604 @@
1
+ ---
2
+ name: nu-pm-scaffold
3
+ description: Bootstrap a new project with the standard PM structure — product/ directory, placeholder docs, how-to extension files, and project-management-principles.md. Run from the project root.
4
+ ---
5
+
6
+ Bootstrap a new project with the standard project management structure.
7
+
8
+ Parse `$ARGUMENTS` for an optional project description (used to fill in placeholders). If not provided, use generic placeholder text.
9
+
10
+ ## What this creates
11
+
12
+ ```
13
+ product/
14
+ ├── vision.md # why + who (problem, customer, north star)
15
+ ├── roadmap.md # architecture + milestone plan (placeholder)
16
+ ├── milestones.md # progress tracker (placeholder)
17
+ ├── now.md # session pointer (placeholder)
18
+ ├── project-management-principles.md # canonical PM reference (copied from scaffold)
19
+ ├── design/ # PRDs live here (empty, ready to use)
20
+ ├── market-research/ # competitive analysis, user research (empty)
21
+ ├── research/ # pre-decision options analyses and deep dives (empty)
22
+ ├── operations/ # cluster runbooks, infra how-tos (empty)
23
+ ├── learnings/ # post-hoc reports, incident retrospectives (empty)
24
+ ├── reports/ # session reports live here (empty, ready to use)
25
+ └── how-to/
26
+ ├── nu-pm-continue.md # project-specific resume additions (template)
27
+ ├── nu-pm-halt.md # project-specific shutdown steps (template)
28
+ ├── nu-pm-update.md # project-specific update additions (template)
29
+ └── nu-pm-status.md # project-specific prerequisite checks (template)
30
+ ```
31
+
32
+ ## Steps
33
+
34
+ ### 1. Check for existing structure
35
+
36
+ If `product/` already exists, warn the user: "product/ already exists — scaffolding will add missing files but will not overwrite existing ones." Proceed file by file, skipping any that already exist.
37
+
38
+ ### 2. Create product/roadmap.md
39
+
40
+ ```markdown
41
+ # Roadmap
42
+
43
+ > Replace this placeholder with your project's architecture, vision, and milestone plan.
44
+ > See project-management-principles.md for guidance on what belongs here.
45
+
46
+ ## Purpose
47
+
48
+ This document captures the architecture decisions, component design, and phased delivery
49
+ plan. It is a **planning artifact**, not a task tracker.
50
+
51
+ ---
52
+
53
+ ## Context: Where We Are Now
54
+
55
+ <Describe the current state of the project — what exists, what works, what doesn't.>
56
+
57
+ ---
58
+
59
+ ## Vision
60
+
61
+ See `product/vision.md`.
62
+
63
+ ---
64
+
65
+ ## Architecture
66
+
67
+ <Diagram or description of the main components and how they fit together.>
68
+
69
+ ---
70
+
71
+ ## Delivery Phases
72
+
73
+ ### Milestone 1: <Name>
74
+ *Goal: <one sentence>*
75
+
76
+ Stories:
77
+ 1. <Story title>
78
+ 2. <Story title>
79
+
80
+ Exit criteria: <How do you know M1 is done?>
81
+
82
+ ---
83
+
84
+ ## Key Decisions Made
85
+
86
+ | Decision | Choice | Rationale |
87
+ |----------|--------|-----------|
88
+
89
+ ---
90
+
91
+ ## Open Questions
92
+
93
+ - <Question 1>
94
+ - <Question 2>
95
+ ```
96
+
97
+ ### 3. Create product/vision.md
98
+
99
+ ```markdown
100
+ # Vision
101
+
102
+ > The why behind this project — problem, customer, and north star.
103
+ > More stable than roadmap.md. Rarely changes once the product direction is set.
104
+ > Market research and competitive context lives in `product/market-research/`.
105
+
106
+ ---
107
+
108
+ ## Problem
109
+
110
+ <What pain are we solving? Who feels it and when?>
111
+
112
+ ---
113
+
114
+ ## Customer / Target user
115
+
116
+ <Who is this for? Be specific about the role, context, and workflow.>
117
+
118
+ ---
119
+
120
+ ## Market context
121
+
122
+ <Where does this sit in the landscape? What alternatives exist and why aren't they enough?>
123
+ See `product/market-research/` for supporting research.
124
+
125
+ ---
126
+
127
+ ## North star
128
+
129
+ <What does success look like in 2–3 years? What can a user do that they couldn't before?>
130
+
131
+ ---
132
+
133
+ ## Why now?
134
+
135
+ <What makes this the right time to build this?>
136
+
137
+ ---
138
+
139
+ ## What we are not
140
+
141
+ <Product-level anti-goals — not feature-scope cuts, but fundamental things this product will never try to be.>
142
+ ```
143
+
144
+ ### 5. Create product/milestones.md
145
+
146
+ ```markdown
147
+ # Milestones
148
+
149
+ Lightweight task tracker. Update status markers and checkboxes as work progresses.
150
+ Architecture context lives in `roadmap.md`.
151
+
152
+ ## Status Key
153
+
154
+ ```
155
+ ⏳ pending — not started
156
+ 🔄 in progress — actively being worked
157
+ ✅ done — exit criteria met
158
+ 🚫 blocked — waiting on something external
159
+ ```
160
+
161
+ Task checkboxes:
162
+ - `[ ]` not done
163
+ - `[x]` done
164
+ - `[~]` in progress
165
+ - `[-]` skipped / won't do
166
+
167
+ ---
168
+
169
+ ## M1 — <Milestone Name>
170
+ **Status**: ⏳ pending
171
+ **Goal**: <one sentence>
172
+
173
+ ### Tasks
174
+
175
+ - [ ] <Task 1>
176
+ - [ ] <Task 2>
177
+ - [ ] <Task 3>
178
+
179
+ **Exit criteria**: <How do you know this milestone is done?>
180
+
181
+ ---
182
+
183
+ ## Notes
184
+
185
+ - Milestones are sequential by dependency, not by calendar priority
186
+ - Each milestone must pass its exit criteria before the next begins
187
+ ```
188
+
189
+ ### 4. Create product/now.md
190
+
191
+ ```markdown
192
+ # Where We Are Now
193
+
194
+ > Read this first when resuming work. Update it whenever a milestone or major task changes.
195
+
196
+ ---
197
+
198
+ ## Current Focus
199
+
200
+ **Milestone**: M1 — <Milestone Name>
201
+ **Status**: ⏳ not started
202
+ **Next action**: <First task from milestones.md>
203
+
204
+ ---
205
+
206
+ ## What Was Just Done
207
+
208
+ - Project scaffolded — replace this with session notes after first work session
209
+
210
+ ---
211
+
212
+ ## What's Coming Next
213
+
214
+ 1. [ ] <Task 1>
215
+ 2. [ ] <Task 2>
216
+ 3. [ ] <Task 3>
217
+
218
+ ---
219
+
220
+ ## Key Files
221
+
222
+ | File | Purpose |
223
+ |------|---------|
224
+ | `product/milestones.md` | Task checklist for all milestones |
225
+ | `product/roadmap.md` | Architecture and vision — stable reference |
226
+ | `product/now.md` | This file — current focus and resume context |
227
+
228
+ ---
229
+
230
+ ## How to Resume After a Break
231
+
232
+ 1. Read this file
233
+ 2. Check `milestones.md` for the first unchecked task in the active milestone
234
+ 3. Run `/nu-pm-continue` for a full context brief
235
+
236
+ ---
237
+
238
+ ## Recent Commits
239
+
240
+ ```
241
+ <git log --oneline -5 will appear here after first commits>
242
+ ```
243
+ ```
244
+
245
+ ### 6. Create product/how-to/nu-pm-continue.md
246
+
247
+ ```markdown
248
+ # Project-specific nu-pm-continue additions
249
+
250
+ > Fill in any project-specific context sources that /nu-pm-continue should gather.
251
+ > Examples: a CURRENT_STATE.md file, a cluster status check, an infra state API call.
252
+ > Delete this file if there are no project-specific additions needed.
253
+
254
+ ## Additional context to gather
255
+
256
+ TODO: list any project-specific files or commands to read during resume.
257
+
258
+ ## Additional fields in resume brief
259
+
260
+ TODO: list any fields to add to the resume brief output (e.g. infrastructure state).
261
+ ```
262
+
263
+ ### 7. Create product/how-to/nu-pm-halt.md
264
+
265
+ ```markdown
266
+ # Project-specific halt steps
267
+
268
+ > These steps run AFTER the generic nu-pm-halt steps (docs updated, committed, pushed).
269
+ > Add any project-specific teardown here — infrastructure hibernation, service shutdown, etc.
270
+ > Delete this file if there are no project-specific shutdown steps.
271
+
272
+ ## TODO: Add project-specific shutdown steps
273
+
274
+ Examples of what goes here:
275
+ - Scale down cloud infrastructure (Kubernetes nodes, VMs, etc.)
276
+ - Stop background processes
277
+ - Update an external status page
278
+ - Send a session-end notification
279
+
280
+ Replace this with your actual shutdown steps and remove this comment.
281
+ ```
282
+
283
+ ### 8. Create product/how-to/nu-pm-update.md
284
+
285
+ ```markdown
286
+ # Project-specific nu-pm-update additions
287
+
288
+ > These additions run during /nu-pm-update state-gathering, before writing the report.
289
+ > Add any project-specific state to capture in mid-session snapshots.
290
+ > Delete this file if there are no project-specific additions needed.
291
+
292
+ ## Additional state to gather
293
+
294
+ TODO: list any project-specific state to include in update snapshots.
295
+
296
+ ## Additional fields in the report snapshot
297
+
298
+ TODO: describe any extra fields to add to the "In progress" section.
299
+ ```
300
+
301
+ ### 9. Create product/how-to/nu-pm-status.md
302
+
303
+ ```markdown
304
+ # Project-specific nu-pm-status additions
305
+
306
+ > These additions run during /nu-pm-status prerequisite checking.
307
+ > Add any project-specific infrastructure checks needed before starting the next task.
308
+ > Delete this file if there are no project-specific prerequisite checks.
309
+
310
+ ## Additional context to gather
311
+
312
+ TODO: list any project-specific state files or commands to check.
313
+
314
+ ## Infrastructure prerequisite check
315
+
316
+ TODO: describe what "infrastructure ready" means for this project and how to check it.
317
+ ```
318
+
319
+ ### 10. Create product/project-management-principles.md
320
+
321
+ Write the following content exactly as the file:
322
+
323
+ ---
324
+
325
+ # Project Management Principles
326
+
327
+ This document explains how we work on this project: what our documents are, what our skills do, and how they fit together. Read this before your first session.
328
+
329
+ For the full command reference — what every `nu-pm-*` command does, when to run it, and how they fit together — run **`/nu-pm-user-guide`**.
330
+
331
+ ---
332
+
333
+ ## The Guiding Principle
334
+
335
+ **Each question has exactly one document to answer it. Reference, don't duplicate.**
336
+
337
+ The moment the same content lives in two places, they drift. When documents drift, sessions start with confusion instead of clarity. We keep the document count small and the responsibility of each document strict.
338
+
339
+ ---
340
+
341
+ ## The Document Stack
342
+
343
+ ```
344
+ product/vision.md ← why + who (problem, customer, north star)
345
+ product/roadmap.md ← what + how (architecture, milestones, key decisions)
346
+ product/milestones.md ← progress tracker (story checkboxes, milestone status)
347
+ product/now.md ← session pointer (what I'm doing right now)
348
+ product/design/*.md ← design authority (story detail for milestones that need it)
349
+ product/market-research/ ← competitive analysis, user research (feeds vision.md)
350
+ product/research/ ← pre-decision options analyses and deep dives
351
+ product/operations/ ← cluster runbooks, infra how-tos
352
+ product/learnings/ ← post-hoc reports, incident retrospectives
353
+ product/reports/ ← session history (timestamped logs of what happened)
354
+ product/how-to/ ← project-specific skill extensions (infrastructure, etc.)
355
+ ```
356
+
357
+ ### `product/vision.md` — The Product Vision
358
+
359
+ The why. Read it to understand the problem, the customer, and the north star. It contains:
360
+ - Problem statement and who feels it
361
+ - Target customer / user profile
362
+ - Market context (references `market-research/` for depth)
363
+ - North star — what success looks like in 2–3 years
364
+ - Why now
365
+ - What this product is not (product-level anti-goals)
366
+
367
+ **More stable than roadmap.md.** Update it when product direction changes, not when milestones shift.
368
+
369
+ ### `product/roadmap.md` — The Architecture Document
370
+
371
+ The technical delivery plan. Read it to understand how we're building it. It contains:
372
+ - Architecture stack and component design
373
+ - All milestones in sequence, with their goals and exit criteria
374
+ - Key decisions already made (and the rationale behind them)
375
+ - Open questions with proposed resolutions
376
+
377
+ **Do not edit roadmap.md unless architecture changes.** It is not a task tracker.
378
+
379
+ ### `product/milestones.md` — The Progress Tracker
380
+
381
+ The live checklist. Read it to understand where we are across all milestones. It contains:
382
+ - One section per milestone with status (`⏳ pending`, `🔄 in progress`, `✅ done`, `🚫 blocked`)
383
+ - Story-level checkboxes: `[ ]` not done, `[x]` done, `[~]` in progress, `[-]` skipped
384
+ - For milestones with a PRD: a `Design:` reference to the design doc
385
+ - Exit criteria per milestone
386
+
387
+ **The milestone section owns the completion state of stories. The PRD owns the content of stories.**
388
+
389
+ **Milestone status markers:**
390
+ ```
391
+ ⏳ pending — not started
392
+ 🔄 in progress — actively being worked
393
+ ✅ done — exit criteria met
394
+ 🚫 blocked — waiting on something external
395
+ ```
396
+
397
+ ### `product/now.md` — The Session Pointer
398
+
399
+ The first thing you read when resuming. It tells you exactly where you are and where to go next. It contains:
400
+ - Current milestone + status
401
+ - Design doc reference + current story (if the milestone has a PRD)
402
+ - What was just done (last session's output, 3–5 bullets)
403
+ - Current infra state (if project has infrastructure)
404
+ - What's coming next (ordered task list, first unchecked item is the target)
405
+ - Key files you'll need
406
+ - Recent commits
407
+
408
+ **The skills keep `now.md` current.** You should rarely need to edit it by hand.
409
+
410
+ ### `product/design/` — Design Documents (PRDs)
411
+
412
+ Not every milestone needs a PRD. Simple milestones track tasks directly in `milestones.md`. Milestones that involve software design — new endpoints, schemas, conventions — get a PRD.
413
+
414
+ A PRD is the **single source of truth for story content**: scope, files, decisions, and validation. The `milestones.md` entry for a story is a one-line checkbox + title; the PRD has the full detail.
415
+
416
+ **PRD naming convention**: `product/design/M{N}-PRD.md`
417
+
418
+ A PRD contains:
419
+ 1. Overview (goal, non-goals, exit criteria)
420
+ 2. Architecture (stack diagram, component table)
421
+ 3. Directory layout after the milestone completes
422
+ 4. Schema or API specs (locked decisions)
423
+ 5. Story breakdown (one section per story: scope, files, decisions, validation)
424
+ 6. What does NOT change (scope guard)
425
+ 7. Open questions (with proposals and decision points)
426
+ 8. Files touched (change table)
427
+ 9. Story dependency graph
428
+ 10. Decision Log (append-only table of significant direction changes — see Conventions)
429
+
430
+ ### `product/reports/` — Session History
431
+
432
+ One file per day: `product/reports/YYYY-MM-DD.md`. Append-only. Written by `/nu-pm-update` (mid-session) and `/nu-pm-halt` (session end). Historical record only — not a planning document.
433
+
434
+ ### `product/how-to/` — Skill Extension Files
435
+
436
+ Project-specific additions to the generic global skills. Each file extends one skill:
437
+
438
+ | File | Extends |
439
+ |------|---------|
440
+ | `how-to/nu-pm-continue.md` | `/nu-pm-continue` — extra context sources, extra resume brief fields |
441
+ | `how-to/nu-pm-halt.md` | `/nu-pm-halt` — infrastructure shutdown, teardown steps |
442
+ | `how-to/nu-pm-update.md` | `/nu-pm-update` — extra state to capture in snapshots |
443
+ | `how-to/nu-pm-status.md` | `/nu-pm-status` — infrastructure prerequisites, extra context |
444
+
445
+ **How-to files contain only the project-specific additions.** The generic steps live in the global skills. If there's nothing project-specific to add, the file can be deleted.
446
+
447
+ ---
448
+
449
+ ## The Skills
450
+
451
+ Skills are Claude Code slash commands. Global skills live in `~/.claude/commands/` and work in any project. Invoke them with `/skill-name [arguments]`.
452
+
453
+ ### Session Skills (global)
454
+
455
+ #### `/nu-pm-continue [dir]`
456
+ **When**: Start of every session.
457
+
458
+ Reads `now.md`, `milestones.md`, `roadmap.md`, the latest session report, and `how-to/nu-pm-continue.md` (if present). Outputs a resume brief with active story context from the PRD if applicable.
459
+
460
+ #### `/nu-pm-status [dir]`
461
+ **When**: After finishing a task, to orient to the next one.
462
+
463
+ Shorter than `/nu-pm-continue`. Finds the active task, checks prerequisites (including project-specific infra state from `how-to/nu-pm-status.md`), and gives the concrete first action.
464
+
465
+ #### `/nu-pm-update [dir]`
466
+ **When**: Mid-session checkpoint — after a significant task, before stepping away.
467
+
468
+ Appends a timestamped snapshot to today's session report. Does **not** commit. Incorporates project-specific state from `how-to/nu-pm-update.md` if present.
469
+
470
+ #### `/nu-pm-halt [dir]`
471
+ **When**: End of every session.
472
+
473
+ The full shutdown sequence: updates milestones + now.md, writes session report, commits and pushes, then executes `how-to/nu-pm-halt.md` for project-specific teardown (infrastructure hibernation, etc.).
474
+
475
+ **Always end sessions with `/nu-pm-halt`**, not manual commits.
476
+
477
+ #### `/nu-pm-scaffold [description]`
478
+ **When**: Starting a new project.
479
+
480
+ Creates the full `product/` structure with placeholder docs, `how-to/` templates, and this principles document. Run from the project root.
481
+
482
+ ---
483
+
484
+ ## How a Typical Session Flows
485
+
486
+ ```
487
+ Start session
488
+ → /nu-pm-continue
489
+ → (project-specific) wake infrastructure if needed
490
+
491
+ Do the work
492
+ → edit files, run commands, iterate
493
+ → /nu-pm-update (optional mid-session checkpoint)
494
+
495
+ End session
496
+ → /nu-pm-halt (updates docs, commits, runs project-specific teardown)
497
+ ```
498
+
499
+ ---
500
+
501
+ ## How Milestones and PRDs Work Together
502
+
503
+ For milestones with a PRD, the three documents divide responsibility cleanly:
504
+
505
+ **`milestones.md`** tracks completion:
506
+ ```markdown
507
+ ## M1 — Walking Skeleton
508
+ **Status**: 🔄 in progress
509
+ **Design**: `product/design/M1-PRD.md`
510
+
511
+ - [x] Story 1 — Profile extraction
512
+ - [ ] Story 2 — Hand-author Helmfile
513
+ ```
514
+
515
+ **`now.md`** points to the current story:
516
+ ```markdown
517
+ **Design doc**: product/design/M1-PRD.md
518
+ **Current story**: Story 2 — Hand-author Helmfile
519
+ ```
520
+
521
+ **`product/design/M1-PRD.md`** has the full story detail — files, decisions, validation.
522
+
523
+ Nothing is duplicated. Each document answers exactly one question.
524
+
525
+ ---
526
+
527
+ ## What Goes Where — Quick Reference
528
+
529
+ | Question | Document |
530
+ |----------|----------|
531
+ | Why are we building this? Who is it for? | `vision.md` |
532
+ | What are we building and how? | `roadmap.md` |
533
+ | Which milestone am I in? | `milestones.md` |
534
+ | Which stories are done? | `milestones.md` |
535
+ | What am I doing right now? | `now.md` |
536
+ | What exactly does Story N require? | `product/design/M{N}-PRD.md` |
537
+ | What happened last Tuesday? | `product/reports/YYYY-MM-DD.md` |
538
+ | How do I shut down after a session? | `/nu-pm-halt` (reads `how-to/nu-pm-halt.md`) |
539
+
540
+ ---
541
+
542
+ ## Conventions
543
+
544
+ **Commits** — written by `/nu-pm-halt` in this format:
545
+ ```
546
+ session: <one-line summary>
547
+
548
+ - bullet 1
549
+ - bullet 2
550
+ ```
551
+ No WIP commits. Sessions end cleanly with `/nu-pm-halt`.
552
+
553
+ **Story naming** — titles in PRDs match checkboxes in `milestones.md`. Rename in sync.
554
+
555
+ **PRDs are design records, not task lists** — don't add checkboxes to PRDs. Progress lives in `milestones.md`. If a design decision changes, update the PRD in place with the new decision and rationale.
556
+
557
+ **Open questions get resolved, not deleted** — the question + answer pair is more useful than either alone.
558
+
559
+ **Decision Log at the bottom of every PRD** — when a significant design decision changes (an API shape, a storage strategy, a scope cut), append a row to the Decision Log table rather than silently rewriting the doc. This answers "why did we end up here?" without requiring the reader to dig through git history. The format:
560
+
561
+ ```markdown
562
+ ## Decision Log
563
+
564
+ | Date | Decision | Rationale | Changed from |
565
+ |------|----------|-----------|--------------|
566
+ | YYYY-MM-DD | <what was decided> | <why> | <what it replaced, or "new decision"> |
567
+ ```
568
+
569
+ Log significant direction changes, contested calls, and anything a future reader would wonder about. Do NOT log every small edit — those belong to git. The question + answer pairs in "Open questions" feed naturally into the Decision Log once resolved.
570
+
571
+ **Not every milestone needs a PRD** — if the work is straightforward operational tasks (infrastructure changes, benchmarking), track it directly in `milestones.md`. Create a PRD only when there are real design decisions to document.
572
+
573
+ **How-to files contain only additions** — never duplicate the generic skill steps. If a how-to file would be empty, delete it.
574
+
575
+ ---
576
+
577
+ *This document is the canonical copy distributed by `/nu-pm-scaffold`. To update the principles for all future projects, update the scaffold skill at `~/.claude/commands/nu-pm-scaffold.md`.*
578
+
579
+ ---
580
+
581
+ ### 11. Create empty placeholder files for design/, market-research/, research/, operations/, learnings/, and reports/
582
+
583
+ Create `.gitkeep` files in all six directories:
584
+ - `product/design/.gitkeep`
585
+ - `product/market-research/.gitkeep`
586
+ - `product/research/.gitkeep`
587
+ - `product/research/spikes/.gitkeep`
588
+ - `product/operations/.gitkeep`
589
+ - `product/learnings/.gitkeep`
590
+ - `product/reports/.gitkeep`
591
+
592
+ ### 12. Report back
593
+
594
+ List every file created (or skipped because it already existed). Then say:
595
+
596
+ ```
597
+ Project scaffolded. Next steps:
598
+ 1. Edit product/vision.md — fill in problem, customer, north star
599
+ 2. Edit product/roadmap.md — fill in your architecture and milestone plan
600
+ 3. Edit product/milestones.md — replace placeholder tasks with real ones
601
+ 4. Edit product/now.md — set your first milestone and next action
602
+ 5. Edit product/how-to/nu-pm-halt.md — add your project's shutdown steps (or delete if none)
603
+ 6. Run /nu-pm-continue when you're ready to start working
604
+ ```