sdlc-workflow 1.2.0 → 1.2.2

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 +15 -8
  2. package/bin/cli.js +119 -88
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -5,12 +5,13 @@ 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 + UAT) → Security + PE audit → [fix loop until no issues] → Deploy → Maintenance
8
+ User Request → PO → Business BA → Design (if app/web) → Architect → Technical BA → QE (docs) → Dev → QE (testing + UAT) → [bug-fix loop until 0 bugs] → Security + PE audit → [fix → retest → re-audit loop until 0 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
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
- - **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.
13
+ - **QE bug-fix loop:** After QE finds bugs → Dev fixes → QE retests repeat until 0 open bugs.
14
+ - **Security + Principle Engineer:** After QE sign-off (0 bugs) → security + logic audit; **fix → retest → re-audit loop** (Dev fixes → QE retests → re-audit) until 0 issues/vulnerabilities; sign-off before Deploy.
14
15
  - **Each role runs as a sub-agent** (see `docs/sdlc/agents/`).
15
16
  - **After completion** → deploy immediately with **Docker Compose** (local/staging) and **Kubernetes** (production) — `docs/sdlc/deploy/`.
16
17
  - **Maintenance:** After Deploy → monitoring, bug fixes, patches, dependency updates, performance tuning — `docs/sdlc/maintenance/`.
@@ -20,22 +21,28 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
20
21
 
21
22
  ## Usage
22
23
 
24
+ ### `init` — Project setup
25
+
23
26
  In your project directory:
24
27
 
25
28
  ```bash
26
29
  npx sdlc-workflow init
27
30
  ```
28
31
 
29
- This creates:
30
-
31
- **Project:**
32
+ Creates project-level files:
32
33
  - `docs/sdlc/` — SDLC docs, templates, and phase folders
33
- - `AGENTS.md` — Antigravity, Codex (universal project guidance)
34
- - `.agents/skills/sdlc-workflow/` — Codex repo skill
35
34
  - `.cursor/rules/sdlc-workflow.mdc` — Cursor rule
36
35
  - `.claude/CLAUDE.md` — Claude Code instructions
36
+ - `AGENTS.md` — Antigravity, Codex (universal project guidance)
37
+ - `.agents/skills/sdlc-workflow/` — Codex repo skill
38
+
39
+ ### `install` — Global setup
40
+
41
+ ```bash
42
+ npx sdlc-workflow install
43
+ ```
37
44
 
38
- **Global (user home):**
45
+ Installs global skills (run once per machine):
39
46
  - `~/.cursor/skills/sdlc-workflow/` — Cursor skill
40
47
  - `~/.codex/AGENTS.md` — Codex global instructions
41
48
  - `~/.agents/skills/sdlc-workflow/` — Codex global skill
package/bin/cli.js CHANGED
@@ -21,36 +21,50 @@ async function main() {
21
21
  process.exit(0);
22
22
  }
23
23
 
24
- if (command !== "init") {
25
- console.log("Usage: npx sdlc-workflow <command>");
26
- console.log("");
27
- console.log("Commands:");
28
- console.log(" init Scaffold SDLC docs and templates (Cursor, Claude, Antigravity, Codex)");
29
- console.log(" version Print current version");
30
- console.log("");
31
- console.log("Examples:");
32
- console.log(" npx sdlc-workflow init");
33
- console.log(" npx sdlc-workflow version");
34
- process.exit(1);
24
+ if (command === "init") {
25
+ console.log("Scaffolding SDLC workflow (project)...\n");
26
+ try {
27
+ await scaffold(cwd);
28
+ await installClaudeSkill(cwd);
29
+ await installAgentsMd(cwd);
30
+ console.log("\nDone.");
31
+ console.log(" - Project: docs/sdlc/, .cursor/rules/, .claude/, AGENTS.md, .agents/skills/");
32
+ console.log("\nRun `npx sdlc-workflow install` to set up global skills (Cursor, Codex).");
33
+ } catch (err) {
34
+ console.error("Error:", err.message);
35
+ process.exit(1);
36
+ }
37
+ return;
35
38
  }
36
39
 
37
- console.log("Scaffolding SDLC workflow...\n");
38
-
39
- try {
40
- const home = homedir();
41
- await scaffold(cwd);
42
- await installCursorSkill(home);
43
- await installClaudeSkill(cwd);
44
- await installAgentsMd(cwd);
45
- await installCodexSkill(home);
46
- console.log("\nDone.");
47
- console.log(" - Project: docs/sdlc/, .cursor/rules/, .claude/, AGENTS.md, .agents/skills/");
48
- console.log(" - Cursor: ~/.cursor/skills/sdlc-workflow/");
49
- console.log(" - Codex: ~/.codex/AGENTS.md, ~/.agents/skills/sdlc-workflow/");
50
- } catch (err) {
51
- console.error("Error:", err.message);
52
- process.exit(1);
40
+ if (command === "install") {
41
+ console.log("Installing SDLC workflow (global)...\n");
42
+ try {
43
+ const home = homedir();
44
+ await installCursorSkill(home);
45
+ await installCodexSkill(home);
46
+ console.log("\nDone.");
47
+ console.log(" - Cursor: ~/.cursor/skills/sdlc-workflow/");
48
+ console.log(" - Codex: ~/.codex/AGENTS.md, ~/.agents/skills/sdlc-workflow/");
49
+ } catch (err) {
50
+ console.error("Error:", err.message);
51
+ process.exit(1);
52
+ }
53
+ return;
53
54
  }
55
+
56
+ console.log("Usage: npx sdlc-workflow <command>");
57
+ console.log("");
58
+ console.log("Commands:");
59
+ console.log(" init Scaffold SDLC docs and templates into current project");
60
+ console.log(" install Install global skills (Cursor, Codex) to home directory");
61
+ console.log(" version Print current version");
62
+ console.log("");
63
+ console.log("Examples:");
64
+ console.log(" npx sdlc-workflow init # project-level setup");
65
+ console.log(" npx sdlc-workflow install # global setup (~/.cursor, ~/.codex, ~/.agents)");
66
+ console.log(" npx sdlc-workflow version");
67
+ process.exit(1);
54
68
  }
55
69
 
56
70
  async function installCursorSkill(home) {
@@ -247,10 +261,10 @@ globs: docs/sdlc/**/*, **/*.md
247
261
  5. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
248
262
  6. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
249
263
  7. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + implementation roles → docs/sdlc/dev/{role}/
250
- 8. **QE (testing + UAT)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) + UAT → docs/sdlc/qe/{epic-slug}/
264
+ 8. **QE (testing + UAT)** — QE Lead + Senior QE + UAT; **bug-fix loop** (bugs → Dev fix → QE retest) until 0 bugs → docs/sdlc/qe/{epic-slug}/
251
265
  9. **Security** — Audit security risk → docs/sdlc/security/
252
266
  10. **Principle Engineer** — Audit logic, architecture → docs/sdlc/principle-engineer/
253
- 11. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/ (after Security + PE sign-off; fix loop until no issues)
267
+ 11. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/ (after Security + PE sign-off; fix → retest → re-audit loop until 0 issues)
254
268
  12. **Maintenance** — Monitoring, bug fixes, patches, dependency updates → docs/sdlc/maintenance/
255
269
 
256
270
  **Each role runs as a sub-agent.** Design before Architect (UX drives tech). See docs/sdlc/agents/
@@ -271,7 +285,7 @@ Sequential workflow; **each role runs as a sub-agent**. Each phase produces docs
271
285
  **When the user sends an idea, feature request, or new requirement:**
272
286
  1. **Trigger the pipeline** and run it **continuously through deployment** (Phase 1 → 2 → … → 7).
273
287
  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.
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.
288
+ 3. **Run in order:** PO → Business BA → **Design (if app/web, PO+BA review loop)** → Architect → Technical BA → QE (docs) → Dev → QE (testing + UAT) → **QE bug-fix loop until 0 bugs → Security + Principle Engineer audit → fix → retest → re-audit loop until 0 issues** → Deploy → Maintenance. Do not stop after one phase unless the user explicitly asks to stop.
275
289
 
276
290
  **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.
277
291
 
@@ -280,7 +294,7 @@ Sequential workflow; **each role runs as a sub-agent**. Each phase produces docs
280
294
  ## Flow Overview
281
295
 
282
296
  \`\`\`
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
297
+ User Request → PO → Business BA → Design (if app/web) → Architect → Technical BA → QE (docs) → Dev → QE (testing + UAT) → [bug-fix loop until 0 bugs] → Security + PE audit → [fix → retest → re-audit loop until 0 issues] → Deploy → Maintenance
284
298
  \`\`\`
285
299
 
286
300
  **Determine current phase** before acting. If user sent an idea, assume Phase 0 and start from Phase 1.
@@ -308,7 +322,7 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
308
322
 
309
323
  **When:** Project has UI (web, mobile app). Skip for API-only, library, CLI, data/ML, platform without UI.
310
324
 
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.
325
+ **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. **Anti AI pattern**: designs must NOT look AI-generated.
312
326
  **Output**: \`docs/sdlc/design/{epic-slug}/\` — design-spec.md + optional wireframes/.
313
327
 
314
328
  **Review loop:**
@@ -321,6 +335,7 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
321
335
 
322
336
  **Role**: Design system architecture and technology choices.
323
337
  **Deliverables**: System context, container diagram, ADRs, tech stack, cross-cutting concerns.
338
+ **Engineering principles**: SOLID, DRY, KISS, SoC, High Availability, CQRS, Zero Trust, EDA, Statelessness, Disposability, Backing Services, Config, Codebase, Database Sharding/Partitioning, Logging & Tracing, Monitoring & Alerting.
324
339
  **Input**: Business BA + Design (if app/web) — design informs architecture.
325
340
  **Output**: \`docs/sdlc/architecture/\` — **Handoff to Technical BA.**
326
341
 
@@ -351,29 +366,30 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
351
366
  - **Senior Data/ML (10+ yrs)**: ETL, models. Docs: \`docs/sdlc/dev/data-ml/\`
352
367
  - **Senior Platform (10+ yrs)**: Infra, CI/CD. Docs: \`docs/sdlc/dev/platform/\`
353
368
 
354
- **Requirements**: Unit Test coverage **≥ 90%**.
369
+ **Requirements**: Unit Test coverage **≥ 90%** (TDD/BDD); Clean Code, SOLID, DRY, KISS, SoC, POLS.
355
370
 
356
371
  **Output**: Code + unit tests. **Handoff to QE (testing + UAT).**
357
372
 
358
- ## Phase 6: QE (Testing phase — automation)
373
+ ## Phase 6: QE (Testing phase — automation + UAT) → bug-fix loop
359
374
 
360
375
  **Trigger**: After Dev completes unit tests.
361
- **Role**: Write and run **automation tests**, sign-off.
376
+ **Role**: Write and run **automation tests** + **UAT**, sign-off.
362
377
 
363
378
  **Roles**:
364
379
  - **QE Lead (15+ yrs automation)**: Test strategy, framework choice, automation architecture, review test code. Output per epic: \`docs/sdlc/qe/{epic-slug}/\`
365
380
  - **Senior QE (10+ yrs)**: Write automation tests per QE Lead's strategy. Output per epic: \`docs/sdlc/qe/{epic-slug}/\` (e.g. automation/ or test files there)
381
+ - **UAT**: Verify implementation against original user stories and acceptance criteria from PO.
366
382
 
367
- **Output**: Automation tests, test report. **Handoff to Security + Principle Engineer.**
383
+ **Bug-fix loop**: If QE finds bugs or test failures **Dev fixes** → **QE retests**. **Repeat until all tests pass and UAT approved (0 open bugs).** Only then → **Handoff to Security + Principle Engineer.**
368
384
 
369
- ## Phase 8: Security + Principle Engineer (audit → fix loop)
385
+ ## Phase 8: Security + Principle Engineer (audit → fix → retest → re-audit loop)
370
386
 
371
- **Trigger**: After QE testing sign-off.
387
+ **Trigger**: After QE testing sign-off (0 open bugs).
372
388
  **Roles** (can run in parallel):
373
389
  - **Security team**: Audit security risk (OWASP, auth, secrets, infra). Output: \`docs/sdlc/security/\`
374
390
  - **Principle Engineer**: Audit logic, architecture alignment, correctness. Output: \`docs/sdlc/principle-engineer/\`
375
391
 
376
- **Fix loop**: If issues found → **Dev fixes** → re-audit by Security + Principle Engineer. **Repeat until all issues resolved.** Only when sign-off → **Handoff to Deploy.**
392
+ **Fix → retest → re-audit loop**: If issues/vulnerabilities found → **Dev fixes** → **QE retests** (verify fix, no regression) → **Security + PE re-audit**. **Repeat until 0 issues/vulnerabilities remain.** Only when sign-off → **Handoff to Deploy.**
377
393
 
378
394
  ## Phase 9: Deploy
379
395
 
@@ -386,15 +402,15 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
386
402
  | Phase | Role | Key Output |
387
403
  |-------|------|------------|
388
404
  | 0 | Discovery | Raw request |
389
- | 1 | PO | PRD, user stories |
390
- | 2 | Business BA | FRS, process flows |
405
+ | 1 | PO | PRD, user stories, feasibility assessment |
406
+ | 2 | Business BA | FRS, NFR, process flows |
391
407
  | 3 | Design (if app/web) | Design specs + wireframes; PO+BA review until approved |
392
- | 4 | Architect | ADRs, system diagrams |
408
+ | 4 | Architect | ADRs, system diagrams, security by design |
393
409
  | 5 | Technical BA | API specs, tech breakdown |
394
410
  | 6 | QE (docs) | Test plan, test cases |
395
- | 7 | Dev | Code, unit tests (≥90%) |
396
- | 8 | QE (testing + UAT) | QE Lead (15+ yrs automation) + Senior QE (10+ yrs), automation, UAT, sign-off |
397
- | 9 | Security + Principle Engineer | Security + logic audit; fix loop until all issues resolved; sign-off → Deploy |
411
+ | 7 | Dev | Code, unit tests (≥90%), security shift-left |
412
+ | 8 | QE (testing + UAT) | Automation, UAT; **bug-fix loop** (QE finds bugs Dev fix → QE retest) until 0 open bugs |
413
+ | 9 | Security + PE | Audit; **fix retest → re-audit loop** (Dev fix QE retest → re-audit) until 0 issues; sign-off → Deploy |
398
414
  | 10 | Deploy | Docker Compose + K8s |
399
415
  | 11 | Maintenance | Monitoring, bug fixes, patches, dependency updates |
400
416
 
@@ -442,7 +458,7 @@ TC-001: [Scenario] — Precondition, Steps, Expected, Links to AC
442
458
  ## Security + Principle Engineer (after implementation)
443
459
  - Security team: audit security risk → docs/sdlc/security/
444
460
  - Principle Engineer: audit logic, architecture → docs/sdlc/principle-engineer/
445
- - **Fix loop**: If issues → Dev fixes → re-audit; repeat until all resolved. Sign-off → Deploy
461
+ - **Fix loop**: If issues → Dev fixes → QE retests → re-audit; repeat until 0 issues. Sign-off → Deploy
446
462
 
447
463
  ## Deploy
448
464
  After Security + Principle Engineer sign-off → Docker Compose + K8s. See docs/sdlc/deploy/
@@ -459,13 +475,13 @@ When working on requirements, features, or handoffs, follow these phases:
459
475
 
460
476
  1. **PO** — PRD, user stories → docs/sdlc/po/{epic-slug}/ (one folder per epic)
461
477
  2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/{epic-slug}/ (one folder per epic)
462
- 3. **Design (if app/web)** — Design specs + wireframes → docs/sdlc/design/{epic-slug}/; **PO + BA review** until approved
478
+ 3. **Design (if app/web)** — Design specs + wireframes (**Anti AI**: no AI-looking designs) → docs/sdlc/design/{epic-slug}/; **PO + BA review** until approved
463
479
  4. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
464
480
  5. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
465
481
  6. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one folder per epic)
466
482
  7. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
467
- 8. **QE (testing + UAT)** — QE Lead (15+ yrs automation) + Senior QE (10+ yrs) + UAT → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
468
- 9. **Security + Principle Engineer** — Security + logic audit; **fix loop** (Dev fixes → re-audit) until all issues resolved; sign-off before Deploy
483
+ 8. **QE (testing + UAT)** — QE Lead + Senior QE + UAT; **bug-fix loop** (bugs → Dev fix → QE retest) until 0 bugs → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
484
+ 9. **Security + Principle Engineer** — Security + logic audit; **fix → retest → re-audit loop** (Dev fixes → QE retests → re-audit) until 0 issues; sign-off before Deploy
469
485
  10. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
470
486
  11. **Maintenance** — Monitoring, bug fixes, patches, dependency updates → docs/sdlc/maintenance/
471
487
 
@@ -478,13 +494,13 @@ const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
478
494
 
479
495
  1. **PO** — PRD, user stories, feasibility assessment → docs/sdlc/po/{epic-slug}/ (one folder per epic)
480
496
  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/
497
+ 3. **Design (if app/web)** — Design specs + wireframes (**Anti AI**: no AI-looking designs) → docs/sdlc/design/{epic-slug}/; **PO + BA review** until approved
498
+ 4. **Architect** — ADRs, diagrams, security by design, engineering principles (SOLID, DRY, KISS, CQRS, Zero Trust, EDA, HA) → docs/sdlc/architecture/
483
499
  5. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
484
500
  6. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/{epic-slug}/ (one 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)
487
- 9. **Security + Principle Engineer** — Security + logic audit; **fix loop** (Dev fixes → re-audit) until all issues resolved; sign-off before Deploy
501
+ 7. **Dev** — After docs phase → **run implementation immediately**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/. Clean Code, SOLID, DRY, KISS, TDD/BDD. Security shift-left: OWASP checks, dependency audit in CI
502
+ 8. **QE (testing + UAT)** — QE Lead + Senior QE + UAT; **bug-fix loop** (bugs → Dev fix → QE retest) until 0 bugs → docs/sdlc/qe/{epic-slug}/ (same folder per epic)
503
+ 9. **Security + Principle Engineer** — Security + logic audit; **fix → retest → re-audit loop** (Dev fixes → QE retests → re-audit) until 0 issues; sign-off before Deploy
488
504
  10. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
489
505
  11. **Maintenance** — Monitoring, bug fixes, patches, dependency updates → docs/sdlc/maintenance/
490
506
 
@@ -505,7 +521,7 @@ For Cursor, see .cursor/rules/sdlc-workflow.mdc
505
521
  ## Flow
506
522
 
507
523
  \`\`\`
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
524
+ User Request → PO → Business BA → Design (if app/web) → Architect → Technical BA → QE (docs) → Dev → QE (testing + UAT) → [bug-fix loop until 0 bugs] → Security + PE audit → [fix → retest → re-audit loop until 0 issues] → Deploy → Maintenance
509
525
  \`\`\`
510
526
 
511
527
  ## Phase Checklist
@@ -513,15 +529,15 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
513
529
  | Phase | Role | Key Output |
514
530
  |-------|------|------------|
515
531
  | 0 | Discovery | Raw request |
516
- | 1 | PO | PRD, user stories |
517
- | 2 | Business BA | FRS, process flows |
532
+ | 1 | PO | PRD, user stories, feasibility assessment |
533
+ | 2 | Business BA | FRS, NFR, process flows |
518
534
  | 3 | Design (if app/web) | Design specs + wireframes; PO+BA review until approved |
519
- | 4 | Architect | ADRs, system diagrams |
535
+ | 4 | Architect | ADRs, system diagrams, security by design |
520
536
  | 5 | Technical BA | API specs, tech breakdown |
521
537
  | 6 | QE (docs) | Test plan, test cases |
522
- | 7 | Dev | Code, unit tests (≥90%) |
523
- | 8 | QE (testing + UAT) | QE Lead (15+ yrs automation) + Senior QE (10+ yrs), automation, UAT, sign-off |
524
- | 9 | Security + Principle Engineer | Security + logic audit; fix loop until all issues resolved; sign-off → Deploy |
538
+ | 7 | Dev | Code, unit tests (≥90%), security shift-left |
539
+ | 8 | QE (testing + UAT) | Automation, UAT; **bug-fix loop** (QE finds bugs Dev fix → QE retest) until 0 open bugs |
540
+ | 9 | Security + PE | Audit; **fix retest → re-audit loop** (Dev fix QE retest → re-audit) until 0 issues; sign-off → Deploy |
525
541
  | 10 | Deploy | Docker Compose + K8s |
526
542
  | 11 | Maintenance | Monitoring, bug fixes, patches, dependency updates |
527
543
 
@@ -538,13 +554,13 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
538
554
  - Output: \`docs/sdlc/ba/business/{epic-slug}/\` — **one folder per epic** (same slug as PO); do not merge into one file
539
555
 
540
556
  ### Phase 3: Design (optional — app/web only)
541
- - Create design specs (Markdown) + optional HTML wireframes based on idea + PO + BA docs. **Design before Architect so UX drives tech.**
557
+ - Create design specs (Markdown) + optional HTML wireframes based on idea + PO + BA docs. **Design before Architect so UX drives tech.** **Anti AI pattern**: designs must NOT look AI-generated — prioritize unique, human-feeling aesthetics.
542
558
  - Output: \`docs/sdlc/design/{epic-slug}/\` — design-spec.md + optional wireframes/
543
559
  - **PO + Business BA review**: Both check design vs epic/FRS; if not aligned → feedback → redesign loop until approved
544
560
  - When approved → handoff to Architect
545
561
 
546
562
  ### Phase 4: Architect
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)
563
+ - System context, container diagram, ADRs, tech stack, **security by design** (threat model, auth architecture, encryption, secrets mgmt). **Engineering principles**: SOLID, DRY, KISS, SoC, High Availability, CQRS, Zero Trust, EDA, Statelessness, Backing Services, Config, Logging & Tracing, Monitoring & Alerting. Input: Business BA (FR + NFR) + Design (if app/web)
548
564
  - Output: \`docs/sdlc/architecture/\`
549
565
 
550
566
  ### Phase 5: Technical BA
@@ -559,19 +575,20 @@ User Request → PO → Business BA → Design (if app/web) → Architect → Te
559
575
  ### Phase 5b: Dev Teams
560
576
  - **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/\`
561
577
  - **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\`.
562
- - **Requirement**: Unit Test coverage **≥ 90%**; security practices (input validation, no hardcoded secrets)
578
+ - **Requirement**: Unit Test coverage **≥ 90%** (TDD/BDD); Clean Code, SOLID, DRY, KISS, SoC, POLS; security practices (input validation, no hardcoded secrets)
563
579
  - **Then**: QE starts testing phase
564
580
 
565
- ### Phase 6: QE (Testing — automation + UAT)
581
+ ### Phase 6: QE (Testing — automation + UAT) → bug-fix loop
566
582
  - **QE Lead (15+ yrs automation)**: Test strategy, framework choice, automation architecture; review test code. Output per epic: \`docs/sdlc/qe/{epic-slug}/\`
567
583
  - **Senior QE (10+ yrs)**: Write automation tests per QE Lead's strategy. Output per epic: \`docs/sdlc/qe/{epic-slug}/\`
568
584
  - **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\`
569
- - **Handoff to Security + Principle Engineer**
585
+ - **Bug-fix loop**: If QE finds bugs or test failures → **Dev fixes** → **QE retests**. **Repeat until all tests pass and UAT approved (0 open bugs).** Only then → handoff to Security + PE
586
+ - **Handoff to Security + Principle Engineer** (only after 0 open bugs)
570
587
 
571
- ### Phase 7: Security + Principle Engineer (audit → fix loop)
588
+ ### Phase 7: Security + Principle Engineer (audit → fix → retest loop)
572
589
  - **Security team**: Audit security risk (OWASP, auth, secrets, infra). Output: \`docs/sdlc/security/\`
573
590
  - **Principle Engineer**: Audit logic, architecture alignment, correctness. Output: \`docs/sdlc/principle-engineer/\`
574
- - **Fix loop**: If issues found → Dev fixes → Security + PE re-audit. **Repeat until all issues resolved.** Sign-off → **Handoff to Deploy**
591
+ - **Fix → retest → re-audit loop**: If issues/vulnerabilities found → **Dev fixes****QE retests** (verify fix, no regression) → **Security + PE re-audit**. **Repeat until 0 issues/vulnerabilities remain.** Sign-off → **Handoff to Deploy**
575
592
 
576
593
  ### Phase 8: Deploy
577
594
  - After Security + Principle Engineer sign-off → deploy with **Docker Compose** (local/staging) and **Kubernetes** (production)
@@ -611,8 +628,8 @@ There is **one agent** per conversation. It simulates the pipeline by **adopting
611
628
  - [ ] Phase 5 Technical BA: \`docs/sdlc/ba/technical/\`
612
629
  - [ ] Phase 6 QE docs: \`docs/sdlc/qe/{epic-slug}/\` (one folder per epic)
613
630
  - [ ] Phase 7 Dev: code + unit tests, \`docs/sdlc/dev/\`
614
- - [ ] Phase 8 QE testing + UAT: automation, UAT against user stories, sign-off → \`docs/sdlc/qe/{epic-slug}/\`
615
- - [ ] Phase 9 Security + Principle Engineer: \`docs/sdlc/security/\`, \`docs/sdlc/principle-engineer/\`; fix loop until no issues; sign-off
631
+ - [ ] Phase 8 QE testing + UAT: automation, UAT; **bug-fix loop** (bugs Dev fix QE retest) until 0 open bugs → \`docs/sdlc/qe/{epic-slug}/\`
632
+ - [ ] Phase 9 Security + Principle Engineer: audit → **fix → retest → re-audit loop** until 0 issues/vulnerabilities; sign-off → \`docs/sdlc/security/\`, \`docs/sdlc/principle-engineer/\`
616
633
  - [ ] Phase 10 Deploy: \`docs/sdlc/deploy/\`, Docker Compose + K8s
617
634
  - [ ] Phase 11 Maintenance: monitoring, bug fixes, patches, dependency updates → \`docs/sdlc/maintenance/\`
618
635
  `;
@@ -630,8 +647,8 @@ Deploy: docs/sdlc/deploy/ (Docker Compose + K8s)
630
647
  - **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.
631
648
  - **Design (if app/web)**: \`docs/sdlc/design/{epic-slug}/\` — design specs (Markdown) + optional HTML wireframes; PO+BA review until approved.
632
649
  - **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.
633
- - **Security**: \`docs/sdlc/security/\` — security audit; fix loop until no issues
634
- - **Principle Engineer**: \`docs/sdlc/principle-engineer/\` — logic audit; fix loop until no issues
650
+ - **Security**: \`docs/sdlc/security/\` — security audit; fix → retest → re-audit loop until 0 issues
651
+ - **Principle Engineer**: \`docs/sdlc/principle-engineer/\` — logic audit; fix → retest → re-audit loop until 0 issues
635
652
  - **Maintenance**: \`docs/sdlc/maintenance/\` — monitoring, bug fixes, patches, runbooks
636
653
  `;
637
654
 
@@ -657,9 +674,9 @@ Every role in the SDLC runs as a **sub-agent**. Each phase is assigned to a corr
657
674
  | Senior Platform | platform | Infra spec | CI/CD, observability, docs/sdlc/dev/platform/ |
658
675
  | QE Lead | qe-lead | Test plan | 15+ yrs automation: strategy, framework, review → docs/sdlc/qe/{epic-slug}/ |
659
676
  | Senior QE | senior-qe | Test plan + framework | Automation tests → docs/sdlc/qe/{epic-slug}/ |
660
- | Security | security | Code, infra | Security audit → docs/sdlc/security/; fix loop until no issues |
661
- | Principle Engineer | principle-engineer | Code, architecture | Logic audit → docs/sdlc/principle-engineer/; fix loop until no issues |
662
- | Deploy | deploy | Security + PE sign-off (after fix loop) | Docker Compose + K8s, docs/sdlc/deploy/ |
677
+ | Security | security | Code, infra | Security audit → docs/sdlc/security/; fix → retest → re-audit loop until 0 issues |
678
+ | Principle Engineer | principle-engineer | Code, architecture | Logic audit → docs/sdlc/principle-engineer/; fix → retest → re-audit loop until 0 issues |
679
+ | Deploy | deploy | Security + PE sign-off (after 0 issues) | Docker Compose + K8s, docs/sdlc/deploy/ |
663
680
  | Maintenance | maintenance | Live application | Monitoring, bug fixes, patches, docs/sdlc/maintenance/ |
664
681
 
665
682
  Orchestrator: run each sub-agent in order; hand off output → input of the next sub-agent.
@@ -669,11 +686,11 @@ Orchestrator: run each sub-agent in order; hand off output → input of the next
669
686
 
670
687
  const SECURITY_README = `# Security Team
671
688
 
672
- **When:** After implementation (Dev) and QE testing. **Before** Deploy.
689
+ **When:** After implementation (Dev) and QE testing (0 open bugs). **Before** Deploy.
673
690
 
674
691
  **Role:** Audit security risk in code, APIs, infra, and configuration. Identify vulnerabilities and recommend mitigations.
675
692
 
676
- **Fix loop:** If issues found → Dev fixes → re-audit. Repeat until all issues resolved; then sign-off to Deploy.
693
+ **Fix → retest → re-audit loop:** If issues/vulnerabilities found → **Dev fixes****QE retests** (verify fix, no regression) → **Security re-audit**. Repeat until 0 issues/vulnerabilities remain; then sign-off to Deploy.
677
694
 
678
695
  ## Detailed tasks
679
696
 
@@ -681,16 +698,16 @@ const SECURITY_README = `# Security Team
681
698
  - [ ] **Security audit**: OWASP Top 10, auth/authz, injection, XSS, CSRF, secrets exposure, dependency vulns
682
699
  - [ ] **Infra/ops security**: Network, TLS, RBAC, secrets management
683
700
  - [ ] **Report**: Findings, severity, remediation; output to \`docs/sdlc/security/\`
684
- - [ ] **Fix loop**: If critical/high issues found → Dev fixes → re-audit. **Repeat until all issues resolved**; then sign-off to Deploy.
701
+ - [ ] **Fix → retest → re-audit loop**: If issues found → Dev fixes → **QE retests** (confirm fix, no regression) → Security re-audit. **Repeat until 0 issues/vulnerabilities remain**; then sign-off to Deploy.
685
702
  `;
686
703
 
687
704
  const PRINCIPLE_ENGINEER_README = `# Principle Engineer
688
705
 
689
- **When:** After implementation (Dev) and QE testing. **Before** Deploy.
706
+ **When:** After implementation (Dev) and QE testing (0 open bugs). **Before** Deploy.
690
707
 
691
708
  **Role:** Audit logic, architecture alignment, design decisions, and technical quality. Ensure correctness and consistency with specs.
692
709
 
693
- **Fix loop:** If issues found → Dev fixes → re-audit. Repeat until all issues resolved; then sign-off to Deploy.
710
+ **Fix → retest → re-audit loop:** If issues found → **Dev fixes****QE retests** (verify fix, no regression) → **PE re-audit**. Repeat until 0 issues remain; then sign-off to Deploy.
694
711
 
695
712
  ## Detailed tasks
696
713
 
@@ -698,12 +715,12 @@ const PRINCIPLE_ENGINEER_README = `# Principle Engineer
698
715
  - [ ] **Logic audit**: Business logic correctness, edge cases, error handling, data flow
699
716
  - [ ] **Architecture audit**: Alignment with ADRs, patterns, scalability, maintainability
700
717
  - [ ] **Report**: Findings, recommendations; output to \`docs/sdlc/principle-engineer/\`
701
- - [ ] **Fix loop**: If critical logic/arch issues found → Dev fixes → re-audit. **Repeat until all issues resolved**; then sign-off to Deploy.
718
+ - [ ] **Fix → retest → re-audit loop**: If logic/arch issues found → Dev fixes → **QE retests** (confirm fix, no regression) → PE re-audit. **Repeat until 0 issues remain**; then sign-off to Deploy.
702
719
  `;
703
720
 
704
721
  const DEPLOY_README = `# Deploy
705
722
 
706
- After the pipeline completes (Security + Principle Engineer sign-off, after fix loop until no issues), deploy immediately with:
723
+ After the pipeline completes (Security + Principle Engineer sign-off, after fix → retest → re-audit loop until 0 issues), deploy immediately with:
707
724
 
708
725
  **After Deploy → Maintenance phase**: monitoring, bug fixes, patches, dependency updates.
709
726
 
@@ -845,6 +862,7 @@ const PO_README = `# PO (Product Owner)
845
862
  - [ ] **Prioritize**: Must / Should / Could have; order by value and risk
846
863
  - [ ] **Identify dependencies**: External teams, systems, blockers
847
864
  - [ ] **Call out risks**: Technical, schedule, compliance
865
+ - [ ] **Feasibility assessment**: Evaluate technical feasibility, resource availability, timeline viability, and budget constraints. Flag blockers early. Document go/no-go recommendation
848
866
  - [ ] **Handoff to Business BA**: Deliverables in \`po/{epic-slug}/\`
849
867
 
850
868
  Use epic-brief.template.md as starting point for each epic.
@@ -1058,6 +1076,7 @@ Use adr.template.md for new ADRs.
1058
1076
  - [ ] **ADR per decision**: Context, decision, consequences (scope: backend, frontend, mobile, etc.)
1059
1077
  - [ ] **Non-functional alignment**: Performance, security, scalability, compliance — reference NFRs from Business BA
1060
1078
  - [ ] **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
1079
+ - [ ] **Engineering principles alignment**: Verify architecture follows — SOLID, DRY, KISS, SoC, LoD, CoI, GRASP, High Availability, CQRS (if applicable), Zero Trust, EDA (if applicable), Statelessness, Disposability, Backing Services, Config (externalize), Database Sharding/Partitioning (if applicable), Codebase (single per service), Logging & Tracing, Monitoring & Alerting
1061
1080
  - [ ] **Handoff to Technical BA**: Architecture docs, ADRs in \`architecture/\`
1062
1081
  `;
1063
1082
 
@@ -1099,7 +1118,8 @@ const QE_README = `# QE (Quality Engineering)
1099
1118
  - [ ] **QE Lead**: Test strategy, framework, review test code
1100
1119
  - [ ] **Senior QE**: Write automation tests per test plan
1101
1120
  - [ ] **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\`
1102
- - [ ] **Sign-off**: Regression, coverage, UAT pass, release readiness in \`qe/{epic-slug}/\`
1121
+ - [ ] **Bug-fix loop**: If bugs or test failures found → **Dev fixes** → **QE retests**. **Repeat until all tests pass and UAT approved (0 open bugs)**. Only then → handoff to Security + PE
1122
+ - [ ] **Sign-off**: Regression pass, coverage met, UAT approved, 0 open bugs → release readiness in \`qe/{epic-slug}/\`
1103
1123
 
1104
1124
  Example:
1105
1125
  \`\`\`
@@ -1166,6 +1186,8 @@ const DESIGN_README = `# Design (optional — app/web projects only)
1166
1186
 
1167
1187
  **Why before Architect:** UX drives technical decisions — design informs architecture and API specs.
1168
1188
 
1189
+ **Anti AI pattern:** Designs must NOT look like they were generated by AI. Avoid generic, templated, overly symmetric, cookie-cutter layouts. Prioritize personality, asymmetry, intentional whitespace, brand-specific visual language, and human-feeling aesthetics.
1190
+
1169
1191
  **One folder per epic:** \`docs/sdlc/design/{epic-slug}/\` — same slug as PO/BA. Store design specs and wireframes there.
1170
1192
 
1171
1193
  ## Output format
@@ -1182,6 +1204,7 @@ const DESIGN_README = `# Design (optional — app/web projects only)
1182
1204
 
1183
1205
  ## Detailed tasks
1184
1206
 
1207
+ - [ ] **Anti AI check**: Ensure design does NOT look AI-generated — no generic hero sections, stock illustrations, perfectly symmetric grids, or bland templates. Aim for unique, human-feeling aesthetics
1185
1208
  - [ ] **Gather context**: Read PO epic brief, BA FRS, user stories as input
1186
1209
  - [ ] **Screen inventory**: List all screens/pages with purpose and key elements
1187
1210
  - [ ] **Component hierarchy**: Define reusable components, layout structure, navigation
@@ -1253,6 +1276,13 @@ App
1253
1276
  - **Typography:** ...
1254
1277
  - **Spacing:** ...
1255
1278
 
1279
+ ## Anti AI Checklist
1280
+ - [ ] No generic/templated layouts — design feels unique and intentional
1281
+ - [ ] No stock AI illustrations — use real or custom imagery
1282
+ - [ ] Asymmetry and visual interest — not perfectly symmetric grids
1283
+ - [ ] Brand-specific colors, typography, spacing — not default palettes
1284
+ - [ ] Human-feeling micro-interactions and copy
1285
+
1256
1286
  ## Notes
1257
1287
  [Any additional context, constraints, or decisions]
1258
1288
  `;
@@ -1273,6 +1303,7 @@ const DEV_TECH_LEAD_README = `# Tech Lead (15+ years exp)
1273
1303
  - [ ] **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
1274
1304
  - [ ] **Merge approval**: Enforce quality gates before merge (tests, coverage, security scan pass)
1275
1305
  - [ ] **Tech guidance**: Resolve technical disputes; mentor team
1306
+ - [ ] **Engineering principles enforcement**: Code review must verify — Clean Code, SOLID, DRY, KISS, SoC, LoD, CoI, GRASP, POLS, TDD/BDD. Architecture patterns: Statelessness, Disposability, Backing Services, Config externalization, Logging & Tracing, Monitoring & Alerting
1276
1307
  - [ ] **Output**: ADRs, review checklist in \`dev/tech-lead/\`
1277
1308
  `;
1278
1309
 
@@ -1286,9 +1317,9 @@ const DEV_SENIOR_README = `# Senior Developer (10+ years exp)
1286
1317
  ## Detailed tasks
1287
1318
 
1288
1319
  - [ ] **Read Technical BA spec**: API, schema, team breakdown
1289
- - [ ] **Implement feature**: Code per spec; follow Tech Lead stack
1320
+ - [ ] **Implement feature**: Code per spec; follow Tech Lead stack. Adhere to: Clean Code, SOLID, DRY, KISS, SoC, LoD, CoI, GRASP, POLS
1290
1321
  - [ ] **Security practices (Shift Left)**: Input validation, parameterized queries, no hardcoded secrets, follow Architect's security ADR
1291
- - [ ] **Unit tests**: Coverage **≥ 90%**; edge cases, error paths
1322
+ - [ ] **Unit tests (TDD/BDD)**: Coverage **≥ 90%**; TDD (write tests first) or BDD (behavior specs); edge cases, error paths, BSR (Behavior-Structure-Result)
1292
1323
  - [ ] **PR**: Lint, tests, security scan passing; request Tech Lead review
1293
1324
  - [ ] **Output**: Code + implementation notes in \`dev/senior-developer/\`
1294
1325
  `;
@@ -1335,7 +1366,7 @@ const DEV_FRONTEND_README = `# Senior Frontend (10+ years exp) — Web UI
1335
1366
  - [ ] **Read Technical BA spec**: API contract, design (if any)
1336
1367
  - [ ] **Implement components/screens**: Per spec; responsive, accessible
1337
1368
  - [ ] **API integration**: Fetch, state, error handling
1338
- - [ ] **Unit tests**: Components, hooks, utils — coverage **≥ 90%**
1369
+ - [ ] **Unit tests (TDD/BDD)**: Components, hooks, utils — coverage **≥ 90%**; follow Clean Code, SOLID, DRY, KISS
1339
1370
  - [ ] **PR**: Lint, tests; Tech Lead review
1340
1371
  - [ ] **Output**: Code + component/integration docs in \`dev/frontend/\`
1341
1372
  `;
@@ -1352,7 +1383,7 @@ const DEV_BACKEND_README = `# Senior Backend (10+ years exp) — API, services
1352
1383
  - [ ] **Read Technical BA spec**: API spec, DB schema
1353
1384
  - [ ] **Implement endpoints**: Per spec; validation, auth, error responses
1354
1385
  - [ ] **Implement DB layer**: Migrations, queries, transactions
1355
- - [ ] **Unit tests**: Services, controllers, DB — coverage **≥ 90%**
1386
+ - [ ] **Unit tests (TDD/BDD)**: Services, controllers, DB — coverage **≥ 90%**; follow Clean Code, SOLID, DRY, KISS
1356
1387
  - [ ] **PR**: Lint, tests; Tech Lead review
1357
1388
  - [ ] **Output**: Code + API/DB implementation notes in \`dev/backend/\`
1358
1389
  `;
@@ -1369,7 +1400,7 @@ const DEV_MOBILE_README = `# Senior Mobile (10+ years exp) — iOS / Android / c
1369
1400
  - [ ] **Read Technical BA spec**: API contract, screen flows
1370
1401
  - [ ] **Implement screens/modules**: Per spec; platform parity (iOS/Android)
1371
1402
  - [ ] **API integration**: Auth, state, offline (if required)
1372
- - [ ] **Unit tests**: Components, logic — coverage **≥ 90%**
1403
+ - [ ] **Unit tests (TDD/BDD)**: Components, logic — coverage **≥ 90%**; follow Clean Code, SOLID, DRY, KISS
1373
1404
  - [ ] **PR**: Lint, tests; Tech Lead review
1374
1405
  - [ ] **Output**: Code + screen/module docs in \`dev/mobile/\`
1375
1406
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdlc-workflow",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Scaffold SDLC workflow docs and templates for Cursor, Claude, and dev teams",
5
5
  "type": "module",
6
6
  "bin": {