@astrosheep/keiyaku 4.6.7 → 4.6.9
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 +46 -16
- package/build/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/build/plugins/claude/skills/keiyaku/SKILL.md +5 -6
- package/build/plugins/claude/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/plugins/claude/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/plugins/claude/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/plugins/claude/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/plugins/claude/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/plugins/claude/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/plugins/codex/.codex-plugin/plugin.json +1 -1
- package/build/plugins/codex/skills/keiyaku/SKILL.md +5 -6
- package/build/plugins/codex/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/plugins/codex/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/plugins/codex/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/plugins/codex/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/plugins/codex/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/plugins/codex/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/plugins/opencode/index.js +1 -1
- package/build/plugins/opencode/skills/keiyaku/SKILL.md +5 -6
- package/build/plugins/opencode/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/plugins/opencode/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/plugins/opencode/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/plugins/opencode/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/plugins/opencode/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/plugins/opencode/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/plugins/pi/keiyaku.ts +0 -5
- package/build/skills/keiyaku/SKILL.md +5 -6
- package/build/skills/keiyaku-akuma/SKILL.md +1 -1
- package/build/skills/keiyaku-akuma/references/automation.md +8 -8
- package/build/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/skills/keiyaku-bind/SKILL.md +9 -9
- package/build/skills/keiyaku-debt/SKILL.md +91 -0
- package/build/skills/keiyaku-workflow/SKILL.md +2 -2
- package/build/src/akuma/akuma-call.d.ts +2 -0
- package/build/src/akuma/akuma-call.js +8 -2
- package/build/src/akuma/akuma-instance.d.ts +14 -1
- package/build/src/akuma/akuma-instance.js +37 -7
- package/build/src/akuma/akuma-observe.d.ts +33 -8
- package/build/src/akuma/akuma-observe.js +89 -63
- package/build/src/akuma/akuma-owner.d.ts +14 -2
- package/build/src/akuma/akuma-owner.js +49 -35
- package/build/src/akuma/akuma-selection-execution.js +9 -1
- package/build/src/akuma/akuma-stream.d.ts +22 -0
- package/build/src/akuma/akuma-stream.js +116 -0
- package/build/src/akuma/akuma-wait.d.ts +1 -40
- package/build/src/akuma/akuma-wait.js +23 -84
- package/build/src/akuma/akuma.d.ts +52 -16
- package/build/src/akuma/akuma.js +10 -10
- package/build/src/akuma/allowed.d.ts +7 -12
- package/build/src/akuma/allowed.js +13 -4
- package/build/src/akuma/archetype.d.ts +7 -15
- package/build/src/akuma/archetype.js +36 -35
- package/build/src/akuma/body-supervisor.d.ts +5 -5
- package/build/src/akuma/body-supervisor.js +22 -20
- package/build/src/akuma/body.d.ts +5 -3
- package/build/src/akuma/body.js +57 -8
- package/build/src/akuma/call-request.d.ts +30 -32
- package/build/src/akuma/call-request.js +10 -3
- package/build/src/akuma/caller.d.ts +39 -0
- package/build/src/akuma/caller.js +36 -0
- package/build/src/akuma/dispatch-association.d.ts +0 -1
- package/build/src/akuma/dispatch-association.js +0 -3
- package/build/src/akuma/heart/activity-schema.d.ts +12 -0
- package/build/src/akuma/heart/activity-schema.js +6 -0
- package/build/src/akuma/heart/facts.d.ts +16 -12
- package/build/src/akuma/heart/facts.js +8 -0
- package/build/src/akuma/heart/index.d.ts +61 -9
- package/build/src/akuma/heart/index.js +89 -24
- package/build/src/akuma/heart/rows.d.ts +3 -3
- package/build/src/akuma/heart/rows.js +5 -3
- package/build/src/akuma/heart/soul.d.ts +10 -1
- package/build/src/akuma/heart/soul.js +34 -24
- package/build/src/akuma/heart/storage.d.ts +20 -0
- package/build/src/akuma/heart/storage.js +62 -3
- package/build/src/akuma/heart/timeline.d.ts +7 -0
- package/build/src/akuma/heart/timeline.js +10 -0
- package/build/src/akuma/identity.d.ts +0 -1
- package/build/src/akuma/identity.js +2 -5
- package/build/src/akuma/index.d.ts +6 -2
- package/build/src/akuma/index.js +1 -0
- package/build/src/akuma/nuke.js +6 -28
- package/build/src/akuma/projection.d.ts +25 -11
- package/build/src/akuma/projection.js +24 -7
- package/build/src/akuma/provider-recipe.d.ts +18 -6
- package/build/src/akuma/provider-recipe.js +24 -1
- package/build/src/akuma/provider.d.ts +31 -10
- package/build/src/akuma/provider.js +105 -14
- package/build/src/akuma/providers/acp/events.js +29 -19
- package/build/src/akuma/providers/acp/index.js +2 -3
- package/build/src/akuma/providers/claude/events.js +110 -69
- package/build/src/akuma/providers/claude/index.d.ts +2 -2
- package/build/src/akuma/providers/claude/index.js +4 -8
- package/build/src/akuma/providers/codex-app-server/events.js +17 -2
- package/build/src/akuma/providers/codex-app-server/index.js +17 -11
- package/build/src/akuma/providers/decode.d.ts +33 -0
- package/build/src/akuma/providers/decode.js +65 -0
- package/build/src/akuma/providers/execution-environment.d.ts +2 -1
- package/build/src/akuma/providers/execution-environment.js +3 -0
- package/build/src/akuma/providers/grok-build/index.js +16 -48
- package/build/src/akuma/providers/index.js +2 -0
- package/build/src/akuma/providers/lifecycle.d.ts +9 -0
- package/build/src/akuma/providers/lifecycle.js +10 -0
- package/build/src/akuma/providers/opencode-sdk/event-stream.d.ts +3 -3
- package/build/src/akuma/providers/opencode-sdk/event-stream.js +2 -25
- package/build/src/akuma/providers/opencode-sdk/events.d.ts +7 -43
- package/build/src/akuma/providers/opencode-sdk/events.js +146 -296
- package/build/src/akuma/providers/opencode-sdk/index.js +270 -431
- package/build/src/akuma/providers/opencode-sdk/native-http.d.ts +9 -0
- package/build/src/akuma/providers/opencode-sdk/native-http.js +69 -0
- package/build/src/akuma/providers/opencode-sdk/session.d.ts +42 -36
- package/build/src/akuma/providers/opencode-sdk/session.js +75 -84
- package/build/src/akuma/providers/paseo/events.d.ts +33 -0
- package/build/src/akuma/providers/paseo/events.js +204 -0
- package/build/src/akuma/providers/paseo/index.d.ts +9 -0
- package/build/src/akuma/providers/paseo/index.js +357 -0
- package/build/src/akuma/providers/pi/events.d.ts +2 -0
- package/build/src/akuma/providers/pi/events.js +36 -38
- package/build/src/akuma/providers/pi/index.js +21 -35
- package/build/src/akuma/publication.d.ts +2 -0
- package/build/src/akuma/publication.js +5 -0
- package/build/src/akuma/request-lifecycle.d.ts +4 -2
- package/build/src/akuma/request-lifecycle.js +27 -12
- package/build/src/akuma/request-rendezvous.js +38 -55
- package/build/src/akuma/request-serve.d.ts +1 -1
- package/build/src/akuma/request-serve.js +77 -113
- package/build/src/akuma/requests.d.ts +3 -1
- package/build/src/akuma/requests.js +32 -0
- package/build/src/akuma/selection-observation.d.ts +129 -53
- package/build/src/akuma/selection-observation.js +3 -9
- package/build/src/akuma/turn-drive.d.ts +3 -0
- package/build/src/akuma/turn-drive.js +28 -10
- package/build/src/akuma-body.js +12 -22
- package/build/src/cli/akuma-caller.d.ts +3 -0
- package/build/src/cli/akuma-caller.js +31 -0
- package/build/src/cli/commands/akuma-grammar.js +10 -16
- package/build/src/cli/commands/akuma.js +25 -55
- package/build/src/cli/commands/contract-grammar.d.ts +9 -7
- package/build/src/cli/commands/contract-grammar.js +40 -47
- package/build/src/cli/commands/contract-help.d.ts +17 -7
- package/build/src/cli/commands/contract-help.js +50 -11
- package/build/src/cli/commands/contract.js +34 -63
- package/build/src/cli/commands/debt-grammar.d.ts +19 -0
- package/build/src/cli/commands/debt-grammar.js +323 -0
- package/build/src/cli/commands/debt-query.d.ts +5 -0
- package/build/src/cli/commands/{task-query.js → debt-query.js} +9 -9
- package/build/src/cli/commands/{task.d.ts → debt.d.ts} +2 -2
- package/build/src/cli/commands/{task.js → debt.js} +87 -164
- package/build/src/cli/coordinates.d.ts +1 -1
- package/build/src/cli/coordinates.js +1 -1
- package/build/src/cli/parse.d.ts +5 -5
- package/build/src/cli/parse.js +17 -16
- package/build/src/cli/render/akuma-activity.d.ts +11 -83
- package/build/src/cli/render/akuma-activity.js +20 -382
- package/build/src/cli/render/catalog.d.ts +4 -7
- package/build/src/cli/render/catalog.js +5 -5
- package/build/src/cli/render/contract-history.js +3 -6
- package/build/src/cli/render/contract.js +17 -52
- package/build/src/cli/render/debt.d.ts +28 -0
- package/build/src/cli/render/{task.js → debt.js} +55 -133
- package/build/src/cli/render/kanshi.js +28 -28
- package/build/src/cli/render/marks.d.ts +5 -5
- package/build/src/cli/render/marks.js +4 -10
- package/build/src/cli/render/nuke.js +1 -1
- package/build/src/cli/render/receipt.js +3 -10
- package/build/src/cli/runtime.d.ts +1 -1
- package/build/src/cli/runtime.js +14 -20
- package/build/src/cli/scan.d.ts +1 -1
- package/build/src/cli/selectors.d.ts +3 -6
- package/build/src/cli/selectors.js +22 -53
- package/build/src/cli/usage.d.ts +1 -1
- package/build/src/cli/usage.js +4 -4
- package/build/src/contract-worktree.js +3 -3
- package/build/src/debt/board.d.ts +160 -0
- package/build/src/{task → debt}/board.js +89 -89
- package/build/src/debt/catalog.d.ts +11 -0
- package/build/src/debt/catalog.js +59 -0
- package/build/src/{task → debt}/context.d.ts +1 -1
- package/build/src/{task → debt}/context.js +1 -1
- package/build/src/{task → debt}/created-observation.d.ts +6 -10
- package/build/src/{task → debt}/created-observation.js +7 -7
- package/build/src/debt/document.d.ts +37 -0
- package/build/src/{task → debt}/document.js +37 -37
- package/build/src/debt/identity.d.ts +21 -0
- package/build/src/{task → debt}/identity.js +35 -35
- package/build/src/debt/index.d.ts +111 -0
- package/build/src/debt/index.js +203 -0
- package/build/src/{task → debt}/input.d.ts +8 -8
- package/build/src/{task → debt}/input.js +21 -21
- package/build/src/debt/lifecycle-operations.d.ts +6 -0
- package/build/src/{task → debt}/lifecycle-operations.js +27 -31
- package/build/src/debt/mutation-result.d.ts +981 -0
- package/build/src/debt/mutation-result.js +109 -0
- package/build/src/debt/mutation.d.ts +424 -0
- package/build/src/debt/mutation.js +223 -0
- package/build/src/debt/operation-types.d.ts +71 -0
- package/build/src/debt/operations.d.ts +28 -0
- package/build/src/{task → debt}/operations.js +59 -60
- package/build/src/debt/query.d.ts +76 -0
- package/build/src/{task → debt}/query.js +55 -55
- package/build/src/{task → debt}/store.d.ts +13 -13
- package/build/src/{task → debt}/store.js +58 -49
- package/build/src/debt/view.d.ts +4 -0
- package/build/src/debt/view.js +7 -0
- package/build/src/dispatch/index.d.ts +3 -3
- package/build/src/dispatch/index.js +1 -2
- package/build/src/git/observe.d.ts +6 -2
- package/build/src/git/observe.js +6 -2
- package/build/src/identity/coordinates.d.ts +1 -1
- package/build/src/index.d.ts +17 -17
- package/build/src/index.js +11 -11
- package/build/src/kanshi/index.d.ts +2 -2
- package/build/src/kanshi/read.js +54 -39
- package/build/src/kanshi/report.d.ts +7 -7
- package/build/src/kanshi/select.js +4 -4
- package/build/src/library/address.js +2 -4
- package/build/src/library/akuma-creation.d.ts +5 -1
- package/build/src/library/akuma-creation.js +27 -47
- package/build/src/library/akumas.d.ts +7 -7
- package/build/src/library/akumas.js +13 -9
- package/build/src/library/bind.d.ts +17 -17
- package/build/src/library/bind.js +16 -12
- package/build/src/library/contract-address.d.ts +9 -0
- package/build/src/library/contract-address.js +71 -0
- package/build/src/library/contract-composition.d.ts +4 -7
- package/build/src/library/contract-composition.js +6 -18
- package/build/src/library/contract-creation.d.ts +3 -5
- package/build/src/library/contract-creation.js +24 -22
- package/build/src/library/contract-execution.js +21 -26
- package/build/src/library/contract-outcomes.d.ts +2 -14
- package/build/src/library/contract-outcomes.js +2 -13
- package/build/src/library/contract-types.d.ts +38 -4
- package/build/src/library/delivery.d.ts +0 -2
- package/build/src/library/delivery.js +2 -5
- package/build/src/library/input.d.ts +2 -2
- package/build/src/library/input.js +5 -5
- package/build/src/library/invocation.js +2 -2
- package/build/src/library/keiyaku.d.ts +0 -5
- package/build/src/library/keiyaku.js +6 -12
- package/build/src/library/nuke.js +3 -3
- package/build/src/library/outcome.d.ts +626 -625
- package/build/src/library/outcome.js +13 -3
- package/build/src/library/reconcile.js +8 -16
- package/build/src/library/refusal.d.ts +2 -2
- package/build/src/library/repo.d.ts +3 -2
- package/build/src/library/repo.js +10 -5
- package/build/src/library/selection.d.ts +5 -8
- package/build/src/library/selection.js +22 -73
- package/build/src/plugin/akuma-signals.d.ts +2 -0
- package/build/src/plugin/akuma-signals.js +4 -0
- package/build/src/plugin/public.d.ts +32 -2
- package/build/src/plugin/runtime.js +5 -3
- package/build/src/protocol/amend.js +3 -2
- package/build/src/protocol/attempt.js +3 -8
- package/build/src/protocol/bind.d.ts +2 -2
- package/build/src/protocol/bind.js +1 -1
- package/build/src/protocol/deliver.js +3 -3
- package/build/src/protocol/operations.d.ts +1 -3
- package/build/src/protocol/operations.js +0 -8
- package/build/src/protocol/outcome.d.ts +1 -2
- package/build/src/protocol/outcome.js +1 -13
- package/build/src/protocol/placement.js +3 -10
- package/build/src/protocol/read/status.js +31 -70
- package/build/src/protocol/reintegrate.js +3 -10
- package/build/src/protocol/review.js +3 -3
- package/build/src/protocol/run.d.ts +5 -1
- package/build/src/protocol/run.js +3 -3
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/build/src/settlement/fence.d.ts +3 -3
- package/build/src/settlement/fence.js +4 -4
- package/build/src/settlement/holder.d.ts +16 -16
- package/build/src/settlement/holder.js +69 -63
- package/build/src/settlement/settle.d.ts +5 -5
- package/build/src/settlement/settle.js +53 -53
- package/package.json +19 -9
- package/plugins/paseo/plugin/index.server.ts +17 -0
- package/plugins/paseo/plugin/paseo-plugin.json +4 -0
- package/plugins/paseo/plugin/server/attach.ts +52 -0
- package/plugins/paseo/plugin/server/keiyaku.ts +44 -0
- package/plugins/paseo/plugin/server/message.ts +60 -0
- package/plugins/paseo/plugin/server/mirror.ts +193 -0
- package/plugins/paseo/plugin/server/model.ts +14 -0
- package/plugins/paseo/plugin/server/provider.ts +276 -0
- package/plugins/paseo/plugin/server/sdk-worker.ts +237 -0
- package/plugins/paseo/plugin/server/sdk.ts +289 -0
- package/plugins/paseo/plugin/server/stop.ts +26 -0
- package/plugins/paseo/plugin/server/transport.ts +35 -0
- package/plugins/paseo/plugin/shared/attach-rpc.ts +10 -0
- package/plugins/paseo/plugin/shared/refresh-rpc.ts +6 -0
- package/plugins/paseo/plugin/tsconfig.json +6 -0
- package/plugins/pi/keiyaku.ts +57 -0
- package/skills/keiyaku/SKILL.md +43 -0
- package/skills/keiyaku-akuma/SKILL.md +130 -0
- package/skills/keiyaku-akuma/references/automation.md +269 -0
- package/skills/keiyaku-babysit/SKILL.md +65 -0
- package/skills/keiyaku-bind/SKILL.md +216 -0
- package/skills/keiyaku-bind/agents/openai.yaml +4 -0
- package/skills/keiyaku-debt/SKILL.md +91 -0
- package/skills/keiyaku-workflow/SKILL.md +129 -0
- package/build/plugins/claude/skills/keiyaku-task/SKILL.md +0 -104
- package/build/plugins/codex/skills/keiyaku-task/SKILL.md +0 -104
- package/build/plugins/opencode/skills/keiyaku-task/SKILL.md +0 -104
- package/build/skills/keiyaku-task/SKILL.md +0 -104
- package/build/src/cli/commands/amend.d.ts +0 -12
- package/build/src/cli/commands/amend.js +0 -10
- package/build/src/cli/commands/bind.d.ts +0 -11
- package/build/src/cli/commands/bind.js +0 -23
- package/build/src/cli/commands/task-grammar.d.ts +0 -19
- package/build/src/cli/commands/task-grammar.js +0 -384
- package/build/src/cli/commands/task-query.d.ts +0 -5
- package/build/src/cli/render/task.d.ts +0 -41
- package/build/src/dispatch/association.d.ts +0 -1
- package/build/src/dispatch/association.js +0 -1
- package/build/src/task/board.d.ts +0 -168
- package/build/src/task/catalog.d.ts +0 -11
- package/build/src/task/catalog.js +0 -59
- package/build/src/task/compose-language.d.ts +0 -57
- package/build/src/task/compose-language.js +0 -364
- package/build/src/task/compose-parser.d.ts +0 -32
- package/build/src/task/compose-parser.js +0 -180
- package/build/src/task/compose.d.ts +0 -16
- package/build/src/task/compose.js +0 -189
- package/build/src/task/document.d.ts +0 -39
- package/build/src/task/identity.d.ts +0 -21
- package/build/src/task/index.d.ts +0 -138
- package/build/src/task/index.js +0 -269
- package/build/src/task/lifecycle-operations.d.ts +0 -6
- package/build/src/task/mutation-result.d.ts +0 -1726
- package/build/src/task/mutation-result.js +0 -198
- package/build/src/task/mutation.d.ts +0 -590
- package/build/src/task/mutation.js +0 -262
- package/build/src/task/operation-types.d.ts +0 -71
- package/build/src/task/operations.d.ts +0 -28
- package/build/src/task/query.d.ts +0 -76
- package/build/src/task/view.d.ts +0 -4
- package/build/src/task/view.js +0 -7
- /package/build/src/{task → debt}/operation-types.js +0 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: keiyaku-debt
|
|
3
|
+
description: >-
|
|
4
|
+
Must read when recording confirmed unresolved work or dependencies in Debts.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Keiyaku Debt
|
|
8
|
+
|
|
9
|
+
A Debt records confirmed unresolved work and its relationships. Debt is an
|
|
10
|
+
independent product; it is not a Contract, Arc, Akuma, permission, acceptance
|
|
11
|
+
boundary, or fulfillment lifecycle.
|
|
12
|
+
|
|
13
|
+
## 1. When To Use A Debt
|
|
14
|
+
|
|
15
|
+
Use a Debt when confirmed unresolved work or a dependency must outlive the
|
|
16
|
+
current conversation. Keep plans and execution progress in reasoning or session
|
|
17
|
+
notes instead.
|
|
18
|
+
|
|
19
|
+
- Use a `kei` for one independently acceptable outcome.
|
|
20
|
+
- Use an Arc for a chapter inside one `kei`.
|
|
21
|
+
- Use a Debt for confirmed unresolved work and its prerequisites.
|
|
22
|
+
- Do not create a Debt just to mirror a `kei`.
|
|
23
|
+
|
|
24
|
+
A Debt may exist without a Contract. Associating a Debt with a `kei` does not
|
|
25
|
+
transfer the Contract's holder, acceptance, or lifecycle to the Debt.
|
|
26
|
+
|
|
27
|
+
## 2. Relationships And Parallel Work
|
|
28
|
+
|
|
29
|
+
Independent work may proceed in parallel when its dependencies allow it.
|
|
30
|
+
Debt records no execution-progress state.
|
|
31
|
+
|
|
32
|
+
Use the relationships for their actual meanings:
|
|
33
|
+
|
|
34
|
+
- `needs` means this Debt must wait for another Debt to become terminal.
|
|
35
|
+
- `parent` groups decomposition; it does not create a dependency.
|
|
36
|
+
- `supersedes` points to work replaced by this Debt.
|
|
37
|
+
- `relates` records a connection without affecting readiness.
|
|
38
|
+
|
|
39
|
+
Only `needs` orders work. Do not add it because Debts touch the same Region or
|
|
40
|
+
because one Debt is related to another. A terminal Debt releases its dependents.
|
|
41
|
+
|
|
42
|
+
## 3. Debt Commands
|
|
43
|
+
|
|
44
|
+
Create and inspect Debts:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
keiyaku debt add "<title>"
|
|
48
|
+
keiyaku debt add "<title>" --priority 1 --needs <debt-id>
|
|
49
|
+
keiyaku debt show <debt-id>
|
|
50
|
+
keiyaku debt ls
|
|
51
|
+
keiyaku debt ready
|
|
52
|
+
keiyaku debt blocked
|
|
53
|
+
keiyaku debt tree <debt-id>
|
|
54
|
+
keiyaku debt doctor
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use complete Debt IDs for targeted commands. `ls`, `ready`, and `blocked` use
|
|
58
|
+
the current namespace; use `--world` to inspect the complete Debt world.
|
|
59
|
+
|
|
60
|
+
Close work:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
keiyaku debt done <debt-id>...
|
|
64
|
+
keiyaku debt drop <debt-id>... --note "<reason>"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use `done` when the Debt is complete. Use `drop` when it is no longer owed.
|
|
68
|
+
Both terminal states release dependent Debts. Unresolved `needs` appear in
|
|
69
|
+
`blocked`; open work with all prerequisites terminal appears in `ready`.
|
|
70
|
+
|
|
71
|
+
Update a Debt without changing its lifecycle:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
keiyaku debt update <debt-id> --title "<title>"
|
|
75
|
+
keiyaku debt update <debt-id> --body "<body>"
|
|
76
|
+
keiyaku debt update <debt-id> --needs <debt-id>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 4. After Creating A Debt
|
|
80
|
+
|
|
81
|
+
Read the returned Debt identity. Then:
|
|
82
|
+
|
|
83
|
+
1. Add or remove relationships when the confirmed prerequisites change.
|
|
84
|
+
2. Mark completed work `done`, or work no longer owed `drop` with a reason.
|
|
85
|
+
3. Use `ready`, `blocked`, `tree`, or `doctor` to inspect the current ledger.
|
|
86
|
+
|
|
87
|
+
Debt records unresolved work. It does not perform the work, claim acceptance,
|
|
88
|
+
assign a holder, or decide what a Contract may accept.
|
|
89
|
+
|
|
90
|
+
Read `keiyaku-bind` for Contract authoring and `keiyaku-workflow` for Contract
|
|
91
|
+
lifecycle.
|
|
@@ -33,7 +33,7 @@ to create parallel work.
|
|
|
33
33
|
|
|
34
34
|
- Separate `kei`s have independently acceptable outcomes.
|
|
35
35
|
- An Arc is a chapter of one `kei`; it is not separately accepted.
|
|
36
|
-
- A
|
|
36
|
+
- A Debt records confirmed unresolved work and its dependencies.
|
|
37
37
|
|
|
38
38
|
Use `after` only when one `kei` requires another to be accepted first. Ordinary
|
|
39
39
|
overlap is not a dependency.
|
|
@@ -101,7 +101,7 @@ authority.
|
|
|
101
101
|
| Role | Grant at birth | Return |
|
|
102
102
|
| --- | --- | --- |
|
|
103
103
|
| Holder | The actions the delegated loop will perform; include `contract.review` when this holder will review. Commission with the `kei`, current Arc when one exists, appointed worktree, and holder duties. | Acceptance or abandonment, with receipts. |
|
|
104
|
-
| Deliverer | The ordinary baseline: every
|
|
104
|
+
| Deliverer | The ordinary baseline: every Debt mutation, Contract audit and delivery, and Akuma management. `keiyaku -C <repo> call worker --alias @deliverer --contract <kei/...> --workdir <appointed-path> -` | The delivery receipt. |
|
|
105
105
|
| Reviewer | `--allowed contract.review`: `keiyaku -C <repo> call review-akuma --alias @reviewer --contract <kei/...> --workdir <appointed-path> --allowed contract.review -` | The verdict receipt. Without the grant, `not-allowed` refuses and no verdict is recorded. |
|
|
106
106
|
|
|
107
107
|
An Archetype's explicit allowed set replaces the ordinary baseline; check
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
|
|
4
|
-
const skills = ["keiyaku", "keiyaku-
|
|
4
|
+
const skills = ["keiyaku", "keiyaku-debt", "keiyaku-bind", "keiyaku-workflow", "keiyaku-akuma", "keiyaku-babysit"].map(
|
|
5
5
|
(name) => fileURLToPath(new URL(`./skills/${name}/SKILL.md`, import.meta.url)),
|
|
6
6
|
);
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: keiyaku
|
|
3
3
|
description: >-
|
|
4
|
-
Keiyaku is a CLI that records
|
|
4
|
+
Keiyaku is a CLI that records unresolved work, writes handoff terms for deliveries,
|
|
5
5
|
and calls delegates. Use this skill when you need to figure out which
|
|
6
6
|
Keiyaku skill or command to reach for.
|
|
7
7
|
---
|
|
@@ -10,8 +10,8 @@ description: >-
|
|
|
10
10
|
|
|
11
11
|
## Model
|
|
12
12
|
|
|
13
|
-
Keiyaku is three independent pillars, not a bundle: **
|
|
14
|
-
and dependencies, **Contract** makes acceptance standing and auditable,
|
|
13
|
+
Keiyaku is three independent pillars, not a bundle: **Debt** records unresolved
|
|
14
|
+
work and dependencies, **Contract** makes acceptance standing and auditable,
|
|
15
15
|
**Akuma** invokes capability. Use any one alone; combine them only when the
|
|
16
16
|
work calls for it. Behind every Contract in flight there is one holder of its
|
|
17
17
|
fulfillment loop — whoever turns intent into commissions and returns into
|
|
@@ -23,9 +23,8 @@ equally. See `keiyaku-workflow` for the loop, `keiyaku-bind` for authoring,
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
keiyaku -C <repo>
|
|
27
|
-
keiyaku -C <repo>
|
|
28
|
-
keiyaku -C <repo> bind [--task <task-id>] -
|
|
26
|
+
keiyaku -C <repo> debt add "title"
|
|
27
|
+
keiyaku -C <repo> bind [--debt <debt-id>] -
|
|
29
28
|
keiyaku -C <repo> status
|
|
30
29
|
keiyaku -C <repo> deliver [<contract>|@<contract>]
|
|
31
30
|
keiyaku -C <repo> review [<contract>|@<contract>] --satisfied
|
|
@@ -113,7 +113,7 @@ complete grammar.
|
|
|
113
113
|
## JavaScript automation
|
|
114
114
|
|
|
115
115
|
Use [Automation With The Akuma API](references/automation.md) for a
|
|
116
|
-
|
|
116
|
+
debt-specific JavaScript coordinator, structured answers, or multi-worker
|
|
117
117
|
orchestration. The CLI is enough for one commission and its return. A
|
|
118
118
|
prompt-free birth followed by one input-bound ask uses the same identity:
|
|
119
119
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Automation With The Akuma API
|
|
2
2
|
|
|
3
3
|
Use this guide when the work calls for a program that coordinates agents,
|
|
4
|
-
not a sequence of manual CLI calls. Start with the current
|
|
4
|
+
not a sequence of manual CLI calls. Start with the current debt, invent an
|
|
5
5
|
appropriate algorithm, write it as ordinary JavaScript, and run it. Treat
|
|
6
6
|
examples here as material to adapt, not a mandatory workflow or a new product
|
|
7
7
|
API. Product semantics remain owned by the repository's `docs/` chapters.
|
|
8
8
|
|
|
9
|
-
## Write A Harness For This
|
|
9
|
+
## Write A Harness For This Debt
|
|
10
10
|
|
|
11
11
|
A dynamic workflow is more than parallel delegation. The flagship writes a
|
|
12
|
-
small,
|
|
12
|
+
small, debt-specific program whose variables hold intermediate answers and
|
|
13
13
|
whose control flow performs comparisons, branching, filtering, experiments,
|
|
14
14
|
and verification. Only the useful final result needs to enter the flagship's
|
|
15
15
|
context. The program itself is an inspectable, reusable artifact.
|
|
@@ -21,7 +21,7 @@ The useful combination is:
|
|
|
21
21
|
- JavaScript holds the plan, candidate sets, budgets, and stopping conditions.
|
|
22
22
|
- AkuId lets a later step reconnect to an existing worker when continuity helps.
|
|
23
23
|
|
|
24
|
-
Reach for this when the
|
|
24
|
+
Reach for this when the debt needs many independent judgments, repeated
|
|
25
25
|
experiments, adversarial checking, or a reusable orchestration artifact. A
|
|
26
26
|
single bounded question usually needs one worker, not a panel.
|
|
27
27
|
|
|
@@ -30,7 +30,7 @@ single bounded question usually needs one worker, not a panel.
|
|
|
30
30
|
Do not stop at "one reviewer per directory." Choose an algorithm around the
|
|
31
31
|
judgment you need:
|
|
32
32
|
|
|
33
|
-
|
|
|
33
|
+
| Debt | Debt-specific orchestration |
|
|
34
34
|
| --- | --- |
|
|
35
35
|
| Find a name or visual direction with taste | Generate candidates from deliberately different directions; anonymize them; run pairwise judging agents; retain finalists and rejection reasons; generate another round against the discovered weaknesses. |
|
|
36
36
|
| Rank a large qualitative backlog | Use agents as comparators, with code maintaining buckets or tournament brackets. Repeat disputed comparisons. Do not assume subjective preferences are transitive or absolute scores calibrated. |
|
|
@@ -118,7 +118,7 @@ unknowns in the requested value; acceptance still needs a suitable judge.
|
|
|
118
118
|
The following continues the script above. One agent determines the claim set;
|
|
119
119
|
code fans out verification with bounded concurrency; only supported claims go
|
|
120
120
|
to fresh skeptics. The program keeps every item's success or failure. Adapt
|
|
121
|
-
the prompts, schemas, routing, and selection to the
|
|
121
|
+
the prompts, schemas, routing, and selection to the debt rather than always
|
|
122
122
|
running this exact pipeline.
|
|
123
123
|
|
|
124
124
|
```js
|
|
@@ -206,7 +206,7 @@ console.log(JSON.stringify(
|
|
|
206
206
|
|
|
207
207
|
This script has a bounded work set (12 claims), at most two item pipelines in
|
|
208
208
|
flight, and at most two fresh judges per claim. Each item advances to its own
|
|
209
|
-
next stage without waiting for unrelated items. A different
|
|
209
|
+
next stage without waiting for unrelated items. A different debt might need
|
|
210
210
|
pairwise comparisons, experiment queues, or adaptive sampling instead.
|
|
211
211
|
|
|
212
212
|
## Failure, Control, And Reconnection
|
|
@@ -264,6 +264,6 @@ observations for program control, not delivery notifications as receipts.
|
|
|
264
264
|
|
|
265
265
|
These are sources of techniques, not Keiyaku runtime guarantees:
|
|
266
266
|
|
|
267
|
-
- [A harness for every
|
|
267
|
+
- [A harness for every debt: dynamic workflows in Claude Code](https://claude.com/blog/a-harness-for-every-debt-dynamic-workflows-in-claude-code)
|
|
268
268
|
- [Orchestrate subagents at scale with dynamic workflows](https://platform.claude.com/cookbook/claude-agent-sdk-08-dynamic-workflows)
|
|
269
269
|
- [Claude Code workflow runtime](https://code.claude.com/docs/en/workflows)
|
|
@@ -59,7 +59,7 @@ does not move without you.
|
|
|
59
59
|
|
|
60
60
|
## What Babysitting Never Owns
|
|
61
61
|
|
|
62
|
-
Commands and semantics belong to
|
|
62
|
+
Commands and semantics belong to debt, bind, workflow, and akuma. Acceptance
|
|
63
63
|
belongs to the Contract's journal and its Reviewer's testimony. The question
|
|
64
64
|
belongs to whoever commissioned it. Babysitting decides only when you look and
|
|
65
65
|
what you check next.
|
|
@@ -59,14 +59,14 @@ writing one broad Objective around unrelated fixes.
|
|
|
59
59
|
|
|
60
60
|
- Use an Arc only for a chapter inside that one acceptance boundary; an Arc is
|
|
61
61
|
not separately accepted and MUST NOT substitute for an independent `kei`.
|
|
62
|
-
- Use a
|
|
63
|
-
current conversation.
|
|
62
|
+
- Use a Debt for confirmed unresolved work and dependencies that must outlive
|
|
63
|
+
the current conversation.
|
|
64
64
|
|
|
65
65
|
A `kei` owns one independently acceptable outcome and its delivery lifecycle. A
|
|
66
|
-
|
|
66
|
+
Debt records confirmed unresolved work; it may exist without a `kei`,
|
|
67
67
|
and it does not create a second acceptance or lifecycle. Associate a `kei` with
|
|
68
|
-
an existing
|
|
69
|
-
Do not create a
|
|
68
|
+
an existing Debt only when the delivery actually settles that unresolved work.
|
|
69
|
+
Do not create a Debt just to mirror a `kei`.
|
|
70
70
|
|
|
71
71
|
### Parallel Work
|
|
72
72
|
|
|
@@ -74,7 +74,7 @@ Parallel work is the default.
|
|
|
74
74
|
|
|
75
75
|
- Bind and advance independent `kei`s in parallel. Each has its own acceptance
|
|
76
76
|
boundary and holder.
|
|
77
|
-
- Within one `kei`, run independent
|
|
77
|
+
- Within one `kei`, run independent Debts or Arc chapters in parallel whenever
|
|
78
78
|
their work can proceed independently. They converge on the one acceptance
|
|
79
79
|
boundary, which the holder owns.
|
|
80
80
|
|
|
@@ -162,10 +162,10 @@ prospective candidate. Without `verified`, no verb runs Verification and the
|
|
|
162
162
|
section is inert document text. `reviewed` independently requires review
|
|
163
163
|
evidence. Selected gates are checked at placement.
|
|
164
164
|
|
|
165
|
-
For an existing
|
|
165
|
+
For an existing Debt that this delivery settles:
|
|
166
166
|
|
|
167
167
|
```bash
|
|
168
|
-
keiyaku -C <repo> bind --
|
|
168
|
+
keiyaku -C <repo> bind --debt <debt/...> - < CONTRACT.md
|
|
169
169
|
```
|
|
170
170
|
|
|
171
171
|
For a real logical dependency between Contracts:
|
|
@@ -204,7 +204,7 @@ waiting, the stated prerequisites remain; do not bind a duplicate Contract.
|
|
|
204
204
|
|
|
205
205
|
The holder now owns the lifecycle:
|
|
206
206
|
|
|
207
|
-
1. Start the work directly or delegate
|
|
207
|
+
1. Start the work directly or delegate Debts, Arc chapters, Akumas, or Contract roles.
|
|
208
208
|
2. Run independent work in parallel and let it converge on the one acceptance
|
|
209
209
|
boundary.
|
|
210
210
|
3. Prepare and deliver the candidate.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: keiyaku-debt
|
|
3
|
+
description: >-
|
|
4
|
+
Must read when recording confirmed unresolved work or dependencies in Debts.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Keiyaku Debt
|
|
8
|
+
|
|
9
|
+
A Debt records confirmed unresolved work and its relationships. Debt is an
|
|
10
|
+
independent product; it is not a Contract, Arc, Akuma, permission, acceptance
|
|
11
|
+
boundary, or fulfillment lifecycle.
|
|
12
|
+
|
|
13
|
+
## 1. When To Use A Debt
|
|
14
|
+
|
|
15
|
+
Use a Debt when confirmed unresolved work or a dependency must outlive the
|
|
16
|
+
current conversation. Keep plans and execution progress in reasoning or session
|
|
17
|
+
notes instead.
|
|
18
|
+
|
|
19
|
+
- Use a `kei` for one independently acceptable outcome.
|
|
20
|
+
- Use an Arc for a chapter inside one `kei`.
|
|
21
|
+
- Use a Debt for confirmed unresolved work and its prerequisites.
|
|
22
|
+
- Do not create a Debt just to mirror a `kei`.
|
|
23
|
+
|
|
24
|
+
A Debt may exist without a Contract. Associating a Debt with a `kei` does not
|
|
25
|
+
transfer the Contract's holder, acceptance, or lifecycle to the Debt.
|
|
26
|
+
|
|
27
|
+
## 2. Relationships And Parallel Work
|
|
28
|
+
|
|
29
|
+
Independent work may proceed in parallel when its dependencies allow it.
|
|
30
|
+
Debt records no execution-progress state.
|
|
31
|
+
|
|
32
|
+
Use the relationships for their actual meanings:
|
|
33
|
+
|
|
34
|
+
- `needs` means this Debt must wait for another Debt to become terminal.
|
|
35
|
+
- `parent` groups decomposition; it does not create a dependency.
|
|
36
|
+
- `supersedes` points to work replaced by this Debt.
|
|
37
|
+
- `relates` records a connection without affecting readiness.
|
|
38
|
+
|
|
39
|
+
Only `needs` orders work. Do not add it because Debts touch the same Region or
|
|
40
|
+
because one Debt is related to another. A terminal Debt releases its dependents.
|
|
41
|
+
|
|
42
|
+
## 3. Debt Commands
|
|
43
|
+
|
|
44
|
+
Create and inspect Debts:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
keiyaku debt add "<title>"
|
|
48
|
+
keiyaku debt add "<title>" --priority 1 --needs <debt-id>
|
|
49
|
+
keiyaku debt show <debt-id>
|
|
50
|
+
keiyaku debt ls
|
|
51
|
+
keiyaku debt ready
|
|
52
|
+
keiyaku debt blocked
|
|
53
|
+
keiyaku debt tree <debt-id>
|
|
54
|
+
keiyaku debt doctor
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use complete Debt IDs for targeted commands. `ls`, `ready`, and `blocked` use
|
|
58
|
+
the current namespace; use `--world` to inspect the complete Debt world.
|
|
59
|
+
|
|
60
|
+
Close work:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
keiyaku debt done <debt-id>...
|
|
64
|
+
keiyaku debt drop <debt-id>... --note "<reason>"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Use `done` when the Debt is complete. Use `drop` when it is no longer owed.
|
|
68
|
+
Both terminal states release dependent Debts. Unresolved `needs` appear in
|
|
69
|
+
`blocked`; open work with all prerequisites terminal appears in `ready`.
|
|
70
|
+
|
|
71
|
+
Update a Debt without changing its lifecycle:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
keiyaku debt update <debt-id> --title "<title>"
|
|
75
|
+
keiyaku debt update <debt-id> --body "<body>"
|
|
76
|
+
keiyaku debt update <debt-id> --needs <debt-id>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 4. After Creating A Debt
|
|
80
|
+
|
|
81
|
+
Read the returned Debt identity. Then:
|
|
82
|
+
|
|
83
|
+
1. Add or remove relationships when the confirmed prerequisites change.
|
|
84
|
+
2. Mark completed work `done`, or work no longer owed `drop` with a reason.
|
|
85
|
+
3. Use `ready`, `blocked`, `tree`, or `doctor` to inspect the current ledger.
|
|
86
|
+
|
|
87
|
+
Debt records unresolved work. It does not perform the work, claim acceptance,
|
|
88
|
+
assign a holder, or decide what a Contract may accept.
|
|
89
|
+
|
|
90
|
+
Read `keiyaku-bind` for Contract authoring and `keiyaku-workflow` for Contract
|
|
91
|
+
lifecycle.
|
|
@@ -33,7 +33,7 @@ to create parallel work.
|
|
|
33
33
|
|
|
34
34
|
- Separate `kei`s have independently acceptable outcomes.
|
|
35
35
|
- An Arc is a chapter of one `kei`; it is not separately accepted.
|
|
36
|
-
- A
|
|
36
|
+
- A Debt records confirmed unresolved work and its dependencies.
|
|
37
37
|
|
|
38
38
|
Use `after` only when one `kei` requires another to be accepted first. Ordinary
|
|
39
39
|
overlap is not a dependency.
|
|
@@ -101,7 +101,7 @@ authority.
|
|
|
101
101
|
| Role | Grant at birth | Return |
|
|
102
102
|
| --- | --- | --- |
|
|
103
103
|
| Holder | The actions the delegated loop will perform; include `contract.review` when this holder will review. Commission with the `kei`, current Arc when one exists, appointed worktree, and holder duties. | Acceptance or abandonment, with receipts. |
|
|
104
|
-
| Deliverer | The ordinary baseline: every
|
|
104
|
+
| Deliverer | The ordinary baseline: every Debt mutation, Contract audit and delivery, and Akuma management. `keiyaku -C <repo> call worker --alias @deliverer --contract <kei/...> --workdir <appointed-path> -` | The delivery receipt. |
|
|
105
105
|
| Reviewer | `--allowed contract.review`: `keiyaku -C <repo> call review-akuma --alias @reviewer --contract <kei/...> --workdir <appointed-path> --allowed contract.review -` | The verdict receipt. Without the grant, `not-allowed` refuses and no verdict is recorded. |
|
|
106
106
|
|
|
107
107
|
An Archetype's explicit allowed set replaces the ordinary baseline; check
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { dirname, resolve } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
1
|
import type { ExtensionAPI, Theme } from "@earendil-works/pi-coding-agent";
|
|
5
2
|
|
|
6
3
|
type ExecResult = Readonly<{ stdout: string; stderr: string; code: number }>;
|
|
7
4
|
|
|
8
5
|
async function runStatus(pi: ExtensionAPI): Promise<ExecResult> {
|
|
9
|
-
const bundledCli = resolve(dirname(fileURLToPath(import.meta.url)), "../../src/cli/index.js");
|
|
10
|
-
if (existsSync(bundledCli)) return await pi.exec(process.execPath, [bundledCli, "status"]);
|
|
11
6
|
return await pi.exec("keiyaku", ["status"]);
|
|
12
7
|
}
|
|
13
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: keiyaku
|
|
3
3
|
description: >-
|
|
4
|
-
Keiyaku is a CLI that records
|
|
4
|
+
Keiyaku is a CLI that records unresolved work, writes handoff terms for deliveries,
|
|
5
5
|
and calls delegates. Use this skill when you need to figure out which
|
|
6
6
|
Keiyaku skill or command to reach for.
|
|
7
7
|
---
|
|
@@ -10,8 +10,8 @@ description: >-
|
|
|
10
10
|
|
|
11
11
|
## Model
|
|
12
12
|
|
|
13
|
-
Keiyaku is three independent pillars, not a bundle: **
|
|
14
|
-
and dependencies, **Contract** makes acceptance standing and auditable,
|
|
13
|
+
Keiyaku is three independent pillars, not a bundle: **Debt** records unresolved
|
|
14
|
+
work and dependencies, **Contract** makes acceptance standing and auditable,
|
|
15
15
|
**Akuma** invokes capability. Use any one alone; combine them only when the
|
|
16
16
|
work calls for it. Behind every Contract in flight there is one holder of its
|
|
17
17
|
fulfillment loop — whoever turns intent into commissions and returns into
|
|
@@ -23,9 +23,8 @@ equally. See `keiyaku-workflow` for the loop, `keiyaku-bind` for authoring,
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
keiyaku -C <repo>
|
|
27
|
-
keiyaku -C <repo>
|
|
28
|
-
keiyaku -C <repo> bind [--task <task-id>] -
|
|
26
|
+
keiyaku -C <repo> debt add "title"
|
|
27
|
+
keiyaku -C <repo> bind [--debt <debt-id>] -
|
|
29
28
|
keiyaku -C <repo> status
|
|
30
29
|
keiyaku -C <repo> deliver [<contract>|@<contract>]
|
|
31
30
|
keiyaku -C <repo> review [<contract>|@<contract>] --satisfied
|
|
@@ -113,7 +113,7 @@ complete grammar.
|
|
|
113
113
|
## JavaScript automation
|
|
114
114
|
|
|
115
115
|
Use [Automation With The Akuma API](references/automation.md) for a
|
|
116
|
-
|
|
116
|
+
debt-specific JavaScript coordinator, structured answers, or multi-worker
|
|
117
117
|
orchestration. The CLI is enough for one commission and its return. A
|
|
118
118
|
prompt-free birth followed by one input-bound ask uses the same identity:
|
|
119
119
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Automation With The Akuma API
|
|
2
2
|
|
|
3
3
|
Use this guide when the work calls for a program that coordinates agents,
|
|
4
|
-
not a sequence of manual CLI calls. Start with the current
|
|
4
|
+
not a sequence of manual CLI calls. Start with the current debt, invent an
|
|
5
5
|
appropriate algorithm, write it as ordinary JavaScript, and run it. Treat
|
|
6
6
|
examples here as material to adapt, not a mandatory workflow or a new product
|
|
7
7
|
API. Product semantics remain owned by the repository's `docs/` chapters.
|
|
8
8
|
|
|
9
|
-
## Write A Harness For This
|
|
9
|
+
## Write A Harness For This Debt
|
|
10
10
|
|
|
11
11
|
A dynamic workflow is more than parallel delegation. The flagship writes a
|
|
12
|
-
small,
|
|
12
|
+
small, debt-specific program whose variables hold intermediate answers and
|
|
13
13
|
whose control flow performs comparisons, branching, filtering, experiments,
|
|
14
14
|
and verification. Only the useful final result needs to enter the flagship's
|
|
15
15
|
context. The program itself is an inspectable, reusable artifact.
|
|
@@ -21,7 +21,7 @@ The useful combination is:
|
|
|
21
21
|
- JavaScript holds the plan, candidate sets, budgets, and stopping conditions.
|
|
22
22
|
- AkuId lets a later step reconnect to an existing worker when continuity helps.
|
|
23
23
|
|
|
24
|
-
Reach for this when the
|
|
24
|
+
Reach for this when the debt needs many independent judgments, repeated
|
|
25
25
|
experiments, adversarial checking, or a reusable orchestration artifact. A
|
|
26
26
|
single bounded question usually needs one worker, not a panel.
|
|
27
27
|
|
|
@@ -30,7 +30,7 @@ single bounded question usually needs one worker, not a panel.
|
|
|
30
30
|
Do not stop at "one reviewer per directory." Choose an algorithm around the
|
|
31
31
|
judgment you need:
|
|
32
32
|
|
|
33
|
-
|
|
|
33
|
+
| Debt | Debt-specific orchestration |
|
|
34
34
|
| --- | --- |
|
|
35
35
|
| Find a name or visual direction with taste | Generate candidates from deliberately different directions; anonymize them; run pairwise judging agents; retain finalists and rejection reasons; generate another round against the discovered weaknesses. |
|
|
36
36
|
| Rank a large qualitative backlog | Use agents as comparators, with code maintaining buckets or tournament brackets. Repeat disputed comparisons. Do not assume subjective preferences are transitive or absolute scores calibrated. |
|
|
@@ -118,7 +118,7 @@ unknowns in the requested value; acceptance still needs a suitable judge.
|
|
|
118
118
|
The following continues the script above. One agent determines the claim set;
|
|
119
119
|
code fans out verification with bounded concurrency; only supported claims go
|
|
120
120
|
to fresh skeptics. The program keeps every item's success or failure. Adapt
|
|
121
|
-
the prompts, schemas, routing, and selection to the
|
|
121
|
+
the prompts, schemas, routing, and selection to the debt rather than always
|
|
122
122
|
running this exact pipeline.
|
|
123
123
|
|
|
124
124
|
```js
|
|
@@ -206,7 +206,7 @@ console.log(JSON.stringify(
|
|
|
206
206
|
|
|
207
207
|
This script has a bounded work set (12 claims), at most two item pipelines in
|
|
208
208
|
flight, and at most two fresh judges per claim. Each item advances to its own
|
|
209
|
-
next stage without waiting for unrelated items. A different
|
|
209
|
+
next stage without waiting for unrelated items. A different debt might need
|
|
210
210
|
pairwise comparisons, experiment queues, or adaptive sampling instead.
|
|
211
211
|
|
|
212
212
|
## Failure, Control, And Reconnection
|
|
@@ -264,6 +264,6 @@ observations for program control, not delivery notifications as receipts.
|
|
|
264
264
|
|
|
265
265
|
These are sources of techniques, not Keiyaku runtime guarantees:
|
|
266
266
|
|
|
267
|
-
- [A harness for every
|
|
267
|
+
- [A harness for every debt: dynamic workflows in Claude Code](https://claude.com/blog/a-harness-for-every-debt-dynamic-workflows-in-claude-code)
|
|
268
268
|
- [Orchestrate subagents at scale with dynamic workflows](https://platform.claude.com/cookbook/claude-agent-sdk-08-dynamic-workflows)
|
|
269
269
|
- [Claude Code workflow runtime](https://code.claude.com/docs/en/workflows)
|
|
@@ -59,7 +59,7 @@ does not move without you.
|
|
|
59
59
|
|
|
60
60
|
## What Babysitting Never Owns
|
|
61
61
|
|
|
62
|
-
Commands and semantics belong to
|
|
62
|
+
Commands and semantics belong to debt, bind, workflow, and akuma. Acceptance
|
|
63
63
|
belongs to the Contract's journal and its Reviewer's testimony. The question
|
|
64
64
|
belongs to whoever commissioned it. Babysitting decides only when you look and
|
|
65
65
|
what you check next.
|
|
@@ -59,14 +59,14 @@ writing one broad Objective around unrelated fixes.
|
|
|
59
59
|
|
|
60
60
|
- Use an Arc only for a chapter inside that one acceptance boundary; an Arc is
|
|
61
61
|
not separately accepted and MUST NOT substitute for an independent `kei`.
|
|
62
|
-
- Use a
|
|
63
|
-
current conversation.
|
|
62
|
+
- Use a Debt for confirmed unresolved work and dependencies that must outlive
|
|
63
|
+
the current conversation.
|
|
64
64
|
|
|
65
65
|
A `kei` owns one independently acceptable outcome and its delivery lifecycle. A
|
|
66
|
-
|
|
66
|
+
Debt records confirmed unresolved work; it may exist without a `kei`,
|
|
67
67
|
and it does not create a second acceptance or lifecycle. Associate a `kei` with
|
|
68
|
-
an existing
|
|
69
|
-
Do not create a
|
|
68
|
+
an existing Debt only when the delivery actually settles that unresolved work.
|
|
69
|
+
Do not create a Debt just to mirror a `kei`.
|
|
70
70
|
|
|
71
71
|
### Parallel Work
|
|
72
72
|
|
|
@@ -74,7 +74,7 @@ Parallel work is the default.
|
|
|
74
74
|
|
|
75
75
|
- Bind and advance independent `kei`s in parallel. Each has its own acceptance
|
|
76
76
|
boundary and holder.
|
|
77
|
-
- Within one `kei`, run independent
|
|
77
|
+
- Within one `kei`, run independent Debts or Arc chapters in parallel whenever
|
|
78
78
|
their work can proceed independently. They converge on the one acceptance
|
|
79
79
|
boundary, which the holder owns.
|
|
80
80
|
|
|
@@ -162,10 +162,10 @@ prospective candidate. Without `verified`, no verb runs Verification and the
|
|
|
162
162
|
section is inert document text. `reviewed` independently requires review
|
|
163
163
|
evidence. Selected gates are checked at placement.
|
|
164
164
|
|
|
165
|
-
For an existing
|
|
165
|
+
For an existing Debt that this delivery settles:
|
|
166
166
|
|
|
167
167
|
```bash
|
|
168
|
-
keiyaku -C <repo> bind --
|
|
168
|
+
keiyaku -C <repo> bind --debt <debt/...> - < CONTRACT.md
|
|
169
169
|
```
|
|
170
170
|
|
|
171
171
|
For a real logical dependency between Contracts:
|
|
@@ -204,7 +204,7 @@ waiting, the stated prerequisites remain; do not bind a duplicate Contract.
|
|
|
204
204
|
|
|
205
205
|
The holder now owns the lifecycle:
|
|
206
206
|
|
|
207
|
-
1. Start the work directly or delegate
|
|
207
|
+
1. Start the work directly or delegate Debts, Arc chapters, Akumas, or Contract roles.
|
|
208
208
|
2. Run independent work in parallel and let it converge on the one acceptance
|
|
209
209
|
boundary.
|
|
210
210
|
3. Prepare and deliver the candidate.
|