Skip to content

docs: ship custom skill.md to fix autogenerator inaccuracies#3

Merged
maheshpchandran merged 3 commits into
mainfrom
docs/skill-override
May 20, 2026
Merged

docs: ship custom skill.md to fix autogenerator inaccuracies#3
maheshpchandran merged 3 commits into
mainfrom
docs/skill-override

Conversation

@maheshpchandran
Copy link
Copy Markdown
Contributor

Summary

The Mintlify autogenerator keeps emitting /skill.md content that contradicts the source docs — it's letting REST priors override the actual page content. After two rounds of strengthening the source pages (explicit `` callouts, restructured sections, sweeping prose), the same inaccuracies still appear in the generated skill:

  • Revoke shown as `POST .../{key_id}/revoke` (actual: `DELETE .../{key_id}`)
  • Webhook rotate path missing the `/org/` segment
  • "Same as API key" storage analogy applied to webhook secret (stored plaintext, not hashed)
  • `completed_with_partial` surfaced as if active
  • Revoke described as admin-only
  • Confidence triggers condensed inaccurately
  • Usage endpoints omitted

Per Mintlify's spec, a `skill.md` at the project root overrides auto-generation. This PR ships that override, plus one small source-doc fix.

What's in this PR

1. `skill.md` at repo root (306 lines, agentskills.io v0 spec). Grounded in verified facts from `sherlock/src`:

Fact Source
`/api/v2/org/webhook-secret/rotate` `routes_auth.py:254`
`DELETE /api/v2/org/api-keys/{key_id}` `routes_auth.py:314`
Revoke role rules (admin: any key; member: own keys; API key: 403) `routes_auth.py:318-321,337-338`
`webhook_secret` stored plaintext `db/mongodb.py:513`
Confidence triggers (≥85 blocklist OR ≥2 strategies OR score==0 → high, etc.) `aggregator.py:499-530`
Score bands 0-10 / 11-40 / 41-60 / 61-100 `aggregator.py:354`
Daily-limit 429 shape `{error, limit, used}` `routes_v2.py:93,210`

Each "summariser commonly gets wrong" fact has its own emphatic section so a future re-summarise can't drop it.

2. `authentication.mdx` — new "Organization identifier" section noting that `org_id` is an opaque case-sensitive string. Fixes the `org_` hallucination in the autogen.

After this lands

  1. Deploy will swap the autogen output for our file at https://docs.tumban.com/skill.md. Verify all 7 audit items disappear from the served file.
  2. If Mintlify caches the previous auto-generated version, force a fresh build (or wait for the next deploy).
  3. The autogen behaviour can stay broken — we're no longer relying on it.

Test plan

  • After merge + deploy, fetch https://docs.tumban.com/skill.md and confirm it matches this PR's content (not the stale autogenerated version).
  • Spot-check each previously-broken section against the corresponding sherlock/src line cited in the table above.
  • Run an LLM agent against the served skill (or just paste it into a Claude conversation) and ask it to revoke an API key or rotate the webhook secret — verify it picks the correct method/path.

The Mintlify autogenerator keeps producing skill.md content that
contradicts the source docs — RESTful priors over source content. After
two rounds of strengthening the source pages (adding explicit Notes,
restructuring sections), the same inaccuracies still appear in the
generated /skill.md:

  - Revoke documented as POST .../{key_id}/revoke (actual:
    DELETE .../{key_id})
  - Webhook rotate documented without the /org/ segment
  - "Same as API key" storage analogy applied to the webhook secret
    (which is stored plaintext, not hashed)
  - completed_with_partial surfaced as if active
  - Revoke described as admin-only
  - Confidence triggers condensed inaccurately
  - Usage endpoints omitted

Per Mintlify's spec, a skill.md at the project root overrides
auto-generation. This commit ships that override, written to the
agentskills.io v0 spec (frontmatter + body). Content is grounded in
verified facts from sherlock/src:

  - api/routes_auth.py:254  → /api/v2/org/webhook-secret/rotate
  - api/routes_auth.py:314  → DELETE /api/v2/org/api-keys/{key_id}
  - api/routes_auth.py:318-321,337-338 → revoke role rules
  - db/mongodb.py:513       → webhook_secret stored plaintext
  - services/aggregator.py:499-530 → confidence triggers
  - services/aggregator.py:354 → score band thresholds

