@astrosheep/keiyaku 2.9.11 → 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 +62 -72
- 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
|
@@ -2,45 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
契約 — a contract.
|
|
4
4
|
|
|
5
|
-
Keiyaku is
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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.
|
|
14
18
|
|
|
15
19
|
```bash
|
|
16
20
|
npm install -g @astrosheep/keiyaku
|
|
17
21
|
```
|
|
18
22
|
|
|
19
|
-
Node ≥ 22.19, inside a git repository
|
|
23
|
+
Node ≥ 22.19, inside a git repository with a clean worktree.
|
|
20
24
|
|
|
21
|
-
##
|
|
25
|
+
## One deal, end to end
|
|
22
26
|
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
|
|
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
|
|
31
|
+
|
|
32
|
+
# Put an akuma on it. It works alone in the contract's own worktree.
|
|
33
|
+
keiyaku call worker-akuma --detach "fulfill the contract"
|
|
26
34
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
30
40
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
# Ask for judgment: gates run, a reviewer akuma reads the diff
|
|
42
|
+
# against the criteria.
|
|
43
|
+
keiyaku petition
|
|
34
44
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
# claim → the change lands on main, with a commit-hash receipt
|
|
46
|
+
# forfeit → the branch is deleted; partial fulfillment is forfeiture
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Every step appends to the contract's ledger. `keiyaku log` replays any deal,
|
|
50
|
+
finished or dead, from its receipts.
|
|
39
51
|
|
|
40
|
-
##
|
|
52
|
+
## The board
|
|
41
53
|
|
|
42
|
-
`keiyaku status`
|
|
43
|
-
from this repository:
|
|
54
|
+
`keiyaku status` is the one screen of state. Real output:
|
|
44
55
|
|
|
45
56
|
```text
|
|
46
57
|
kanshi ─────────────────────────────────────────────────────── 現世 b4c38cc
|
|
@@ -63,36 +74,14 @@ task 120
|
|
|
63
74
|
+ 108 ready · 9 blocked
|
|
64
75
|
```
|
|
65
76
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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).
|
|
72
|
-
|
|
73
|
-
## Surface
|
|
74
|
-
|
|
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` |
|
|
82
|
-
|
|
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.
|
|
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.
|
|
87
80
|
|
|
88
|
-
|
|
89
|
-
distinct meanings — `parent`, `needs`, `supersedes`, `relates-to` — and every
|
|
90
|
-
mutation is validated and micro-committed on its own.
|
|
81
|
+
## An akuma is one Markdown file
|
|
91
82
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
Filename is the name. Frontmatter selects the provider. The body is the
|
|
95
|
-
instructions.
|
|
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.
|
|
96
85
|
|
|
97
86
|
```markdown
|
|
98
87
|
---
|
|
@@ -104,11 +93,11 @@ Make scoped changes and run relevant tests.
|
|
|
104
93
|
```
|
|
105
94
|
|
|
106
95
|
Providers: `codex-sdk`, `codex-app-server`, `claude-agent-sdk`,
|
|
107
|
-
`opencode-sdk`, `pi
|
|
108
|
-
|
|
109
|
-
|
|
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.
|
|
110
99
|
|
|
111
|
-
`.keiyaku/settings.json`
|
|
100
|
+
`.keiyaku/settings.json` assigns roles and gates:
|
|
112
101
|
|
|
113
102
|
```json
|
|
114
103
|
{
|
|
@@ -118,25 +107,26 @@ field-merges.
|
|
|
118
107
|
}
|
|
119
108
|
```
|
|
120
109
|
|
|
121
|
-
##
|
|
110
|
+
## And the rest
|
|
122
111
|
|
|
123
112
|
| | |
|
|
124
113
|
| --- | --- |
|
|
125
|
-
| `
|
|
126
|
-
|
|
|
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` |
|
|
127
118
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
.
|
|
131
|
-
```
|
|
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.
|
|
132
122
|
|
|
133
|
-
|
|
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).
|
|
134
127
|
|
|
135
|
-
|
|
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.
|
|
128
|
+
Full product documentation: [`docs/keiyaku-v3/`](docs/keiyaku-v3/README.md).
|
|
138
129
|
|
|
139
|
-
Keiyaku is early and experimental
|
|
140
|
-
current version is the only version.
|
|
130
|
+
Keiyaku is early and experimental — breaking changes are intentional.
|
|
141
131
|
|
|
142
132
|
MIT.
|