Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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, …: `<!-- shared-agents:team-rules:begin/end -->` in each tool's `AGENTS.md` / `CLAUDE.md`
3. **Team-rules blocks** — Zed, Codex, Claude Code, Gemini, Windsurf, Kimi (best-effort), …: `<!-- shared-agents:team-rules:begin/end -->` 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 `<!-- shared-agents:begin -->` block).

Expand Down Expand Up @@ -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) |
Expand Down
1 change: 1 addition & 0 deletions adapters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
1 change: 1 addition & 0 deletions adapters/generic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
52 changes: 52 additions & 0 deletions adapters/kimi/README.md
Original file line number Diff line number Diff line change
@@ -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 |
|--------------|---------|
| `<!-- shared-agents:begin/end -->` | Sync + learnings workflow |
| `<!-- shared-agents:team-rules:begin/end -->` | 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 `<!-- shared-agents:begin/end -->` 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/<name>/SKILL.md` | Not auto-loaded — copy manually from `~/.agents/skills/` if needed |
| Rules | `team/rules/<slug>.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.
9 changes: 9 additions & 0 deletions adapters/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
]
}
2 changes: 1 addition & 1 deletion docs/canonical-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<!-- shared-agents:team-rules:begin/end -->` |
| **AGENTS.md / CLAUDE.md** (Zed, Codex, **Claude Code**, Gemini, Windsurf, Kimi best-effort, …) | Marker-Block `<!-- shared-agents:team-rules:begin/end -->` |
| **Eigene Datei am Ziel** (kein Symlink, Cursor) | **Nicht überschrieben** |

Quellen: `$SHARED_AGENTS_HOME/rules/` (Core) + `$SHARED_AGENTS_HOME/team/rules/` (Team).
Expand Down
2 changes: 1 addition & 1 deletion skills/sa-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<!-- shared-agents:team-rules:begin/end -->` block in each tool's agents file
- **Zed, Codex, Claude Code (`~/.claude/CLAUDE.md`), Gemini, Windsurf, Kimi (best-effort), …:** merged `<!-- shared-agents:team-rules:begin/end -->` block in each tool's agents file

Optional frontmatter: `targets: [zed, claude-code]` — omit for all adapters.

Expand Down
Loading