The everyday loop
This is the workflow you'll use most often. No spec needed — just a clear task and your AI assistant. Always research first so your AI understands the codebase before planning.
What You'll Build
- A task with clear acceptance criteria
- An AI-generated implementation plan
- Working code implemented by your AI assistant
- Tracked progress with time and notes
Initialize
/kn-init
AI loads your project context — existing tasks, docs, conventions, and memory.
Research the Area
Context before code
Always research before planning. Your AI writes better plans when it understands existing patterns, related code, and past decisions.
/kn-research health check endpoint, Express route pattern, monitoring
AI: Searching project context for "health check"... Found: - Code: src/routes/ — existing route pattern - Memory: "Express + TypeScript project" - No existing health endpoint Ready to create task with full context.
Create a Task
Ask your AI to create a task, or do it from the CLI:
You: Create a task to add a health check endpoint that returns server status and uptime AI: ✓ Created task-7x2k: "Add health check endpoint" AC-1: GET /health returns 200 with status "ok" AC-2: Response includes server uptime in seconds AC-3: Response includes current timestamp
Or via CLI:
knowns task create "Add health check endpoint" \
-d "Simple health check for monitoring" \
--ac "GET /health returns 200 with status ok" \
--ac "Response includes server uptime" \
--ac "Response includes timestamp"
Plan
/kn-plan 7x2k
AI reads the task, searches related docs and code, and creates a plan:
AI: Plan for task-7x2k: 1. Create src/routes/health.ts 2. Add GET /health route returning JSON 3. Include process.uptime() and Date.now() 4. Register route in app.ts 5. Verify all 3 ACs pass
The plan is saved to the task so any future session can pick it up.
Implement
/kn-implement 7x2k
AI: Starting task-7x2k: "Add health check endpoint" → Reading plan... → Memory: "Express + TypeScript project" Creating src/routes/health.ts... Updating src/app.ts to register route... ✓ AC-1: GET /health returns 200 ✓ ✓ AC-2: Uptime included ✓ ✓ AC-3: Timestamp included ✓ ✓ All acceptance criteria met
Review the Result
knowns task 7x2k --plain
Task: Add health check endpoint Status: done ACs: [✓] GET /health returns 200 [✓] Response includes uptime [✓] Response includes timestamp Notes: Created health.ts, registered in app.ts
Tips
Be specific with ACs
"Returns 200 with JSON body" is better than "Works correctly". Clear ACs help your AI know exactly when it's done.
Let AI plan first
The plan step catches issues before coding starts. It's faster to fix a plan than to rewrite code.
Use time tracking
Run knowns time start 7x2k before you begin. Time data helps with sprint planning and retrospectives.
What's next?
Ready for a more structured workflow? Try the Spec-Driven Fullstack Auth example, or read about Task Management for the full lifecycle.
Vòng lặp hằng ngày
Đây là workflow bạn sẽ dùng nhiều nhất. Không cần spec — chỉ cần task rõ ràng và AI assistant. Luôn research trước để AI hiểu codebase trước khi plan.
Bạn sẽ xây dựng gì
- Task với acceptance criteria rõ ràng
- Implementation plan do AI tạo
- Code hoạt động do AI implement
- Tiến độ được theo dõi với time và notes
Khởi tạo
/kn-init
AI load project context — tasks hiện có, docs, conventions, và memory.
Research trước
Context trước code
Luôn research trước khi plan. AI viết plan tốt hơn khi hiểu patterns hiện có, code liên quan, và decisions trước đó.
/kn-research health check endpoint, Express route pattern, monitoring
AI: Tìm kiếm project context cho "health check"... Tìm thấy: - Code: src/routes/ — route pattern hiện có - Memory: "Express + TypeScript project" - Chưa có health endpoint Sẵn sàng tạo task với full context.
Tạo Task
Yêu cầu AI tạo task, hoặc dùng CLI:
Bạn: Tạo task thêm health check endpoint trả về server status và uptime AI: ✓ Đã tạo task-7x2k: "Add health check endpoint" AC-1: GET /health trả về 200 với status "ok" AC-2: Response bao gồm server uptime tính bằng giây AC-3: Response bao gồm timestamp hiện tại
Hoặc qua CLI:
knowns task create "Add health check endpoint" \
-d "Simple health check for monitoring" \
--ac "GET /health returns 200 with status ok" \
--ac "Response includes server uptime" \
--ac "Response includes timestamp"
Lập kế hoạch
/kn-plan 7x2k
AI đọc task, tìm docs và code liên quan, tạo plan:
AI: Plan cho task-7x2k: 1. Tạo src/routes/health.ts 2. Thêm GET /health route trả về JSON 3. Bao gồm process.uptime() và Date.now() 4. Đăng ký route trong app.ts 5. Verify tất cả 3 AC pass
Plan được lưu vào task để session sau có thể tiếp tục.
Implement
/kn-implement 7x2k
AI: Bắt đầu task-7x2k: "Add health check endpoint" → Đọc plan... → Memory: "Express + TypeScript project" Tạo src/routes/health.ts... Cập nhật src/app.ts để đăng ký route... ✓ AC-1: GET /health trả về 200 ✓ ✓ AC-2: Uptime bao gồm ✓ ✓ AC-3: Timestamp bao gồm ✓ ✓ Tất cả acceptance criteria đạt
Xem kết quả
knowns task 7x2k --plain
Task: Add health check endpoint Status: done ACs: [✓] GET /health trả về 200 [✓] Response bao gồm uptime [✓] Response bao gồm timestamp Notes: Tạo health.ts, đăng ký trong app.ts
Mẹo
Viết AC cụ thể
"Trả về 200 với JSON body" tốt hơn "Hoạt động đúng". AC rõ ràng giúp AI biết chính xác khi nào xong.
Để AI plan trước
Bước plan phát hiện vấn đề trước khi code. Sửa plan nhanh hơn viết lại code.
Dùng time tracking
Chạy knowns time start 7x2k trước khi bắt đầu. Dữ liệu thời gian giúp sprint planning và retrospectives.
Tiếp theo?
Muốn workflow có cấu trúc hơn? Thử Spec-Driven Fullstack Auth, hoặc đọc Task Management cho lifecycle đầy đủ.