@longph2102/v-flow 1.5.0
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/AGENTS.md +265 -0
- package/CHANGELOG.md +318 -0
- package/LICENSE +21 -0
- package/README.md +326 -0
- package/agents/ba-agent.md +437 -0
- package/agents/ba-critic-agent.md +156 -0
- package/agents/ba-to-ptyc-agent.md +112 -0
- package/agents/bugfix-analyst-agent.md +221 -0
- package/agents/constitute-agent.md +155 -0
- package/agents/help-agent.md +168 -0
- package/agents/implement-agent.md +220 -0
- package/agents/import-ba-docs-agent.md +164 -0
- package/agents/master-check-agent.md +228 -0
- package/agents/metrics-agent.md +180 -0
- package/agents/operations-agent.md +123 -0
- package/agents/plan-agent.md +218 -0
- package/agents/prototype-agent.md +191 -0
- package/agents/retrospective-agent.md +196 -0
- package/agents/review-agent.md +210 -0
- package/agents/sprint-agent.md +191 -0
- package/agents/status-agent.md +186 -0
- package/agents/sync-agent.md +201 -0
- package/agents/test-agent.md +166 -0
- package/agents/understand-agent.md +339 -0
- package/cli/commands/check.js +96 -0
- package/cli/commands/dev-quiz.js +107 -0
- package/cli/commands/doctor.js +348 -0
- package/cli/commands/feature.js +259 -0
- package/cli/commands/hooks.js +163 -0
- package/cli/commands/init.js +189 -0
- package/cli/commands/log.js +199 -0
- package/cli/commands/plugin.js +230 -0
- package/cli/commands/score-card.js +203 -0
- package/cli/commands/status.js +269 -0
- package/cli/commands/sync.js +59 -0
- package/cli/commands/upgrade.js +150 -0
- package/cli/commands/validate.js +1259 -0
- package/cli/commands/watch.js +151 -0
- package/cli/index.js +46 -0
- package/cli/lib/ac-test-gate.js +89 -0
- package/cli/lib/activity-log.js +209 -0
- package/cli/lib/cli-error.js +183 -0
- package/cli/lib/constitution-lint.js +561 -0
- package/cli/lib/dev-quiz-grade.js +127 -0
- package/cli/lib/governance.js +78 -0
- package/cli/lib/hook-targets.js +167 -0
- package/cli/lib/i18n.js +375 -0
- package/cli/lib/knowledge-oracle.js +379 -0
- package/cli/lib/logger.js +203 -0
- package/cli/lib/module-card-lint.js +304 -0
- package/cli/lib/module-card-score.js +223 -0
- package/cli/lib/plugins.js +481 -0
- package/cli/lib/scanner.js +692 -0
- package/cli/lib/sync-core.js +232 -0
- package/cli/lib/sync-targets.js +84 -0
- package/cli/lib/templates.js +268 -0
- package/cli/lib/yaml-parser.js +203 -0
- package/commands/v.ba-critic.md +101 -0
- package/commands/v.ba-to-ptyc.md +71 -0
- package/commands/v.bugfix.md +86 -0
- package/commands/v.check.md +131 -0
- package/commands/v.constitute.md +87 -0
- package/commands/v.constitution.md +84 -0
- package/commands/v.fork.md +127 -0
- package/commands/v.help.md +73 -0
- package/commands/v.hotfix.md +200 -0
- package/commands/v.implement.md +92 -0
- package/commands/v.import-ba-docs.md +222 -0
- package/commands/v.metrics.md +74 -0
- package/commands/v.operations.md +70 -0
- package/commands/v.plan.md +78 -0
- package/commands/v.prototype.md +121 -0
- package/commands/v.quickfix.md +169 -0
- package/commands/v.retrospective.md +80 -0
- package/commands/v.review.md +78 -0
- package/commands/v.rewind.md +127 -0
- package/commands/v.specify.md +118 -0
- package/commands/v.sprint.md +75 -0
- package/commands/v.status.md +62 -0
- package/commands/v.sync.md +81 -0
- package/commands/v.test.md +67 -0
- package/commands/v.understand.md +112 -0
- package/package.json +65 -0
- package/skills/_shared/constitution-reader/SKILL.md +109 -0
- package/skills/_shared/constitution-reader/config.json +52 -0
- package/skills/_shared/constitution-reader/examples/good/b1-phase-output.md +48 -0
- package/skills/_shared/constitution-reader/gotchas.md +46 -0
- package/skills/_shared/context-reader/SKILL.md +111 -0
- package/skills/_shared/context-reader/config.json +54 -0
- package/skills/_shared/context-reader/examples/good/legacy-nodejs-output.md +35 -0
- package/skills/_shared/context-reader/gotchas.md +49 -0
- package/skills/_shared/ears-notation/SKILL.md +63 -0
- package/skills/_shared/ears-notation/config.json +55 -0
- package/skills/_shared/ears-notation/examples/good/plan-test-interpretation.md +29 -0
- package/skills/_shared/ears-notation/gotchas.md +43 -0
- package/skills/check/cross-validator/SKILL.md +206 -0
- package/skills/check/cross-validator/config.json +33 -0
- package/skills/check/cross-validator/examples/good/validation-report-pass-with-concerns.md +105 -0
- package/skills/check/cross-validator/gotchas.md +43 -0
- package/skills/implement/constitution-enforcer/SKILL.md +134 -0
- package/skills/implement/constitution-enforcer/config.json +16 -0
- package/skills/implement/constitution-enforcer/examples/bad/vague-report.md +42 -0
- package/skills/implement/constitution-enforcer/examples/good/compliance-report.md +57 -0
- package/skills/implement/constitution-enforcer/gotchas.md +26 -0
- package/skills/implement/constitution-enforcer/scripts/check-constitution.sh +88 -0
- package/skills/implement/no-go-zone-guard/SKILL.md +173 -0
- package/skills/implement/no-go-zone-guard/config.json +28 -0
- package/skills/implement/no-go-zone-guard/examples/good/adapter-workaround.md +46 -0
- package/skills/implement/no-go-zone-guard/gotchas.md +27 -0
- package/skills/implement/no-go-zone-guard/scripts/check-nogo-zones.sh +148 -0
- package/skills/implement/no-go-zone-guard/scripts/nogo-precommit.sh +96 -0
- package/skills/implement/tdd-driver/SKILL.md +159 -0
- package/skills/implement/tdd-driver/config.json +33 -0
- package/skills/implement/tdd-driver/examples/good/tdd-cycle-product-repo.md +81 -0
- package/skills/implement/tdd-driver/gotchas.md +34 -0
- package/skills/metrics/metrics-collector/SKILL.md +133 -0
- package/skills/metrics/metrics-collector/config.json +16 -0
- package/skills/metrics/metrics-collector/examples/bad/incomplete-report.md +48 -0
- package/skills/metrics/metrics-collector/examples/good/full-metrics-report.md +101 -0
- package/skills/metrics/metrics-collector/gotchas.md +26 -0
- package/skills/operations/incident-runbook/SKILL.md +167 -0
- package/skills/operations/incident-runbook/config.json +21 -0
- package/skills/operations/incident-runbook/examples/bad/vague-incident-report.md +48 -0
- package/skills/operations/incident-runbook/examples/good/p1-hotfix-response.md +119 -0
- package/skills/operations/incident-runbook/gotchas.md +26 -0
- package/skills/plan/architecture-designer/SKILL.md +228 -0
- package/skills/plan/architecture-designer/config.json +32 -0
- package/skills/plan/architecture-designer/examples/bad/vague-plan.md +62 -0
- package/skills/plan/architecture-designer/examples/good/expand-contract-migration.md +56 -0
- package/skills/plan/architecture-designer/examples/good/plan-structure.md +58 -0
- package/skills/plan/architecture-designer/gotchas.md +45 -0
- package/skills/plan/task-breakdown/SKILL.md +208 -0
- package/skills/plan/task-breakdown/config.json +26 -0
- package/skills/plan/task-breakdown/examples/bad/vague-tasks.md +77 -0
- package/skills/plan/task-breakdown/examples/good/spike-clarify-tasks.md +66 -0
- package/skills/plan/task-breakdown/examples/good/tasks-login-feature.md +111 -0
- package/skills/plan/task-breakdown/gotchas.md +39 -0
- package/skills/prototype/LOGIC.md +240 -0
- package/skills/prototype/SKILL.md +185 -0
- package/skills/prototype/UI.md +407 -0
- package/skills/prototype/config.json +104 -0
- package/skills/prototype/examples/bad/prototype-notes.md +68 -0
- package/skills/prototype/examples/good/prototype-notes-ui.md +109 -0
- package/skills/prototype/examples/good/prototype-notes.md +67 -0
- package/skills/prototype/gotchas.md +128 -0
- package/skills/prototype/scripts/check-flow-state.ps1 +112 -0
- package/skills/prototype/scripts/check-flow-state.sh +104 -0
- package/skills/prototype/scripts/check-prototype-cleanup.ps1 +124 -0
- package/skills/prototype/scripts/check-prototype-cleanup.sh +109 -0
- package/skills/prototype/scripts/check-prototype-notes.ps1 +107 -0
- package/skills/prototype/scripts/check-prototype-notes.sh +102 -0
- package/skills/review/adversarial-reviewer/SKILL.md +137 -0
- package/skills/review/adversarial-reviewer/config.json +32 -0
- package/skills/review/adversarial-reviewer/examples/good/review-report-template.md +56 -0
- package/skills/review/adversarial-reviewer/gotchas.md +46 -0
- package/skills/review/adversarial-reviewer/scripts/quick-security-scan.sh +52 -0
- package/skills/specify/ba-bpmn-doc-gen/SKILL.md +108 -0
- package/skills/specify/ba-bpmn-doc-gen/reference/reference-bpmn-generation.md +528 -0
- package/skills/specify/ba-bpmn-doc-gen/reference/reference-drawio-flowchart.md +466 -0
- package/skills/specify/ba-critic/SKILL.md +172 -0
- package/skills/specify/ba-critic/config.json +32 -0
- package/skills/specify/ba-critic/examples/good/critic-report-round1.md +51 -0
- package/skills/specify/ba-critic/gotchas.md +40 -0
- package/skills/specify/ba-critic/scripts/check-spec-quality.sh +72 -0
- package/skills/specify/ba-doc-generator/SKILL.md +102 -0
- package/skills/specify/ba-doc-generator/references/template-clevel.md +84 -0
- package/skills/specify/ba-doc-generator/references/template-compliance.md +83 -0
- package/skills/specify/ba-doc-generator/references/template-dev.md +138 -0
- package/skills/specify/ba-doc-generator/references/template-partner.md +167 -0
- package/skills/specify/ba-doc-generator/references/template-pm.md +92 -0
- package/skills/specify/ba-doc-generator/references/template-review.md +114 -0
- package/skills/specify/ba-doc-generator/references/template-tester.md +108 -0
- package/skills/specify/ba-doc-generator/references/template-user.md +98 -0
- package/skills/specify/bugfix-analyst/SKILL.md +296 -0
- package/skills/specify/bugfix-analyst/config.json +41 -0
- package/skills/specify/bugfix-analyst/examples/bad/common-mistakes.md +71 -0
- package/skills/specify/bugfix-analyst/examples/good/email-validation-bugfix.md +53 -0
- package/skills/specify/bugfix-analyst/gotchas.md +51 -0
- package/skills/specify/ears-writer/SKILL.md +129 -0
- package/skills/specify/ears-writer/config.json +20 -0
- package/skills/specify/ears-writer/examples/bad/common-mistakes.md +17 -0
- package/skills/specify/ears-writer/examples/good/login-requirements.md +41 -0
- package/skills/specify/ears-writer/gotchas.md +43 -0
- package/skills/specify/ears-writer/scripts/check-ears-compliance.sh +51 -0
- package/skills/test/test-case-generator/SKILL.md +161 -0
- package/skills/test/test-case-generator/config.json +33 -0
- package/skills/test/test-case-generator/examples/good/test-cases-login.md +104 -0
- package/skills/test/test-case-generator/gotchas.md +43 -0
- package/skills/understand/ba-docs-scanner/SKILL.md +239 -0
- package/skills/understand/ba-docs-scanner/config.json +47 -0
- package/skills/understand/ba-docs-scanner/examples/good/work-order-br-extract.md +28 -0
- package/skills/understand/ba-docs-scanner/gotchas.md +44 -0
- package/skills/understand/ba-docs-scanner/merge-rules.md +47 -0
- package/skills/understand/codebase-scanner/SKILL.md +260 -0
- package/skills/understand/codebase-scanner/config.json +56 -0
- package/skills/understand/codebase-scanner/examples/good/menu-module-output.md +44 -0
- package/skills/understand/codebase-scanner/gotchas.md +42 -0
- package/skills/understand/codebase-scanner/scripts/scan-project-structure.sh +64 -0
- package/templates/DESIGN.md +456 -0
- package/templates/agent-command-template.yaml +240 -0
- package/templates/agent-config-template.md +170 -0
- package/templates/agent-definition-template.md +145 -0
- package/templates/agent-metrics-template.md +150 -0
- package/templates/api-contract-template.md +72 -0
- package/templates/bugfix-report-template.md +195 -0
- package/templates/bugfix-spec-template.md +134 -0
- package/templates/code-review-report-template.md +119 -0
- package/templates/constitution-template.md +234 -0
- package/templates/context-template.md +94 -0
- package/templates/data-model-template.md +95 -0
- package/templates/decision-log-template.md +92 -0
- package/templates/flow-state-template.yaml +208 -0
- package/templates/github/workflows/v-flow-validate.yml +30 -0
- package/templates/knowledge/adr-template.md +70 -0
- package/templates/knowledge/api-contract-template.md +140 -0
- package/templates/knowledge/domain-glossary.md +29 -0
- package/templates/knowledge/golden-tests-readme.md +115 -0
- package/templates/knowledge/lessons-learned.md +41 -0
- package/templates/knowledge/patterns.md +103 -0
- package/templates/module-card/SKILL.md +85 -0
- package/templates/module-card/api-specs.md +96 -0
- package/templates/module-card/business-quiz.md +119 -0
- package/templates/module-card/cross-service.md +125 -0
- package/templates/module-card/db.md +85 -0
- package/templates/module-card/dev-quiz.md +62 -0
- package/templates/module-card/permissions.md +83 -0
- package/templates/module-card/state-diagram.md +64 -0
- package/templates/module-card/tech-context.md +90 -0
- package/templates/module-card/ui-flows.md +91 -0
- package/templates/module-card/use-cases.md +142 -0
- package/templates/module-template.yaml +161 -0
- package/templates/operations-report-template.md +108 -0
- package/templates/plan-template.md +308 -0
- package/templates/prototype-notes-template.md +116 -0
- package/templates/ptyc/PTYC.template.docx +0 -0
- package/templates/ptyc/ptyc.meta.example.yaml +44 -0
- package/templates/retrospective-report-template.md +136 -0
- package/templates/security-review-template.md +84 -0
- package/templates/session-template.md +167 -0
- package/templates/spec-review-log-template.md +75 -0
- package/templates/spec-template.md +229 -0
- package/templates/sprint-status-template.md +101 -0
- package/templates/tasks-template.md +275 -0
- package/templates/test-cases-template.md +124 -0
- package/templates/ux-checklist-template.md +79 -0
- package/templates/validation-report-template.md +125 -0
- package/templates/vflow-config-template.yaml +22 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Quick Fix Flow — S.1 nhanh → B.1 → R.1. Dành cho bug fix nhỏ, rõ ràng, không cần plan đầy đủ"
|
|
3
|
+
phase: "S.1 → B.1 → R.1"
|
|
4
|
+
agents: ["ba-agent", "implement-agent", "review-agent"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /v.quickfix
|
|
8
|
+
|
|
9
|
+
Chạy **Quick Fix Flow** — pipeline rút gọn cho **bug fix nhỏ** hoặc **change rõ ràng**, bỏ qua Plan Agent và Test Agent độc lập, tích hợp check nhanh trước khi implement.
|
|
10
|
+
|
|
11
|
+
> ⚠️ **Điều kiện sử dụng**: Chỉ dùng khi:
|
|
12
|
+
> - Bug/change scope rõ ràng, ít hơn 5 files bị ảnh hưởng
|
|
13
|
+
> - Không cần thiết kế kiến trúc mới
|
|
14
|
+
> - Không đụng vào No-Go Zones
|
|
15
|
+
> - Team Size: Solo hoặc nhỏ ≤ 3 người
|
|
16
|
+
|
|
17
|
+
> ❌ **Không dùng cho**:
|
|
18
|
+
> - Feature mới hoàn toàn → dùng full pipeline `/v.specify`
|
|
19
|
+
> - Bug ảnh hưởng nhiều module → dùng full pipeline
|
|
20
|
+
> - Production incident P1/P2 → dùng `/v.hotfix`
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Phase 1: Quick Spec (5-10 phút)
|
|
25
|
+
|
|
26
|
+
Bạn là **BA Agent** — viết Mini Spec ngắn gọn.
|
|
27
|
+
|
|
28
|
+
### Output: `spec.md` (mini format)
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
# Quick Fix Spec — [Mô tả ngắn]
|
|
32
|
+
|
|
33
|
+
**Loại**: bug-fix | small-change | improvement
|
|
34
|
+
**Scope**: [File/module bị ảnh hưởng]
|
|
35
|
+
**Spec Version**: v1.0
|
|
36
|
+
**Author**: [Tên]
|
|
37
|
+
|
|
38
|
+
## Vấn đề
|
|
39
|
+
[Mô tả bug/vấn đề hiện tại — 1-3 câu]
|
|
40
|
+
|
|
41
|
+
## Expected Behavior
|
|
42
|
+
[Hành vi đúng sau khi fix — 1-3 câu]
|
|
43
|
+
|
|
44
|
+
## Scope
|
|
45
|
+
- Files cần thay đổi: [list files]
|
|
46
|
+
- Files KHÔNG được đụng: [nếu cần]
|
|
47
|
+
|
|
48
|
+
## Acceptance Criteria
|
|
49
|
+
- [ ] [AC-1] [Tiêu chí chấp nhận 1]
|
|
50
|
+
- [ ] [AC-2] [Tiêu chí chấp nhận 2]
|
|
51
|
+
|
|
52
|
+
## ⚠️ No-Go Check
|
|
53
|
+
- [ ] Đã đọc context.md, không đụng No-Go Zones ✅
|
|
54
|
+
- [ ] Scope không lan rộng sang module khác ✅
|
|
55
|
+
|
|
56
|
+
## Quick Test Plan
|
|
57
|
+
1. [Test case 1 — test thủ công hoặc unit test]
|
|
58
|
+
2. [Test case 2]
|
|
59
|
+
|
|
60
|
+
## Routing (Quick Fix)
|
|
61
|
+
- Human approve mini spec → thẳng sang Implement
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Phase 2: Quick Implement
|
|
67
|
+
|
|
68
|
+
Bạn là **Implement Agent** — implement trực tiếp từ mini spec.
|
|
69
|
+
|
|
70
|
+
### Quy trình
|
|
71
|
+
|
|
72
|
+
1. Đọc mini `spec.md` — kiểm tra Acceptance Criteria
|
|
73
|
+
2. Đọc `context.md` (nếu legacy) — No-Go Zones
|
|
74
|
+
3. Implement changes
|
|
75
|
+
4. Viết/update unit tests (nếu applicable)
|
|
76
|
+
5. Tự verify Acceptance Criteria:
|
|
77
|
+
- `[x]` nếu pass
|
|
78
|
+
- Ghi chú nếu không pass được (và lý do)
|
|
79
|
+
|
|
80
|
+
### Routing sau implement
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Tất cả AC pass → Phase 3 (Review)
|
|
84
|
+
Có AC không pass → Báo cho human, đề xuất re-scope hoặc escalate sang full pipeline
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Phase 3: Quick Review
|
|
90
|
+
|
|
91
|
+
Bạn là **Review Agent** — adversarial review nhanh.
|
|
92
|
+
|
|
93
|
+
### Kiểm tra
|
|
94
|
+
|
|
95
|
+
1. **Correctness**: Code fix đúng vấn đề mô tả trong spec?
|
|
96
|
+
2. **Scope creep**: Có thay đổi gì ngoài scope không?
|
|
97
|
+
3. **No-Go Zones**: Có đụng vào vùng cấm không?
|
|
98
|
+
4. **Tests**: Có test cover fix này không?
|
|
99
|
+
5. **Regression**: Fix này có thể break gì không?
|
|
100
|
+
|
|
101
|
+
### Verdict
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
APPROVED → Done ✅ (có thể deploy)
|
|
105
|
+
APPROVED_WITH_NOTES → Done, nhưng ghi chú kỹ thuật nợ
|
|
106
|
+
CHANGES_REQUIRED → Fix lại → Re-review
|
|
107
|
+
ESCALATE → Vấn đề lớn hơn dự kiến → Chạy full pipeline
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Routing sau review
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
APPROVED / APPROVED_WITH_NOTES → Deploy 🚀
|
|
114
|
+
CHANGES_REQUIRED → Fix → /v.quickfix review lại
|
|
115
|
+
ESCALATE → /v.specify (start full pipeline)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Sơ đồ tổng thể
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
Input: mô tả bug/change
|
|
124
|
+
|
|
125
|
+
[Quick Spec]
|
|
126
|
+
BA Agent → mini spec.md
|
|
127
|
+
↓
|
|
128
|
+
Human approve? (5 phút)
|
|
129
|
+
↓ Yes
|
|
130
|
+
[Quick Implement]
|
|
131
|
+
Implement Agent → code + tests
|
|
132
|
+
↓
|
|
133
|
+
[Quick Review]
|
|
134
|
+
Review Agent → adversarial check
|
|
135
|
+
↓
|
|
136
|
+
APPROVED → Deploy 🚀
|
|
137
|
+
CHANGES_REQUIRED → loop lại
|
|
138
|
+
ESCALATE → /v.specify full pipeline
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Cập nhật State & Session
|
|
144
|
+
|
|
145
|
+
**Init `.flow-state.yaml`** (khi bắt đầu quickfix):
|
|
146
|
+
```yaml
|
|
147
|
+
current_phase: "S.1"
|
|
148
|
+
phase_status: "in_progress"
|
|
149
|
+
project_type: "quickfix"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Append vào `_session.md`** (sau mỗi phase):
|
|
153
|
+
```markdown
|
|
154
|
+
### [QF] Quick Fix — [YYYY-MM-DD]
|
|
155
|
+
- **Type**: [bug-fix | small-change | improvement]
|
|
156
|
+
- **Scope**: [files affected]
|
|
157
|
+
- **Phase 1 (Spec)**: mini spec v1.0 → [approved/pending]
|
|
158
|
+
- **Phase 2 (Implement)**: [N]/[N] AC pass
|
|
159
|
+
- **Phase 3 (Review)**: [APPROVED | CHANGES_REQUIRED | ESCALATE]
|
|
160
|
+
- **Routing**: → [deploy | fix | /v.specify]
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Ví dụ
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
/v.quickfix Fix lỗi validation email trong form đăng ký — field chấp nhận khoảng trắng
|
|
167
|
+
/v.quickfix Sửa typo trong error message của login screen
|
|
168
|
+
/v.quickfix Cập nhật timeout từ 30s thành 60s trong API config
|
|
169
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Retrospective Agent — Tổng kết sau khi hoàn thành feature/epic"
|
|
3
|
+
phase: "After R.1"
|
|
4
|
+
agent: "retrospective-agent"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /v.retrospective
|
|
8
|
+
|
|
9
|
+
> Orchestration wrapper cho **Retrospective Agent**. Đọc `agents/retrospective-agent.md` để thực hiện core logic.
|
|
10
|
+
|
|
11
|
+
## Điều kiện tiên quyết
|
|
12
|
+
- Feature đã qua **R.1** (Code Review) với verdict APPROVED hoặc APPROVED_WITH_NOTES
|
|
13
|
+
- Hoặc: Sprint vừa kết thúc
|
|
14
|
+
- `spec.md`, `tasks.md`, `_session.md` phải tồn tại
|
|
15
|
+
|
|
16
|
+
## Execution
|
|
17
|
+
1. Đọc agent definition: `agents/retrospective-agent.md`
|
|
18
|
+
2. Thực hiện toàn bộ quy trình trong agent definition
|
|
19
|
+
3. Tạo `retrospective-report.md`
|
|
20
|
+
4. Đề xuất updates cho Knowledge Base
|
|
21
|
+
|
|
22
|
+
## Options
|
|
23
|
+
|
|
24
|
+
### --auto — Bỏ qua interactive questions
|
|
25
|
+
```
|
|
26
|
+
/v.retrospective --auto
|
|
27
|
+
```
|
|
28
|
+
Tự phân tích hoàn toàn từ artifacts, không hỏi user. Ghi rõ "Auto-generated" trong report.
|
|
29
|
+
|
|
30
|
+
### --sprint — Retro cho cả sprint
|
|
31
|
+
```
|
|
32
|
+
/v.retrospective --sprint 3
|
|
33
|
+
```
|
|
34
|
+
Tổng kết tất cả features trong sprint N.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 🔀 Routing Rules — Sau Retrospective
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
Retrospective xong
|
|
42
|
+
→ Route: Feature complete — archive
|
|
43
|
+
→ Nếu /v.metrics chưa chạy → /v.metrics
|
|
44
|
+
|
|
45
|
+
Phát hiện constitution cần update
|
|
46
|
+
→ Đề xuất /v.constitute (update version)
|
|
47
|
+
|
|
48
|
+
Có action items
|
|
49
|
+
→ Track trong sprint tiếp theo
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Cập nhật State & Session
|
|
53
|
+
|
|
54
|
+
**Cập nhật `.flow-state.yaml`**:
|
|
55
|
+
```yaml
|
|
56
|
+
current_phase: "complete"
|
|
57
|
+
phase_status: "done"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Append vào `_session.md`**:
|
|
61
|
+
```markdown
|
|
62
|
+
### [Retro] Retrospective — [YYYY-MM-DD]
|
|
63
|
+
- **Agent**: Retrospective Agent
|
|
64
|
+
- **Output**: `retrospective-report.md`
|
|
65
|
+
- **Key lessons**: [top 3 lessons]
|
|
66
|
+
- **Action items**: [N] items
|
|
67
|
+
- **Knowledge Base updated**: [yes/no — files touched]
|
|
68
|
+
- **Routing**: → Feature complete
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Ví dụ
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
/v.retrospective
|
|
77
|
+
/v.retrospective feature 001-user-login
|
|
78
|
+
/v.retrospective --auto
|
|
79
|
+
/v.retrospective --sprint 3
|
|
80
|
+
```
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Code Review Agent — Adversarial review đủ 5 chiều có bằng chứng (không ép số lượng issue)"
|
|
3
|
+
phase: "R.1"
|
|
4
|
+
agent: "review-agent"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /v.review
|
|
8
|
+
|
|
9
|
+
> Orchestration wrapper cho **Review Agent**. Đọc `agents/review-agent.md` để thực hiện core logic.
|
|
10
|
+
|
|
11
|
+
> ⚠️ **Nguyên tắc cốt lõi**: Review đủ 5 chiều **có bằng chứng** — không ép số lượng issue; "no material findings" hợp lệ nếu kèm residual risk + test gap
|
|
12
|
+
|
|
13
|
+
## Điều kiện tiên quyết
|
|
14
|
+
- Code đã được implement (tasks `[x]` trong `tasks.md`)
|
|
15
|
+
- Có `spec.md` để đối chiếu requirements
|
|
16
|
+
- Có `plan.md` để đối chiếu architecture
|
|
17
|
+
- Có `constitution.md` để đối chiếu standards
|
|
18
|
+
|
|
19
|
+
## Execution
|
|
20
|
+
1. Đọc agent definition: `agents/review-agent.md`
|
|
21
|
+
2. Thực hiện toàn bộ quy trình review trong agent definition
|
|
22
|
+
3. Tạo `code-review-report.md`
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 🔀 Routing Rules — Sau Code Review
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Verdict = APPROVED
|
|
30
|
+
→ Route: Deploy 🚀
|
|
31
|
+
→ Sau deploy: /v.retrospective → /v.metrics
|
|
32
|
+
|
|
33
|
+
Verdict = APPROVED_WITH_NOTES
|
|
34
|
+
→ Route: Deploy 🚀
|
|
35
|
+
→ Notes phải được track trong knowledge/lessons-learned/ hoặc issue tracker
|
|
36
|
+
→ Sau deploy: /v.retrospective
|
|
37
|
+
|
|
38
|
+
Verdict = CHANGES_REQUIRED
|
|
39
|
+
→ Route: Fix issues cụ thể → /v.review lại
|
|
40
|
+
→ Không cần chạy lại /v.check trừ khi:
|
|
41
|
+
- Issues ảnh hưởng đến spec/architecture → escalate lên /v.check
|
|
42
|
+
- Issues lộ ra spec thiếu → escalate lên /v.specify
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Cập nhật State & Session
|
|
46
|
+
|
|
47
|
+
**Cập nhật `.flow-state.yaml`**:
|
|
48
|
+
```yaml
|
|
49
|
+
current_phase: "R.1"
|
|
50
|
+
phase_status: "done"
|
|
51
|
+
artifacts:
|
|
52
|
+
code_review:
|
|
53
|
+
exists: true
|
|
54
|
+
verdict: "APPROVED"
|
|
55
|
+
routing:
|
|
56
|
+
after_review:
|
|
57
|
+
last_verdict: "APPROVED"
|
|
58
|
+
route_decision: "deploy"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Append vào `_session.md`**:
|
|
62
|
+
```markdown
|
|
63
|
+
### [R.1] Code Review — [YYYY-MM-DD]
|
|
64
|
+
- **Verdict**: [APPROVED | APPROVED_WITH_NOTES | CHANGES_REQUIRED]
|
|
65
|
+
- **Issues**: [N] critical, [N] major, [N] minor
|
|
66
|
+
- **Concerns verified**: [W-001 resolved ✅ | W-002 nếu chưa resolved ❌]
|
|
67
|
+
- **Routing**: → [deploy | fix giải quyết vấn đề | escalate]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Ví dụ
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
/v.review
|
|
76
|
+
/v.review feature 001-user-login
|
|
77
|
+
/v.review file src/auth/login.ts
|
|
78
|
+
```
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Rewind — Rollback spec/pipeline về version cũ (Time Travel)"
|
|
3
|
+
phase: "Any"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /v.rewind
|
|
7
|
+
|
|
8
|
+
Rollback feature về trạng thái tại một spec version cũ, cho phép re-do pipeline từ phase đã chọn.
|
|
9
|
+
|
|
10
|
+
> Lấy cảm hứng từ LangGraph Time Travel: **Replay** — revert về checkpoint cũ và re-execute.
|
|
11
|
+
|
|
12
|
+
## Điều kiện tiên quyết
|
|
13
|
+
- `.flow-state.yaml` phải tồn tại với `phase_history`
|
|
14
|
+
- Feature phải có ít nhất 1 lần chuyển phase
|
|
15
|
+
- KHÔNG đang ở R.1 (phải hoàn thành review trước)
|
|
16
|
+
|
|
17
|
+
## Khi nào dùng
|
|
18
|
+
|
|
19
|
+
- Spec version mới gây ra FAIL liên tục → quay lại version ổn định
|
|
20
|
+
- Team muốn thử lại approach khác từ một phase cụ thể
|
|
21
|
+
- Master Check FAIL → spec cần rollback vì hướng mới không khả thi
|
|
22
|
+
- Implementation phát hiện spec mới không hợp lý
|
|
23
|
+
|
|
24
|
+
> ❌ KHÔNG dùng cho production rollback — dùng `/v.hotfix`
|
|
25
|
+
|
|
26
|
+
## Quy trình
|
|
27
|
+
|
|
28
|
+
### Bước 1: Xác định target
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
/v.rewind [feature-id] --to [vX.Y] ← rollback về spec version cụ thể
|
|
32
|
+
/v.rewind [feature-id] --to-phase [phase] ← rollback về phase cụ thể
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Bước 2: Kiểm tra spec snapshots
|
|
36
|
+
|
|
37
|
+
Đọc `.flow-state.yaml` → `phase_history` để tìm snapshot tại target version:
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
phase_history:
|
|
41
|
+
- phase: "S.1"
|
|
42
|
+
entered_at: "2026-04-01"
|
|
43
|
+
spec_version: "v1.0"
|
|
44
|
+
- phase: "B.0"
|
|
45
|
+
entered_at: "2026-04-02"
|
|
46
|
+
spec_version: "v1.0"
|
|
47
|
+
- phase: "R.0"
|
|
48
|
+
entered_at: "2026-04-03"
|
|
49
|
+
spec_version: "v1.1"
|
|
50
|
+
verdict: "FAIL"
|
|
51
|
+
fail_reason: "spec_gap" # ← có thể muốn rewind về v1.0
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Bước 3: Thực hiện rewind
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
1. Lưu state hiện tại vào `_session.md` (trace entry):
|
|
58
|
+
### [REWIND] — [YYYY-MM-DD]
|
|
59
|
+
- **Từ**: phase [current], spec [vX.Y]
|
|
60
|
+
- **Về**: phase [target], spec [vA.B]
|
|
61
|
+
- **Lý do**: [lý do rewind]
|
|
62
|
+
|
|
63
|
+
2. Reset `.flow-state.yaml`:
|
|
64
|
+
- current_phase → target phase
|
|
65
|
+
- phase_status → "rewound"
|
|
66
|
+
- artifacts downstream → exists: false
|
|
67
|
+
- validation_report → null (nếu rewind trước R.0)
|
|
68
|
+
- active_concerns → clear (nếu rewind trước B.1)
|
|
69
|
+
|
|
70
|
+
3. Archive artifacts downstream:
|
|
71
|
+
- Nếu rewind từ R.0 về B.0:
|
|
72
|
+
→ Archive validation-report.md → _archive/validation-report.v1.1.md
|
|
73
|
+
- Nếu rewind từ B.1 về R.0:
|
|
74
|
+
→ Archive code changes (git stash hoặc branch)
|
|
75
|
+
- Giữ nguyên artifacts upstream (spec, plan nếu không bị đổi)
|
|
76
|
+
|
|
77
|
+
4. Báo cáo cho human:
|
|
78
|
+
"Feature [X] đã rollback về [phase] với spec [vA.B]
|
|
79
|
+
Bước tiếp theo: [command]
|
|
80
|
+
Artifacts đã archive: [list]"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Bước 4: Update state
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
# .flow-state.yaml sau rewind
|
|
87
|
+
current_phase: "B.0" # ← phase target
|
|
88
|
+
phase_status: "rewound" # ← marker đặc biệt
|
|
89
|
+
|
|
90
|
+
phase_history:
|
|
91
|
+
# ... history cũ giữ nguyên ...
|
|
92
|
+
- phase: "REWIND"
|
|
93
|
+
entered_at: "2026-04-03"
|
|
94
|
+
from_phase: "R.0"
|
|
95
|
+
from_spec: "v1.1"
|
|
96
|
+
to_phase: "B.0"
|
|
97
|
+
to_spec: "v1.0"
|
|
98
|
+
reason: "Master Check FAIL — spec v1.1 không khả thi"
|
|
99
|
+
|
|
100
|
+
rewind_count: 1 # ← tracking số lần rewind (> 2 = thận trọng)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Routing sau Rewind
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
Rewind về S.1 → /v.specify (sửa spec)
|
|
107
|
+
Rewind về B.0 → /v.plan + /v.test (re-plan)
|
|
108
|
+
Rewind về R.0 → /v.check (re-check)
|
|
109
|
+
Rewind về B.1 → tiếp tục implement từ task cuối
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Quy tắc
|
|
113
|
+
|
|
114
|
+
- **Luôn archive** artifacts bị xóa — không bao giờ delete hoàn toàn
|
|
115
|
+
- **Ghi trace** vào `_session.md` — mọi rewind phải có lý do
|
|
116
|
+
- **Cảnh báo nếu rewind > 2 lần** — có thể spec chưa rõ, cần re-think approach
|
|
117
|
+
- **Không rewind khi đang ở R.1** — hoàn thành review trước (policy: Reject)
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Ví dụ
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
/v.rewind 001-login --to v1.0
|
|
125
|
+
/v.rewind 001-login --to-phase B.0
|
|
126
|
+
/v.rewind 001-login --to v1.2 --reason "v1.3 quá phức tạp, quay lại approach cũ"
|
|
127
|
+
```
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "BA Agent — Phân tích yêu cầu và tạo Specification theo EARS notation"
|
|
3
|
+
phase: "S.1"
|
|
4
|
+
agent: "ba-agent"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /v.specify
|
|
8
|
+
|
|
9
|
+
> Orchestration wrapper cho **BA Agent**. Đọc `agents/ba-agent.md` để thực hiện core logic.
|
|
10
|
+
|
|
11
|
+
## Điều kiện tiên quyết
|
|
12
|
+
- `.v-flow/constitution.md` phải tồn tại
|
|
13
|
+
- Nếu legacy project: `.v-flow/context.md` nên có (để kiểm tra No-Go Zones)
|
|
14
|
+
|
|
15
|
+
## Execution
|
|
16
|
+
1. Đọc agent definition: `agents/ba-agent.md`
|
|
17
|
+
2. Thực hiện **Bước 0: Business Verification Gate** (xem `agents/ba-agent.md`)
|
|
18
|
+
3. Nếu gate PASSED (hoặc skipped): thực hiện toàn bộ quy trình còn lại trong agent definition
|
|
19
|
+
4. Áp dụng command options bên dưới (nếu có)
|
|
20
|
+
|
|
21
|
+
## Options
|
|
22
|
+
|
|
23
|
+
### --skip-check (Bỏ qua Business Verification)
|
|
24
|
+
|
|
25
|
+
Bỏ qua hoàn toàn Business Verification Gate (Bước 0). Dùng khi:
|
|
26
|
+
- Feature quá nhỏ, scope rõ ràng, không cần verify
|
|
27
|
+
- Đang iterate nhanh, đã verify trước đó rồi
|
|
28
|
+
- Module chưa có `business-quiz.md` và muốn bỏ qua cảnh báo
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
/v.specify --skip-check Tạo tính năng ...
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### --dual (Dual BA Mode)
|
|
35
|
+
|
|
36
|
+
Thêm flag `--dual` để kích hoạt **N-Round Adaptive Dual BA loop** sau khi tạo spec.
|
|
37
|
+
|
|
38
|
+
| Loại công việc | Khuyến nghị |
|
|
39
|
+
|----------------|-------------|
|
|
40
|
+
| Hotfix / Bug fix | ❌ Skip |
|
|
41
|
+
| Task nhỏ (< 1 ngày) | ❌ Skip |
|
|
42
|
+
| Feature nhỏ/vừa/lớn (S/M/L) | ✅ Khuyến nghị |
|
|
43
|
+
| Core module / Security-critical | ✅ Bắt buộc |
|
|
44
|
+
|
|
45
|
+
**Luồng khi dùng `--dual`:**
|
|
46
|
+
|
|
47
|
+
Sau khi `spec.md` v1.0 được tạo, agent sẽ:
|
|
48
|
+
1. Tạo `spec-review-log.md` từ `.v-flow/templates/spec-review-log-template.md`
|
|
49
|
+
2. Thông báo: `👉 Chạy /v.ba-critic để bắt đầu Round 1 review.`
|
|
50
|
+
|
|
51
|
+
Sau đó user lặp:
|
|
52
|
+
```
|
|
53
|
+
/v.ba-critic → ITERATE → BA Agent sửa spec
|
|
54
|
+
/v.ba-critic → CONVERGED → /v.plan
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 🔀 Routing Rules — Sau Specify
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Spec v1.0 tạo xong (không --dual)
|
|
63
|
+
→ ⏳ Chờ human approve spec
|
|
64
|
+
→ Sau approve:
|
|
65
|
+
[Optional S.1.5] /v.prototype ← nếu spec có ambiguity (BA Agent sẽ gợi ý)
|
|
66
|
+
→ /v.plan + /v.test (SONG SONG)
|
|
67
|
+
|
|
68
|
+
Spec v1.0 tạo xong (có --dual)
|
|
69
|
+
→ /v.ba-critic (Round 1)
|
|
70
|
+
|
|
71
|
+
Spec đã sửa (bump version)
|
|
72
|
+
→ /v.sync → /v.check
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Cập nhật State & Session
|
|
76
|
+
|
|
77
|
+
**Cập nhật `.flow-state.yaml`**:
|
|
78
|
+
```yaml
|
|
79
|
+
current_phase: "S.1"
|
|
80
|
+
phase_status: "done"
|
|
81
|
+
artifacts:
|
|
82
|
+
spec:
|
|
83
|
+
exists: true
|
|
84
|
+
version: "v1.0"
|
|
85
|
+
status: "draft"
|
|
86
|
+
spec_version_latest: "v1.0"
|
|
87
|
+
business_verification:
|
|
88
|
+
status: "passed" # hoặc "passed_with_warnings" | "skipped"
|
|
89
|
+
modules_verified:
|
|
90
|
+
- module: "domain-{tên}"
|
|
91
|
+
module_card_version: "{X.Y}"
|
|
92
|
+
verdict: "passed"
|
|
93
|
+
verified_at: "{ngày}"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Append vào `_session.md`**:
|
|
97
|
+
```markdown
|
|
98
|
+
### [S.1] Specify — [YYYY-MM-DD]
|
|
99
|
+
- **Agent**: BA Agent
|
|
100
|
+
- **Output**: spec.md v1.0
|
|
101
|
+
- **Module cards used**: [module] v[X.Y] ← từ business verification
|
|
102
|
+
- **Biz verification**: [passed | passed_with_warnings | skipped]
|
|
103
|
+
- **Requirements**: [N] total (U:[N] E:[N] S:[N] O:[N])
|
|
104
|
+
- **Human checkpoint**: pending approval
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Ví dụ
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
/v.specify Tạo tính năng đăng nhập bằng email/password,
|
|
113
|
+
hỗ trợ remember me, forgot password, và social login (Google, Facebook)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
/v.specify --dual Tạo tính năng payment gateway tích hợp VNPay và MoMo
|
|
118
|
+
```
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Sprint Planning Agent — Lập kế hoạch sprint và tạo sprint-status.md"
|
|
3
|
+
phase: "B.1"
|
|
4
|
+
agent: "sprint-agent"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /v.sprint
|
|
8
|
+
|
|
9
|
+
> Orchestration wrapper cho **Sprint Planning Agent**. Đọc `agents/sprint-agent.md` để thực hiện core logic.
|
|
10
|
+
|
|
11
|
+
## Điều kiện tiên quyết
|
|
12
|
+
- Ít nhất 1 feature có `tasks.md` sẵn sàng
|
|
13
|
+
- Feature phải đã qua R.0 (Master Check = PASS hoặc PASS_WITH_CONCERNS)
|
|
14
|
+
- `spec.md` và `.flow-state.yaml` phải tồn tại cho mỗi feature
|
|
15
|
+
|
|
16
|
+
## Execution
|
|
17
|
+
1. Đọc agent definition: `agents/sprint-agent.md`
|
|
18
|
+
2. Thực hiện toàn bộ quy trình trong agent definition
|
|
19
|
+
3. Tạo `sprint-status.md`
|
|
20
|
+
|
|
21
|
+
## Options
|
|
22
|
+
|
|
23
|
+
### (không có argument) — Sprint cho feature hiện tại
|
|
24
|
+
Sprint planning cho 1 feature đang active.
|
|
25
|
+
|
|
26
|
+
### --all — Sprint planning cho tất cả features
|
|
27
|
+
```
|
|
28
|
+
/v.sprint --all
|
|
29
|
+
```
|
|
30
|
+
Quét tất cả features đang eligible, tạo multi-feature sprint backlog.
|
|
31
|
+
|
|
32
|
+
### --update — Cập nhật sprint hiện tại
|
|
33
|
+
```
|
|
34
|
+
/v.sprint --update
|
|
35
|
+
```
|
|
36
|
+
Cập nhật progress trong `sprint-status.md` với trạng thái mới nhất.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 🔀 Routing Rules — Sau Sprint Planning
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Sprint plan tạo xong
|
|
44
|
+
→ Route: /v.implement (bắt đầu code theo sprint backlog)
|
|
45
|
+
|
|
46
|
+
Có feature chưa eligible
|
|
47
|
+
→ Route: /v.check (chạy Master Check cho feature đó)
|
|
48
|
+
|
|
49
|
+
Tất cả features blocked
|
|
50
|
+
→ Human intervention required
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Cập nhật State & Session
|
|
54
|
+
|
|
55
|
+
**Append vào `_session.md`** (mỗi feature trong sprint):
|
|
56
|
+
```markdown
|
|
57
|
+
### [Sprint] Sprint Planning — [YYYY-MM-DD]
|
|
58
|
+
- **Agent**: Sprint Planning Agent
|
|
59
|
+
- **Sprint**: Sprint [N]
|
|
60
|
+
- **Goal**: [sprint goal 1 câu]
|
|
61
|
+
- **Tasks selected**: [N must / M should / K nice-to-have]
|
|
62
|
+
- **Dependencies**: [cross-feature dependency summary]
|
|
63
|
+
- **Routing**: → /v.implement
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Ví dụ
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
/v.sprint
|
|
72
|
+
/v.sprint --all
|
|
73
|
+
/v.sprint --update
|
|
74
|
+
/v.sprint feature 001-user-login sprint 2
|
|
75
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Status Command — Hiển thị trạng thái pipeline visual, đề xuất bước tiếp theo"
|
|
3
|
+
phase: "Any"
|
|
4
|
+
agent: "status-agent"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /v.status
|
|
8
|
+
|
|
9
|
+
> Orchestration wrapper cho **Status Agent**. Đọc `agents/status-agent.md` để thực hiện core logic.
|
|
10
|
+
|
|
11
|
+
Hiển thị **dashboard trực quan** trạng thái pipeline của feature.
|
|
12
|
+
|
|
13
|
+
## Điều kiện tiên quyết
|
|
14
|
+
- `.v-flow/features/` phải có ít nhất 1 feature
|
|
15
|
+
- `.flow-state.yaml` nên tồn tại (fallback: file-based detection)
|
|
16
|
+
|
|
17
|
+
## Execution
|
|
18
|
+
1. Đọc agent definition: `agents/status-agent.md`
|
|
19
|
+
2. Thực hiện quy trình trong agent definition
|
|
20
|
+
3. Áp dụng Routing Rules bên dưới để đề xuất bước tiếp theo
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 🔀 Routing Rules — V Flow (cho Status Agent tham khảo)
|
|
25
|
+
|
|
26
|
+
| State | Route |
|
|
27
|
+
|---|---|
|
|
28
|
+
| Chưa có spec | `/v.specify` |
|
|
29
|
+
| Spec draft/reviewed | ⏳ Chờ human approve |
|
|
30
|
+
| Spec approved, thiếu plan/test | `/v.plan` + `/v.test` |
|
|
31
|
+
| Có artifact out-of-sync | `/v.sync` TRƯỚC |
|
|
32
|
+
| Không có validation | `/v.check` |
|
|
33
|
+
| Validation = PENDING_RECHECK | `/v.check` |
|
|
34
|
+
| Validation = FAIL + spec_gap | `/v.specify` |
|
|
35
|
+
| Validation = FAIL + plan_gap | `/v.plan` |
|
|
36
|
+
| Validation = FAIL + test_gap | `/v.test` |
|
|
37
|
+
| Validation = FAIL + nogo/constitution | Fix → `/v.plan` |
|
|
38
|
+
| Validation = PASS/CONCERNS | `/v.implement` |
|
|
39
|
+
| Tasks có [/] | Tiếp tục implement |
|
|
40
|
+
| Tất cả tasks [x] | `/v.review` |
|
|
41
|
+
| Review = CHANGES_REQUIRED | Fix → `/v.review` |
|
|
42
|
+
| Review = APPROVED | 🚀 Deploy → Retrospective → Metrics |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Cập nhật State & Session
|
|
47
|
+
|
|
48
|
+
**Không cập nhật `.flow-state.yaml`** — Status là read-only.
|
|
49
|
+
|
|
50
|
+
**Có thể auto-fix `phase_status`** nếu phát hiện stale state (ví dụ: phase_status = "in_progress" nhưng không có active work).
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Ví dụ
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
/v.status ← feature hiện tại
|
|
58
|
+
/v.status 001-user-login ← feature cụ thể
|
|
59
|
+
/v.status all ← tất cả features
|
|
60
|
+
/v.status --sprint ← sprint dashboard
|
|
61
|
+
/v.status 001 002 --compare ← so sánh 2 features
|
|
62
|
+
```
|