docs: add context7.json and improve readme for documentation indexing - #47
Merged
Conversation
Loggastic is not indexed on Context7 yet. This config controls the initial parse when the library is submitted: it scopes indexing to the user-facing docs (excluding contributor and meta files) and provides usage rules that coding agents receive alongside documentation snippets, covering storage selection, the serializer attribute import gotcha, and storage initialization commands.
The disable-the-Doctrine-listener example used a config root and key that do not exist (loggastic.doctrine_listener_enabled); the real option is locastic_loggastic.default_doctrine_subscriber, verified against config/definition.php. The remaining changes make the docs friendlier to snippet-based indexing (Context7 and similar tools used by AI coding assistants): - add a Quick start section with the minimal end-to-end setup - fence the console commands as bash blocks instead of indented text - promote the bold Twig and API Platform pseudo-headings to real headings so their snippets keep their context - split the 60-line configuration reference into general options, Elasticsearch connection options and index mappings - finish the storage-neutral wording sweep (three sections still said logs are saved to Elasticsearch regardless of the storage option) - import ActivityLoggerInterface in the custom listener example
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.
Problem
Loggastic is now indexed on Context7 (https://context7.com/locastic/loggastic), the documentation service used by AI coding assistants, and the first scan surfaced real problems: the two
bin/consolesetup commands are missing from the index because they are indented rather than fenced code blocks, the disable-the-Doctrine-listener example documents a config key that does not exist (loggastic.doctrine_listener_enabledinstead oflocastic_loggastic.default_doctrine_subscriber), contributor-workflow snippets from CONTRIBUTING.md are served to library users, and the 60-line configuration reference is extracted as a single snippet.Changes
context7.json: scopes indexing to user-facing docs (excludes tests,.github, changelog and contributor/meta files), sets title and description, and defines usage rules delivered to coding agents with each snippet (storage backend selection, theSerializer\AttributevsAnnotationimport gotcha, storage initialization commands, reading logs viaActivityLogProviderInterface).config/definition.php.