Skip to content

docs(skills): adopt composite query audit contract + ban bash heredocs#9

Merged
alexskatell merged 1 commit into
mainfrom
feat/skills-composite-audit-contract
May 13, 2026
Merged

docs(skills): adopt composite query audit contract + ban bash heredocs#9
alexskatell merged 1 commit into
mainfrom
feat/skills-composite-audit-contract

Conversation

@alexskatell
Copy link
Copy Markdown
Contributor

Summary

Bundled skill docs now match the composite query audit shape that shipped in #8.

  • Replace the 4-call "compose your own SQL audit" contract with the 3-call composite contract: query doctorquery audit --pipeline ... --since ... --status open → answer.
  • Raw query sql is reserved for non-standard analytics only.
  • Explicit pitfall added: bash heredocs around query sql (SQL=$(cat <<'SQL' ... SQL) or --sql "$(cat <<SQL ... SQL)") are the bash form of the Python wrapper anti-pattern and are banned in the default flow. If a question is a standard pipeline rollup, the answer is query audit, not a hand-built multi-line SQL string.
  • skills/hermes/SKILL.md bumped to v1.5.0; skills/claude-code/SKILL.md brought to the same contract.

Why

Prior runs that followed the v1.4.0 skill kept producing new over-calling shapes (REST fan-out → Python wrappers → over-decomposed SQL → bash heredocs). Each one was the same anti-pattern wearing a new outfit. With composite warehouse commands now installed (query audit, query snapshot, query freshness), the right move is to make the skill point at the primitive instead of tightening rules around hand-rolled SQL.

Test plan

  • Fresh agent run on "weekly qualified pipeline activity" loads only query doctor + query audit + answer.
  • No cat <<SQL / SQL=$(cat <<...) in the trace.
  • No python3 / execute_code wrappers around topline calls.
  • Drilldown commands (opportunities get, conversations messages) only appear when the user explicitly asks.

Bundled skill docs were still telling agents to author a hand-rolled
composite SQL string for the standard pipeline audit. Now that
`topline --agent query audit|snapshot|freshness` ship as composite
warehouse commands (PR #8), the documented contract collapses to:

  1. query doctor
  2. query audit --pipeline ... --since ... --status open
  3. answer

Hard ceiling drops from 4 calls to 3. Raw `query sql` is reserved
for non-standard analytics only.

Adds an explicit pitfall: bash heredocs around `query sql`
(`SQL=\$(cat <<'SQL' ... SQL)` or `--sql "\$(cat <<SQL ... SQL)"`)
are the bash form of the Python wrapper anti-pattern and are banned
in the default flow. If a question is a standard pipeline rollup,
the answer is `query audit`, not a hand-built multi-line SQL string.

hermes SKILL bumped to v1.5.0; claude-code SKILL keeps no version
field but is brought to the same contract.
@alexskatell alexskatell merged commit d80c684 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