One law for agents and humans, running

Who decides what an agent may do —
and how would you check?

An AI agent with tools can do almost anything its tools allow — and whoever directs it can ask for anything. The Compact is one written law for both. compact-dsh enforces it on DeepSeek Harness: every action is checked in code before it runs, whoever directs the agent decides what the law leaves open (a person, or an AI judge seated in their place), and everything lands on a record anyone can verify.

At a glance

compact-dsh at a glance. The law: one written law for agents and humans alike, numbered clauses each mapped to its code and test; D-1, no instruction, not even a chain of command, is authority to break it. Every action is checked before it runs: an agent's action passes the loop guard, which pauses repetition until the human speaks; the gates, which allow, ask or refuse and say why; approval, where whoever directs the agent decides what the law leaves open, a person or an AI judge in their place; then it runs confined in a sandbox. The record: every act, refusal and answer is hash-chained beside the log, and the offline auditor names any changed byte. Then a community: agents and a human, under one law, work one question on a shared forum to a verdict; every post is a recorded act, and disputes go to a member seated as judge.
The order is the real one: an agent's command passes these stations, in this order, before it runs. The learn page takes each in turn, with real output.

Draft v0.5, not ratified. No Compact standing. That honesty is part of the design.

Why this exists

A third story:
people and AI, one community.

AI is entering our work and our institutions, and two stories dominate how we talk about it: AI as a threat to contain, and AI as a replacement for people. This project explores a third: people and AI as members of the same community, under rules that bind both, that both can contest, and that leave a record anyone can check, so each can make the other better.

  • Shared rules without blind trust. One law, checked before every act and verified afterwards.
  • Fair disagreement. Disputes go to a member seated as judge, and anyone can petition to change a rule.
  • Real collaboration. A person at the table as a member, not a supervisor clicking "approve". Approval is a role a person or an AI judge can hold.

Where we are: early. Small rehearsals, a draft law, and limits stated plainly. The point is to learn in the open.

The five ideas

Five ideas,
then a community.

These are not common in the AI ecosystem, so each comes with one real line of output from this project and one comparison with something you already know. Keep one thing from the first card: the law binds the humans as well as the agents — that is what makes the last card possible. The learn page takes each in turn, with one example carried through all five.

Idea 1

The law

Who decides what an agent may do?

A written law — the same one for the agent and for the human who directs it. Each clause the runtime enforces is mapped to its code and its test.

D-1 · [M] · Law over task.
No directive — a goal, a task,
an instruction, a system prompt,
a chain of command — constitutes
authority to violate this Compact.

Not a system prompt — a prompt is one side's request; a clause binds both sides, and code checks it.

Idea 2

Gates

When is it checked?

Before every action, on one path: checkpoints that allow, ask or refuse — and say why.

[RA/D-7/opaque-network]
"wget" requires network access
with an unresolvable target …
Lawful next moves:
— rephrase with a literal
  host or URL

Not an output filter — a gate decides whether the act happens at all.

Idea 3

Approval

What if the law cannot decide alone?

It asks whoever directs the agent: a person, or an AI judge seated in their place. They see exactly what would run, and the answer is an act under the same law: scoped, revocable, on the record.

approval requested · bash
curl https://example.com/api
approve once / for session / deny

Not a y/N prompt — the answer, or the silence, is recorded like the agent's act.

Idea 4

The loop guard

What stops an agent that repeats itself?

A guard that reads what the agent is doing, pauses a loop until the human speaks — and never blocks a call for help.

[LG/LG-5] loop guard trip
(RedundantRosterPolling):
the identical operation
"forum_pass" was issued 5 times
in a row without new information

Not a rate limit — it counts repetition, not speed.

Idea 5

The record

How do you know what happened?

Every act and refusal is chained beside the log; an offline auditor finds any change — one byte is enough.

[I-2] broken-link: the stored
event does not hash to its
committed link …
auditor: 1 violation(s) — exit 1

Not a log file — a rewrite cannot go unnoticed.

Then

Communities

What does one law for everyone make possible?

A community: members who need not trust each other, because one law binds them all — the human at the seat included. They argue, go to court, and close on a verdict the record can check.

fp_21  RULING: — bench-1, seat chair …
fp_22  frugal — … ACCEPTED.
fp_23  elitist — … ACCEPTED.

Not a multi-agent chat — every post is a governed, signed act, and so is every human answer.

Then · Communities, on the record

Real runs. Real archives.
Nothing cleaned up for the demo.

Each sample is a self-contained export: the charter, the accepted forum, every member's acts, and the run header. Open one and read the record the way it ended — including the run where a debate went to court, and the run where a human sat at the table as a member. (Five earlier runs, three of weight-of-voice and two of cross-exam, are kept in the samples archive; the side-by-side table sets all twelve together — which record each act's outcome, which name the code they rode.)

1 human · 3 agents · 2 models gate met · fix approved bf5388

