@quolu/lattice 0.85.2 → 0.85.4
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/bin/lattice.mjs +5 -3
- package/docs/schemas/lattice.plan_revise_input.v1.schema.json +1 -1
- package/docs/schemas/lattice.plan_scope_review.v1.schema.json +3 -3
- package/docs/schemas/lattice.todo_witness_draft.v2.schema.json +86 -0
- package/docs/schemas/lattice.todo_witness_set.v5.schema.json +400 -0
- package/package.json +3 -1
- package/src/cli-help.mjs +16 -4
- package/src/cli-refusal-guidance.mjs +88 -4
- package/src/plan-revise.mjs +43 -3
- package/src/plan-scope-review.mjs +37 -12
- package/src/runtime-front-end.mjs +45 -42
- package/src/seat-identity.mjs +10 -2
- package/src/todo-audit-pending.mjs +6 -3
- package/src/todo-authoring-input.mjs +10 -3
- package/src/todo-cli.mjs +134 -36
- package/src/todo-independence-guidance.mjs +3 -2
- package/src/todo-readiness.mjs +18 -2
- package/src/todo-status.mjs +2 -1
- package/src/todo-store.mjs +66 -18
- package/src/witness-scaffold.mjs +78 -21
package/bin/lattice.mjs
CHANGED
|
@@ -48,8 +48,9 @@ if (help !== null) {
|
|
|
48
48
|
} else if (args[0] === 'plan' && args[1] === 'create'
|
|
49
49
|
&& args[2] !== '--schema' && args[2] !== '--schema-version' && args[2] !== '--template') {
|
|
50
50
|
const { matchFlagCommand } = await import('../src/todo-authoring-input.mjs');
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
// --json is a no-op on this write: its output is JSON either way (a37).
|
|
52
|
+
const spec = { known: ['input', 'serialization-reviewed', 'json'], required: ['input'],
|
|
53
|
+
booleans: ['serialization-reviewed', 'json'] };
|
|
53
54
|
const flags = matchFlagCommand(args, ['plan', 'create'], spec);
|
|
54
55
|
if (flags === null) {
|
|
55
56
|
// usage違反も欄(flag)・規則・直し方を返す(u05)。受け取った引数もdetailに残す。
|
|
@@ -111,7 +112,8 @@ if (help !== null) {
|
|
|
111
112
|
const { matchFlagCommand } = await import('../src/todo-authoring-input.mjs');
|
|
112
113
|
const spec = { known: ['plan-input', 'review', 'json'], required: ['plan-input', 'review'], booleans: ['json'] };
|
|
113
114
|
const flags = matchFlagCommand(args, ['plan', 'scope-review'], spec);
|
|
114
|
-
|
|
115
|
+
// --json is optional: the output is JSON either way (a37).
|
|
116
|
+
if (flags === null) {
|
|
115
117
|
const { planArgumentFailure } = await import('../src/project-cli.mjs');
|
|
116
118
|
process.exitCode = planArgumentFailure(process.stderr, args, spec);
|
|
117
119
|
} else {
|
|
@@ -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.plan_revise_input.v1.schema.json",
|
|
4
4
|
"title": "lattice.plan_revise_input.v1",
|
|
5
|
-
"description": "工程全体のdesired stateと、必要なら状態移行の指定。継続方針は機械が全ての旧taskについて算出する(desiredに在れば既定carry、無ければretire)。predecessor/CAS/digest/後継version
|
|
5
|
+
"description": "工程全体のdesired stateと、必要なら状態移行の指定。継続方針は機械が全ての旧taskについて算出する(desiredに在れば既定carry、無ければretire)。predecessor/CAS/digest/後継versionも機械が算出する。旧版は保持する。この包みを使わず、desiredの中身(plan createと同じ形の計画の全体)だけを--inputへ渡してもよい(a31)。そのとき継続方針はすべて機械が算出する。現行planが無いplan_keyはplan createで作る。",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": [
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://github.com/kitepon/Lattice/blob/main/docs/schemas/lattice.plan_scope_review.v1.schema.json",
|
|
4
4
|
"title": "lattice.plan_scope_review.v1",
|
|
5
|
-
"description": "AI-authored review performed after the complete plan is written and before it is registered. Every planned task is judged against the owner-supplied work specifications; task splitting and parallelization are allowed, but a new product purpose is not.",
|
|
6
|
-
"$comment": "Lattice validates complete task coverage, known work-spec references, verdict consistency, and digest binding. The operating AI owns the semantic judgment.",
|
|
5
|
+
"description": "AI-authored review performed after the complete plan is written and before it is registered. Every planned task is judged against the owner-supplied work specifications; task splitting and parallelization are allowed, but a new product purpose is not. The plan input may be a plan create input v4 or v5 (the template default; a missing schema reads as v5) or a todo extraction v3/v4.",
|
|
6
|
+
"$comment": "Lattice validates complete task coverage, known work-spec references, verdict consistency, and digest binding. The operating AI owns the semantic judgment. authoring_digest and review_digest may be omitted: the machine computes both (authoring_digest is the plan input's input_digest, or extraction_digest, computed from its content); a written value must match.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"required": [
|
|
10
|
-
"schema", "
|
|
10
|
+
"schema", "work_specs", "task_assessments", "verdict"
|
|
11
11
|
],
|
|
12
12
|
"properties": {
|
|
13
13
|
"schema": { "const": "lattice.plan_scope_review.v1" },
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/kitepon/Lattice/blob/main/docs/schemas/lattice.todo_witness_draft.v2.schema.json",
|
|
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>`.",
|
|
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
|
+
"type": "object",
|
|
8
|
+
"required": ["schema", "project_id", "plan_key", "capacity", "tasks"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schema": { "enum": ["lattice.todo_witness_draft.v2", "lattice.todo_witness_draft.v1"] },
|
|
11
|
+
"project_id": { "$ref": "#/$defs/identifier" },
|
|
12
|
+
"plan_key": { "$ref": "#/$defs/identifier" },
|
|
13
|
+
"capacity": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["executors"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"executors": { "type": "integer", "minimum": 1, "description": "How many tasks may run at once." }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"tasks": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"minProperties": 1,
|
|
23
|
+
"propertyNames": { "$ref": "#/$defs/identifier" },
|
|
24
|
+
"additionalProperties": { "$ref": "#/$defs/task" },
|
|
25
|
+
"description": "Keyed by task_id."
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"$defs": {
|
|
29
|
+
"identifier": { "type": "string", "pattern": "^[0-9A-Za-z][0-9A-Za-z._-]{0,127}$" },
|
|
30
|
+
"repoRelativePath": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"maxLength": 1024,
|
|
34
|
+
"description": "Repo-relative path. Absolute paths, backslashes and '..' traversal are rejected."
|
|
35
|
+
},
|
|
36
|
+
"task": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["owns"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"owns": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"description": "Files this task owns. A file that does not exist yet is written as {\"path\": <file>, \"creates\": true} (v2 only).",
|
|
43
|
+
"items": {
|
|
44
|
+
"anyOf": [
|
|
45
|
+
{ "$ref": "#/$defs/repoRelativePath" },
|
|
46
|
+
{
|
|
47
|
+
"type": "object",
|
|
48
|
+
"additionalProperties": false,
|
|
49
|
+
"required": ["path", "creates"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"path": { "$ref": "#/$defs/repoRelativePath" },
|
|
52
|
+
"creates": { "const": true }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"reads": { "type": "array", "items": { "$ref": "#/$defs/repoRelativePath" } },
|
|
59
|
+
"writes": { "type": "array", "items": { "$ref": "#/$defs/repoRelativePath" } },
|
|
60
|
+
"unknowns": {
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"required": ["kind", "ref"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"kind": { "$ref": "#/$defs/identifier" },
|
|
67
|
+
"ref": { "type": "string", "minLength": 1 }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"concern_anchors": {
|
|
72
|
+
"type": "array",
|
|
73
|
+
"description": "Symbols this task touches inside a contested file it owns or writes; used only 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
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/kitepon/Lattice/blob/main/docs/schemas/lattice.todo_witness_set.v5.schema.json",
|
|
4
|
+
"title": "lattice.todo_witness_set.v5",
|
|
5
|
+
"description": "Per-ToDo boundary declaration compiled into a recorded independence judgement (ADR 0127). v5 adds optional semantic line declarations so protocol, stream and schema dependencies can be declared even when file paths do not overlap.",
|
|
6
|
+
"$comment": "Runtime validation additionally enforces canonical JSON+LF bytes, the self-digest rule, unique line_id values per ToDo, and closed line anchor shapes. concern_anchors is stripped before run-request synthesis; lines is preserved because it participates in scheduling. v1-v4 declarations remain valid input without lines, and adding lines to an old schema is rejected rather than reinterpreted.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": [
|
|
10
|
+
"schema",
|
|
11
|
+
"project_id",
|
|
12
|
+
"plan_key",
|
|
13
|
+
"capacity",
|
|
14
|
+
"sensor_query_set",
|
|
15
|
+
"manual_witness",
|
|
16
|
+
"witness_set_digest"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"schema": {
|
|
20
|
+
"const": "lattice.todo_witness_set.v5"
|
|
21
|
+
},
|
|
22
|
+
"project_id": {
|
|
23
|
+
"$ref": "#/$defs/identifier"
|
|
24
|
+
},
|
|
25
|
+
"plan_key": {
|
|
26
|
+
"$ref": "#/$defs/identifier"
|
|
27
|
+
},
|
|
28
|
+
"capacity": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": [
|
|
32
|
+
"executors"
|
|
33
|
+
],
|
|
34
|
+
"properties": {
|
|
35
|
+
"executors": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 1
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"sensor_query_set": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"required": [
|
|
45
|
+
"queries"
|
|
46
|
+
],
|
|
47
|
+
"description": "Sensor queries backing the declarations. Exactly one query must have operation 'status'.",
|
|
48
|
+
"properties": {
|
|
49
|
+
"queries": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"maxItems": 256,
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": [
|
|
56
|
+
"id",
|
|
57
|
+
"operation"
|
|
58
|
+
],
|
|
59
|
+
"properties": {
|
|
60
|
+
"id": {
|
|
61
|
+
"$ref": "#/$defs/identifier"
|
|
62
|
+
},
|
|
63
|
+
"operation": {
|
|
64
|
+
"enum": [
|
|
65
|
+
"status",
|
|
66
|
+
"query",
|
|
67
|
+
"callers",
|
|
68
|
+
"callees",
|
|
69
|
+
"impact",
|
|
70
|
+
"affected"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"target": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"minLength": 1
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"manual_witness": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"minProperties": 1,
|
|
85
|
+
"maxProperties": 256,
|
|
86
|
+
"description": "Keyed by task_id of the plan. Keys must be a subset of the plan's tasks.",
|
|
87
|
+
"propertyNames": {
|
|
88
|
+
"$ref": "#/$defs/identifier"
|
|
89
|
+
},
|
|
90
|
+
"additionalProperties": {
|
|
91
|
+
"$ref": "#/$defs/witness"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"witness_set_digest": {
|
|
95
|
+
"$ref": "#/$defs/digest"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"$defs": {
|
|
99
|
+
"identifier": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"pattern": "^[0-9A-Za-z][0-9A-Za-z._-]{0,127}$"
|
|
102
|
+
},
|
|
103
|
+
"digest": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
106
|
+
},
|
|
107
|
+
"repoRelativePath": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"minLength": 1,
|
|
110
|
+
"maxLength": 1024,
|
|
111
|
+
"description": "Repo-relative path. Absolute paths, backslashes and '..' traversal are rejected. A trailing '/' declares a directory prefix and is accepted only under 'writes'."
|
|
112
|
+
},
|
|
113
|
+
"lineAnchor": {
|
|
114
|
+
"oneOf": [
|
|
115
|
+
{
|
|
116
|
+
"type": "object",
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"required": ["kind", "path"],
|
|
119
|
+
"properties": {
|
|
120
|
+
"kind": { "const": "path" },
|
|
121
|
+
"path": { "$ref": "#/$defs/repoRelativePath" }
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
"required": ["kind", "name", "path"],
|
|
128
|
+
"properties": {
|
|
129
|
+
"kind": { "const": "symbol" },
|
|
130
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
131
|
+
"path": { "$ref": "#/$defs/repoRelativePath" }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"line": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": ["line_id", "role", "anchors"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"line_id": { "$ref": "#/$defs/identifier" },
|
|
142
|
+
"role": { "enum": ["reads", "writes"] },
|
|
143
|
+
"anchors": {
|
|
144
|
+
"type": "array",
|
|
145
|
+
"minItems": 1,
|
|
146
|
+
"maxItems": 256,
|
|
147
|
+
"items": { "$ref": "#/$defs/lineAnchor" }
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"witness": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"additionalProperties": false,
|
|
154
|
+
"required": [
|
|
155
|
+
"owns",
|
|
156
|
+
"reads",
|
|
157
|
+
"writes",
|
|
158
|
+
"resources",
|
|
159
|
+
"state_effects",
|
|
160
|
+
"sensor_provenance",
|
|
161
|
+
"affected_tests",
|
|
162
|
+
"unknowns"
|
|
163
|
+
],
|
|
164
|
+
"properties": {
|
|
165
|
+
"owns": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"maxItems": 256,
|
|
168
|
+
"description": "Symbols and paths this ToDo claims ownership of. Every entry needs a covering sensor query or it compiles to a sensor_unbound unknown. An entry may additionally declare creates: true for a path this ToDo will bring into existence.",
|
|
169
|
+
"items": {
|
|
170
|
+
"type": "object",
|
|
171
|
+
"additionalProperties": false,
|
|
172
|
+
"required": [
|
|
173
|
+
"kind",
|
|
174
|
+
"target"
|
|
175
|
+
],
|
|
176
|
+
"properties": {
|
|
177
|
+
"kind": {
|
|
178
|
+
"enum": [
|
|
179
|
+
"symbol",
|
|
180
|
+
"path"
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"target": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"minLength": 1,
|
|
186
|
+
"maxLength": 1024
|
|
187
|
+
},
|
|
188
|
+
"creates": {
|
|
189
|
+
"const": true,
|
|
190
|
+
"description": "Optional. Declares that this path does not exist yet and that this ToDo creates it. Only valid when kind is path — existence is a filesystem fact and a symbol has none of its own. Only the value true is accepted: false would be a second spelling of an existing path. Omitted is the default."
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"reads": {
|
|
196
|
+
"type": "array",
|
|
197
|
+
"maxItems": 256,
|
|
198
|
+
"items": {
|
|
199
|
+
"$ref": "#/$defs/repoRelativePath"
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"writes": {
|
|
203
|
+
"type": "array",
|
|
204
|
+
"maxItems": 256,
|
|
205
|
+
"items": {
|
|
206
|
+
"$ref": "#/$defs/repoRelativePath"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"resources": {
|
|
210
|
+
"type": "array",
|
|
211
|
+
"maxItems": 256,
|
|
212
|
+
"description": "Shared resource ids. A resource with no matching state_effect entry is treated as a shared resource of unknown direction and becomes a conflict.",
|
|
213
|
+
"items": {
|
|
214
|
+
"$ref": "#/$defs/identifier"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"state_effects": {
|
|
218
|
+
"type": "array",
|
|
219
|
+
"maxItems": 256,
|
|
220
|
+
"items": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"additionalProperties": false,
|
|
223
|
+
"required": [
|
|
224
|
+
"resource_id",
|
|
225
|
+
"kind"
|
|
226
|
+
],
|
|
227
|
+
"properties": {
|
|
228
|
+
"resource_id": {
|
|
229
|
+
"$ref": "#/$defs/identifier"
|
|
230
|
+
},
|
|
231
|
+
"kind": {
|
|
232
|
+
"enum": [
|
|
233
|
+
"state",
|
|
234
|
+
"schema",
|
|
235
|
+
"invariant",
|
|
236
|
+
"effect",
|
|
237
|
+
"external_effect"
|
|
238
|
+
]
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"sensor_provenance": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"additionalProperties": false,
|
|
246
|
+
"required": [
|
|
247
|
+
"queries"
|
|
248
|
+
],
|
|
249
|
+
"properties": {
|
|
250
|
+
"queries": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"maxItems": 256,
|
|
253
|
+
"items": {
|
|
254
|
+
"type": "object",
|
|
255
|
+
"additionalProperties": false,
|
|
256
|
+
"required": [
|
|
257
|
+
"query_id",
|
|
258
|
+
"expect"
|
|
259
|
+
],
|
|
260
|
+
"properties": {
|
|
261
|
+
"query_id": {
|
|
262
|
+
"$ref": "#/$defs/identifier"
|
|
263
|
+
},
|
|
264
|
+
"expect": {
|
|
265
|
+
"oneOf": [
|
|
266
|
+
{
|
|
267
|
+
"type": "object",
|
|
268
|
+
"additionalProperties": false,
|
|
269
|
+
"required": [
|
|
270
|
+
"kind",
|
|
271
|
+
"name",
|
|
272
|
+
"path"
|
|
273
|
+
],
|
|
274
|
+
"properties": {
|
|
275
|
+
"kind": {
|
|
276
|
+
"const": "symbol"
|
|
277
|
+
},
|
|
278
|
+
"name": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"minLength": 1
|
|
281
|
+
},
|
|
282
|
+
"path": {
|
|
283
|
+
"$ref": "#/$defs/repoRelativePath"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"type": "object",
|
|
289
|
+
"additionalProperties": false,
|
|
290
|
+
"required": [
|
|
291
|
+
"kind",
|
|
292
|
+
"path"
|
|
293
|
+
],
|
|
294
|
+
"properties": {
|
|
295
|
+
"kind": {
|
|
296
|
+
"enum": [
|
|
297
|
+
"path",
|
|
298
|
+
"affected"
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
"path": {
|
|
302
|
+
"$ref": "#/$defs/repoRelativePath"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"affected_tests": {
|
|
314
|
+
"type": "array",
|
|
315
|
+
"maxItems": 256,
|
|
316
|
+
"description": "Declared affected tests. Compared exactly against fresh sensor observation; any drift fails the compile rather than being narrowed.",
|
|
317
|
+
"items": {
|
|
318
|
+
"$ref": "#/$defs/repoRelativePath"
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"unknowns": {
|
|
322
|
+
"type": "array",
|
|
323
|
+
"maxItems": 256,
|
|
324
|
+
"description": "Explicitly declared residual unknowns. Recorded, never rounded away.",
|
|
325
|
+
"items": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"additionalProperties": false,
|
|
328
|
+
"required": [
|
|
329
|
+
"kind",
|
|
330
|
+
"ref"
|
|
331
|
+
],
|
|
332
|
+
"properties": {
|
|
333
|
+
"kind": {
|
|
334
|
+
"$ref": "#/$defs/identifier"
|
|
335
|
+
},
|
|
336
|
+
"ref": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"minLength": 1
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"lines": {
|
|
344
|
+
"type": "array",
|
|
345
|
+
"maxItems": 256,
|
|
346
|
+
"description": "Optional semantic lines read or written by this ToDo. line_id values must be unique within the ToDo.",
|
|
347
|
+
"items": { "$ref": "#/$defs/line" }
|
|
348
|
+
},
|
|
349
|
+
"concern_anchors": {
|
|
350
|
+
"type": "array",
|
|
351
|
+
"maxItems": 256,
|
|
352
|
+
"description": "Optional. Which named symbols inside an owned-but-contested resource are this ToDo's concern. Consumed only when binding seam candidates; it can never create, remove or alter a conflict, so a dishonest declaration degrades the proposal without touching the judgement. Declared symbols must resolve through the sensor with an exact name and path match, must live inside the declared resource, and must not overlap another ToDo's declaration for the same resource; any breach yields a typed unknown instead of a proposal.",
|
|
353
|
+
"items": {
|
|
354
|
+
"type": "object",
|
|
355
|
+
"additionalProperties": false,
|
|
356
|
+
"required": [
|
|
357
|
+
"within",
|
|
358
|
+
"symbols"
|
|
359
|
+
],
|
|
360
|
+
"properties": {
|
|
361
|
+
"within": {
|
|
362
|
+
"type": "object",
|
|
363
|
+
"additionalProperties": false,
|
|
364
|
+
"required": [
|
|
365
|
+
"kind",
|
|
366
|
+
"target"
|
|
367
|
+
],
|
|
368
|
+
"description": "The contested resource. Must be a resource this same ToDo claims under 'owns'.",
|
|
369
|
+
"properties": {
|
|
370
|
+
"kind": {
|
|
371
|
+
"enum": [
|
|
372
|
+
"symbol",
|
|
373
|
+
"path"
|
|
374
|
+
]
|
|
375
|
+
},
|
|
376
|
+
"target": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"minLength": 1,
|
|
379
|
+
"maxLength": 1024
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"symbols": {
|
|
384
|
+
"type": "array",
|
|
385
|
+
"minItems": 1,
|
|
386
|
+
"maxItems": 256,
|
|
387
|
+
"description": "Symbol names owned by this ToDo inside the resource. Strictly sorted and unique.",
|
|
388
|
+
"items": {
|
|
389
|
+
"type": "string",
|
|
390
|
+
"minLength": 1,
|
|
391
|
+
"maxLength": 1024
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quolu/lattice",
|
|
3
|
-
"version": "0.85.
|
|
3
|
+
"version": "0.85.4",
|
|
4
4
|
"description": "Schedulability compiler for multi-agent development: observe real code boundaries, refactor the conflicting seam, recompile the plan for parallel execution",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Quo / クオ at kitepon.dev",
|
|
@@ -40,6 +40,8 @@
|
|
|
40
40
|
"docs/schemas/lattice.todo_extraction.v3.schema.json",
|
|
41
41
|
"docs/schemas/lattice.todo_extraction.v4.schema.json",
|
|
42
42
|
"docs/schemas/lattice.todo_structure_set.v1.schema.json",
|
|
43
|
+
"docs/schemas/lattice.todo_witness_draft.v2.schema.json",
|
|
44
|
+
"docs/schemas/lattice.todo_witness_set.v5.schema.json",
|
|
43
45
|
"docs/schemas/lattice.todo_structure_realization.v1.schema.json",
|
|
44
46
|
"docs/schemas/lattice.todo_structure_binding.v1.schema.json",
|
|
45
47
|
"docs/schemas/lattice.run_request.v1.schema.json",
|
package/src/cli-help.mjs
CHANGED
|
@@ -31,7 +31,9 @@ Commands:
|
|
|
31
31
|
create --schema-version <1|2|3|4|5> --json
|
|
32
32
|
create --template --json # 作者が書くkeyだけの最小のv5入力(そのままplan createが受理する)
|
|
33
33
|
backchain --schema --json # 最終成果から必要な機能を逆算する入力契約
|
|
34
|
-
revise --input <file> [--dry-run] [--json]
|
|
34
|
+
revise --input <file> [--dry-run] [--json]
|
|
35
|
+
# 改訂後の計画の全体を、plan createと同じ形で渡す(plan create --template --jsonから始められる)。
|
|
36
|
+
# 継続方針を自分で書くなら {"schema":"lattice.plan_revise_input.v1","desired":<計画>,"continuity":[...]}
|
|
35
37
|
revise --schema --json
|
|
36
38
|
backchain --input <file> [--dry-run] [--json]
|
|
37
39
|
# 各工程の必要・提供機能を照合し、初回又は既存storeへのplan登録まで行う
|
|
@@ -111,6 +113,9 @@ Write commands:
|
|
|
111
113
|
# readyならflagなしで着手する。flagの順は問わない。
|
|
112
114
|
# --parallel-frontierと--override-reasonは方針・理由の記録。
|
|
113
115
|
# --serial-confirmedは互換のため受理する。いずれも門ではない
|
|
116
|
+
retract --plan <key> --task <id> --reason <text>
|
|
117
|
+
# 自分の席が記録したstartを取り消してpendingへ戻す。reopenやimportで開いた工程には
|
|
118
|
+
# 取り消すstartが無いので、doneで閉じる
|
|
114
119
|
block --plan <key> --task <id> --reason <text>
|
|
115
120
|
unblock --plan <key> --task <id>
|
|
116
121
|
retire --plan <key> --task <id> --reason <text>
|
|
@@ -128,7 +133,10 @@ Write commands:
|
|
|
128
133
|
independence mode --plan <key> --set <witness|conversation> --reason <text>
|
|
129
134
|
# このplanの調整方式(witness検証で並列するか、会話で調整するか)を記録する
|
|
130
135
|
independence compile --plan <key> --input <file> # witness setとsensorから並列可否を記録する
|
|
136
|
+
independence compile --schema --json # compileが読むwitness set(lattice.todo_witness_set.v5)のJSON Schema
|
|
131
137
|
independence witness migrate --plan <key> # revision後の宣言をtask migrationで写す
|
|
138
|
+
independence witness scaffold --template --plan <key> [--json] # 未完の工程を並べた下書きのひな形を出す
|
|
139
|
+
independence witness scaffold --schema --json # 下書き(lattice.todo_witness_draft.v2)のJSON Schema
|
|
132
140
|
independence witness scaffold --plan <key> --input <draft> # 下書きとfresh観測から宣言を書き出す
|
|
133
141
|
structure input --plan <key> --input <file> --dry-run --json
|
|
134
142
|
# plan identity・topology・unfinished task coverage・baseline祖先を無変更で検査する
|
|
@@ -243,7 +251,10 @@ const SUBCOMMAND_USAGE = Object.freeze({
|
|
|
243
251
|
'plan show': 'plan show <plan_key> --json',
|
|
244
252
|
'plan scope-review': 'plan scope-review --plan-input <plan-create-or-extraction.json> --review <scope-review.json> --json | --schema --json',
|
|
245
253
|
'plan backchain': 'plan backchain --input <file> [--dry-run] [--json] | --schema --json',
|
|
246
|
-
'plan revise': 'plan revise --input <file> [--dry-run] [--json] | --schema --json'
|
|
254
|
+
'plan revise': 'plan revise --input <file> [--dry-run] [--json] | --schema --json\n\n'
|
|
255
|
+
+ '--input: the whole desired plan in the same shape as `plan create` (start from `plan create --template --json`),\n'
|
|
256
|
+
+ 'or {"schema":"lattice.plan_revise_input.v1","desired":<that plan>,"continuity":[{task_id, policy: carry|reset|retire, reason}]}.\n'
|
|
257
|
+
+ 'Without continuity the machine computes carry/reset/retire. A plan_key with no active plan is made with `plan create`.',
|
|
247
258
|
'plan compile': 'plan compile --request <request.json> | --schema --json',
|
|
248
259
|
'plan verify': 'plan verify --request <request.json> --plan <plan.json>',
|
|
249
260
|
'run start': 'run start --request <request.json> --executor <adapter>'
|
|
@@ -277,10 +288,11 @@ const SUBCOMMAND_USAGE = Object.freeze({
|
|
|
277
288
|
'todo status': 'todo status [--json]',
|
|
278
289
|
'todo show': 'todo show --plan <key> --task <id> --json',
|
|
279
290
|
'todo note': 'todo note --plan <key> [--task <id>] (--message <text>|--input <file>) | list --plan <key> [--task <id>] --json',
|
|
280
|
-
'todo note list': 'todo note list --plan <key> [--task <id>] --json',
|
|
291
|
+
'todo note list': 'todo note list --plan <key> [--task <id>] [--json]',
|
|
281
292
|
'todo bindings': 'todo bindings [--plan <key>] [--json]',
|
|
282
293
|
'todo independence': 'todo independence [--plan <key>] [--json] | mode --plan <key> --set <witness|conversation> --reason <text>'
|
|
283
|
-
+ ' | compile --plan <key> --input <file> |
|
|
294
|
+
+ ' | compile --plan <key> --input <file> | compile --schema --json | witness migrate --plan <key>'
|
|
295
|
+
+ ' | witness scaffold --template --plan <key> [--json] | witness scaffold --schema --json | witness scaffold --plan <key> --input <draft>',
|
|
284
296
|
'todo independence mode': 'todo independence mode --plan <key> --set <witness|conversation> --reason <text>',
|
|
285
297
|
'todo structure': 'todo structure --schema --json | [--plan <key>] --json | input --plan <key> --input <file> [--dry-run --json] | compile --plan <key> --input <file> | realize --plan <key> --task <id> (--planned|--realized <actual-structure.json>) [--commit <HEAD|sha>]... | realize --plan <key> --task <id> --input <full-realization.json> | finalize --plan <key> --json',
|
|
286
298
|
'todo seam-profile': 'todo seam-profile --plan <key> --file <path> [--json]',
|