Skip to content

Consolidate knowledge-system rules into one per-project surface#8

Merged
gering merged 2 commits into
mainfrom
task/consolidate-knowledge-rules
Jun 12, 2026
Merged

Consolidate knowledge-system rules into one per-project surface#8
gering merged 2 commits into
mainfrom
task/consolidate-knowledge-rules

Conversation

@gering

@gering gering commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Merge the overlapping always-loaded knowledge-system rules into one per-project surface and resolve the inline-vs-/query contradiction
  • Cut ~56% of the plugin's always-loaded context (~1010 tokens/session)
  • Add a staleness mechanism so /reindex nudges a re-/init when the managed rule falls behind the plugin template

Changes

  • Rules: delete auto-query.md + auto-curate.md; their when-to-consult/curate behavior now lives in the /init-written, committed knowledge-system-usage.md (one surface, team-shared, next to the @index). knowledge-boundaries.md stays (referenced by /curate).
  • Canonical guidance: read inline when the index already names the file; /query for open-ended questions; /curate at key moments. Removes the old "do NOT use /query" vs "use /query" contradiction.
  • Staleness: /init stamps a knowledge-system-usage v<version> marker; /reindex reads it foreground/read-only and nudges /init when stale. The QA agent stays fenced to .claude/knowledge/ + .claude/logs/reindex.md.
  • Version: knowledge-system 1.6.0 → 1.7.0 (plugin.json + marketplace.json).

Readiness

  • ✅ README updated
  • ✅ Version bumped (1.7.0, both files)
  • ➖ Changelog N/A (none in repo)
  • ➖ Tests/lint/build N/A (declarative Markdown plugin)
  • ➖ Project knowledge N/A (repo never /init'd; no new generalizable pattern)

Test plan

  • Run /init in a fresh project → knowledge-system-usage.md carries fallback + when-to + commands + a v1.7.0 marker
  • Confirm no always-loaded surface still says "do NOT use /query"
  • Bump the plugin, run /reindex in an init'd project → it nudges to re-run /init; QA agent writes only under .claude/knowledge/ + .claude/logs/
  • Existing projects: re-running /init picks up the new template

🤖 Generated with Claude Code

@gering gering force-pushed the task/consolidate-knowledge-rules branch from 5f53be7 to 4f733be Compare June 12, 2026 17:23
gering and others added 2 commits June 12, 2026 19:32
- Merge auto-query + auto-curate behavior into the /init-written
  knowledge-system-usage.md; drop both plugin rules
- Resolve inline-vs-/query contradiction: read inline for a known
  path, /query for open questions
- /reindex flags a stale usage rule via a version marker and nudges
  /init (read-only; agent stays fenced to knowledge/ + logs/)
- ~56% less always-loaded context (~1010 tokens/session)

Existing projects: re-run /init to pick up the new template.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Address code-review findings on the staleness mechanism added earlier in
this branch.

- Stamp an integer template version (`template-vN`) into the rule instead
  of the plugin version; /reindex reads the same number from init/SKILL.md
  (single source of truth) and compares by equality
- No more false-positive nudges on unrelated plugin version bumps; the
  marker only changes when the template content changes
- Legacy rules (no template-v marker but a "managed by the" comment) are
  now detected and nudged; opt-out is deleting the marker line
- Equality compare on bare integers avoids semver mis-ordering (1.9 vs 1.10)
- Capture both template versions for the nudge text
- Drop {{VERSION}} substitution — the marker is now literal, removing the
  literal-write risk
- README describes the staleness flag as a foreground read-only check, not
  background-agent work
- Restore dropped directives: be selective (no bulk-read), fix stale
  knowledge promptly

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gering gering force-pushed the task/consolidate-knowledge-rules branch from 4f733be to b425fdc Compare June 12, 2026 17:32
@gering gering merged commit 0f2b4d8 into main Jun 12, 2026
1 check 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