A small graph engine for persona × SoT × workflow context routing. Wire
turns a runtime Specification over a property graph into a rendered
string (Prompt / Markdown / JSON / ASCII) by binding it to a registered
template — the ProjectionAsPrompt pattern — and concatenates one or more
such renderings into a wake-time prompt context.
The crate's Rustdoc is the source of truth for design and API.
- Onboarding (end-to-end how-to) — [
docs/onboarding.md][onboarding]. Walks through install → wiring entries → Specification / NamedProjection registration → optional persona-pack overlay →wire_prompt_contextsmoke-test → Skill / Prompt wiring. The same document is also bundled into the MCP server as the resourcewire-guide://onboarding, so a client canread_resourceit without leaving the session. - Crate docs (architecture, layer split, render / prompt-context flow,
persistence schema): the
//!block at the top ofpersona-wire-core/src/lib.rs. Run locally withcargo doc --workspace --open -p persona-wire-core, or read the published docs at https://docs.rs/persona-wire-core/. - Concept seed (archived, early narrative):
docs/_archive/concept-2026-06-14.md. The current design SoT is the crate Rustdoc — the early concept doc is kept as a historical reference for the P0 framing. - MCP tool surface: published docs for
persona-wire-mcp. - CLI subcommands:
persona-wire --help(orpersona-wireon docs.rs).
persona-wire/
├── Cargo.toml # workspace root
└── crates/
├── persona-wire-core/ # Domain + Application + Infrastructure (transport-agnostic)
├── persona-wire-adapter-mini-app/ # external Adapter for `mini-app://` SoT scheme
├── persona-wire-adapter-sqlite-x/ # external Adapter for raw `sqlite://` SoT (Fly.io / single-binary)
├── persona-wire-mcp/ # rmcp server library (exposes serve_stdio())
└── persona-wire/ # unified bin (clap CLI + `mcp` subcommand dispatch)
| Layer | Where | Contents |
|---|---|---|
| Surface | mcp / cli |
MCP Tool surface, clap subcommands |
| Application | core::application |
Use cases; SpecRegistry (dynamic) and ProjectionRegistry (named) read model; MergeStrategy; persona-pack overlay resolver |
| Domain Core | core::domain |
Node / Edge / composable Specification / autoversion / repository trait (in domain::graph); first-class persona vocabulary Wiring / Workflow / Projection / ContextWiring + Value Objects PersonaId / Slot / Source / SpecRef / TargetForm (in domain::entity); Hexagonal Driven Port ProjectionRenderer (in domain::port) |
| Infrastructure | core::infrastructure |
SQLite storage, handlebars rendering, Layer 6 SoT Adapter (file: via std::fs; mini-app:// via the external persona-wire-adapter-mini-app crate; sqlite:// via the external persona-wire-adapter-sqlite-x crate) |
Two complementary query axes, both first-class:
- Dynamic axis — inline
Specificationevaluated on demand (wire_query). Good for ad-hoc filters. - Fixed axis —
NamedProjection = (spec_ref, template, target_form)registered by name (wire_render,wire_prompt_context). Good for stable surfaces like wake-time injection.
Diagnostic surface:
wire_doctor— 2-axis integrated health report: axis 1 graph connectivity + axis 2 workflow coverage. Both axes are evaluated through the internalapplication::doctor::probesregistry (graph_*/workflow_*Probes) and emitted as a structured JSON response (graph_check/workflow_checksub-objects +findings[]with Severity). Top-level backward-compatible flat fields (orphan_node_count/total_node_count/total_edge_count) are retained as mirrors ofgraph_check.*. Earlier 0.3.x exposedwire_graph_check/wire_workflow_checkas standalone MCP tools; both were retired in 0.4.0 and folded into thewire_doctorProbe registry.
There is no hard-coded projection list in the crate — every projection
is data, registered through ProjectionRegistry. Optional template
overlays per persona live in persona-pack
([extra.persona_wire.projections.<axis>]) and are folded in via
MergeStrategy (Replace / Append / Prepend / Section(name)).
For the full layer-by-layer description, the persistence schema, and the render / prompt-context flow diagrams, see the crate Rustdoc above.
cargo check --workspace
cargo build --workspace
cargo test --workspace
cargo doc --workspace --open -p persona-wire-core # browse the design docs# CLI
cargo run -p persona-wire -- init --db /tmp/wire.db
# MCP server (stdio transport) — `mcp` subcommand dispatches into persona-wire-mcp::serve_stdio
cargo run -p persona-wire -- mcpDual: MIT OR Apache-2.0.