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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ body:
id: version
attributes:
label: Ragmir version
placeholder: "pnpm exec ragmir --version"
placeholder: "pnpm exec rgr --version"
validations:
required: true
- type: textarea
Expand Down
29 changes: 27 additions & 2 deletions .github/workflows/deploy-landing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- "packages/ragmir-landing/**"
- ".github/workflows/deploy-landing.yml"
workflow_dispatch:
inputs:
version:
description: "Semantic version to inject (e.g. 2.3.0)"
required: false

permissions:
contents: read
Expand All @@ -21,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: ${{ github.ref == 'refs/heads/main' && 'landing-production' || 'landing-staging' }}
url: ${{ github.ref == 'refs/heads/main' && 'https://ragmir.jcode.works' || 'https://staging.ragmir.jcode.works' }}
url: ${{ github.ref == 'refs/heads/main' && 'https://ragmir.com' || 'https://staging.ragmir.jcode.works' }}
defaults:
run:
working-directory: packages/ragmir-landing
Expand All @@ -48,11 +52,22 @@ jobs:
run: pnpm install --frozen-lockfile
working-directory: .

- name: Resolve version
id: version
working-directory: .
run: |
VERSION="${{ github.event.inputs.version || '' }}"
if [ -z "$VERSION" ]; then
VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "")
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Build (production)
if: github.ref == 'refs/heads/main'
run: pnpm build
env:
PUBLIC_RAGMIR_LANDING_URL: https://ragmir.jcode.works
PUBLIC_RAGMIR_LANDING_URL: https://ragmir.com
PUBLIC_RAGMIR_VERSION: ${{ steps.version.outputs.version }}

- name: Deploy (production)
if: github.ref == 'refs/heads/main'
Expand All @@ -61,11 +76,21 @@ jobs:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

- name: Submit to IndexNow
if: github.ref == 'refs/heads/main'
run: pnpm exec node scripts/submit-indexnow.mjs
env:
INDEXNOW_API_KEY: ${{ secrets.INDEXNOW_API_KEY }}
INDEXNOW_KEY_NAME: ${{ vars.INDEXNOW_KEY_NAME }}
SITEMAP_LOCAL_PATH: dist/sitemap-0.xml
continue-on-error: true

- name: Build (staging, not indexed)
if: github.ref == 'refs/heads/develop'
run: pnpm build
env:
PUBLIC_RAGMIR_LANDING_URL: https://staging.ragmir.jcode.works
PUBLIC_RAGMIR_VERSION: ${{ steps.version.outputs.version }}

- name: Deploy (staging)
if: github.ref == 'refs/heads/develop'
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
environment:
name: npm-publish
url: https://www.npmjs.com/package/@jcode.labs/ragmir
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Verify main branch
run: test "${GITHUB_REF}" = "refs/heads/main"
Expand Down Expand Up @@ -59,3 +61,27 @@ jobs:
with:
name: ragmir-release-${{ github.sha }}
path: release-artifacts/

- name: Resolve released version
id: version
run: |
VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "")
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

deploy-landing:
name: Rebuild and deploy landing with new version
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.version != ''
steps:
- name: Trigger landing deploy with version
uses: actions/github-script@v7
with:
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'deploy-landing.yml',
ref: 'main',
inputs: { version: '${{ needs.release.outputs.version }}' }
})
85 changes: 47 additions & 38 deletions AGENTS.md

Large diffs are not rendered by default.

36 changes: 19 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
# Changelog

> Historical note: earlier 0.x releases used the `kb` binary name and `.kb/` state
> directory. `kb` remains a legacy alias for `ragmir`, and `.kb/` is still recognized
> for backward compatibility. The entries below are rewritten with the current
> `ragmir` command name for clarity.
## Unreleased

- Rename the public CLI commands to `rgr` and `rgr-tts`.
- Keep `ragmir`, `kb`, and `ragmir-tts` as deprecated compatibility bins that warn users to migrate
to `rgr` / `rgr-tts`.
- Add deterministic prompt routing through `rgr route-prompt` and MCP `ragmir_route_prompt`.
- Move the production landing target to `ragmir.com` and keep staging on `staging.ragmir.jcode.works`.

## 0.4.2 - 2026-06-29

- Add `ragmir doctor` to diagnose initialization, index freshness, security posture, and next steps.
- Make `ragmir audio` and `ragmir-tts` default to the offline/confidential Transformers.js WAV path;
- Add `rgr doctor` to diagnose initialization, index freshness, security posture, and next steps.
- Make `rgr audio` and `rgr-tts` default to the offline/confidential Transformers.js WAV path;
Edge MP3 now requires an explicit `--engine edge` command.
- Stop indexing the generated `private/README.md` helper file created by `ragmir init`.
- Improve onboarding output from `ragmir init` and `ragmir install-skill`.
- Stop indexing the generated `private/README.md` helper file created by `rgr init`.
- Improve onboarding output from `rgr init` and `rgr install-skill`.

