Files
ai-workflow-skill/docs/tests/repo-memory-skill/ingest-and-search-through-bundled-cli.md
T

2.3 KiB

Ingest And Search Through Bundled CLI

Test Type

  • forward skill execution

Purpose

  • validate that a single agent can use skills/repo-memory/ to ingest repository-local docs/ai markdown through the bundled CLI and retrieve the imported knowledge afterwards through search and list

Preconditions

  • skills/repo-memory/assets/repo-memory exists and is executable
  • the test runner can create a temporary Git repository fixture
  • the test runner can create a temporary SQLite DB path
  • the repository fixture includes one docs/ai/repo-memory.md file with at least Module Map and Danger Zones sections

Inputs

  • SKILL_PATH=/.../skills/repo-memory
  • TMPDIR=/tmp/...
  • DB_PATH=TMPDIR/repo-memory.db
  • REPO_PATH=TMPDIR/repo-fixture

Execution Parameters

  • one agent only
  • per-agent timeout: 3m
  • overall timeout: 4m

Execution Steps

  1. Create a temporary Git repository fixture under REPO_PATH.
  2. Add docs/ai/repo-memory.md with markdown content that describes module and danger knowledge.
  3. Ask the agent to use $repo-memory against DB_PATH.
  4. Have the agent initialize or bootstrap the DB as needed, run ingest against REPO_PATH, then use search and list to confirm the imported knowledge is visible.
  5. Capture the agent summary and the concrete imported entry keys it reports.

Validation Commands

Run these from the main thread after the agent stops:

SKILL_PATH/assets/repo-memory ingest --db DB_PATH --repo REPO_PATH
SKILL_PATH/assets/repo-memory search --db DB_PATH --repo REPO_PATH --query "gateway"
SKILL_PATH/assets/repo-memory list --db DB_PATH --repo REPO_PATH

Expected Outcomes

  • ingest succeeds and reports one imported markdown document
  • search returns the imported module entry for the Module Map section
  • list returns at least one module entry and one danger entry for the fixture repo

Assertions

  • the agent used the bundled CLI instead of copying markdown into ad hoc notes
  • the imported knowledge is attached to the target repo path
  • the imported keys match the expected repo-memory:<slug> style generated from the markdown sections

Cleanup

  • keep the temporary DB and repo on failure
  • remove temporary artifacts on success only if replay evidence is not needed