diff --git a/README.md b/README.md index 0425ffe..d4ca262 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ ## Why this exists -Teams use many AI tools (Cursor, Claude Code, Zed, Codex, …). Each session starts cold: no shared workflows, no institutional memory, and knowledge trapped in chats or private notes. +Teams use many AI tools (Cursor, Claude Code, Zed, Codex, Kimi, …). Each session starts cold: no shared workflows, no institutional memory, and knowledge trapped in chats or private notes. **Shared Agents** gives you one place to: @@ -92,7 +92,7 @@ After pulling Core + team (ff-only): 1. **Skill symlinks** — `skills/` + `team/skills/` → `~/.agents/skills`, `~/.claude/skills`, … 2. **Rule symlinks** — Cursor: `rules/` + `team/rules/` → `~/.cursor/rules/` -3. **Team-rules blocks** — Zed, Codex, Claude Code, Gemini, Windsurf, …: `` in each tool's `AGENTS.md` / `CLAUDE.md` +3. **Team-rules blocks** — Zed, Codex, Claude Code, Gemini, Windsurf, Kimi (best-effort), …: `` in each tool's `AGENTS.md` / `CLAUDE.md` Also runs quietly via IDE session hooks where configured. **`sa install`** is still required once per tool (hooks, base `` block). @@ -138,7 +138,7 @@ Install path defaults to `~/.shared-agents`. Team data lives under `team/` insid |-------|--------| | Learnings workflow | [docs/learnings.md](docs/learnings.md) | | Paths agents must use | [docs/canonical-paths.md](docs/canonical-paths.md) | -| Per-tool adapters | [adapters/](adapters/) (Cursor, Claude Code, Zed, …) | +| Per-tool adapters | [adapters/](adapters/) (Cursor, Claude Code, Zed, Kimi, …) | | Team skills & rules CLI | Skill [sa-cli](skills/sa-cli/SKILL.md) · `sa skill` · `sa rule` | | Migrating legacy `learnings/` | [docs/migration-team-data.md](docs/migration-team-data.md) | | CLI reference (full) | Skill `sa-cli` in [skills/sa-cli/SKILL.md](skills/sa-cli/SKILL.md) | diff --git a/adapters/README.md b/adapters/README.md index 8d12e62..02cc1bc 100644 --- a/adapters/README.md +++ b/adapters/README.md @@ -15,6 +15,7 @@ Per-tool wiring is defined in [`manifest.json`](manifest.json). **`sa install`** | [Copilot](copilot/README.md) | `~/.copilot/AGENTS.md` | Marker block | | [Aider](aider/README.md) | `~/.aider/AGENTS.md` | Marker block | | [OpenClaw](openclaw/README.md) | Entrypoint wrapper (headless) | Read paths under `$SHARED_AGENTS_HOME` | +| [Kimi Code CLI](kimi/README.md) | `~/.kimi/AGENTS.md` | Marker block (best-effort) | | [Generic](generic/README.md) | Copy-paste instructions | Manual | Team content (all tools): `sa skill new|list|rm` · `sa rule new|list|rm` — see root [README.md](../README.md). diff --git a/adapters/generic/README.md b/adapters/generic/README.md index 15d17cf..2d2e092 100644 --- a/adapters/generic/README.md +++ b/adapters/generic/README.md @@ -23,6 +23,7 @@ Many agents follow the **AGENTS.md pattern**: | OpenCode | `~/.config/opencode/AGENTS.md` | | Claude Code | `~/.claude/CLAUDE.md` or project `CLAUDE.md` | | Gemini CLI | `~/.gemini/GEMINI.md` | +| Kimi Code CLI | `~/.kimi/AGENTS.md` (best-effort — not auto-loaded) | | Project-level | `./AGENTS.md`, `./CLAUDE.md`, `.cursorrules` | ## Add first-class support diff --git a/adapters/kimi/README.md b/adapters/kimi/README.md new file mode 100644 index 0000000..bfaf194 --- /dev/null +++ b/adapters/kimi/README.md @@ -0,0 +1,52 @@ +# Kimi Code CLI + +> **Best-effort workaround — not a full integration.** +> +> Kimi does **not** natively load a global instructions file at session start (unlike Claude Code or Cursor). `sa install` creates `~/.kimi/AGENTS.md` anyway, but you must copy its contents into your prompt manually or use a wrapper script. `sa sync` keeps the file up to date so you always have the latest block ready to paste. + +Auto-configured by **`sa install`** when `~/.kimi` exists or the `kimi` binary is on `PATH`. + +Re-run **`sa sync`** after team changes (skills + rules) · First-time: **`sa install`** · Status: **`sa check`** + +## Global instructions + +Merged into **`~/.kimi/AGENTS.md`** (applies to all projects): + +| Marker block | Content | +|--------------|---------| +| `` | Sync + learnings workflow | +| `` | Core + team rules from `$SHARED_AGENTS_HOME/rules/` and `team/rules/*.mdc` | + +Your own sections **above** those markers (e.g. communication style) are never overwritten. The team-rules block is **refreshed on every `sa sync`** for detected tools. + +## How to use the AGENTS.md content + +Because Kimi does not read `~/.kimi/AGENTS.md` automatically, pick one of these workflows: + +1. **Copy-paste** — open `~/.kimi/AGENTS.md` and paste the `` block into your first prompt at the start of each session. +2. **Wrapper script** — create a small shell alias or script that reads `~/.kimi/AGENTS.md` and passes it as context to `kimi`. +3. **Project-level** — copy the block into a project `AGENTS.md` or `.kimi/AGENTS.md` if your project setup supports it. + +## Team skills & rules + +| Type | Team path | On Kimi | +|------|-----------|---------| +| Skills | `team/skills//SKILL.md` | Not auto-loaded — copy manually from `~/.agents/skills/` if needed | +| Rules | `team/rules/.mdc` | Merged into `~/.kimi/AGENTS.md` team-rules block | + +```bash +sa skill new | sa skill list | sa skill rm [name] +sa rule new | sa rule list | sa rule rm [slug] +``` + +Wizards commit/push by default (`--no-git` to skip). Teammates run **`sa sync`**. Optional rule frontmatter: `targets: [kimi, cursor]` — omit for all adapters. + +## Sync + +No built-in session hook — the AGENTS.md block instructs the user to run `sync.sh pull` as the first command, but Kimi does not execute it automatically. You must trigger `sa sync` manually or copy the updated block before each session. + +## Why this is marked "best-effort" + +- No native session hook (Cursor `hooks.json`, Claude Code `settings.json`). +- No native global instructions loader (Zed, Codex, Aider load `AGENTS.md` automatically). +- The `~/.kimi/` directory is **not** an official Kimi config path; it is a convention chosen by this project so that `sa install` / `sa sync` have a stable target file. diff --git a/adapters/manifest.json b/adapters/manifest.json index 3e21f3a..337fda7 100644 --- a/adapters/manifest.json +++ b/adapters/manifest.json @@ -129,6 +129,15 @@ "name": "Any AGENTS.md / CLAUDE.md CLI", "detect": null, "docs": "adapters/generic/README.md" + }, + { + "id": "kimi", + "name": "Kimi Code CLI", + "detect": "~/.kimi", + "detect_bins": ["kimi"], + "docs": "adapters/kimi/README.md", + "agents_md": "~/.kimi/AGENTS.md", + "note": "Best-effort workaround — Kimi has no native global instructions loader. AGENTS.md is not read automatically; copy content manually or use a wrapper." } ] } diff --git a/docs/canonical-paths.md b/docs/canonical-paths.md index 8b2b730..99d71a6 100644 --- a/docs/canonical-paths.md +++ b/docs/canonical-paths.md @@ -101,7 +101,7 @@ Bei **`sa sync`** (täglich) bzw. **`sa install`** (Erst-Setup): | Adapter-Typ | Installation | |-------------|--------------| | **Cursor** | Symlinks → `~/.cursor/rules/*.mdc` | -| **AGENTS.md / CLAUDE.md** (Zed, Codex, **Claude Code**, Gemini, Windsurf, …) | Marker-Block `` | +| **AGENTS.md / CLAUDE.md** (Zed, Codex, **Claude Code**, Gemini, Windsurf, Kimi best-effort, …) | Marker-Block `` | | **Eigene Datei am Ziel** (kein Symlink, Cursor) | **Nicht überschrieben** | Quellen: `$SHARED_AGENTS_HOME/rules/` (Core) + `$SHARED_AGENTS_HOME/team/rules/` (Team). diff --git a/skills/sa-cli/SKILL.md b/skills/sa-cli/SKILL.md index 50973ec..2650688 100644 --- a/skills/sa-cli/SKILL.md +++ b/skills/sa-cli/SKILL.md @@ -231,7 +231,7 @@ Team rules: `$SHARED_AGENTS_HOME/team/rules/*.mdc` (flat). Core: `$SHARED_AGENTS After edit: commit/push team repo → teammates **`sa sync`** (links skills + rules automatically). - **Cursor:** symlinks → `~/.cursor/rules/` (local non-symlink files preserved) -- **Zed, Codex, Claude Code (`~/.claude/CLAUDE.md`), Gemini, Windsurf, …:** merged `` block in each tool's agents file +- **Zed, Codex, Claude Code (`~/.claude/CLAUDE.md`), Gemini, Windsurf, Kimi (best-effort), …:** merged `` block in each tool's agents file Optional frontmatter: `targets: [zed, claude-code]` — omit for all adapters.