Skip to content

docs: add Context7 parsing config and agent rules - #535

Merged
adeelraza merged 1 commit into
masterfrom
docs/context7
Oct 4, 2026
Merged

adeelraza merged 1 commit into
masterfrom
docs/context7

Conversation

@adeelraza

Copy link
Copy Markdown
Contributor

Summary

Extends the existing context7.json, which is already claimed with url and the team public_key (both unchanged), with parsing config for Context7. Coding agents use Context7 to fetch current library docs.

  • Description and title for the library.
  • Exclusions: .github, test, demo, coverage, dist, CHANGELOG.md and CONTRIBUTING.md, so the index focuses on the README.
  • Rules for coding agents:
    • Import EmailEditor from the package root. It's client-only, and the bundle ships 'use client', so it works in the Next.js App Router without next/dynamic.
    • Call loadDesign / saveDesign / exportHtml through emailEditorRef.current?.editor, after onReady.
    • Store the design JSON to reopen designs, and send the exported HTML.
    • Pass Unlayer config through the options prop.
    • For templates written in code, use renderToJson() from @unlayer/react-elements with loadDesign().

Testing

  • Validated against Context7's schema (https://context7.com/schema/context7.json). The description and each rule are within the limits.
  • Not published to npm: the package only ships dist.
  • After merge, refresh the library from the Context7 admin panel so the config is applied.

Keeps the existing claim fields and adds a description, exclusions (tests,
demo, build output, changelog) and rules for coding agents: root import and
'use client', calling methods via the ref after onReady, storing design JSON,
passing config through options, and generating design JSON from code with
renderToJson() from @unlayer/react-elements.
@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.43%. Comparing base (5f54f51) to head (5477377).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #535   +/-   ##
=======================================
  Coverage   97.43%   97.43%           
=======================================
  Files           2        2           
  Lines          78       78           
  Branches       20       20           
=======================================
  Hits           76       76           
  Partials        2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@adeelraza
adeelraza merged commit c5fc76b into master Oct 4, 2026
15 checks passed
@adeelraza
adeelraza deleted the docs/context7 branch October 4, 2026 04:08
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