docs(setup-docs): default to runtime deps with deny-list filter#41
Merged
Conversation
The previous `setup-docs` pipeline told the skill to parse `dependencies + devDependencies + peerDependencies` and fetch docs for everything. In practice that flooded `AGENTS.md` with linters, bundlers, test runners, and type-only shims that an AI agent never references when writing application code, while also ballooning wall-clock time and failure rate on packages that don't have docs in the usual places. Rework the skill around a narrow-by-default principle: - Default scope is runtime `dependencies` only (or the equivalent for each non-npm ecosystem — explicit tables listed for pypi, go, crates, pub, hex, and maven). - A new `references/deny-list.md` file catalogues glob patterns for noisy toolchain packages (ESLint / Prettier / Biome, vite / rollup / esbuild / tsup / turbo, babel / swc, vitest / jest / playwright, husky / lint-staged / commitlint / release-please, core-js / tslib, `@types/*`, etc.). The skill reads this file and filters the candidate list before asking the user. - Step 2 now shows three buckets in the confirmation prompt — "will fetch", "skipped by deny-list", "skipped devDependencies" — so the user can see exactly what was dropped and why. - Every exclusion is recoverable through explicit overrides: `include-dev`, `include <names>`, or `all` (which also disables the deny-list). This keeps the default focused without hiding packages from users who genuinely need them. No code changes; this is a pure skill/reference update.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Deploying ask-registry with
|
| Latest commit: |
4a8c78d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4279cb89.ask-registry.pages.dev |
| Branch Preview URL: | https://docs-setup-docs-primary-deps.ask-registry.pages.dev |
Contributor
There was a problem hiding this comment.
2 issues found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="skills/setup-docs/references/deny-list.md">
<violation number="1" location="skills/setup-docs/references/deny-list.md:17">
P2: The `all` override is documented incorrectly here; it also includes dev/peer dependencies, not just disabling the deny-list. Otherwise users can trigger a much larger fetch set than this reference promises.</violation>
</file>
<file name="skills/setup-docs/SKILL.md">
<violation number="1" location="skills/setup-docs/SKILL.md:130">
P2: Peer dependencies are skipped silently here—the confirmation buckets only show `devDependencies`, so users cannot see npm peers that were excluded by default.</violation>
</file>
Architecture diagram
sequenceDiagram
participant U as User
participant S as Setup-Docs Skill
participant FS as Local Files (Manifests/Lockfiles)
participant DL as NEW: Deny-List Reference
participant AD as Add-Docs Pipeline
Note over S,FS: Step 1: Dependency Discovery
U->>S: Run setup-docs
S->>FS: Parse manifest (e.g., package.json, go.mod)
S->>FS: Parse lockfile (e.g., package-lock.json, go.sum)
FS-->>S: Raw dependency list (name, version, scope)
Note over S,DL: Step 1.5: Filtering & Bucketing
S->>S: CHANGED: Apply default scope (runtime deps only)
S->>DL: NEW: Read patterns from references/deny-list.md
DL-->>S: Glob patterns (e.g., eslint*, @types/*)
S->>S: NEW: Filter runtime deps against deny-list
Note over U,S: Step 2: Three-Bucket Confirmation
S->>U: CHANGED: Display buckets (Will fetch / Deny-listed / Skipped devDeps)
alt User requests override (e.g., include-dev, include <name>, all)
U->>S: Input override command
S->>S: NEW: Recalculate buckets based on instruction
S->>U: Show updated plan
end
U->>S: Confirm (yes)
Note over S,AD: Step 3: Execution
loop For each package in "Will fetch" bucket
S->>AD: Invoke add-docs (Steps 1-6.5)
AD-->>S: Documentation metadata & ask.lock update
end
S->>FS: Final pass: Rebuild AGENTS.md block
S-->>U: Setup complete (Focused AGENTS.md generated)
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Address two review comments on PR #41: 1. `include <name>` override semantics were ambiguous across SKILL.md Step 1.5, Step 2, and references/deny-list.md. Step 1.5 said it only moved packages out of the deny-list bucket, Step 2 said "skipped buckets" (plural), and deny-list.md said "even if it matches" (implying deny-list only). A user trying to force-include a single devDependency would not know whether `include foo` alone works or whether they also have to pass `include-dev`. Rewrite all three locations to state the same explicit rule: `include <name>` is a single-package escape hatch that works against any skipped bucket (deny-list, devDependencies, or both), so it covers every reason a package might have been dropped. 2. The Step 1 manifest-scope table for Go said "not `require (... // indirect)`" under a column header labelled "runtime deps only", which implied indirect deps are not runtime. Indirect deps are fully runtime — they are pulled in transitively — so the distinction this skill actually makes is direct vs. indirect, not runtime vs. non-runtime. Relabel the column header to "direct runtime deps the project itself declares" and rephrase the go cell accordingly so a Go reader is not misled. Pure documentation changes; no code touched.
Contributor
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="skills/setup-docs/SKILL.md">
<violation number="1" location="skills/setup-docs/SKILL.md:113">
P2: `include <name>` is documented as overriding every exclusion reason, but Step 1 still has non-overridable path/workspace skips. Limit this escape hatch to the deny-list and dev-dependency buckets only.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
…cope Address two cubic-dev-ai review comments on PR #41: 1. Peer dependencies were being skipped silently. The default-scope rule in Step 1 listed `dependencies` only, but the Step 2 confirmation prompt only named `devDependencies` as a skipped bucket, so npm peers vanished without the user ever seeing them. Split peerDependencies into its own soft-skip bucket and show it explicitly in Step 2 (omitted when the count is zero, so non-npm ecosystems don't get a pointless empty line). Document that `include-dev` and `all` pull in peerDependencies as well. 2. The `include <name>` override was documented as working "regardless of why the package was dropped", which overpromises. Step 1 still has an always-skip rule for workspace / `link:` / `file:` / path dependencies — those have no downloadable docs, so forcing them in would just produce errors. Narrow the override wording in SKILL.md Step 1.5, Step 2, and references/deny-list.md to explicitly say `include <name>` only covers the soft-skip buckets (deny-list, devDependencies, peerDependencies) and does not override the always-skip rules. Pure skill documentation; no code changes.
Contributor
There was a problem hiding this comment.
0 issues found across 2 files (changes from recent commits).
Auto-approved: The changes are limited to AI skill instructions (Markdown) and a reference deny-list. There are no changes to core application code, and the risk to production systems is zero.
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
Rework the
setup-docsskill around a narrow-by-default principle so that bootstrapping ASK on a project produces a focusedAGENTS.md— curated libraries the AI will actually reference when writing application code — instead of 60 toolchain packages.Problem
The previous skill told itself to parse
dependencies + devDependencies + peerDependenciesand fetch docs for every entry. In practice:AGENTS.mdmarker block gets flooded with linters (eslint*,@typescript-eslint/*), bundlers (vite,rollup*,tsup), test runners (vitest,@playwright/test), git hooks (husky,lint-staged), type shims (@types/*), and polyfills (core-js). These pollute the context AI agents load.Failedentries.Solution
devDependencies/peerDependencies/ dev-scoped equivalents in pypi, go, crates, pub, hex, maven. The scope table is spelled out in Step 1.references/deny-list.mdcatalogues glob patterns for noisy toolchain packages, grouped by category. The skill reads this file and drops matches before showing the user the plan.will fetch/skipped by deny-list/skipped devDependenciesso the user sees exactly what was dropped.include-dev— adddevDependencies(still filtered by deny-list)include <names>— force-include specific packagesall— disable deny-list AND include dev/peer depsWhy a deny-list file (and not registry tags)?
I checked — the registry already supports
tagsin the schema, but existing entries only carry domain tags (framework,ai,validation). There's nobuild-tool/linterexclusion category yet, and most denied packages aren't in the registry at all. A hardcoded pattern list underreferences/deny-list.mdis the lower-friction starting point; once we have enough data we can migrate to registry-driven exclusion without touching the skill again (the skill already says "read this file").Test plan
SKILL.mdstays under the 500 LOC budget (200 LOC).references/deny-list.mdexplains matching rules, lists categories alphabetically within each section, and documents the user-override escape hatch.Summary by cubic
Default
setup-docsto runtime dependencies and add a deny-list soAGENTS.mdlists libraries used at runtime, not toolchain packages. Clarifies peer dependency handling and override rules to make the plan explicit and predictable.requireentries, skip// indirect), Crates, Pub, Hex, and Maven.skills/setup-docs/references/deny-list.md(glob patterns foreslint*,vite,jest,@types/*,husky,core-js, etc.).devDependencies”, and “skippedpeerDependencies”.include-devnow also pulls inpeerDependencies;include <name>force-includes from any soft-skip bucket (deny-list, dev, peer) but not workspace/path deps;alldisables the deny-list and includes dev + peer deps.Written for commit 4a8c78d. Summary will update on new commits.