Skip to content
 
 

Latest commit

 

History

1,342 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SANYALnet Labs Kimi Code CLI Software Development Company

Personal downstream fork of MoonshotAI/kimi-code with local tweaks. Not intended for upstream merge.

A tuned build of the Kimi Code CLI that ships a preconfigured six-role AI software development company out of the box — inspired by ChatDev. A small hierarchy of specialised subagents (CEO, CPO, CTO, programmer, reviewer, tester) collaborates through a five-phase SDLC pipeline to turn a natural-language product requirement into working, reviewed, tested code.

Download the latest fork release — native binaries for linux-x64 / linux-arm64 / darwin-x64 / darwin-arm64 / win32-x64 / win32-arm64, tagged kimi-code-sanyalnet-cli-vX.Y.Z. Current recommended baseline is rev 1.0.0 (Nemotron 3 Ultra 550B A55B default, filesystem-driven initial-prompt autoload, full six-role SDLC company).

License CI Smoke Release

For the underlying Kimi Code CLI product — install script, quickstart, editor/IDE integration (ACP), /mcp-config, video input, hooks, marketplace plugins, general command reference — see the upstream README and upstream docs. This README covers only what the fork adds on top.

The company in action

Watch the raw MP4 (rev 1.0.0) if the inline player doesn't load. Earlier demo at rev 0.0.3 kept as a historical artefact.

SANYALnet Labs software development company running on Linux x64 with all six subagents active — CEO holding an internal all-hands to fix regressions, explore / CTO / programmer / reviewer completed, tester running the verification suite. Nemotron 3 Super 120B via NVIDIA NIM.

A real session on the SANYALnet lab box, mid-run against a snakes-and-ladders workspace. The operator has escalated a bad-regression report ("pieces not moving, ladders shaped like ladders, snakes look wrong") and asked the CEO to hold an internal all-hands. Reading the agent tree top to bottom:

  • ceo — 62m 17s in, 25.8k tokens, using the Agent tool to spawn the tester's verification suite — driving the all-hands.
  • explore — completed in 2m 8s, 35.3k tokens — audited gameView.js for the rendering issue.
  • cto — completed in 2m 59s, 51.3k tokens — confirmed the architecture.
  • programmer — completed in 9m 46s, 77.5k tokens across 26 tool calls — applied the rendering + movement fixes.
  • reviewer — completed in 2m 21s, 44.3k tokens — audited the diff.
  • tester — still running at 43m 44s, 105k tokens, 153 tool calls, executing node verify_tests.js — signing off the verification suite before the CEO closes the all-hands.

Context: 25.4k of the model's 977k window (3%). All six agents pinned to the same Nemotron 3 Super 120B on NVIDIA NIM with high thinking effort — no proxy in front (the fork's send_prompt_cache_key = false option retires the pre-fork NIM proxy workaround), all six roles active in one session.

Captures for the other five platforms (linux-arm64, darwin-x64, darwin-arm64, win32-x64, win32-arm64) will land here as they're taken.

How the software company works

