# Tome — knowledge-layer recipes (self-contained). # # This file ships WITH the plugin so the tome command surface travels with it. # A host project opts in with one line in its own Justfile: # # mod tome "/tome.just" # # ...then drives it as `just tome init`, `just tome context `, etc. # # just runs a module's recipes with the working directory set to THIS file's # directory, so the tool is referenced by a plain relative path. `uv run # --no-project` provides a Python interpreter without depending on any host # project or `python` being on PATH. Nothing here reaches into the host repo; # the tool itself discovers the repository root via `git`. # A host project may export RUST_LOG (e.g. via dotenv) for its own Rust builds. # uv honours RUST_LOG and would then print resolver traces, so silence it for # our invocations. Scoped to this module; does not affect the host's recipes. export RUST_LOG := "off" knowledge := "uv run -q --script bin/knowledge.py" # Show the available tome recipes default: @echo "tome — knowledge layer. Recipes: init | refresh | context | check | impact " # Initialize the knowledge layer (scaffold wiki + navigation resources) init: {{ knowledge }} bootstrap # Refresh deterministic resources; report authored knowledge needing review refresh: {{ knowledge }} refresh # Resolve navigation context for a path. Usage: just tome context src/game/weapons context path: {{ knowledge }} context "{{ path }}" # Validate knowledge-layer health (CI-friendly; non-zero exit on errors) check: {{ knowledge }} check # Show which wiki docs are affected by changed files. Usage: just tome impact src/foo.rs src/bar.rs impact +paths: {{ knowledge }} impact {{ paths }}