From 18e3118194293f701c9c660ac2699ec036f6dd8a Mon Sep 17 00:00:00 2001 From: "Jeffrey (Dongkyu) Kim" Date: Tue, 1 Sep 2026 23:40:30 +0900 Subject: [PATCH 1/2] docs(skills): align parent-agent skills with current CLI Correct AutoRAG and AutoRAG-setup skill docs so a parent agent can drive the librarian without stale contracts: MinSync auto-install on by default, search sessionId only with --json --debug, HWP supported, unknown datasources skipped, and autorag ui as the datasource setup path. --- skills/autorag-setup/SKILL.md | 88 ++++++++++++++++++++++------------- skills/autorag/SKILL.md | 88 +++++++++++++++++++---------------- test/cli/skill-docs.test.ts | 88 +++++++++++++++++++++++++++++++++++ 3 files changed, 192 insertions(+), 72 deletions(-) create mode 100644 test/cli/skill-docs.test.ts diff --git a/skills/autorag-setup/SKILL.md b/skills/autorag-setup/SKILL.md index 99d5348ec..997df4d77 100644 --- a/skills/autorag-setup/SKILL.md +++ b/skills/autorag-setup/SKILL.md @@ -1,12 +1,14 @@ --- name: autorag-setup -description: Configure AutoRAG for first use or repair its single-agent model, approved document roots, retrieval indexes, datasource skills, and health checks without exposing credentials. +description: Install and configure AutoRAG, or repair its single search model, approved document roots, retrieval indexes, datasource skills, and health checks without exposing credentials. Use when autorag is missing, init/refresh/health fails, indexes are stale, or the user wants to add folders or datasources. +license: MIT --- # AutoRAG setup -Use this skill when AutoRAG is unconfigured, model resolution fails, indexes are -missing or stale, or the user wants to change the document collection. +Use this skill when AutoRAG is unconfigured, the `autorag` CLI is missing, model +resolution fails, indexes are missing or stale, or the user wants to change the +document collection or datasources. ## Safety @@ -19,15 +21,26 @@ missing or stale, or the user wants to change the document collection. `node_modules`, `.git`, `dist`, `build`, `target`, `.cache`, `.autorag`, or `.jikji`. +## Install the CLI if needed + +The CLI is `@autorag/librarian` (`autorag`). Runtime is Node.js ≥ 24 or Bun. + +```bash +command -v autorag >/dev/null || bun install -g @autorag/librarian +autorag --help +``` + +If Bun is unavailable, `npm install -g @autorag/librarian` is acceptable. + ## Inspect existing configuration -Check `~/.autorag/config.json`, an explicit `--config` path, or -`AUTORAG_CONFIG`. Relevant fields are: +Check `--config`, `AUTORAG_CONFIG`, `$AUTORAG_HOME/config.json`, or +`~/.autorag/config.json`. Relevant fields are: - `searchPaths`, `workspacePath`, and `memoryPath` - `model.provider`, `model.id`, `model.api`, `model.baseUrl`, `model.apiKeyEnv` - `bm25`, `minSync`, and `jikji` -- `datasources` and `datasourceAccess` +- `datasources`, `datasourceAccess`, and `ui` Preserve explicit user choices and a working config unless the user asks to replace them or health checks fail. @@ -73,9 +86,10 @@ approval before indexing: | Linux | XDG Documents/Downloads/Desktop or their `~/` defaults | `~/Notes`, `~/Sync`, Nextcloud/Syncthing roots | | Windows | Documents, Downloads, Desktop shell folders | OneDrive document roots, user-named project docs | -Supported index formats include `md`, `markdown`, `txt`, `text`, `pdf`, `docx`, -`pptx`, `xlsx`, `hwpx`, and `eml`; OCR image formats are optional. Do not -present legacy `doc`, `xls`, or `hwp` as fully supported parsed formats. +Supported parsed formats are `md`, `markdown`, `txt`, `text`, `pdf`, `docx`, +`pptx`, `xlsx`, `hwp`, `hwpx`, and `eml`. OCR for `jpg`, `jpeg`, `png`, `bmp`, +and `tiff` is optional (`parserOptions.ocr.enabled`). Do not present legacy +`.doc` or `.xls` as supported parsed formats; `.xls` is rejected. Keep the first-run set small, usually one to three roots. Present a concrete proposal and require `yes`, a narrowed keep-list, a custom list, or `skip` @@ -114,9 +128,11 @@ Use `--force` only when intentionally replacing an existing config. Legacy cwd ### Retrieval defaults BM25, MinSync, and Jikji are enabled by default. Leave them enabled unless the -user explicitly asks otherwise. MinSync auto-install is off by default and its -binary must already be installed or on `PATH`; Jikji can install `jikji-cli` -through cargo when enabled and allowed. +user explicitly asks otherwise. MinSync auto-installs a verified GitHub release +into `/.autorag/bin` on first use (`minSync.autoInstall` defaults to +true). Set `"autoInstall": false` only when managing the binary yourself. Jikji +auto-installs `jikji-cli` through cargo when enabled (`jikji.autoInstall` +defaults to true; requires the Rust toolchain). Exact duplicate exclusion is enabled by default. AutoRAG invokes the external `dupey` CLI before parsed-mirror indexing, keeps the newest filesystem copy for @@ -140,10 +156,18 @@ size must be positive integers. ## Configure datasource skills when requested -Datasource skills belong in trusted config and remain default-deny. Common -entries include WhatsApp, Telegram, Slack, Discord, Notion, GitHub, Google -Drive, a generic cloud-drive/rclone source, Gmail, local mail exports, -Mailcrawl, Obsidian, RSS/news, and Spotlight. +Prefer `autorag ui --no-open` to connect datasources. It writes the same trusted +`datasources` / `datasourceAccess` fields as a hand-edited config, stores +env-var names rather than secrets, and prints a loopback URL (`127.0.0.1`). +Do not bind non-loopback hosts unless the user explicitly set `ui.allowRemote`. + +Datasource skills belong in trusted config and remain default-deny. Builtin +template names are `kakao`, `whatsapp`, `telegram`, `slack`, `discord`, +`clawgallery`, `notion`, `github`, `cloud-drive`, `gmail`, `mail-export`, +`mailcrawl`, `obsidian`, `rss`, and `spotlight`. Config keys may be connection +aliases with `"type": "