Standalone contract layer for the Hanuman platform.
  • Shell 62.1%
  • Go 37.9%
Find a file
Meka Reddy 9ccd6ec353 Initial commit: A1 reorg materialization
Migrated from prior 19-repo workspace per
platform/docs/wip/workspace-reorg/A1-implementation-target.md.
See platform/docs/wip/workspace-reorg/A1-implementation-phases.md
for the 5-phase materialization sequence.
2026-05-08 02:51:36 -05:00
contracts Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
directives Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
index Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
openapi Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
pattern-library Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
pkg Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
policy Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
schemas Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
state Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
tools Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
AGENTS.md Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
AI_CONTEXT.md Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
CHANGELOG.md Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
go.mod Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
hanuman-module.json Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
MODULE_CONTRACT.md Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
README.md Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00
VERSION Initial commit: A1 reorg materialization 2026-05-08 02:51:36 -05:00

Hanuman Machine Protocol

Standalone contract layer for the Hanuman platform. Owns the schemas, specs, OpenAPI surfaces, OPA policy bundles, transport contracts, and generated Go bindings that every other repo consumes.

This repo depends on nothing in the workspace and is depended on by everything: platform/, verticals/, portal-build/, and portal-operations/ all import git.hanumanapps.io/hanuman/machine-protocol.

Layout

machine-protocol/
├── VERSION                 # semver tag (currently v0.1.0)
├── CHANGELOG.md
├── go.mod                  # git.hanumanapps.io/hanuman/machine-protocol
│
├── contracts/              # Human-readable specs (markdown)
│   ├── L1-intent-envelope.md
│   ├── L2-outcome-envelope.md … L10-self-evolution-surface.md
│   ├── event-bus-contract-v1.md
│   ├── federation-and-multi-tier.md
│   ├── worker-stdio-contract-v1.md
│   ├── architecture/       # system architecture / overview / runtime flow
│   ├── current/            # current contract architecture snapshot
│   └── design/             # detailed design notes per component
│
├── schemas/                # JSON Schemas (machine-validated wire format)
│   ├── 00-core/ … 90-learning/   # categorized contracts (specs + .schema.json)
│   ├── examples/                 # example payloads
│   ├── checklists/, manifests/
│   └── contracts-index.json
│
├── policy/                 # OPA Rego bundles (governance-resolver consumes)
├── transport/              # transport conventions (placeholder; populated incrementally)
├── openapi/                # cp-core, cp-api, portal HTTP specs (placeholder)
├── directives/             # operational directives (placeholder)
├── index/                  # workspace topology index
├── state/                  # platform state snapshots referenced by contracts
├── pattern-library/        # reusable engineering patterns
├── tools/                  # contract-layout and capacity validators
└── pkg/                    # Generated Go bindings (l1, l2, l5, eventbus, policy)

Versioning

Tagged releases follow semver:

  • MAJOR — breaking schema or contract change
  • MINOR — backward-compatible additions
  • PATCH — spec clarifications / doc fixes

Pre-release versions live under v0.x.y until the first stable release.

Ownership

This repo owns:

  • Repo ownership and boundary contracts
  • Workspace topology contracts
  • Status enums and shared vocabulary
  • Request / result schemas
  • Worker evidence / result contracts
  • Architecture guardrail policy
  • Contract indexes and contract validation tooling

It does not own runtime behavior, orchestration loops, worker execution loops, HTTP server behavior, or UI presentation. Those live in platform/, verticals/, and the portal repos.

Validation

Contract-layout validation lives under tools/:

  • tools/validate-contract-layout.sh — checks required contracts/ subdirectories and authority files
  • tools/run-decision-packet-precheck.sh — preflight for decision-packet schemas
  • tools/decision_packet_capacity_validator.go — capacity validator
  • tools/generate-transaction-boundary-review-pack.sh — review-pack builder

Workspace-layout validation against this contract lives in platform/tools/workspace-control/ (via hanuman validate).

Key documents

  • contracts/L1-intent-envelope.md through L10-self-evolution-surface.md
  • contracts/event-bus-contract-v1.md
  • contracts/federation-and-multi-tier.md
  • contracts/architecture/system-architecture-overview.md
  • contracts/design/machine-protocol-detailed-design.md
  • pattern-library/README.md