sdlc-workflow 1.0.10 → 1.0.11

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 (3) hide show
  1. package/README.md +4 -1
  2. package/bin/cli.js +80 -24
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -5,10 +5,11 @@ Scaffold SDLC workflow docs and templates into your project. Works with **Cursor
5
5
  ## Flow
6
6
 
7
7
  ```
8
- User Request → PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy (Docker Compose + K8s)
8
+ User Request → PO → Business BA → Architect → Technical BA → Design (if app/web, PO+BA review loop) → QE (docs) → Dev → QE (testing) → Deploy (Docker Compose + K8s)
9
9
  ```
10
10
 
11
11
  - **Trigger:** When you send an **idea** or **feature request**, the agent should run the **full pipeline** (PO → … → Deploy) in sequence, one sub-agent/role per phase — not handle everything in one go or stop after one phase. See `docs/sdlc/ORCHESTRATION.md`.
12
+ - **Design (optional):** For app/web projects, after Technical BA → invoke **Pencil.dev** (MCP) to design; **PO + Business BA review** until approved; then QE + Dev.
12
13
  - **Each role runs as a sub-agent** (see `docs/sdlc/agents/`).
13
14
  - **After completion** → deploy immediately with **Docker Compose** (local/staging) and **Kubernetes** (production) — `docs/sdlc/deploy/`.
14
15
  - **QE (docs)**: Test plan, test cases
@@ -57,6 +58,8 @@ docs/sdlc/
57
58
  ├── architecture/ # Architect
58
59
  │ ├── adr.template.md
59
60
  │ └── README.md
61
+ ├── design/ # Design (optional, app/web): Pencil.dev .pen; PO+BA review until approved
62
+ │ └── README.md
60
63
  ├── qe/ # QE (one folder per epic: qe/{epic-slug}/)
61
64
  │ ├── test-case.template.md
62
65
  │ ├── README.md
