sdlc-workflow 1.0.9 → 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 +214 -45
  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/ |
@@ -703,16 +736,16 @@ const PO_README = `# PO (Product Owner)
703
736
  - Folder name = epic/feature slug (e.g. \`job-scheduler-event-bus\`, \`user-auth\`).
704
737
  - Inside that folder: \`epic-brief.md\`, \`user-stories.md\`, \`prd.md\` (or similar) for that epic only.
705
738
 
706
- Example:
707
- \`\`\`
708
- docs/sdlc/po/
709
- job-scheduler-event-bus/
710
- epic-brief.md
711
- user-stories.md
712
- user-auth/
713
- epic-brief.md
714
- user-stories.md
715
- \`\`\`
739
+ ## Detailed tasks
740
+
741
+ - [ ] **Clarify vision**: Capture business problem, goals, success metrics
742
+ - [ ] **Define scope**: Boundaries, in/out of scope, MVP vs later
743
+ - [ ] **Write epic brief**: Problem, success metrics, high-level approach, project type
744
+ - [ ] **Break into user stories**: As a [role], I want [goal] so that [benefit]; acceptance criteria per story
745
+ - [ ] **Prioritize**: Must / Should / Could have; order by value and risk
746
+ - [ ] **Identify dependencies**: External teams, systems, blockers
747
+ - [ ] **Call out risks**: Technical, schedule, compliance
748
+ - [ ] **Handoff to Business BA**: Deliverables in \`po/{epic-slug}/\`
716
749
 
717
750
  Use epic-brief.template.md as starting point for each epic.
718
751
  `;
@@ -755,7 +788,17 @@ docs/sdlc/ba/business/
755
788
  functional-requirements.md
756
789
  \`\`\`
757
790
 
758
- Use functional-requirement.template.md for FRS items. One file per epic, or one folder per epic with multiple files.
791
+ ## Detailed tasks
792
+
793
+ - [ ] **Read PO outputs**: Epic brief, user stories, acceptance criteria
794
+ - [ ] **Define functional requirements**: For each requirement: type, description, trigger, process flow, output, constraints (use FR-001, FR-002...)
795
+ - [ ] **Document process flows**: Step-by-step business flows (e.g. BPMN, flowcharts, numbered lists)
796
+ - [ ] **Write use cases**: Actor, goal, preconditions, main/alternate flows, postconditions
797
+ - [ ] **Maintain glossary**: Business terms, definitions, acronyms
798
+ - [ ] **Map to user stories**: Trace FRs to user stories / AC
799
+ - [ ] **Handoff to Architect**: Deliverables in \`ba/business/{epic-slug}/\`
800
+
801
+ Use functional-requirement.template.md for FRS items.
759
802
  `;
760
803
 
761
804
  const TECH_API_TEMPLATE = `# Interface / contract spec
@@ -856,6 +899,15 @@ const BA_TECH_README = `# Technical BA
856
899
 
857
900
  API/interface specs, DB schema, team breakdown.
858
901
  Templates support: HTTP API, library/SDK, CLI, and all project types (see api-spec and team-breakdown).
902
+
903
+ ## Detailed tasks
904
+
905
+ - [ ] **Read Architect outputs**: ADRs, context/container diagrams, tech stack
906
+ - [ ] **API/interface spec**: For each endpoint/class/command: purpose, request/response, contract (OpenAPI, TS types, CLI help)
907
+ - [ ] **DB schema**: Tables, columns, indexes, constraints; migrations approach
908
+ - [ ] **Team breakdown**: Map scope to teams (Backend, Frontend, Mobile, etc.) per project type; dependencies
909
+ - [ ] **Trace to FRs**: Map technical specs to functional requirements
910
+ - [ ] **Handoff to QE + Dev**: API spec, team breakdown in \`ba/technical/\`
859
911
  `;
860
912
 
861
913
  const ARCH_ADR_TEMPLATE = `# ADR-001: [Decision Title]
@@ -877,10 +929,20 @@ const ARCH_ADR_TEMPLATE = `# ADR-001: [Decision Title]
877
929
  - Negative: ...
