@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,59 +7,48 @@ description: >-
|
|
|
7
7
|
|
|
8
8
|
# Keiyaku Babysit
|
|
9
9
|
|
|
10
|
-
Babysitting is
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
| Verdict record refused | Read the worker's analysis in history. Record the verdict yourself if you did not deliver the candidate, or call a new Reviewer and have it inspect current work and record a fresh verdict. The refused request wrote no Contract testimony. |
|
|
56
|
-
| Review stale after changed candidate tender | Normal content-currentness result. Give the same Reviewer the changed diff and current terms with `tell`; have it re-examine and record current testimony. A target move alone does not stale review. |
|
|
57
|
-
| Target moved under the appointed worktree | Have the Deliverer inspect target movement and merge the target branch (main when selected) in that worktree when required; resolve conflicts there, then run `deliver --dry-run` again. Do not resolve against a stale integration preview. |
|
|
58
|
-
| Typed refusal names its rule | Fix the named input or physical condition, then retry from a fresh observation. Do not repeat the same request blindly. |
|
|
59
|
-
|
|
60
|
-
## What Babysitting Never Owns
|
|
61
|
-
|
|
62
|
-
Commands and semantics belong to debt, bind, workflow, and akuma. Acceptance
|
|
63
|
-
belongs to the Contract's journal and its Reviewer's testimony. The question
|
|
64
|
-
belongs to whoever commissioned it. Babysitting decides only when you look and
|
|
65
|
-
what you check next.
|
|
10
|
+
Babysitting is how you drive a fleet of parallel Contracts and Akumas to
|
|
11
|
+
completion without doing the implementation work yourself.
|
|
12
|
+
|
|
13
|
+
## 1. Two Lane Grains: Direct Holding vs. Delegated Holder
|
|
14
|
+
|
|
15
|
+
- **You hold the `kei` (`@deliverer-x`, `@reviewer-x`):** you dispatch the
|
|
16
|
+
Deliverer and Reviewer for each chapter and advance `verify`, `deliver`, and
|
|
17
|
+
`review` as each worker returns.
|
|
18
|
+
- **Delegated holder (`@holder-x`):** you handed the entire fulfillment loop for
|
|
19
|
+
that `kei` to one dedicated Akuma. Watch the Contract's journaled state
|
|
20
|
+
(`status`, `wait kei/...`) and steer **through** `@holder-x` with `tell` —
|
|
21
|
+
never bypass the holder to micromanage its workers directly.
|
|
22
|
+
|
|
23
|
+
## 2. The Event-Driven Supervision Loop
|
|
24
|
+
|
|
25
|
+
1. **Scan the board (`status`):** check which `kei`s are ready to land, which
|
|
26
|
+
are waiting on `after` prerequisites or gates, and which `@alias`es are
|
|
27
|
+
running (`●`), succeeded (`✓`), or failed (`!`).
|
|
28
|
+
2. **Wait on the fleet (`wait`):** pass all in-flight worker `@alias`es to
|
|
29
|
+
`wait` (wakes as soon as *any* worker settles by default), or pass active
|
|
30
|
+
`kei/...` IDs to wait for journal transitions (do not mix `aku/...` and
|
|
31
|
+
`kei/...` in one `wait`).
|
|
32
|
+
3. **Act on the waking lane immediately:** inspect its receipt or `history`,
|
|
33
|
+
steer with `tell` or launch the next stage (such as `@reviewer` after
|
|
34
|
+
`@deliverer` tenders), then return to `wait` for the remaining lanes.
|
|
35
|
+
|
|
36
|
+
## 3. Parallel Landing And Lane Recovery
|
|
37
|
+
|
|
38
|
+
- **When a sibling `kei` lands on the same target branch:** do **not** ask
|
|
39
|
+
other lanes' Deliverers to rebase or re-`deliver` preemptively — Keiyaku
|
|
40
|
+
re-integrates clean target movement and ready `after` dependents
|
|
41
|
+
automatically, and standing `review` testimony stays valid when the diff is
|
|
42
|
+
unchanged. Act only on what the receipt asks for:
|
|
43
|
+
- `⧗ awaiting verification ...`: run a fresh `verify` directly (no rebase or
|
|
44
|
+
re-`deliver`).
|
|
45
|
+
- Merge conflict: have the Deliverer merge the target branch in the appointed
|
|
46
|
+
worktree, resolve conflicts, and re-`deliver`.
|
|
47
|
+
- **Silent or wedged worker:** if a worker settles with an empty answer and
|
|
48
|
+
clean worktree (or stalls without progress), check `history <aku>`, send one
|
|
49
|
+
steering `tell`, or `kill` it and call a replacement assigned to the same
|
|
50
|
+
`@alias`.
|
|
51
|
+
- **Unrecorded review verdict:** if `@reviewer` wrote its analysis in `history`
|
|
52
|
+
without recording `review` testimony, read `history` and record the `review`
|
|
53
|
+
verdict yourself (if you were not the Deliverer) or `tell` `@reviewer` to
|
|
54
|
+
record it.
|
|
@@ -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`.
|