Plan — Lập kế hoạch

Tạo kế hoạch implementation chi tiết từ ý tưởng. Có research agents chạy song song để tìm hiểu codebase trước khi plan.
Cập nhật bộ claudekit mới: Các lệnh /plan:fast, /plan:hard, /plan:two, /plan:parallel, /plan:cro, /plan:ci đã bỏ. Thay bằng /plan (tự chọn depth), cộng với /plan validate, /plan red-team. Xem cấu trúc skill mới để biết đầy đủ.

Cú pháp


Luồng hoạt động bên trong

Khi bạn gõ /plan "task", đây là những gì xảy ra bên trong:
1

Bước 1: Pre-Creation Check

Kiểm tra ./plans/ xem có plan nào đang active hoặc liên quan không.
  • Có plan active → hỏi: “Tiếp tục plan này? [Y/n]”
  • Có plan gợi ý từ branch → hỏi: “Kích hoạt plan này hay tạo mới?”
  • Không có plan → tạo mới
2

Bước 2: Cross-Plan Scan

Đọc frontmatter của tất cả plan chưa hoàn thành (status != completed/cancelled). So sánh scope: overlapping files, shared dependencies, cùng feature area. Nếu phát hiện dependency → cập nhật blockedBy/blocks ở CẢ HAI plan.
3

Bước 3: Scope Challenge

Hỏi câu hỏi thách thức scope để đảm bảo bạn đang giải quyết đúng vấn đề. Skip nếu mode --fast hoặc task quá đơn giản (<20 từ).
4

Bước 4: Mode Detection

Tự động phân tích độ phức tạp và chọn mode phù hợp (hoặc dùng flag bạn chỉ định).
5

Bước 5: Spawn Research Agents (song song)

Spawn 2+ researcher agents, mỗi agent tìm hiểu 1 phần codebase khác nhau. Skip nếu mode --fast.
6

Bước 6: Codebase Analysis

Đọc docs (./docs/), scout codebase nếu cần, hiểu patterns hiện có.
7

Bước 7: Plan Creation (planner subagent)

Planner subagent tổng hợp research reports và tạo plan chi tiết:
  • plan.md — overview, phases, status, links
  • phase-01-*.md, phase-02-*.md — chi tiết từng phase
8

Bước 8: Red Team Review (hard/parallel/two)

Gọi /plan red-team — adversarial reviewers cố tìm lỗ hổng trong plan.
9

Bước 9: Validation Interview (hard/parallel/two)

Gọi /plan validate — hỏi câu hỏi critical để validate plan.
10

Bước 10: Hydrate Tasks + Output

Tạo Claude Tasks từ phases. Output cook command với absolute path.

Lệnh Plan chính

Skill auto-detects độ phức tạp task và chọn research mode thích hợp.
Thời gian: 3-5 phút. Output: Plan chi tiết với file list, steps, dependencies.

Sub-commands: Validate & Red Team

Sau khi plan được tạo, sử dụng các commands sau để review:

Cách sử dụng Plan Validation & Red Team

/plan validate {file} — Validate plan

Gọi skill validation để hỏi câu hỏi critical về assumptions trong plan:
  • Có bỏ sót edge cases?
  • Dependencies đầy đủ?
  • Estimation thực tế?

/plan red-team {file} — Adversarial Review

Gọi red team tìm lỗ hổng, trade-offs chưa cân nhắc:
  • Architecture weakness?
  • Scope creep risks?
  • Performance concerns?

Ví dụ thực tế


So sánh với chat trực tiếp


Khi nào dùng / không dùng


Sub-commands


Plan Review bổ sung (Persona-based)

Sau khi plan được tạo, có thể gọi thêm review từ các personas khác nhau: Workflow ví dụ:

Lưu ý & Best Practices

Sai lầm phổ biến:
  • Plan quá rộng (8+ files trong 1 phase) → khó review, dễ conflict
  • Skip /plan validate → assumptions sai, phải rewrite plan
  • Không đọc research output → plan dựa trên assumptions thay vì facts
  • Skip CEO/Eng review cho high-stakes features → thiếu alignment
Tips từ team:
  • Skill auto-detects độ phức tạp; với task phức tạp, nó tự spawn researchers
  • Mỗi phase nên dưới 5 files — chia nhỏ nếu quá rộng
  • Luôn validate plan trước khi cook: /plan validate path/to/plan.md
  • Dùng /plan-ceo-review + /plan-eng-review cho features liên quan tới business/architecture
→ Xem thêm: Best Practices tổng hợp

Sau khi plan xong

1

Review plan

Đọc plan, kiểm tra:
  • Đúng requirements không?
  • Architecture hợp lý?
  • Steps đúng thứ tự?
2

Validate & Red Team (tùy chọn)

3

Implement


Chi tiết lệnh Plan (Accordion)

Prefix: /plan "task description"Tạo kế hoạch implementation chi tiết. Skill tự động detect độ phức tạp:
  • Task đơn giản (<20 từ) → skip scope challenge, minimal research
  • Task trung bình → spawn 1-2 researchers, optional red team
  • Task phức tạp (multi-file, arch change) → spawn 2+ researchers, red team bắt buộc
Output:
Khi dùng: Mỗi lần cần implementation detail trước khi code. Feature mới, refactor lớn, architecture change.
Prefix: /plan validate {file.md}Hỏi câu hỏi critical để validate assumptions trong plan đã tạo:
  • Edge cases bị bỏ sót?
  • Dependencies đầy đủ?
  • Estimation thực tế?
  • Requirements rõ ràng?
Output: List câu hỏi + answers + refinements to plan.Khi dùng: Trước khi cook (bắt buộc với high-stakes features), hoặc khi nghi ngờ assumptions.
Prefix: /plan red-team {file.md}Gọi red team tìm lỗ hổng, trade-offs chưa cân nhắc:
  • Architecture weakness?
  • Scope creep risks?
  • Performance concerns?
  • Security holes?
  • Team alignment issues?
Output: Red team report + list concerns + mitigation suggestions.Khi dùng: High-impact features, refactor toàn module, khi need outsider perspective.
Prefix: /plan-ceo-reviewCEO/founder review kế hoạch từ business angle:
  • Phù hợp business goals?
  • Timeline realistic?
  • Competition + market implications?
  • 10-star solution hay safe incremental?
Output: Business-focused feedback + strategic recommendations.Khi dùng: Features ảnh tới revenue, pricing, market positioning. Large refactors.
Prefix: /plan-eng-reviewEng manager review kế hoạch từ execution angle:
  • Tech risk assessment?
  • Resource planning realistic?
  • Dependency lock-in?
  • Team readiness?
Output: Tech risk report + execution concerns + resource recommendations.Khi dùng: Large refactors, infrastructure changes, architectural decisions. Mid-level teams.