Skip to content

fix(credits,docs): stop listing issue enrichment; list the 22 rule categories; drop retired quality card and unenforced role claim (#861, #172, #218, #353) - #868

Merged
nc9 merged 2 commits into
mainfrom
docs/batch-b-accuracy
Oct 16, 2026
Merged

nc9 merged 2 commits into
mainfrom
docs/batch-b-accuracy

Conversation

@nc9

@nc9 nc9 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Four stale docs claims, one small CLI change.

Closes #861, closes #172, closes #218, closes #353.

#861: issue enrichment is not for sale

AI issue enrichment is switched off in the cloud (ENRICHMENT.enabled = false in packages/core-contracts/src/limits.ts), but its price (3 credits per issue) is still in the shared pricing table, so squirrel credits printed it and both credits pages listed it.

  • squirrel credits (apps/cli/src/cli/commands/credits.ts) leaves issue_enrich out of the price list. New test apps/cli/tests/commands/credits-pricing-861.test.ts: the line is gone, the opt-in add-ons (keyword_gaps, content_gaps) still print.
  • docs/cloud/credits.mdx and docs/cli/credits.mdx: the issue enrichment row and sample line are removed, so docs and CLI match.

#172: configuration/rules.mdx categories

The page described 18 categories with hand-kept rule counts. It now has one table of the 22 live categories (from loadAllRules(): 308 enabled rules), each with its pattern and a link to its rules page, and no per-category counts (the rules reference has them). Also:

  • ax/* is the primary form everywhere on the page; ai/* and adblock/* are described as aliases (matchesRulePattern in packages/utils/src/rule-pattern.ts treats them the same).
  • The agent experience text says how those rules run today: five of them are cloud-backed (ai/site-metadata, ai/page-type-match, ai/llm-parsability, ax/archive-indexing, ax/content-without-js; the last also needs plain crawl HTML). No "off by default" or OPENROUTER_API_KEY claim.
  • The packages/utils/src/constants.ts comment already says "currently 308 enabled rules" on main.

#218: retired content/quality

docs/rules/content/index.mdx drops the content/quality card. The page now has 24 cards for the 24 live content/* rules, and the Content count on docs/rules/index.mdx (24) still matches. quality.mdx itself already carries a Retired banner.

#353: audit settings role claim

docs/dashboard/audit-settings.mdx said only owners and admins can edit audit settings. The settings routes only check that the session can open the website (no role check), so the page now says anyone in the organization who can open the website can change them. No role gate was added: that is a product decision, not a docs fix.

Checks

  • tsgo --noEmit in apps/cli: clean.
  • bun test apps/cli/tests/commands/credits-pricing-861.test.ts apps/cli/tests/commands/credits-unlimited.test.ts: 17 pass.
  • bun test packages/rules/tests/docs-category-table.test.ts (new, review follow-up): 3 pass. Keeps the category table, its count and its links in step with loadAllRules().
  • tsgo --noEmit in packages/rules: clean.
  • oxlint and oxfmt on the changed files: clean.
  • make validate (tangly check --strict) in docs/: passes.
  • Golden suite once at this sha: 208 pass, 1 fail, a 180 s timeout in the rule-result cache replay parity test (load on the box, nothing here touches the engine).
  • Codex review: clean after one round (it caught that five, not three, agent experience rules are cloud-backed).

Docs: in this PR. Agent skill: no change needed (the skill does not list prices or categories).

@nc9
nc9 marked this pull request as ready for review October 16, 2026 13:27
@claude

claude Bot commented Oct 16, 2026

Copy link
Copy Markdown

Review of #868: the changes are small and look correct. I found nothing that should block the merge, and I did not run the tests.

  • (low) docs/configuration/rules.mdx: the page now says "300+ rules" and gives no per-category counts. That is fine and avoids drift. Consider a pointer to the generated count source so the "22 categories" claim gets updated when a category is added.
  • (low) apps/cli/src/cli/commands/credits.ts: issue_enrich is hardcoded as the one excluded feature. If ENRICHMENT.enabled is ever turned on, this filter will hide the price. A comment points at the cause, but ideally the server would omit the key from pricing, or the CLI would read the flag.
  • (nit) The test asserts not.toContain("issue_enrich") against the whole output. That is fine today, but a more specific check would be more robust, for example that the price line 3 per issue is absent.
  • (nit) docs/dashboard/audit-settings.mdx: the "anyone in the organization who can open the website" wording documents current behavior. Consider tracking the missing role gate as a separate issue, since the old claim might have been the intended design.

The CHANGELOG entry and the removal of the content/quality card are consistent with the rest of the diff.

🤖 Generated with Claude Code

nc9 added 2 commits October 17, 2026 00:37
…tegories; drop retired quality card and unenforced role claim (#861, #172, #218, #353)

squirrel credits and the credits pages no longer advertise issue_enrich (enrichment is switched off in the cloud). configuration/rules.mdx lists the 22 live categories with their patterns and aliases. The content index drops the retired content/quality card. Audit settings no longer claims an owner/admin gate the API does not enforce.

Signed-off-by: Nik Cubrilovic <[email protected]>
…; test the docs category table against the loader (#861, #172)

Review follow-ups on #868: squirrel credits hides issue_enrich only while ENRICHMENT.enabled is false, the #861 test also checks the '3 per issue' line is gone, and a rules test keeps the configuration/rules.mdx category table, its count and its links in step with loadAllRules().

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 force-pushed the docs/batch-b-accuracy branch from c237438 to 6d63a29 Compare October 16, 2026 13:37
@nc9

nc9 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Review triage, fixed in 6d63a29 (rebased on main):

  • (low) category count drift: fixed with a test, not a pointer. packages/rules/tests/docs-category-table.test.ts checks that the configuration/rules.mdx table lists each loadAllRules() category once, that the page states the live count (**22 categories**), and that each row links to an existing docs/rules/<page>/index.mdx. A new category now fails the rules suite until the table has it.
  • (low) hardcoded issue_enrich: the filter is now feature !== "issue_enrich" || ENRICHMENT.enabled. If the shared switch in core-contracts/limits.ts turns on, the price prints again with no CLI change.
  • (nit) broad assertion: the docs: credits pages list AI issue enrichment (3 per issue), which the cloud has switched off #861 test now also checks that per issue (the only per-issue price) is gone.
  • (nit) role gate: this is a product decision for the private cloud (the settings routes check website access only). It is not a docs bug, so this PR documents what the API enforces. I'm raising the gate question with the maintainer separately.

@claude

claude Bot commented Oct 16, 2026

Copy link
Copy Markdown

Review of #868. The aliasing claims check out against rule-pattern.ts: ax/* and ai/* match the same rules, and adblock/* matches blocking/*. I read the diff and those files, but didn't run the tests.

  • (low) apps/cli/src/cli/commands/credits.ts:151 The filter uses the CLI's bundled ENRICHMENT.enabled, but the pricing comes from the server. If the cloud turns enrichment on, older CLI builds will keep hiding the price until they are upgraded. Filtering on server data would avoid that, for example by having the server omit unsold features. If you keep the client-side check, the comment is accurate enough as it stands.
  • (nit) docs/configuration/rules.mdx says "300+ rules" by hand while the new test pins the category count but not the rule count. A short test that parses the number would keep it from drifting again, or you could drop the figure.
  • (nit) packages/rules/tests/docs-category-table.test.ts The ROW regex silently skips any row that doesn't match it. A malformed row would just disappear and the "lists each loaded category once" test would fail with an unclear diff. That's fine, but a comment saying so would help.
  • (nit) The table links the Blocking category to /rules/adblock while its pattern is blocking/*. The test confirms the page exists, so this is only a possible source of confusion for readers.
  • (nit) docs/dashboard/audit-settings.mdx now says anyone who can open the website can change audit settings. That matches the routes, as you note. It is a permissions-relevant behaviour, so a follow-up issue for the product decision on a role gate would be worth filing if one isn't open.

I found no bugs in the CLI change, and the new tests cover both the hidden issue_enrich line and the add-ons that still print.

@nc9

nc9 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Second-round triage, no code change:

  • (low) bundled ENRICHMENT.enabled: accepted as is. ENRICHMENT is the one shared switch that the cloud and CLI both build from, and turning enrichment back on is a product launch that would ship with a CLI release. The comment says the filter holds only while enrichment is off.
  • (nit) "300+ rules" is a floor, not a count. It only goes stale if the catalog drops below 300, and the per-category counts live on the rules reference.
  • (nit) silent ROW skip: a malformed row drops out of listed, so the set comparison against loadAllRules() still fails and the diff names the missing category.
  • (nit) /rules/adblock is the existing directory for the Blocking pages. The alias paragraph under the table explains adblock/*.
  • (nit) role gate: filed with the maintainer as a product decision. This PR documents what the API enforces today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment