A workshop and validation toolkit for creating a bilateral operating contract between a person and an AI agent.
This is not a published private constitution and it is not a personality prompt. It is a neutral method for deciding:
- who holds which responsibilities;
- how disagreement and uncertainty work;
- when the agent may act autonomously;
- which actions require immediate approval;
- what belongs in memory, skills, or temporary artifacts;
- how failures become amendments rather than repeated apologies;
- how the agreement is ratified, deployed, and reviewed.
working-with-an-agent explains the broader collaboration system. This repository produces and maintains the actual bilateral contract inside that system.
python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/user-machine-constitution init ./my-constitution \
--human "Your name" --agent "Agent name"
.venv/bin/user-machine-constitution check \
./my-constitution/constitution.toml \
--scenarios ./my-constitution/stress-tests.json \
--allow-draft
.venv/bin/user-machine-constitution render \
./my-constitution/constitution.toml \
./my-constitution/constitution.md- Discover: answer the questionnaire independently where useful.
- Draft: encode decisions in the TOML source, not only prose.
- Stress-test: use concrete failure and authority scenarios.
- Reconcile: resolve ambiguous or contradictory clauses.
- Ratify: the human approves; the agent restates operational effects.
- Deploy: place the compact contract in an always-on profile/personality layer.
- Observe: record failures as evidence, not shame.
- Amend: change the correct clause, update the changelog, and rerun tests.
- neutral draft generator;
- machine-readable TOML constitution;
- Markdown renderer;
- structural, privacy, approval-boundary, and stress-coverage checks;
- discovery, ratification, and amendment templates;
- synthetic example involving fictional parties;
- portable
SKILL.mdfor agent-assisted constitution design.
A constitution should be stored in an always-on configuration layer. The skill in this repository teaches how to create and maintain one; it should not be the only place the resulting contract lives.
.venv/bin/python -m unittest discover -s tests -vMIT.