docs(skills): ban post-hoc math on query audit JSON#10
Merged
Conversation
The audit payload already carries activity totals/by-stage, deals rollups, movement counts, snapshot avg_days_in_stage, and freshness. Wrapping the response in python3 heredocs, jq sums, awk totals, or bash arithmetic to compute averages/totals is the same "I rejected the contract" signal as wrapping the CLI itself — it just moves the violation one step past the CLI boundary. If a question genuinely needs a number not in the payload (e.g. p95 instead of avg), express it as `topline --agent query sql` and disclose it as non-standard analytics. Bumps Hermes skill 1.5.0 -> 1.6.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hermesandclaude-code): nopython3heredocs,jqsums,awktotals, or bash arithmetic over the already-returnedquery auditJSON.query sqland disclose).1.5.0to1.6.0.Why
Recent agent traces showed
query doctor+query auditrunning cleanly, then the agent opening apython3 - <<'PY' vals=[...] PYheredoc to compute averages/totals overactivity.by_stageanddealsrollups before answering. The audit payload already carries those rollups:activity.total_messages,activity.by_stage[*]deals.open_count,deals.open_value_totalsnapshot.avg_days_in_stage, value totalsmovement.advances/regresses/stallsWrapping the audit response in a Python/jq/bash math step is the same anti-pattern as wrapping the CLI itself — it just moves the violation one step past the CLI boundary. If a question genuinely needs a number not in the payload, the agent should issue
topline --agent query sql --sql ...and disclose it as non-standard analytics.This is a straight port of pitfall #21 from the canonical
topline-os-crm-auditsskill (v2.7.0) into the bundled repo.Test plan
python3/jq/awk/bashmath step afterquery audit.query sqlwith disclosure when a non-default metric is asked for.