On any fresh session, kimi loads the primer at ~/.kimi-code/SDLC-Multi-Agent-Project-Directive.md (via the fork's KIMI_INITIAL_PROMPT_FILE autoload) and treats the six persona files under ~/.kimi-code/agents/ as bindable subagents. When you press Enter on the pre-loaded directive, the CEO and CPO run Phase 1 automatically — they read the current project folder, synthesise a Project Status Briefing, then HALT and wait for your instructions. Phases 2 through 5 are defined but gated: they never begin without an explicit operator directive naming which phase to enter and what goal to pursue.

Phase Agents Output Trigger
1 — Inception & Status Audit ceo + cpo Project Status Briefing + a menu of candidate next-step tasks Automatic on session start; HALTS at the end
2 — Architectural Blueprint cto Tech-stack pick + architectural sign-off Operator approves a Phase 1 goal
3 — Implementation programmer Source, written incrementally against the blueprint Operator approves the Phase 2 blueprint
4 — Static Review reviewer Findings loop with the programmer until zero critical defects Programmer reports Phase 3 complete
5 — QA tester Unit / integration / edge-case tests + Certificate of Compliance Reviewer signs Phase 4 off

Each phase's output is the next phase's input; subagents run in isolated contexts and hand back structured results to the parent session, so the transcript stays legible. The full directive (with the HALT-after-Phase-1 rule and the gate preconditions for every downstream phase) lives in sanyalnet-lab/SDLC-Multi-Agent-Project-Directive.md; each persona is in sanyalnet-lab/agents/.

Install the fork on a fresh machine

Two steps: install the fork binary, then install the software company setup.

1. Fork binary. Download the appropriate zip from the latest release, unzip, put kimi on your PATH. On macOS you must clear the quarantine flag before first launch:

xattr -d com.apple.quarantine kimi

Verify:

kimi --version

2. Company setup. Clone this fork and run the installer — it symlinks the six agent personas plus the SDLC directive into $KIMI_CODE_HOME (default ~/.kimi-code) and, with --autoload, wires the initial-prompt env var into your ~/.bashrc so every fresh kimi session starts with the directive pre-loaded in the editor. Idempotent — re-run after git pull to refresh.

git clone https://github.com/tuklusan/kimi-code.git
cd kimi-code/sanyalnet-lab
./bin/install.sh --autoload

On first run the installer prompts (once, silently) for your NVIDIA NIM API key and seeds ~/.kimi-code/config.toml from the redacted template.

What this fork adds on top of upstream

  • sanyalnet-lab/ — six agent personas + the five-phase SDLC directive + an idempotent installer that deploys the whole software-development company onto any Linux / macOS / Windows box. See sanyalnet-lab/README.md.
  • Initial-prompt autoload — the TUI editor is pre-populated on every fresh session (never on resume) from, in order: (1) the KIMI_INITIAL_PROMPT_FILE env var, or (2) the canonical file $KIMI_CODE_HOME/initial-prompt.md. The second path is a filesystem-driven autoload: as soon as that file exists, the next kimi launch picks it up — no env var, no shell restart. sanyalnet-lab/bin/install.sh creates it as a symlink to the SDLC directive so an installed company setup autoloads out of the box. Docs: env-vars.md.
  • Per-provider send_prompt_cache_key opt-out — for strict OpenAI-compatible gateways (NVIDIA NIM, some vLLM deployments) that reject unknown request params with HTTP 400. Auto-set on provider catalog add for known strict endpoints; overridable via kimi provider set <id> --send-prompt-cache-key <true|false> or by hand in config.toml. Retires the pre-fork nim_proxy.py workaround (kept under sanyalnet-lab/legacy/ for archaeology).
  • KIMI_OUTBOUND_MIN_INTERVAL_MS — minimum 1-second gap between model-driven outbound network calls (fetch_url, web_search). Shared across both tools so a runaway loop cannot hammer external hosts. Default 1000; set to 0 to disable.
  • Auto-update disabled by default — this fork ships its own release binaries under the kimi-code-sanyalnet-cli-v* tags; the upstream update channel is a separate distribution and, if left on, would silently replace the fork's binary. Opt back in with KIMI_CODE_AUTO_UPDATE=1. Manual kimi upgrade still works.
  • Downstream release workflow.github/workflows/sanyalnet-release.yml publishes tagged kimi-code-sanyalnet-cli-vX.Y.Z releases with six-platform SEA binaries, no macOS signing needed.
  • Company review workflowssanyalnet-lab/review-workflows/ holds language-neutral, adjudicated review harnesses that the full software-development company runs against the current codebase. Two are shipped: deepseek-v4-pro-software-company-review-workflow-v31-draft.md (targets DeepSeek V4 Pro, needs DEEPSEEK_API_KEY) and nvidia-nim-nemotron3-ultra-software-company-review-workflow-final.md (targets Nemotron 3 Ultra 550B A55B, needs NVIDIA_API_KEY_CODING). install.sh symlinks both into $KIMI_CODE_HOME so they are one cat-and-paste away from any kimi session.
  • Model 404 is retryable — some model gateways return HTTP 404 transiently for endpoints during warm-up or autoscaling (notably NVIDIA NIM catalog endpoints during Nemotron autoscaling events). Upstream treated 404 as deterministic and failed fast; this fork classifies 404 in the same retryable class as 429, so a single autoscale blip no longer aborts a company run.
  • WaitFor tool wait cap raised to 999 s (~16 min 40 s) — 66% more headroom than the upstream 10-minute (600 s) default, so a long verification / QA / review run can sit on a single wait. The bump was non-trivial: the constant surfaces in the tool's zod .max() and .describe() text, both of which are emitted into the tools JSON that lives in the LLM system prompt, and two upstream inline snapshots (test/tool/tool.test.ts, test/agent/loop/loop.test.ts) pin that JSON verbatim including a SHA-256 hash of the whole tool schema. 999 was chosen for the value because it keeps the same 3-character footprint as 600 (so prompt tokenization is unchanged — a 4-digit value shifts a token and breaks fullCompaction.test.ts token-count assertions), and the two snapshots were regenerated on CI via the regen-snapshots workflow (pnpm exec vitest run --update) since the schema hash can only be recomputed by running the suite. For waits longer than 999 s the tool's own contract still applies: "A timeout is not an error: the tool returns the tasks that are still running, and you can call it again to keep waiting."

Multi-platform test results

Every push to main that touches sanyalnet-lab/, the smoke workflow itself, or the fork's autoload source files runs a smoke test that deploys the software-development company via sanyalnet-lab/bin/install.sh into a sandboxed KIMI_CODE_HOME on each of the six release runners, then asserts that every persona and directive file landed, the seeded config.toml carries the REPLACE_ME placeholder (never a real API key), the installer is idempotent, and the fork's KIMI_INITIAL_PROMPT_FILE autoload wiring is still present in the built source. No LLM calls — this is a fast, deterministic wiring check that runs in about a minute on all six runners in parallel.

Runner OS image Company install Runtime
linux-x64 ubuntu-24.04 ✅ pass ~10 s
linux-arm64 ubuntu-24.04-arm ✅ pass ~10 s
darwin-x64 (Intel) macos-15-intel ✅ pass ~15 s
darwin-arm64 (Apple Silicon) macos-15 ✅ pass ~15 s
win32-x64 windows-2025-vs2026 ✅ pass ~25 s
win32-arm64 windows-11-arm ✅ pass ~25 s

Live status via the "Company smoke × 6 platforms" badge above; the raw run history is at Actions → Sanyalnet Company Smoke Test.

The paired Sanyalnet E2E Fibonacci workflow (manual dispatch) drives the full five-phase pipeline against a real NVIDIA NIM model and asserts that the company delivers a working Fibonacci program plus documentation — see .github/workflows/sanyalnet-e2e-fibonacci.yml for the acceptance criteria. It is gated on the NVIDIA_API_KEY repo secret and is a no-op green while that secret is unset.

Develop this fork

git clone https://github.com/tuklusan/kimi-code.git
cd kimi-code
pnpm install
pnpm build
pnpm test

Node.js ≥ 24.15.0, pnpm 10.33.0. Same upstream toolchain — the fork adds no new build-time dependencies.

Community

Acknowledgements

  • MoonshotAI/kimi-code — the upstream project this fork is built on.
  • ChatDev — inspiration for the multi-role SDLC pipeline.
  • pi-tui — the TUI foundation, via upstream.

License

Released under the MIT License.

About

Kimi Code CLI, tuned by SANYALnet Labs into a preconfigured six-role AI software company (CEO, CPO, CTO, programmer, reviewer, tester) driven by a five-phase SDLC pipeline. Inspired by ChatDev. Native binaries for Linux, macOS, Windows. NVIDIA NIM, OpenRouter, DeepSeek work out of the box, no proxy.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages