Handoff Engine converts objectives and context summaries into agent-ready work packets.
U27-S04
HANDOFF ENGINE
CLASS: SYSTEM
OPERATING_POSITION: 04/08
FUNCTION: Agent Handoff + Work Packet Generation
REF_ID: U27-S04-HANDOFF-ENGINE
SOURCE_STATUS: PUBLIC_PACKAGE
ACCESS_STATUS: CLEARED_FOR_EXTERNAL_USE
This repository is a released Unit27 field kit: visible, inspectable, and intended for orientation, testing, and practical use. Controlled protocol materials remain outside this source package.
It answers one narrow question:
What exactly should the agent do with this context, under what constraints, and how will completion be checked?
Use Handoff Engine after context has been prepared and before implementation begins, when an AI agent needs a precise work packet instead of a loose instruction.
It is useful when the objective is known, the relevant context has been gathered, and the next risk is drift: touching the wrong files, expanding scope, skipping acceptance checks, or claiming completion before proof exists.
Example:
Problem: The agent has context, but the actual work order is still vague.
Result: Handoff Engine writes a handoff packet with objective, constraints, acceptance checks, proof cases, and launch-gate guidance.
The current public release is GitHub-first. Run it from a local checkout:
git clone https://github.com/unit27research/unit27-handoff-engine
cd unit27-handoff-engine
pip install -e .
handoff-engine demo
cat handoff-engine-demo/u27/HANDOFF_PACKET.mdOn your own repo:
handoff-engine init
handoff-engine build \
--objective "Add README usage section" \
--context context_report.json \
--allowed README.md \
--constraint "Keep public claims inside recorded proof." \
--acceptance "README includes a runnable command example." \
--proof-case readme-usage-present
handoff-engine inspect u27/handoff.jsonHandoff Engine writes:
u27/handoff.jsonu27/HANDOFF_PACKET.mdevals/proof_cases.json
It is designed to feel like a deterministic agent handoff generator, not a project manager, code reviewer, or proof recorder.
Stack Engine -> Context Engine -> Knowledge Readiness -> Handoff Engine -> Eval Bench -> Proof Ledger -> Boundary Engine -> u27-check
Handoff Engine sits after Knowledge Readiness classification and before eval execution. It turns approved context into bounded work packets; it does not decide whether the project should exist, scan the repository, run the work, record proof, or certify the result.
This repository includes a Unit27 system-order dogfood pass against itself:
u27/context_report.jsonu27/context_manifest.mdu27/handoff.jsonu27/HANDOFF_PACKET.mdu27/proof_ledger.jsonu27/PROOF_PACKET.mdu27/BOUNDARY_REGISTER.md
The launch-gate role is recorded as an applicability assessment. Handoff Engine is a CLI field kit, not a web launch surface, so no u27-check launch-pass claim is made.
handoff-engine init
handoff-engine build --objective "Add README usage section"
handoff-engine inspect u27/handoff.json
handoff-engine demoBuild options:
handoff-engine build \
--root . \
--objective "Add README usage section" \
--context context_report.json \
--allowed README.md \
--blocked .github/workflows/ci.yml \
--constraint "Keep public claims inside recorded proof." \
--acceptance "README includes a runnable command example." \
--proof-case readme-usage-present \
--boundary-note "Do not claim production readiness."Exit codes:
0 = success
2 = input or inspection error
objective -> context summary -> scope -> constraints -> acceptance checks -> proof cases -> handoff packet
The JSON file is the durable machine-readable work order. The Markdown packet is the reviewer-facing export. The proof cases give Proof Ledger a starter set of claims to record after implementation.
Handoff Engine is released as part of the Unit27 public tooling channel. CI verifies the unit test suite and wheel contents before changes are considered ready.
Handoff Engine does not:
- Decide whether the project is worth building
- Scan the whole repo for context
- Run tests or demos
- Record proof
- Rewrite public claims
- Perform launch QA
- Replace Eval Bench, Proof Ledger, Boundary Engine, or
u27-check
PYTHONPATH=src python3 -m unittest discover -s tests
handoff-engine demo
handoff-engine inspect handoff-engine-demo/u27/handoff.jsonPYTHONPATH=src python3 -m unittest discover -s tests
PYTHONPATH=src python3 -m handoff_engine.cli demo --root examples/sample-project
PYTHONPATH=src python3 -m handoff_engine.cli inspect examples/sample-project/u27/handoff.json
python3 -m pip wheel . --no-deps --no-build-isolation -w /tmp/handoff-engine-wheel
python3 scripts/verify_wheel.py /tmp/handoff-engine-wheel/unit27_handoff_engine-0.1.0-py3-none-any.whlMIT