sdlc-workflow 1.0.1 → 1.0.3
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.
- package/README.md +51 -17
- package/bin/cli.js +264 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
# sdlc-workflow
|
|
2
2
|
|
|
3
|
-
Scaffold SDLC workflow docs and templates into your project. Works with **Cursor** and **
|
|
3
|
+
Scaffold SDLC workflow docs and templates into your project. Works with **Cursor**, **Claude**, **Antigravity**, and **Codex**.
|
|
4
4
|
|
|
5
5
|
## Flow
|
|
6
6
|
|
|
7
7
|
```
|
|
8
|
-
User Request → PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy
|
|
8
|
+
User Request → PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy (Docker Compose + K8s)
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **QE (
|
|
11
|
+
- **Mỗi role chạy bằng sub-agent** (xem `docs/sdlc/agents/`).
|
|
12
|
+
- **Sau khi hoàn thành** → triển khai ngay với **Docker Compose** (local/staging) và **Kubernetes** (production) — `docs/sdlc/deploy/`.
|
|
13
|
+
- **QE (docs)**: Test plan, test cases
|
|
14
|
+
- **Dev**: Sau bước tài liệu → **run implement luôn**. Tech Lead (review, merge) + Senior Dev (implement, Unit Test ≥90%)
|
|
15
|
+
- **QE (testing)**: QE Lead (test framework, review) + Senior QE (10+ yrs, write automation tests)
|
|
14
16
|
|
|
15
17
|
## Usage
|
|
16
18
|
|
|
@@ -22,10 +24,17 @@ npx sdlc-workflow init
|
|
|
22
24
|
|
|
23
25
|
This creates:
|
|
24
26
|
|
|
27
|
+
**Project:**
|
|
25
28
|
- `docs/sdlc/` — SDLC docs, templates, and phase folders
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
- `.
|
|
29
|
+
- `AGENTS.md` — Antigravity, Codex (universal project guidance)
|
|
30
|
+
- `.agents/skills/sdlc-workflow/` — Codex repo skill
|
|
31
|
+
- `.cursor/rules/sdlc-workflow.mdc` — Cursor rule
|
|
32
|
+
- `.claude/CLAUDE.md` — Claude Code instructions
|
|
33
|
+
|
|
34
|
+
**Global (user home):**
|
|
35
|
+
- `~/.cursor/skills/sdlc-workflow/` — Cursor skill
|
|
36
|
+
- `~/.codex/AGENTS.md` — Codex global instructions
|
|
37
|
+
- `~/.agents/skills/sdlc-workflow/` — Codex global skill
|
|
29
38
|
|
|
30
39
|
## Generated Structure
|
|
31
40
|
|
|
@@ -49,25 +58,50 @@ docs/sdlc/
|
|
|
49
58
|
│ └── README.md
|
|
50
59
|
├── qe/ # QE (docs + testing)
|
|
51
60
|
│ ├── test-case.template.md
|
|
61
|
+
│ ├── README.md
|
|
62
|
+
│ ├── qe-lead/ # QE Lead: test framework, review test code
|
|
63
|
+
│ │ └── README.md
|
|
64
|
+
│ └── senior-qe/ # Senior QE 10+ yrs: write automation tests
|
|
65
|
+
│ └── README.md
|
|
66
|
+
├── dev/ # Dev team (per role)
|
|
67
|
+
│ ├── tech-lead/ # Tech Lead 15+ yrs: tech stack, review & merge
|
|
68
|
+
│ │ └── README.md
|
|
69
|
+
│ └── senior-developer/ # Senior Dev 10+ yrs: implement, Unit Test ≥90%
|
|
70
|
+
│ └── README.md
|
|
71
|
+
├── agents/ # Sub-agent specs (mỗi role = sub-agent)
|
|
52
72
|
│ └── README.md
|
|
53
|
-
└──
|
|
54
|
-
├──
|
|
55
|
-
|
|
56
|
-
└──
|
|
57
|
-
|
|
73
|
+
└── deploy/ # Sau khi hoàn thành → Docker Compose + K8s
|
|
74
|
+
├── README.md
|
|
75
|
+
├── docker-compose.yml.template
|
|
76
|
+
└── k8s/
|
|
77
|
+
├── deployment.yaml.template
|
|
78
|
+
├── service.yaml.template
|
|
79
|
+
└── ingress.yaml.template
|
|
58
80
|
|
|
59
81
|
.cursor/rules/
|
|
60
82
|
└── sdlc-workflow.mdc # Cursor rule
|
|
83
|
+
|
|
84
|
+
AGENTS.md # Antigravity, Codex (universal)
|
|
85
|
+
.agents/skills/sdlc-workflow/ # Codex repo skill
|
|
61
86
|
```
|
|
62
87
|
|
|
88
|
+
## Use with Cursor
|
|
89
|
+
|
|
90
|
+
The rule `.cursor/rules/sdlc-workflow.mdc` activates when working with `docs/sdlc/**` or `*.md`. Global skill: `~/.cursor/skills/sdlc-workflow/`.
|
|
91
|
+
|
|
63
92
|
## Use with Claude
|
|
64
93
|
|
|
65
|
-
- **Claude Code** (project): `.claude/CLAUDE.md`
|
|
66
|
-
- **Claude.ai** (web): Copy `docs/sdlc/SDLC-WORKFLOW.md` into Custom Instructions or @ mention it
|
|
94
|
+
- **Claude Code** (project): `.claude/CLAUDE.md` — Claude loads it when you open this project.
|
|
95
|
+
- **Claude.ai** (web): Copy `docs/sdlc/SDLC-WORKFLOW.md` into Custom Instructions or @ mention it.
|
|
67
96
|
|
|
68
|
-
## Use with
|
|
97
|
+
## Use with Antigravity
|
|
98
|
+
|
|
99
|
+
`AGENTS.md` at project root — Antigravity reads it (priority: AGENTS.md → GEMINI.md). Universal format, works across agentic IDEs.
|
|
100
|
+
|
|
101
|
+
## Use with Codex
|
|
69
102
|
|
|
70
|
-
|
|
103
|
+
- **Project**: `AGENTS.md` + `.agents/skills/sdlc-workflow/`
|
|
104
|
+
- **Global**: `~/.codex/AGENTS.md` + `~/.agents/skills/sdlc-workflow/`
|
|
71
105
|
|
|
72
106
|
## Release
|
|
73
107
|
|
package/bin/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ async function main() {
|
|
|
18
18
|
if (command !== "init") {
|
|
19
19
|
console.log("Usage: npx sdlc-workflow init");
|
|
20
20
|
console.log(" Scaffolds SDLC docs and templates into current project.");
|
|
21
|
-
console.log(" Installs Cursor
|
|
21
|
+
console.log(" Installs for: Cursor, Claude, Antigravity, Codex.");
|
|
22
22
|
process.exit(1);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -29,9 +29,12 @@ async function main() {
|
|
|
29
29
|
await scaffold(cwd);
|
|
30
30
|
await installCursorSkill(home);
|
|
31
31
|
await installClaudeSkill(cwd);
|
|
32
|
+
await installAgentsMd(cwd);
|
|
33
|
+
await installCodexSkill(home);
|
|
32
34
|
console.log("\nDone.");
|
|
33
|
-
console.log(" - Project: docs/sdlc/, .cursor/rules/, .claude/");
|
|
34
|
-
console.log(" - Cursor
|
|
35
|
+
console.log(" - Project: docs/sdlc/, .cursor/rules/, .claude/, AGENTS.md, .agents/skills/");
|
|
36
|
+
console.log(" - Cursor: ~/.cursor/skills/sdlc-workflow/");
|
|
37
|
+
console.log(" - Codex: ~/.codex/AGENTS.md, ~/.agents/skills/sdlc-workflow/");
|
|
35
38
|
} catch (err) {
|
|
36
39
|
console.error("Error:", err.message);
|
|
37
40
|
process.exit(1);
|
|
@@ -69,6 +72,57 @@ async function installClaudeSkill(cwd) {
|
|
|
69
72
|
console.log(" + .claude/CLAUDE.md (Claude instructions)");
|
|
70
73
|
}
|
|
71
74
|
|
|
75
|
+
async function installAgentsMd(cwd) {
|
|
76
|
+
const agentsPath = join(cwd, "AGENTS.md");
|
|
77
|
+
const content = AGENTS_MD_CONTENT;
|
|
78
|
+
if (existsSync(agentsPath)) {
|
|
79
|
+
const existing = await readFile(agentsPath, "utf8");
|
|
80
|
+
if (existing.includes("## SDLC Workflow")) {
|
|
81
|
+
console.log(" + AGENTS.md (SDLC section already present)");
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
await writeFile(agentsPath, existing.trimEnd() + "\n\n" + content, "utf8");
|
|
85
|
+
} else {
|
|
86
|
+
await writeFile(agentsPath, content, "utf8");
|
|
87
|
+
}
|
|
88
|
+
console.log(" + AGENTS.md (Antigravity, Codex project)");
|
|
89
|
+
|
|
90
|
+
const codexSkillDir = join(cwd, ".agents", "skills", "sdlc-workflow");
|
|
91
|
+
await mkdir(codexSkillDir, { recursive: true });
|
|
92
|
+
await writeFile(join(codexSkillDir, "SKILL.md"), CURSOR_SKILL_MD, "utf8");
|
|
93
|
+
await writeFile(join(codexSkillDir, "reference.md"), CURSOR_REFERENCE_MD, "utf8");
|
|
94
|
+
console.log(" + .agents/skills/sdlc-workflow/ (Codex repo skill)");
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
async function installCodexSkill(home) {
|
|
98
|
+
const codexDir = join(home, ".codex");
|
|
99
|
+
const codexAgentsPath = join(codexDir, "AGENTS.md");
|
|
100
|
+
const sdlcContent = CLAUDE_SDLC_CONTENT;
|
|
101
|
+
await mkdir(codexDir, { recursive: true });
|
|
102
|
+
if (existsSync(codexAgentsPath)) {
|
|
103
|
+
const existing = await readFile(codexAgentsPath, "utf8");
|
|
104
|
+
if (existing.includes("## SDLC Workflow")) {
|
|
105
|
+
console.log(" + ~/.codex/AGENTS.md (SDLC section already present)");
|
|
106
|
+
} else {
|
|
107
|
+
await writeFile(
|
|
108
|
+
codexAgentsPath,
|
|
109
|
+
existing.trimEnd() + "\n\n" + sdlcContent,
|
|
110
|
+
"utf8"
|
|
111
|
+
);
|
|
112
|
+
console.log(" + ~/.codex/AGENTS.md (Codex global)");
|
|
113
|
+
}
|
|
114
|
+
} else {
|
|
115
|
+
await writeFile(codexAgentsPath, sdlcContent, "utf8");
|
|
116
|
+
console.log(" + ~/.codex/AGENTS.md (Codex global)");
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const agentsSkillDir = join(home, ".agents", "skills", "sdlc-workflow");
|
|
120
|
+
await mkdir(agentsSkillDir, { recursive: true });
|
|
121
|
+
await writeFile(join(agentsSkillDir, "SKILL.md"), CURSOR_SKILL_MD, "utf8");
|
|
122
|
+
await writeFile(join(agentsSkillDir, "reference.md"), CURSOR_REFERENCE_MD, "utf8");
|
|
123
|
+
console.log(" + ~/.agents/skills/sdlc-workflow/ (Codex global skill)");
|
|
124
|
+
}
|
|
125
|
+
|
|
72
126
|
async function scaffold(cwd) {
|
|
73
127
|
const templates = join(TEMPLATES_DIR, "project");
|
|
74
128
|
if (!existsSync(templates)) {
|
|
@@ -95,8 +149,13 @@ async function generateFromInline(cwd) {
|
|
|
95
149
|
join(base, "ba", "technical"),
|
|
96
150
|
join(base, "architecture"),
|
|
97
151
|
join(base, "qe"),
|
|
152
|
+
join(base, "qe", "qe-lead"),
|
|
153
|
+
join(base, "qe", "senior-qe"),
|
|
98
154
|
join(base, "dev", "tech-lead"),
|
|
99
155
|
join(base, "dev", "senior-developer"),
|
|
156
|
+
join(base, "agents"),
|
|
157
|
+
join(base, "deploy"),
|
|
158
|
+
join(base, "deploy", "k8s"),
|
|
100
159
|
];
|
|
101
160
|
|
|
102
161
|
for (const d of dirs) {
|
|
@@ -117,8 +176,16 @@ async function generateFromInline(cwd) {
|
|
|
117
176
|
["architecture/README.md", ARCH_README],
|
|
118
177
|
["qe/test-case.template.md", QE_TC_TEMPLATE],
|
|
119
178
|
["qe/README.md", QE_README],
|
|
179
|
+
["qe/qe-lead/README.md", QE_LEAD_README],
|
|
180
|
+
["qe/senior-qe/README.md", QE_SENIOR_README],
|
|
120
181
|
["dev/tech-lead/README.md", DEV_TECH_LEAD_README],
|
|
121
182
|
["dev/senior-developer/README.md", DEV_SENIOR_README],
|
|
183
|
+
["agents/README.md", AGENTS_README],
|
|
184
|
+
["deploy/README.md", DEPLOY_README],
|
|
185
|
+
["deploy/docker-compose.yml.template", DOCKER_COMPOSE_TEMPLATE],
|
|
186
|
+
["deploy/k8s/deployment.yaml.template", K8S_DEPLOYMENT_TEMPLATE],
|
|
187
|
+
["deploy/k8s/service.yaml.template", K8S_SERVICE_TEMPLATE],
|
|
188
|
+
["deploy/k8s/ingress.yaml.template", K8S_INGRESS_TEMPLATE],
|
|
122
189
|
];
|
|
123
190
|
|
|
124
191
|
for (const [rel, content] of files) {
|
|
@@ -141,10 +208,11 @@ globs: docs/sdlc/**/*, **/*.md
|
|
|
141
208
|
3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
|
|
142
209
|
4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
|
|
143
210
|
5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/
|
|
144
|
-
6. **Dev** — Tech Lead (review, merge) + Senior Dev (implement, ≥90% unit test) → docs/sdlc/dev/{role}/
|
|
145
|
-
7. **QE (testing)** —
|
|
146
|
-
8. **Deploy** —
|
|
211
|
+
6. **Dev** — Sau bước tài liệu → **run implement ngay**. Tech Lead (review, merge) + Senior Dev (implement, ≥90% unit test) → docs/sdlc/dev/{role}/
|
|
212
|
+
7. **QE (testing)** — QE Lead (test framework, review) + Senior QE (10+ yrs, automation) → docs/sdlc/qe/{role}/
|
|
213
|
+
8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
|
|
147
214
|
|
|
215
|
+
**Mỗi role chạy bằng sub-agent.** Xem docs/sdlc/agents/
|
|
148
216
|
Full workflow: docs/sdlc/SDLC-WORKFLOW.md
|
|
149
217
|
`;
|
|
150
218
|
|
|
@@ -155,15 +223,16 @@ description: Multi-role SDLC workflow from user requirements through PO, Busines
|
|
|
155
223
|
|
|
156
224
|
# SDLC Workflow (Multi-Role)
|
|
157
225
|
|
|
158
|
-
Sequential workflow
|
|
226
|
+
Sequential workflow; **mỗi role chạy bằng sub-agent**. Each phase produces docs/artifacts for the next. Sau khi hoàn thành → triển khai với **Docker Compose** và **K8s** (docs/sdlc/deploy/).
|
|
159
227
|
|
|
160
228
|
## Flow Overview
|
|
161
229
|
|
|
162
230
|
\`\`\`
|
|
163
|
-
User Request → PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy
|
|
231
|
+
User Request → PO → Business BA → Architect → Technical BA → QE (docs) → Dev → QE (testing) → Deploy (Docker Compose + K8s)
|
|
164
232
|
\`\`\`
|
|
165
233
|
|
|
166
234
|
**Determine current phase** before acting. If unsure, ask: "Which phase are we in?"
|
|
235
|
+
**Sub-agent specs**: docs/sdlc/agents/
|
|
167
236
|
|
|
168
237
|
---
|
|
169
238
|
|
|
@@ -200,11 +269,11 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
|
|
|
200
269
|
|
|
201
270
|
**Role**: Create test plan, test cases before Dev implements.
|
|
202
271
|
**Deliverables**: Test plan, test cases.
|
|
203
|
-
**Output**: \`docs/sdlc/qe/\` —
|
|
272
|
+
**Output**: \`docs/sdlc/qe/\` — Hết bước tài liệu → **Dev team chạy implement ngay** (không chờ thêm).
|
|
204
273
|
|
|
205
274
|
## Phase 5b: Dev Teams
|
|
206
275
|
|
|
207
|
-
**Trigger**:
|
|
276
|
+
**Trigger**: Sau khi xong tài liệu (Technical BA + QE docs). **Dev run implement luôn.**
|
|
208
277
|
|
|
209
278
|
**Roles**:
|
|
210
279
|
- **Tech Lead (15+ yrs)**: Decide tech stack, libraries; review & merge code. Docs: \`docs/sdlc/dev/tech-lead/\`
|
|
@@ -214,15 +283,22 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
|
|
|
214
283
|
|
|
215
284
|
**Output**: Code + unit tests. **Handoff to QE (testing).**
|
|
216
285
|
|
|
217
|
-
## Phase 6: QE (Testing phase)
|
|
286
|
+
## Phase 6: QE (Testing phase — automation)
|
|
218
287
|
|
|
219
288
|
**Trigger**: After Dev completes unit tests.
|
|
220
|
-
**Role**:
|
|
221
|
-
|
|
289
|
+
**Role**: Write and run **automation tests**, sign-off.
|
|
290
|
+
|
|
291
|
+
**Roles**:
|
|
292
|
+
- **QE Lead**: Decide test framework; review test code. Docs: \`docs/sdlc/qe/qe-lead/\`
|
|
293
|
+
- **Senior QE (10+ yrs)**: Write automation tests. Docs: \`docs/sdlc/qe/senior-qe/\`
|
|
294
|
+
|
|
295
|
+
**Output**: Automation tests, test report. **Handoff to Deploy.**
|
|
222
296
|
|
|
223
|
-
## Phase 7: Deploy
|
|
297
|
+
## Phase 7: Deploy
|
|
224
298
|
|
|
225
|
-
**
|
|
299
|
+
**Trigger**: After QE sign-off.
|
|
300
|
+
**Role**: Triển khai với **Docker Compose** (local/staging) và **Kubernetes** (production).
|
|
301
|
+
**Output**: \`docs/sdlc/deploy/\` — docker-compose.yml, k8s manifests. Deploy ngay sau khi hoàn thành pipeline.
|
|
226
302
|
|
|
227
303
|
## Quick Phase Checklist
|
|
228
304
|
|
|
@@ -235,9 +311,10 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
|
|
|
235
311
|
| 4 | Technical BA | API specs, tech breakdown |
|
|
236
312
|
| 5a | QE (docs) | Test plan, test cases |
|
|
237
313
|
| 5b | Dev | Code, unit tests (≥90%) |
|
|
238
|
-
| 6 | QE (testing) |
|
|
239
|
-
| 7 |
|
|
314
|
+
| 6 | QE (testing) | QE Lead + Senior QE, automation, sign-off |
|
|
315
|
+
| 7 | Deploy | Docker Compose + K8s |
|
|
240
316
|
|
|
317
|
+
**Sub-agents**: Mỗi role = 1 sub-agent (PO, Business BA, Architect, Technical BA, QE Lead, Senior QE, Tech Lead, Senior Dev). See docs/sdlc/agents/
|
|
241
318
|
See reference.md for templates.
|
|
242
319
|
`;
|
|
243
320
|
|
|
@@ -259,9 +336,35 @@ POST /api/v1/[resource] — Purpose, Request, Response, Contract
|
|
|
259
336
|
## QE: Test Case
|
|
260
337
|
TC-001: [Scenario] — Precondition, Steps, Expected, Links to AC
|
|
261
338
|
|
|
339
|
+
## QE Team
|
|
340
|
+
- QE Lead: test framework decision, review test code → docs/sdlc/qe/qe-lead/
|
|
341
|
+
- Senior QE (10+ yrs): write automation tests → docs/sdlc/qe/senior-qe/
|
|
342
|
+
|
|
262
343
|
## Dev Team
|
|
263
344
|
- Tech Lead (15+ yrs): tech stack, libraries, review & merge → docs/sdlc/dev/tech-lead/
|
|
264
345
|
- Senior Dev (10+ yrs): implement, Unit Test ≥90% → docs/sdlc/dev/senior-developer/
|
|
346
|
+
|
|
347
|
+
## Sub-agents
|
|
348
|
+
Mỗi role = sub-agent. See docs/sdlc/agents/
|
|
349
|
+
|
|
350
|
+
## Deploy
|
|
351
|
+
Sau khi hoàn thành → Docker Compose + K8s. See docs/sdlc/deploy/
|
|
352
|
+
`;
|
|
353
|
+
|
|
354
|
+
const AGENTS_MD_CONTENT = `## SDLC Workflow
|
|
355
|
+
|
|
356
|
+
When working on requirements, features, or handoffs, follow these phases:
|
|
357
|
+
|
|
358
|
+
1. **PO** — PRD, user stories → docs/sdlc/po/
|
|
359
|
+
2. **Business BA** — FRS, process flows → docs/sdlc/ba/business/
|
|
360
|
+
3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
|
|
361
|
+
4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
|
|
362
|
+
5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/
|
|
363
|
+
6. **Dev** — Sau bước tài liệu → **run implement luôn**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
|
|
364
|
+
7. **QE (testing)** — QE Lead + Senior QE (automation)
|
|
365
|
+
8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
|
|
366
|
+
|
|
367
|
+
Sau bước làm tài liệu thì cho team Dev run implement ngay. See docs/sdlc/agents/
|
|
265
368
|
`;
|
|
266
369
|
|
|
267
370
|
const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
|
|
@@ -271,12 +374,11 @@ const CLAUDE_SDLC_CONTENT = `## SDLC Workflow
|
|
|
271
374
|
3. **Architect** — ADRs, diagrams → docs/sdlc/architecture/
|
|
272
375
|
4. **Technical BA** — API specs, team breakdown → docs/sdlc/ba/technical/
|
|
273
376
|
5. **QE (docs)** — Test plan, test cases → docs/sdlc/qe/
|
|
274
|
-
6. **Dev** —
|
|
275
|
-
7. **QE (testing)** —
|
|
276
|
-
8. **Deploy** —
|
|
377
|
+
6. **Dev** — Sau bước tài liệu → **run implement luôn**. Tech Lead + Senior Dev → docs/sdlc/dev/{role}/
|
|
378
|
+
7. **QE (testing)** — QE Lead + Senior QE (automation)
|
|
379
|
+
8. **Deploy** — Docker Compose + K8s → docs/sdlc/deploy/
|
|
277
380
|
|
|
278
|
-
|
|
279
|
-
Ask "Which phase are we in?" if unclear.
|
|
381
|
+
Sau bước làm tài liệu (Technical BA + QE docs) thì cho team Dev run implement ngay. See docs/sdlc/agents/
|
|
280
382
|
`;
|
|
281
383
|
|
|
282
384
|
const SDLC_WORKFLOW_MD = `# SDLC Workflow (Multi-Role)
|
|
@@ -301,8 +403,10 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
|
|
|
301
403
|
| 4 | Technical BA | API specs, tech breakdown |
|
|
302
404
|
| 5a | QE (docs) | Test plan, test cases |
|
|
303
405
|
| 5b | Dev | Code, unit tests (≥90%) |
|
|
304
|
-
| 6 | QE (testing) |
|
|
305
|
-
| 7 |
|
|
406
|
+
| 6 | QE (testing) | QE Lead + Senior QE, automation, sign-off |
|
|
407
|
+
| 7 | Deploy | Docker Compose + K8s |
|
|
408
|
+
|
|
409
|
+
**Sub-agents**: Mỗi role chạy bằng sub-agent (PO, Business BA, Architect, Technical BA, QE Lead, Senior QE, Tech Lead, Senior Dev). See docs/sdlc/agents/
|
|
306
410
|
|
|
307
411
|
## Phase Details
|
|
308
412
|
|
|
@@ -323,9 +427,9 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
|
|
|
323
427
|
- Output: \`docs/sdlc/ba/technical/\`
|
|
324
428
|
|
|
325
429
|
### Phase 5a: QE (Docs)
|
|
326
|
-
- Test plan, test cases
|
|
430
|
+
- Test plan, test cases
|
|
327
431
|
- Output: \`docs/sdlc/qe/\`
|
|
328
|
-
- **
|
|
432
|
+
- **Sau bước tài liệu → Dev team run implement luôn** (không chờ thêm)
|
|
329
433
|
|
|
330
434
|
### Phase 5b: Dev Teams
|
|
331
435
|
- **Tech Lead (15+ yrs)**: Tech stack, libraries; review & merge. Output: \`docs/sdlc/dev/tech-lead/\`
|
|
@@ -333,11 +437,13 @@ User Request → PO → Business BA → Architect → Technical BA → QE (docs)
|
|
|
333
437
|
- **Requirement**: Unit Test coverage **≥ 90%**
|
|
334
438
|
- **Then**: QE starts testing phase
|
|
335
439
|
|
|
336
|
-
### Phase 6: QE (Testing)
|
|
337
|
-
-
|
|
440
|
+
### Phase 6: QE (Testing — automation)
|
|
441
|
+
- **QE Lead**: Test framework decision; review test code. Output: \`docs/sdlc/qe/qe-lead/\`
|
|
442
|
+
- **Senior QE (10+ yrs)**: Write automation tests. Output: \`docs/sdlc/qe/senior-qe/\`
|
|
338
443
|
|
|
339
444
|
### Phase 7: Deploy
|
|
340
|
-
-
|
|
445
|
+
- Sau khi hoàn thành pipeline → triển khai với **Docker Compose** (local/staging) và **Kubernetes** (production)
|
|
446
|
+
- Output: \`docs/sdlc/deploy/\` — docker-compose.yml, k8s/
|
|
341
447
|
|
|
342
448
|
See [reference.md](./reference.md) for templates.
|
|
343
449
|
`;
|
|
@@ -345,6 +451,111 @@ See [reference.md](./reference.md) for templates.
|
|
|
345
451
|
const REFERENCE_MD = `# SDLC Workflow — Reference
|
|
346
452
|
|
|
347
453
|
Templates and examples. Use \`*.template.md\` as starting points.
|
|
454
|
+
Sub-agents: docs/sdlc/agents/
|
|
455
|
+
Deploy: docs/sdlc/deploy/ (Docker Compose + K8s)
|
|
456
|
+
`;
|
|
457
|
+
|
|
458
|
+
const AGENTS_README = `# Sub-Agents
|
|
459
|
+
|
|
460
|
+
Mọi role trong SDLC chạy bằng **sub-agent**. Mỗi phase giao cho một sub-agent tương ứng.
|
|
461
|
+
|
|
462
|
+
| Role | Sub-agent | Input | Output |
|
|
463
|
+
|------|-----------|--------|--------|
|
|
464
|
+
| PO | po | User request | docs/sdlc/po/ |
|
|
465
|
+
| Business BA | business-ba | docs/sdlc/po/ | docs/sdlc/ba/business/ |
|
|
466
|
+
| Architect | architect | docs/sdlc/ba/business/ | docs/sdlc/architecture/ |
|
|
467
|
+
| Technical BA | technical-ba | docs/sdlc/architecture/ | docs/sdlc/ba/technical/ |
|
|
468
|
+
| QE (docs) | qe-docs | docs/sdlc/ba/technical/ | docs/sdlc/qe/ (test plan) |
|
|
469
|
+
| Tech Lead | tech-lead | Technical spec | Review, merge, docs/sdlc/dev/tech-lead/ |
|
|
470
|
+
| Senior Dev | senior-dev | Spec + test plan | **Sau tài liệu → run implement ngay**. Code, unit tests (≥90%) |
|
|
471
|
+
| QE Lead | qe-lead | Test plan | Test framework, review, docs/sdlc/qe/qe-lead/ |
|
|
472
|
+
| Senior QE | senior-qe | Test plan + framework | Automation tests, docs/sdlc/qe/senior-qe/ |
|
|
473
|
+
| Deploy | deploy | QE sign-off | Docker Compose + K8s, docs/sdlc/deploy/ |
|
|
474
|
+
|
|
475
|
+
Orchestrator: chạy từng sub-agent theo thứ tự; handoff output → input của sub-agent tiếp theo.
|
|
476
|
+
`;
|
|
477
|
+
|
|
478
|
+
const DEPLOY_README = `# Deploy
|
|
479
|
+
|
|
480
|
+
Sau khi hoàn thành pipeline (QE sign-off), triển khai ngay với:
|
|
481
|
+
|
|
482
|
+
- **Docker Compose** — local / staging: \`docker compose up -d\`
|
|
483
|
+
- **Kubernetes** — production: \`kubectl apply -f k8s/\`
|
|
484
|
+
|
|
485
|
+
## Files
|
|
486
|
+
|
|
487
|
+
- \`docker-compose.yml.template\` — copy thành \`docker-compose.yml\`, chỉnh image/env
|
|
488
|
+
- \`k8s/deployment.yaml.template\` — Deployment
|
|
489
|
+
- \`k8s/service.yaml.template\` — Service
|
|
490
|
+
- \`k8s/ingress.yaml.template\` — Ingress (optional)
|
|
491
|
+
`;
|
|
492
|
+
|
|
493
|
+
const DOCKER_COMPOSE_TEMPLATE = `# Copy to docker-compose.yml and adjust image, env, ports
|
|
494
|
+
services:
|
|
495
|
+
app:
|
|
496
|
+
image: your-registry/your-app:latest
|
|
497
|
+
build: .
|
|
498
|
+
ports:
|
|
499
|
+
- "8080:8080"
|
|
500
|
+
environment:
|
|
501
|
+
- NODE_ENV=production
|
|
502
|
+
restart: unless-stopped
|
|
503
|
+
`;
|
|
504
|
+
|
|
505
|
+
const K8S_DEPLOYMENT_TEMPLATE = `# deployment.yaml - adjust name, image, replicas
|
|
506
|
+
apiVersion: apps/v1
|
|
507
|
+
kind: Deployment
|
|
508
|
+
metadata:
|
|
509
|
+
name: app
|
|
510
|
+
spec:
|
|
511
|
+
replicas: 2
|
|
512
|
+
selector:
|
|
513
|
+
matchLabels:
|
|
514
|
+
app: app
|
|
515
|
+
template:
|
|
516
|
+
metadata:
|
|
517
|
+
labels:
|
|
518
|
+
app: app
|
|
519
|
+
spec:
|
|
520
|
+
containers:
|
|
521
|
+
- name: app
|
|
522
|
+
image: your-registry/your-app:latest
|
|
523
|
+
ports:
|
|
524
|
+
- containerPort: 8080
|
|
525
|
+
`;
|
|
526
|
+
|
|
527
|
+
const K8S_SERVICE_TEMPLATE = `# service.yaml
|
|
528
|
+
apiVersion: v1
|
|
529
|
+
kind: Service
|
|
530
|
+
metadata:
|
|
531
|
+
name: app
|
|
532
|
+
spec:
|
|
533
|
+
selector:
|
|
534
|
+
app: app
|
|
535
|
+
ports:
|
|
536
|
+
- port: 80
|
|
537
|
+
targetPort: 8080
|
|
538
|
+
type: ClusterIP
|
|
539
|
+
`;
|
|
540
|
+
|
|
541
|
+
const K8S_INGRESS_TEMPLATE = `# ingress.yaml - optional, adjust host
|
|
542
|
+
apiVersion: networking.k8s.io/v1
|
|
543
|
+
kind: Ingress
|
|
544
|
+
metadata:
|
|
545
|
+
name: app
|
|
546
|
+
spec:
|
|
547
|
+
ingressClassName: nginx
|
|
548
|
+
rules:
|
|
549
|
+
- host: app.example.com
|
|
550
|
+
http:
|
|
551
|
+
paths:
|
|
552
|
+
- path: /
|
|
553
|
+
pathType: Prefix
|
|
554
|
+
backend:
|
|
555
|
+
service:
|
|
556
|
+
name: app
|
|
557
|
+
port:
|
|
558
|
+
number: 80
|
|
348
559
|
`;
|
|
349
560
|
|
|
350
561
|
const PO_EPIC_TEMPLATE = `# Epic: [Name]
|
|
@@ -466,12 +677,34 @@ const QE_TC_TEMPLATE = `## TC-001: [Scenario]
|
|
|
466
677
|
const QE_README = `# QE (Quality Engineering)
|
|
467
678
|
|
|
468
679
|
Two phases:
|
|
469
|
-
1. **Docs phase** — Test plan, test cases
|
|
470
|
-
2. **Testing phase** —
|
|
680
|
+
1. **Docs phase** — Test plan, test cases. Xong → **Dev run implement luôn**.
|
|
681
|
+
2. **Testing phase** — Sau khi Dev xong unit tests: QE team viết automation tests.
|
|
682
|
+
- **QE Lead**: Decide test framework; review test code → docs/sdlc/qe/qe-lead/
|
|
683
|
+
- **Senior QE (10+ yrs)**: Write automation tests → docs/sdlc/qe/senior-qe/
|
|
471
684
|
|
|
472
685
|
Use test-case.template.md for test cases.
|
|
473
686
|
`;
|
|
474
687
|
|
|
688
|
+
const QE_LEAD_README = `# QE Lead
|
|
689
|
+
|
|
690
|
+
**Responsibilities**:
|
|
691
|
+
- Decide test framework (e.g. Playwright, Cypress, Jest, etc.)
|
|
692
|
+
- Review test code
|
|
693
|
+
- Ensure automation quality and coverage
|
|
694
|
+
|
|
695
|
+
**Docs**: Test framework ADR, review checklist.
|
|
696
|
+
`;
|
|
697
|
+
|
|
698
|
+
const QE_SENIOR_README = `# Senior QE (10+ years exp)
|
|
699
|
+
|
|
700
|
+
**Responsibilities**:
|
|
701
|
+
- Write automation tests per test plan
|
|
702
|
+
- Implement E2E, integration, regression tests
|
|
703
|
+
- Follow QE Lead's framework decisions
|
|
704
|
+
|
|
705
|
+
**Docs**: Automation test design, framework usage.
|
|
706
|
+
`;
|
|
707
|
+
|
|
475
708
|
const DEV_TECH_LEAD_README = `# Tech Lead (15+ years exp)
|
|
476
709
|
|
|
477
710
|
**Responsibilities**:
|