package/bin/cli.js CHANGED
@@ -163,6 +163,7 @@ async function generateFromInline(cwd) {
163
163
  join(base, "qe"),
164
164
  join(base, "qe", "qe-lead"),
165
165
  join(base, "qe", "senior-qe"),
166
+ join(base, "design"),
166
167
  join(base, "dev", "tech-lead"),
167
168
  join(base, "dev", "senior-developer"),
168
169
  join(base, "dev", "frontend"),
@@ -197,6 +198,7 @@ async function generateFromInline(cwd) {
197
198
  ["qe/README.md", QE_README],
198
199
  ["qe/qe-lead/README.md", QE_LEAD_README],
199
200
  ["qe/senior-qe/README.md", QE_SENIOR_README],
201
+ ["design/README.md", DESIGN_README],
200
202
  ["dev/tech-lead/README.md", DEV_TECH_LEAD_README],
201
203
  ["dev/senior-developer/README.md", DEV_SENIOR_README],
202
204
  ["dev/implementation-roles.template.md", DEV_IMPLEMENTATION_ROLES_TEMPLATE],
@@ -235,12 +237,13 @@ globs: docs/sdlc/**/*, **/*.md
235
237
  2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
236
238
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
237
239
  4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
238
- 5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
239
- 6. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + implementation roles by project (FE, Backend, Mobile, Embedded, Data/ML, Platform) → docs/sdlc/dev/{role}/
240
- 7. **QE (testing)** — QE Lead (15+ yrs automation: strategy, framework, review) + Senior QE (10+ yrs, automation) → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
241
- 8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
240
+ 5. **Design (if app/web)** — Pencil.dev designs → docs/sdlc/design/{epic-slug}/; **PO + BA review** → loop until approved
241
+ 6. **QE (docs)** Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
242
+ 7. **Dev** — After docs phase **run implementation immediately**. Tech Lead + implementation roles → docs/sdlc/dev/{role}/
243
+ 8. **QE (testing)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) → docs/sdlc/qe/{epic-slug}/
244
+ 9. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
242
245
 
243
- **Each role runs as a sub-agent.** See docs/sdlc/agents/
246
+ **Each role runs as a sub-agent.** Design uses Pencil.dev MCP. See docs/sdlc/agents/
244
247
  Full workflow: docs/sdlc/SDLC-WORKFLOW.md
245
248
  `;
246
249
 
@@ -258,7 +261,7 @@ Sequential workflow; **each role runs as a sub-agent**. Each phase produces docs
258
261
  **When the user sends an idea, feature request, or new requirement:**
259
262
  1. **Trigger the pipeline** and run it **continuously through deployment** (Phase 1 → 2 → … → 7).
260
263
  2. **One role per phase.** For each phase, act **only** as that role (e.g. only PO in phase 1, only Business BA in phase 2). Produce that phase's outputs into the correct folder, then **continue to the next phase** without waiting for the user.
261
- 3. **Run in order:** PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy. Do not stop after one phase unless the user explicitly asks to stop.
264
+ 3. **Run in order:** PO → Business BA → Architect → Technical BA → **Design (if app/web)** → QE (docs) → Dev → QE (testing) → Deploy. If Design: **PO + BA review** design; loop until approved before QE/Dev. Do not stop after one phase unless the user explicitly asks to stop.
262
265
 
263
266
  **Note:** In Cursor and similar tools there is a single agent per conversation. "Sub-agent" means **one role per phase** — the same agent must adopt exactly one role per phase and run phases in sequence (do not mix roles in one step). If the platform later supports spawning separate agents per phase, use that; otherwise this single agent simulates the pipeline by switching role each phase.
264
267
 
@@ -267,7 +270,7 @@ Sequential workflow; **each role runs as a sub-agent**. Each phase produces docs
267
270
  ## Flow Overview
268
271
 
269
272
  \`\`\`
270
- User Request → PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy (Docker Compose + K8s)
273
+ User Request → PO → Business BA → Architect → Technical BA → Design (if app/web, PO+BA review loop) → QE (docs) → Dev → QE (testing) → Deploy (Docker Compose + K8s)
271
274
  \`\`\`
272
275
 
273
276
  **Determine current phase** before acting. If user sent an idea, assume Phase 0 and start from Phase 1.
@@ -301,7 +304,20 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
301
304
 
302
305
  **Role**: Translate business + architecture into implementable specs.
303
306
  **Deliverables**: API specs, DB schema, team breakdown, acceptance criteria per ticket.
304
- **Output**: \`docs/sdlc/ba/technical/\` — **Handoff to QE + Dev.**
307
+ **Output**: \`docs/sdlc/ba/technical/\` — **Handoff to Design (if app/web) or QE + Dev.**
308
+
309
+ ## Phase 4b: Design (optional — app/web only)
310
+
311
+ **When:** Project has UI (web, mobile app). Skip for API-only, library, CLI, data/ML, platform without UI.
312
+
313
+ **Role**: Invoke **Pencil.dev** sub-agent (MCP) to create UI/UX designs from idea + PO + Business BA + Technical BA docs.
314
+ **Output**: \`docs/sdlc/design/{epic-slug}/\` — .pen designs.
315
+
316
+ **Review loop:**
317
+ 1. **PO review**: Design aligns with epic brief, user stories, acceptance criteria?
318
+ 2. **Business BA review**: Design matches functional requirements, process flows?
319
+ 3. **If not approved**: Capture feedback → redesign with Pencil.dev → repeat until PO and BA approve.
320
+ 4. **If approved** → **Handoff to QE + Dev.**
305
321
 
306
322
  ## Phase 5a: QE (Docs phase)
307
323
 
@@ -353,12 +369,13 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
353
369
  | 2 | Business BA | FRS, process flows |
354
370
  | 3 | Architect | ADRs, system diagrams |
355
371
  | 4 | Technical BA | API specs, tech breakdown |
372
+ | 4b | Design (if app/web) | Pencil.dev designs; PO+BA review until approved |
356
373
  | 5a | QE (docs) | Test plan, test cases |
357
374
  | 5b | Dev | Code, unit tests (≥90%) |
358
375
  | 6 | QE (testing) | QE Lead (15+ yrs automation) + Senior QE (10+ yrs), automation, sign-off |
359
376
  | 7 | Deploy | Docker Compose + K8s |
360
377
 
361
- **Sub-agents**: Each role = one sub-agent (PO, Business BA, Architect, Technical BA, QE Lead, Senior QE, Tech Lead, Senior Dev). See docs/sdlc/agents/
378
+ **Sub-agents**: Each role = one sub-agent. Design uses Pencil.dev MCP. See docs/sdlc/agents/
362
379
  See reference.md for templates.
363
380
  `;
364
381
 
@@ -366,8 +383,9 @@ const CURSOR_REFERENCE_MD = `# SDLC Workflow — Reference
366
383
 
367
384
  ## Folder structure: one per epic/feature (PO and Business BA)
368
385
 
369
- - **PO**: \`docs/sdlc/po/{epic-slug}/\` — one folder per epic (e.g. \`job-scheduler-event-bus\`). Files: epic-brief.md, user-stories.md. Do not put all epics in one file.
386
+ - **PO**: \`docs/sdlc/po/{epic-slug}/\` — one folder per epic. Files: epic-brief.md, user-stories.md. Do not put all epics in one file.
370
387
  - **Business BA**: \`docs/sdlc/ba/business/{epic-slug}/\` — same slug as PO. Files: functional-requirements.md, process-flows.md. Do not merge all epics into one file.
388
+ - **Design (if app/web)**: \`docs/sdlc/design/{epic-slug}/\` — same slug as PO/BA. Pencil.dev .pen designs; PO+BA review until approved.
371
389
  - **QE**: \`docs/sdlc/qe/{epic-slug}/\` — same slug as PO/BA. Files: test-plan.md, test-cases.md, automation artifacts. Do not put all epics in one file.
372
390
 
373
391
  ## PO: Epic Brief Template
@@ -383,6 +401,9 @@ FR-001: [Title] — Description, Trigger, Process Flow, Output, Constraints
383
401
  ## Technical BA: API Spec
384
402
  POST /api/v1/[resource] — Purpose, Request, Response, Contract
385
403
 
404
+ ## Design (if app/web)
405
+ Pencil.dev MCP — create .pen designs from idea + PO + BA + Technical BA. Output: docs/sdlc/design/{epic-slug}/. PO + BA review until approved; loop if not aligned.
406
+
386
407
  ## QE: Test Case
387
408
  TC-001: [Scenario] — Precondition, Steps, Expected, Links to AC
388
409
 
@@ -412,12 +433,13 @@ When working on requirements, features, or handoffs, follow these phases:
412
433
  2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
413
434
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
414
435
  4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
415
- 5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
416
- 6. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
417
- 7. **QE (testing)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
418
- 8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
436
+ 5. **Design (if app/web)** — Pencil.dev designs → docs/sdlc/design/{epic-slug}/; **PO + BA review** until approved; then QE + Dev
437
+ 6. **QE (docs)** Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
438
+ 7. **Dev** — After docs phase **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
439
+ 8. **QE (testing)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
440
+ 9. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
419
441
 
420
- After the docs phase, the Dev team runs implementation immediately. See docs/sdlc/agents/
442
+ Design: invoke Pencil.dev MCP; PO and BA review design; loop until approved. After the docs phase, the Dev team runs implementation immediately. See docs/sdlc/agents/
421
443
  `;
422
444
 
423
445
  const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
@@ -428,12 +450,13 @@ const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
428
450
  2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
429
451
  3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
430
452
  4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
431
- 5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
432
- 6. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
433
- 7. **QE (testing)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
434
- 8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
453
+ 5. **Design (if app/web)** — Pencil.dev designs → docs/sdlc/design/{epic-slug}/; **PO + BA review** until approved
454
+ 6. **QE (docs)** Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
455
+ 7. **Dev** — After docs phase **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
456
+ 8. **QE (testing)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
457
+ 9. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
435
458
 
436
- After the docs phase (Technical BA + QE docs), the Dev team runs implementation immediately. See docs/sdlc/agents/
459
+ Design: Pencil.dev MCP; PO and BA review; loop until approved. After the docs phase, Dev runs implementation immediately. See docs/sdlc/agents/
437
460
  `;
438
461
 
439
462
  const SDLC_WORKFLOW_MD = `# SDLC Workflow (Multi-Role)
@@ -450,7 +473,7 @@ For Cursor, see .cursor/rules/sdlc-workflow.mdc
450
473
  ## Flow
451
474
 
452
475
  \`\`\`
453
- User Request → PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy
476
+ User Request → PO → Business BA → Architect → Technical BA → Design (if app/web, PO+BA review loop) → QE (docs) → Dev → QE (testing) → Deploy
454
477
  \`\`\`
455
478
 
456
479
  ## Phase Checklist
@@ -462,6 +485,7 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
462
485
  | 2 | Business BA | FRS, process flows |
463
486
  | 3 | Architect | ADRs, system diagrams |
464
487
  | 4 | Technical BA | API specs, tech breakdown |
488
+ | 4b | Design (if app/web) | Pencil.dev designs; PO+BA review until approved |
465
489
  | 5a | QE (docs) | Test plan, test cases |
466
490
  | 5b | Dev | Code, unit tests (≥90%) |
467
491
  | 6 | QE (testing) | QE Lead (15+ yrs automation) + Senior QE (10+ yrs), automation, sign-off |
@@ -487,6 +511,12 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
487
511
  - API specs, DB schema, team breakdown
488
512
  - Output: \`docs/sdlc/ba/technical/\`
489
513
 
514
+ ### Phase 4b: Design (optional — app/web only)
515
+ - Invoke **Pencil.dev** (MCP) to design based on idea + PO + BA + Technical BA docs
516
+ - Output: \`docs/sdlc/design/{epic-slug}/\` — .pen designs
517
+ - **PO + Business BA review**: Both check design vs epic/FRS; if not aligned → feedback → redesign loop until approved
518
+ - When approved → handoff to QE + Dev
519
+
490
520
  ### Phase 5a: QE (Docs)
491
521
  - Test plan, test cases
492
522
  - Output: \`docs/sdlc/qe/{epic-slug}/\` — **one folder per epic**; do not put all epics in one file
@@ -529,6 +559,7 @@ There is **one agent** per conversation. It simulates the pipeline by **adopting
529
559
  - [ ] Phase 2 Business BA: \`docs/sdlc/ba/business/{epic-slug}/\` (one folder per epic)
530
560
  - [ ] Phase 3 Architect: \`docs/sdlc/architecture/\`
531
561
  - [ ] Phase 4 Technical BA: \`docs/sdlc/ba/technical/\`
562
+ - [ ] Phase 4b Design (if app/web): Pencil.dev designs in \`docs/sdlc/design/{epic-slug}/\`; PO+BA review until approved
532
563
  - [ ] Phase 5a QE docs: \`docs/sdlc/qe/{epic-slug}/\` (one folder per epic)
533
564
  - [ ] Phase 5b Dev: code + unit tests, \`docs/sdlc/dev/\`
534
565
  - [ ] Phase 6 QE testing: automation, sign-off → \`docs/sdlc/qe/{epic-slug}/\`
@@ -544,8 +575,9 @@ Deploy: docs/sdlc/deploy/ (Docker Compose + K8s)
544
575
 
545
576
  ## Folder structure: one per epic/feature
546
577
 
547
- - **PO**: \`docs/sdlc/po/{epic-slug}/\` — one folder per epic (e.g. \`job-scheduler-event-bus\`). Files inside: epic-brief.md, user-stories.md, etc. Do not put all epics in one file.
548
- - **Business BA**: \`docs/sdlc/ba/business/{epic-slug}/\` — same slug as PO. Files: functional-requirements.md, process-flows.md, etc. Do not merge all epics into one file.
578
+ - **PO**: \`docs/sdlc/po/{epic-slug}/\` — one folder per epic. Files: epic-brief.md, user-stories.md. Do not put all epics in one file.
579
+ - **Business BA**: \`docs/sdlc/ba/business/{epic-slug}/\` — same slug as PO. Files: functional-requirements.md, process-flows.md. Do not merge all epics into one file.
580
+ - **Design (if app/web)**: \`docs/sdlc/design/{epic-slug}/\` — Pencil.dev .pen designs; PO+BA review until approved.
549
581
  - **QE**: \`docs/sdlc/qe/{epic-slug}/\` — same slug as PO/BA. Files: test-plan.md, test-cases.md, automation. Do not put all epics in one file.
550
582
  `;
551
583
 
@@ -559,7 +591,8 @@ Every role in the SDLC runs as a **sub-agent**. Each phase is assigned to a corr
559
591
  | Business BA | business-ba | docs/sdlc/po/{epic-slug}/ | docs/sdlc/ba/business/{epic-slug}/ (one folder per epic) |
560
592
  | Architect | architect | docs/sdlc/ba/business/ | docs/sdlc/architecture/ |
561
593
  | Technical BA | technical-ba | docs/sdlc/architecture/ | docs/sdlc/ba/technical/ |
562
- | QE (docs) | qe-docs | docs/sdlc/ba/technical/ | docs/sdlc/qe/{epic-slug}/ (one folder per epic) |
594
+ | Design (if app/web) | pencil-dev | docs/sdlc/po + ba + technical | docs/sdlc/design/{epic-slug}/; PO+BA review until approved |
595
+ | QE (docs) | qe-docs | docs/sdlc/ba/technical/ (+ design if any) | docs/sdlc/qe/{epic-slug}/ (one folder per epic) |
563
596
  | Tech Lead | tech-lead | Technical spec | Review, merge, docs/sdlc/dev/tech-lead/ |
564
597
  | Senior Dev | senior-dev | Spec + test plan | After docs → run implementation immediately. Code, unit tests (≥90%) |
565
598
  | Senior Frontend | frontend | UI spec, API contract | Web UI, docs/sdlc/dev/frontend/ |
@@ -1010,6 +1043,29 @@ const QE_SENIOR_README = `# Senior QE (10+ years exp)
1010
1043
  - [ ] **Output**: Automation code and docs in \`qe/{epic-slug}/\`
1011
1044
  `;
1012
1045
 
1046
+ const DESIGN_README = `# Design (optional — app/web projects only)
1047
+
1048
+ **When:** After Technical BA, before QE and Dev. **Skip** for API-only, library, CLI, data/ML, platform projects without UI.
1049
+
1050
+ **One folder per epic:** \`docs/sdlc/design/{epic-slug}/\` — same slug as PO/BA. Store .pen files and design notes there.
1051
+
1052
+ ## Flow
1053
+
1054
+ 1. **Design sub-agent (Pencil.dev)**: Create UI/UX designs based on idea + PO docs + Business BA FRS + Technical BA spec. Use Pencil MCP tools (\`batch_design\`, \`get_guidelines\`, \`get_style_guide\`, etc.) to produce .pen designs.
1055
+ 2. **PO + Business BA review**: Both roles review the design against epic brief, user stories, functional requirements.
1056
+ 3. **Loop until approved**: If design does not match idea/docs → return to step 1 with feedback; redesign. Repeat until PO and BA approve.
1057
+ 4. **Handoff to QE + Dev**: Once approved → proceed to QE (docs) and Dev.
1058
+
1059
+ ## Detailed tasks
1060
+
1061
+ - [ ] **Invoke Pencil.dev**: Call design sub-agent (Pencil MCP) with PO epic, BA FRS, Technical BA spec as context
1062
+ - [ ] **Create designs**: Screens, flows, components in .pen format; output to \`design/{epic-slug}/\`
1063
+ - [ ] **PO review**: Check design aligns with epic brief, user stories, acceptance criteria
1064
+ - [ ] **Business BA review**: Check design matches functional requirements, process flows
1065
+ - [ ] **If not approved**: Capture feedback; loop back to design step with specific changes
1066
+ - [ ] **If approved**: Handoff to QE and Dev; design in \`design/{epic-slug}/\`
1067
+ `;
1068
+
1013
1069
  const DEV_TECH_LEAD_README = `# Tech Lead (15+ years exp)
1014
1070
 
1015
1071
  **Responsibilities**:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdlc-workflow",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Scaffold SDLC workflow docs and templates for Cursor, Claude, and dev teams",
5
5
  "type": "module",
6
6
  "bin": {