@astrosheep/keiyaku 4.6.29 → 4.6.30
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/build/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/build/plugins/claude/skills/keiyaku/SKILL.md +24 -24
- package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +43 -167
- package/build/plugins/claude/skills/keiyaku-akuma/references/automation.md +58 -228
- package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +45 -56
- package/build/plugins/claude/skills/keiyaku-bind/SKILL.md +43 -184
- package/build/plugins/claude/skills/keiyaku-debt/SKILL.md +39 -88
- package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +54 -114
- package/build/plugins/codex/.codex-plugin/plugin.json +1 -1
- package/build/plugins/codex/skills/keiyaku/SKILL.md +24 -24
- package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +43 -167
- package/build/plugins/codex/skills/keiyaku-akuma/references/automation.md +58 -228
- package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +45 -56
- package/build/plugins/codex/skills/keiyaku-bind/SKILL.md +43 -184
- package/build/plugins/codex/skills/keiyaku-debt/SKILL.md +39 -88
- package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +54 -114
- package/build/plugins/opencode/package.json +1 -1
- package/build/plugins/opencode/skills/keiyaku/SKILL.md +24 -24
- package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +43 -167
- package/build/plugins/opencode/skills/keiyaku-akuma/references/automation.md +58 -228
- package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +45 -56
- package/build/plugins/opencode/skills/keiyaku-bind/SKILL.md +43 -184
- package/build/plugins/opencode/skills/keiyaku-debt/SKILL.md +39 -88
- package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +54 -114
- package/build/skills/keiyaku/SKILL.md +24 -24
- package/build/skills/keiyaku-akuma/SKILL.md +43 -167
- package/build/skills/keiyaku-akuma/references/automation.md +58 -228
- package/build/skills/keiyaku-babysit/SKILL.md +45 -56
- package/build/skills/keiyaku-bind/SKILL.md +43 -184
- package/build/skills/keiyaku-debt/SKILL.md +39 -88
- package/build/skills/keiyaku-workflow/SKILL.md +54 -114
- package/build/src/cli/render/akuma-activity.js +33 -1
- package/build/src/cli/render/kanshi-akuma.d.ts +3 -2
- package/build/src/cli/render/kanshi-akuma.js +1 -1
- package/build/src/cli/render/kanshi.js +19 -5
- package/build/src/contract-worktree.js +19 -4
- package/build/src/git/observe.d.ts +2 -1
- package/build/src/git/observe.js +29 -20
- package/build/src/kanshi/read.js +1 -1
- package/build/src/protocol/read/status.d.ts +2 -2
- package/build/src/protocol/read/status.js +8 -6
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/package.json +1 -1
- package/skills/keiyaku/SKILL.md +24 -24
- package/skills/keiyaku-akuma/SKILL.md +43 -167
- package/skills/keiyaku-akuma/references/automation.md +58 -228
- package/skills/keiyaku-babysit/SKILL.md +45 -56
- package/skills/keiyaku-bind/SKILL.md +43 -184
- package/skills/keiyaku-debt/SKILL.md +39 -88
- package/skills/keiyaku-workflow/SKILL.md +54 -114
|
@@ -7,94 +7,34 @@ description: >-
|
|
|
7
7
|
|
|
8
8
|
# Before Binding A Keiyaku
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
A shared request, audit, theme, product name, worker, verification command, or
|
|
39
|
-
overlapping Region does NOT justify combining acceptance boundaries. Worker
|
|
40
|
-
assignment and Contract boundaries are separate decisions: one worker may
|
|
41
|
-
serve several Contracts, and several workers may contribute to one outcome.
|
|
42
|
-
A request to "open a kei" does not by itself instruct you to combine outcomes.
|
|
43
|
-
|
|
44
|
-
Keep parts together only when they jointly establish one outcome that cannot
|
|
45
|
-
be meaningfully accepted in parts. State that inseparability in Context and
|
|
46
|
-
make Criteria judge the same outcome. Do not manufacture inseparability by
|
|
47
|
-
writing one broad Objective around unrelated fixes.
|
|
48
|
-
|
|
49
|
-
- Use an Arc only for a chapter inside that one acceptance boundary; an Arc is
|
|
50
|
-
not separately accepted and MUST NOT substitute for an independent `kei`.
|
|
51
|
-
- Use a Debt for confirmed unresolved work and dependencies that must outlive
|
|
52
|
-
the current conversation.
|
|
53
|
-
|
|
54
|
-
A `kei` owns one independently acceptable outcome and its delivery lifecycle. A
|
|
55
|
-
Debt records confirmed unresolved work; it may exist without a `kei`,
|
|
56
|
-
and it does not create a second acceptance or lifecycle. Associate a `kei` with
|
|
57
|
-
an existing Debt only when the delivery actually settles that unresolved work.
|
|
58
|
-
Do not create a Debt just to mirror a `kei`.
|
|
59
|
-
|
|
60
|
-
### Parallel Work
|
|
61
|
-
|
|
62
|
-
Parallel work is the default.
|
|
63
|
-
|
|
64
|
-
- Bind and advance independent `kei`s in parallel. Each has its own acceptance
|
|
65
|
-
boundary and holder.
|
|
66
|
-
- Within one `kei`, run independent Debts or Arc chapters in parallel whenever
|
|
67
|
-
their work can proceed independently. They converge on the one acceptance
|
|
68
|
-
boundary, which the holder owns.
|
|
69
|
-
|
|
70
|
-
Region overlap is planning information. It does not prevent parallel work and
|
|
71
|
-
is not a lock, ownership claim, exact diff, or dependency. Use `--after` only
|
|
72
|
-
when one result must exist before another can proceed because of a real logical
|
|
73
|
-
dependency. Do not add `--after` merely because work touches the same Region.
|
|
74
|
-
|
|
75
|
-
## 2. Bind Syntax
|
|
76
|
-
|
|
77
|
-
Read the command's help for the complete option grammar:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
keiyaku -C <repo> bind --help
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Inspect declared Regions when planning parallel work:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
keiyaku -C <repo> region
|
|
87
|
-
keiyaku -C <repo> region <kei/...>
|
|
88
|
-
keiyaku -C <repo> region --path 'src/**' --path 'tests/**'
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
These list active Regions, read one Contract's Region, or show active Regions
|
|
92
|
-
overlapping the supplied patterns. Overlap is coordination information only.
|
|
93
|
-
|
|
94
|
-
Bind from stdin with a heredoc or a saved Markdown file:
|
|
95
|
-
|
|
96
|
-
~~~~bash
|
|
97
|
-
keiyaku -C <repo> bind - <<'KEIYAKU'
|
|
10
|
+
`bind` records a Contract whose objective, design, and acceptance boundary are
|
|
11
|
+
closed. Never bind a wish list ("support X", "clean up Y") that leaves the
|
|
12
|
+
mechanism for the Deliverer to invent — if the design is still open, inspect
|
|
13
|
+
the codebase yourself or send an Akuma to settle the approach first (or record
|
|
14
|
+
a Debt if deferring the work).
|
|
15
|
+
|
|
16
|
+
## 1. Boundaries, Arcs, And Parallelism
|
|
17
|
+
|
|
18
|
+
- **One independently acceptable outcome per `kei`:** if part of the work can
|
|
19
|
+
be reviewed and accepted while another part remains unfinished, bind them as
|
|
20
|
+
separate `kei`s. Shared themes, workers, verification commands, or
|
|
21
|
+
overlapping Regions do not justify combining outcomes.
|
|
22
|
+
- **Divide complex `kei`s into Arcs:** when one indivisible outcome is still
|
|
23
|
+
large or multi-stage, break its execution into **Arcs** (`arc`) so each
|
|
24
|
+
commission tackles one focused chapter (`This Arc: ...`) rather than a
|
|
25
|
+
monolith.
|
|
26
|
+
- **Parallel lanes and `after`:** run independent `kei`s in parallel. Inspect
|
|
27
|
+
active write surfaces with `region` for planning, and declare `after` only
|
|
28
|
+
for true logical prerequisites. Omitting the target selects the current
|
|
29
|
+
branch; targeting another active `kei` stacks on its appointed worktree.
|
|
30
|
+
|
|
31
|
+
## 2. Authoring The Contract Document
|
|
32
|
+
|
|
33
|
+
Put weight on **`### Approach And Flow`**: state the concrete mechanism, data
|
|
34
|
+
and control flow, invariants, and failure handling clearly enough that two
|
|
35
|
+
Deliverers would not invent incompatible designs.
|
|
36
|
+
|
|
37
|
+
~~~~markdown
|
|
98
38
|
# <Delivery name>
|
|
99
39
|
|
|
100
40
|
## Context
|
|
@@ -114,13 +54,13 @@ keiyaku -C <repo> bind - <<'KEIYAKU'
|
|
|
114
54
|
<Data shape, identity, lifecycle facts, and persistence decisions.>
|
|
115
55
|
|
|
116
56
|
### Approach And Flow
|
|
117
|
-
<
|
|
57
|
+
<Concrete mechanism, step-by-step flow, ordering, concurrency, and failure handling.>
|
|
118
58
|
|
|
119
59
|
### Pseudocode
|
|
120
|
-
<
|
|
60
|
+
<Key algorithms and control flow.>
|
|
121
61
|
|
|
122
62
|
## Region
|
|
123
|
-
<One repository-relative write pattern per nonblank line
|
|
63
|
+
<One repository-relative write pattern per nonblank line; trailing / means /**.>
|
|
124
64
|
|
|
125
65
|
## Criteria
|
|
126
66
|
### <observable acceptance condition>
|
|
@@ -130,101 +70,20 @@ keiyaku -C <repo> bind - <<'KEIYAKU'
|
|
|
130
70
|
```bash timeout=5m
|
|
131
71
|
<commands runnable exactly as written>
|
|
132
72
|
```
|
|
133
|
-
KEIYAKU
|
|
134
73
|
~~~~
|
|
135
74
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
checks and deadlines. Each check gets its own clean scratch, setup, and cleanup;
|
|
144
|
-
put any prerequisite build in that check's script or setup, never in a preceding
|
|
145
|
-
fence. Use an explicit timeout for bounded commands; `5m` is the normal baseline.
|
|
146
|
-
|
|
147
|
-
Only explicit `verify` executes declarations, and only with the `verified` gate
|
|
148
|
-
selected. It captures the exact prospective integration using delivery's clean
|
|
149
|
-
worktree rule and explicit dirty-capture authorization, without admitting a
|
|
150
|
-
delivery. `deliver`, `review`, `deliver --dry-run`, and dependent completion only
|
|
151
|
-
consume existing evidence. Without `verified`, the section is inert and creates
|
|
152
|
-
no requirements. `reviewed` independently requires review evidence.
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
keiyaku -C <appointed-path> verify <kei/...>
|
|
156
|
-
keiyaku -C <appointed-path> verify <kei/...> --index 1 --include-dirty
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Omit `--index` to execute all declarations; a positive one-based index selects
|
|
160
|
-
one current declaration. Every invocation executes its selection, even when
|
|
161
|
-
satisfied testimony already exists. Each terminal check admits testimony before
|
|
162
|
-
later checks begin; an identical admission may be reused without skipping
|
|
163
|
-
execution. Normal failures and timeouts affect only their requirement and full
|
|
164
|
-
verify continues; operational stops admit no verdict for the affected check and
|
|
165
|
-
preserve earlier results.
|
|
166
|
-
|
|
167
|
-
Every selected gate needs current satisfied testimony for every requirement.
|
|
168
|
-
Review and custom gates have a singleton requirement. Verification requirements
|
|
169
|
-
follow canonical executor, script, and declared deadline, never declaration
|
|
170
|
-
position: reordering preserves evidence, changing one check affects only that
|
|
171
|
-
requirement, and exact duplicates share one requirement. Removing a declaration
|
|
172
|
-
removes its obligation but preserves historical testimony. Evidence captured
|
|
173
|
-
before delivery can satisfy a later delivery of the exact same integration;
|
|
174
|
-
changed candidate or target snapshots need applicable evidence. Verify can place
|
|
175
|
-
only an already-delivered Contract when all gates and prerequisites pass.
|
|
176
|
-
|
|
177
|
-
For an existing Debt that this delivery settles:
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
keiyaku -C <repo> bind --debt <debt/...> - < CONTRACT.md
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
For a real logical dependency between Contracts:
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
keiyaku -C <repo> bind --after <kei/...> - < CONTRACT.md
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Gate selection is part of binding:
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
keiyaku -C <repo> bind --gates <name,...> - < CONTRACT.md
|
|
193
|
-
keiyaku -C <repo> bind --gates "" - < CONTRACT.md
|
|
194
|
-
keiyaku -C <repo> bind --gates reviewed - < CONTRACT.md
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
Omitting `--gates` uses `gates.default`, or `reviewed` when no default group
|
|
198
|
-
exists. `--gates ""` selects no gates. Gates are named acceptance obligations,
|
|
199
|
-
not work assignments. Named gate groups and worktree hooks live in Settings;
|
|
200
|
-
see the README Configuration section or `keiyaku settings --help`.
|
|
75
|
+
- **Gates and `verified`:** omitting gates uses `gates.default` if configured,
|
|
76
|
+
otherwise `reviewed`. Without the `verified` gate, `## Verification` serves
|
|
77
|
+
as reference documentation for the Deliverer and Reviewer rather than a gate
|
|
78
|
+
requirement executed by `verify`.
|
|
79
|
+
- **Independent scratch:** each closed fence in `## Verification` runs in its
|
|
80
|
+
own clean scratch directory; include any required build in that fence or its
|
|
81
|
+
setup hook.
|
|
201
82
|
|
|
202
83
|
## 3. After Binding
|
|
203
84
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
- the target;
|
|
210
|
-
- gates and prerequisites;
|
|
211
|
-
- whether the `kei` is ready or waiting.
|
|
212
|
-
|
|
213
|
-
Work in the appointed worktree. When appointment lags, the receipt carries no
|
|
214
|
-
path and the `kei` shows pending reconciliation instead. If the receipt is
|
|
215
|
-
waiting, the stated prerequisites remain; do not bind a duplicate Contract.
|
|
216
|
-
|
|
217
|
-
The holder now owns the lifecycle:
|
|
218
|
-
|
|
219
|
-
1. Start the work directly or delegate Debts, Arc chapters, Akumas, or Contract roles.
|
|
220
|
-
2. Run independent work in parallel and let it converge on the one acceptance
|
|
221
|
-
boundary.
|
|
222
|
-
3. Prepare the candidate and explicitly verify selected declarations when
|
|
223
|
-
`verified` is required; deliver those same bytes before or after verification.
|
|
224
|
-
4. Coordinate requirement evidence, review, gates, and prerequisites; inspect
|
|
225
|
-
per-check verdicts, admission reuse, stops, and retained diagnostic paths.
|
|
226
|
-
5. Continue until the `kei` is accepted, amend terms while keeping the same
|
|
227
|
-
objective and acceptance boundary, or abandon it when either has changed.
|
|
228
|
-
|
|
229
|
-
Continue with `keiyaku-workflow` for this lifecycle. For Akuma invocation,
|
|
230
|
-
telling, waiting, and history, read `keiyaku-akuma`.
|
|
85
|
+
Every `kei` has **one and only one holder** accountable for driving it to a
|
|
86
|
+
terminal outcome — you by default, unless you explicitly hand the entire holder
|
|
87
|
+
loop to one dedicated Akuma. Work and commit inside the appointed worktree path
|
|
88
|
+
from the receipt (run `reconcile` if appointment lagged), advance multi-stage
|
|
89
|
+
work with `arc`, and continue with `keiyaku-workflow`.
|
|
@@ -6,91 +6,42 @@ description: >-
|
|
|
6
6
|
|
|
7
7
|
# Keiyaku Debt
|
|
8
8
|
|
|
9
|
-
A Debt records confirmed unresolved work and its relationships
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- `
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
keiyaku debt add "<title>" --priority 1 --needs <debt/...>
|
|
49
|
-
keiyaku debt show <debt/...>
|
|
50
|
-
keiyaku debt ls
|
|
51
|
-
keiyaku debt ready
|
|
52
|
-
keiyaku debt blocked
|
|
53
|
-
keiyaku debt tree <debt/...>
|
|
54
|
-
keiyaku debt doctor
|
|
55
|
-
keiyaku debt query --where 'priority <= 1 and ready' --world
|
|
56
|
-
keiyaku debt context # read the default namespace
|
|
57
|
-
keiyaku debt context <namespace> # set it; / resets to root
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Use complete Debt IDs for targeted commands. `ls`, `ready`, and `blocked` use
|
|
61
|
-
the current namespace; use `--world` to inspect the complete Debt world.
|
|
62
|
-
|
|
63
|
-
Close work:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
keiyaku debt done <debt/...>...
|
|
67
|
-
keiyaku debt drop <debt/...>... --note "<reason>"
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Use `done` when the Debt is complete. Use `drop` when it is no longer owed.
|
|
71
|
-
Both terminal states release dependent Debts. Unresolved `needs` appear in
|
|
72
|
-
`blocked`; open work with all prerequisites terminal appears in `ready`.
|
|
73
|
-
|
|
74
|
-
Update a Debt without changing its lifecycle:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
keiyaku debt update <debt/...> --title "<title>"
|
|
78
|
-
keiyaku debt update <debt/...> --body "<body>"
|
|
79
|
-
keiyaku debt update <debt/...> --needs <debt/...>
|
|
80
|
-
keiyaku debt update <debt/...> --parent <debt/...> --relates <debt/...>
|
|
81
|
-
keiyaku debt update <debt/...> --drop-needs <debt/...>
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## 4. After Creating A Debt
|
|
85
|
-
|
|
86
|
-
Read the returned Debt identity. Then:
|
|
87
|
-
|
|
88
|
-
1. Add or remove relationships when the confirmed prerequisites change.
|
|
89
|
-
2. Mark completed work `done`, or work no longer owed `drop` with a reason.
|
|
90
|
-
3. Use `ready`, `blocked`, `tree`, or `doctor` to inspect the current ledger.
|
|
91
|
-
|
|
92
|
-
Debt records unresolved work. It does not perform the work, claim acceptance,
|
|
93
|
-
assign a holder, or decide what a Contract may accept.
|
|
94
|
-
|
|
95
|
-
Read `keiyaku-bind` for Contract authoring and `keiyaku-workflow` for Contract
|
|
96
|
-
lifecycle.
|
|
9
|
+
A Debt records confirmed unresolved work and its relationships (`open`, `done`,
|
|
10
|
+
`drop`). Unlike a `kei`, a Debt does not require a closed design — use it to
|
|
11
|
+
capture a confirmed problem or prerequisite that must outlive the current
|
|
12
|
+
conversation, while keeping transient scratch plans in session notes.
|
|
13
|
+
|
|
14
|
+
## 1. Recording A Useful Debt
|
|
15
|
+
|
|
16
|
+
- **Self-contained body:** write enough concrete evidence (files, symbols,
|
|
17
|
+
repro, or why work was deferred) that a future reader can act on the Debt
|
|
18
|
+
cold without rediscovering the problem.
|
|
19
|
+
- **Priority (`0..3` ascending):** `0` is highest urgency (`priority <= 1`
|
|
20
|
+
selects high-priority work in queries).
|
|
21
|
+
- **No mirror Debts:** never create a Debt just to mirror an already-bound `kei`.
|
|
22
|
+
|
|
23
|
+
## 2. Relationships And Readiness
|
|
24
|
+
|
|
25
|
+
Only `needs` orders work: a Debt with unresolved `needs` is `blocked`, and
|
|
26
|
+
becomes `ready` once every prerequisite is `done` or `drop`. Do not add `needs`
|
|
27
|
+
merely because two Debts touch the same Region or are related.
|
|
28
|
+
|
|
29
|
+
- `needs`: prerequisite that must become terminal first.
|
|
30
|
+
- `parent`: decomposition grouping (does not block).
|
|
31
|
+
- `supersedes`: earlier Debt replaced by this one.
|
|
32
|
+
- `relates`: non-blocking link.
|
|
33
|
+
|
|
34
|
+
`show` displays only outbound relations declared on that Debt; use `tree`,
|
|
35
|
+
parent-scoped `ready`/`blocked`, or `query` (`blocks`, `under`) to inspect
|
|
36
|
+
reverse links.
|
|
37
|
+
|
|
38
|
+
## 3. Scope And Contract Settlement
|
|
39
|
+
|
|
40
|
+
- **Namespace scope:** an appointed Contract worktree scopes its default Debt
|
|
41
|
+
context to `debt/<contract>/...`. Select the root namespace `/` when filing a
|
|
42
|
+
repo-wide Debt from inside a worktree, and enable world scope on `ls`,
|
|
43
|
+
`ready`, `blocked`, or `query` to inspect across all namespaces. Always
|
|
44
|
+
address a specific Debt by its complete `debt/...` ID.
|
|
45
|
+
- **Contract settlement:** associating a Debt when binding a `kei` holds that
|
|
46
|
+
Debt; accepting the `kei` marks it `done`, while abandoning the `kei`
|
|
47
|
+
releases it back to `open`.
|
|
@@ -7,120 +7,60 @@ description: >-
|
|
|
7
7
|
|
|
8
8
|
# Keiyaku Workflow
|
|
9
9
|
|
|
10
|
-
The holder
|
|
11
|
-
|
|
12
|
-
## 1.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- **
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
`
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- **Verify:** `verify [<contract>] [--index <n>] [--include-dirty]` explicitly
|
|
57
|
-
executes all current declarations or one by positive one-based position. It
|
|
58
|
-
captures the appointed worktree under delivery's clean-worktree and dirty
|
|
59
|
-
authorization rules and prepares the exact prospective integration without
|
|
60
|
-
delivering it. Conflicts refuse without a handoff. Each check gets independent
|
|
61
|
-
scratch, setup, cleanup, and requirement testimony. Normal failure or timeout
|
|
62
|
-
does not stop other selected checks; operational stops admit no verdict for
|
|
63
|
-
the affected check and preserve earlier results. Verify always executes its
|
|
64
|
-
selection, even if identical testimony can reuse admission. It then requests
|
|
65
|
-
ordinary placement of an already-delivered Contract when every prerequisite
|
|
66
|
-
and gate passes; pre-delivery verify records evidence without placement.
|
|
67
|
-
- **Deliver:** Captures a tender and integration against the observed target;
|
|
68
|
-
journal gains a delivered candidate. It never executes Verification. Ready
|
|
69
|
-
prerequisites and existing gate evidence trigger placement and claim in this
|
|
70
|
-
invocation; otherwise the candidate waits.
|
|
71
|
-
Changed candidate content stales earlier review. Identical content retains
|
|
72
|
-
review across rebase or target movement.
|
|
73
|
-
- **Review:** Records verdict evidence for the current document and worktree
|
|
74
|
-
content, even before delivery. Satisfied review requests placement: with a
|
|
75
|
-
delivered candidate, current gates, and ready prerequisites, it accepts in
|
|
76
|
-
this invocation. Unsatisfied review records testimony without placement.
|
|
77
|
-
Neither verdict executes Verification.
|
|
78
|
-
- **Abandon:** Records the alternate terminal outcome without accepting. Accepted
|
|
79
|
-
and abandoned Contracts cannot be reopened.
|
|
80
|
-
|
|
81
|
-
Placement judges declared gates, not the producer's identity. Every current
|
|
82
|
-
requirement needs current satisfied testimony; missing, stale, and current
|
|
83
|
-
unsatisfied evidence remain distinct. Whole-gate satisfaction follows the generic
|
|
84
|
-
judgment over all requirements. Verification requirement identity follows
|
|
85
|
-
canonical executor, script, and declared deadline; declaration position only
|
|
86
|
-
selects work. Reordering preserves evidence,
|
|
87
|
-
editing one check affects only that requirement, and exact duplicates share a
|
|
88
|
-
requirement. Removed declarations leave historical testimony intact.
|
|
89
|
-
|
|
90
|
-
Deliver, review, target refresh, and dependent completion consume existing
|
|
91
|
-
evidence only. Review does not replace Verification; preview never requests
|
|
92
|
-
placement. Verify evidence applies to its exact captured integration snapshot:
|
|
93
|
-
an unchanged later delivery can use pre-delivery evidence, while target or
|
|
94
|
-
candidate movement cannot retarget it. Read the final receipt for every executed
|
|
95
|
-
check, admission or admission reuse, stops, retained scenes, completion, and
|
|
96
|
-
reconciliation lag.
|
|
97
|
-
|
|
98
|
-
## 4. Handing A Role To An Akuma
|
|
99
|
-
|
|
100
|
-
This is the one commissioning map. `--contract` records association, not
|
|
101
|
-
authority.
|
|
10
|
+
The holder drives one Contract from binding to `accepted` or `abandoned`.
|
|
11
|
+
|
|
12
|
+
## 1. Roles
|
|
13
|
+
|
|
14
|
+
A `kei` has three roles (one agent may fill multiple roles, except the Reviewer
|
|
15
|
+
must not be the Deliverer of the candidate under review):
|
|
16
|
+
|
|
17
|
+
- **Holder (one and only one per `kei`):** owns the fulfillment loop and
|
|
18
|
+
acceptance until terminal. You are the holder unless you explicitly hand the
|
|
19
|
+
entire loop for that `kei` to one dedicated Akuma; delegating Deliverer or
|
|
20
|
+
Reviewer tasks never transfers or splits holder ownership.
|
|
21
|
+
- **Deliverer:** builds the change in the appointed worktree and tenders it
|
|
22
|
+
with `deliver`.
|
|
23
|
+
- **Reviewer:** judges the candidate against the Contract terms and records
|
|
24
|
+
`satisfied` or `unsatisfied` with `review`. The holder may review a worker's
|
|
25
|
+
delivery directly.
|
|
26
|
+
|
|
27
|
+
## 2. Lifecycle And Evidence
|
|
28
|
+
|
|
29
|
+
- **Work & Preview:** commit in the appointed worktree (use `arc` to advance
|
|
30
|
+
complex `kei`s chapter by chapter). Run a delivery preview to inspect the
|
|
31
|
+
candidate, standing evidence, and target movement without mutating state. If
|
|
32
|
+
the target branch moved and conflicts, merge the target head in the
|
|
33
|
+
appointed worktree (or use delivery conflict handoff + dirty capture).
|
|
34
|
+
- **Verify (`verify`):** runs `## Verification` fences in clean scratch against
|
|
35
|
+
the prospective integration when the `verified` gate is selected (without
|
|
36
|
+
`verified`, the section serves as reference documentation).
|
|
37
|
+
- **Deliver (`deliver`) & Review (`review`):** `deliver` tenders the worktree
|
|
38
|
+
candidate; `review` records verdict testimony before or after delivery.
|
|
39
|
+
Neither runs Verification.
|
|
40
|
+
- **Automatic placement:** whichever of `deliver`, satisfied `review`, or
|
|
41
|
+
post-delivery `verify` satisfies the last gate and `after` prerequisite
|
|
42
|
+
automatically lands the candidate (retiring the worktree, settling bound
|
|
43
|
+
Debts, and cascading any ready `after` dependents).
|
|
44
|
+
- **Target movement:** do not manually rebase or re-`deliver` just because the
|
|
45
|
+
target branch moved. Keiyaku re-integrates clean target movement
|
|
46
|
+
automatically, and `review` stays valid as long as the candidate's diff does
|
|
47
|
+
not change. You only need to act if the receipt reports a merge conflict
|
|
48
|
+
(resolve in the worktree and re-`deliver`) or `⧗ awaiting verification ...`
|
|
49
|
+
(run a fresh `verify` directly without re-delivering).
|
|
50
|
+
|
|
51
|
+
## 3. Commissioning And Next Moves
|
|
52
|
+
|
|
53
|
+
Assign a role `@alias` when calling an Akuma (`keiyaku-akuma`), pass the
|
|
54
|
+
appointed worktree as its working directory, and state the Contract ID,
|
|
55
|
+
worktree path, and current Arc in the prompt:
|
|
102
56
|
|
|
103
57
|
| Role | Commission | Return |
|
|
104
58
|
| --- | --- | --- |
|
|
105
|
-
| Holder |
|
|
106
|
-
| Deliverer |
|
|
107
|
-
| Reviewer |
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
## 5. Decide What Happens Next
|
|
115
|
-
|
|
116
|
-
The holder checks candidate, verification, review, prerequisites, and gates.
|
|
117
|
-
|
|
118
|
-
- A ready delivered candidate claims on delivery, satisfied review, or explicit
|
|
119
|
-
verify after its selected work; no separate claim command is needed.
|
|
120
|
-
- Missing evidence or unfinished work calls for another commission or chapter.
|
|
121
|
-
- Amend when the objective and acceptance boundary remain the same but terms
|
|
122
|
-
must change.
|
|
123
|
-
- Abandon and bind a new `kei` when the objective or acceptance boundary changes.
|
|
124
|
-
|
|
125
|
-
Read `keiyaku-bind` for authoring, `keiyaku-akuma` for delegation, and
|
|
126
|
-
`keiyaku-babysit` for supervising multiple lanes.
|
|
59
|
+
| Holder (`@holder-<name>`) | Full `kei`, current Arc, appointed worktree, and holder loop. | Terminal receipt (`accepted` or `abandoned`). |
|
|
60
|
+
| Deliverer (`@deliverer`) | Objective/current Arc, appointed worktree, and whether to run `verify` and `deliver`. | Verify and delivery receipts. |
|
|
61
|
+
| Reviewer (`@reviewer`) | Contract ID, appointed worktree, and instruction to inspect and record `review`. | Review receipt. |
|
|
62
|
+
|
|
63
|
+
- **Unmet gates or review findings:** steer `@deliverer` with `tell`, or open
|
|
64
|
+
the next `arc`.
|
|
65
|
+
- **Terms change within the same objective and boundary:** run `amend`.
|
|
66
|
+
- **Objective or acceptance boundary changes:** `abandon` and bind a new `kei`.
|