878
930
  `;
879
931
 
880
- const ARCH_README = `# Architecture
932
+ const ARCH_README = `# Architect
881
933
 
882
934
  ADRs, system diagrams, tech stack decisions.
883
935
  Use adr.template.md for new ADRs.
936
+
937
+ ## Detailed tasks
938
+
939
+ - [ ] **Read Business BA outputs**: Functional requirements, process flows, use cases
940
+ - [ ] **Context diagram**: System boundary, external actors, integrations
941
+ - [ ] **Container diagram**: Main components/services and their responsibilities
942
+ - [ ] **Tech stack decisions**: Languages, frameworks, databases; document in ADRs
943
+ - [ ] **ADR per decision**: Context, decision, consequences (scope: backend, frontend, mobile, etc.)
944
+ - [ ] **Non-functional alignment**: Performance, security, scalability, compliance
945
+ - [ ] **Handoff to Technical BA**: Architecture docs, ADRs in \`architecture/\`
884
946
  `;
885
947
 
886
948
  const QE_TC_TEMPLATE = `## TC-001: [Scenario]
@@ -909,6 +971,19 @@ const QE_README = `# QE (Quality Engineering)
909
971
  - Use the same epic/feature slug as PO and Business BA: \`docs/sdlc/qe/{epic-slug}/\`
910
972
  - Inside that folder: \`test-plan.md\`, \`test-cases.md\` (Phase 5a), and for Phase 6: automation notes, framework decision for that epic, etc.
911
973
 
974
+ ## Detailed tasks (Docs phase — Phase 5a)
975
+
976
+ - [ ] **Read Technical BA spec**: API, team breakdown, FRs
977
+ - [ ] **Test plan**: Scope (unit, integration, E2E), coverage goals, risks
978
+ - [ ] **Test cases**: TC-001, TC-002... — precondition, steps, expected, links to AC
979
+ - [ ] **Handoff to Dev**: Test plan + test cases in \`qe/{epic-slug}/\` → Dev runs implementation
980
+
981
+ ## Detailed tasks (Testing phase — Phase 6)
982
+
983
+ - [ ] **QE Lead**: Test strategy, framework, review test code
984
+ - [ ] **Senior QE**: Write automation tests per test plan
985
+ - [ ] **Sign-off**: Regression, coverage, release readiness in \`qe/{epic-slug}/\`
986
+
912
987
  Example:
913
988
  \`\`\`
914
989
  docs/sdlc/qe/
@@ -940,6 +1015,15 @@ const QE_LEAD_README = `# QE Lead (15+ years exp in test automation)
940
1015
  - **Quality gates**: Define and enforce gates (e.g. coverage thresholds, required suites before merge, regression criteria).
941
1016
 
942
1017
  **Output**: Test framework ADR, automation strategy doc, review checklist, and per-epic guidance in \`docs/sdlc/qe/{epic-slug}/\`.
1018
+
1019
+ ## Detailed tasks
1020
+
1021
+ - [ ] **Test automation strategy**: Document scope (unit/integration/E2E/API/performance), pyramid, alignment with tech stack
1022
+ - [ ] **Framework ADR**: Choose and justify frameworks (Playwright, Cypress, Jest, etc.); document in ADR
1023
+ - [ ] **Automation architecture**: Design folder structure, layers, fixtures, reporting, retries, env handling
1024
+ - [ ] **Review checklist**: Coverage, maintainability, naming, alignment with framework
1025
+ - [ ] **Quality gates**: Define thresholds (coverage, required suites before merge), regression criteria
1026
+ - [ ] **Per-epic guidance**: Output to \`qe/{epic-slug}/\` per epic
943
1027
  `;
944
1028
 
945
1029
  const QE_SENIOR_README = `# Senior QE (10+ years exp)
@@ -949,7 +1033,37 @@ const QE_SENIOR_README = `# Senior QE (10+ years exp)
949
1033
  - Implement E2E, integration, regression tests
950
1034
  - Follow QE Lead's framework decisions
951
1035
 
952
- **Docs**: Automation test design, framework usage.
1036
+ ## Detailed tasks
1037
+
1038
+ - [ ] **Read test plan**: Scope, coverage goals, test case IDs
1039
+ - [ ] **Implement E2E tests**: UI flows, critical paths per QE Lead's framework
1040
+ - [ ] **Implement API/integration tests**: Request/response, contracts
1041
+ - [ ] **Implement regression suite**: Add to CI; ensure stability (retries, waits)
1042
+ - [ ] **Report coverage**: Align with QE Lead's quality gates
1043
+ - [ ] **Output**: Automation code and docs in \`qe/{epic-slug}/\`
1044
+ `;
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}/\`
953
1067
  `;
