Skip to content

docs: add context7.json and improve readme for documentation indexing - #47

Merged
paullla merged 2 commits into
Locastic:masterfrom
paullla:docs/context7-config
Jul 8, 2026
Merged

docs: add context7.json and improve readme for documentation indexing#47
paullla merged 2 commits into
Locastic:masterfrom
paullla:docs/context7-config

Conversation

@paullla

@paullla paullla commented Jul 8, 2026

Copy link
Copy Markdown
Member
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Issues -
License MIT

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/console setup 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_enabled instead of locastic_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

  • Add 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, the Serializer\Attribute vs Annotation import gotcha, storage initialization commands, reading logs via ActivityLogProviderInterface).
  • Fix the Doctrine subscriber config example to use the real option, verified against config/definition.php.
  • Fence the console commands as bash blocks, add a Quick start section with the minimal end-to-end setup, promote the bold Twig/API Platform pseudo-headings to real headings, split the configuration reference into general options, Elasticsearch connection options and index mappings, and finish the storage-neutral wording sweep (three sections still claimed logs always go to Elasticsearch).

paullla added 2 commits July 8, 2026 14:56
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
@paullla
paullla merged commit 9667ad4 into Locastic:master Jul 8, 2026
13 checks passed
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