@quolu/lattice 0.107.0 → 0.109.0
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.ja.md +1 -1
- package/README.md +2 -2
- package/bin/lattice.mjs +5 -2
- package/docs/schemas/lattice.plan_create_input.v6.schema.json +384 -0
- package/docs/schemas/lattice.plan_revise_input.v1.schema.json +3 -0
- package/docs/schemas/lattice.todo_witness_draft.v2.schema.json +14 -2
- package/docs/schemas/lattice.todo_witness_set.v6.schema.json +482 -0
- package/package.json +3 -1
- package/sensor/dist/bin/lattice-sensor.js +76 -0
- package/sensor/dist/graph/anchor-resolve.d.ts +90 -0
- package/sensor/dist/graph/anchor-resolve.d.ts.map +1 -0
- package/sensor/dist/graph/anchor-resolve.js +132 -0
- package/sensor/dist/graph/anchor-resolve.js.map +1 -0
- package/sensor/dist/graph/touched-symbols.d.ts +42 -0
- package/sensor/dist/graph/touched-symbols.d.ts.map +1 -0
- package/sensor/dist/graph/touched-symbols.js +80 -0
- package/sensor/dist/graph/touched-symbols.js.map +1 -0
- package/src/cli-help.mjs +21 -7
- package/src/plan-revise.mjs +12 -1
- package/src/plan-scope-review.mjs +1 -1
- package/src/project-cli.mjs +20 -3
- package/src/runtime-front-end.mjs +26 -9
- package/src/schedulability-compiler-v2.mjs +10 -4
- package/src/sensor-cli.mjs +82 -1
- package/src/sensor-resolve.mjs +116 -0
- package/src/sensor-touched.mjs +76 -0
- package/src/todo-authoring-input.mjs +1 -0
- package/src/todo-cli.mjs +233 -43
- package/src/todo-contracts.mjs +62 -0
- package/src/todo-declaration.mjs +165 -0
- package/src/todo-independence-authoritative-observation.mjs +45 -15
- package/src/todo-independence-contracts.mjs +18 -4
- package/src/todo-independence.mjs +8 -2
- package/src/todo-judgment.mjs +141 -0
- package/src/todo-relation-store.mjs +294 -0
- package/src/todo-store.mjs +8 -4
- package/src/witness-scaffold.mjs +23 -15
package/README.ja.md
CHANGED
|
@@ -304,7 +304,7 @@ lattice todo start --plan <key> --task <id> --override-reason <reason>
|
|
|
304
304
|
```
|
|
305
305
|
|
|
306
306
|
記録があるのに対象工程が未宣言・失効でも`todo start`は止まらず、`advisory.guidance`で知らせます。
|
|
307
|
-
`independence compile
|
|
307
|
+
`independence compile`は宣言済みの行だけでcompileします。witnessに無いreadyの工程は、その工程だけが未知になります。
|
|
308
308
|
remainingのA工程は同じwitnessへ含めます。競合の同時起動は助言のままです。
|
|
309
309
|
|
|
310
310
|
`--serial-confirmed`と`--serialization-reviewed`は古い手順の互換として受理しますが、
|
package/README.md
CHANGED
|
@@ -235,8 +235,8 @@ parallel set. Starting one of them does not require `--parallel-frontier` or
|
|
|
235
235
|
`--override-reason`. Those flags record intent; they are not gates.
|
|
236
236
|
`--serial-confirmed` and `--serialization-reviewed` are accepted only for compatibility.
|
|
237
237
|
If an independence record exists but the task is undeclared or stale, `todo start`
|
|
238
|
-
still starts and reports it in `advisory.guidance`. `independence compile`
|
|
239
|
-
|
|
238
|
+
still starts and reports it in `advisory.guidance`. `independence compile` compiles the declared
|
|
239
|
+
rows; a ready task missing from the witness is unknown for itself only.
|
|
240
240
|
|
|
241
241
|
```bash
|
|
242
242
|
lattice todo start --plan <key> --task <id>
|
package/bin/lattice.mjs
CHANGED
|
@@ -107,7 +107,7 @@ if (help !== null) {
|
|
|
107
107
|
process.exitCode = projectCliFailure(process.stderr, error);
|
|
108
108
|
}
|
|
109
109
|
} else if (args.length === 5 && args[0] === 'plan' && args[1] === 'create'
|
|
110
|
-
&& args[2] === '--schema-version' && ['1', '2', '3', '4', '5'].includes(args[3]) && args[4] === '--json') {
|
|
110
|
+
&& args[2] === '--schema-version' && ['1', '2', '3', '4', '5', '6'].includes(args[3]) && args[4] === '--json') {
|
|
111
111
|
const { projectCliFailure, runPlanCreateSchema } = await import('../src/project-cli.mjs');
|
|
112
112
|
try {
|
|
113
113
|
process.exitCode = await runPlanCreateSchema({ stdout: process.stdout, version: Number(args[3]) });
|
|
@@ -176,6 +176,9 @@ if (help !== null) {
|
|
|
176
176
|
try {
|
|
177
177
|
process.exitCode = await runPlanRevise({ cwd: process.cwd(), inputRef: flags.input, planKey: flags.plan,
|
|
178
178
|
dryRun: flags['dry-run'] === true, stdout: process.stdout, env: process.env });
|
|
179
|
+
if (process.exitCode === 0 && flags['dry-run'] !== true) {
|
|
180
|
+
await (await import('../src/todo-cli.mjs')).carryIndependenceAfterRevision({ cwd: process.cwd() });
|
|
181
|
+
}
|
|
179
182
|
} catch (error) {
|
|
180
183
|
process.exitCode = projectCliFailure(process.stderr, error, { command: 'revise', flags });
|
|
181
184
|
}
|
|
@@ -326,7 +329,7 @@ function withImpliedJson(argv) {
|
|
|
326
329
|
const implied = (bare && argv.length === 1 && (command === 'status' || command === 'session-context'))
|
|
327
330
|
|| (bare && argv.length === 3 && command === 'plan' && sub === 'show')
|
|
328
331
|
|| (bare && command === 'sensor' && (sub === 'init' || sub === 'sync') && argv.length <= 3)
|
|
329
|
-
|| (command === 'sensor' && sub === 'diff')
|
|
332
|
+
|| (command === 'sensor' && (sub === 'diff' || sub === 'resolve' || sub === 'touched'))
|
|
330
333
|
|| (command === 'plan' && (sub === 'revise' || sub === 'backchain')
|
|
331
334
|
&& input > 1 && typeof argv[input + 1] === 'string' && !argv[input + 1].startsWith('-'));
|
|
332
335
|
return implied ? [...argv, '--json'] : argv;
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/kitepon/Lattice/blob/main/docs/schemas/lattice.plan_create_input.v6.schema.json",
|
|
4
|
+
"title": "lattice.plan_create_input.v6",
|
|
5
|
+
"description": "v6 = v5 plus the per-task authored `touches` {owns, reads}: the functions the task changes (owns) and reads, as `path` or `path#function` (`#` splits at the first `#`; a dotted chain names a method). Lattice resolves each name through the code graph and records the task's witness row once, after the plan is written; `touches` never enters the stored plan, so the plan and its digest are the v5 ones. A name that does not resolve does not refuse the create or revise: the result carries `declarations.<task_id>` with the nearest names, and the same strings go to `lattice todo independence witness declare --owns/--reads`. Canonical initial authoring input for a phase-audited plan. Every task carries a design memo; an omitted, null or blank one is refused at its pointer (write `NO_PLAN` yourself when you have no plan). After the complete plan is written, run `lattice plan scope-review --plan-input <file> --review <scope-review.json> --json` (the review input: `lattice plan scope-review --schema --json`) and confirm that every task preserves an owner-supplied work specification without adding a product purpose. v5 adds the per-task authored `done_condition`: plain text (or null when the author states none) that Lattice records and shows but never evaluates, never assigns and never records as done. Builds lattice.todo_plan.v8. The author writes intent: ids, titles, phases and edges (see `lattice plan create --template --json`). Every key whose value is constant or null may be omitted and the machine fills it: schema (this version), project_id (the store's project id; with no store yet, the repository directory name as a lower-case identifier; a different value is refused as project_id_mismatch), plan_version (v1; `lattice plan revise` uses the active plan's), actor (the seat actor), recorded_at (the current time; an ISO-8601 date-time with an explicit zone is normalised to UTC milliseconds), input_digest (recomputed), tasks[].lane (main), tasks[].narrative_ref, narrative_anchor, compile_binding, parent_task_id and done_condition (null), phases[].gate_policy (heavy), phases[].predecessor_phase_ids ([]), phases[].required_evidence_slots ([\"acceptance\"]), hard_dependencies, joins and phase_accept_dependencies ([]), and project_id/plan_key of an edge reference (this input's own). Every list is sorted into canonical order. A refusal lists every problem at once in detail.problems. Edge direction: from is the prerequisite; to starts after from is done.",
|
|
6
|
+
"$comment": "Runtime validation additionally enforces canonical JSON+LF bytes, sorted identifiers and edges, unique ids, combined task/phase acyclicity, byte bounds, non-empty design_memo (omitted, null or blank is refused; NO_PLAN only when written), and input_digest (recomputed). v5 additionally accepts hard_dependencies, joins, each joins[].after, phase_accept_dependencies, phases, phases[].predecessor_phase_ids and phases[].required_evidence_slots in any order or with exact duplicates: they are sorted into canonical order and de-duplicated before validation. tasks are sorted by task_id. Entries with the same key but different content are still refused.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": [
|
|
10
|
+
"plan_key",
|
|
11
|
+
"tasks",
|
|
12
|
+
"phases"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"schema": {
|
|
16
|
+
"const": "lattice.plan_create_input.v6",
|
|
17
|
+
"description": "Omitted: lattice.plan_create_input.v5 (v6 is written only when a task carries touches)."
|
|
18
|
+
},
|
|
19
|
+
"project_id": {
|
|
20
|
+
"$ref": "#/$defs/identifier"
|
|
21
|
+
},
|
|
22
|
+
"plan_key": {
|
|
23
|
+
"$ref": "#/$defs/identifier"
|
|
24
|
+
},
|
|
25
|
+
"plan_version": {
|
|
26
|
+
"$ref": "#/$defs/identifier"
|
|
27
|
+
},
|
|
28
|
+
"actor": {
|
|
29
|
+
"$ref": "#/$defs/actor"
|
|
30
|
+
},
|
|
31
|
+
"recorded_at": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T",
|
|
34
|
+
"description": "Any ISO-8601 date-time with an explicit zone (Z or ±hh:mm) whose written fields are a real date and time; the machine normalises it to UTC milliseconds (Z). Omitted: the current time."
|
|
35
|
+
},
|
|
36
|
+
"tasks": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"minItems": 1,
|
|
39
|
+
"maxItems": 512,
|
|
40
|
+
"items": {
|
|
41
|
+
"$ref": "#/$defs/task"
|
|
42
|
+
},
|
|
43
|
+
"description": "task_idの昇順・重複なしで並べる。整列はJSON Schemaでは表現できないがCLIは拒否する。"
|
|
44
|
+
},
|
|
45
|
+
"phases": {
|
|
46
|
+
"type": "array",
|
|
47
|
+
"minItems": 1,
|
|
48
|
+
"maxItems": 512,
|
|
49
|
+
"items": {
|
|
50
|
+
"$ref": "#/$defs/phase"
|
|
51
|
+
},
|
|
52
|
+
"description": "phase_idの昇順・重複なしを正準形とする。入力順は問わず、機械が整列し完全一致の重複を除く。同じphase_idで内容が違う場合は拒否する。全taskのphase_idはここに存在しなければならない。"
|
|
53
|
+
},
|
|
54
|
+
"hard_dependencies": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"maxItems": 2048,
|
|
57
|
+
"items": {
|
|
58
|
+
"$ref": "#/$defs/edge"
|
|
59
|
+
},
|
|
60
|
+
"description": "Omitted: []. 入力順は問わず、機械が正準順(from、toを(project_id, plan_key, task_id)の辞書順)へ整列し完全一致の重複を除く。 辺の向き: from=前提、to=fromが終わってから始まる。同じplanの辺ならfrom/toはtask_idだけでよい。"
|
|
61
|
+
},
|
|
62
|
+
"joins": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"maxItems": 128,
|
|
65
|
+
"items": {
|
|
66
|
+
"$ref": "#/$defs/join"
|
|
67
|
+
},
|
|
68
|
+
"description": "Omitted: []. 入力順は問わず、機械がidの昇順へ整列する。同じidで内容が違うjoinは拒否する。各afterも同様に整列し重複を除く。"
|
|
69
|
+
},
|
|
70
|
+
"phase_accept_dependencies": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"maxItems": 2048,
|
|
73
|
+
"items": {
|
|
74
|
+
"$ref": "#/$defs/phaseAcceptDependency"
|
|
75
|
+
},
|
|
76
|
+
"description": "Omitted: []. 入力順は問わず、機械が正準順へ整列し完全一致の重複を除く。"
|
|
77
|
+
},
|
|
78
|
+
"input_digest": {
|
|
79
|
+
"$ref": "#/$defs/authoringDigest"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"$defs": {
|
|
83
|
+
"identifier": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$"
|
|
86
|
+
},
|
|
87
|
+
"digest": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
90
|
+
},
|
|
91
|
+
"repoRef": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"maxLength": 1024
|
|
95
|
+
},
|
|
96
|
+
"nullableRepoRef": {
|
|
97
|
+
"oneOf": [
|
|
98
|
+
{
|
|
99
|
+
"type": "null"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"$ref": "#/$defs/repoRef"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"nullableIdentifier": {
|
|
107
|
+
"oneOf": [
|
|
108
|
+
{
|
|
109
|
+
"type": "null"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"$ref": "#/$defs/identifier"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
"actor": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"required": [
|
|
120
|
+
"host",
|
|
121
|
+
"session",
|
|
122
|
+
"agent"
|
|
123
|
+
],
|
|
124
|
+
"properties": {
|
|
125
|
+
"host": {
|
|
126
|
+
"$ref": "#/$defs/identifier"
|
|
127
|
+
},
|
|
128
|
+
"session": {
|
|
129
|
+
"$ref": "#/$defs/identifier"
|
|
130
|
+
},
|
|
131
|
+
"agent": {
|
|
132
|
+
"$ref": "#/$defs/identifier"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"task": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": [
|
|
140
|
+
"task_id",
|
|
141
|
+
"title",
|
|
142
|
+
"phase_id",
|
|
143
|
+
"design_memo"
|
|
144
|
+
],
|
|
145
|
+
"properties": {
|
|
146
|
+
"task_id": {
|
|
147
|
+
"$ref": "#/$defs/identifier"
|
|
148
|
+
},
|
|
149
|
+
"title": {
|
|
150
|
+
"oneOf": [
|
|
151
|
+
{
|
|
152
|
+
"type": "null"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"type": "string",
|
|
156
|
+
"minLength": 1,
|
|
157
|
+
"maxLength": 16384
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
"lane": {
|
|
162
|
+
"$ref": "#/$defs/identifier",
|
|
163
|
+
"description": "Omitted: main."
|
|
164
|
+
},
|
|
165
|
+
"design_memo": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"minLength": 1,
|
|
168
|
+
"maxLength": 16384,
|
|
169
|
+
"description": "Markdown design memo. あなたがこのToDoに対して、何も考えていないならば、設計メモに `NO_PLAN` と書いてください"
|
|
170
|
+
},
|
|
171
|
+
"done_condition": {
|
|
172
|
+
"oneOf": [
|
|
173
|
+
{
|
|
174
|
+
"type": "null"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"type": "string",
|
|
178
|
+
"minLength": 1,
|
|
179
|
+
"maxLength": 16384
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"description": "Omitted: null. 作成者が書くこのtask固有の終了条件(プレーンテキスト、設計メモと同じ本文規則)。nullは「書かない」。Latticeは記録して表示するだけで、評価せず、作業を割り当てず、doneも記録しない。"
|
|
183
|
+
},
|
|
184
|
+
"narrative_ref": {
|
|
185
|
+
"$ref": "#/$defs/nullableRepoRef",
|
|
186
|
+
"description": "Omitted: null."
|
|
187
|
+
},
|
|
188
|
+
"narrative_anchor": {
|
|
189
|
+
"type": "null",
|
|
190
|
+
"description": "Omitted: null."
|
|
191
|
+
},
|
|
192
|
+
"compile_binding": {
|
|
193
|
+
"type": "null",
|
|
194
|
+
"description": "Omitted: null."
|
|
195
|
+
},
|
|
196
|
+
"parent_task_id": {
|
|
197
|
+
"$ref": "#/$defs/nullableIdentifier",
|
|
198
|
+
"description": "Omitted: null."
|
|
199
|
+
},
|
|
200
|
+
"phase_id": {
|
|
201
|
+
"$ref": "#/$defs/identifier"
|
|
202
|
+
},
|
|
203
|
+
"touches": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"description": "Omitted: nothing declared. Paths and functions this task changes (owns) and reads. Read at create/revise time and written to the witness set only.",
|
|
207
|
+
"properties": {
|
|
208
|
+
"owns": {
|
|
209
|
+
"type": "array",
|
|
210
|
+
"items": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"minLength": 1
|
|
213
|
+
},
|
|
214
|
+
"description": "path or path#function the task changes."
|
|
215
|
+
},
|
|
216
|
+
"reads": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"minLength": 1
|
|
221
|
+
},
|
|
222
|
+
"description": "path or path#function the task reads."
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"phase": {
|
|
229
|
+
"type": "object",
|
|
230
|
+
"additionalProperties": false,
|
|
231
|
+
"required": [
|
|
232
|
+
"phase_id",
|
|
233
|
+
"title"
|
|
234
|
+
],
|
|
235
|
+
"properties": {
|
|
236
|
+
"phase_id": {
|
|
237
|
+
"$ref": "#/$defs/identifier"
|
|
238
|
+
},
|
|
239
|
+
"title": {
|
|
240
|
+
"oneOf": [
|
|
241
|
+
{
|
|
242
|
+
"type": "null"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"type": "string",
|
|
246
|
+
"minLength": 1,
|
|
247
|
+
"maxLength": 16384
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
"gate_policy": {
|
|
252
|
+
"$ref": "#/$defs/identifier",
|
|
253
|
+
"description": "Omitted: heavy. Phase gateの呼び名。製品はこの値で分岐しないので統制語彙は無く、identifierなら何でもよい。表示に使う。慣用は 'heavy'(重監査)と 'terminal-audit'(暗黙の終端Phaseが使う)。"
|
|
254
|
+
},
|
|
255
|
+
"predecessor_phase_ids": {
|
|
256
|
+
"type": "array",
|
|
257
|
+
"items": {
|
|
258
|
+
"$ref": "#/$defs/identifier"
|
|
259
|
+
},
|
|
260
|
+
"uniqueItems": true,
|
|
261
|
+
"description": "Omitted: []. 先行Phase。入力順は問わず、機械がidentifierの昇順へ整列し重複を除く。"
|
|
262
|
+
},
|
|
263
|
+
"required_evidence_slots": {
|
|
264
|
+
"type": "array",
|
|
265
|
+
"items": {
|
|
266
|
+
"$ref": "#/$defs/identifier"
|
|
267
|
+
},
|
|
268
|
+
"uniqueItems": true,
|
|
269
|
+
"description": "Phase gateが要求する証跡slot。省略・空なら[\"acceptance\"]。入力順は問わず、機械が昇順へ整列し重複を除く。"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"nodeRef": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"additionalProperties": false,
|
|
276
|
+
"required": [
|
|
277
|
+
"task_id"
|
|
278
|
+
],
|
|
279
|
+
"properties": {
|
|
280
|
+
"project_id": {
|
|
281
|
+
"$ref": "#/$defs/identifier"
|
|
282
|
+
},
|
|
283
|
+
"plan_key": {
|
|
284
|
+
"$ref": "#/$defs/identifier"
|
|
285
|
+
},
|
|
286
|
+
"task_id": {
|
|
287
|
+
"$ref": "#/$defs/identifier"
|
|
288
|
+
},
|
|
289
|
+
"expected_topology_digest": {
|
|
290
|
+
"$ref": "#/$defs/digest"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"description": "Reference to a task. Omitted project_id/plan_key: this input's own."
|
|
294
|
+
},
|
|
295
|
+
"phaseRef": {
|
|
296
|
+
"type": "object",
|
|
297
|
+
"additionalProperties": false,
|
|
298
|
+
"required": [
|
|
299
|
+
"phase_id"
|
|
300
|
+
],
|
|
301
|
+
"properties": {
|
|
302
|
+
"project_id": {
|
|
303
|
+
"$ref": "#/$defs/identifier"
|
|
304
|
+
},
|
|
305
|
+
"plan_key": {
|
|
306
|
+
"$ref": "#/$defs/identifier"
|
|
307
|
+
},
|
|
308
|
+
"phase_id": {
|
|
309
|
+
"$ref": "#/$defs/identifier"
|
|
310
|
+
},
|
|
311
|
+
"expected_topology_digest": {
|
|
312
|
+
"$ref": "#/$defs/digest"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"description": "Reference to a phase. Omitted project_id/plan_key: this input's own."
|
|
316
|
+
},
|
|
317
|
+
"edge": {
|
|
318
|
+
"type": "object",
|
|
319
|
+
"additionalProperties": false,
|
|
320
|
+
"required": [
|
|
321
|
+
"from",
|
|
322
|
+
"to"
|
|
323
|
+
],
|
|
324
|
+
"properties": {
|
|
325
|
+
"from": {
|
|
326
|
+
"$ref": "#/$defs/nodeRef",
|
|
327
|
+
"description": "The prerequisite task."
|
|
328
|
+
},
|
|
329
|
+
"to": {
|
|
330
|
+
"$ref": "#/$defs/nodeRef",
|
|
331
|
+
"description": "The task that starts after from is done."
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"description": "Hard dependency: from is the prerequisite; to starts after from is done."
|
|
335
|
+
},
|
|
336
|
+
"phaseAcceptDependency": {
|
|
337
|
+
"type": "object",
|
|
338
|
+
"additionalProperties": false,
|
|
339
|
+
"required": [
|
|
340
|
+
"from",
|
|
341
|
+
"to"
|
|
342
|
+
],
|
|
343
|
+
"properties": {
|
|
344
|
+
"from": {
|
|
345
|
+
"$ref": "#/$defs/phaseRef"
|
|
346
|
+
},
|
|
347
|
+
"to": {
|
|
348
|
+
"$ref": "#/$defs/nodeRef"
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"join": {
|
|
353
|
+
"type": "object",
|
|
354
|
+
"additionalProperties": false,
|
|
355
|
+
"required": [
|
|
356
|
+
"id",
|
|
357
|
+
"after",
|
|
358
|
+
"before"
|
|
359
|
+
],
|
|
360
|
+
"properties": {
|
|
361
|
+
"id": {
|
|
362
|
+
"$ref": "#/$defs/identifier"
|
|
363
|
+
},
|
|
364
|
+
"after": {
|
|
365
|
+
"type": "array",
|
|
366
|
+
"minItems": 1,
|
|
367
|
+
"maxItems": 512,
|
|
368
|
+
"items": {
|
|
369
|
+
"$ref": "#/$defs/nodeRef"
|
|
370
|
+
},
|
|
371
|
+
"description": "参照の順序は問わず、機械が(project_id, plan_key, task_id)の辞書順へ整列し完全一致の重複を除く。"
|
|
372
|
+
},
|
|
373
|
+
"before": {
|
|
374
|
+
"$ref": "#/$defs/nodeRef"
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"authoringDigest": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"pattern": "^(|[0-9a-f]{64})$",
|
|
381
|
+
"description": "canonical入力から算出される自己digest。CLIが読み込み時に必ず再計算して埋めるので、authorは空文字 \"\" を置けばよい。手で計算する必要はない。"
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
}
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"$ref": "lattice.plan_create_input.v5.schema.json"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"$ref": "lattice.plan_create_input.v6.schema.json"
|
|
23
26
|
}
|
|
24
27
|
],
|
|
25
28
|
"description": "同じplan_keyのcreate-v4またはv5入力。project_idとplan_versionは書かなければ現行planの値で機械が補う(project_idを書くなら現行planと同じ値)。actor・recorded_at・input_digest・空の設計メモは機械が補い、集合と配列の並びは正準化する。v5は終了条件done_conditionを持つ(plan v8を作る)。v4でも先行planがv8なら、書かない終了条件は先行planの値を引き継ぐ。plan_versionは入力形を保つために記載し、後継versionは機械算出値に置き換える。新taskはpending。消すtaskへの参照も明示的に取り除く。"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://github.com/kitepon/Lattice/blob/main/docs/schemas/lattice.todo_witness_draft.v2.schema.json",
|
|
4
4
|
"title": "lattice.todo_witness_draft.v2",
|
|
5
|
-
"description": "What a seat writes to declare, per ToDo, which repo files it owns, reads and writes. `lattice todo independence witness scaffold --plan <key> --input <draft>` turns it into the witness set (lattice.todo_witness_set.v5) that `independence compile` reads, adding what a seat cannot write by hand: fresh affected-test observations, the sensor query wiring and the self-digest. Start from `lattice todo independence witness scaffold --template --plan <key>`.",
|
|
5
|
+
"description": "What a seat writes to declare, per ToDo, which repo files it owns, reads and writes. `lattice todo independence witness scaffold --plan <key> --input <draft>` turns it into the witness set (lattice.todo_witness_set.v5, or v6 when a task declares read_anchors) that `independence compile` reads, adding what a seat cannot write by hand: fresh affected-test observations, the sensor query wiring and the self-digest. Start from `lattice todo independence witness scaffold --template --plan <key>`.",
|
|
6
6
|
"$comment": "v1 is still accepted; it allows only string `owns`. Include every task that is not done yet (ready, blocked and later ones), not only the current ready ones.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"required": ["schema", "project_id", "plan_key", "capacity", "tasks"],
|
|
@@ -70,7 +70,19 @@
|
|
|
70
70
|
},
|
|
71
71
|
"concern_anchors": {
|
|
72
72
|
"type": "array",
|
|
73
|
-
"description": "
|
|
73
|
+
"description": "Functions this task changes inside a file it owns or writes (ADR 0204: `--owns path#function`); also used to bind seam proposals.",
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"required": ["within", "symbols"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"within": { "$ref": "#/$defs/repoRelativePath" },
|
|
79
|
+
"symbols": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/identifier" } }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"read_anchors": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"description": "Functions this task reads inside a file it lists under reads (ADR 0204: `--reads path#function`); `within` must be one of the task's reads. A set that uses it is written as lattice.todo_witness_set.v6.",
|
|
74
86
|
"items": {
|
|
75
87
|
"type": "object",
|
|
76
88
|
"required": ["within", "symbols"],
|