feat: add synapse lifecycle and modernize context packs - #5
Merged
Conversation
Add lifecycle-aware synapse projections, cache-safe context materialization, versioned pack validation, component-scoped pack knowledge, refreshed guidance, schemas, golden evaluations, and release checks.
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.
Implementation
Add lifecycle-aware synapse projections, cache-safe context materialization, versioned pack validation, component-scoped pack knowledge, refreshed guidance, schemas, golden
evaluations, and release checks.
Summary / Context
This PR modernizes contextd's runtime knowledge model and pack system.
It introduces:
outdatedinstead of silently removing it.The component-scoped operator-steering pilot reduces the estimated payload from approximately 4,307 to 1,386 tokens, a reduction of about 68%, while preserving essential decision and
escalation guidance.
Problem & Why
The previous runtime and pack model had several related limitations:
This change keeps knowledge traceable across its lifecycle, reduces unnecessary context work, and makes retrieval more targeted. It also positions packs as practical decision support
for both agents and humans, helping users identify knowledge gaps, challenge assumptions, decide what to do next, and recognize when to stop or escalate.
Test Notes
python scripts/test_lint_wiki.pypython scripts/test_atomic_write.pypython scripts/test_detect_repetition.pypython scripts/lint-wiki.py --all-workspaces --wiki-root .Additional validation:
python3 scripts/test_contextd_runtime.py— 46/46 passedpython3 scripts/test_artifact_schemas.pycontextd pack-validate --all— 15 packs, 0 errors, 0 warningsRelated Issues
N/A — no linked issue.
Docs / Workflow Impact
Updated areas include:
Manifest-v2 packs remain supported as compatibility inputs. Manifest-v3 packs use
knowledge.mdandpack.yaml#retrievalas their canonical, component-scoped knowledge layer.Wiki-specific checks
All retrieval and synapse projections remain scoped to the active workspace. Outdated nodes retain provenance and lifecycle state without borrowing replacement knowledge from another
workspace.
Project Spirit Check
Trade-offs: