Skip to content

docs(experts): update core-expert + kernel-overview + §10 for v1.4.x lifecycle and pre-merge gate - #68

Merged
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
docs/expert-context-update-v1.4.x
Apr 25, 2026
Merged

docs(experts): update core-expert + kernel-overview + §10 for v1.4.x lifecycle and pre-merge gate#68
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
docs/expert-context-update-v1.4.x

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

Summary

Updates the in-repo expert context (agents/core-expert.md, context/kernel-overview.md) to surface recent kernel changes (v1.4.0/v1.4.1), and rewrites docs/CORE_DEVELOPMENT_PRINCIPLES.md §10 so it no longer contradicts context/release-mandate.md § Pre-Merge Gate.

This is a docs-only PR. No code changes. No version bump needed (no wheel-shipped code touched).

Why now

Two recent landings created a doc gap that PR #67's round-3 review surfaced:

  1. PR feat(lifecycle): add on_session_ready() post-composition lifecycle hook #63 (on_session_ready) shipped via v1.4.1 — added a new optional second module lifecycle hook with its own contract (fork semantics, failure event, dispatch ordering, no-timeout, Python-only scope). None of this was reflected in core-expert.md or kernel-overview.md, so anyone consulting those would not know the lifecycle pair exists.
  2. PR docs(release-mandate): add pre-merge gate requiring release readiness in PR #64 (release-mandate pre-merge gate) — codified the new release model (merge-is-release, in-PR readiness proof, core owner merges). core-expert.md still labeled its release mode "Post-Merge Gate" and docs/CORE_DEVELOPMENT_PRINCIPLES.md §10 still described the post-merge bump-then-tag flow. Direct readers of those files would follow the wrong process.

Adversarial review by systems-design:systems-design-critic (the "crusty old engineer" pass) confirmed both gaps as load-bearing and identified additional missed items (@core:CONTRACTS.md not referenced anywhere in core-expert.md, lifecycle signatures missing from the Module Protocols code-block listing) which are also addressed here.

What changed

agents/core-expert.md

  • Renamed RELEASE Mode "Post-Merge Gate" → "Pre-Merge Gate"; rewrote body to cite release-mandate.md § Pre-Merge Gate as authoritative and explicitly state it supersedes §10
  • Listed the five in-PR requirements with the same phrasing as release-mandate.md
  • Added new MODULE LIFECYCLE Mode covering mount + on_session_ready; cites CONTRACTS.md; surfaces the no-timeout footgun, Python-only polyglot scope, module:on_session_ready_failed event, fork-per-session semantics
  • Knowledge Base: added @core:CONTRACTS.md (was missing entirely) as the canonical cross-boundary reference; added @core:context/release-mandate.md as authoritative for the gate; clarified docs/contracts/ subdirectory as protocol-specific deep dives, not the cross-boundary map

context/kernel-overview.md

  • "What the Kernel Provides" → new "Module Lifecycle" subsection naming mount() and on_session_ready() with concise descriptions and a pointer to CONTRACTS.md
  • "Module Protocols" → new "Module Lifecycle" subsection with mount() and on_session_ready() signature blocks alongside the existing five protocols (was inconsistent: protocols had signatures, lifecycle didn't)

docs/CORE_DEVELOPMENT_PRINCIPLES.md §10 (full rewrite)

  • Title: "Every Merge Gets a Release" → "Merge Is Release"
  • Body rewritten to describe the pre-merge gate model: PR proves readiness, merge button is publish button
  • Lists the five in-PR requirements (atomic version bump, Rust/Python symmetry, fresh wheel, E2E smoke test result, no [tool.uv.sources] git overrides)
  • Documents who merges (core owner) and the merge-as-release flow
  • Cross-references release-mandate.md as canonical
  • Preserves valid prior content (the bump_version.py script details, the wheel-build workflow trigger, downstream-repo scope clause)
  • Recovery section retained with explicit yank-then-fix-forward steps

Scope notes

  • Per the critic, dropped a proposed update to bundle-awareness.md (foundation) — would have been context poisoning of a thin awareness pointer.
  • foundation-expert and amplifier-expert get matching updates in separate PRs (one per repo).

Verification

git diff --stat main:

 agents/core-expert.md               | 80 +++++++++++++++++++++++++++++--------
 context/kernel-overview.md          | 27 +++++++++++++
 docs/CORE_DEVELOPMENT_PRINCIPLES.md | 74 ++++++++++++++++++++--------------
 3 files changed, 133 insertions(+), 48 deletions(-)

No code changed; no tests required. The expert files are reference docs loaded on demand by their respective agents.

…lifecycle and pre-merge gate

Surface recent kernel changes (v1.4.0/v1.4.1) in the in-repo expert
context so core-expert is current and CORE_DEVELOPMENT_PRINCIPLES §10
no longer contradicts release-mandate.md.

agents/core-expert.md:
- Rename RELEASE Mode "Post-Merge Gate" → "Pre-Merge Gate"; reframe
  trigger from "after a merge" to pre-merge; cite release-mandate.md
  as superseding §10
- New MODULE LIFECYCLE Mode covering mount() and on_session_ready()
  pairing, with no-timeout footgun, Python-only polyglot scope, failure
  isolation, dispatch ordering, fork semantics
- Knowledge Base: add @core:CONTRACTS.md as authoritative cross-boundary
  reference (was missing); add @core:context/release-mandate.md as
  authoritative for the Pre-Merge Gate
- Per-protocol contracts subdirectory clarified as deep-dive path,
  CONTRACTS.md as the canonical map

context/kernel-overview.md:
- "What the Kernel Provides" → new "Module Lifecycle" subsection
  naming mount() and on_session_ready() with one-line descriptions
- "Module Protocols" → new "Module Lifecycle" subsection with
  signature blocks matching the existing protocol style; cites
  CONTRACTS.md as authoritative

docs/CORE_DEVELOPMENT_PRINCIPLES.md §10:
- Full rewrite to match the new pre-merge gate model
- Title: "The Release Gate: Every Merge Gets a Release" →
  "The Release Gate: Merge Is Release"
- Lists the five in-PR requirements (atomic version bump, Rust/Python
  symmetry, fresh wheel, E2E smoke test result, no [tool.uv.sources]
  overrides)
- Documents who merges (core owner) and recovery via Incident Playbook
- Cross-references release-mandate.md as canonical

Verifies in-repo expert + dev docs against the policy codified by PR #64
(release-mandate pre-merge gate) and the lifecycle contract introduced
by PR #63 (on_session_ready) and shipped via v1.4.1.

🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier)

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@bkrabach
Brian Krabach (bkrabach) merged commit 88163a5 into main Apr 25, 2026
6 checks passed
@bkrabach
Brian Krabach (bkrabach) deleted the docs/expert-context-update-v1.4.x branch April 25, 2026 16:22
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