Skip to content

Aleksacom/kimi-orchestration-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kimi CLI Orchestration Bootstrap

Production-grade discipline framework for Kimi CLI. One paste, full setup. Classification gate, PP-gated workflow, 5-role discipline — wired through Kimi's native AGENTS.md auto-load.

License: MIT Works with: Kimi CLI Setup time: 15-25 min

What this is

A single setup prompt you paste into Kimi CLI when starting any project. Kimi then:

  1. Asks 12 plain-English discovery questions
  2. Recommends a preset (Light / Standard / Collaborative / High-Stakes)
  3. Creates 8–20 framework files based on the preset
  4. Sets up git and GitHub
  5. Installs automation hooks
  6. Runs a verification test to confirm the framework is self-enforcing

After 15–25 minutes, every change to your project goes through classify → plan → verify → implement → review → ship automatically.

The problem this solves

Kimi CLI is fast. Without discipline, fast becomes chaos:

  • The AI changes 12 files when you asked for one
  • Decisions baked in silently
  • "Why is this here?" mysteries surface months later
  • Compounding mistakes with no paper trail

This kit adds gates throughout the workflow. The AI classifies every request, plans before touching code, and stops for your ratification on anything non-trivial.

Failure modes already prevented

This kit is hardened against real failures observed in production Kimi CLI sessions:

  • "Small UI change" rationalization — Kimi pattern-matching to "just do it" and writing new files without a plan. Fixed by the imperative classification gate in AGENTS.md.
  • AGENTS.md descriptive vs imperative gap — Loading the file doesn't enforce it. Fixed by "you MUST" language with explicitly forbidden actions.
  • Subprocess env-var pollution — Kimi's ANTHROPIC_* config colliding with Claude Code consult calls causing indefinite hangs. Fixed by sanitizing env in subprocess calls.
  • Decision-doc contradictions — Yesterday's decisions silently overridden today. Fixed by the "scan recent decisions before planning" rule.
  • Stale build after merge — Old Next.js process serving pre-merge code. Fixed by post-merge git hook with port-cleanup.
  • Silent guessing on high-risk questions — Kimi answering security, money-flow, or data-integrity questions from gut instead of consulting a stronger model. Fixed by the mandatory consult-triggers list — specific topics where make consult is non-optional.

How to use it

  1. Open Kimi CLI in your project folder (new or existing)
  2. Copy the contents of setup-prompt.md
  3. Paste as your first message
  4. Answer the 12 discovery questions
  5. Approve the recommended preset
  6. Wait for files to be created
  7. Run the verification test Kimi instructs at the end

Detailed walkthrough: INSTALL.md.

What you get

After the kit runs:

your-project/
├── AGENTS.md                    ← Imperative classification gate (Kimi auto-loads)
├── docs/
│   ├── orchestration/
│   │   ├── playbook.md          ← PP-gate specifications
│   │   ├── conventions.md       ← Commits, branches, doc formats
│   │   └── sub-phase-template.md
│   ├── decisions/
│   │   └── _template.md         ← Lean decision-doc template
│   ├── backlog/
│   │   └── candidates.md        ← ACTIVE / DEFERRED / DONE
│   └── agents/                  ← Standard+ presets only
│       ├── cm-planner.md        ← Planning role
│       ├── cm-decider.md        ← Auto-resolve vs escalate
│       ├── reviewer.md          ← PP-final diff review
│       ├── conventions-audit.md ← Decision-doc compliance
│       ├── test-author.md       ← Coverage gap filler
│       └── README.md
├── Makefile                     ← Includes `consult` if enabled
├── scripts/post-merge.sh        ← If automation needed
├── README.md
└── .gitignore

Plus a Kimi CLI session that follows the framework on every change.

The four preset profiles

Preset For Includes
Light Solo learning projects Classification gate, PP1+PP-final only, optional branches
Standard Solo shipping projects Full 4 gates, 5 role files, decision-docs, branch ceremony
Collaborative Small teams (2–5) Standard + PRs + mandatory reviewers
High-Stakes Production / regulated Collaborative + compliance gates + 2+ reviewers

You can upgrade or downgrade as your project evolves.

Why Kimi CLI specifically

This kit uses Kimi's native AGENTS.md auto-loading mechanism (verified against kimi_cli/soul/agent.py v1.44.0). The framework activates without you pasting a bootstrap message at every session — Kimi reads AGENTS.md automatically when starting in the project directory.

Other AI coding tools have their own conventions. Use the right tool for the right repo:

Tool Repo
Kimi CLI kimi-orchestration-bootstrap (this repo)
Claude Code claude-code-orchestration-agents
Tool-agnostic (Cursor, Aider, ChatGPT, etc.) ai-orchestration-framework

Same mental model across all three. Pick whichever matches your tool.

What this is NOT

  • ❌ Not a Kimi CLI installer (bring your own)
  • ❌ Not zero-config — you'll iterate on AGENTS.md as you discover new failure modes
  • ❌ Not magic — discipline works because YOU follow the pipeline, Kimi enforces it
  • ❌ Not appropriate for trivial single-file scripts

Why this exists

I'm a business analyst in banking-sector IT — not a developer. When AI coding tools made it possible for me to build my own projects, I loved the speed but kept losing control. The AI would change things I didn't understand. Decisions got re-debated. Mistakes compounded.

This kit is what I built for myself, refined through real Kimi CLI sessions on an ongoing production project. Every failure mode the imperative-mode AGENTS.md prevents was discovered the hard way first. Sharing freely so others can skip the painful learning curve.

License

MIT — free to use, fork, modify, redistribute. See LICENSE.

Issues and feedback

Found a failure mode the kit doesn't prevent? Open an issue with the repro pattern. The kit improves by learning from real failures.

⭐ Star this repo if it helped you.

About

Production-grade discipline framework for Kimi CLI. One paste, full setup. Classification gate + PP-gated workflow + 5-role discipline via AGENTS.md auto-load.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors