Skip to content
Merged
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
8 changes: 6 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,14 @@ General principles (KISS, DRY, YAGNI, SOLID) as applied in this codebase. Match
- `packages/mimir-core/skills/mimir-audio-summary/SKILL.md` is the optional bundled audio-summary skill.
- `packages/mimir-core/skills/mimir-markdown-report/SKILL.md` is the optional bundled Markdown-report
skill.
- `mimir setup` must keep generating agent-specific MCP helpers for easy local use:
- `mimir setup` must keep generating agent-specific MCP helpers for easy local use by default:
`.mimir/claude-mcp-server.json` for `claude mcp add-json`, `.mimir/codex-mcp.toml` for Codex
config layers, `.mimir/kimi-mcp.json` for Kimi, `.mimir/opencode.jsonc` for OpenCode, and
`.mimir/cline-mcp.json` for Cline.
`.mimir/cline-mcp.json` for Cline. Keep `--agents` available on setup/install-skill so a target
repository can generate only the helpers it uses and remove stale unselected helpers.
- Keep `--mcp-name`, `--mcp-command`, and repeatable `--mcp-arg` available on setup/install-skill
so repositories can generate MCP helper files for a stable server name or local wrapper script
without post-processing `.mimir/`.
- `mimir install-agent` owns native skill discovery for the main supported coding agents. Keep
`--agents claude|codex|kimi|opencode|cline` targeted so a user can install only the agent they use,
with project scope by default and user scope available through `--scope user`.
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ Fresh setup keeps local state under one ignored `.mimir/` folder:

It detects the repository package manager and writes the MCP helper files with the right command:
`pnpm exec mimir serve-mcp`, `npx mimir serve-mcp`, `yarn exec mimir serve-mcp`, or `bunx mimir serve-mcp`.
When a repository needs a wrapper script or only a subset of agent helpers, make that explicit during
setup:

```bash
pnpm exec mimir setup --agents claude,codex --mcp-name project-docs --mcp-command ./scripts/serve-mcp.sh
```

For the usual agent-first workflow, expose Mimir to the coding assistants used in the repository:

Expand Down Expand Up @@ -467,6 +473,7 @@ Use `mimir setup` for the normal path, or install only the agent layer later:

```bash
pnpm exec mimir install-skill
pnpm exec mimir install-skill --agents claude,codex --mcp-command ./scripts/serve-mcp.sh
pnpm exec mimir install-agent --agents claude,codex,kimi,opencode,cline
```

Expand Down
29 changes: 24 additions & 5 deletions docs/agent-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ If `mimir setup` was not used, install the agent kit into a repository:
pnpm exec mimir install-skill
```

By default this writes helper files for every supported agent. To keep a repository focused on only
the agents it uses, pass a comma-separated target list:

```bash
pnpm exec mimir setup --agents claude,codex
pnpm exec mimir install-skill --agents claude,codex
```

If an agent must launch Mimir through a repository wrapper, generate the MCP helpers with that
command:

```bash
pnpm exec mimir setup --agents claude,codex --mcp-name project-docs --mcp-command ./scripts/serve-mcp.sh
```

This creates:

```plain text
Expand All @@ -25,6 +40,10 @@ This creates:
.mimir/README.md
```

When `--agents` is used, Mimir keeps `.mimir/mcp.json`, the skill folders, and the shared guides, but
only writes the selected agent helper files. Previously generated unselected helper files are
removed from `.mimir/`.

Agents that support skill folders can load `.mimir/skills/mimir/` for deep local RAG usage. Load
`.mimir/skills/mimir-audio-summary/` only when an optional spoken summary is needed. Load
`.mimir/skills/mimir-markdown-report/` when the user asks for a cited Markdown report, dossier,
Expand Down Expand Up @@ -85,7 +104,7 @@ usage summaries and uses the returned citations.
From the target repository root:

```bash
pnpm exec mimir setup
pnpm exec mimir setup --agents claude
pnpm exec mimir install-agent --agents claude
claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)"
```
Expand All @@ -100,7 +119,7 @@ config.
From the target repository root:

```bash
pnpm exec mimir setup
pnpm exec mimir setup --agents codex
pnpm exec mimir install-agent --agents codex
cat .mimir/codex-mcp.toml
```
Expand All @@ -114,7 +133,7 @@ skills.
From the target repository root:

```bash
pnpm exec mimir setup
pnpm exec mimir setup --agents kimi
pnpm exec mimir install-agent --agents kimi
kimi --mcp-config-file .mimir/kimi-mcp.json
```
Expand All @@ -129,7 +148,7 @@ Kimi's global MCP file if you intentionally want a global setup. If you prefer n
From the target repository root:

```bash
pnpm exec mimir setup
pnpm exec mimir setup --agents opencode
pnpm exec mimir install-agent --agents opencode
cat .mimir/opencode.jsonc
```
Expand All @@ -141,7 +160,7 @@ Copy or merge the generated snippet into the OpenCode config layer you use for t
From the target repository root:

```bash
pnpm exec mimir setup
pnpm exec mimir setup --agents cline
pnpm exec mimir install-agent --agents cline
cat .mimir/cline-mcp.json
```
Expand Down
15 changes: 15 additions & 0 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ import { setupProject } from "@jcode.labs/mimir"
const result = await setupProject({ cwd: "/path/to/workspace", ingest: true })
```

