
Spec-Driven Development với GitHub Spec Kit đã giúp tôi biến AI từ “vibe coding” thành đồng đội thực thụ khi xây RabbitSVN. Bài viết chia sẻ quy trình, case study và trade-off thực tế.
Turning AI into a real teammate: SpecKit on the RabbitSVN journey
AI coding agents (GitHub Copilot, Claude Code, Cursor, …) are everywhere — and so is vibe coding: endless prompts, code that looks fine until the system grows wrong architecture, wrong business flows, and you rebuild from scratch.
That was my story while building and extending RabbitSVN, a native macOS Subversion client. I adopted GitHub’s Spec Kit for Spec-Driven Development (SDD) to regain control.
This post covers how I applied SpecKit to RabbitSVN and how it changed the way I ship software.
1. The problem at RabbitSVN and why I needed rails
RabbitSVN demands precision: working-copy state, folder operations, sync/merge edge cases, and responsive UI on huge directories.
The old loop — idea → AI prompt → bulk code — hit hard limits:
| Issue | Outcome |
|---|---|
| Vague requirements | AI invents implicit business rules; design intent drifts |
| Inconsistency | New modules fight existing architecture and style |
| Poor maintainability | No living spec — only long chat history |
The shift: spec first, implementation second — SDD with SpecKit.
2. What SpecKit is and how I use it on RabbitSVN
SpecKit is not a standalone agent. It is a CLI + slash-command layer for IDE assistants (VS Code, Cursor, …), forcing a pipeline before code lands:
Constitution → Specify → Clarify → Plan → Tasks → Implement
Commands map to: /speckit-constitution, /speckit-specify, /speckit-clarify, /speckit-plan, /speckit-tasks, /speckit-implement.
Step 1 — Project constitution (/speckit-constitution)
Non-negotiable rules for RabbitSVN: style, modular architecture, security, unit tests for core logic. The agent stays inside this frame.
Step 2 — Feature spec (/speckit-specify)
I write like a PM, not like a codegen prompt:
- Who is the user?
- What is the user flow?
- What are acceptance criteria?
SpecKit produces spec.md with flows, edge cases, and testable criteria.
Step 3 — Clarify blind spots (/speckit-clarify)
Hard questions before planning — e.g. What happens if sync is interrupted? How are local-layer conflicts resolved? Answers here save logic bugs later.
Step 4 — Technical plan (/speckit-plan)
plan.md names RabbitSVN modules to touch, tech choices, and integration without breaking existing behavior.
Step 5 — Tasks & implement (/speckit-tasks, /speckit-implement)
Small, verifiable tasks. The agent implements incrementally instead of one unreviewable blob.
3. Case study: faster status scans & versioning icons on large trees
Problem: Tens of thousands of files — SVN status calls stall the UI, burn resources, and hang without careful async. Unguided AI often spits out tangled threading without cancellation when the user switches folders.
With SpecKit:
- Specify — latency budget, scan debounce, cancel in-flight work.
- Clarify — RAM ceiling during scans.
- Plan — queue + worker pool aligned with RabbitSVN’s structure.
- Tasks — (1) core queue, (2) timeout unit tests, (3) UI integration.
Results:
- Snappier status feedback, less UI jank.
- Code matches RabbitSVN architecture; unit tests trace back to acceptance criteria.
spec.md/plan.mdin-repo — living docs for the next iteration.
4. Pros and cons (honest take)
Pros
- Think first, code second — less early tunnel vision on implementation.
- Stabler output — fewer hallucinated libraries and logic detours.
- Transparent docs — every feature ships with spec/plan; easier handoff.
Cons
- Upfront time — 5–10 minutes for spec and clarify/plan (usually wins in debug time).
- Overkill for micro-tasks — one-line CSS or rename: SpecKit can feel heavy.
5. Closing
RabbitSVN needs discipline in systems code. SpecKit turned AI from a roulette wheel into a process I can trust: clear intent, tight design, precise execution.
If AI-generated code keeps fighting your architecture, try Spec Kit in your workflow — the smoothness may surprise you.
Have you tried Spec-Driven Development on a side project? I’d love to hear your story on GitHub.
Read more: RabbitSVN showcase · Spec Kit on GitHub
Biến AI thành “đồng đội” thực thụ: Hành trình SpecKit cùng RabbitSVN
Trong thời đại AI coding agent (GitHub Copilot, Claude Code, Cursor, …) phổ biến, nhiều lập trình viên rơi vào vibe coding: prompt liên tục, code trông ổn nhưng càng làm sâu càng lệch kiến trúc, sai luồng nghiệp vụ, cuối cùng phải đập đi làm lại.
Đó là bài toán tôi gặp khi phát triển và mở rộng RabbitSVN — client Subversion gốc cho macOS. Giữa lúc tìm cách kiểm soát quy trình tốt hơn, tôi thử Spec Kit của GitHub cho Spec-Driven Development (SDD).
Bài viết chia sẻ cách tôi áp dụng SpecKit vào RabbitSVN, và vì sao nó thay đổi cách tôi làm phần mềm.
1. Bài toán tại RabbitSVN và lý do cần “đường ray” mới
RabbitSVN đòi hỏi độ chính xác cao: trạng thái working copy, thao tác thư mục, edge case khi sync/merge, và UI phản hồi mượt trên thư mục lớn.
Khi phát triển tính năng theo kiểu ý tưởng → prompt AI → nhận code, tôi thấy các điểm nghẽn:
| Vấn đề | Hệ quả |
|---|---|
| Yêu cầu mơ hồ | AI tự suy diễn business logic; code lệch ý đồ thiết kế |
| Thiếu nhất quán | Module mới đi ngược kiến trúc và style của project |
| Khó bảo trì | Không có spec sống — chỉ còn lịch sử chat dài với AI |
Giải pháp: chuyển từ “ra lệnh ngẫu hứng” sang đặc tả chuẩn trước, để AI thi công sau — SDD với SpecKit.
2. SpecKit là gì và quy trình trên RabbitSVN?
SpecKit không phải một AI agent riêng. Đây là CLI + slash commands gắn với trợ lý AI trong IDE (VS Code, Cursor, …), ép luồng phát triển qua các “trạm” trước khi sinh code:
Constitution → Specify → Clarify → Plan → Tasks → Implement
Tương ứng các lệnh quen thuộc: /speckit-constitution, /speckit-specify, /speckit-clarify, /speckit-plan, /speckit-tasks, /speckit-implement.
Bước 1 — Hiến pháp dự án (/speckit-constitution)
Định nghĩa quy tắc không thể thương lượng cho RabbitSVN: coding style, kiến trúc module, bảo mật, bắt buộc unit test cho logic cốt lõi. AI luôn “nhìn” trong khung này khi generate code.
Bước 2 — Đặc tả tính năng (/speckit-specify)
Thay vì prompt code dài, tôi mô tả tính năng như PM:
- Ai là người dùng?
- User flow?
- Acceptance criteria?
SpecKit chuyển ý tưởng thành spec.md: flow, edge cases, tiêu chí chấp nhận.
Bước 3 — Rà soát điểm mù (/speckit-clarify)
SpecKit đặt câu hỏi “hóc búa” trước khi plan — ví dụ: Ngắt kết nối giữa chừng khi sync thì xử lý thế nào? Xung đột tầng local giải quyết ra sao? Trả lời sớm → ít bug logic về sau.
Bước 4 — Kế hoạch kỹ thuật (/speckit-plan)
Sinh plan.md: module RabbitSVN nào đổi, công nghệ, cách tích hợp không phá tính năng cũ.
Bước 5 — Task & implement (/speckit-tasks, /speckit-implement)
Chia task nhỏ, có thể kiểm chứng. AI implement từng bước thay vì một khối code khổng lồ khó review.
3. Case study: tối ưu quét & icon trạng thái trên thư mục lớn
Bài toán: Thư mục hàng chục nghìn file — gọi SVN status dễ nghẽn UI, tốn tài nguyên, dễ treo nếu async không khéo. AI “tự do” thường sinh multi-threading rối, thiếu cancellation khi user đổi thư mục.
Với SpecKit:
- Specify — latency budget, debounce khi quét, bắt buộc hủy job cũ.
- Clarify — giới hạn RAM khi quét.
- Plan — queue + worker pool phù hợp kiến trúc RabbitSVN.
- Tasks — (1) core queue, (2) unit test timeout, (3) tích hợp UI.
Kết quả:
- Phản hồi trạng thái file nhanh hơn, UI ít giật lag.
- Code bám kiến trúc RabbitSVN; unit test bám acceptance criteria trong spec.
spec.md/plan.mdtrong repo — tài liệu sống cho các lần nâng cấp sau.
4. Ưu & nhược điểm (thực tế)
Ưu điểm
- Tư duy trước, code sau — giảm sa đà chi tiết kỹ thuật sớm.
- Code ổn định hơn — hạn chế hallucination (thư viện ảo, logic lệch).
- Tài liệu minh bạch — spec/plan đi kèm từng tính năng, dễ bàn giao và onboard.
Hạn chế
- Tốn thời gian đầu — 5–10 phút spec + clarify/plan (thường tiết kiệm hơn ở phase debug).
- Không cho task “mì ăn liền” — sửa CSS một dòng, đổi tên biến: SpecKit có thể cồng kềnh.
5. Lời kết
RabbitSVN cần sự chặt chẽ từng dòng code hệ thống. SpecKit giúp tôi dùng AI có kỷ luật: rõ từ ý tưởng, chặt trong thiết kế, chính xác khi implement.
Nếu bạn đang vật lộn với code AI lệch kiến trúc, thử đưa Spec Kit vào workflow — có thể bạn sẽ bất ngờ vì độ “mượt” và chuyên nghiệp.
Bạn đã thử Spec-Driven Development cho dự án cá nhân chưa? Chia sẻ trên GitHub hoặc issue blog — tôi rất muốn nghe case của bạn.
Đọc thêm: RabbitSVN showcase · Spec Kit trên GitHub
