- Define Rio and Theseus as economics and model-integrity evaluators - Add DB, Hermes, and OpenClaw skills with no-secret defaults - Gate CI on LLM refinement contracts; verify with 422-test suite `.agents/skills/decision-engine-refinement/SKILL.md` `.agents/skills/nousresearch-hermes-agent/SKILL.md` `.agents/skills/openclaw-agent/SKILL.md` `.agents/skills/teleo-db-operator/SKILL.md` `.crabbox.yaml` `.github/workflows/ci.yml` `docs/llm-refinement-decision-engine.md` `scripts/check_llm_refinement_contract.py`
2.3 KiB
2.3 KiB
| name | description |
|---|---|
| teleo-db-operator | Use when reading, auditing, backing up, querying, or safely writing the Teleo pipeline SQLite database, including review_records, audit_log, costs, prs, sources, and contributor feedback loops. |
Teleo DB Operator
Default to read-only. The database is evidence for decision-engine refinement, not a scratchpad.
Discover
- Read
lib/config.pyforDB_PATHand related paths. - Prefer local or copied DBs over production DBs.
- If using production, record whether access is read-only or write-authorized.
- Never print secret values found near DB paths or shell history.
Read Path
Use sqlite3 or Python sqlite3.
Recommended read targets:
review_records: evaluator, model, outcome, rejection reason.audit_log: route decisions, approve/reject events, failure details.costs: model cost by date/stage.prs: status, tier, route compatibility fields, verdicts.sources: priority, feedback, extraction model.
For refinement work, export aggregated JSON or CSV into .crabbox-results/ or proof/, not raw private DB snapshots.
Write Path
Writes require explicit authorization and a backup.
Required sequence:
- Create a backup or operate on a copy.
- Write the exact SQL in a retained artifact.
- Use
BEGIN IMMEDIATE;. - Apply the minimal mutation.
- Read back the changed rows.
- Commit the transaction only after readback is correct.
- Write a blocker artifact instead of guessing if any precondition is missing.
Never write production prompt/model state as part of an experiment. Experiments should replay fixtures and produce proof first.
Safety Boundaries
- Do not attach, copy, or commit
pipeline.db. - Do not run broad
UPDATEorDELETEwithout aWHEREclause and a prior row count. - Do not mutate
prs,sources, or contributor state from a model response alone. - Do not treat local copied DB proof as production proof.
Useful Queries
SELECT reviewer, reviewer_model, outcome, rejection_reason, count(*) AS n
FROM review_records
GROUP BY reviewer, reviewer_model, outcome, rejection_reason
ORDER BY n DESC;
SELECT event, count(*) AS n
FROM audit_log
WHERE stage = 'evaluate'
GROUP BY event
ORDER BY n DESC;
SELECT model, stage, calls, input_tokens, output_tokens, cost_usd
FROM costs
ORDER BY date DESC, cost_usd DESC
LIMIT 50;