Skip to content

[codex] Add Context7 configuration#8417

Open
jderochervlk wants to merge 4 commits intorescript-lang:masterfrom
jderochervlk:codex/context7-config
Open

[codex] Add Context7 configuration#8417
jderochervlk wants to merge 4 commits intorescript-lang:masterfrom
jderochervlk:codex/context7-config

Conversation

@jderochervlk
Copy link
Copy Markdown
Contributor

@jderochervlk jderochervlk commented May 9, 2026

Summary

  • Add a root context7.json for Context7 indexing.
  • Frame the package as ReScript the language, not as compiler repository internals.
  • Limit indexing to repository-local documentation, the standard library runtime surface, and documented rescript-tools CLI material.
  • Exclude compiler, parser, rewatch/build-system, broad test fixtures, tooling implementation files, changelog, and contributor/admin content.
  • Point Context7 consumers to https://rescript-lang.org/llms.txt for website-hosted language, manual, React, and ecosystem documentation.

Tests and Fixtures

I reviewed tests/tools_tests and the broader test tree. They are useful maintainer fixtures, but I left tests excluded because indexing them would mix deprecated API migration inputs, expected outputs, and implementation-focused compiler/build fixtures into user-facing Context7 results. tools/src/migrate.md keeps the useful migration CLI context without that noise.

Validation

  • Parsed context7.json with Node.
  • Checked the selected fields and constraints against the published Context7 schema.
  • Re-ran local assertions that the included folders, source exclusions, test exclusion, rescript-tools rule, and llms.txt rule are present.

Signed-off-by: Josh Vlk <josh@vlkpack.com>
Signed-off-by: Josh Vlk <josh@vlkpack.com>
@jderochervlk jderochervlk marked this pull request as ready for review May 9, 2026 16:56
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 9, 2026

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8417

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8417

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8417

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8417

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8417

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8417

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8417

commit: e84f387

Comment thread context7.json
"$schema": "https://context7.com/schema/context7.json",
"projectTitle": "ReScript",
"description": "ReScript is a statically typed language for web development that compiles to clean, readable JavaScript, with sound types, fast builds, and seamless JS interop.",
"folders": ["docs", "packages/@rescript/runtime", "tools"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we somehow need to specifically state that the docs are found e.g. in

/@rescript/runtime/lib/ocaml/Stdlib_Bool.resi

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the folders just tells it where to scan. The rules are for anyone accessing the library from context7, not for instructions on how it should parse things. From what I can tell it does a decent job of figuring things out.

@jderochervlk
Copy link
Copy Markdown
Contributor Author

I'll need someone with merge permissions to merge this in for me.

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.

2 participants