[CLAUDE] Docs: S22 chốt v2 — Directive Thứ 9 BẮT BUỘC delegate sub-agent + Plan B preview pre-allocated

Bro re-emphasize prompt setup với rule Thứ 9 mới:
"Các task bất kỳ, BẮT BUỘC phải phân việc đầy đủ cho các Sub Agent đúng
vai trò, vị trí đã được chỉ định"

Retrospective S22: em main solo 6/10 task lẽ ra delegate được (vi phạm):
- Plan D F2 toggle UI → Implementer Case 2 (cookie-cutter mirror UsersPage)
- Plan C task 4 reflection regression test → Implementer Case 3
- Plan C task 1-3 14 service test catch-up → Implementer Case 3
- S22+2 seed 20 user script → Implementer Case 1 (mass deterministic)
- S22+3 rename users SQL transaction → Implementer Case 1
- Plan F pre-flight prod sqlcmd → Investigator (read-only audit)

Em main solo ĐÚNG 4/10 task:
- Plan E phân quyền strict V2 (security cross-stack)
- S22+1 disable 3 button bug fix (reasoning chain)
- S22+4 attachment view + Section adjust (UX + schema decision)
- S22+5 Mig 30 per-NV (cross-stack schema refactor)

Forward S23+ rule enforcement:
1. .claude/agents/README.md +banner "🚨 RULE BẮT BUỘC (Thứ 9)" trên top
   invocation tree + retrospective S22 lesson + workflow forward
2. docs/HANDOFF.md S22 chốt v2 Last updated với note S23+ forward
3. Plan B Contract V2 wire pre-allocated 5 chunk sub-agent role table:
   - Pre-flight Contract V1 state → Investigator
   - Chunk A Mig 31 schema → Implementer Case 2
   - Chunk B Service ApproveV2Async → Em main Solo (cross-stack)
   - Chunk C Mig 32 LevelOpinions + service hook → Implementer Case 2
   - Chunk D FE ContractCreate Workspace V2 → Implementer Case 2
   - Chunk E FE ContractDetail Section 5 V2 → Implementer Case 2
   - Pre-commit each chunk → Reviewer
   - Post-deploy → CICD Monitor

Em main solo CHỈ khi: schema/UX/architecture decision + cross-stack tight
coupling + bug fix reasoning chain.

KHÔNG cắt narrative cũ — append rule banner ở top + Plan B section trước
Session 21 timeline.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
pqhuy1987
2026-05-14 21:47:58 +07:00
parent 2b9788d7a9
commit eb106f20a0
2 changed files with 36 additions and 1 deletions

View File

@ -33,6 +33,21 @@
---
## 🚨 RULE BẮT BUỘC (S22 chốt cuối — directive Thứ 9)
**Em main BẮT BUỘC phân việc cho sub-agent đúng vai trò khi ACCEPT criteria match.**
Retrospective S22 lesson: Em main solo 6/10 task lẽ ra delegate được (Plan D + Plan C task 1-4 + S22+2 + S22+3 + Plan F pre-flight). KHÔNG fail nhưng vi phạm directive. Token cost overhead + lose multi-agent ROI.
**Workflow forward S23+:**
- Trước mọi task, classify qua decision tree dưới đây
- Nếu task qualify Implementer Case 1/2/3/5 → **BẮT BUỘC spawn**, KHÔNG em main solo
- Nếu task có pre-flight read-only → **BẮT BUỘC spawn Investigator** trước
- Nếu task có deploy claim → **BẮT BUỘC spawn CICD Monitor** sau push
- Nếu task có heavy diff / security-sensitive → **BẮT BUỘC spawn Reviewer** pre-commit
Em main solo chỉ khi: schema/UX/architecture decision + cross-stack tight coupling + bug fix reasoning chain.
## 🔄 Invocation decision tree (em main apply)
Task input → classify task type: