Add LLMText module for AI/LLM-friendly content generation - #34
Merged
Conversation
- Source behaviour with 4 callbacks (source_name, enabled?, collect_index_entries, collect_page_files) - FileStorage writing to host app's priv/static/llms/ - Generator with deterministic section ordering (run_all, run_source, rebuild_index) - Oban worker with 3 scopes (file, source, all) and 5s dedup window - PublishingSource with external module guards (Code.ensure_loaded?) - PublishingSubscriber GenServer for event-driven regeneration - HTTP controller serving /llms.txt and /llms/*path as text/plain - Facade module with PhoenixKit.Module auto-registration
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
PhoenixKit.Modules.LLMText)/llms.txtroot index + per-page.txtfiles written to host app'spriv/static/llms/PublishingSource— reads all published posts from any Publishing group (news, legal, etc.)PublishingSubscriberGenServer subscribes to Publishing PubSub events and enqueues Oban jobs on publish/unpublish/deleteGenerateLLMTextJobOban worker — three scopes:file(single file),source(all files for one source),allGET /llms.txtandGET /llms/*path— 404 if file not pre-generatedSourcebehaviour for host apps to register custom sources viaconfig :phoenix_kit, :llm_text_sourcesPhoenixKitWeb.Integration— LLM public routes + admin settings pageTest plan
mix test test/modules/llm_text/— 57 tests, 0 failuresmix precommit— passed