954
1068
 
955
1069
  const DEV_TECH_LEAD_README = `# Tech Lead (15+ years exp)
@@ -959,7 +1073,15 @@ const DEV_TECH_LEAD_README = `# Tech Lead (15+ years exp)
959
1073
  - Review and merge code
960
1074
  - Ensure architecture alignment
961
1075
 
962
- **Docs**: ADRs, tech decisions, review checklist.
1076
+ ## Detailed tasks
1077
+
1078
+ - [ ] **Read architecture and Technical BA spec**: ADRs, API spec, team breakdown
1079
+ - [ ] **Tech stack decision**: Languages, frameworks, libraries; document in ADR
1080
+ - [ ] **Project setup**: Repo structure, tooling, lint, format, CI baseline
1081
+ - [ ] **Code review**: Architecture alignment, patterns, test coverage, security
1082
+ - [ ] **Merge approval**: Enforce quality gates before merge
1083
+ - [ ] **Tech guidance**: Resolve technical disputes; mentor team
1084
+ - [ ] **Output**: ADRs, review checklist in \`dev/tech-lead/\`
963
1085
  `;
964
1086
 
965
1087
  const DEV_SENIOR_README = `# Senior Developer (10+ years exp)
@@ -969,7 +1091,13 @@ const DEV_SENIOR_README = `# Senior Developer (10+ years exp)
969
1091
  - Write code with Unit Test coverage **≥ 90%**
970
1092
  - Follow Tech Lead's tech decisions
971
1093
 
972
- **Docs**: Implementation notes, API usage.
1094
+ ## Detailed tasks
1095
+
1096
+ - [ ] **Read Technical BA spec**: API, schema, team breakdown
1097
+ - [ ] **Implement feature**: Code per spec; follow Tech Lead stack
1098
+ - [ ] **Unit tests**: Coverage **≥ 90%**; edge cases, error paths
1099
+ - [ ] **PR**: Lint, tests passing; request Tech Lead review
1100
+ - [ ] **Output**: Code + implementation notes in \`dev/senior-developer/\`
973
1101
  `;
974
1102
 
975
1103
  const DEV_IMPLEMENTATION_ROLES_TEMPLATE = `# Implementation roles by project type
@@ -1009,7 +1137,14 @@ const DEV_FRONTEND_README = `# Senior Frontend (10+ years exp) — Web UI
1009
1137
  - Unit Test coverage **≥ 90%**
1010
1138
  - Follow Tech Lead's stack (e.g. React, Vue, Angular)
1011
1139
 
1012
- **Docs**: Component docs, integration notes.
1140
+ ## Detailed tasks
1141
+
1142
+ - [ ] **Read Technical BA spec**: API contract, design (if any)
1143
+ - [ ] **Implement components/screens**: Per spec; responsive, accessible
1144
+ - [ ] **API integration**: Fetch, state, error handling
1145
+ - [ ] **Unit tests**: Components, hooks, utils — coverage **≥ 90%**
1146
+ - [ ] **PR**: Lint, tests; Tech Lead review
1147
+ - [ ] **Output**: Code + component/integration docs in \`dev/frontend/\`
1013
1148
  `;
1014
1149
 
1015
1150
  const DEV_BACKEND_README = `# Senior Backend (10+ years exp) — API, services
@@ -1019,7 +1154,14 @@ const DEV_BACKEND_README = `# Senior Backend (10+ years exp) — API, services
1019
1154
  - Unit Test coverage **≥ 90%**
1020
1155
  - Follow Tech Lead's stack
1021
1156
 
1022
- **Docs**: API implementation notes, DB changes.
1157
+ ## Detailed tasks
1158
+
1159
+ - [ ] **Read Technical BA spec**: API spec, DB schema
1160
+ - [ ] **Implement endpoints**: Per spec; validation, auth, error responses
1161
+ - [ ] **Implement DB layer**: Migrations, queries, transactions
1162
+ - [ ] **Unit tests**: Services, controllers, DB — coverage **≥ 90%**
1163
+ - [ ] **PR**: Lint, tests; Tech Lead review
1164
+ - [ ] **Output**: Code + API/DB implementation notes in \`dev/backend/\`
1023
1165
  `;
1024
1166
 
