Ataru Index · Ataru Indexing
Bring the Ataru index for the machine's local AI session history to a searchable state and return the result as an interpretable JSON report: whether retrieval is possible now, how much remains, and what this run did. Retrieval itself belongs to
.
Triggers
Activate when
- “The Ataru index seems not to have been updated. Help me rebuild it.”
- “First confirm whether the local memory index is available.”
- Help me build or repair the local Ataru memory index before searching.
Do not activate when
- The user wants retrieval results such as “find how we solved a problem last time” — hand this to , which checks the index status itself and refers back to this Skill when it is not ready.
- The user is discussing Ataru's interface, releases, or code changes — that is a product development task, not index operations.
User Profile (cross-session)
declares
. At the start of every run, read the shared user, brand, workspace, and preferences, along with this Skill's
skills.lov-ataru-indexing
namespace.
The only record worth persisting long-term is
: the path to the working Ataru executable on the user's machine. After the first successful resolution, or when the user directly provides the path, use
scripts/profile_store.py record
to write it back and report where it was saved. Thereafter, pass it as
to avoid probing candidates every time. Do not hard-code it into this source. See the full contract in
references/user-profile.md
.
Skill Group Composition
See
references/skill-composition.md
. This source is a standalone Single Skill, with only an artifact-level handoff with
(index state) and no hidden sibling dependencies.
Workflow (MANDATORY)
You MUST follow these steps in order.
Step 0: Resolve the binary before anything else
bash
export SKILL_DIR="$HOME/.claude/skills/lov-ataru-indexing"
python3 "$SKILL_DIR/scripts/ataru_index.py" resolve-bin
The script resolves candidates in this order: explicit
argument →
environment variable → PATH → installed App bundle → local dev build found by searching upward from the current directory. It first runs
against every candidate. Binaries older than 0.41.3 do not recognize
and treat it as a desktop launch argument,
open a window, and never return, so the version gate must pass first.
On failure, the script returns
or
and lists the rejected candidates and their versions. Pass this text to the user verbatim; do not guess the path.
Step 1: Read state before deciding to build
bash
python3 "$SKILL_DIR/scripts/ataru_index.py" status
Alongside the raw status, directly report the following decision fields:
| Field | Meaning |
|---|
| A build is required: the index is not searchable, or is true |
| Another process, usually the desktop app, is building; do not compete with it |
| Percentage of messages processed, used to tell the user how much longer to wait |
| The manifest does not match the session files on disk, so at least one of the following two counts is nonzero |
| Number of new or modified session files that have not yet been indexed |
| Number of sessions that remain in the index but no longer exist on disk |
| Time the manifest was written, meaning when the previous build completed; the CLI's only indicates when the status was read |
only reports the totals stored in the manifest and does not inspect the disk, so an index that has not been updated for several months will still report
. The script therefore compares every session file with its manifest entry one by one according to Ataru's own
previous_entry_matches_source
rule: the source, session ID, size, and modification time match, and the file has been indexed through its end. Its data scope is the same as Ataru 0.41.x:
~/.claude/projects/*/*.jsonl
(excluding
) and
files under
~/.codex/{sessions,archived_sessions}
. Ataru 0.41.x cannot read
compressed sessions, so they are not counted. Codex sessions that Ataru cannot associate with a project do not produce entries; they are retried on every build and do not count as drift unless they are newer than the manifest. Active sessions are continuously appended to, so a small number of
is normal. A large number combined with a clearly stale
means the index has stopped updating.
When
is true, do not start a build. The build lock only applies within a process. Although concurrent builds across processes are protected by “write to a temporary directory and then atomically replace,” they still waste an entire full CPU build.
Step 2: Bring the index to searchable
bash
python3 "$SKILL_DIR/scripts/ataru_index.py" ensure --timeout 3600
is idempotent: if
is false, meaning the index is searchable and has no drift, it returns
immediately. If the index is not searchable or has drifted, it runs one
without
, recorded as
. Ataru only reprocesses changed sessions and removes sessions that no longer exist. If it finds that another process is already building, it first returns
. After the build, the script compares the state again. Any remaining
were written during the build, usually by the sessions currently in progress, and do not need to be caught up. Add
(
) only when the user explicitly requests a “full rebuild,” because it discards the existing index and rescans every session.
A first full build on a machine with tens of thousands of sessions takes minutes; the default budget is 3600 seconds. Do not shorten
to “fail fast,” because a timeout only leaves a half-finished state.
Step 3: Report, and only then hand off
Relay
,
,
,
,
,
, and
to the user faithfully. If the result is still
or
, the script exits with code 1. The report's
field contains the reason; pass it through verbatim.
The optional semantic index has separate costs. Estimate it first when needed:
bash
python3 "$SKILL_DIR/scripts/ataru_index.py" semantic-preview
Retrieval through the current JSON CLI uses keyword mode only, while the semantic index serves only the desktop app. Do not promise hybrid results from the command line.
Dependencies
- Python 3.8+ (standard library only)
- Ataru 0.41.3 or later installed locally
General Feedback Loop
When a user provides feedback requesting changes during a Skill-driven task, you MUST perform the following steps before continuing the current artifact:
- First determine whether the feedback is (for this run only) or (reusable across tasks).
- For feedback, modify only the current task and do not change the Skill.
- For feedback, first determine its scope: for a domain rule, update the corresponding canonical Skill first; for a rule that applies to every Skill, update the shared specification first.
- After completing the rule update, versioning, linting, and distribution verification, apply the changes to the current artifact.
- A change invalidates earlier “confirm,” “continue,” and “ship it” instructions. After completing the modification to the current artifact and reading it back, you MUST stop and wait for the user's next instruction. Do not automatically proceed to publishing, committing, or any other external write.