@astrosheep/keiyaku 2.9.10 → 2.9.12
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 +86 -45
- package/build/.tsbuildinfo +1 -1
- package/build/agents/providers/claude-agent-sdk/adapter.js +15 -2
- package/build/cli/commands/contract/bind/meta.js +4 -4
- package/build/cli/commands/metadata.js +3 -2
- package/build/cli/commands/projection/kill/handler.js +4 -5
- package/build/cli/commands/shared.js +1 -1
- package/build/cli/commands/task/catalog.js +2 -0
- package/build/cli/commands/task/compose/handler.js +18 -0
- package/build/cli/commands/task/compose/meta.js +10 -0
- package/build/cli/flags.js +5 -1
- package/build/cli/index.js +11 -6
- package/build/cli/parse-flags.js +21 -21
- package/build/cli/parse-metadata.js +5 -2
- package/build/cli/parse-selectors.js +4 -4
- package/build/cli/parse.js +23 -23
- package/build/cli/projection-address.js +7 -7
- package/build/cli/render/task.js +27 -0
- package/build/cli/types.js +1 -1
- package/build/core/addressing.js +3 -3
- package/build/core/call/context.js +3 -3
- package/build/core/call/prompt.js +1 -1
- package/build/core/contract-view.js +1 -1
- package/build/core/draft.js +51 -22
- package/build/core/projection/generation/model.js +1 -1
- package/build/core/projection/generation/projection-generation-runner.js +13 -3
- package/build/core/projection/generation/transitions.js +10 -0
- package/build/core/projection/projection-history.js +1 -1
- package/build/core/projection/projection-kill.js +5 -4
- package/build/core/projection/projection-runner-lock.js +58 -229
- package/build/core/projection/projection-wait.js +2 -2
- package/build/core/projection/projection-wake.js +2 -0
- package/build/core/repository-ledger/claim-evidence.js +1 -1
- package/build/core/repository-ledger/current-state-store.js +455 -337
- package/build/core/repository-ledger/read-model.js +3 -3
- package/build/core/repository-ledger/write-transaction.js +15 -13
- package/build/core/sqlite-process-lifetime-lock.js +194 -0
- package/build/core/task/compose.js +327 -0
- package/build/core/task/index.js +1 -0
- package/build/core/task/settlement-git.js +69 -26
- package/build/core/task/task-git-store.js +1 -0
- package/build/core/task/task-store-repository.js +1 -0
- package/build/flow-error.js +6 -1
- package/build/generated/version.js +2 -2
- package/package.json +2 -2
- package/skills/keiyaku-akuma/SKILL.md +6 -1
- package/skills/keiyaku-task/SKILL.md +23 -1
- package/skills/keiyaku-workflow/SKILL.md +33 -18
package/README.md
CHANGED
|
@@ -1,50 +1,87 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Keiyaku
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
契約 — a contract.
|
|
4
4
|
|
|
5
|
-
Keiyaku
|
|
5
|
+
Keiyaku is an AI-first CLI: its user is a coding agent. Not a human writing
|
|
6
|
+
specs for an agent to implement — an agent delegating to other agents,
|
|
7
|
+
running the whole loop itself: writing the terms, calling the worker,
|
|
8
|
+
supervising the run, settling the outcome.
|
|
9
|
+
|
|
10
|
+
That is why it is a contract system rather than a spec system. A spec relies
|
|
11
|
+
on someone with judgment reading it charitably; here both the worker and the
|
|
12
|
+
judge are models, and a model honors what you wrote, not what you meant. So
|
|
13
|
+
terms are binding, the worker — an akuma (悪魔, demon) — runs on an isolated
|
|
14
|
+
branch, gates and a reviewer judge the diff against the criteria alone, and
|
|
15
|
+
settlement is mechanical: the change lands on main with a commit-hash
|
|
16
|
+
receipt, or the branch is deleted. No human needs to be in the loop for any
|
|
17
|
+
step; nothing depends on anyone eyeballing anything.
|
|
6
18
|
|
|
7
19
|
```bash
|
|
8
20
|
npm install -g @astrosheep/keiyaku
|
|
9
21
|
```
|
|
10
22
|
|
|
11
|
-
Node ≥ 22.19
|
|
23
|
+
Node ≥ 22.19, inside a git repository with a clean worktree.
|
|
12
24
|
|
|
13
|
-
##
|
|
25
|
+
## One deal, end to end
|
|
14
26
|
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
```
|
|
27
|
+
```bash
|
|
28
|
+
# Write the terms: Title, Context, Objective, Design & Approach, Scope, Criteria.
|
|
29
|
+
# The criteria are read by the letter — precision goes here, not in prompts.
|
|
30
|
+
keiyaku bind - < contract.md
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
# Put an akuma on it. It works alone in the contract's own worktree.
|
|
33
|
+
keiyaku call worker-akuma --detach "fulfill the contract"
|
|
22
34
|
|
|
23
|
-
|
|
35
|
+
# It runs for as long as it needs. You are not its babysitter —
|
|
36
|
+
# but you can be:
|
|
37
|
+
keiyaku wait worker-akuma/3f21ab9e --timeout 10m
|
|
38
|
+
keiyaku tell worker-akuma/3f21ab9e "criteria 3 also covers the CLI output"
|
|
39
|
+
keiyaku kill worker-akuma/3f21ab9e # death is not an error state
|
|
24
40
|
|
|
25
|
-
|
|
41
|
+
# Ask for judgment: gates run, a reviewer akuma reads the diff
|
|
42
|
+
# against the criteria.
|
|
43
|
+
keiyaku petition
|
|
26
44
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
keiyaku status # where you stand, what blocks you
|
|
30
|
-
keiyaku <cmd> --help # exact grammar, no folklore
|
|
45
|
+
# claim → the change lands on main, with a commit-hash receipt
|
|
46
|
+
# forfeit → the branch is deleted; partial fulfillment is forfeiture
|
|
31
47
|
```
|
|
32
48
|
|
|
33
|
-
|
|
49
|
+
Every step appends to the contract's ledger. `keiyaku log` replays any deal,
|
|
50
|
+
finished or dead, from its receipts.
|
|
34
51
|
|
|
35
|
-
|
|
36
|
-
| --- | --- |
|
|
37
|
-
| **Contract** | `bind` `arc` `amend` `renew` `audit` `petition` `forfeit` `log` |
|
|
38
|
-
| **Devils** | `call` `tell` `wait` `kill` `revive` `status` `history` |
|
|
39
|
-
| **Roster** | `akuma list` `akuma show` |
|
|
40
|
-
| **Tasks** | `task add/show/ls/log/start/stop/hold/resume/done/drop/update/doctor` |
|
|
41
|
-
| **System** | `guide` `completion` `dump-env` |
|
|
52
|
+
## The board
|
|
42
53
|
|
|
43
|
-
|
|
54
|
+
`keiyaku status` is the one screen of state. Real output:
|
|
44
55
|
|
|
45
|
-
|
|
56
|
+
```text
|
|
57
|
+
kanshi ─────────────────────────────────────────────────────── 現世 b4c38cc
|
|
58
|
+
|
|
59
|
+
keiyaku 2
|
|
60
|
+
□ fridge Add task arrange for atomic existing-task reorganization ▲2 · open 27m
|
|
61
|
+
□ hermitcrab Let task commands select a contract workspace bound 8m
|
|
62
|
+
|
|
63
|
+
akuma 2
|
|
64
|
+
◆ worker-default/e03addad compose-impl @fridge up 27m · active 2s
|
|
65
|
+
09:12│ told “Root review found contract-significant gaps. Continue …” — 5m12s…
|
|
66
|
+
⋮ 12 more
|
|
67
|
+
09:17│ said “The grouped verifier stream detached again, so I’m rerunning …”
|
|
68
|
+
│ ran $ node --test tests/unit/task-compose.test.ts — 38s
|
|
69
|
+
+ 10 failed · 159 done · 4 killed
|
|
70
|
+
|
|
71
|
+
task 120
|
|
72
|
+
▶ P1 centralize-repository-ledger-test-construction … in_progress · active 14h
|
|
73
|
+
▶ P0 windows-common-commands-must-eliminate-git-proc… in_progress · active 3d
|
|
74
|
+
+ 108 ready · 9 blocked
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Every glyph has exactly one meaning. `◆` is a projection asserted alive —
|
|
78
|
+
never inferred from output freshness. Durations are measured, exit codes are
|
|
79
|
+
real, and an agent parses this screen without heuristics.
|
|
80
|
+
|
|
81
|
+
## An akuma is one Markdown file
|
|
46
82
|
|
|
47
|
-
|
|
83
|
+
Filename is the name, frontmatter picks the provider and model, the body is
|
|
84
|
+
the standing instructions. That's all it takes to make one callable.
|
|
48
85
|
|
|
49
86
|
```markdown
|
|
50
87
|
---
|
|
@@ -55,10 +92,12 @@ description: Repository implementation agent
|
|
|
55
92
|
Make scoped changes and run relevant tests.
|
|
56
93
|
```
|
|
57
94
|
|
|
58
|
-
Providers: `codex-sdk
|
|
59
|
-
|
|
95
|
+
Providers: `codex-sdk`, `codex-app-server`, `claude-agent-sdk`,
|
|
96
|
+
`opencode-sdk`, `pi` — one contract can be worked by any of them, and a
|
|
97
|
+
finished run leaves an artifact that `revive` can continue from, even across
|
|
98
|
+
sessions.
|
|
60
99
|
|
|
61
|
-
`.keiyaku/settings.json`
|
|
100
|
+
`.keiyaku/settings.json` assigns roles and gates:
|
|
62
101
|
|
|
63
102
|
```json
|
|
64
103
|
{
|
|
@@ -68,24 +107,26 @@ Resolution: builtin < `<KEIYAKU_HOME>/akuma/` < `.keiyaku/akuma/` — a higher c
|
|
|
68
107
|
}
|
|
69
108
|
```
|
|
70
109
|
|
|
71
|
-
##
|
|
110
|
+
## And the rest
|
|
72
111
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
| Path | |
|
|
112
|
+
| | |
|
|
76
113
|
| --- | --- |
|
|
77
|
-
| `
|
|
78
|
-
|
|
|
114
|
+
| contract | `bind` `arc` `amend` `renew` `audit` `petition` `forfeit` `log` |
|
|
115
|
+
| akuma | `call` `tell` `wait` `kill` `revive` `status` `history` |
|
|
116
|
+
| tasks | `task add/show/ls/log/start/stop/hold/resume/done/drop/update/doctor` |
|
|
117
|
+
| system | `guide` `completion` `dump-env` |
|
|
79
118
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
.
|
|
83
|
-
```
|
|
119
|
+
`keiyaku task` is a file-backed planning board for work that isn't worth a
|
|
120
|
+
contract yet — typed dependencies, one micro-commit per change, promotion
|
|
121
|
+
into a contract when it's ready.
|
|
84
122
|
|
|
85
|
-
|
|
123
|
+
Conventions hold everywhere: a literal `-` reads stdin for long bodies,
|
|
124
|
+
`--json` where structure matters, and a rejected command states the legal
|
|
125
|
+
grammar instead of guessing intent. State lives in `KEIYAKU.md` (the active
|
|
126
|
+
contract) and `.keiyaku/` (akuma, settings, task board, history).
|
|
86
127
|
|
|
87
|
-
|
|
128
|
+
Full product documentation: [`docs/keiyaku-v3/`](docs/keiyaku-v3/README.md).
|
|
88
129
|
|
|
89
|
-
Keiyaku is early and experimental
|
|
130
|
+
Keiyaku is early and experimental — breaking changes are intentional.
|
|
90
131
|
|
|
91
|
-
MIT.
|
|
132
|
+
MIT.
|