Skip to content

Commit ba61e00

Browse files
authored
feat: release mise toolchain, MCP agent targets, and Context7/skills docs (#33)
* feat: generalize MCP agent targets and refresh app icon (#31) * feat: refresh app icon to the Mimir monogram mark Replace the placeholder favicon with the black/purple Mimir square mark used across brand surfaces, in both the Tauri app and the landing package. * feat(core): support custom MCP agent targets in setup and install-skill Generalize the previously hardcoded Claude/Codex/Kimi/OpenCode/Cline MCP helper generation into a configurable agentHelpers list. Add --agents, --mcp-name, --mcp-command, and --mcp-arg to `mimir setup` and `mimir install-skill` so an arbitrary MCP-compatible agent can be targeted without a source change. * feat: pin Node toolchain with mise and add LLM/skills discovery docs (#32) * feat: pin Node.js toolchain with mise Replace the Node version hardcoded across CI workflows with a single mise.toml pin, installed via jdx/mise-action in ci.yml and native-app-build.yml. npm-publish.yml keeps actions/setup-node since it also wires npm registry auth. pnpm stays pinned via Corepack's packageManager field, not duplicated in mise.toml. * docs: add llms.txt and context7.json for LLM-facing discovery Prepare the repo to be indexed by Context7: llms.txt follows the llmstxt.org convention and links the docs relevant to consuming Mimir as a library/CLI/MCP server (excludes Tauri app, landing, and licensing docs, which aren't part of that surface). context7.json scopes the crawler away from generated/private directories and adds a few correctness rules. Also documents the direct skills.sh install path for the bundled mimir skill. * fix(ci): install mise via curl instead of jdx/mise-action jdx/mise-action is blocked by this repo's Actions permissions policy (allowed_actions: selected, restricted to actions/*, github/codeql-action/*, and verified creators), which caused a startup_failure on every workflow run. Install mise with the official curl script in a plain run: step instead, which isn't subject to the uses: allowlist.
1 parent 8f76c65 commit ba61e00

37 files changed

Lines changed: 1000 additions & 357 deletions

.github/workflows/ci.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ jobs:
2222
- name: Checkout
2323
uses: actions/checkout@v6
2424

25-
- name: Set up Node
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: 22
25+
- name: Install mise
26+
run: |
27+
curl https://mise.run | sh
28+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
29+
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
30+
31+
- name: Install pinned Node via mise
32+
run: mise install
2933

3034
- name: Set up pnpm
3135
run: |
@@ -72,10 +76,14 @@ jobs:
7276
with:
7377
fetch-depth: 0
7478

75-
- name: Set up Node
76-
uses: actions/setup-node@v4
77-
with:
78-
node-version: 22
79+
- name: Install mise
80+
run: |
81+
curl https://mise.run | sh
82+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
83+
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
84+
85+
- name: Install pinned Node via mise
86+
run: mise install
7987

8088
- name: Set up pnpm
8189
run: |

.github/workflows/native-app-build.yml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ jobs:
3535
sudo apt-get update
3636
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
3737
38-
- name: Set up Node
39-
uses: actions/setup-node@v4
40-
with:
41-
node-version: 22
38+
- name: Install mise
39+
run: |
40+
curl https://mise.run | sh
41+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
42+
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
43+
44+
- name: Install pinned Node via mise
45+
run: mise install
4246

4347
- name: Set up pnpm
4448
run: |
@@ -78,10 +82,14 @@ jobs:
7882
- name: Checkout
7983
uses: actions/checkout@v6
8084

81-
- name: Set up Node
82-
uses: actions/setup-node@v4
83-
with:
84-
node-version: 22
85+
- name: Install mise
86+
run: |
87+
curl https://mise.run | sh
88+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
89+
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
90+
91+
- name: Install pinned Node via mise
92+
run: mise install
8593

8694
- name: Set up pnpm
8795
run: |
@@ -121,10 +129,16 @@ jobs:
121129
- name: Checkout
122130
uses: actions/checkout@v6
123131

124-
- name: Set up Node
125-
uses: actions/setup-node@v4
126-
with:
127-
node-version: 22
132+
- name: Install mise
133+
shell: bash
134+
run: |
135+
curl https://mise.run | sh
136+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
137+
echo "$HOME/.local/share/mise/shims" >> "$GITHUB_PATH"
138+
139+
- name: Install pinned Node via mise
140+
shell: bash
141+
run: mise install
128142

129143
- name: Set up pnpm
130144
shell: bash

AGENTS.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@
4949
under real Mimir domains, private documents, generated `.pid` files, committed secrets, internal
5050
GTM/pricing ledgers, or wording that presents tracked MIT source as proprietary or closed source.
5151
`pnpm public:smoke` enforces the cheap checks.
52+
- Root `llms.txt` (the [llms.txt](https://llmstxt.org/) convention) and `context7.json` are the
53+
LLM/Context7-facing doc index for this repository. Update `llms.txt` when adding or removing a
54+
top-level `docs/*.md` file worth surfacing to agents, and keep `context7.json`'s
55+
`excludeFolders`/`excludeFiles` in sync with new generated-output or private-data directories.
56+
Registering the repo on context7.com (so it resolves through `resolve-library-id`) is a manual
57+
step on their site; these files only prepare the repo for that step.
58+
- The bundled `mimir` skill is directly installable from this monorepo's nested path with the
59+
[skills.sh](https://skills.sh) CLI (`npx skills add <repo-url>/tree/main/packages/mimir-core/skills/mimir`),
60+
since that CLI supports a direct subdirectory path. If `packages/mimir-core/skills/` moves, update
61+
the command documented in the README's "Agent Skills And MCP" section.
5262
- `packages/mimir-ui` is the shared UI/style foundation adapted from the WorkoutGen landing/UI
5363
approach. It provides the common Tailwind theme and React primitives for both the landing and the
5464
Tauri app; do not import WorkoutGen product copy, assets, analytics, or secrets.
@@ -144,6 +154,15 @@
144154
`KB_PDF_OCR_COMMAND` and `KB_IMAGE_OCR_COMMAND` remain legacy aliases only.
145155
- Keep the repository as a simple pnpm workspace monorepo. Add Turbo only if multiple packages or
146156
apps start needing task caching/orchestration beyond `pnpm --filter`.
157+
- The Node.js version is pinned once, in `mise.toml` (via [mise](https://mise.jdx.dev/)). Bump the
158+
version there only, not as a hardcoded `node-version` in individual workflow steps. CI
159+
(`ci.yml`, `native-app-build.yml`) installs mise with the official `curl https://mise.run | sh`
160+
script in a plain `run:` step, not the `jdx/mise-action` marketplace action — this repo's Actions
161+
permissions are restricted to `actions/*`, `github/codeql-action/*`, and verified creators, and
162+
`jdx/mise-action` does not qualify. `npm-publish.yml` keeps `actions/setup-node` instead, because
163+
that step also wires the npm registry `.npmrc` for publishing; keep its `node-version` in sync
164+
with `mise.toml` by hand. pnpm stays pinned via Corepack through `packageManager` in
165+
`package.json`, not duplicated in `mise.toml`.
147166
- Keep Mimir core free of Ollama. `embeddingProvider: "local-hash"` supports ingestion, search, MCP,
148167
and cited retrieval without a model server, but it must not be described as equivalent to semantic
149168
retrieval. `embeddingProvider: "transformers"` is the optional semantic embedding path.
@@ -233,10 +252,14 @@ General principles (KISS, DRY, YAGNI, SOLID) as applied in this codebase. Match
233252
- `packages/mimir-core/skills/mimir-audio-summary/SKILL.md` is the optional bundled audio-summary skill.
234253
- `packages/mimir-core/skills/mimir-markdown-report/SKILL.md` is the optional bundled Markdown-report
235254
skill.
236-
- `mimir setup` must keep generating agent-specific MCP helpers for easy local use:
255+
- `mimir setup` must keep generating agent-specific MCP helpers for easy local use by default:
237256
`.mimir/claude-mcp-server.json` for `claude mcp add-json`, `.mimir/codex-mcp.toml` for Codex
238257
config layers, `.mimir/kimi-mcp.json` for Kimi, `.mimir/opencode.jsonc` for OpenCode, and
239-
`.mimir/cline-mcp.json` for Cline.
258+
`.mimir/cline-mcp.json` for Cline. Keep `--agents` available on setup/install-skill so a target
259+
repository can generate only the helpers it uses and remove stale unselected helpers.
260+
- Keep `--mcp-name`, `--mcp-command`, and repeatable `--mcp-arg` available on setup/install-skill
261+
so repositories can generate MCP helper files for a stable server name or local wrapper script
262+
without post-processing `.mimir/`.
240263
- `mimir install-agent` owns native skill discovery for the main supported coding agents. Keep
241264
`--agents claude|codex|kimi|opencode|cline` targeted so a user can install only the agent they use,
242265
with project scope by default and user scope available through `--scope user`.

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ Mimir is an open-source project under the MIT License. Issues and pull requests
44

55
## Development
66

7-
Use Node.js 20+ and pnpm:
7+
This repo pins its Node.js version with [mise](https://mise.jdx.dev/) (see `mise.toml`), the same
8+
version CI uses. Install mise, then:
89

910
```bash
11+
mise install
1012
pnpm install
1113
pnpm validate
1214
```
1315

16+
Without mise, any Node.js 20+ and pnpm install works too.
17+
1418
`pnpm validate` runs Biome, a dependency security audit, TypeScript, Vitest, the production CLI/MCP
1519
smoke test, and npm package metadata checks.
1620

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ Fresh setup keeps local state under one ignored `.mimir/` folder:
269269

270270
It detects the repository package manager and writes the MCP helper files with the right command:
271271
`pnpm exec mimir serve-mcp`, `npx mimir serve-mcp`, `yarn exec mimir serve-mcp`, or `bunx mimir serve-mcp`.
272+
When a repository needs a wrapper script or only a subset of agent helpers, make that explicit during
273+
setup:
274+
275+
```bash
276+
pnpm exec mimir setup --agents claude,codex --mcp-name project-docs --mcp-command ./scripts/serve-mcp.sh
277+
```
272278

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

@@ -467,9 +473,17 @@ Use `mimir setup` for the normal path, or install only the agent layer later:
467473

468474
```bash
469475
pnpm exec mimir install-skill
476+
pnpm exec mimir install-skill --agents claude,codex --mcp-command ./scripts/serve-mcp.sh
470477
pnpm exec mimir install-agent --agents claude,codex,kimi,opencode,cline
471478
```
472479

480+
The bundled skill is also directly installable from this repository with the
481+
[skills.sh](https://skills.sh) CLI, without adding Mimir as a dependency first:
482+
483+
```bash
484+
npx skills add https://github.com/jcode-works/jcode-mimir/tree/main/packages/mimir-core/skills/mimir
485+
```
486+
473487
Main agent examples:
474488

475489
```bash
@@ -905,6 +919,8 @@ pnpm --dir packages/mimir-core pack
905919
checkout, webhook, and local-license architecture for future commercial app distribution.
906920
- [`docs/ux-dx-audit.md`](./docs/ux-dx-audit.md): current UX/DX findings, fixes, and remaining
907921
product risks.
922+
- [`llms.txt`](./llms.txt): LLM-oriented index of this repository's documentation, following the
923+
[llms.txt](https://llmstxt.org/) convention; consumed by tools like Context7.
908924

909925
## License
910926

context7.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "https://context7.com/schema/context7.json",
3+
"projectTitle": "Mimir",
4+
"description": "Open-source, sovereign local RAG for confidential datasets and AI agents. TypeScript CLI, library, MCP server, and portable agent skills that index local files, store vectors with LanceDB, and return cited retrieval context.",
5+
"excludeFolders": [
6+
"node_modules",
7+
"packages/mimir-core/dist",
8+
"packages/mimir-tts/dist",
9+
"packages/mimir-app/dist",
10+
"packages/mimir-app/src-tauri/target",
11+
"packages/mimir-app/src-tauri/gen",
12+
"packages/mimir-landing/dist",
13+
"packages/mimir-landing/.astro",
14+
"packages/mimir-core/examples",
15+
"release-artifacts",
16+
"private",
17+
".mimir",
18+
".gitnexus",
19+
".git"
20+
],
21+
"excludeFiles": ["CHANGELOG.md", "pnpm-lock.yaml"],
22+
"rules": [
23+
"Mimir Core returns cited retrieval context only; it does not synthesize answers itself.",
24+
"The `local-hash` embedding provider (default) is a lexical sha256 embedding, not semantic; use `transformers` for semantic retrieval.",
25+
"Switching `embeddingProvider` requires `mimir ingest --rebuild`, since the two providers produce incompatible vectors.",
26+
"Run `mimir doctor --fix` after upgrading or misconfiguration to repair scaffolding, `.gitignore` entries, and the agent skill install.",
27+
"Config resolves from the caller's working directory (`.mimir/config.json`), never from the package install path."
28+
]
29+
}

docs/agent-integration.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ If `mimir setup` was not used, install the agent kit into a repository:
88
pnpm exec mimir install-skill
99
```
1010

11+
By default this writes helper files for every supported agent. To keep a repository focused on only
12+
the agents it uses, pass a comma-separated target list:
13+
14+
```bash
15+
pnpm exec mimir setup --agents claude,codex
16+
pnpm exec mimir install-skill --agents claude,codex
17+
```
18+
19+
If an agent must launch Mimir through a repository wrapper, generate the MCP helpers with that
20+
command:
21+
22+
```bash
23+
pnpm exec mimir setup --agents claude,codex --mcp-name project-docs --mcp-command ./scripts/serve-mcp.sh
24+
```
25+
1126
This creates:
1227

1328
```plain text
@@ -25,6 +40,10 @@ This creates:
2540
.mimir/README.md
2641
```
2742

43+
When `--agents` is used, Mimir keeps `.mimir/mcp.json`, the skill folders, and the shared guides, but
44+
only writes the selected agent helper files. Previously generated unselected helper files are
45+
removed from `.mimir/`.
46+
2847
Agents that support skill folders can load `.mimir/skills/mimir/` for deep local RAG usage. Load
2948
`.mimir/skills/mimir-audio-summary/` only when an optional spoken summary is needed. Load
3049
`.mimir/skills/mimir-markdown-report/` when the user asks for a cited Markdown report, dossier,
@@ -85,7 +104,7 @@ usage summaries and uses the returned citations.
85104
From the target repository root:
86105

87106
```bash
88-
pnpm exec mimir setup
107+
pnpm exec mimir setup --agents claude
89108
pnpm exec mimir install-agent --agents claude
90109
claude mcp add-json --scope local mimir "$(cat .mimir/claude-mcp-server.json)"
91110
```
@@ -100,7 +119,7 @@ config.
100119
From the target repository root:
101120

102121
```bash
103-
pnpm exec mimir setup
122+
pnpm exec mimir setup --agents codex
104123
pnpm exec mimir install-agent --agents codex
105124
cat .mimir/codex-mcp.toml
106125
```
@@ -114,7 +133,7 @@ skills.
114133
From the target repository root:
115134

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

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

143162
```bash
144-
pnpm exec mimir setup
163+
pnpm exec mimir setup --agents cline
145164
pnpm exec mimir install-agent --agents cline
146165
cat .mimir/cline-mcp.json
147166
```

docs/api-reference.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ import { setupProject } from "@jcode.labs/mimir"
5757
const result = await setupProject({ cwd: "/path/to/workspace", ingest: true })
5858
```
5959

60+
Use `agents`, `mcpServerName`, `mcpCommand`, and `mcpArgs` when setup should generate only selected
61+
agent helpers or launch MCP through a repository wrapper:
62+
63+
```ts
64+
await setupProject({
65+
cwd: "/path/to/workspace",
66+
agents: ["claude", "codex"],
67+
mcpServerName: "project-docs",
68+
mcpCommand: "./scripts/serve-mcp.sh",
69+
})
70+
```
71+
6072
Useful result fields:
6173

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

309+
Pass the same `agents`, `mcpServerName`, `mcpCommand`, and `mcpArgs` options to refresh a targeted
310+
agent kit without re-running full setup.
311+
297312
The installed skills are:
298313

299314
- `mimir`

docs/cli-reference.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Mimir ships two CLIs:
3232
| Command | Use it when |
3333
| --- | --- |
3434
| `mimir install-skill` | Copy portable agent skills and an MCP config snippet into `.mimir/`. |
35+
| `mimir install-agent --agents <list>` | Expose Mimir skills in native Claude, Codex, Kimi, OpenCode, or Cline discovery folders. |
3536
| `mimir skill-path` | Print the package-bundled skill path for agents that load installed package skills. |
3637
| `mimir serve-mcp` | Start the MCP stdio server for compatible agents. |
3738

@@ -58,6 +59,10 @@ Mimir ships two CLIs:
5859
| Option | Applies to | Meaning |
5960
| --- | --- | --- |
6061
| `--project-root <path>` | all project-scoped `mimir` commands | Run against a specific local workspace instead of the current directory. |
62+
| `--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. |
63+
| `--mcp-name <name>` | `setup`, `install-skill` | Set the MCP server name used in generated helper files. |
64+
| `--mcp-command <command>` | `setup`, `install-skill` | Use a repository wrapper or custom executable as the generated MCP stdio command. |
65+
| `--mcp-arg <arg>` | `setup`, `install-skill` | Add one argument to `--mcp-command`; repeat for multiple arguments. Use `--mcp-arg=--flag` for dash-prefixed values. |
6166
| `--top-k <number>` | `search`, `ask`, `research`, `evaluate` | Number of passages to return or keep. |
6267
| `--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. |
6368
| `--days <number>` | `usage-report` | Number of recent days to include in the metadata-only usage summary. |

llms.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Mimir
2+
3+
> Open-source, sovereign local RAG for confidential datasets and AI agents: a TypeScript CLI,
4+
> library, MCP server, and portable agent skills that index local files, store vectors with
5+
> LanceDB, and return cited retrieval context to the calling coding agent.
6+
7+
Mimir Core (`@jcode.labs/mimir`, npm) ingests local files from the target repository, redacts
8+
secrets and PII before anything is embedded, and serves cited passages through a CLI (`mimir ...`),
9+
an MCP server (`mimir serve-mcp`), a TypeScript library, and portable skills for Claude Code, Codex,
10+
Kimi Code CLI, OpenCode, and Cline. It does not perform LLM answer synthesis itself; `mimir ask`
11+
returns cited passages only, and synthesis stays with the calling agent or model. Mimir TTS
12+
(`@jcode.labs/mimir-tts`, npm) renders offline audio summaries.
13+
14+
## Docs
15+
16+
- [README](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/README.md): overview, install, quick start, developer use cases, full CLI walkthrough
17+
- [CLI reference](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/cli-reference.md): every `mimir` command and flag
18+
- [API reference](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/api-reference.md): library exports and MCP tools
19+
- [Agent integration](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/agent-integration.md): wiring Mimir into Claude Code, Codex, Kimi Code CLI, OpenCode, Cline
20+
- [Troubleshooting](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/troubleshooting.md)
21+
- [Contributing](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/CONTRIBUTING.md): dev setup (mise-pinned Node.js toolchain), pull request and Git Flow conventions
22+
23+
## Optional
24+
25+
- [Source boundary](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/source-boundary.md): open-core split between Mimir Core and add-ons
26+
- [Offline TTS preload](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/offline-tts-preload.md)
27+
- [FR/EU sovereign positioning](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/docs/fr-eu-sovereign-positioning.md)
28+
- [Security hardening](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/SECURITY-HARDENING.md)
29+
- [Security policy](https://raw.githubusercontent.com/jcode-works/jcode-mimir/main/SECURITY.md)

0 commit comments

Comments
 (0)