## 0.4.1 - 2026-06-29

- Add an Edge-compatible Ragmir TTS engine so `ragmir audio` can match the global Voice Forge quality
- Add an Edge-compatible Ragmir TTS engine so `rgr audio` can match the global Voice Forge quality
path with `edge-tts`, `fr-FR-DeniseNeural`, and MP3 output.
- Keep Transformers.js WAV rendering as the explicit offline/confidential path.
- Remove duplicated governance documents from package directories; root project docs are the single
Expand All @@ -26,36 +29,35 @@
- Reposition Ragmir as sovereign local RAG for confidential datasets and AI agents.
- Expand default ingestion to common text, Office/OpenDocument, data, config, log, and source-code
file types.
- Add `includeExtensions` / `RAGMIR_INCLUDE_EXTENSIONS` (legacy alias `KB_INCLUDE_EXTENSIONS`) for custom UTF-8 text file extensions.
- Add `includeExtensions` / `RAGMIR_INCLUDE_EXTENSIONS` for custom UTF-8 text file extensions.
- Add the optional `ragmir-audio-summary` bundled skill for confidential audio summaries.
- Install both the main Ragmir skill and optional audio-summary skill with `ragmir install-skill`.
- Install both the main Ragmir skill and optional audio-summary skill with `rgr install-skill`.
- Improve agent guidance for deep multi-query retrieval before synthesis.
- Make Ragmir core retrieval-only: `ragmir ask` now returns cited context for external agents or LLMs
- Make Ragmir core retrieval-only: `rgr ask` now returns cited context for external agents or LLMs
instead of generating answers internally.
- Add optional Transformers.js semantic embeddings through `embeddingProvider: "transformers"`.
- Remove Ollama providers and keep `embeddingProvider: "local-hash"` as the no-model default.
- Move the repository to a simple pnpm workspace monorepo without adding Turbo.
- Move the core `@jcode.labs/ragmir` package into `packages/ragmir-core`.
- Add `@jcode.labs/ragmir-tts` for plug-and-play JS/ONNX WAV rendering without Python or ffmpeg.
- Add `ragmir audio` and update the audio-summary skill to use Ragmir TTS before advanced fallback
- Add `rgr audio` and update the audio-summary skill to use Ragmir TTS before advanced fallback
engines.

## 0.3.0 - 2026-06-28

- Add confidentiality hardening defaults: built-in redaction before indexing, metadata-only access
logs, and bounded MCP retrieval.
- Add `ragmir security-audit` for zero-telemetry, provider, redaction, gitignore, storage, and
- Add `rgr security-audit` for zero-telemetry, provider, redaction, gitignore, storage, and
MCP posture checks.
- Add `ragmir destroy-index --yes` to remove generated vector indexes.
- Add `rgr destroy-index --yes` to remove generated vector indexes.
- Add release verification artifacts: npm tarball, SHA256 checksums, SBOM, and manifest.
- Document air-gapped operation, threat model, MCP hardening, and secure deletion limits.

## 0.2.1 - 2026-06-28

- Add GitHub Sponsors funding metadata and document suggested sponsor tiers.
- Add maintainer positioning for Jean-Baptiste Thery and JCode Labs in the README.
- Make `ragmir init` and `ragmir install-skill` automatically keep `.ragmir/` (and legacy `.kb/`)
ignored by Git.
- Make `rgr init` and `rgr install-skill` automatically keep `.ragmir/` ignored by Git.

## 0.2.0 - 2026-06-28

