sdlc-workflow 1.1.0 → 1.2.1

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 +13 -10
  2. package/bin/cli.js +203 -63
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -5,14 +5,15 @@ 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 → Design (if app/web) → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Security + PE audit → [fix loop until no issues] → Deploy (Docker Compose + K8s)
8
+ User Request → PO → Business BA → Design (if app/web) → Architect → Technical BA → QE (docs) → Dev → QE (testing + UAT) → Security + PE audit → [fix loop until no issues] → Deploy Maintenance
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 Business BA → invoke **Pencil.dev** (MCP) to design; **PO + Business BA review** until approved; then Architect + Technical BA. UX drives technical decisions.
12
+ - **Design (optional):** For app/web projects, after Business BA → create **design specs** (Markdown) + optional **HTML wireframes**; **PO + Business BA review** until approved; then Architect + Technical BA. UX drives technical decisions.
13
13
  - **Security + Principle Engineer:** After implementation and QE testing → security + logic audit; **fix loop** (Dev fixes → re-audit) until all issues resolved; sign-off before Deploy.
14
14
  - **Each role runs as a sub-agent** (see `docs/sdlc/agents/`).
15
15
  - **After completion** → deploy immediately with **Docker Compose** (local/staging) and **Kubernetes** (production) — `docs/sdlc/deploy/`.
16
+ - **Maintenance:** After Deploy → monitoring, bug fixes, patches, dependency updates, performance tuning — `docs/sdlc/maintenance/`.
16
17
  - **QE (docs)**: Test plan, test cases
17
18
  - **Dev**: After docs phase → **run implementation immediately**. Tech Lead (review, merge) + Senior Dev (implement, Unit Test ≥90%)
18
19
  - **QE (testing)**: QE Lead (15+ yrs automation: strategy, framework, review) + Senior QE (10+ yrs, write automation tests)
@@ -56,7 +57,7 @@ docs/sdlc/
56
57
  │ ├── api-spec.template.md
57
58
  │ ├── team-breakdown.template.md
58
59
  │ └── README.md
59
- ├── design/ # Design (optional, app/web): after BA, before Architect; Pencil.dev .pen; PO+BA review until approved
60
+ ├── design/ # Design (optional, app/web): after BA, before Architect; design specs + wireframes; PO+BA review until approved
60
61
  │ └── README.md
61
62
  ├── architecture/ # Architect
62
63
  │ ├── adr.template.md
@@ -84,13 +85,15 @@ docs/sdlc/
84
85
  │ └── README.md
85
86
  ├── agents/ # Sub-agent specs (each role = sub-agent)
86
87
  │ └── README.md
87
- └── deploy/ # After Security + PE sign-off (fix loop until no issues) → Docker Compose + K8s
88
- ├── README.md
89
- ├── docker-compose.yml.template
90
- └── k8s/
91
- ├── deployment.yaml.template
92
- ├── service.yaml.template
93
- └── ingress.yaml.template
88
+ ├── deploy/ # After Security + PE sign-off (fix loop until no issues) → Docker Compose + K8s
89
+ ├── README.md
90
+ ├── docker-compose.yml.template
91
+ └── k8s/
92
+ ├── deployment.yaml.template
93
+ ├── service.yaml.template
94
+ └── ingress.yaml.template
95
+ └── maintenance/ # After Deploy → monitoring, bug fixes, patches, runbooks
96
+ └── README.md
94
97
 
95
98
  .cursor/rules/
96
99
  └── sdlc-workflow.mdc # Cursor rule
package/bin/cli.js CHANGED
@@ -177,6 +177,7 @@ async function generateFromInline(cwd) {
177
177
  join(base, "agents"),
178
178
  join(base, "deploy"),
179
179
  join(base, "deploy", "k8s"),
180
+ join(base, "maintenance"),
180
181
  ];
181
182
 
