· 中文
A spec-driven fork of MoonshotAI/kimi-code.
Spec Kimi keeps the upstream terminal agent foundation and changes the development model from an unstructured conversation into a traceable, spec-driven workflow.
The executable for this distribution is spec-kimi. It is intentionally different from the upstream kimi command so the two installations do not conflict.
Install from npm (Node.js >= 24.15.0 must be on PATH):
npm install -g @dev_xiaoyun/spec-kimi
spec-kimi --versionDo not use upstream kimi installers, Homebrew formulas, or the upstream npm package for this distribution.
To install a locally built package from the repository root, use the generated tarball directly:
npm install -g "./.tmp/spec-kimi-pack/dev_xiaoyun-spec-kimi-0.24.4.tgz"spec-kimi acp is the subprocess entry point for ACP-compatible IDEs. It uses the v2 engine by default, including streaming responses, client-managed file reads and writes, and real-time steering:
spec-kimi acpPass --engine v1 only when an existing IDE integration requires the legacy engine. See the ACP reference for the protocol surface and IDE integration details.
Spec Kimi diverges from upstream in four main areas: branding, the spec-driven workflow, IDE integration, and agent capabilities.
- Upstream:
kimi - Spec Kimi:
spec-kimi
The renamed binary lets you install both projects side-by-side without PATH conflicts. All package metadata, CLI help, and documentation reference spec-kimi.
Upstream uses an open-ended chat model where each turn is independent. Spec Kimi turns development into a tracked, auditable spec run:
| Upstream kimi-code | Spec Kimi | |
|---|---|---|
| Default mode | Free-form conversation | Spec Coding enabled by default |
| Planning | Optional /plan command |
Interactive sessions automatically consider Plan mode; spec-kimi --plan starts directly in Plan mode |
| Artifacts | System/session scoped | Project-local specs/<name>/ directory |
| Required files | None | spec.md (requirements, design, task checklist, decisions) + delivery.md (delivery record) |
| Progress tracking | Implicit | spec.md task checklist is the source of truth; checking a box updates progress |
| Acceptance | Ad-hoc | Approval-gated plan review with acceptance criteria before execution |
| Delivery | None | Structured delivery.md with evidence, verification, and audit trail |
The normal Spec Kimi path is:
- State the goal, constraints, scope, and acceptance criteria.
- Prepare a reviewable
spec.mdand approve it. - Execute the task checklist from
spec.md, checking off tasks to update progress. - Verify the result and fill in
delivery.mdfrom its template.
spec-kimi -p remains a non-interactive output interface. It cannot show or approve a plan, so it is not the workflow for an auditable development change.
Spec Kimi extends the upstream questioning policy to run both at the start of a task and whenever an unclear requirement arises mid-task. If a user request is ambiguous, contradictory, missing scope, or introduces unverified assumptions, the agent asks decisive questions and presents a paraphrase for confirmation before continuing.
The bundled VS Code extension adds project-local spec-run integration:
- A project-level entry point for spec runs.
- A resource view that lists active spec runs.
- An expandable spec-run document tree.
- Display of machine-readable delivery records.
- Auto-refresh of the spec-run view as tasks progress.
Spec Kimi adds a built-in GenerateImage tool that calls an OpenAI-compatible /images/generations endpoint. It is configured through config.toml:
[services.image_generation]
base_url = "https://api.openai.com/v1"
api_key = "sk-xxxxxxxxxxxxxxxx"The tool downloads generated images to the requested path, infers the correct file extension from the response, and enforces a 10 MiB size limit.
- This fork maintains its own
mainbranch. upstream/maintracks MoonshotAI/kimi-code and is merged in regularly.- New work is done on feature branches and merged through the spec-driven workflow when appropriate.
- Four modes: direct execution (no spec), prototype spec, standard spec, and strict spec.
- Project-local records: spec runs write to
specs/<name>/in the project root. The spec and delivery travel with the project instead of being hidden in a system directory. - The document is the state: opening
spec.mdshows the current progress; checking a box in the task checklist updates status. There is no separate index or dashboard. - Question when risky: the agent asks only when a requirement is ambiguous and high-risk, such as contradictions, unclear scope, implicit technology choices, unverified assumptions, or undefined boundaries. Clear or low-risk work is executed directly.
- High code quality by default: functions are documented, magic numbers are named, mature solutions are preferred, and files keep clear responsibilities and boundaries.
- Verifiable delivery: spec runs record engineering principles, verification evidence, and the delivery conclusion in
delivery.md.
Open a project and start the interactive workflow:
cd your-project
spec-kimiDescribe the desired outcome and constraints. Review the files under specs/<name>/ before approving implementation. See the in-repository Spec Coding guide for the full workflow and artifact layout.
Requirements: Node.js >= 24.15.0 and pnpm 10.33.0.
pnpm install
pnpm --dir apps/kimi-code run dev
pnpm --filter @moonshot-ai/kimi-code run typecheckSpec Kimi is derived from MoonshotAI/kimi-code. Upstream product documentation and installation channels describe the upstream product, not this distribution.
Released under the MIT License.