Expand Down
40 changes: 19 additions & 21 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ it again (`scripts/semantic-release-prepare.mjs` runs `pnpm --filter @jcode.labs
- UI package: **Ragmir UI**, unpublished workspace package `@jcode.labs/ragmir-ui`.
- Landing package: unpublished workspace package `@jcode.labs/ragmir-landing`.
- App package: unpublished workspace package `@jcode.labs/ragmir-app`.
- CLI binary: **`ragmir`** (`packages/ragmir-core/bin.ragmir` -> `packages/ragmir-core/dist/cli.js`).
The `kb` binary remains only as a legacy compatibility alias. Commands: `init`, `setup`, `ingest`,
`sources add`, `sources list`, `models pull`, `search`, `ask`, `research`, `evaluate`, `audit`,
`usage-report`, `status`, `security-audit`, `destroy-index`, `audio`, `doctor`, `serve-mcp`,
`skill-path`, `install-skill`, `install-agent`.
- TTS CLI binary: **`ragmir-tts`** (`packages/ragmir-tts/dist/cli.js`). Commands: `doctor`, `render`.
- Project config/state in the target repo: **`.ragmir/`** (`config.json`, `sources.txt`, `raw/`,
`storage/`, `access.log`, `skills/`, reports, audio, and model caches). **`.kb/`** and
**`private/`** are legacy compatibility paths only.
- CLI binary: **`rgr`** (`packages/ragmir-core/bin.rgr` -> `packages/ragmir-core/dist/cli.js`).
`ragmir` and `kb` remain deprecated compatibility bins that warn users to migrate to `rgr`.
Commands: `init`, `setup`, `ingest`, `sources add`, `sources list`, `models pull`, `search`,
`ask`, `research`, `route-prompt`, `evaluate`, `audit`, `usage-report`, `status`,
`security-audit`, `destroy-index`, `audio`, `doctor`, `serve-mcp`, `skill-path`,
`install-skill`, `install-agent`.
- TTS CLI binary: **`rgr-tts`** (`packages/ragmir-tts/bin.rgr-tts` -> `packages/ragmir-tts/dist/cli.js`).
`ragmir-tts` remains a deprecated compatibility bin. Commands: `doctor`, `render`.
- Project config/state in the target repo: **`.ragmir/`** (`config.json`, `raw/`, `storage/`,
`access.log`, `skills/`, reports, audio, and model caches).
- Environment overrides: **`RAGMIR_*`** (e.g. `RAGMIR_EMBEDDING_PROVIDER`, `RAGMIR_CHUNK_SIZE`).
**`KB_*`** aliases remain only for existing automation.
- MCP tools exposed to agents: **`ragmir_*`** (`ragmir_status`, `ragmir_search`, `ragmir_ask`,
`ragmir_research`, `ragmir_audit`, `ragmir_evaluate`, `ragmir_usage_report`,
`ragmir_security_audit`).
`ragmir_research`, `ragmir_route_prompt`, `ragmir_audit`, `ragmir_evaluate`,
`ragmir_usage_report`, `ragmir_security_audit`).

## Architecture and data flow

Expand All @@ -97,7 +97,7 @@ synthesis in core).

`packages/ragmir-tts` is a separate ESM package. It defaults to Transformers.js for offline WAV
rendering without Python or ffmpeg, and uses `edge-tts` for high-quality MP3 only when explicitly
requested. Core `ragmir audio` imports it dynamically.
requested. Core `rgr audio` imports it dynamically.

`packages/ragmir-ui` is the shared Tailwind 4 + React UI layer adapted from the WorkoutGen UI/landing
foundation, but with Ragmir tokens and no WorkoutGen product copy, analytics, CDN paths, or secrets.
Expand All @@ -108,22 +108,20 @@ desktop/mobile builds are explicit `pnpm --filter @jcode.labs/ragmir-app tauri:*
Key behaviors to keep in mind before editing:

- **Config resolution is caller-relative.** `loadConfig` walks up from `cwd` looking for
`.ragmir/config.json`, with fallback to legacy `.kb/config.json`. The package must resolve project
data from the caller's working directory, never from its own install path. Zod validates config;
`RAGMIR_*` env vars override, with `KB_*` kept as legacy aliases.
`.ragmir/config.json`. The package must resolve project data from the caller's working directory,
never from its own install path. Zod validates config; `RAGMIR_*` env vars override config.
- **Two embedding providers, not interchangeable at runtime.** `local-hash` (default) is a 384-dim
sha256 lexical embedding — fully offline, no model, *not semantic*. `transformers` lazily
`import()`s `@huggingface/transformers` with `allowRemoteModels` off by default. `ragmir models pull`
and `ragmir setup --semantic` are the explicit one-time remote-download paths for preloading the
`import()`s `@huggingface/transformers` with `allowRemoteModels` off by default. `rgr models pull`
and `rgr setup --semantic` are the explicit one-time remote-download paths for preloading the
configured embedding model. The two providers produce different vectors, so **switching providers
requires `ragmir ingest --rebuild`**.
requires `rgr ingest --rebuild`**.
- **Ingest is incremental by default.** It reuses rows whose checksum, embedding provider, and model
still match, then overwrites the LanceDB table with reused + rebuilt rows. Use `--rebuild` to force
every supported file through parsing, redaction, chunking, and embedding again.
- **Privacy is a feature, not a side effect.** Redaction runs before embedding, the access log stores
query hashes/metadata only (`access-log.ts`), MCP top-K is clamped to `mcpMaxTopK`, and
`gitignore.ts` keeps `.ragmir/` ignored in target repos. `security-audit` also preserves legacy
warnings when a project still uses `.kb/` or `private/**`. Preserve these guarantees.
`gitignore.ts` keeps `.ragmir/` ignored in target repos. Preserve these guarantees.

Coding conventions (KISS, DRY, YAGNI, SOLID as applied here) live in `AGENTS.md`.

Expand Down
Loading