2.1 KiB
2.1 KiB
Search And Add Through Bundled CLI
Test Type
- forward skill execution
Purpose
- validate that a single agent can use
skills/repo-memory/to search an empty memory DB, write one durable entry through the bundled CLI, and retrieve the same knowledge afterwards
Preconditions
skills/repo-memory/assets/repo-memoryexists and is executable- the test runner can create a temporary Git repository fixture
- the test runner can create a temporary SQLite DB path
Inputs
SKILL_PATH=/.../skills/repo-memoryTMPDIR=/tmp/...DB_PATH=TMPDIR/repo-memory.dbREPO_PATH=TMPDIR/repo-fixture
Execution Parameters
- one agent only
- per-agent timeout:
3m - overall timeout:
4m
Execution Steps
- Create a temporary Git repository fixture under
REPO_PATH. - Add one file that will serve as evidence for the durable knowledge entry.
- Ask the agent to use
$repo-memoryagainstDB_PATH. - Have the agent initialize the DB, search for a key that does not yet exist,
add one
termentry with evidence, then search again for the same key. - Capture the agent summary and the concrete entry key used.
Validation Commands
Run these from the main thread after the agent stops:
SKILL_PATH/assets/repo-memory init --db DB_PATH
SKILL_PATH/assets/repo-memory search --db DB_PATH --repo REPO_PATH --query "plan task"
SKILL_PATH/assets/repo-memory list --db DB_PATH --repo REPO_PATH --kind term
SKILL_PATH/assets/repo-memory events --db DB_PATH --id 1
Expected Outcomes
- the first search misses before the entry is written
- the
addcommand succeeds and creates entry1 - the second search returns the new
term listreturns exactly onetermentry for the fixture repoeventsincludes acreatedevent for the new entry
Assertions
- the stored entry key matches the one the agent added
- the stored entry summary matches the durable fact the agent recorded
- the stored entry is linked to the target repo path
- the agent used the bundled CLI rather than free-form notes
Cleanup
- keep the temporary DB and repo on failure
- remove temporary artifacts on success only if replay evidence is not needed