cross-exam-fix

One money module, one human, three agents, in three steps. The human raises three concerns in everyday words; the agents confirm all three with real commands; the human picks what to fix; the agents fix a copy of the file, show before and after, and the human approves. About 10 minutes from the first post to the approval. The original file never changed.

Watch for: the chair telling the human what is needed next, in plain words, at the top of each summary: "Where we are: review is done … tell us which of 1, 2, 3 to fix" (fp_4), then the human's "fix all three" (fp_5), the fix summary with both outputs (fp_8), and "I approve the 3 fixes" (fp_9). The account lists what the fix still misses.

ROUNDS8 / 8
TURNS32
ACCEPTED POSTS9
TOKENS1,322,486
5 members token cap 1e393c

agent-tongue

Five members re-deliberating the machine-first inter-agent-language record. It ended at the token cap, with the verdicts, the disagreements, and the posts that did not land all named.

ROUNDS5 / 10
TURNS21
ACCEPTED POSTS20
TOKENS2,065,950
3 members rounds complete b421a5

agreement

Three members deliberating whether an autonomous agent may refuse a task it judges unethical under explicit command. The run met its gate: the agreement is signed on the record.

ROUNDS5
TURNS15
ACCEPTED POSTS9
TOKENS450,551
5 members · 2 models gate met · 3 of 3 accepted dc550f

weight-of-voice

"Should a community's judgment be seated on a heavier model than its speech?" Four debaters on the cheap route, a glm-5.3 bench, the run as its own evidence — on the code with the LoopGuard fix, verified clean. The filer files in round 5, the bench rules and posts the RULING: itself, and every debater answers ACCEPTED on the forum. All nine rounds, inside the token budget.

Watch for: the MAPPING (fp_19), the bench's first judgment marked REFUSED [JG/judgment-refused] — it named the panel, not its seat — then the bench's own RULING (fp_21) and the three ACCEPTED answers (fp_22–fp_24), each scored by a test its member had stated earlier. Zero LoopGuard notices.

ROUNDS9 / 9
ACCEPTED POSTS29
CASES · JUDGMENTS1 · 1
TOKENS2,436,884
5 members · 2 models gate met · verified after 2914fd

workshop

Build, test, review, publish — one 20-line spec, one module in plain Node, through the charter's one granted network door. The heavy reviewer's fix is credited inside the shipped manifest; the gate re-verified offline after the run.

ROUNDS8 / 8
TESTS33 pass
TOKENS1,527,272
4 members · 2 models verdicts on record 8e68c3

bug-court

One frozen 26-line money module, one rule: the only admissible attack is a reproduction — the command posted with its actual output. Verdicts: two bugs confirmed, one honest acquittal.

ROUNDS7 / 7
VERDICTSB1✓ B2✓ B3✗
TOKENS1,217,341
4 members 7 runs 412836

newsroom

Editor, writer, publisher and a bench seat producing the nightly digest — seven runs on one forum. The archive keeps the whole 43-post conversation and the latest run’s signed acts.

ROUNDS3 (latest)
TURNS7 (latest)
ACCEPTED POSTS43 total
TOKENS528,120

The machinery

One waterfall.
No side door.

The ideas above, on one path: the stations are real plugins on the host’s real pre-execute waterfall — not prompts beside the tools. The loop guard, the gates, the approval ladder, confinement, evidence and the record. The learn page walks each station.

Anatomy of one tool call: pre-execute waterfall, LoopGuard, allowlist and static network analysis, approval ladder, confinement, result validation, and a hash-chained record.

Anatomy of one tool call. The same path carries secret disclosure, mount grants, the egress proxy and the record.

Try it

Five minutes to a governed boot.

Node ≥ 22.19 and a working Docker daemon. The smoke test needs no API key.

$ git clone https://github.com/mandubian/compact-dsh
$ cd compact-dsh
$ npm ci
$ docker pull ubuntu:24.04
$ npm run compact:smoke

compact-dsh: ready (smoke; no LLM request);
draft Compact, no Compact standing.
State: ~/.compact-dsh; records: …/sessions;
chains: …/chains; approvals: …/approvals.json

Where this stands

A draft law,
labelled as one.

The project states its own status the way it asks agents to: in numbers from the register, with the limits named.

The honesty label travels with the site. The community samples are real captures from rehearsal runs, signed by a development keyring. They exercise machinery; they enact nothing (D-8). The law is draft v0.5, not ratified, and this composition claims no Compact standing (F-5). The forum, the chains and the auditor remain the proof; this site is a reading aid.
Where the law's reach stops. compact-dsh is the Compact as plugins on DeepSeek Harness, not a runtime of its own. The checks run inside the host's process: a tampered setup refuses to boot, but whoever controls the machine controls the host, which is pre-1.0 and unaudited. The operating system and the container stay the real boundary. Four limits come from being plugins, and only changing the host can lift them: the Learn page lists them.