Use `agents`, `mcpServerName`, `mcpCommand`, and `mcpArgs` when setup should generate only selected
agent helpers or launch MCP through a repository wrapper:

```ts
await setupProject({
cwd: "/path/to/workspace",
agents: ["claude", "codex"],
mcpServerName: "project-docs",
mcpCommand: "./scripts/serve-mcp.sh",
})
```

Useful result fields:

| Field | Meaning |
Expand Down Expand Up @@ -294,6 +306,9 @@ import { installSkill } from "@jcode.labs/mimir"
const result = await installSkill({ cwd: "/path/to/workspace" })
```

Pass the same `agents`, `mcpServerName`, `mcpCommand`, and `mcpArgs` options to refresh a targeted
agent kit without re-running full setup.

The installed skills are:

- `mimir`
Expand Down
5 changes: 5 additions & 0 deletions docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Mimir ships two CLIs:
| Command | Use it when |
| --- | --- |
| `mimir install-skill` | Copy portable agent skills and an MCP config snippet into `.mimir/`. |
| `mimir install-agent --agents <list>` | Expose Mimir skills in native Claude, Codex, Kimi, OpenCode, or Cline discovery folders. |
| `mimir skill-path` | Print the package-bundled skill path for agents that load installed package skills. |
| `mimir serve-mcp` | Start the MCP stdio server for compatible agents. |

Expand All @@ -58,6 +59,10 @@ Mimir ships two CLIs:
| Option | Applies to | Meaning |
| --- | --- | --- |
| `--project-root <path>` | all project-scoped `mimir` commands | Run against a specific local workspace instead of the current directory. |
| `--agents <list>` | `setup`, `install-skill`, `install-agent` | Select agent helpers or native skill folders: `all`, `claude`, `codex`, `kimi`, `opencode`, `cline`, or a comma-separated list. |
| `--mcp-name <name>` | `setup`, `install-skill` | Set the MCP server name used in generated helper files. |
| `--mcp-command <command>` | `setup`, `install-skill` | Use a repository wrapper or custom executable as the generated MCP stdio command. |
| `--mcp-arg <arg>` | `setup`, `install-skill` | Add one argument to `--mcp-command`; repeat for multiple arguments. Use `--mcp-arg=--flag` for dash-prefixed values. |
| `--top-k <number>` | `search`, `ask`, `research`, `evaluate` | Number of passages to return or keep. |
| `--fail-under <recall>` | `evaluate` | Exit non-zero only when recall is below a threshold from `0` to `1`; without this option evaluation remains strict and fails on any miss. |
| `--days <number>` | `usage-report` | Number of recent days to include in the metadata-only usage summary. |
Expand Down
10 changes: 6 additions & 4 deletions packages/mimir-app/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/mimir-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ cat .mimir/opencode.jsonc
cat .mimir/cline-mcp.json
```

Use `pnpm exec mimir setup --agents claude,codex --mcp-command ./scripts/serve-mcp.sh` when a
repository should generate only selected MCP helpers or launch through a local wrapper.

By default, Mimir keeps local config, raw documents, generated indexes, access logs, models, reports,
audio, and agent helper files under a single ignored `.mimir/` project folder. It reports
unsupported/skipped files during ingestion and reports supported files that produced no extractable
Expand Down
53 changes: 37 additions & 16 deletions packages/mimir-core/dist/cli.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/mimir-core/dist/cli.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/mimir-core/dist/doctor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading