title: Phase 7a close — agent-registration.v1 contract published date: 2026-06-29 status: Accepted phase: 7a predecessor: docs/decisions/2026-06-29-agentic-layer-projection.md spec: docs/specs/2026-06-29-agent-registration-v1.md
Phase 7a close
Shipped
rocky-hq/contractsPR #6 (merge commit4482860):./agentsubpath landed with seven zod schemas (AgentScope,AgentCapabilityVerb,AgentOwner,AgentApproval,AgentRate,AgentRegistration,AgentHatchEvent) plus two boundary parsers (parseAgentRegistration,parseAgentHatchEvent) following the HEARTH throw-on-invalid pattern (per Phase 5b §5 carry-forward). Taggedv0.3.0(npm) andgo/v0.3.0(Go module proxy) from the same merge commit.- Sibling Go module
github.com/rocky-hq/contracts/go/agentgenerated via the same quicktype pipeline asgo/hearth(Phase 5b). Round-trip tests against shared fixtures undertest/agent/fixtures/. - Build pipeline generalised:
scripts/build-go-bindings.mjsnow iterates aGO_SUBPATHSlist (was hardcoded tohearth);dedupeStructspost-processor replacesdedupeClassPairswith a fixpoint loop + whitespace-normalised body comparison;hoistImportspost-processor moves stray mid-fileimport "..."lines to a single block afterpackage.go-parityCI job extended fromgo test ./hearth/...→go test ./.... - Parent:
contractssubmodule pointer bumped to4482860;CLAUDE.mdSS-00 row refreshed;MILESTONES.mdPhase 7 row admitted asopenwith sub-row 7a closed.
Carry-forwards
1. Phase 7 admitted as the home of the agentic-layer cross-cut
The Phase 7 row in MILESTONES.md was previously titled "Polar.sh entitlements" with state not-started. The predecessor decision (docs/decisions/2026-06-29-agentic-layer-projection.md) folded the agentic-layer cross-cut into Phase 7 rather than inventing Phase 8. This close-out promotes Phase 7 to open and retitles it "Agentic layer + Polar.sh" because the agentic layer and Polar entitlement enforcement now share a single phase: the registration carries rate.tier_floor + rate.seats_required, which become the Polar check input at invocation time. The Polar wiring remains queued under 7c.
2. COUNCIL personas register as agents — precedent locked
The spec resolved the open question from the predecessor decision: COUNCIL personas DO register, with scope: "council", owner.subsystem: "SS-04", capabilities: ["council.respond"], approval.required: false. This sets the project-wide precedent for what counts as an agent: anything that produces work an operator might want to audit, gate, or rate-limit. Static fixtures qualify; dispatched workers qualify; ephemeral one-shots do not. Phase 7b PRs against COUNCIL must emit agent.registered events at persona-creation time and agent.invoked/agent.completed pairs around each response.
3. Closed scope enum — no scope: other
AgentScope is the closed enum council|sniffer|stratt|ralph|relay|driver. Adding a value is a v2 change, never an additive v1 extension. This is the structural enforcement of drift-watch #1 from docs/north-star/intent.md (Rocky is not a generic agent ledger): every agent in the projection must trace back to an existing rocky-hq subsystem. New subsystems can earn a scope entry by clearing the SS-NN bar first.
4. Build-pipeline generalisations are reusable for future subpaths
The quicktype codegen path is now ready to accept additional subpaths without script edits beyond extending GO_SUBPATHS. The fixpoint dedupeStructs catches the duplication pattern that emerges when a top-level schema name matches a parent field name (the Registration / AgentRegistration collision in the agent set); the prior <Name>Class regex only caught quicktype's class-suffix pattern. Future subpaths that introduce similar shapes inherit the fix. hoistImports is similarly defensive against quicktype's occasional out-of-order import emission. Both helpers are reused by go/hearth regen — one cosmetic side effect: go/hearth/types.go flips its import "time" line from single-line to block form. Predictable from the new pipeline; future hearth schema bumps will continue to land in block form.
5. Forward-only projection invariant intact
Per the predecessor decision §consequences, the agentic-layer projection is forward-only — no back-fill of pre-7b agents. Phase 7a only ships the contract; existing COUNCIL/SNIFFER/STRATT/RALPH/RELAY entries do not retroactively appear in the hatch view. The contract is in place for Phase 7b producer wiring; until that ships per subsystem, hatch.devarno.cloud/agents remains empty as expected.
6. Dual-tag convention preserved
v0.3.0 (npm publish driver) and go/v0.3.0 (Go module proxy resolver) were cut from the same merge commit per the convention established in Phase 5b §1. Future contracts bumps must continue to push both tags together; without the go/v* prefix tag, hearth's go get github.com/rocky-hq/contracts/go@<tag> fails with unknown revision.
Phase 7a acceptance verified at merge
npm run typecheck,npm run build,npm run build:schemas,npm run build:goall clean.- Vitest: 54/54 (was 40; +14 agent parser tests).
- Go: both
contracts/go/hearthandcontracts/go/agentpackages green. - CI
build+test+go-parity+pydantic-parityall green on the merge commit (4482860). - Both tags resolved on
npm view @rocky-hq/contracts@0.3.0(GitHub Packages) andgo list -m github.com/rocky-hq/contracts/go@go/v0.3.0(Go module proxy).
Out of scope (Phase 7b / 7c)
- 7b — Producer wiring per subsystem. One PR per SS-NN: RALPH (
agent.invokedon run submit,agent.completedon run terminal state), RELAY (executor invocations), COUNCIL (persona registration +council.respondinvocations), SNIFFER (analyzer runs), STRATT (strategy entries), HEARTH (driver-invocation events). Mechanical — uses the provenemitHatch()shape (console/src/lib/ralph/hatch.ts:6). - 7c —
hatch.devarno.cloud/agentsconsumer wiring; Polar entitlement → RATE column. Sits in devarno-cloud, not in rocky-hq. - Airlock
agent.approveverb — referenced byapproval.airlock_verbinAgentRegistration. Lands in the airlock submodule as a parallel 7a track. Until then,approval.required: trueregistrations render in hatch withAPPROVAL: pendingand producers must locally gate.
Sources
docs/decisions/2026-06-29-agentic-layer-projection.md— predecessor decision (no new citizen; HATCH projection; folds into Phase 7).docs/specs/2026-06-29-agent-registration-v1.md— wire-format spec.docs/decisions/2026-05-25-phase-5b-close.md§1 — dual-tag convention; §5 — HEARTH-throw parser pattern.docs/north-star/intent.mddrift-watch #1 — closed-enum scope justification.rocky-hq/contractsPR #6 (merge4482860); tagsv0.3.0+go/v0.3.0.