@astrosheep/keiyaku 2.9.9 → 2.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -174
- package/build/.tsbuildinfo +1 -1
- package/build/agents/harness/control-types.js +18 -1
- package/build/agents/harness/index.js +2 -0
- package/build/agents/harness/outcome-error.js +81 -0
- package/build/agents/harness/projection.js +2 -1
- package/build/agents/harness/router.js +5 -1
- package/build/agents/providers/claude-agent-sdk/adapter.js +18 -4
- package/build/agents/providers/claude-agent-sdk/registration.js +11 -1
- package/build/agents/providers/claude-agent-sdk/session.js +19 -5
- package/build/agents/providers/codex-app-server/adapter.js +11 -6
- package/build/agents/providers/codex-app-server/events.js +67 -6
- package/build/agents/providers/codex-app-server/registration.js +11 -1
- package/build/agents/providers/opencode-sdk/adapter.js +8 -1
- package/build/agents/providers/opencode-sdk/events.js +24 -2
- package/build/agents/providers/opencode-sdk/registration.js +11 -1
- package/build/agents/providers/pi/checkpoint.js +9 -1
- package/build/agents/providers/pi/events.js +2 -0
- package/build/agents/providers/pi/registration.js +14 -1
- package/build/cli/commands/akuma/akuma/handler.js +1 -1
- package/build/cli/commands/akuma/akuma/meta.js +3 -3
- package/build/cli/commands/akuma/catalog.js +2 -2
- package/build/cli/commands/akuma/{view → show}/handler.js +5 -5
- package/build/cli/commands/akuma/{view → show}/meta.js +3 -3
- package/build/cli/commands/akuma.js +1 -1
- package/build/cli/commands/contract/amend/handler.js +5 -4
- package/build/cli/commands/contract/arc/handler.js +5 -4
- package/build/cli/commands/contract/audit/handler.js +2 -2
- package/build/cli/commands/contract/bind/handler.js +12 -3
- package/build/cli/commands/contract/bind/meta.js +45 -15
- package/build/cli/commands/contract/forfeit/handler.js +9 -5
- package/build/cli/commands/contract/log/handler.js +2 -2
- package/build/cli/commands/contract/petition/handler.js +34 -7
- package/build/cli/commands/contract/renew/handler.js +7 -7
- package/build/cli/commands/contract/renew/meta.js +3 -3
- package/build/cli/commands/metadata.js +10 -6
- package/build/cli/commands/projection/call/meta.js +1 -1
- package/build/cli/commands/projection/catalog.js +2 -0
- package/build/cli/commands/projection/history/handler.js +21 -0
- package/build/cli/commands/projection/history/meta.js +9 -0
- package/build/cli/commands/projection/shared.js +3 -4
- package/build/cli/commands/projection/status/handler.js +3 -3
- package/build/cli/commands/projection/wait/handler.js +20 -11
- package/build/cli/commands/task/add/handler.js +14 -5
- package/build/cli/commands/task/add/meta.js +2 -2
- package/build/cli/commands/task/catalog.js +4 -0
- package/build/cli/commands/task/done/handler.js +1 -4
- package/build/cli/commands/task/done/meta.js +1 -1
- package/build/cli/commands/task/drop/meta.js +1 -1
- package/build/cli/commands/task/hold/handler.js +3 -0
- package/build/cli/commands/task/hold/meta.js +8 -0
- package/build/cli/commands/task/log/handler.js +1 -1
- package/build/cli/commands/task/log/meta.js +2 -2
- package/build/cli/commands/task/resume/handler.js +3 -0
- package/build/cli/commands/task/resume/meta.js +8 -0
- package/build/cli/commands/task/shared.js +39 -14
- package/build/cli/commands/task/show/handler.js +1 -1
- package/build/cli/commands/task/show/meta.js +1 -1
- package/build/cli/commands/task/start/meta.js +1 -1
- package/build/cli/commands/task/stop/handler.js +1 -4
- package/build/cli/commands/task/stop/meta.js +1 -1
- package/build/cli/commands/task/update/handler.js +11 -3
- package/build/cli/commands/task/update/meta.js +3 -3
- package/build/cli/completion.js +3 -2
- package/build/cli/flags.js +51 -14
- package/build/cli/help.js +4 -1
- package/build/cli/index.js +40 -25
- package/build/cli/parse-flags.js +40 -7
- package/build/cli/parse-metadata.js +5 -2
- package/build/cli/parse-selectors.js +2 -3
- package/build/cli/parse.js +40 -6
- package/build/cli/projection-address.js +12 -10
- package/build/cli/render/amendment-warning.js +8 -0
- package/build/cli/render/arc.js +6 -2
- package/build/cli/render/audit.js +400 -81
- package/build/cli/render/kanshi.js +6 -1
- package/build/cli/render/lifecycle.js +56 -0
- package/build/cli/render/misc.js +24 -28
- package/build/cli/render/petition.js +5 -0
- package/build/cli/render/projection-activity.js +3 -2
- package/build/cli/render/projection-history.js +64 -0
- package/build/cli/render/shared.js +23 -9
- package/build/cli/render/status.js +9 -16
- package/build/cli/render/task.js +51 -26
- package/build/cli/render/terminal-failure.js +3 -1
- package/build/cli/render/wait.js +3 -5
- package/build/cli/subagent-guard.js +1 -1
- package/build/cli/types.js +1 -1
- package/build/config/env-keys.js +2 -0
- package/build/config/env.js +23 -0
- package/build/config/settings/schema.js +3 -1
- package/build/core/address-carrier.js +89 -0
- package/build/core/addressing.js +255 -196
- package/build/core/amend.js +115 -38
- package/build/core/amendment-criteria.js +17 -0
- package/build/core/amendment-warning.js +10 -0
- package/build/core/arc.js +184 -83
- package/build/core/audit/candidate.js +110 -9
- package/build/core/audit/coordinates.js +120 -65
- package/build/core/audit/evidence.js +19 -23
- package/build/core/audit/facade.js +34 -11
- package/build/core/audit/report.js +5 -5
- package/build/core/bind-reconciliation.js +390 -0
- package/build/core/bind-workspace.js +12 -20
- package/build/core/bind.js +242 -273
- package/build/core/call/call.js +1 -0
- package/build/core/call/context.js +46 -71
- package/build/core/call/prompt.js +6 -3
- package/build/core/context.js +49 -35
- package/build/core/contract-carrier-runtime.js +408 -0
- package/build/core/contract-carrier.js +270 -0
- package/build/core/contract-view.js +33 -27
- package/build/core/contract.js +5 -1
- package/build/core/derived-replay.js +207 -0
- package/build/core/draft.js +125 -57
- package/build/core/forfeit.js +113 -56
- package/build/core/identifier-slug.js +63 -13
- package/build/core/ids.js +4 -4
- package/build/core/lifecycle-history.js +35 -0
- package/build/core/lifecycle-recovery.js +117 -0
- package/build/core/lifecycle-runner.js +377 -0
- package/build/core/log.js +37 -11
- package/build/core/outcome-base.js +181 -0
- package/build/core/process-group.js +139 -0
- package/build/core/projection/generation/database.js +82 -7
- package/build/core/projection/generation/model.js +9 -36
- package/build/core/projection/generation/projection-generation-continuation.js +10 -22
- package/build/core/projection/generation/projection-generation-execution.js +6 -5
- package/build/core/projection/index.js +5 -4
- package/build/core/projection/projection-activity.js +27 -8
- package/build/core/projection/projection-alias.js +23 -10
- package/build/core/projection/projection-core.js +21 -7
- package/build/core/projection/projection-execution-observer.js +91 -39
- package/build/core/projection/projection-history.js +474 -0
- package/build/core/projection/projection-runner-lock.js +12 -0
- package/build/core/projection/projection-status-observation.js +365 -0
- package/build/core/projection/projection-status.js +21 -358
- package/build/core/projection/projection-terminal-failure.js +13 -8
- package/build/core/projection/projection-wait.js +7 -2
- package/build/core/projection/tell/launch-store.js +244 -0
- package/build/core/projection/tell/model.js +3 -3
- package/build/core/projection/tell/store.js +70 -118
- package/build/core/registry.js +22 -87
- package/build/core/renew-build.js +424 -0
- package/build/core/renew-plan.js +239 -0
- package/build/core/renew-rewrite.js +77 -0
- package/build/core/renew.js +295 -520
- package/build/core/repository-ledger/accepted-fold-read.js +19 -0
- package/build/core/repository-ledger/accepted-tail.js +116 -0
- package/build/core/repository-ledger/admission.js +38 -0
- package/build/core/repository-ledger/authoritative-transaction.js +1 -0
- package/build/core/repository-ledger/claim-evidence.js +147 -0
- package/build/core/repository-ledger/codec.js +297 -0
- package/build/core/repository-ledger/current-state-store.js +853 -0
- package/build/core/repository-ledger/fold-repository.js +375 -0
- package/build/core/repository-ledger/fold.js +248 -0
- package/build/core/repository-ledger/git-object-store.js +243 -0
- package/build/core/repository-ledger/history-read.js +15 -0
- package/build/core/repository-ledger/incremental-read.js +153 -0
- package/build/core/repository-ledger/index.js +15 -0
- package/build/core/repository-ledger/inventory-plan.js +75 -0
- package/build/core/repository-ledger/inventory.js +310 -0
- package/build/core/repository-ledger/publication-admission.js +125 -0
- package/build/core/repository-ledger/publication.js +353 -0
- package/build/core/repository-ledger/read-model.js +469 -0
- package/build/core/repository-ledger/transaction-membership.js +78 -0
- package/build/core/repository-ledger/traversal.js +404 -0
- package/build/core/repository-ledger/write-transaction.js +339 -0
- package/build/core/seal.js +168 -161
- package/build/core/settlement/claim-delivery.js +42 -215
- package/build/core/settlement/claim.js +235 -153
- package/build/core/settlement/index.js +4 -4
- package/build/core/settlement/petition-claim-gates.js +52 -33
- package/build/core/settlement/petition-forfeit.js +12 -5
- package/build/core/settlement/petition-head-guard.js +8 -5
- package/build/core/settlement/petition-preview.js +68 -56
- package/build/core/settlement/petition-window.js +50 -0
- package/build/core/settlement/petition.js +252 -131
- package/build/core/settlement/queue-read-model.js +72 -95
- package/build/core/settlement/queue-seat-allocation.js +35 -126
- package/build/core/settlement/queue.js +1 -1
- package/build/core/settlement/settlement.js +172 -80
- package/build/core/settlement/verdict.js +112 -66
- package/build/core/settlement/verification-coordination.js +305 -0
- package/build/core/settlement/verification-supervisor.js +275 -0
- package/build/core/settlement/verification.js +398 -31
- package/build/core/status/board.js +114 -119
- package/build/core/status/lifecycle.js +7 -80
- package/build/core/structured-query.js +23 -0
- package/build/core/target-ref.js +1 -1
- package/build/core/task/board.js +59 -24
- package/build/core/task/commands.js +181 -33
- package/build/core/task/coordinate.js +56 -0
- package/build/core/task/document.js +25 -9
- package/build/core/task/index.js +7 -4
- package/build/core/task/query.js +17 -27
- package/build/core/task/settlement-git.js +164 -179
- package/build/core/task/settlement-policy.js +15 -11
- package/build/core/task/source-board.js +31 -13
- package/build/core/task/task-bind-preparation.js +193 -0
- package/build/core/task/task-contract.js +102 -193
- package/build/core/task/task-file-transaction.js +171 -0
- package/build/core/task/task-git-runtime.js +76 -14
- package/build/core/task/task-git-store.js +68 -169
- package/build/core/task/task-store-repository.js +13 -6
- package/build/core/task/task-worktree.js +6 -33
- package/build/core/task/task.js +1 -1
- package/build/core/task/tree.js +3 -3
- package/build/core/task/validation.js +4 -3
- package/build/core/transcripts.js +93 -1
- package/build/core/worktree-bootstrap.js +44 -36
- package/build/core/worktree-path.js +210 -77
- package/build/flow-error.js +7 -7
- package/build/generated/version.js +2 -2
- package/build/git/core.js +76 -13
- package/build/git/refs.js +168 -46
- package/build/git/streaming-batch.js +73 -13
- package/package.json +1 -1
- package/skills/keiyaku/SKILL.md +1 -1
- package/skills/keiyaku-akuma/SKILL.md +3 -3
- package/skills/keiyaku-task/SKILL.md +4 -2
- package/skills/keiyaku-workflow/SKILL.md +88 -203
- package/build/core/entry.js +0 -305
- package/build/core/ledger-batch.js +0 -194
- package/build/core/ledger.js +0 -84
- package/build/core/projection/leash.js +0 -87
- package/build/core/ref-log.js +0 -119
- package/build/core/renew-session.js +0 -128
- package/build/core/status/ledger-batch.js +0 -1
- package/build/core/status/reconciliation.js +0 -137
package/README.md
CHANGED
|
@@ -1,223 +1,142 @@
|
|
|
1
1
|
# Keiyaku
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
契約 — a contract.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Before You Start
|
|
12
|
-
|
|
13
|
-
Missing any of these? Don't come crying.
|
|
14
|
-
|
|
15
|
-
- **Git repo.** Clean worktree. Dirty = refused.
|
|
16
|
-
- **Supported providers.** `codex-sdk`, `codex-app-server`, `claude-agent-sdk`, `opencode-sdk`, and `pi`.
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Setup
|
|
21
|
-
|
|
22
|
-
Open a git repo. Run `keiyaku guide` and `keiyaku akuma list`. Then use `keiyaku <command> --help` for exact command formats.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Flow
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
bind -> delivery work -> petition
|
|
30
|
-
optional: arc -> delivery work -> arc; renew on base drift
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
---
|
|
5
|
+
Keiyaku is a CLI for coding agents. Not a developer tool with AI features: the
|
|
6
|
+
intended reader of every command, receipt, and error message is a model. If a
|
|
7
|
+
human is typing `keiyaku` by hand, something upstream has already gone wrong.
|
|
34
8
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
keiyaku call worker-akuma "Implement the retry tests. Report touched files and verification."
|
|
41
|
-
keiyaku call worker-akuma - < prompt.md
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
**`tell PROJECTION [--wait DURATION] [--] <BODY|->`** — Writes intent to a projection mailbox. Body is a required literal or `-` for stdin. Ordinary bodies need no `--`; use `--` only when the body looks like an option or address. `tell --wait` joins after acceptance without a mandatory separator.
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
keiyaku tell kaji/3f2a1c99 "run integration first"
|
|
50
|
-
keiyaku tell kaji/3f2a1c99 - < direction.md
|
|
51
|
-
keiyaku tell kaji/3f2a1c99 --wait 5m "run integration first"
|
|
52
|
-
keiyaku tell kaji/3f2a1c99 -- --stop
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
**`revive ARTIFACT [BODY|-]`** — Starts a new helper projection from a retained response artifact. Omit body for the default continuation; pass a literal body or `-` for explicit stdin (blank explicit stdin fails).
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
keiyaku revive rsp_01ARZ3NDEKTSV4RRFFQ69G5FAV
|
|
61
|
-
keiyaku revive rsp_01ARZ3NDEKTSV4RRFFQ69G5FAV "continue with the failing test"
|
|
62
|
-
keiyaku revive rsp_01ARZ3NDEKTSV4RRFFQ69G5FAV - < continuation.md
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
**`akuma list` / `akuma show <name>`** — Inspect available helpers before choosing `keiyaku call NAME`.
|
|
9
|
+
The premise is old. Work you delegate to something more capable than
|
|
10
|
+
accountable should be written down first. So here, a change begins as a
|
|
11
|
+
contract, runs on an isolated branch, and lands only after settlement. The
|
|
12
|
+
workers are called akuma — 悪魔, devils. This is not branding. It is a
|
|
13
|
+
reminder of the failure mode.
|
|
68
14
|
|
|
69
15
|
```bash
|
|
70
|
-
|
|
71
|
-
keiyaku akuma show akuma-codex
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
**`bind`** — Opens a branch and writes `KEIYAKU.md`. Repo must be clean. Bind supplies derived default intent a0.
|
|
77
|
-
|
|
78
|
-
Vague criteria = vague results. Write "make it better" and don't blame anyone but yourself.
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
# Retry logic for HTTP client
|
|
82
|
-
|
|
83
|
-
## Objective
|
|
84
|
-
5xx failures retry up to 3 times with exponential backoff
|
|
85
|
-
|
|
86
|
-
## Scope
|
|
87
|
-
- src/http/**
|
|
88
|
-
|
|
89
|
-
## Checks
|
|
90
|
-
- Retry unit tests pass
|
|
91
|
-
- Public API unchanged
|
|
92
|
-
- Existing tests still pass
|
|
16
|
+
npm install -g @astrosheep/keiyaku
|
|
93
17
|
```
|
|
94
18
|
|
|
95
|
-
|
|
19
|
+
Node ≥ 22.19, inside a git repository, with a clean worktree.
|
|
96
20
|
|
|
97
|
-
|
|
21
|
+
## Shape of a deal
|
|
98
22
|
|
|
23
|
+
```text
|
|
24
|
+
task ─── bind ─── call ─── petition ─── claim
|
|
99
25
|
```
|
|
100
|
-
# Retry backoff
|
|
101
|
-
|
|
102
|
-
## Objective
|
|
103
|
-
Implement retries with exponential backoff.
|
|
104
|
-
|
|
105
|
-
## Brief
|
|
106
|
-
Keep the public API unchanged. Commit the delivery work before sealing the arc.
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
**`petition`** — Seals the current a0 or open explicit arc and enters settlement.
|
|
112
26
|
|
|
113
|
-
`
|
|
27
|
+
`bind` opens a contract — Title, Context, Objective, Design, Scope,
|
|
28
|
+
Criteria — and an isolated branch. A devil honors the letter of the criteria,
|
|
29
|
+
not their spirit; the contract is where precision happens.
|
|
114
30
|
|
|
115
|
-
|
|
31
|
+
`call` projects a devil into the contract's worktree. While it runs: `tell` it
|
|
32
|
+
things, `wait` on it, `kill` it. A finished run leaves an artifact; `revive`
|
|
33
|
+
starts a new devil from one.
|
|
116
34
|
|
|
117
|
-
|
|
35
|
+
`petition` seals the delivery and enters settlement. Gates run, a reviewer
|
|
36
|
+
reads, and then exactly one of two things happens: claim, and it lands on
|
|
37
|
+
main — or forfeit, and the branch is gone. There is no third outcome and no
|
|
38
|
+
quiet one.
|
|
118
39
|
|
|
119
|
-
|
|
40
|
+
## What state looks like
|
|
120
41
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
---
|
|
42
|
+
`keiyaku status` renders the watchtower — 監視, kanshi. This is real output
|
|
43
|
+
from this repository:
|
|
124
44
|
|
|
125
|
-
|
|
45
|
+
```text
|
|
46
|
+
kanshi ─────────────────────────────────────────────────────── 現世 b4c38cc
|
|
126
47
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
| `.keiyaku/draft/*.md` | Recovery input if bind/stdin execution fails |
|
|
131
|
-
| `.keiyaku/response/*.md` | Tool response history |
|
|
48
|
+
keiyaku 2
|
|
49
|
+
□ fridge Add task arrange for atomic existing-task reorganization ▲2 · open 27m
|
|
50
|
+
□ hermitcrab Let task commands select a contract workspace bound 8m
|
|
132
51
|
|
|
133
|
-
|
|
52
|
+
akuma 2
|
|
53
|
+
◆ worker-default/e03addad compose-impl @fridge up 27m · active 2s
|
|
54
|
+
09:12│ told “Root review found contract-significant gaps. Continue …” — 5m12s…
|
|
55
|
+
⋮ 12 more
|
|
56
|
+
09:17│ said “The grouped verifier stream detached again, so I’m rerunning …”
|
|
57
|
+
│ ran $ node --test tests/unit/task-compose.test.ts — 38s
|
|
58
|
+
+ 10 failed · 159 done · 4 killed
|
|
134
59
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
60
|
+
task 120
|
|
61
|
+
▶ P1 centralize-repository-ledger-test-construction … in_progress · active 14h
|
|
62
|
+
▶ P0 windows-common-commands-must-eliminate-git-proc… in_progress · active 3d
|
|
63
|
+
+ 108 ready · 9 blocked
|
|
138
64
|
```
|
|
139
65
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
66
|
+
The rendering is itself under contract. `◆` may only mean a projection asserted
|
|
67
|
+
alive — liveness is never inferred from output freshness. `⋮ 12 more` counts
|
|
68
|
+
exactly twelve omitted rows. Durations are measured, exit codes are real, and a
|
|
69
|
+
command that never finished says `never finished`. An agent parses this screen
|
|
70
|
+
without heuristics because every glyph has one meaning, in writing, in
|
|
71
|
+
[`docs/keiyaku-v3/product/ui-copy.md`](docs/keiyaku-v3/product/ui-copy.md).
|
|
143
72
|
|
|
144
|
-
|
|
73
|
+
## Surface
|
|
145
74
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
75
|
+
| | |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| contract | `bind` `arc` `amend` `renew` `audit` `petition` `forfeit` `log` |
|
|
78
|
+
| devils | `call` `tell` `wait` `kill` `revive` `status` `history` |
|
|
79
|
+
| roster | `akuma list` `akuma show` |
|
|
80
|
+
| tasks | `task add/show/ls/log/start/stop/hold/resume/done/drop/update/doctor` |
|
|
81
|
+
| system | `guide` `completion` `dump-env` |
|
|
152
82
|
|
|
153
|
-
|
|
83
|
+
Conventions an agent can rely on everywhere: a literal `-` selects stdin for
|
|
84
|
+
long bodies; `--json` exists where structure matters; a rejected command names
|
|
85
|
+
the legal grammar instead of guessing intent; `keiyaku <cmd> --help` is the
|
|
86
|
+
single source of syntax.
|
|
154
87
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
| User | `<KEIYAKU_HOME>/akuma/<name>.md` | replaces the same builtin name |
|
|
159
|
-
| Project | `.keiyaku/akuma/<name>.md` | highest |
|
|
88
|
+
Tasks are a file-backed board inside the repository. Dependencies keep their
|
|
89
|
+
distinct meanings — `parent`, `needs`, `supersedes`, `relates-to` — and every
|
|
90
|
+
mutation is validated and micro-committed on its own.
|
|
160
91
|
|
|
161
|
-
|
|
92
|
+
## A devil is one file
|
|
162
93
|
|
|
163
|
-
|
|
94
|
+
Filename is the name. Frontmatter selects the provider. The body is the
|
|
95
|
+
instructions.
|
|
164
96
|
|
|
165
97
|
```markdown
|
|
166
98
|
---
|
|
167
99
|
provider: codex-sdk
|
|
168
|
-
description: Repository implementation agent
|
|
169
100
|
model: gpt-5.4
|
|
170
|
-
|
|
171
|
-
accessPolicy: write
|
|
172
|
-
networkPolicy: disabled
|
|
173
|
-
webSearchPolicy: disabled
|
|
174
|
-
threadOptions.sandboxMode: workspace-write
|
|
101
|
+
description: Repository implementation agent
|
|
175
102
|
---
|
|
176
|
-
|
|
103
|
+
Make scoped changes and run relevant tests.
|
|
177
104
|
```
|
|
178
105
|
|
|
179
|
-
|
|
106
|
+
Providers: `codex-sdk`, `codex-app-server`, `claude-agent-sdk`,
|
|
107
|
+
`opencode-sdk`, `pi`. Resolution is builtin, then `<KEIYAKU_HOME>/akuma/`,
|
|
108
|
+
then `.keiyaku/akuma/`; a higher layer replaces the file whole, never
|
|
109
|
+
field-merges.
|
|
180
110
|
|
|
181
|
-
|
|
182
|
-
|---|---|
|
|
183
|
-
| `codex-sdk` | `description`, `model`, `profile`, `executable`, `effort`, `accessPolicy`, `networkPolicy`, `webSearchPolicy`, `threadOptions.*`, `config.*` |
|
|
184
|
-
| `codex-app-server` | `description`, `model`, `profile`, `executable`, `config.*` |
|
|
185
|
-
| `claude-agent-sdk` | `description`, `model`, `executable`, `effort`, `permissionMode`, `settingSources` |
|
|
186
|
-
| `opencode-sdk` | `description`, `model`, `executable` |
|
|
187
|
-
| `pi` | `description`, `model` |
|
|
188
|
-
|
|
189
|
-
For `threadOptions.*`, JSON values such as arrays and objects are accepted. Keiyaku owns `workingDirectory` and `skipGitRepoCheck`, so profiles cannot set those paths.
|
|
190
|
-
|
|
191
|
-
### Settings
|
|
192
|
-
|
|
193
|
-
Settings select roles and workflow knobs; provider definitions do not belong in settings. Keiyaku loads user settings first and overlays project settings:
|
|
194
|
-
|
|
195
|
-
- User: `<KEIYAKU_HOME>/settings.json`
|
|
196
|
-
- Project: `.keiyaku/settings.json`
|
|
111
|
+
`.keiyaku/settings.json` selects roles and gates, nothing else:
|
|
197
112
|
|
|
198
113
|
```json
|
|
199
114
|
{
|
|
200
|
-
"default": "akuma
|
|
201
|
-
"reviewer": "akuma
|
|
202
|
-
"
|
|
203
|
-
"gate": {
|
|
204
|
-
"commands": [
|
|
205
|
-
{ "label": "tests", "command": "npm", "args": ["test"] }
|
|
206
|
-
]
|
|
207
|
-
}
|
|
115
|
+
"default": "worker-akuma",
|
|
116
|
+
"reviewer": "review-akuma",
|
|
117
|
+
"gate": { "commands": [{ "label": "tests", "command": "npm", "args": ["test"] }] }
|
|
208
118
|
}
|
|
209
119
|
```
|
|
210
120
|
|
|
211
|
-
|
|
121
|
+
## What it writes
|
|
212
122
|
|
|
213
|
-
|
|
123
|
+
| | |
|
|
124
|
+
| --- | --- |
|
|
125
|
+
| `KEIYAKU.md` | the active contract |
|
|
126
|
+
| `.keiyaku/` | devils, settings, task board, response history |
|
|
214
127
|
|
|
215
|
-
```
|
|
216
|
-
keiyaku
|
|
128
|
+
```gitignore
|
|
129
|
+
.keiyaku/draft/
|
|
130
|
+
.keiyaku/response/
|
|
217
131
|
```
|
|
218
132
|
|
|
219
|
-
|
|
133
|
+
## Law
|
|
220
134
|
|
|
221
|
-
|
|
135
|
+
Product and architecture law is registered in
|
|
136
|
+
[`docs/keiyaku-v3/`](docs/keiyaku-v3/README.md). A document is normative only
|
|
137
|
+
if the registry lists it; age, location, and confident prose grant nothing.
|
|
138
|
+
|
|
139
|
+
Keiyaku is early and experimental. Breaking changes are intentional, and the
|
|
140
|
+
current version is the only version.
|
|
222
141
|
|
|
223
|
-
MIT
|
|
142
|
+
MIT.
|