Skip to content

docs(skills): adopt query doctor as step 1 of audit contract#6

Merged
alexskatell merged 1 commit into
mainfrom
feat/skills-doctor-step1
May 13, 2026
Merged

docs(skills): adopt query doctor as step 1 of audit contract#6
alexskatell merged 1 commit into
mainfrom
feat/skills-doctor-step1

Conversation

@alexskatell
Copy link
Copy Markdown
Contributor

Summary

Follow-up to #5. Now that topline query doctor is in main, update the bundled skills so agents call it as step 1 of the pipeline audit contract instead of an ad-hoc freshness SQL probe.

query doctor is deterministic, never prints the token, and surfaces auth + warehouse coverage in one JSON payload (queryTokenPresent, tokenSourceEnvVar, rawPitRejected, schemaReachable, tableCount, expectedTables, missingTables, recommendation). It replaces the prior "freshness SQL probe" as the first deterministic check before any analytics SQL — and it is the right place to detect coverage gaps (missing tables) and treat them as os-mcp bugs rather than silently falling back to REST.

Changes

  • skills/hermes/SKILL.md1.3.0
    • First checks: add topline --agent query doctor and document the JSON payload shape.
    • Standard pipeline audit contract: step 1 is now query doctor, step 2 is the composite SQL (with optional date prepended for custom windows). Soft 5-step list compressed to 3; hard ceiling unchanged at 4 calls.
    • Coverage-gap and readiness handling now anchored to doctor's recommendation / missingTables.
    • Hosted warehouse SQL example block now leads with query doctor.
  • skills/claude-code/SKILL.md — same contract change, shorter form.

Test plan

  • Fresh Discord/Hermes thread asks "what activity happened this week in our qualified pipeline?" — trace should show query doctor as the first CRM tool call, followed by a single composite SQL.
  • When TOPLINE_QUERY_TOKEN is unset, agent stops at doctor and reports the readiness gap (no silent REST fallback).
  • When missingTables is non-empty, the final answer surfaces the missing table(s) as an os-mcp coverage bug.

The audit contract now starts with `topline query doctor` (added in PR #5)
instead of an ad-hoc freshness SQL. doctor returns a deterministic JSON
readiness payload (queryTokenPresent, schemaReachable, tableCount,
missingTables, recommendation) without printing the token, and covers
both auth and warehouse-coverage checks in one call.

skills/hermes/SKILL.md bumped to 1.3.0; claude-code variant matched.
@alexskatell alexskatell merged commit 049be18 into main May 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant