@astrosheep/keiyaku 4.6.28 → 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 -165
- 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 -165
- 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 -165
- 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/plugins/pi/README.md +10 -0
- package/build/plugins/pi/akuma-tools.ts +2 -2
- package/build/plugins/pi/keiyaku.ts +73 -1
- package/build/skills/keiyaku/SKILL.md +24 -24
- package/build/skills/keiyaku-akuma/SKILL.md +43 -165
- 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/akuma/akuma-owner.js +5 -4
- package/build/src/akuma/akuma.d.ts +2 -0
- package/build/src/akuma/akuma.js +17 -5
- package/build/src/akuma/identity.d.ts +4 -0
- package/build/src/akuma/identity.js +7 -0
- package/build/src/akuma/projection.d.ts +7 -1
- package/build/src/akuma/projection.js +6 -1
- package/build/src/cli/commands/akuma-grammar.js +4 -4
- package/build/src/cli/render/akuma-activity.js +40 -9
- package/build/src/cli/render/akuma.js +1 -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/index.d.ts +2 -1
- package/build/src/index.js +1 -1
- package/build/src/kanshi/counts.d.ts +15 -0
- package/build/src/kanshi/counts.js +66 -0
- package/build/src/kanshi/index.d.ts +2 -0
- package/build/src/kanshi/index.js +1 -0
- package/build/src/kanshi/read.js +1 -1
- package/build/src/library/selection.d.ts +6 -1
- package/build/src/library/selection.js +5 -3
- 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 +2 -2
- package/plugins/pi/README.md +10 -0
- package/plugins/pi/akuma-tools.ts +2 -2
- package/plugins/pi/keiyaku.ts +73 -1
- package/skills/keiyaku/SKILL.md +24 -24
- package/skills/keiyaku-akuma/SKILL.md +43 -165
- 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,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`.
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: keiyaku
|
|
3
3
|
description: >-
|
|
4
|
-
Keiyaku
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Keiyaku records unresolved work, writes handoff terms for deliveries, and
|
|
5
|
+
calls delegates. Use this skill when deciding which Keiyaku concept or skill
|
|
6
|
+
to reach for.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Keiyaku
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Three Independent Pillars
|
|
12
12
|
|
|
13
|
-
Keiyaku has three
|
|
14
|
-
**Contract** makes acceptance auditable, **Akuma** runs delegates. Use any one
|
|
15
|
-
alone. Each Contract in flight has one holder who runs its loop: you by
|
|
16
|
-
default, or one Aku you hand the whole loop to.
|
|
13
|
+
Keiyaku has three pillars that work alone or together:
|
|
17
14
|
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
15
|
+
- **Debt (`keiyaku-debt`):** confirmed unresolved work and its dependencies.
|
|
16
|
+
Does **not** require a closed design — record a Debt as soon as a problem or
|
|
17
|
+
prerequisite is confirmed, even while the solution is still open.
|
|
18
|
+
- **Contract (`kei`):** one independently acceptable delivery whose objective,
|
|
19
|
+
design, and acceptance boundary are already closed, owned by **one and only
|
|
20
|
+
one holder** (you by default, or one Akuma handed the whole Contract loop). If
|
|
21
|
+
the design is not closed yet, investigate the codebase yourself or send an
|
|
22
|
+
Akuma to settle the approach before binding. Complex `kei`s divide their
|
|
23
|
+
execution into **Arcs** (chapters inside that one acceptance boundary).
|
|
24
|
+
- **Akuma (`keiyaku-akuma`):** delegated workers addressed by `@alias` or
|
|
25
|
+
`AkuId` across parallel lanes.
|
|
23
26
|
|
|
24
|
-
##
|
|
27
|
+
## Which Skill To Read
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
keiyaku -C <repo> review [<contract>|@<contract>] --satisfied --summary "<evidence>"
|
|
32
|
-
```
|
|
29
|
+
- Recording or querying unresolved work and prerequisites: `keiyaku-debt`
|
|
30
|
+
- Splitting acceptance boundaries and authoring a Contract: `keiyaku-bind`
|
|
31
|
+
- Running a Contract's fulfillment loop (deliver, verify, review): `keiyaku-workflow`
|
|
32
|
+
- Calling, aliasing, steering, and waiting on Akumas: `keiyaku-akuma`
|
|
33
|
+
- Supervising multiple active Contracts and Akumas in parallel: `keiyaku-babysit`
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Akuma runs.
|
|
35
|
+
Get exact command or tool syntax from CLI `--help` or the exposed tool
|
|
36
|
+
descriptions.
|
|
@@ -8,168 +8,46 @@ description: >-
|
|
|
8
8
|
|
|
9
9
|
# Keiyaku Akuma
|
|
10
10
|
|
|
11
|
-
Use Akumas to delegate
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
show up in its `history`.
|
|
55
|
-
|
|
56
|
-
### Verification brief
|
|
57
|
-
|
|
58
|
-
When commissioning checks, name the appointed worktree, Contract, all declarations
|
|
59
|
-
or current one-based index, and whether dirty capture is authorized:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
keiyaku -C <appointed-path> verify <kei/...>
|
|
63
|
-
keiyaku -C <appointed-path> verify <kei/...> --index 2 --include-dirty
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Only explicit verify executes declarations. Deliver, review, preview, target
|
|
67
|
-
refresh, and dependent completion consume current evidence only. Each check has
|
|
68
|
-
independent clean scratch, setup, and cleanup: a required build belongs in that
|
|
69
|
-
check's script or setup, never another fence. Evidence names the exact prospective
|
|
70
|
-
integration and stable content-derived requirement; the index is only a current
|
|
71
|
-
selector. Verify admits no delivery and can place only a previously delivered
|
|
72
|
-
candidate whose prerequisites and every gate pass.
|
|
73
|
-
|
|
74
|
-
Ask for every executed check's verdict, new or reused testimony admission,
|
|
75
|
-
operational stops, retained diagnostic paths, and completion. Reused admission
|
|
76
|
-
never means execution was skipped. Normal failure or timeout affects only that
|
|
77
|
-
requirement and full verify continues; an operational stop admits no verdict for
|
|
78
|
-
the affected check and preserves prior admissions. A selected success establishes
|
|
79
|
-
no verdict for other requirements; the generic gate judgment decides whole-gate
|
|
80
|
-
satisfaction. Verify runs in the invoking process with its native Git and
|
|
81
|
-
process custody.
|
|
82
|
-
|
|
83
|
-
## Tell or ask an existing Akuma
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
keiyaku tell @reviewer "The candidate moved; re-examine the worktree"
|
|
87
|
-
keiyaku tell @reviewer --interrupt - < new-priority.md
|
|
88
|
-
keiyaku ask @reviewer --wait 10m "What is your verdict?"
|
|
89
|
-
keiyaku ask @reviewer --schema verdict.schema.json - < question.md
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
`tell` queues the next instruction and returns without waiting for an answer.
|
|
93
|
-
`ask` queues it and waits for that exact answer, bounded by `--wait`.
|
|
94
|
-
`--interrupt` admits the Tell and asks current work to yield; the Tell remains
|
|
95
|
-
admitted even if yielding cannot be confirmed. A deadline never withdraws it.
|
|
96
|
-
Only `ask` takes `--schema`. Read `tell --help` and `ask --help` for syntax.
|
|
97
|
-
|
|
98
|
-
## Observe work
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
keiyaku wait @deliverer @reviewer
|
|
102
|
-
keiyaku wait --all --timeout 30m @deliverer @reviewer
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
`wait` returns when any selected Akuma finishes (`--all`: every one). `--timeout`
|
|
106
|
-
ends the wait, not the workers. An already finished Akuma counts immediately.
|
|
107
|
-
Unlike `ask`, this observes existing work, not a newly submitted instruction.
|
|
108
|
-
|
|
109
|
-
`keiyaku wait kei/...` instead waits for the named Contract's next journal
|
|
110
|
-
change or terminal state, even without a dispatched Akuma. Each invocation
|
|
111
|
-
starts at the current head; an already accepted or abandoned Contract counts
|
|
112
|
-
immediately, without being reported as changed. Use `--all` to wait for every
|
|
113
|
-
selected Contract, and do not mix Contract and Akuma selectors in one wait.
|
|
114
|
-
`kill kei/...` still selects the associated Akumas.
|
|
115
|
-
|
|
116
|
-
## Inspect and retrieve results
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
keiyaku whoami
|
|
120
|
-
keiyaku status
|
|
121
|
-
keiyaku status @reviewer
|
|
122
|
-
keiyaku ls aku/
|
|
123
|
-
keiyaku ls "aku/*/*"
|
|
124
|
-
keiyaku ls --mine
|
|
125
|
-
keiyaku history @reviewer --last
|
|
126
|
-
keiyaku history @reviewer --id turn/3
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
- `whoami`: who you are; for an Akuma, also who started its current turn.
|
|
130
|
-
- `status [<aku>]`: the roster, or one Akuma's state and workdir.
|
|
131
|
-
- `ls aku/`: callable names. `ls "aku/*/*"`: recent instances.
|
|
132
|
-
`ls --mine`: Akumas you called, plus their descendants in this World.
|
|
133
|
-
`--caller` selects another caller; see `ls --help`.
|
|
134
|
-
- `history <aku> --last`: latest answer. `--id turn/N`: one exact turn's
|
|
135
|
-
answer or failure diagnostic (ids are in `history <aku> --json`).
|
|
136
|
-
Keep the complete AkuId if an alias may move.
|
|
137
|
-
|
|
138
|
-
## Retention
|
|
139
|
-
|
|
140
|
-
Akumas idle for more than fifteen days may be cleaned up after a later
|
|
141
|
-
successful `call` or `fork`. Running Akumas, alias targets, and Akumas
|
|
142
|
-
dispatched to an open Contract are kept, and nothing is killed. Read-only
|
|
143
|
-
commands and `tell`/`ask`/`wait` never trigger cleanup.
|
|
144
|
-
|
|
145
|
-
## Stop and branch
|
|
146
|
-
|
|
147
|
-
```bash
|
|
148
|
-
keiyaku kill @reviewer
|
|
149
|
-
keiyaku fork @reviewer --at turn/3
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
`kill` stops current work without admitting a Tell, deleting the Akuma, or
|
|
153
|
-
removing its history. `fork` creates a new Akuma from one exact retained
|
|
154
|
-
answered history point; the source is unchanged, and providers that cannot
|
|
155
|
-
fork report that refusal. See `kill --help` and `fork --help` for the
|
|
156
|
-
complete grammar.
|
|
157
|
-
|
|
158
|
-
## JavaScript automation
|
|
159
|
-
|
|
160
|
-
Use [Automation With The Akuma API](references/automation.md) for a
|
|
161
|
-
job-specific JavaScript coordinator, structured answers, or multi-worker
|
|
162
|
-
orchestration. The CLI is enough for one commission and its return. A
|
|
163
|
-
prompt-free birth followed by one input-bound ask uses the same identity:
|
|
164
|
-
|
|
165
|
-
```ts
|
|
166
|
-
import { Akuma, Akumas, World } from "@astrosheep/keiyaku";
|
|
167
|
-
|
|
168
|
-
const root = await World.at(process.cwd());
|
|
169
|
-
const called = await Akumas.of(root).call({ archetype: "worker" });
|
|
170
|
-
const worker = Akuma.select(root, called.akuma);
|
|
171
|
-
const result = await worker.ask("Inspect the change");
|
|
172
|
-
console.log(result.observation);
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
The automation guide covers schema-based answer handling and longer workflows.
|
|
11
|
+
Use Akumas to delegate implementation, review, verification, or parallel
|
|
12
|
+
research.
|
|
13
|
+
|
|
14
|
+
## 1. Aliases And Operations (`call`, `tell`, `ask`, `wait`)
|
|
15
|
+
|
|
16
|
+
- **Give every worker an `@alias` at birth:** assign a role or lane alias when
|
|
17
|
+
calling an Akuma (`@deliverer`, `@reviewer`, `@scout`). Aliases make
|
|
18
|
+
`status`, `wait`, `tell`, `ask`, and `history` readable by role across
|
|
19
|
+
parallel lanes; keep the underlying `aku/<name>/<id>` only when reassigning
|
|
20
|
+
that `@alias` to a replacement worker. Calling an archetype name (`worker`,
|
|
21
|
+
`review-akuma`) always spawns a new instance — address the existing `@alias`
|
|
22
|
+
or `AkuId` with `tell`/`ask` to continue with the same worker.
|
|
23
|
+
- **Detached `call` + `wait` for real work:** launch workers detached, then
|
|
24
|
+
supervise them together with `wait` (wakes on any settlement by default, or
|
|
25
|
+
all; a wait deadline never kills workers). `wait` on `kei/...` waits for a
|
|
26
|
+
Contract's next journal change or terminal state.
|
|
27
|
+
- **`ask` for single-turn answers:** submits an instruction and waits for that
|
|
28
|
+
exact Turn's answer (optionally validated against a JSON schema).
|
|
29
|
+
- **`tell` vs. interrupting `tell`:** `tell` queues steering instructions
|
|
30
|
+
without blocking; request an interrupt only when the worker is on the wrong
|
|
31
|
+
track and should yield its current attempt first.
|
|
32
|
+
|
|
33
|
+
## 2. Commissioning Context
|
|
34
|
+
|
|
35
|
+
- **Set both Contract association and working directory:** associating a
|
|
36
|
+
`kei/...` records Dispatch for `status`, but neither sets the working
|
|
37
|
+
directory nor injects Contract terms into the prompt. Point the working
|
|
38
|
+
directory at the appointed worktree and write the Contract ID, worktree path,
|
|
39
|
+
current Arc, and expected return in the prompt.
|
|
40
|
+
- **Request `report` on long tasks:** a worker can record mid-turn progress
|
|
41
|
+
reports without stopping; inspect them in `history`.
|
|
42
|
+
|
|
43
|
+
## 3. Observing, Branching, And Automation
|
|
44
|
+
|
|
45
|
+
- **`status` and `history`:** `status` shows the World board or one Akuma's
|
|
46
|
+
live snapshot and file-change summary; `history` reads recent timeline
|
|
47
|
+
events, the latest answer, or one exact `turn/N` or `report/N` item.
|
|
48
|
+
- **`ls`, `fork`, and `kill`:** `ls` lists archetypes (`aku/`), recent
|
|
49
|
+
instances (`"aku/*/*"`), or your own call tree; `fork` branches a new Akuma
|
|
50
|
+
from an answered `turn/N`; `kill` stops active work while keeping history.
|
|
51
|
+
- **JavaScript orchestration:** for multi-agent tournaments, adversarial claim
|
|
52
|
+
checking, or custom concurrency control in code, read
|
|
53
|
+
[Automation With The Akuma API](references/automation.md).
|