Micro-harnesses, macro-harnesses and capability registry
Status: normative · Owns: reusable functional contracts and DAG composition.
Vocabulary without product sprawl
A micro-harness is a single bounded task capability (e.g. parse a log, redact metadata, create an index, run a model, verify an artifact). A macro-harness is a graph of these units (e.g. analyze a permissioned document collection). The unified harness organizes them; they are not separate services the customer must purchase or configure individually. Bot families and fleets are optional internal grouping metadata, never an excuse to duplicate policies or authority.
Required micro contract
Every released micro declares: immutable ID, semantic version, content digest, owner, purpose, allowed data classes, typed input/output JSON Schemas, deterministic error codes, declared effects, constraints, dependencies, runtime/model artifact identity, resource minimums, sandbox environment, idempotency key, timeout, retry rules, quality oracle, positive and negative fixture references, measured limits, license/retention and revocation state. Undefined effects MUST be rejected. A static PHP rule has effects: [] unless a reviewed policy explicitly says otherwise; its claims are bounded by matching rules.
Required macro contract
Every macro declares a DAG of pinned micro releases, schema-compatible port edges, error/cancellation policy, checkpoints, owner scope, maximum expense, quality aggregation method, human review gates and a way to resume. Graphs MUST be acyclic unless a loop primitive explicitly enforces iteration bounds and an independent stop. Topological ordering does not automatically convey secrets or privileges.
Example:
permissioned_file → validate_mime [S1] → extract_text [S1]
└→ infer_missing_fields [M1 only if needed]
→ compare_with_schema [S1] → quality_gate [S1] → save_evidence → release_rental
The same extractor may run in a second macro, but its input policy and a new owner's permissions are independently verified. Reusing a micro is code reuse, not authorization inheritance.
Lifecycle and provenance
draft → quarantined → schema_valid → tested → reviewed → signed → available → deprecated/revoked. A proposal or download is not an installation; an installation is not a deployment. A revoked dependency invalidates affected macros until reviewed and rebuilt. A capability registry record MUST contain transitive dependencies and a signed release manifest. Explicit reversibility is required for every promotion.
Runtime adapter boundary
PHP decides which approved contract to execute; isolated CLI/Python/GPU workers implement the selected operation. Worker results return typed blobs, attested revisions, metrics and bounded stderr—not PHP source evaluated on the host. Model output may populate data candidates but must never be interpreted by PHP eval, shell string interpolation, or direct SQL fragments.
Community submissions
An external harness enters quarantine. License, code signature, SBOM, dependency digests, malware scans, effect review, tests and individual owner consent are required before enablement. Package names may be friendly; authority remains scoped to exact immutable releases.
Related
Execution · Trust · Capture · Data model.