182
183
  for (const d of dirs) {
@@ -201,6 +202,7 @@ async function generateFromInline(cwd) {
201
202
  ["qe/qe-lead/README.md", QE_LEAD_README],
202
203
  ["qe/senior-qe/README.md", QE_SENIOR_README],
203
204
  ["design/README.md", DESIGN_README],
205
+ ["design/design-spec.template.md", DESIGN_SPEC_TEMPLATE],
204
206
  ["dev/tech-lead/README.md", DEV_TECH_LEAD_README],
205
207
  ["dev/senior-developer/README.md", DEV_SENIOR_README],
206
208
  ["dev/implementation-roles.template.md", DEV_IMPLEMENTATION_ROLES_TEMPLATE],
@@ -218,6 +220,7 @@ async function generateFromInline(cwd) {
218
220
  ["deploy/k8s/deployment.yaml.template", K8S_DEPLOYMENT_TEMPLATE],
219
221
  ["deploy/k8s/service.yaml.template", K8S_SERVICE_TEMPLATE],
220
222
  ["deploy/k8s/ingress.yaml.template", K8S_INGRESS_TEMPLATE],
223
+ ["maintenance/README.md", MAINTENANCE_README],
221
224
  ];
222
225
 
223
226
  for (const [rel, content] of files) {
@@ -239,17 +242,18 @@ globs: docs/sdlc/**/*, **/*.md
239
242
 
240
243
  1. **PO** — PRD, user stories → docs/sdlc/po/{epic-slug}/ (one folder per epic)
241
244
  2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
242
- 3. **Design (if app/web)** — Pencil.dev designs → docs/sdlc/design/{epic-slug}/; **PO + BA review** → loop until approved
245
+ 3. **Design (if app/web)** — Design specs + wireframes → docs/sdlc/design/{epic-slug}/; **PO + BA review** → loop until approved
243
246
  4. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
244
247
  5. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
245
248
  6. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
246
249
  7. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + implementation roles → docs/sdlc/dev/{role}/
247
- 8. **QE (testing)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) → docs/sdlc/qe/{epic-slug}/
250
+ 8. **QE (testing + UAT)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) + UAT → docs/sdlc/qe/{epic-slug}/
248
251
  9. **Security** — Audit security risk → docs/sdlc/security/
249
252
  10. **Principle Engineer** — Audit logic, architecture → docs/sdlc/principle-engineer/
250
253
  11. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/ (after Security + PE sign-off; fix loop until no issues)
254
+ 12. **Maintenance** — Monitoring, bug fixes, patches, dependency updates → docs/sdlc/maintenance/
251
255
 
252
- **Each role runs as a sub-agent.** Design uses Pencil.dev MCP; UX drives tech. See docs/sdlc/agents/
256
+ **Each role runs as a sub-agent.** Design before Architect (UX drives tech). See docs/sdlc/agents/
253
257
  Full workflow: docs/sdlc/SDLC-WORKFLOW.md
254
258
  `;
255
259
 
@@ -267,7 +271,7 @@ Sequential workflow; **each role runs as a sub-agent**. Each phase produces docs
267
271
  **When the user sends an idea, feature request, or new requirement:**
268
272
  1. **Trigger the pipeline** and run it **continuously through deployment** (Phase 1 → 2 → … → 7).
269
273
  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.
270
- 3. **Run in order:** PO → Business BA → **Design (if app/web, PO+BA review loop)** → Architect → Technical BA → QE (docs) → Dev → QE (testing) → **Security + Principle Engineer audit → fix loop until all issues resolved** → Deploy. Do not stop after one phase unless the user explicitly asks to stop.
274
+ 3. **Run in order:** PO → Business BA → **Design (if app/web, PO+BA review loop)** → Architect → Technical BA → QE (docs) → Dev → QE (testing + UAT) → **Security + Principle Engineer audit → fix loop until all issues resolved** → Deploy → Maintenance. Do not stop after one phase unless the user explicitly asks to stop.
271
275
 
272
276
  **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.
273
277
 
@@ -276,7 +280,7 @@ Sequential workflow; **each role runs as a sub-agent**. Each phase produces docs
276
280
  ## Flow Overview
277
281
 
278
282
  \`\`\`
279
- User Request → PO → Business BA → Design (if app/web) → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Security + PE audit → [fix loop until no issues] → Deploy (Docker Compose + K8s)
283
+ User Request → PO → Business BA → Design (if app/web) → Architect → Technical BA → QE (docs) → Dev → QE (testing + UAT) → Security + PE audit → [fix loop until no issues] → Deploy Maintenance
280
284
  \`\`\`
281
285
 
282
286
  **Determine current phase** before acting. If user sent an idea, assume Phase 0 and start from Phase 1.
@@ -304,13 +308,13 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
304
308
 
305
309
  **When:** Project has UI (web, mobile app). Skip for API-only, library, CLI, data/ML, platform without UI.
306
310
 
307
- **Role**: Invoke **Pencil.dev** sub-agent (MCP) to create UI/UX designs from idea + PO + Business BA docs. Design **before** Architect so UX drives technical decisions.
308
- **Output**: \`docs/sdlc/design/{epic-slug}/\` — .pen designs.
311
+ **Role**: Create UI/UX design specs (Markdown) and optional HTML wireframes from idea + PO + Business BA docs. Design **before** Architect so UX drives technical decisions.
312
+ **Output**: \`docs/sdlc/design/{epic-slug}/\` — design-spec.md + optional wireframes/.
309
313
 
310
314
  **Review loop:**
311
315
  1. **PO review**: Design aligns with epic brief, user stories, acceptance criteria?
312
316
  2. **Business BA review**: Design matches functional requirements, process flows?
313
- 3. **If not approved**: Capture feedback → redesign with Pencil.dev → repeat until PO and BA approve.
317
+ 3. **If not approved**: Capture feedback → redesign → repeat until PO and BA approve.
314
318
  4. **If approved** → **Handoff to Architect.**
315
319
 
316
320
  ## Phase 4: Architect
@@ -349,7 +353,7 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
349
353
 
350
354
  **Requirements**: Unit Test coverage **≥ 90%**.
351
355
 
352
- **Output**: Code + unit tests. **Handoff to QE (testing).**
356
+ **Output**: Code + unit tests. **Handoff to QE (testing + UAT).**
353
357
 
354
358
  ## Phase 6: QE (Testing phase — automation)
355
359
 
@@ -382,18 +386,19 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
382
386
  | Phase | Role | Key Output |
383
387
  |-------|------|------------|
384
388
  | 0 | Discovery | Raw request |
385
- | 1 | PO | PRD, user stories |
386
- | 2 | Business BA | FRS, process flows |
387
- | 3 | Design (if app/web) | Pencil.dev designs; PO+BA review until approved |
388
- | 4 | Architect | ADRs, system diagrams |
389
+ | 1 | PO | PRD, user stories, feasibility assessment |
390
+ | 2 | Business BA | FRS, NFR, process flows |
391
+ | 3 | Design (if app/web) | Design specs + wireframes; PO+BA review until approved |
392
+ | 4 | Architect | ADRs, system diagrams, security by design |
389
393
  | 5 | Technical BA | API specs, tech breakdown |
390
394
  | 6 | QE (docs) | Test plan, test cases |
391
- | 7 | Dev | Code, unit tests (≥90%) |
392
- | 8 | QE (testing) | QE Lead (15+ yrs automation) + Senior QE (10+ yrs), automation, sign-off |
395
+ | 7 | Dev | Code, unit tests (≥90%), security shift-left |
396
+ | 8 | QE (testing + UAT) | QE Lead (15+ yrs automation) + Senior QE (10+ yrs), automation, UAT, sign-off |
393
397
  | 9 | Security + Principle Engineer | Security + logic audit; fix loop until all issues resolved; sign-off → Deploy |
394
398
  | 10 | Deploy | Docker Compose + K8s |
399
+ | 11 | Maintenance | Monitoring, bug fixes, patches, dependency updates |
395
400
 
396
- **Sub-agents**: Each role = one sub-agent. Design uses Pencil.dev MCP. See docs/sdlc/agents/
401
+ **Sub-agents**: Each role = one sub-agent. Design before Architect (UX drives tech). See docs/sdlc/agents/
397
402
  See reference.md for templates.
398
403
  `;
399
404
 
@@ -403,7 +408,7 @@ const CURSOR_REFERENCE_MD = `# SDLC Workflow — Reference
403
408
 
404
409
  - **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.
405
410
  - **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.
406
- - **Design (if app/web)**: \`docs/sdlc/design/{epic-slug}/\` — same slug as PO/BA. Pencil.dev .pen designs; PO+BA review until approved.
411
+ - **Design (if app/web)**: \`docs/sdlc/design/{epic-slug}/\` — same slug as PO/BA. Design specs (Markdown) + optional HTML wireframes; PO+BA review until approved.
407
412
  - **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.
408
413
 
409
414
  ## PO: Epic Brief Template
@@ -420,7 +425,7 @@ FR-001: [Title] — Description, Trigger, Process Flow, Output, Constraints
420
425
  POST /api/v1/[resource] — Purpose, Request, Response, Contract
421
426
 
422
427
  ## Design (if app/web)
423
- Pencil.dev MCP create .pen designs from idea + PO + BA (before Architect; UX drives tech). Output: docs/sdlc/design/{epic-slug}/. PO + BA review until approved; loop if not aligned. Handoff to Architect.
428
+ Design specs (Markdown) + optional HTML wireframes from idea + PO + BA (before Architect; UX drives tech). Output: docs/sdlc/design/{epic-slug}/. PO + BA review until approved; loop if not aligned. Handoff to Architect.
424
429
 
425
430
  ## QE: Test Case
426
431
  TC-001: [Scenario] — Precondition, Steps, Expected, Links to AC
@@ -441,6 +446,9 @@ TC-001: [Scenario] — Precondition, Steps, Expected, Links to AC
441
446
 
442
447
  ## Deploy
443
448
  After Security + Principle Engineer sign-off → Docker Compose + K8s. See docs/sdlc/deploy/
449
+
450
+ ## Maintenance
451
+ After Deploy → ongoing: monitoring, bug fixes, patches, dependency updates, performance tuning. Significant new features → loop back to PO for new epic. See docs/sdlc/maintenance/
444
452
  `;
445
453
 
446
454
  const AGENTS_MD_CONTENT = `## SDLC Workflow
@@ -451,32 +459,34 @@ When working on requirements, features, or handoffs, follow these phases:
451
459
 
452
460
  1. **PO** — PRD, user stories → docs/sdlc/po/{epic-slug}/ (one folder per epic)
453
461
  2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
454
- 3. **Design (if app/web)** — Pencil.dev designs → docs/sdlc/design/{epic-slug}/; **PO + BA review** until approved
462
+ 3. **Design (if app/web)** — Design specs + wireframes → docs/sdlc/design/{epic-slug}/; **PO + BA review** until approved
455
463
  4. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
456
464
  5. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
457
465
  6. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
458
466
  7. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
459
- 8. **QE (testing)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
467
+ 8. **QE (testing + UAT)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) + UAT → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
460
468
  9. **Security + Principle Engineer** — Security + logic audit; **fix loop** (Dev fixes → re-audit) until all issues resolved; sign-off before Deploy
461
469
  10. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
470
+ 11. **Maintenance** — Monitoring, bug fixes, patches, dependency updates → docs/sdlc/maintenance/
462
471
 
463
472
  Design before Architect (UX drives tech). After the docs phase, the Dev team runs implementation immediately. See docs/sdlc/agents/
464
473
  `;
465
474
 
466
475
  const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
467
476
 
468
- **Trigger on idea:** When the user sends an idea, feature request, or requirement, run the pipeline continuously: Phase 1 (PO) → 2 → … → 7 (Deploy). One role per phase (single agent = switch role each phase). Do not stop after one phase unless the user asks.
477
+ **Trigger on idea:** When the user sends an idea, feature request, or requirement, run the pipeline continuously: Phase 1 (PO) → 2 → … → Deploy → Maintenance. One role per phase (single agent = switch role each phase). Do not stop after one phase unless the user asks.
469
478
 
470
- 1. **PO** — PRD, user stories → docs/sdlc/po/{epic-slug}/ (one folder per epic)
471
- 2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
472
- 3. **Design (if app/web)** — Pencil.dev designs → docs/sdlc/design/{epic-slug}/; **PO + BA review** until approved
473
- 4. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
479
+ 1. **PO** — PRD, user stories, feasibility assessment → docs/sdlc/po/{epic-slug}/ (one folder per epic)
480
+ 2. **Business BA** — FRS, NFR, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
481
+ 3. **Design (if app/web)** — Design specs + wireframes → docs/sdlc/design/{epic-slug}/; **PO + BA review** until approved
482
+ 4. **Architect** — ADRs, diagrams, security by design → docs/sdlc/architecture/
474
483
  5. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
475
484
  6. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
476
- 7. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
477
- 8. **QE (testing)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
485
+ 7. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/. Security shift-left: OWASP checks, dependency audit in CI
486
+ 8. **QE (testing + UAT)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) + UAT → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
478
487
  9. **Security + Principle Engineer** — Security + logic audit; **fix loop** (Dev fixes → re-audit) until all issues resolved; sign-off before Deploy
479
488
  10. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
489
+ 11. **Maintenance** — Monitoring, bug fixes, patches, dependency updates → docs/sdlc/maintenance/
480
490
 
481
491
  Design before Architect (UX drives tech). After the docs phase, Dev runs implementation immediately. See docs/sdlc/agents/
482
492
  `;
@@ -495,7 +505,7 @@ For Cursor, see .cursor/rules/sdlc-workflow.mdc
495
505
  ## Flow
496
506
 
497
507
  \`\`\`
498
- User Request → PO → Business BA → Design (if app/web) → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Security + PE audit → [fix loop] → Deploy
508
+ User Request → PO → Business BA → Design (if app/web) → Architect → Technical BA → QE (docs) → Dev → QE (testing + UAT) → Security + PE audit → [fix loop] → Deploy → Maintenance
499
509
  \`\`\`
500
510
 
501
511
  ## Phase Checklist
@@ -503,37 +513,38 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
503
513
  | Phase | Role | Key Output |
504
514
  |-------|------|------------|
505
515
  | 0 | Discovery | Raw request |
506
- | 1 | PO | PRD, user stories |
507
- | 2 | Business BA | FRS, process flows |
508
- | 3 | Design (if app/web) | Pencil.dev designs; PO+BA review until approved |
509
- | 4 | Architect | ADRs, system diagrams |
516
+ | 1 | PO | PRD, user stories, feasibility assessment |
517
+ | 2 | Business BA | FRS, NFR, process flows |
518
+ | 3 | Design (if app/web) | Design specs + wireframes; PO+BA review until approved |
519
+ | 4 | Architect | ADRs, system diagrams, security by design |
510
520
  | 5 | Technical BA | API specs, tech breakdown |
511
521
  | 6 | QE (docs) | Test plan, test cases |
512
- | 7 | Dev | Code, unit tests (≥90%) |
513
- | 8 | QE (testing) | QE Lead (15+ yrs automation) + Senior QE (10+ yrs), automation, sign-off |
522
+ | 7 | Dev | Code, unit tests (≥90%), security shift-left |
523
+ | 8 | QE (testing + UAT) | QE Lead (15+ yrs automation) + Senior QE (10+ yrs), automation, UAT, sign-off |
514
524
  | 9 | Security + Principle Engineer | Security + logic audit; fix loop until all issues resolved; sign-off → Deploy |
515
525
  | 10 | Deploy | Docker Compose + K8s |
526
+ | 11 | Maintenance | Monitoring, bug fixes, patches, dependency updates |
516
527
 
517
528
  **Sub-agents**: Each role runs as a sub-agent. See docs/sdlc/agents/
518
529
 
519
530
  ## Phase Details
520
531
 
521
532
  ### Phase 1: PO
522
- - Epic brief, user stories, acceptance criteria
533
+ - Feasibility study (technical, operational, economic), epic brief, user stories, acceptance criteria
523
534
  - Output: \`docs/sdlc/po/{epic-slug}/\` — **one folder per epic**; do not put all epics in one file
524
535
 
525
536
  ### Phase 2: Business BA
526
- - Functional requirements, process flows, use cases
537
+ - Functional requirements (FR), **non-functional requirements (NFR)** (performance, scalability, availability, security, usability), process flows, use cases
527
538
  - Output: \`docs/sdlc/ba/business/{epic-slug}/\` — **one folder per epic** (same slug as PO); do not merge into one file
528
539
 
529
540
  ### Phase 3: Design (optional — app/web only)
530
- - Invoke **Pencil.dev** (MCP) to design based on idea + PO + BA docs. **Design before Architect so UX drives tech.**
531
- - Output: \`docs/sdlc/design/{epic-slug}/\` — .pen designs
541
+ - Create design specs (Markdown) + optional HTML wireframes based on idea + PO + BA docs. **Design before Architect so UX drives tech.**
542
+ - Output: \`docs/sdlc/design/{epic-slug}/\` — design-spec.md + optional wireframes/
532
543
  - **PO + Business BA review**: Both check design vs epic/FRS; if not aligned → feedback → redesign loop until approved
533
544
  - When approved → handoff to Architect
534
545
 
535
546
  ### Phase 4: Architect
536
- - System context, container diagram, ADRs, tech stack. Input: Business BA + Design (if app/web)
547
+ - System context, container diagram, ADRs, tech stack, **security by design** (threat model, auth architecture, encryption, secrets mgmt). Input: Business BA (FR + NFR) + Design (if app/web)
537
548
  - Output: \`docs/sdlc/architecture/\`
538
549
 
539
550
  ### Phase 5: Technical BA
@@ -546,14 +557,15 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
546
557
  - **After docs phase → Dev team runs implementation immediately** (no extra gate)
547
558
 
548
559
  ### Phase 5b: Dev Teams
549
- - **Tech Lead (15+ yrs)**: Tech stack, review & merge. Output: \`docs/sdlc/dev/tech-lead/\`
560
+ - **Tech Lead (15+ yrs)**: Tech stack, review & merge, **security review (Shift Left)**: OWASP check, dependency audit, SAST in CI. Output: \`docs/sdlc/dev/tech-lead/\`
550
561
  - **Implementation roles** (all Senior 10+ yrs; use only what applies): Senior Dev, Senior Frontend, Senior Backend, Senior Mobile, Senior Embedded, Senior Data/ML, Senior Platform → \`docs/sdlc/dev/{role}/\`. See \`implementation-roles.template.md\`.
551
- - **Requirement**: Unit Test coverage **≥ 90%**
562
+ - **Requirement**: Unit Test coverage **≥ 90%**; security practices (input validation, no hardcoded secrets)
552
563
  - **Then**: QE starts testing phase
553
564
 
554
- ### Phase 6: QE (Testing — automation)
565
+ ### Phase 6: QE (Testing — automation + UAT)
555
566
  - **QE Lead (15+ yrs automation)**: Test strategy, framework choice, automation architecture; review test code. Output per epic: \`docs/sdlc/qe/{epic-slug}/\`
556
567
  - **Senior QE (10+ yrs)**: Write automation tests per QE Lead's strategy. Output per epic: \`docs/sdlc/qe/{epic-slug}/\`
568
+ - **UAT (User Acceptance Testing)**: Verify implementation against original user stories and acceptance criteria from PO; confirm business requirements are met from end-user perspective. Output: \`qe/{epic-slug}/uat-results.md\`
557
569
  - **Handoff to Security + Principle Engineer**
558
570
 
559
571
  ### Phase 7: Security + Principle Engineer (audit → fix loop)
@@ -565,6 +577,14 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
565
577
  - After Security + Principle Engineer sign-off → deploy with **Docker Compose** (local/staging) and **Kubernetes** (production)
566
578
  - Output: \`docs/sdlc/deploy/\` — docker-compose.yml, k8s/
567
579
 
580
+ ### Phase 9: Maintenance
581
+ - **Monitoring**: Health checks, error tracking, alerting, SLA dashboards
582
+ - **Bug fixes**: Triage, fix, test, deploy per severity
583
+ - **Dependency updates**: Regular security patches, library upgrades
584
+ - **Performance tuning**: Monitor vs NFR targets; optimize bottlenecks
585
+ - **Feature iteration**: Small enhancements from feedback; significant scope → new PO epic
586
+ - Output: \`docs/sdlc/maintenance/\` — runbooks, incident logs
587
+
568
588
  See [reference.md](./reference.md) for templates.
569
589
  `;
570
590
 
@@ -574,26 +594,27 @@ const ORCHESTRATION_MD = `# Pipeline orchestration
574
594
 
575
595
  When the user sends an **idea**, **feature request**, or **requirement** (e.g. "I want a login page", "We need an API for X"):
576
596
 
577
- 1. **Trigger the full pipeline** and run **Phase 1 → 2 → … → 10 in sequence**.
597
+ 1. **Trigger the full pipeline** and run **Phase 1 → 2 → … → 11 in sequence**.
578
598
  2. **One role per phase:** For each phase, act only as that role, write outputs to the correct \`docs/sdlc/...\` folder, then **continue to the next phase** without asking the user to "run next step".
579
- 3. **Run through to Deploy.** Do not stop after PO, BA, or Dev unless the user explicitly says to stop.
599
+ 3. **Run through to Maintenance.** Do not stop after PO, BA, or Dev unless the user explicitly says to stop.
580
600
 
581
601
  ## How it runs (Cursor and similar)
582
602
 
583
- There is **one agent** per conversation. It simulates the pipeline by **adopting one role per phase** in order: Phase 1 as PO only → Phase 2 as Business BA only → … → Phase 10 as Deploy. Do not mix roles in one step. If the tool later supports separate agents per phase, use that; otherwise this single-agent simulation is correct.
603
+ There is **one agent** per conversation. It simulates the pipeline by **adopting one role per phase** in order: Phase 1 as PO only → Phase 2 as Business BA only → … → Phase 11 as Maintenance. Do not mix roles in one step. If the tool later supports separate agents per phase, use that; otherwise this single-agent simulation is correct.
584
604
 
585
605
  ## Checklist per run
586
606
 
587
607
  - [ ] Phase 1 PO: artifacts in \`docs/sdlc/po/{epic-slug}/\` (one folder per epic)
588
608
  - [ ] Phase 2 Business BA: \`docs/sdlc/ba/business/{epic-slug}/\` (one folder per epic)
589
- - [ ] Phase 3 Design (if app/web): Pencil.dev designs in \`docs/sdlc/design/{epic-slug}/\`; PO+BA review until approved
609
+ - [ ] Phase 3 Design (if app/web): design specs + wireframes in \`docs/sdlc/design/{epic-slug}/\`; PO+BA review until approved
590
610
  - [ ] Phase 4 Architect: \`docs/sdlc/architecture/\`
591
611
  - [ ] Phase 5 Technical BA: \`docs/sdlc/ba/technical/\`
592
612
  - [ ] Phase 6 QE docs: \`docs/sdlc/qe/{epic-slug}/\` (one folder per epic)
593
613
  - [ ] Phase 7 Dev: code + unit tests, \`docs/sdlc/dev/\`
594
- - [ ] Phase 8 QE testing: automation, sign-off → \`docs/sdlc/qe/{epic-slug}/\`
614
+ - [ ] Phase 8 QE testing + UAT: automation, UAT against user stories, sign-off → \`docs/sdlc/qe/{epic-slug}/\`
595
615
  - [ ] Phase 9 Security + Principle Engineer: \`docs/sdlc/security/\`, \`docs/sdlc/principle-engineer/\`; fix loop until no issues; sign-off
596
616
  - [ ] Phase 10 Deploy: \`docs/sdlc/deploy/\`, Docker Compose + K8s
617
+ - [ ] Phase 11 Maintenance: monitoring, bug fixes, patches, dependency updates → \`docs/sdlc/maintenance/\`
597
618
  `;
598
619
 
599
620
  const REFERENCE_MD = `# SDLC Workflow — Reference
@@ -607,10 +628,11 @@ Deploy: docs/sdlc/deploy/ (Docker Compose + K8s)
607
628
 
608
629
  - **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.
609
630
  - **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.
610
- - **Design (if app/web)**: \`docs/sdlc/design/{epic-slug}/\` — Pencil.dev .pen designs; PO+BA review until approved.
631
+ - **Design (if app/web)**: \`docs/sdlc/design/{epic-slug}/\` — design specs (Markdown) + optional HTML wireframes; PO+BA review until approved.
611
632
  - **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.
612
633
  - **Security**: \`docs/sdlc/security/\` — security audit; fix loop until no issues
613
634
  - **Principle Engineer**: \`docs/sdlc/principle-engineer/\` — logic audit; fix loop until no issues
635
+ - **Maintenance**: \`docs/sdlc/maintenance/\` — monitoring, bug fixes, patches, runbooks
614
636
  `;
615
637
 
616
638
  const AGENTS_README = `# Sub-Agents
@@ -621,7 +643,7 @@ Every role in the SDLC runs as a **sub-agent**. Each phase is assigned to a corr
621
643
  |------|-----------|--------|--------|
622
644
  | PO | po | User request | docs/sdlc/po/{epic-slug}/ (one folder per epic) |
623
645
  | Business BA | business-ba | docs/sdlc/po/{epic-slug}/ | docs/sdlc/ba/business/{epic-slug}/ (one folder per epic) |
624
- | Design (if app/web) | pencil-dev | docs/sdlc/po + docs/sdlc/ba/business/ | docs/sdlc/design/{epic-slug}/; PO+BA review until approved |
646
+ | Design (if app/web) | design | docs/sdlc/po + docs/sdlc/ba/business/ | docs/sdlc/design/{epic-slug}/; PO+BA review until approved |
625
647
  | Architect | architect | docs/sdlc/ba/business/ + design (if any) | docs/sdlc/architecture/ |
626
648
  | Technical BA | technical-ba | docs/sdlc/architecture/ + design (if any) | docs/sdlc/ba/technical/ |
627
649
  | QE (docs) | qe-docs | docs/sdlc/ba/technical/ (+ design if any) | docs/sdlc/qe/{epic-slug}/ (one folder per epic) |
@@ -638,6 +660,7 @@ Every role in the SDLC runs as a **sub-agent**. Each phase is assigned to a corr
638
660
  | Security | security | Code, infra | Security audit → docs/sdlc/security/; fix loop until no issues |
639
661
  | Principle Engineer | principle-engineer | Code, architecture | Logic audit → docs/sdlc/principle-engineer/; fix loop until no issues |
640
662
  | Deploy | deploy | Security + PE sign-off (after fix loop) | Docker Compose + K8s, docs/sdlc/deploy/ |
663
+ | Maintenance | maintenance | Live application | Monitoring, bug fixes, patches, docs/sdlc/maintenance/ |
641
664
 
642
665
  Orchestrator: run each sub-agent in order; hand off output → input of the next sub-agent.
643
666
 
@@ -682,6 +705,8 @@ const DEPLOY_README = `# Deploy
682
705
 
683
706
  After the pipeline completes (Security + Principle Engineer sign-off, after fix loop until no issues), deploy immediately with:
684
707
 
708
+ **After Deploy → Maintenance phase**: monitoring, bug fixes, patches, dependency updates.
709
+
685
710
  - **Docker Compose** — local / staging: \`docker compose up -d\`
686
711
  - **Kubernetes** — production: \`kubectl apply -f k8s/\`
687
712
 
@@ -792,6 +817,12 @@ const PO_EPIC_TEMPLATE = `# Epic: [Name]
792
817
  ## Priority
793
818
  Must have / Should have / Could have
794
819
 
820
+ ## Feasibility Assessment
821
+ - **Technical**: [Can we build this with current tech/team? Any unknowns?]
822
+ - **Operational**: [Can we deploy, run, and support this? Any ops constraints?]
823
+ - **Economic**: [ROI justification; cost vs. value]
824
+ - **Go / No-go**: [Recommended | Needs further investigation | Not recommended]
825
+
795
826
  ## Dependencies & Risks
796
827
  - ...
797
828
  `;
@@ -806,6 +837,7 @@ const PO_README = `# PO (Product Owner)
806
837
 
807
838
  ## Detailed tasks
808
839
 
840
+ - [ ] **Feasibility study**: Assess technical feasibility (can we build it?), operational feasibility (can we run it?), economic feasibility (is the ROI worth it?). Document go/no-go recommendation
809
841
  - [ ] **Clarify vision**: Capture business problem, goals, success metrics
810
842
  - [ ] **Define scope**: Boundaries, in/out of scope, MVP vs later
811
843
  - [ ] **Write epic brief**: Problem, success metrics, high-level approach, project type
@@ -813,6 +845,7 @@ const PO_README = `# PO (Product Owner)
813
845
  - [ ] **Prioritize**: Must / Should / Could have; order by value and risk
814
846
  - [ ] **Identify dependencies**: External teams, systems, blockers
815
847
  - [ ] **Call out risks**: Technical, schedule, compliance
848
+ - [ ] **Feasibility assessment**: Evaluate technical feasibility, resource availability, timeline viability, and budget constraints. Flag blockers early. Document go/no-go recommendation
816
849
  - [ ] **Handoff to Business BA**: Deliverables in \`po/{epic-slug}/\`
817
850
 
818
851
  Use epic-brief.template.md as starting point for each epic.
@@ -835,6 +868,18 @@ const BA_FR_TEMPLATE = `## FR-001: [Title]
835
868
 
836
869
  **Constraints**: [Compliance, SLA, etc.]
837
870
 
871
+ ---
872
+
873
+ ## NFR-001: [Title]
874
+
875
+ **Category**: [Performance | Scalability | Availability | Security | Usability | Accessibility | Compliance — pick one]
876
+
877
+ **Description**: [What quality attribute the system must meet]
878
+
879
+ **Metric / Target**: [e.g. response time < 200ms p95, 99.9% uptime, WCAG 2.1 AA]
880
+
881
+ **Measurement**: [How to verify — load test, monitoring, audit]
882
+
838
883
  ---
839
884
  *Use for any project type: product feature (UI/API), library behaviour, CLI behaviour, data pipeline, or platform capability.*
840
885
  `;
@@ -858,12 +903,13 @@ docs/sdlc/ba/business/
858
903
 
859
904
  ## Detailed tasks
860
905
 
861
- - [ ] **Read PO outputs**: Epic brief, user stories, acceptance criteria
906
+ - [ ] **Read PO outputs**: Epic brief, user stories, acceptance criteria, feasibility assessment
862
907
  - [ ] **Define functional requirements**: For each requirement: type, description, trigger, process flow, output, constraints (use FR-001, FR-002...)
908
+ - [ ] **Define non-functional requirements (NFR)**: Performance (response time, throughput), scalability (load targets), availability (SLA/uptime), security (auth, encryption, compliance), usability, accessibility. Use NFR-001, NFR-002...
863
909
  - [ ] **Document process flows**: Step-by-step business flows (e.g. BPMN, flowcharts, numbered lists)
864
910
  - [ ] **Write use cases**: Actor, goal, preconditions, main/alternate flows, postconditions
865
911
  - [ ] **Maintain glossary**: Business terms, definitions, acronyms
866
- - [ ] **Map to user stories**: Trace FRs to user stories / AC
912
+ - [ ] **Map to user stories**: Trace FRs + NFRs to user stories / AC
867
913
  - [ ] **Handoff to Design (if app/web) or Architect**: Deliverables in \`ba/business/{epic-slug}/\`
868
914
 
869
915
  Use functional-requirement.template.md for FRS items.
@@ -971,7 +1017,7 @@ Templates support: HTTP API, library/SDK, CLI, and all project types (see api-sp
971
1017
  ## Detailed tasks
972
1018
 
973
1019
  - [ ] **Read Architect outputs**: ADRs, context/container diagrams, tech stack
974
- - [ ] **Read Design (if app/web)**: .pen designs — design informs API contracts, screen specs
1020
+ - [ ] **Read Design (if app/web)**: design-spec.md + wireframes — design informs API contracts, screen specs
975
1021
  - [ ] **API/interface spec**: For each endpoint/class/command: purpose, request/response, contract (OpenAPI, TS types, CLI help)
976
1022
  - [ ] **DB schema**: Tables, columns, indexes, constraints; migrations approach
977
1023
  - [ ] **Team breakdown**: Map scope to teams (Backend, Frontend, Mobile, etc.) per project type; dependencies
@@ -1006,12 +1052,13 @@ Use adr.template.md for new ADRs.
1006
1052
  ## Detailed tasks
1007
1053
 
1008
1054
  - [ ] **Read Business BA outputs**: Functional requirements, process flows, use cases
1009
- - [ ] **Read Design (if app/web)**: .pen designs in \`design/{epic-slug}/\` — design informs architecture
1055
+ - [ ] **Read Design (if app/web)**: design-spec.md in \`design/{epic-slug}/\` — design informs architecture
1010
1056
  - [ ] **Context diagram**: System boundary, external actors, integrations
1011
1057
  - [ ] **Container diagram**: Main components/services and their responsibilities
1012
1058
  - [ ] **Tech stack decisions**: Languages, frameworks, databases; document in ADRs
1013
1059
  - [ ] **ADR per decision**: Context, decision, consequences (scope: backend, frontend, mobile, etc.)
1014
- - [ ] **Non-functional alignment**: Performance, security, scalability, compliance
1060
+ - [ ] **Non-functional alignment**: Performance, security, scalability, compliance — reference NFRs from Business BA
1061
+ - [ ] **Security by design (Shift Left)**: Threat model (STRIDE/attack surface), auth/authz architecture, data encryption at rest/transit, secrets management approach, dependency security policy. Document in ADR
1015
1062
  - [ ] **Handoff to Technical BA**: Architecture docs, ADRs in \`architecture/\`
1016
1063
  `;
1017
1064
 
@@ -1052,7 +1099,8 @@ const QE_README = `# QE (Quality Engineering)
1052
1099
 
1053
1100
  - [ ] **QE Lead**: Test strategy, framework, review test code
1054
1101
  - [ ] **Senior QE**: Write automation tests per test plan
1055
- - [ ] **Sign-off**: Regression, coverage, release readiness in \`qe/{epic-slug}/\`
1102
+ - [ ] **UAT (User Acceptance Testing)**: Verify against original user stories and acceptance criteria from PO; confirm business requirements are met from end-user perspective. Document UAT results in \`qe/{epic-slug}/uat-results.md\`
1103
+ - [ ] **Sign-off**: Regression, coverage, UAT pass, release readiness in \`qe/{epic-slug}/\`
1056
1104
 
1057
1105
  Example:
1058
1106
  \`\`\`
@@ -1068,7 +1116,7 @@ docs/sdlc/qe/
1068
1116
 
1069
1117
  Two phases:
1070
1118
  1. **Docs phase** — Test plan, test cases per epic in \`qe/{epic-slug}/\`. Done → **Dev runs implementation immediately**.
1071
- 2. **Testing phase** — After Dev completes unit tests: QE Lead (15+ yrs automation: strategy, framework, review) + Senior QE (automation) output to the same \`qe/{epic-slug}/\` (or subfolders there).
1119
+ 2. **Testing phase** — After Dev completes unit tests: QE Lead (15+ yrs automation: strategy, framework, review) + Senior QE (automation) + **UAT** (verify against user stories/AC) output to the same \`qe/{epic-slug}/\` (or subfolders there).
1072
1120
 
1073
1121
  Use test-case.template.md for test cases.
1074
1122
  `;
@@ -1119,25 +1167,97 @@ const DESIGN_README = `# Design (optional — app/web projects only)
1119
1167
 
1120
1168
  **Why before Architect:** UX drives technical decisions — design informs architecture and API specs.
1121
1169
 
1122
- **One folder per epic:** \`docs/sdlc/design/{epic-slug}/\` — same slug as PO/BA. Store .pen files and design notes there.
1170
+ **One folder per epic:** \`docs/sdlc/design/{epic-slug}/\` — same slug as PO/BA. Store design specs and wireframes there.
1171
+
1172
+ ## Output format
1173
+
1174
+ - **design-spec.md** — Markdown design spec: screen inventory, component hierarchy, user flows, responsive breakpoints, interaction notes.
1175
+ - **wireframes/*.html** (optional) — Static HTML/CSS wireframes; open in any browser, no external tools needed. Keep them simple (layout + structure, not pixel-perfect).
1123
1176
 
1124
1177
  ## Flow
1125
1178
 
1126
- 1. **Design sub-agent (Pencil.dev)**: Create UI/UX designs based on idea + PO docs + Business BA FRS. Use Pencil MCP tools (\`batch_design\`, \`get_guidelines\`, \`get_style_guide\`, etc.) to produce .pen designs.
1127
- 2. **PO + Business BA review**: Both roles review the design against epic brief, user stories, functional requirements.
1179
+ 1. **Design sub-agent**: Create UI/UX design specs based on idea + PO docs + Business BA FRS. Write \`design-spec.md\` describing every screen, component, and user flow. Optionally generate HTML wireframes for key screens.
1180
+ 2. **PO + Business BA review**: Both roles review the design spec against epic brief, user stories, functional requirements.
1128
1181
  3. **Loop until approved**: If design does not match idea/docs → return to step 1 with feedback; redesign. Repeat until PO and BA approve.
1129
1182
  4. **Handoff to Architect**: Once approved → proceed to Architect (design informs architecture and Technical BA).
1130
1183
 
1131
1184
  ## Detailed tasks
1132
1185
 
1133
- - [ ] **Invoke Pencil.dev**: Call design sub-agent (Pencil MCP) with PO epic, BA FRS as context
1134
- - [ ] **Create designs**: Screens, flows, components in .pen format; output to \`design/{epic-slug}/\`
1186
+ - [ ] **Gather context**: Read PO epic brief, BA FRS, user stories as input
1187
+ - [ ] **Screen inventory**: List all screens/pages with purpose and key elements
1188
+ - [ ] **Component hierarchy**: Define reusable components, layout structure, navigation
1189
+ - [ ] **User flows**: Document step-by-step flows for each user story (include happy path + error states)
1190
+ - [ ] **Responsive breakpoints**: Define mobile / tablet / desktop behavior
1191
+ - [ ] **Write design-spec.md**: Full design spec in Markdown; output to \`design/{epic-slug}/\`
1192
+ - [ ] **HTML wireframes** (optional): Generate static HTML/CSS wireframes for key screens in \`design/{epic-slug}/wireframes/\`
1135
1193
  - [ ] **PO review**: Check design aligns with epic brief, user stories, acceptance criteria
1136
1194
  - [ ] **Business BA review**: Check design matches functional requirements, process flows
1137
1195
  - [ ] **If not approved**: Capture feedback; loop back to design step with specific changes
1138
1196
  - [ ] **If approved**: Handoff to Architect; design in \`design/{epic-slug}/\`
1139
1197
  `;
1140
1198
 
1199
+ const DESIGN_SPEC_TEMPLATE = `# Design Spec: [Epic Name]
1200
+
1201
+ ## Overview
1202
+ [Brief description of what this design covers and the problem it solves]
1203
+
1204
+ ## Screen Inventory
1205
+
1206
+ | # | Screen / Page | Purpose | Key Elements |
1207
+ |---|--------------|---------|--------------|
1208
+ | 1 | | | |
1209
+
1210
+ ## User Flows
1211
+
1212
+ ### Flow 1: [Flow Name]
1213
+ 1. User lands on [screen]
1214
+ 2. User [action] → [result]
1215
+ 3. ...
1216
+
1217
+ **Happy path:** ...
1218
+ **Error states:** ...
1219
+
1220
+ ## Component Hierarchy
1221
+
1222
+ \`\`\`
1223
+ App
1224
+ ├── Layout
1225
+ │ ├── Header (nav, user menu)
1226
+ │ ├── Sidebar (optional)
1227
+ │ └── Main Content
1228
+ │ ├── [Component A]
1229
+ │ └── [Component B]
1230
+ └── Footer
1231
+ \`\`\`
1232
+
1233
+ ## Screen Details
1234
+
1235
+ ### Screen: [Name]
1236
+ - **URL / Route:** \`/path\`
1237
+ - **Purpose:** ...
1238
+ - **Layout:** [description or ASCII wireframe]
1239
+ - **Components:** [list key components]
1240
+ - **Interactions:** [click, hover, form submit behaviors]
1241
+ - **Data:** [what data is displayed / submitted]
1242
+
1243
+ ## Responsive Breakpoints
1244
+
1245
+ | Breakpoint | Width | Layout Changes |
1246
+ |-----------|-------|---------------|
1247
+ | Mobile | < 768px | Single column, hamburger nav |
1248
+ | Tablet | 768–1024px | ... |
1249
+ | Desktop | > 1024px | Full layout |
1250
+
1251
+ ## Design Tokens (optional)
1252
+
1253
+ - **Primary color:** ...
1254
+ - **Typography:** ...
1255
+ - **Spacing:** ...
1256
+
1257
+ ## Notes
1258
+ [Any additional context, constraints, or decisions]
1259
+ `;
1260
+
1141
1261
  const DEV_TECH_LEAD_README = `# Tech Lead (15+ years exp)
1142
1262
 
1143
1263
  **Responsibilities**:
@@ -1151,7 +1271,8 @@ const DEV_TECH_LEAD_README = `# Tech Lead (15+ years exp)
1151
1271
  - [ ] **Tech stack decision**: Languages, frameworks, libraries; document in ADR
1152
1272
  - [ ] **Project setup**: Repo structure, tooling, lint, format, CI baseline
1153
1273
  - [ ] **Code review**: Architecture alignment, patterns, test coverage, security
1154
- - [ ] **Merge approval**: Enforce quality gates before merge
1274
+ - [ ] **Security review (Shift Left)**: OWASP Top 10 check, input validation, auth/authz, secrets not hardcoded, dependency audit (npm audit / pip audit / etc.), SAST scan in CI
1275
+ - [ ] **Merge approval**: Enforce quality gates before merge (tests, coverage, security scan pass)
1155
1276
  - [ ] **Tech guidance**: Resolve technical disputes; mentor team
1156
1277
  - [ ] **Output**: ADRs, review checklist in \`dev/tech-lead/\`
1157
1278
  `;
@@ -1167,8 +1288,9 @@ const DEV_SENIOR_README = `# Senior Developer (10+ years exp)
1167
1288
 
1168
1289
  - [ ] **Read Technical BA spec**: API, schema, team breakdown
1169
1290
  - [ ] **Implement feature**: Code per spec; follow Tech Lead stack
1291
+ - [ ] **Security practices (Shift Left)**: Input validation, parameterized queries, no hardcoded secrets, follow Architect's security ADR
1170
1292
  - [ ] **Unit tests**: Coverage **≥ 90%**; edge cases, error paths
1171
- - [ ] **PR**: Lint, tests passing; request Tech Lead review
1293
+ - [ ] **PR**: Lint, tests, security scan passing; request Tech Lead review
1172
1294
  - [ ] **Output**: Code + implementation notes in \`dev/senior-developer/\`
1173
1295
  `;
1174
1296
 
@@ -1302,4 +1424,22 @@ const DEV_PLATFORM_README = `# Senior Platform (10+ years exp) — infra, CI/CD
1302
1424
  - [ ] **Output**: Pipelines, infra code, runbooks in \`dev/platform/\`
1303
1425
  `;
1304
1426
 
1427
+ const MAINTENANCE_README = `# Maintenance
1428
+
1429
+ **When:** After Deploy — ongoing throughout the product lifecycle.
1430
+
1431
+ **Role:** Monitor production health, fix bugs, apply patches, upgrade dependencies, and evolve features based on user feedback.
1432
+
1433
+ ## Detailed tasks
1434
+
1435
+ - [ ] **Monitoring setup**: Health checks, error tracking (Sentry, Datadog, etc.), alerting, SLA dashboards
1436
+ - [ ] **Bug triage**: Prioritize production bugs; severity classification (P0–P3)
1437
+ - [ ] **Bug fixes**: Follow Dev workflow (branch → fix → unit test → PR → review → deploy)
1438
+ - [ ] **Dependency updates**: Regular security patches, library upgrades; run audit tools
1439
+ - [ ] **Performance tuning**: Monitor metrics vs NFR targets; optimize bottlenecks
1440
+ - [ ] **Feature iteration**: Small enhancements from user feedback → loop back to PO for new epics if scope is significant
1441
+ - [ ] **Documentation**: Keep runbooks, incident logs, and post-mortems up to date
1442
+ - [ ] **Output**: Patches, updates, runbooks in \`docs/sdlc/maintenance/\`
1443
+ `;
1444
+
1305
1445
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdlc-workflow",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "Scaffold SDLC workflow docs and templates for Cursor, Claude, and dev teams",
5
5
  "type": "module",
6
6
  "bin": {