@quolu/lattice 0.59.0 → 0.60.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/bin/lattice.mjs +20 -0
- package/docs/schemas/lattice.executor_packet.v1.schema.json +2 -2
- package/docs/schemas/lattice.plan_create_input.v4.schema.json +1 -1
- package/docs/schemas/lattice.plan_scope_review.v1.schema.json +55 -0
- package/docs/schemas/lattice.todo_extraction.v3.schema.json +6 -2
- package/docs/schemas/lattice.todo_extraction.v4.schema.json +161 -0
- package/package.json +3 -1
- package/src/cli-help.mjs +3 -2
- package/src/plan-scope-review.mjs +214 -0
- package/src/project-cli.mjs +26 -3
- package/src/runtime-contracts.mjs +1 -1
- package/src/runtime-engine.mjs +3 -11
- package/src/runtime-pull-intake.mjs +34 -4
- package/src/runtime-work-order-contracts.mjs +1 -1
- package/src/todo-cli.mjs +106 -42
- package/src/todo-independence-authoritative-observation.mjs +116 -0
- package/src/todo-independence-guidance.mjs +25 -0
- package/src/todo-migration.mjs +124 -48
- package/src/todo-store.mjs +517 -40
- package/src/todo-structure-store.mjs +28 -0
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
readTodoStructureFinalization,
|
|
19
19
|
readTodoStructureRealizationChain,
|
|
20
20
|
readTodoStructureSource,
|
|
21
|
+
todoStructureSourceRef,
|
|
21
22
|
} from './todo-store.mjs';
|
|
22
23
|
|
|
23
24
|
const SHA = /^[0-9a-f]{40}$/u;
|
|
@@ -373,6 +374,33 @@ export async function readTodoStructureFinalizationsForStatus(options = {}) {
|
|
|
373
374
|
return entries.sort((left, right) => compareText(left.plan_key, right.plan_key));
|
|
374
375
|
}
|
|
375
376
|
|
|
377
|
+
/**
|
|
378
|
+
* 既存のstructure input writerで直せるplanned sourceの破損だけを診断する。
|
|
379
|
+
* binding/compile/finalizationは同writerでは直せないため、ここで修理可能と
|
|
380
|
+
* 偽って案内しない。
|
|
381
|
+
*/
|
|
382
|
+
export async function readTodoStructureArtifactDiagnostics(options = {}) {
|
|
383
|
+
const repoRoot = options.repoRoot ?? process.cwd();
|
|
384
|
+
const store = options.store ?? await readTodoStore({ repoRoot, now: options.now });
|
|
385
|
+
const diagnostics = [];
|
|
386
|
+
for (const member of store.members) {
|
|
387
|
+
const planKey = member.plan.plan_key;
|
|
388
|
+
try {
|
|
389
|
+
await readTodoStructureSource({ repoRoot, planKey });
|
|
390
|
+
} catch (error) {
|
|
391
|
+
if (error?.code !== 'INVALID_TODO_STRUCTURE_SET') throw error;
|
|
392
|
+
const reason = error?.detail?.reason ?? error?.message ?? 'structure_artifact_invalid';
|
|
393
|
+
diagnostics.push({
|
|
394
|
+
plan_key: planKey,
|
|
395
|
+
artifact_path: todoStructureSourceRef(planKey),
|
|
396
|
+
reason,
|
|
397
|
+
next_command: `lattice todo structure input --plan ${planKey} --input <corrected-structure-set.json> --json`,
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return diagnostics;
|
|
402
|
+
}
|
|
403
|
+
|
|
376
404
|
function validateTaskMigration(taskMigration) {
|
|
377
405
|
if (!Array.isArray(taskMigration) || taskMigration.length === 0) {
|
|
378
406
|
fail('STRUCTURE_MIGRATION_INVALID', 'task_migration_missing');
|