Conversation
…gent rules The prior context7.json was a two-field placeholder (`url`, `public_key`) that only served to claim the library on Context7. That means every coding agent that pulls LeadMagic docs through Context7 today falls back to LLM-inferred titles/descriptions and gets no guard rails on wording, auth, or package provenance. Expand it to the full documented schema (see https://context7.com/docs/adding-libraries) so the admin-panel claim still works and coding agents receive deterministic, on-brand context: - Add `$schema` for VS Code / Cursor autocomplete and validation. - Add `projectTitle` and `description` that mirror the repo's GitHub description and the positioning on leadmagic.io (B2B data API, enrichment, email finding/validation, intent signals) — deliberately platform-neutral, matching profile/README.md and SECURITY.md. - Pin `branch: main` so Context7 tracks the default branch explicitly rather than inferring it. - Tighten `excludeFolders` / `excludeFiles` to keep `node_modules`, generated output, `.github/` workflow glue, `package-lock.json`, `CHANGELOG.md`, and `LICENSE` out of the doc index; `README.md`, `SECURITY.md`, `CONTRIBUTING.md`, `llms.txt`, `llms-full.txt`, and the OpenAPI files remain indexed. - Add six `rules` that propagate the same guard rails already in `SECURITY.md` and `README.md` into every agent retrieval: 1. Platform-neutral language (no "scrapes LinkedIn"). 2. REST base URL + `X-API-Key` header + key hygiene. 3. Hosted MCP endpoint, 10 tools, all three auth modes (OAuth 2.1 + DCR, static public client with the documented public client_id, `x-leadmagic-key`, Bearer token). 4. Canonical OpenAPI files and YAML-first snippet preference. 5. Do not invent endpoints or credit costs; defer to README. 6. Installer allow-list lives in SECURITY.md; third-party packages named "leadmagic*" are not endorsed. The `public_key` field is preserved so the existing Context7 claim is not broken. Made-with: Cursor
346c181 to
8e41abc
Compare
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
Expand
context7.jsonfrom a two-field placeholder (url,public_key) into the full documented Context7 configuration schema so that every coding agent pulling LeadMagic docs through Context7 (Cursor, Claude, ChatGPT, Windsurf, Cline, etc.) receives deterministic, on-brand context and inherits the same guard rails that already live inSECURITY.mdandREADME.md.The existing claim is preserved — the
public_keyfield is retained, so the admin-panel invite / multi-version management we set up on Context7 continues to work.What changed
context7.json$schemahttps://context7.com/schema/context7.json(enables VS Code / Cursor autocomplete + validation)projectTitleLeadMagic APIdescriptionleadmagic.iopositioningbranchmain(explicit, not inferred)folders[](scan full repo; root markdown is always included)excludeFoldersnode_modules,dist,build,coverage,.githubexcludeFilespackage-lock.json,CHANGELOG.md,LICENSErulesurlpublic_keyAgent rules (the "hashtags" reviewers will care about most)
These are embedded directly in the doc context returned to coding agents, so they can't miss them:
profile/README.md,SECURITY.md, and theleadmagic.iocopy.https://api.leadmagic.io,X-API-Keyheader, key hygiene reminder (no client-side embedding, keys issued fromapp.leadmagic.io).https://mcp.leadmagic.io/mcp, calls out the 10-tool surface, and enumerates all three supported auth modes: OAuth 2.1 (Authorization Code + PKCE, S256) with DCR, the documented static public client (client_id 4b9eLjoGVCJ1Dvnc, no secret),x-leadmagic-keyAPI-key auth, orAuthorization: Bearer <token>.leadmagic-openapi-3.1.yaml/.jsonat the repo root and prefers YAML for snippets.README.mdfor the authoritative credit-cost table and route mapping — prevents hallucinated pricing.SECURITY.md: npm/pip packages namedleadmagic*published by third parties are not endorsed.Why now
The placeholder
context7.jsonworked for claiming the library but left all downstream retrieval at the mercy of LLM inference. After the hosted MCP sign-in rollout (PR #7) and the org profile rewrite (LeadMagic/.github#2), Context7 is now the primary path by which AI coding assistants discover LeadMagic auth, MCP client setup, and brand guidance. Making the guard rails retrieval-native closes the loop.Risk / blast radius
resolve-library-id/get-library-docscall forleadmagic/leadmagic-openapipicks up the new title, description, and rules automatically.public_keyretained; admin panel access continues to work.python3 -c 'import json; json.load(...)').Follow-up (not in this PR)
Repo topics on GitHub will be refreshed in a separate settings-only change (tightening to the tags below) so this PR stays strictly file-based and reviewable in GitHub's diff viewer:
b2b-data,contact-enrichment,mcp-server,llms-txtschema(redundant withopenapi/openapi-3)Test plan
python3 -c "import json; json.load(open('context7.json'))"— valid JSON.adding-librariesdocs.public_keyretained — existing claim intact.$schemaURL matches the documented value (enables editor autocomplete).projectTitle/description.resolve-library-id+get-library-docsand confirm one of therulesappears in the returned context.