feat(diversity): per-platform Layer-A state, exhaustion warnings, gro… - #7
Open
PlevanTem wants to merge 1 commit into
Open
feat(diversity): per-platform Layer-A state, exhaustion warnings, gro…#7PlevanTem wants to merge 1 commit into
PlevanTem wants to merge 1 commit into
Conversation
…w-corpus.js
Three coordinated changes to make the corpus-direct diversity system
persistent and infinitely extensible across batches:
1. Per-platform Layer-A usage state (run-corpus.js)
- Default path now corpus_usage_{platform}.json (was corpus_usage.json)
- Platform is resolved before usageStatePath so mobile and web
never write into each other's state; aligns with the per-platform
files already written by merge-subagent-retry.js
2. Exhaustion warnings (query_factory_v2.js)
- pickLeastUsedTopics() emits [Layer-A WARN] with l2Key when
count > pool_size (cycling is about to start)
- buildCorpusPlan() emits a pre-call warning when all topics in
an L2 have been used at least once
3. grow-corpus.js — new script for LLM-based topic pool expansion
- Scans corpus_data[_web].json for L2s with <threshold fresh topics
- Generates expand-by new topics via Claude CLI per L2
- Jaccard dedup (threshold 0.4) prevents near-duplicate additions
- Appends in-place to corpus file; dry-run mode available
- Usage: node scripts/grow-corpus.js [--platform mobile|web]
[--threshold 10] [--expand-by 20] [--dry-run]
4. README: three new sections (No-API mode, grow-corpus.js,
merge-subagent-retry.js) + extended parameter table for run-corpus.js
(--platform, --prep-only, --prep-batch, --score, --no-xlsx)
5. docs/index.html: Layer-A cards + i18n strings updated to reference
per-platform state files and grow-corpus.js; both en/zh blobs synced
Co-Authored-By: Claude Sonnet 4.6 <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.
…w-corpus.js
Three coordinated changes to make the corpus-direct diversity system persistent and infinitely extensible across batches:
Per-platform Layer-A usage state (run-corpus.js)
Exhaustion warnings (query_factory_v2.js)
grow-corpus.js — new script for LLM-based topic pool expansion
README: three new sections (No-API mode, grow-corpus.js, merge-subagent-retry.js) + extended parameter table for run-corpus.js (--platform, --prep-only, --prep-batch, --score, --no-xlsx)
docs/index.html: Layer-A cards + i18n strings updated to reference per-platform state files and grow-corpus.js; both en/zh blobs synced