Repository navigation
Add context7.json, tag code fences, refresh Context7 on push - #104
Merged
Merged
Conversation
25 opening fences in nav pages had no language, so Context7 guessed and filed them under buckets like text/APIDOC. Directory trees and ASCII diagrams are now plaintext, HTTP request lines http, CLI commands bash, php.ini lines ini. Metadata only; no code or prose changed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Context7 already indexes this repo as /mage-os/devdocs. This config makes it parse the repo deliberately: - excludeFiles: documentation.md (nav only), README.md, CODEOWNERS, and the 13 markdown files not linked from documentation.md. Context7 was indexing those unreachable duplicates instead of the published *_xml pages (6 File Reference pages contributed 0 snippets). - description names Magento 2 extension/theme compatibility and core RMA; the library-resolve step matches on this metadata. - rules[] gives coding agents the Mage-OS specifics they get wrong: the repo.mage-os.org install command, PHP 8.3+, unchanged Magento\* namespaces and bin/magento, db_schema.xml over InstallSchema.php, and RMA in core from 3.0.0 (product-community-edition requires mage-os/module-rma). Workflow triggers a Context7 re-index on push to main. Runs only on mage-os/devdocs and no-ops until a CONTEXT7_API_KEY secret is set. Co-Authored-By: Claude Opus 5.5 <[email protected]>
DavidLambauer
previously approved these changes
Sep 29, 2026
Member
|
Thanks! @DavidLambauer are you able to handle the Context7 key? |
Contributor
|
@rhoerr Done, |
Contributor
Author
|
@DavidLambauer Nice. Let me know, then I can run tests via claude to see if the prior issues I noted had been resolved. |
Contributor
|
@rhoerr Could you approve this PR and merge it? Once done, I can trigger the context7 scan |
DavidLambauer
approved these changes
Oct 3, 2026
DavidLambauer
left a comment
Contributor
There was a problem hiding this comment.
Re-approving on the current commit. My earlier approval was dismissed when the Context7 claim verification fields (url, public_key) were pushed to this branch; no other content changed.
DavidLambauer
pushed a commit
that referenced
this pull request
Oct 7, 2026
The description added in #104 was 361 characters. Context7's schema (https://context7.com/schema/context7.json) caps it at 200, and the file failed validation. Context7 has since re-parsed the repo (2026-10-05) but its stored settings for /mage-os/devdocs are still the defaults: the generated description, default excludeFiles, and no rules. So none of the config from #104 took effect, and the 13 unlinked duplicate pages are still indexed in place of the published *_xml pages. This is the only schema error in the file; it now validates cleanly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
DavidLambauer
pushed a commit
that referenced
this pull request
Oct 7, 2026
Context7 gives no error when context7.json is invalid. The description added in #104 exceeded the schema's 200-character limit and the library kept its default settings. This workflow runs check-jsonschema against https://context7.com/schema/context7.json whenever the file changes, so a schema error fails the PR instead of going unnoticed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 this does
These docs are already indexed by Context7 as
/mage-os/devdocs. Context7 feeds library documentation to AI coding assistants (Cursor, Claude Code, Copilot and others). This PR makes Context7 read the repo on purpose rather than with its defaults.No documentation prose changes. Everything here is metadata or config.
1. Add
context7.jsonexcludeFiles— leaves outdocumentation.md(nav only),README.md,CODEOWNERS, and the 13 markdown files that are not linked fromdocumentation.mdand so render nowhere on devdocs.mage-os.org (acl.md,di.md,db_schema.md, … and the two merged-page leftoversrest-apis-soap-apis.mdandthe-magento-application-and-service-contracts.md).Context7 was indexing these unreachable duplicates instead of the published
*_xmlpages. In the live index, six File Reference pages (db_schema_xml,fieldset_xml,indexer_xml,menu_xml,webapi_xml,widget_xml) contribute 0 snippets, while their orphan copies supply 44 snippets (8% of the index), each pointing at a path with no published page. The files stay in the repo; three of them hold material their published twin lacks, which should be ported across in a separate content PR before the orphans are deleted.description— says what Mage-OS is, that it is compatible with Magento 2 extensions and themes, and that it ships features Magento Open Source lacks (RMA). Context7 matches library lookups on this metadata, not on page content. Context7 documents it as a suggestion it may override, so it's worth measuring after the next parse.rules[]— short facts sent to every assistant that looks up Mage-OS, covering things they currently get wrong:repo.mage-os.orginstall commandMagento\*namespaces andbin/magentoare unchangeddb_schema.xmloverInstallSchema.phpfor new modulesmage-os/product-community-editionrequiresmage-os/module-rmafrom 3.0.0 through 3.5.0, according to the package metadata on repo.mage-os.org. Assistants today either say you need a third-party extension or suggest building one yourself.2. Tag 25 untagged code fences
Code blocks with no language make Context7 guess, and its guesses end up as
text/APIDOC. Directory trees and ASCII diagrams are nowplaintext(the existing repo convention), HTTP request lineshttp, CLI commandsbash, and thephp.inilineini. Only the opening fence line changes; the code inside is untouched.3. Refresh Context7 on push
.github/workflows/context7-refresh.ymluses Context7's documented refresh call so the index followsmainrather than lagging behind it (the last parse was 2026-08-02, before the latest commit). It runs only onmage-os/devdocsand exits cleanly without doing anything until the secret below is set, so it can't fail on forks or before setup.Needs a maintainer (not doable from a fork)
CONTEXT7_API_KEY(from the Context7 dashboard) to turn on the refresh workflow./mage-os/devdocson Context7. It currently showsverified: false. Claiming gives the org an admin panel, higher refresh limits and version management./websites/devdocs_mage-os_main. It's a crawl of devdocs.mage-os.org last parsed 2026-02-23, and it outranks this repo's entry onmage-oslookups, so assistants can end up on a copy that is seven months out of date.Out of scope, as follow-ups
extension_attributes.md,routes.mdandacl.mdinto their*_xmlpages, then delete the 13 orphan files.Findings were measured against the live Context7 index (546 snippets, pulled as JSON) at
291815b.🤖 Generated with Claude Code