Also adds a brief "Organization identifier" section to
authentication.mdx noting that org_id is opaque (no fixed alphabet) —
fixes the org_<hex> hallucination in the previous skill.md.

The override file is 306 lines (well under the 500-line guidance from
the agentskills.io spec).
@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 19, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
tumban-e6975fc3 🟡 Building May 19, 2026, 12:47 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Usage / analytics endpoints are dashboard-only — they are not part of
the public API contract. Removing them from the published docs so
external customers don't build integrations against them.

- Deleted the four api/usage/*.mdx pages (totals, scans, priority,
  warmer-health) and the empty parent directory.
- Removed the Usage group from docs.json navigation.
- skill.md: dropped the Usage table; added an explicit note that
  usage data is dashboard-only so agents stop hallucinating GET paths.
- dashboard-overview.mdx: the Usage sidebar row now reads
  "Dashboard-only" instead of linking to API pages. Removed the
  "Get usage totals" link from the Home row and reworded the
  role-gating table.
- api/errors.mdx: dropped "or usage endpoints" from the
  Org-settings-not-found row.

Cross-repo follow-up: the corresponding endpoints in
sherlock/src/api/routes_auth.py (get_usage, get_usage_scans,
get_usage_priority, warmer-health) should be gated to dashboard
sessions only — API-key auth on these paths should return 403, to
match the new docs.
User intent: nothing in customer-facing docs should help a reader
reverse-engineer Tumban's detection pipeline. The previous pass
exposed too much — strategy names, judge model, bump_up/bump_down
adjudication, internal score arithmetic.

Scoring (concepts/recommendations.mdx)
- Removed the "three independent detection strategies" paragraph and
  the bump_up/bump_down adjudication detail.
- Replaced with a contract-only explanation: what the score means
  ("confidence a violation is present"), what fields are part of the
  public contract, and that other fields are opaque and may change.

Confidence (concepts/confidence.mdx)
- Removed the exact trigger table that listed blocklist thresholds,
  multi-strategy agreement, contextual-model confidence pass-through,
  and judge invocation.
- Replaced with a semantic table (what high/medium/low mean to a
  reviewer). Kept the "never low when no_flags" gotcha — it's a
  contract-level invariant, not mechanism.

Field surface (api/scans/get.mdx)
- Dropped the ResponseField blocks for strategy_scores and
  judge_model_invoked, removed them from the example JSON, and
  removed the "Strategy scores" bullet from the dashboard section.
  Folded them into the existing "internal, opaque, subject to change"
  disclaimer (which I also generalised — no longer enumerates the
  specific internal fields).

Reason codes (reference/reason-codes.mdx)
- Reworded descriptions that explicitly named the judge model or the
  "contextual model" / classifier internals. Codes themselves
  (JUDGE_BUMP_UP, LLM_API_ERROR, etc.) are left literal because the
  API emits them verbatim — cross-repo follow-up below.
- Stripped the source-trail MDX comment that cited
  aggregator.py:_aggregate_reason_codes and strategies/llm_decision.py.

Cross-doc cleanup
- evidence-index, scans/get, webhooks/payload: replaced
  "the contextual model cited" wording with "Tumban cited".
- index.mdx: removed "multi-strategy detection pipeline".
- skill.md: rewrote Confidence and Score-band sections to match the
  scrubbed concepts pages; emphasises that score internals are not
  part of the public contract.

Cross-repo follow-ups for sherlock
- API still returns strategy_scores and judge_model_invoked on
  GET /api/v2/scans/{scan_id}. Remove from the response model so
  customers can't inspect detection internals via the field surface.
- Reason codes JUDGE_BUMP_UP, JUDGE_BUMP_DOWN, LLM_API_ERROR,
  LLM_PARSE_ERROR are emitted with internal terminology baked into
  the enum strings. Consider renaming (e.g. SCORE_ADJUSTED_UP,
  ANALYSIS_ERROR) so the public reason_codes list doesn't leak the
  same mechanics this PR scrubbed from prose.
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