@quolu/lattice 0.63.0 → 0.63.2
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/LICENSE +147 -147
- package/README.ja.md +378 -378
- package/README.md +303 -303
- package/bin/lattice-mcp.mjs +0 -0
- package/bin/lattice-scripted-adapter.mjs +0 -0
- package/bin/lattice-scripted-worker.mjs +0 -0
- package/bin/lattice-work-order-adapter.mjs +0 -0
- package/bin/lattice.mjs +3 -1
- package/docs/bridge-setup.md +248 -248
- package/docs/schemas/lattice.executor_packet.v1.schema.json +57 -57
- package/docs/schemas/lattice.executor_receipt.v1.schema.json +66 -66
- package/docs/schemas/lattice.phase_todo_revision.v3.schema.json +360 -360
- package/docs/schemas/lattice.plan_create_input.v1.schema.json +56 -56
- package/docs/schemas/lattice.plan_create_input.v2.schema.json +72 -72
- package/docs/schemas/lattice.plan_create_input.v3.schema.json +81 -81
- package/docs/schemas/lattice.plan_create_input.v4.schema.json +357 -85
- package/docs/schemas/lattice.plan_scope_review.v1.schema.json +55 -55
- package/docs/schemas/lattice.run_request.v1.schema.json +238 -238
- package/docs/schemas/lattice.runtime_adapter_capabilities.v2.schema.json +55 -55
- package/docs/schemas/lattice.runtime_adapter_registration_input.v1.schema.json +78 -78
- package/docs/schemas/lattice.runtime_adapter_registration_input.v2.schema.json +86 -86
- package/docs/schemas/lattice.todo_extraction.v2.schema.json +298 -298
- package/docs/schemas/lattice.todo_extraction.v3.schema.json +150 -150
- package/docs/schemas/lattice.todo_extraction.v4.schema.json +161 -161
- package/docs/schemas/lattice.todo_revision.v2.schema.json +260 -260
- package/docs/schemas/lattice.todo_revision_set.v3.schema.json +363 -363
- package/docs/schemas/lattice.todo_structure_binding.v1.schema.json +47 -47
- package/docs/schemas/lattice.todo_structure_realization.v1.schema.json +55 -55
- package/docs/schemas/lattice.todo_structure_set.v1.schema.json +264 -264
- package/package.json +109 -109
- package/sensor/LICENSE +21 -21
- package/sensor/NOTICE +19 -19
- package/sensor/dist/bin/lattice-sensor.js +9 -9
- package/sensor/dist/db/index.js +24 -24
- package/sensor/dist/db/migrations.js +41 -41
- package/sensor/dist/db/queries.js +164 -164
- package/sensor/dist/db/schema.sql +205 -205
- package/sensor/dist/directory.js +5 -5
- package/sensor/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
- package/sensor/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
- package/sensor/dist/mcp/liveness-watchdog.js +53 -53
- package/sensor/dist/mcp/server-instructions.js +95 -95
- package/sensor/package.json +56 -56
- package/src/project-cli.mjs +164 -24
- package/src/todo-authoring-input.mjs +35 -5
- package/src/todo-cli.mjs +2 -2
- package/src/todo-store.mjs +52 -21
|
@@ -1,56 +1,56 @@
|
|
|
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.v1.schema.json",
|
|
4
|
-
"title": "lattice.plan_create_input.v1",
|
|
5
|
-
"description": "Canonical initial authoring input for lattice plan create.",
|
|
6
|
-
"$comment": "Runtime validation additionally enforces canonical JSON+LF bytes, strict ordering, unique task ids, graph validity, byte bounds, and input_digest as the canonical self-digest.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"required": ["schema", "project_id", "plan_key", "plan_version", "actor", "recorded_at", "tasks", "hard_dependencies", "joins", "input_digest"],
|
|
10
|
-
"properties": {
|
|
11
|
-
"schema": { "const": "lattice.plan_create_input.v1" },
|
|
12
|
-
"project_id": { "$ref": "#/$defs/identifier" },
|
|
13
|
-
"plan_key": { "$ref": "#/$defs/identifier" },
|
|
14
|
-
"plan_version": { "$ref": "#/$defs/identifier" },
|
|
15
|
-
"actor": { "$ref": "#/$defs/actor" },
|
|
16
|
-
"recorded_at": { "$ref": "#/$defs/strictTimestamp" },
|
|
17
|
-
"tasks": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/task" } },
|
|
18
|
-
"hard_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/edge" } },
|
|
19
|
-
"joins": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/join" } },
|
|
20
|
-
"input_digest": { "$ref": "#/$defs/digest" }
|
|
21
|
-
},
|
|
22
|
-
"$defs": {
|
|
23
|
-
"identifier": { "type": "string", "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$" },
|
|
24
|
-
"digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
25
|
-
"repoRef": { "type": "string", "minLength": 1, "maxLength": 1024, "pattern": "^(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*\\\\)(?!.*[\\u0000-\\u001f\\u007f])[^/]+(?:/[^/]+)*$" },
|
|
26
|
-
"strictTimestamp": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" },
|
|
27
|
-
"nullableRepoRef": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/repoRef" }] },
|
|
28
|
-
"nullableIdentifier": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/identifier" }] },
|
|
29
|
-
"actor": {
|
|
30
|
-
"type": "object", "additionalProperties": false, "required": ["host", "session", "agent"],
|
|
31
|
-
"properties": { "host": { "$ref": "#/$defs/identifier" }, "session": { "$ref": "#/$defs/identifier" }, "agent": { "$ref": "#/$defs/identifier" } }
|
|
32
|
-
},
|
|
33
|
-
"task": {
|
|
34
|
-
"type": "object", "additionalProperties": false,
|
|
35
|
-
"required": ["task_id", "title", "lane", "narrative_ref", "narrative_anchor", "compile_binding", "parent_task_id"],
|
|
36
|
-
"properties": {
|
|
37
|
-
"task_id": { "$ref": "#/$defs/identifier" }, "title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
|
|
38
|
-
"lane": { "$ref": "#/$defs/identifier" }, "narrative_ref": { "$ref": "#/$defs/nullableRepoRef" },
|
|
39
|
-
"narrative_anchor": { "type": "null" }, "compile_binding": { "type": "null" },
|
|
40
|
-
"parent_task_id": { "$ref": "#/$defs/nullableIdentifier" }
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"nodeRef": {
|
|
44
|
-
"type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "task_id"],
|
|
45
|
-
"properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "task_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
|
|
46
|
-
},
|
|
47
|
-
"edge": {
|
|
48
|
-
"type": "object", "additionalProperties": false, "required": ["from", "to"],
|
|
49
|
-
"properties": { "from": { "$ref": "#/$defs/nodeRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
|
|
50
|
-
},
|
|
51
|
-
"join": {
|
|
52
|
-
"type": "object", "additionalProperties": false, "required": ["id", "after", "before"],
|
|
53
|
-
"properties": { "id": { "$ref": "#/$defs/identifier" }, "after": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/nodeRef" } }, "before": { "$ref": "#/$defs/nodeRef" } }
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
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.v1.schema.json",
|
|
4
|
+
"title": "lattice.plan_create_input.v1",
|
|
5
|
+
"description": "Canonical initial authoring input for lattice plan create.",
|
|
6
|
+
"$comment": "Runtime validation additionally enforces canonical JSON+LF bytes, strict ordering, unique task ids, graph validity, byte bounds, and input_digest as the canonical self-digest.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": ["schema", "project_id", "plan_key", "plan_version", "actor", "recorded_at", "tasks", "hard_dependencies", "joins", "input_digest"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"schema": { "const": "lattice.plan_create_input.v1" },
|
|
12
|
+
"project_id": { "$ref": "#/$defs/identifier" },
|
|
13
|
+
"plan_key": { "$ref": "#/$defs/identifier" },
|
|
14
|
+
"plan_version": { "$ref": "#/$defs/identifier" },
|
|
15
|
+
"actor": { "$ref": "#/$defs/actor" },
|
|
16
|
+
"recorded_at": { "$ref": "#/$defs/strictTimestamp" },
|
|
17
|
+
"tasks": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/task" } },
|
|
18
|
+
"hard_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/edge" } },
|
|
19
|
+
"joins": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/join" } },
|
|
20
|
+
"input_digest": { "$ref": "#/$defs/digest" }
|
|
21
|
+
},
|
|
22
|
+
"$defs": {
|
|
23
|
+
"identifier": { "type": "string", "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$" },
|
|
24
|
+
"digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
25
|
+
"repoRef": { "type": "string", "minLength": 1, "maxLength": 1024, "pattern": "^(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*\\\\)(?!.*[\\u0000-\\u001f\\u007f])[^/]+(?:/[^/]+)*$" },
|
|
26
|
+
"strictTimestamp": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" },
|
|
27
|
+
"nullableRepoRef": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/repoRef" }] },
|
|
28
|
+
"nullableIdentifier": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/identifier" }] },
|
|
29
|
+
"actor": {
|
|
30
|
+
"type": "object", "additionalProperties": false, "required": ["host", "session", "agent"],
|
|
31
|
+
"properties": { "host": { "$ref": "#/$defs/identifier" }, "session": { "$ref": "#/$defs/identifier" }, "agent": { "$ref": "#/$defs/identifier" } }
|
|
32
|
+
},
|
|
33
|
+
"task": {
|
|
34
|
+
"type": "object", "additionalProperties": false,
|
|
35
|
+
"required": ["task_id", "title", "lane", "narrative_ref", "narrative_anchor", "compile_binding", "parent_task_id"],
|
|
36
|
+
"properties": {
|
|
37
|
+
"task_id": { "$ref": "#/$defs/identifier" }, "title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
|
|
38
|
+
"lane": { "$ref": "#/$defs/identifier" }, "narrative_ref": { "$ref": "#/$defs/nullableRepoRef" },
|
|
39
|
+
"narrative_anchor": { "type": "null" }, "compile_binding": { "type": "null" },
|
|
40
|
+
"parent_task_id": { "$ref": "#/$defs/nullableIdentifier" }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"nodeRef": {
|
|
44
|
+
"type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "task_id"],
|
|
45
|
+
"properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "task_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
|
|
46
|
+
},
|
|
47
|
+
"edge": {
|
|
48
|
+
"type": "object", "additionalProperties": false, "required": ["from", "to"],
|
|
49
|
+
"properties": { "from": { "$ref": "#/$defs/nodeRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
|
|
50
|
+
},
|
|
51
|
+
"join": {
|
|
52
|
+
"type": "object", "additionalProperties": false, "required": ["id", "after", "before"],
|
|
53
|
+
"properties": { "id": { "$ref": "#/$defs/identifier" }, "after": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/nodeRef" } }, "before": { "$ref": "#/$defs/nodeRef" } }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,72 +1,72 @@
|
|
|
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.v2.schema.json",
|
|
4
|
-
"title": "lattice.plan_create_input.v2",
|
|
5
|
-
"description": "Canonical initial authoring input for a phase-controlled Lattice plan.",
|
|
6
|
-
"$comment": "Runtime validation additionally enforces canonical JSON+LF bytes, sorted identifiers, unique ids, acyclic task/phase graphs, byte bounds, and input_digest.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"required": ["schema", "project_id", "plan_key", "plan_version", "actor", "recorded_at", "tasks", "phases", "hard_dependencies", "joins", "input_digest"],
|
|
10
|
-
"properties": {
|
|
11
|
-
"schema": { "const": "lattice.plan_create_input.v2" },
|
|
12
|
-
"project_id": { "$ref": "#/$defs/identifier" },
|
|
13
|
-
"plan_key": { "$ref": "#/$defs/identifier" },
|
|
14
|
-
"plan_version": { "$ref": "#/$defs/identifier" },
|
|
15
|
-
"actor": { "$ref": "#/$defs/actor" },
|
|
16
|
-
"recorded_at": { "$ref": "#/$defs/strictTimestamp" },
|
|
17
|
-
"tasks": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/task" } },
|
|
18
|
-
"phases": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/phase" } },
|
|
19
|
-
"hard_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/edge" } },
|
|
20
|
-
"joins": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/join" } },
|
|
21
|
-
"input_digest": { "$ref": "#/$defs/digest" }
|
|
22
|
-
},
|
|
23
|
-
"$defs": {
|
|
24
|
-
"identifier": { "type": "string", "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$" },
|
|
25
|
-
"digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
26
|
-
"repoRef": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
27
|
-
"strictTimestamp": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" },
|
|
28
|
-
"nullableRepoRef": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/repoRef" }] },
|
|
29
|
-
"nullableIdentifier": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/identifier" }] },
|
|
30
|
-
"actor": {
|
|
31
|
-
"type": "object", "additionalProperties": false, "required": ["host", "session", "agent"],
|
|
32
|
-
"properties": { "host": { "$ref": "#/$defs/identifier" }, "session": { "$ref": "#/$defs/identifier" }, "agent": { "$ref": "#/$defs/identifier" } }
|
|
33
|
-
},
|
|
34
|
-
"task": {
|
|
35
|
-
"type": "object", "additionalProperties": false,
|
|
36
|
-
"required": ["task_id", "title", "lane", "narrative_ref", "narrative_anchor", "compile_binding", "parent_task_id", "phase_id"],
|
|
37
|
-
"properties": {
|
|
38
|
-
"task_id": { "$ref": "#/$defs/identifier" },
|
|
39
|
-
"title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
|
|
40
|
-
"lane": { "$ref": "#/$defs/identifier" },
|
|
41
|
-
"narrative_ref": { "$ref": "#/$defs/nullableRepoRef" },
|
|
42
|
-
"narrative_anchor": { "type": "null" },
|
|
43
|
-
"compile_binding": { "type": "null" },
|
|
44
|
-
"parent_task_id": { "$ref": "#/$defs/nullableIdentifier" },
|
|
45
|
-
"phase_id": { "$ref": "#/$defs/identifier" }
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"phase": {
|
|
49
|
-
"type": "object", "additionalProperties": false,
|
|
50
|
-
"required": ["phase_id", "title", "gate_policy", "predecessor_phase_ids", "required_evidence_slots"],
|
|
51
|
-
"properties": {
|
|
52
|
-
"phase_id": { "$ref": "#/$defs/identifier" },
|
|
53
|
-
"title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
|
|
54
|
-
"gate_policy": { "$ref": "#/$defs/identifier" },
|
|
55
|
-
"predecessor_phase_ids": { "type": "array", "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true },
|
|
56
|
-
"required_evidence_slots": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true }
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"nodeRef": {
|
|
60
|
-
"type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "task_id"],
|
|
61
|
-
"properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "task_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
|
|
62
|
-
},
|
|
63
|
-
"edge": {
|
|
64
|
-
"type": "object", "additionalProperties": false, "required": ["from", "to"],
|
|
65
|
-
"properties": { "from": { "$ref": "#/$defs/nodeRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
|
|
66
|
-
},
|
|
67
|
-
"join": {
|
|
68
|
-
"type": "object", "additionalProperties": false, "required": ["id", "after", "before"],
|
|
69
|
-
"properties": { "id": { "$ref": "#/$defs/identifier" }, "after": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/nodeRef" } }, "before": { "$ref": "#/$defs/nodeRef" } }
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
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.v2.schema.json",
|
|
4
|
+
"title": "lattice.plan_create_input.v2",
|
|
5
|
+
"description": "Canonical initial authoring input for a phase-controlled Lattice plan.",
|
|
6
|
+
"$comment": "Runtime validation additionally enforces canonical JSON+LF bytes, sorted identifiers, unique ids, acyclic task/phase graphs, byte bounds, and input_digest.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": ["schema", "project_id", "plan_key", "plan_version", "actor", "recorded_at", "tasks", "phases", "hard_dependencies", "joins", "input_digest"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"schema": { "const": "lattice.plan_create_input.v2" },
|
|
12
|
+
"project_id": { "$ref": "#/$defs/identifier" },
|
|
13
|
+
"plan_key": { "$ref": "#/$defs/identifier" },
|
|
14
|
+
"plan_version": { "$ref": "#/$defs/identifier" },
|
|
15
|
+
"actor": { "$ref": "#/$defs/actor" },
|
|
16
|
+
"recorded_at": { "$ref": "#/$defs/strictTimestamp" },
|
|
17
|
+
"tasks": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/task" } },
|
|
18
|
+
"phases": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/phase" } },
|
|
19
|
+
"hard_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/edge" } },
|
|
20
|
+
"joins": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/join" } },
|
|
21
|
+
"input_digest": { "$ref": "#/$defs/digest" }
|
|
22
|
+
},
|
|
23
|
+
"$defs": {
|
|
24
|
+
"identifier": { "type": "string", "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$" },
|
|
25
|
+
"digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
26
|
+
"repoRef": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
27
|
+
"strictTimestamp": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" },
|
|
28
|
+
"nullableRepoRef": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/repoRef" }] },
|
|
29
|
+
"nullableIdentifier": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/identifier" }] },
|
|
30
|
+
"actor": {
|
|
31
|
+
"type": "object", "additionalProperties": false, "required": ["host", "session", "agent"],
|
|
32
|
+
"properties": { "host": { "$ref": "#/$defs/identifier" }, "session": { "$ref": "#/$defs/identifier" }, "agent": { "$ref": "#/$defs/identifier" } }
|
|
33
|
+
},
|
|
34
|
+
"task": {
|
|
35
|
+
"type": "object", "additionalProperties": false,
|
|
36
|
+
"required": ["task_id", "title", "lane", "narrative_ref", "narrative_anchor", "compile_binding", "parent_task_id", "phase_id"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"task_id": { "$ref": "#/$defs/identifier" },
|
|
39
|
+
"title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
|
|
40
|
+
"lane": { "$ref": "#/$defs/identifier" },
|
|
41
|
+
"narrative_ref": { "$ref": "#/$defs/nullableRepoRef" },
|
|
42
|
+
"narrative_anchor": { "type": "null" },
|
|
43
|
+
"compile_binding": { "type": "null" },
|
|
44
|
+
"parent_task_id": { "$ref": "#/$defs/nullableIdentifier" },
|
|
45
|
+
"phase_id": { "$ref": "#/$defs/identifier" }
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"phase": {
|
|
49
|
+
"type": "object", "additionalProperties": false,
|
|
50
|
+
"required": ["phase_id", "title", "gate_policy", "predecessor_phase_ids", "required_evidence_slots"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"phase_id": { "$ref": "#/$defs/identifier" },
|
|
53
|
+
"title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
|
|
54
|
+
"gate_policy": { "$ref": "#/$defs/identifier" },
|
|
55
|
+
"predecessor_phase_ids": { "type": "array", "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true },
|
|
56
|
+
"required_evidence_slots": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"nodeRef": {
|
|
60
|
+
"type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "task_id"],
|
|
61
|
+
"properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "task_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
|
|
62
|
+
},
|
|
63
|
+
"edge": {
|
|
64
|
+
"type": "object", "additionalProperties": false, "required": ["from", "to"],
|
|
65
|
+
"properties": { "from": { "$ref": "#/$defs/nodeRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
|
|
66
|
+
},
|
|
67
|
+
"join": {
|
|
68
|
+
"type": "object", "additionalProperties": false, "required": ["id", "after", "before"],
|
|
69
|
+
"properties": { "id": { "$ref": "#/$defs/identifier" }, "after": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/nodeRef" } }, "before": { "$ref": "#/$defs/nodeRef" } }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,81 +1,81 @@
|
|
|
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.v3.schema.json",
|
|
4
|
-
"title": "lattice.plan_create_input.v3",
|
|
5
|
-
"description": "Canonical initial authoring input for a phase-audited plan whose task scheduling is controlled by the task DAG.",
|
|
6
|
-
"$comment": "Runtime validation additionally enforces canonical JSON+LF bytes, sorted identifiers and edges, unique ids, combined task/phase acyclicity, byte bounds, and input_digest.",
|
|
7
|
-
"type": "object",
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"required": ["schema", "project_id", "plan_key", "plan_version", "actor", "recorded_at", "tasks", "phases", "hard_dependencies", "joins", "phase_accept_dependencies", "input_digest"],
|
|
10
|
-
"properties": {
|
|
11
|
-
"schema": { "const": "lattice.plan_create_input.v3" },
|
|
12
|
-
"project_id": { "$ref": "#/$defs/identifier" },
|
|
13
|
-
"plan_key": { "$ref": "#/$defs/identifier" },
|
|
14
|
-
"plan_version": { "$ref": "#/$defs/identifier" },
|
|
15
|
-
"actor": { "$ref": "#/$defs/actor" },
|
|
16
|
-
"recorded_at": { "$ref": "#/$defs/strictTimestamp" },
|
|
17
|
-
"tasks": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/task" } },
|
|
18
|
-
"phases": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/phase" } },
|
|
19
|
-
"hard_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/edge" } },
|
|
20
|
-
"joins": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/join" } },
|
|
21
|
-
"phase_accept_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/phaseAcceptDependency" } },
|
|
22
|
-
"input_digest": { "$ref": "#/$defs/digest" }
|
|
23
|
-
},
|
|
24
|
-
"$defs": {
|
|
25
|
-
"identifier": { "type": "string", "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$" },
|
|
26
|
-
"digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
27
|
-
"repoRef": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
28
|
-
"strictTimestamp": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" },
|
|
29
|
-
"nullableRepoRef": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/repoRef" }] },
|
|
30
|
-
"nullableIdentifier": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/identifier" }] },
|
|
31
|
-
"actor": {
|
|
32
|
-
"type": "object", "additionalProperties": false, "required": ["host", "session", "agent"],
|
|
33
|
-
"properties": { "host": { "$ref": "#/$defs/identifier" }, "session": { "$ref": "#/$defs/identifier" }, "agent": { "$ref": "#/$defs/identifier" } }
|
|
34
|
-
},
|
|
35
|
-
"task": {
|
|
36
|
-
"type": "object", "additionalProperties": false,
|
|
37
|
-
"required": ["task_id", "title", "lane", "narrative_ref", "narrative_anchor", "compile_binding", "parent_task_id", "phase_id"],
|
|
38
|
-
"properties": {
|
|
39
|
-
"task_id": { "$ref": "#/$defs/identifier" },
|
|
40
|
-
"title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
|
|
41
|
-
"lane": { "$ref": "#/$defs/identifier" },
|
|
42
|
-
"narrative_ref": { "$ref": "#/$defs/nullableRepoRef" },
|
|
43
|
-
"narrative_anchor": { "type": "null" },
|
|
44
|
-
"compile_binding": { "type": "null" },
|
|
45
|
-
"parent_task_id": { "$ref": "#/$defs/nullableIdentifier" },
|
|
46
|
-
"phase_id": { "$ref": "#/$defs/identifier" }
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"phase": {
|
|
50
|
-
"type": "object", "additionalProperties": false,
|
|
51
|
-
"required": ["phase_id", "title", "gate_policy", "predecessor_phase_ids", "required_evidence_slots"],
|
|
52
|
-
"properties": {
|
|
53
|
-
"phase_id": { "$ref": "#/$defs/identifier" },
|
|
54
|
-
"title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
|
|
55
|
-
"gate_policy": { "$ref": "#/$defs/identifier" },
|
|
56
|
-
"predecessor_phase_ids": { "type": "array", "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true },
|
|
57
|
-
"required_evidence_slots": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true }
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"nodeRef": {
|
|
61
|
-
"type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "task_id"],
|
|
62
|
-
"properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "task_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
|
|
63
|
-
},
|
|
64
|
-
"phaseRef": {
|
|
65
|
-
"type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "phase_id"],
|
|
66
|
-
"properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "phase_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
|
|
67
|
-
},
|
|
68
|
-
"edge": {
|
|
69
|
-
"type": "object", "additionalProperties": false, "required": ["from", "to"],
|
|
70
|
-
"properties": { "from": { "$ref": "#/$defs/nodeRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
|
|
71
|
-
},
|
|
72
|
-
"phaseAcceptDependency": {
|
|
73
|
-
"type": "object", "additionalProperties": false, "required": ["from", "to"],
|
|
74
|
-
"properties": { "from": { "$ref": "#/$defs/phaseRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
|
|
75
|
-
},
|
|
76
|
-
"join": {
|
|
77
|
-
"type": "object", "additionalProperties": false, "required": ["id", "after", "before"],
|
|
78
|
-
"properties": { "id": { "$ref": "#/$defs/identifier" }, "after": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/nodeRef" } }, "before": { "$ref": "#/$defs/nodeRef" } }
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
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.v3.schema.json",
|
|
4
|
+
"title": "lattice.plan_create_input.v3",
|
|
5
|
+
"description": "Canonical initial authoring input for a phase-audited plan whose task scheduling is controlled by the task DAG.",
|
|
6
|
+
"$comment": "Runtime validation additionally enforces canonical JSON+LF bytes, sorted identifiers and edges, unique ids, combined task/phase acyclicity, byte bounds, and input_digest.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": ["schema", "project_id", "plan_key", "plan_version", "actor", "recorded_at", "tasks", "phases", "hard_dependencies", "joins", "phase_accept_dependencies", "input_digest"],
|
|
10
|
+
"properties": {
|
|
11
|
+
"schema": { "const": "lattice.plan_create_input.v3" },
|
|
12
|
+
"project_id": { "$ref": "#/$defs/identifier" },
|
|
13
|
+
"plan_key": { "$ref": "#/$defs/identifier" },
|
|
14
|
+
"plan_version": { "$ref": "#/$defs/identifier" },
|
|
15
|
+
"actor": { "$ref": "#/$defs/actor" },
|
|
16
|
+
"recorded_at": { "$ref": "#/$defs/strictTimestamp" },
|
|
17
|
+
"tasks": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/task" } },
|
|
18
|
+
"phases": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/phase" } },
|
|
19
|
+
"hard_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/edge" } },
|
|
20
|
+
"joins": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/join" } },
|
|
21
|
+
"phase_accept_dependencies": { "type": "array", "maxItems": 2048, "items": { "$ref": "#/$defs/phaseAcceptDependency" } },
|
|
22
|
+
"input_digest": { "$ref": "#/$defs/digest" }
|
|
23
|
+
},
|
|
24
|
+
"$defs": {
|
|
25
|
+
"identifier": { "type": "string", "pattern": "^[0-9A-Za-z](?:[0-9A-Za-z._-]{0,127})$" },
|
|
26
|
+
"digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
27
|
+
"repoRef": { "type": "string", "minLength": 1, "maxLength": 1024 },
|
|
28
|
+
"strictTimestamp": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$" },
|
|
29
|
+
"nullableRepoRef": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/repoRef" }] },
|
|
30
|
+
"nullableIdentifier": { "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/identifier" }] },
|
|
31
|
+
"actor": {
|
|
32
|
+
"type": "object", "additionalProperties": false, "required": ["host", "session", "agent"],
|
|
33
|
+
"properties": { "host": { "$ref": "#/$defs/identifier" }, "session": { "$ref": "#/$defs/identifier" }, "agent": { "$ref": "#/$defs/identifier" } }
|
|
34
|
+
},
|
|
35
|
+
"task": {
|
|
36
|
+
"type": "object", "additionalProperties": false,
|
|
37
|
+
"required": ["task_id", "title", "lane", "narrative_ref", "narrative_anchor", "compile_binding", "parent_task_id", "phase_id"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"task_id": { "$ref": "#/$defs/identifier" },
|
|
40
|
+
"title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
|
|
41
|
+
"lane": { "$ref": "#/$defs/identifier" },
|
|
42
|
+
"narrative_ref": { "$ref": "#/$defs/nullableRepoRef" },
|
|
43
|
+
"narrative_anchor": { "type": "null" },
|
|
44
|
+
"compile_binding": { "type": "null" },
|
|
45
|
+
"parent_task_id": { "$ref": "#/$defs/nullableIdentifier" },
|
|
46
|
+
"phase_id": { "$ref": "#/$defs/identifier" }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"phase": {
|
|
50
|
+
"type": "object", "additionalProperties": false,
|
|
51
|
+
"required": ["phase_id", "title", "gate_policy", "predecessor_phase_ids", "required_evidence_slots"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"phase_id": { "$ref": "#/$defs/identifier" },
|
|
54
|
+
"title": { "oneOf": [{ "type": "null" }, { "type": "string", "minLength": 1, "maxLength": 16384 }] },
|
|
55
|
+
"gate_policy": { "$ref": "#/$defs/identifier" },
|
|
56
|
+
"predecessor_phase_ids": { "type": "array", "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true },
|
|
57
|
+
"required_evidence_slots": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/identifier" }, "uniqueItems": true }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"nodeRef": {
|
|
61
|
+
"type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "task_id"],
|
|
62
|
+
"properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "task_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
|
|
63
|
+
},
|
|
64
|
+
"phaseRef": {
|
|
65
|
+
"type": "object", "additionalProperties": false, "required": ["project_id", "plan_key", "phase_id"],
|
|
66
|
+
"properties": { "project_id": { "$ref": "#/$defs/identifier" }, "plan_key": { "$ref": "#/$defs/identifier" }, "phase_id": { "$ref": "#/$defs/identifier" }, "expected_topology_digest": { "$ref": "#/$defs/digest" } }
|
|
67
|
+
},
|
|
68
|
+
"edge": {
|
|
69
|
+
"type": "object", "additionalProperties": false, "required": ["from", "to"],
|
|
70
|
+
"properties": { "from": { "$ref": "#/$defs/nodeRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
|
|
71
|
+
},
|
|
72
|
+
"phaseAcceptDependency": {
|
|
73
|
+
"type": "object", "additionalProperties": false, "required": ["from", "to"],
|
|
74
|
+
"properties": { "from": { "$ref": "#/$defs/phaseRef" }, "to": { "$ref": "#/$defs/nodeRef" } }
|
|
75
|
+
},
|
|
76
|
+
"join": {
|
|
77
|
+
"type": "object", "additionalProperties": false, "required": ["id", "after", "before"],
|
|
78
|
+
"properties": { "id": { "$ref": "#/$defs/identifier" }, "after": { "type": "array", "minItems": 1, "maxItems": 512, "items": { "$ref": "#/$defs/nodeRef" } }, "before": { "$ref": "#/$defs/nodeRef" } }
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|