1025
1167
  const DEV_MOBILE_README = `# Senior Mobile (10+ years exp) — iOS / Android / cross-platform
@@ -1029,7 +1171,14 @@ const DEV_MOBILE_README = `# Senior Mobile (10+ years exp) — iOS / Android / c
1029
1171
  - Unit Test coverage **≥ 90%**
1030
1172
  - Follow Tech Lead's stack (e.g. React Native, Flutter, native)
1031
1173
 
1032
- **Docs**: Screen/module docs, integration notes.
1174
+ ## Detailed tasks
1175
+
1176
+ - [ ] **Read Technical BA spec**: API contract, screen flows
1177
+ - [ ] **Implement screens/modules**: Per spec; platform parity (iOS/Android)
1178
+ - [ ] **API integration**: Auth, state, offline (if required)
1179
+ - [ ] **Unit tests**: Components, logic — coverage **≥ 90%**
1180
+ - [ ] **PR**: Lint, tests; Tech Lead review
1181
+ - [ ] **Output**: Code + screen/module docs in \`dev/mobile/\`
1033
1182
  `;
1034
1183
 
1035
1184
  const DEV_EMBEDDED_README = `# Senior Embedded (10+ years exp) — firmware, IoT
@@ -1039,7 +1188,13 @@ const DEV_EMBEDDED_README = `# Senior Embedded (10+ years exp) — firmware, IoT
1039
1188
  - Tests as appropriate for target (unit, HW-in-loop)
1040
1189
  - Follow Tech Lead's stack and safety constraints
1041
1190
 
1042
- **Docs**: Module design, interface specs.
1191
+ ## Detailed tasks
1192
+
1193
+ - [ ] **Read Technical BA spec**: Interfaces, timing, constraints
1194
+ - [ ] **Implement modules/drivers**: Per spec; safety-critical compliance
1195
+ - [ ] **Tests**: Unit, HW-in-loop as feasible
1196
+ - [ ] **PR**: Lint, tests; Tech Lead review
1197
+ - [ ] **Output**: Code + module/interface docs in \`dev/embedded/\`
1043
1198
  `;
1044
1199
 
1045
1200
  const DEV_DATA_ML_README = `# Senior Data/ML (10+ years exp)
@@ -1049,7 +1204,14 @@ const DEV_DATA_ML_README = `# Senior Data/ML (10+ years exp)
1049
1204
  - Tests and validation for data and model quality
1050
1205
  - Follow Tech Lead's stack (e.g. Python, Spark, ML frameworks)
1051
1206
 
1052
- **Docs**: Pipeline design, model cards.
1207
+ ## Detailed tasks
1208
+
1209
+ - [ ] **Read Technical BA spec**: Data spec, API contract
1210
+ - [ ] **Implement ETL/pipelines**: Ingestion, transforms, storage
1211
+ - [ ] **Implement models**: Training, evaluation; model cards
1212
+ - [ ] **Tests**: Data validation, model quality metrics
1213
+ - [ ] **PR**: Lint, tests; Tech Lead review
1214
+ - [ ] **Output**: Code + pipeline/model docs in \`dev/data-ml/\`
1053
1215
  `;
1054
1216
 
1055
1217
  const DEV_PLATFORM_README = `# Senior Platform (10+ years exp) — infra, CI/CD
@@ -1058,7 +1220,14 @@ const DEV_PLATFORM_README = `# Senior Platform (10+ years exp) — infra, CI/CD
1058
1220
  - Implement CI/CD, infra as code, observability per spec
1059
1221
  - Follow Tech Lead's stack and security requirements
1060
1222
 
1061
- **Docs**: Runbooks, pipeline and infra docs.
1223
+ ## Detailed tasks
1224
+
1225
+ - [ ] **Read Technical BA spec**: Infra, deploy, observability requirements
1226
+ - [ ] **Implement CI/CD**: Build, test, deploy pipelines
1227
+ - [ ] **Infra as code**: Terraform/Pulumi/CloudFormation per spec
1228
+ - [ ] **Observability**: Logging, metrics, traces, alerts
1229
+ - [ ] **PR**: Lint; Tech Lead review
1230
+ - [ ] **Output**: Pipelines, infra code, runbooks in \`dev/platform/\`
1062
1231
  `;
1063
1232
 
1064
1233
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdlc-workflow",
3
- "version": "1.0.9",
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": {