@kraftapps-ai/kai
v1.7.1
Published
Autonomous AI developer loop for Claude Code
Downloads
2,113
Maintainers
Readme
Kai
Your AI product manager and development team. One command.
npm i -g @kraftapps-ai/kai
kaiWhat is Kai?
Kai is a CLI that opens an interactive AI session acting as your product manager. Tell it what you want to build. It breaks the work into stories, then dispatches an autonomous AI developer to implement them — with a built-in reviewer that catches when the AI cuts corners.
How it works
You ←→ Kai (PM) # brainstorm, plan, decide
↓
kai.json # stories with acceptance criteria
↓
┌────────┴────────┐
│ Developer AI │ # implements one story at a time
│ (claude -p) │
└────────┬────────┘
↓
┌────────┴────────┐
│ Reviewer AI │ # verifies each criterion independently
│ (claude -p) │
└────────┬────────┘
↓
Committed code # repeat until all stories doneUsage
cd your-project
kaiThat's it. Kai will:
- Auto-initialize if this is a new project
- Ask what you want to build
- Help you refine the idea and break it into stories
- Write the stories to
kai.json - When you say "go" — dispatch the AI developer loop
- Report back when everything is done
Next time you run kai, it picks up where you left off — reads kai.json for stories and kai-progress.txt for what's been done.
Example
$ kai
> I want to add Stripe payments to my Next.js app
Kai: Let me break that down. A few questions first:
- Checkout or subscriptions?
- Do you need a customer portal?
...
> Just one-time checkout for now. Ship it.
Kai: Created 8 stories in kai.json. Starting the dev loop...
#1: Add Stripe SDK and env config
#2: Create checkout API route
#3: Add checkout button component
...
All 8 stories complete!Files
your-project/
├── kai.json # Stories (version control this)
├── kai-progress.txt # Implementation log
└── .kai/
├── PROMPT.md # Project context (edit this!)
├── loop.sh # Implementation loop (auto-generated)
├── loop.log # Loop output
└── context.txt # Optional: extra files to includeProject context
Edit .kai/PROMPT.md with your tech stack, build commands, and conventions. Kai reads this on every startup and passes it to the developer AI.
Install
npm i -g @kraftapps-ai/kaiOr without installing:
npx @kraftapps-ai/kaiRequirements: Claude Code CLI, jq, git
Context window
All state lives in files (kai.json, kai-progress.txt). When your session gets long, just exit and run kai again — it reads the files and picks up where you left off. No state is lost.
The developer loop already handles this by design — each story is a fresh claude -p call with a clean context window.
The review step
After each story is implemented, a separate Claude instance reviews the code:
- Reads the actual git diff (not the implementer's self-report)
- Verifies each acceptance criterion
- Is told: "Be skeptical. The implementer may have cut corners."
Failed reviews reset the story and feed back the failure reason for the next attempt. After 3 failures, the story is skipped.
License
MIT
