§12 Projections
Normative rules for how a pack appears on other surfaces: CLI grammar, the two host tool shapes, the four-faces rule, and export to MCP or A2UI.
A projection is a view of a pack on some surface. Projections MUST NOT add, remove, or alter Policy, Binding, or Principal semantics, and MUST NOT add commands the pack does not declare.
12.1 CLI#
- A pack's CLI face SHOULD follow
<bin> <space> [<sub…>] [--flags] [--json]. - Every command SHOULD emit structured output when
--jsonis present and MUST exit non-zero on failure. - Health and Binding commands (
doctor,status,login,connect,whoami) SHOULD be first-class spaces, not flags on other commands. - Verbs SHOULD be
readby default;--apply/--confirmSHOULD mark a write. - Selectors (
--entity,--account,--pool) MUST refine within the Principal's resolved scope; they MUST NOT select tenant (§9.2). - A CLI face MUST NOT prompt interactively when invoked by an agent.
doctorandstatusSHOULD exit0when healthy,2on a warning, and1on failure.- A CLI with an installer SHOULD expose it as the family
setup.status(read, idempotent: what is installed and linked),setup.apply(write; runs without prompts for an agent Invoker), andsetup.update(write; refreshes the Skill after a pack upgrade). - Health commands are
readand MUST NOT mint long-lived credentials.
12.2 Host tools#
A host projects packs into a tool-calling model in one of two shapes.
- A host whose agent can run shell commands SHOULD expose a single tool, or the
runtime's binary itself (
hcpxin the reference), that forwards argv to a runtime (hcpx exec <pack_id> <verb_key> -- k=v …), together with a Skill that teaches it. Activating a pack MUST NOT require the host to register additional tools. - A host that runs an in-process tool loop MAY instead expose one tool per
executable command. Such tools SHOULD be named
<pack_id>__<verb_key_with_dots_as_underscores>(for examplemail__mail_list). - A host SHOULD expose
hcp__read_skill(or equivalent) returning the full Skill for a pack, so that the system prompt may carry only leads (§5.3). - Tool descriptions SHOULD carry
operation,land, andconfirmso that the model can distinguish reads from writes. - A host MUST route every tool call through a runtime that implements §6.3. A
host MUST NOT execute
wrap.binitself. - A host MUST filter the projected tool set by the Principal's grants.
12.3 Generated surfaces#
Informative. The reference hcpx generate produces, from activated packs:
a stable system-prompt block, a tool list per §12.2, a set of Skill copies, and
each host's own configuration (an MCP server entry, a plugin file, or in-process
tool definitions). hcpx adopt <host> --write writes them where that host
reads its configuration.
12.4 Four faces#
The same command MUST be nameable consistently on four faces:
| Face | Form |
|---|---|
| Wire | verb_key (plan) |
| CLI | cli[] (transit plan {{from}} {{to}}) |
| Host tool | hcpx exec transit plan, or transit__plan in-process |
| Skill | Hot-path table row plan |
- Runtimes SHOULD lint drift among these faces.
- Renaming a command on one face without the others is a breaking change (§13).
12.5 Export to other protocols#
- A runtime MAY export a pack's commands as MCP tools, A2UI components, OpenAPI
operations, or any other surface. The reference MCP export is a single tool
named
hcp(§12.2.1). - An export MUST preserve the pack as the unit: one pack → one exported group.
- An export MUST route invocations back through a runtime that implements §6.3; an export MUST NOT reimplement Policy or Binding.
- An export MUST NOT be the install unit. Installing the export MUST NOT substitute for installing the pack.
- Sense MUST NOT be exported as a tool the model can call to "poll".
12.6 What a projection may drop#
A projection MAY omit commands the Principal cannot execute and MAY omit the
hcp protocol metadata. A projection MUST NOT omit confirm markers on
gated writes.