feat(wiki): add /suggest-next skill for knowledge-driven campaign recommendations#275
Conversation
…ommendations Add retrieval script and Claude skill that recommend next experiment framings based on accumulated cross-campaign knowledge from the registry. - scripts/retrieve_wiki_context.py: deterministic entity-scoped subgraph retrieval from per-campaign JSON files (principles, dead-ends, frontiers, interactions, cost context) - .claude/commands/suggest-next.md: skill that selects campaigns/entities from registry, runs retrieval, synthesizes scored recommendations Closes AI-native-Systems-Research#274 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
After producing scored recommendations, the skill now offers to generate schema-valid campaign.yaml files directly from the recommendations. Users select which recommendations to convert, and the generated configs are written to ~/.nous/wiki/suggestions/campaigns/ with full traceability metadata linking back to the source suggestion. Also fixes campaign/entity selection to use strict caps (3 campaigns, 6 entities) instead of ambiguous ranges, and documents /suggest-next in docs/nous-wiki.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Hey, nice addition — the architecture is clean and it doesn't touch any existing code. A few issues in 1. Silent data loss — malformed JSON files are skipped with no warning
Fix: print a warning to stderr when a file exists but can't be parsed. 2. Bare Entity/concept/parameter iteration uses Meanwhile other parts of the same script already use safe access ( 3. JSONL metrics parsing has no per-line error handling A truncated or corrupted line in Fix: wrap 4. Missing campaigns produce empty output with no warning If Fix: emit a stderr warning per skipped campaign, and if zero campaigns loaded, exit with an error. Everything else looks good — the skill prompt is consistent with the wiki data model, paths are portable, and the design isn't overengineered. Just needs defensive error handling since the input data is LLM-generated and imperfect by nature. |
…d input Address PR review feedback: 1. load_json() now warns on stderr when a file exists but can't be parsed, instead of silently returning None (data loss visibility) 2. All dict["key"] access replaced with .get() defaults throughout entity, concept, parameter, and principle iteration (prevents KeyError crashes) 3. JSONL metrics parsing wraps each line in try/except with per-line warning, and uses .get() for all field access (handles truncated campaign files) 4. Missing campaigns emit per-campaign stderr warnings, and if zero campaigns load successfully the script exits with an error instead of producing an empty context block Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
All four issues addressed in 490c664:
Pattern: warn-and-degrade for partial failures (one bad line, one missing field), fail-hard for total failures (zero usable campaigns). |
66c8faf
into
AI-native-Systems-Research:main
Summary
scripts/retrieve_wiki_context.py— a deterministic retrieval script that builds entity-scoped knowledge subgraphs from per-campaign JSON files (principles, dead-ends, frontiers, interactions, cost context).claude/commands/suggest-next.md— a Claude skill that loads the cross-campaign registry, selects relevant campaigns/entities, runs the retrieval script, and synthesizes top-3 scored campaign framings with predicted cost and model configurationContext
This is PR 3 of 4 in the wiki persistence strategy (Discussion #269). It builds on:
Closes #274
Test plan
python scripts/retrieve_wiki_context.py --helpdisplays usage~/.nous/wiki/directory with at least one indexed campaign/suggest-nextwith a research intent and confirm it produces a scored suggestion markdown file🤖 Generated with Claude Code