Repository navigation
chore(context7): limit Context7 indexing to the user docs - #99
Merged
Merged
Conversation
Add a context7.json so Context7 indexes only the docs pages under docs/src/app/docs (minus the changelog page), skills/ and the root README. Without it, the planning artifacts under context/ and the agent files under .claude/ and .agents/ would outweigh the user docs roughly six to one. AGENTS.md, CLAUDE.md and CHANGELOG.md are named in excludeFiles because root-level markdown is always indexed and setting excludeFiles replaces Context7's default exclusions. The rules restate passages of skills/worktree/SKILL.md. context/stack.md records the file and what has to keep it in step.
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.
What
Adds
context7.jsonat the repo root, ahead of submittingnorthguild/worktreeto Context7, and records it incontext/stack.md.By default, Context7 indexes every markdown file in a repo. Here that would be about 1,900 lines of user docs against more than 11,800 lines of planning artifacts in
context/, plus the agent files under.claude/,.agents/and.github/agents/. Agents asking how to useworktreewould get plan ledgers back.What gets indexed
Context7's owner docs say root-level markdown is always indexed, and that setting
excludeFilesreplaces the default exclusions.docs/src/app/docs/**(20 pages)docs/src/app/docs/changelog/(release policy, not usage docs)skills/worktree/SKILL.mdcontext/,.claude/,.agents/,.github/agents/,.changeset/README.mddocs/README.md,docs/worker/README.mdAGENTS.md,CLAUDE.md,CHANGELOG.md(named inexcludeFiles)The counts come from running every tracked
.md/.mdxfile through Context7's documented rules. They are not from Context7's own parser, so check the result after submitting.The six
rulesshown to agents each restate a passage ofskills/worktree/SKILL.md.context/stack.mdnow names what has to keep this file in step: movingdocs/src/app/docs/orskills/, adding a new root.md, or changing one of the behaviours the rules describe.No release note
context/**owes none percontext/release.md. Rootcontext7.jsonhas no row there and isn't in the package'sfileslist. The release-note check's path filter doesn't match either file.Verification
pnpm check: exit 0. This is a docs/config-only change, so percontext/verify.mdGate 1 is lint plus a read of the diff. Biome doesn't cover root JSON, so the file was also checked to parse.--sourceprompt, butsrc/commands/branch.ts:151only exemptsorigin/.After merge (maintainer steps, not in this PR)
CONTEXT7_API_KEYrepository secret from the Context7 dashboard, so it was left out rather than landed as a job that fails until that secret exists.