Operates under
retriever:routing. If the user's intent actually fits a different tier — anotherretriever:*skill, a Tier 2 slash, a Tier 3tools.pysubcommand, or (last resort) direct DB access — stop and re-route against the ladder before continuing.
Retriever Schema
Use this skill whenever a task touches:
- SQLite table definitions
- schema migrations
- relative path rules
- preview records
- chunk storage
- custom field registry entries
- manual-value overwrite protection rules
- structured filter validation rules
Required references
- Treat ../tool-template/src/10_core.py, ../tool-template/src/40_schema_runtime.py, and the generated ../tool-template/tools.py as the current source of truth.
- Use
python3 skills/tool-template/tools.py schema-versionto confirm the currentschema_versionandtool_version. - Read schema.md for background terminology only; if it conflicts with the source fragments or
schema-version, the code wins.
Rules
- Do not invent new table names when an existing table fits the need.
- Keep document paths relative to the workspace root.
- Keep preview paths relative to
.retriever/. - Preserve manual edits by locking corrected document fields until explicitly overwritten.
- Prefer structured filter contracts over raw SQL filter strings.
- Make migrations idempotent.
- Prefer additive schema changes over destructive rewrites.