Cross-Repo Golden Path

June 4, 2026 · View on GitHub

Note

This page is informative and exists to keep the cross-repo counterparts in sync. The canonical authorities remain docs/INVARIANTS.md, docs/BOUNDARIES.md, and docs/LIFECYCLE.md; where this page and a canonical doc differ, the canonical doc wins. Authority order: INVARIANTS.md > BOUNDARIES.md > ARCHITECTURE.md > everything else.

The "golden path" is the one end-to-end story the whole Weaver Stack is built around: a request flows through routing, execution, gating, and audit, and the resulting traces feed a learning loop that improves the next request. It only holds together if the per-repo pieces keep agreeing on the contracts at each seam. This page is the coordination point (weaver-spec issue #82) so the counterparts do not drift into incompatible shapes.


The canonical sequence

Each step names the contract that crosses the boundary into the next step. The contract shapes are defined in contracts/json/ (Core) and contracts/json/extended/ (Extended).

  1. contextweaver routes — compiles context and emits a RoutingDecision carrying ChoiceCards. (Core: RoutingDecision, ChoiceCard, SelectableItem)
  2. ChainWeaver executes — for multi-step work, sequences the flow but delegates every tool invocation to the execution layer (invariant I-07). (Extended: ExecutionRoutingDecision / CompiledFlow where a learned router is involved; otherwise Core RoutingDecision per step.)
  3. agent-kernel gates — validates a CapabilityToken, records a PolicyDecision (allow/deny), then executes behind the firewall and returns a Frame (+ Handle) — never raw output (invariants I-01, I-02, I-05). (Core: CapabilityToken, PolicyDecision, Frame, Handle)
  4. AgentFence external gate — an optional external policy firewall/proxy that can allow/deny/ask at the boundary before the call reaches the tool. It complements, and does not replace, the agent-kernel firewall. (Shared policy vocabulary — tracked in #78, not yet a contract.)
  5. Traces — agent-kernel appends TraceEvents; a complete request can be gathered into a TraceBundle (tamper-evident audit chain). (Core: TraceEvent; Extended: TraceBundle)
  6. lessonweaver learns — consumes findings/failures (the canonical interchange: FailureCaseArtifact referencing a TraceBundle) and reviews them into reusable knowledge. (Extended: FailureCaseArtifact, ReviewArtifact)
  7. Skill cards back into contextweaver — reviewed LessonCard / SkillCard artifacts re-enter routing as applicable guidance, closing the loop. (Extended: LessonCard, SkillCard)

The routing-to-execution phases (steps 1–3, 5) are the normative request path defined in docs/LIFECYCLE.md. Steps 4, 6, and 7 are adjacent and optional: a minimal request stops after the trace is captured.

See the Mermaid renderings in SEQUENCE_DIAGRAMS.md (notably "Full Stack") for the runtime portion of this path.


Per-step contract dependencies

StepProducerConsumerContract(s) at the seamTier
1contextweaverChainWeaver / agent-kernelRoutingDecision (+ ChoiceCard, SelectableItem)Core
2ChainWeaveragent-kernelper-step RoutingDecision; ExecutionRoutingDecision / CompiledFlow when routedCore / Extended
3agent-kernelcaller / contextweaverCapabilityToken, PolicyDecision, Frame, HandleCore
4AgentFenceagent-kernel / hostshared Policy + safety-class vocabularyExtended (proposed)
5agent-kernelaudit / lessonweaverTraceEvent, TraceBundleCore / Extended
6any producerlessonweaverFailureCaseArtifact, ReviewArtifactExtended
7lessonweavercontextweaverLessonCard, SkillCardExtended

Cross-repo counterpart checklist

Status reflects the weaver-spec side only; the runtime/adjacent implementations live in their own repositories and track their own counterparts.

Concernweaver-spec pieceStatus (spec side)Counterparts
Closed learning loopFailureCaseArtifact + TraceBundle as canonical interchange (#83)Contracts shipped; interchange finalized + producer mappings documentedlessonweaver#91, vibeguard#120, agentfence#77, ChainWeaver#210
Firewall / Frame seamI-05 clarified + boundary section + ADR 002 (#84)Documented; static-checkable portion under I-01contextweaver#352, agent-kernel firewall
Shared policy contractPolicy + safety-class contract (#78)Proposed (not yet a contract)agentfence#76, agent-kernel policy
End-to-end golden-path demorunnable examples/reference_impl/Core path shippedcontextweaver#353, lessonweaver#92, ChainWeaver examples

Note

This checklist is maintained as the counterpart issues land. It is a status view, not a contract; a row going stale here never changes what an invariant or boundary requires.