feat(init): make the generated cocosearch.yaml a complete config reference - #84
Merged
Conversation
…nfig `cocosearch init` generated a cocosearch.yaml that documented indexing, search, and embedding — but never mentioned the optional query-rewrite controller, so it was undiscoverable to anyone who didn't read the README. Add a commented-out `controller:` block to CONFIG_TEMPLATE matching the template's documented-but-inert style (like linkedIndexes). It stays fully commented, so generated behavior is byte-for-byte unchanged and no generative model is ever called by default. This brings the init template in line with the controller example already in README.md. - generator.py: commented controller block (enabled/provider/model, with baseUrl/timeout as nested optional comments) and a short explanation - tests: assert the comment is present, plus a schema-validation guard that uncomments the example and loads it through ControllerSection so the docs can't drift out of sync with the schema Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…late Round out the init-generated cocosearch.yaml so it documents every config section the schema supports. Building on the controller block, add: - embedding: provider (ollama/openai/openrouter), per-provider model defaults, baseUrl for custom/OpenAI-compatible endpoints, outputDimension, and the COCOSEARCH_EMBEDDING_API_KEY / --fresh reindex notes - logging: the file toggle (default off) writing to ~/.cocosearch/logs/ All additions are commented out, so generated behavior is unchanged. This brings the template fully in line with README.md and the schema. Tests: presence checks for the embedding-provider and logging docs, plus a LoggingSection schema-validation guard mirroring the controller one. The uncomment-and-validate helper is now shared and bounded to each block. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…config The init section listed only 5 of the 7 interactive prompts and flags — missing --no-claude-settings (Claude Code permissions) and --no-claude-hook (the search_code nudge hook). Add both to the numbered prompt list, the flag table, and the non-interactive example. Also note that the generated cocosearch.yaml documents every section (indexing, search, embedding providers, controller, logging) as commented examples. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The hand-written config example showed embedding and controller but not the file-logging toggle. Add a logging block so the README example mirrors the now-complete init template. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
cocosearch init generated a config that documented only indexing, search, and embedding (model only). Several supported config sections were missing, so they were effectively
undiscoverable to anyone who didn't read the README:
This PR fills those gaps so the generated cocosearch.yaml doubles as a full, accurate config reference — and brings it in line with the README and the Pydantic schema.
What changed
CONFIG_TEMPLATE (generator.py) — added commented-out blocks for:
Everything is commented out, so the generated config is byte-for-byte inert — no behavior change, no generative model ever called by default. The style matches the existing linkedIndexes
example.
Docs:
nudge-hook work), plus a note that the generated config documents every section.
Why commented-out
The template's convention is "documented but inert" — every field is a commented example (see linkedIndexes). A user opts in by uncommenting. This keeps init as the single source of truth
for what's configurable without changing any defaults.
Testing
drift from the schema (shared, block-bounded _uncomment_block helper)