@quolu/lattice 0.97.1 → 0.98.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/package.json +1 -1
- package/src/cli-help.mjs +0 -2
- package/src/todo-cli.mjs +1 -20
- package/src/todo-nudges.mjs +0 -37
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quolu/lattice",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.98.0",
|
|
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",
|
package/src/cli-help.mjs
CHANGED
|
@@ -88,7 +88,6 @@ Read commands:
|
|
|
88
88
|
show --plan <key> --task <id> --json # 個別ToDoと最新bounded note contextを追加操作なしで返す
|
|
89
89
|
note list --plan <key> [--task <id>] --json # note全履歴の診断面(通常read/startでは不要)
|
|
90
90
|
notice list [--lane <lane>] [--include-acked] [--json] # 着手できるようになった工程の知らせ(既定は未ackだけ。lane省略で全lane)
|
|
91
|
-
nudge [--json] # 前の工程が終わっているのに未着手の工程を担当ごとに返し、発火(着手)と、動けない時の止め(todo block)を促す(読むだけ)
|
|
92
91
|
blockers [--json] # 止めのある工程を全部返す(題・担当・理由の全文・止めた時刻と者・外すコマンド。読むだけ。外すのは誰でも todo unblock)
|
|
93
92
|
bindings [--plan <key>] [--json] # compile_binding付きTaskをTODO identityつきで投影する
|
|
94
93
|
display read [--json] # host表示用の工程表読取(lattice.todo_display_read_result.v1)。不整合でも断らずstateで返す
|
|
@@ -308,7 +307,6 @@ const SUBCOMMAND_USAGE = Object.freeze({
|
|
|
308
307
|
'todo notice': 'todo notice list [--lane <lane>] [--include-acked] [--json] | ack --lane <lane> --notice <id>[,<id>...] [--json]',
|
|
309
308
|
'todo notice list': 'todo notice list [--lane <lane>] [--include-acked] [--json] # lattice.todo_notice_list_result.v1',
|
|
310
309
|
'todo notice ack': 'todo notice ack --lane <lane> --notice <id>[,<id>...] [--json] # lattice.todo_notice_ack_result.v1 {acked, already, closed}',
|
|
311
|
-
'todo nudge': 'todo nudge [--json] # lattice.todo_nudge_result.v1 {lanes: [{lane, tasks: [{fire_actions, stop_action, prompt}]}]}',
|
|
312
310
|
'todo blockers': 'todo blockers [--json] # lattice.todo_blockers_result.v1 {blockers: [{plan_key, task_id, title, lane, reason, blocked_at, blocked_by, unblock_action}]}',
|
|
313
311
|
'todo wait': 'todo wait --plan <key> --task <id> [--reason <text>] | --cancel [--json] # lattice.todo_wait_result.v1 {state: waiting|startable_now|not_pending|cancelled}',
|
|
314
312
|
'todo bindings': 'todo bindings [--plan <key>] [--json]',
|
package/src/todo-cli.mjs
CHANGED
|
@@ -172,7 +172,6 @@ import { compileSeamProposalArtifact, declaredConcernSymbols } from './seam-prop
|
|
|
172
172
|
import { collectSensorEvidence } from './sensor-adapter.mjs';
|
|
173
173
|
import { newTodoNotices, projectTodoNotices, waitInEffect } from './todo-notices.mjs';
|
|
174
174
|
import { projectTodoBlockers, todoBlockerKey } from './todo-blockers.mjs';
|
|
175
|
-
import { projectTodoNudges } from './todo-nudges.mjs';
|
|
176
175
|
import {
|
|
177
176
|
ackTodoNotices, cancelTodoNoticeWait, readAllTodoNoticeAcks, readAllTodoNoticeWaits, readTodoNoticeAcks, writeTodoNoticeWait,
|
|
178
177
|
} from './todo-notice-store.mjs';
|
|
@@ -310,7 +309,7 @@ const TODO_COMMAND_NAMES = Object.freeze([
|
|
|
310
309
|
'status', 'show', 'note', 'bindings', 'display', 'independence', 'structure', 'seam-profile', 'seam-proposal',
|
|
311
310
|
'verify', 'repair-eol', 'snapshot', 'gantt', 'dashboard', 'phase', 'migrate', 'start', 'block',
|
|
312
311
|
'unblock', 'retire', 'done', 'reopen', 'evidence', 'split', 'revise', 'revise-phase', 'revise-set',
|
|
313
|
-
'retract', 'dependency', 'add', 'notice', 'wait', '
|
|
312
|
+
'retract', 'dependency', 'add', 'notice', 'wait', 'blockers',
|
|
314
313
|
]);
|
|
315
314
|
|
|
316
315
|
function typedArgumentFailure(stderr, code, message, detail, context = {}) {
|
|
@@ -372,7 +371,6 @@ const TODO_FLAG_SPECS = Object.freeze({
|
|
|
372
371
|
show: Object.freeze({ known: ['plan', 'task', 'json'], required: ['plan', 'task'], booleans: ['json'] }),
|
|
373
372
|
'notice list': Object.freeze({ known: ['lane', 'include-acked', 'json'], required: [], booleans: ['include-acked', 'json'] }),
|
|
374
373
|
'notice ack': Object.freeze({ known: ['lane', 'notice', 'json'], required: ['lane', 'notice'], booleans: ['json'] }),
|
|
375
|
-
nudge: Object.freeze({ known: ['json'], required: [], booleans: ['json'] }),
|
|
376
374
|
blockers: Object.freeze({ known: ['json'], required: [], booleans: ['json'] }),
|
|
377
375
|
wait: Object.freeze({ known: ['plan', 'task', 'reason', 'cancel', 'json'], required: ['plan', 'task'], booleans: ['cancel', 'json'] }),
|
|
378
376
|
'note list': Object.freeze({ known: ['plan', 'task', 'json'], required: ['plan'], booleans: ['json'] }),
|
|
@@ -4666,21 +4664,6 @@ async function declaredWitnessRows(repoRoot, store) {
|
|
|
4666
4664
|
return (planKey, taskId) => rows.get(planKey)?.has(taskId) === true;
|
|
4667
4665
|
}
|
|
4668
4666
|
|
|
4669
|
-
/**
|
|
4670
|
-
* `todo nudge` (sweep-list, dfd-nudge.md): the ready set by lane with fire/stop prompts. Read-only. A directory with
|
|
4671
|
-
* no Store yet answers an empty list, since the BellTeam run walks every chart directory.
|
|
4672
|
-
*/
|
|
4673
|
-
async function nudgeList({ repoRoot }) {
|
|
4674
|
-
const store = await readTodoStoreOrNull(repoRoot);
|
|
4675
|
-
const result = {
|
|
4676
|
-
schema: 'lattice.todo_nudge_result.v1', project_id: store?.project_id ?? null,
|
|
4677
|
-
lanes: store === null ? [] : projectTodoNudges(store, { declared: await declaredWitnessRows(repoRoot, store) }),
|
|
4678
|
-
result_digest: '',
|
|
4679
|
-
};
|
|
4680
|
-
result.result_digest = todoSelfDigest(result, 'result_digest');
|
|
4681
|
-
return result;
|
|
4682
|
-
}
|
|
4683
|
-
|
|
4684
4667
|
/** The Store, or null where none exists yet (the BellTeam reads walk every chart directory). */
|
|
4685
4668
|
async function readTodoStoreOrNull(repoRoot) {
|
|
4686
4669
|
try { return await readTodoStore({ repoRoot }); }
|
|
@@ -5273,8 +5256,6 @@ export async function runTodoCli({ argv, cwd, stdout, stderr, env = process.env,
|
|
|
5273
5256
|
if (isNoticeLane(flags.lane) && ids.length > 0 && ids.every((id) => /^[0-9a-f]{64}$/u.test(id))) {
|
|
5274
5257
|
action = (repoRoot) => noticeAck({ repoRoot, env, lane: flags.lane, ids });
|
|
5275
5258
|
}
|
|
5276
|
-
} else if (argv[0] === 'nudge' && matchFlagCommand(argv, ['nudge'], TODO_FLAG_SPECS.nudge) !== null) {
|
|
5277
|
-
action = (repoRoot) => nudgeList({ repoRoot });
|
|
5278
5259
|
} else if (argv[0] === 'blockers' && matchFlagCommand(argv, ['blockers'], TODO_FLAG_SPECS.blockers) !== null) {
|
|
5279
5260
|
action = (repoRoot) => blockerList({ repoRoot });
|
|
5280
5261
|
} else if (argv[0] === 'wait' && matchFlagCommand(argv, ['wait'], TODO_FLAG_SPECS.wait) !== null) {
|
package/src/todo-nudges.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Nudges (sweep-list, docs/architecture/dfd-nudge.md): the ready set grouped by lane, each task with the prompt to
|
|
2
|
-
// fire it and, if it cannot move once fired, to set a stop. Read-only; no other condition (the Owner's spec).
|
|
3
|
-
|
|
4
|
-
import { startPath } from './todo-notices.mjs';
|
|
5
|
-
import { projectTodoStatus, TODO_STATUS_DISPATCH_ONLY } from './todo-status.mjs';
|
|
6
|
-
|
|
7
|
-
const laneOrder = (lane) => (lane === null ? '\u{10FFFF}' : lane);
|
|
8
|
-
|
|
9
|
-
/** `declared(planKey, taskId)` says whether an enforced plan's witness set records the task's row. */
|
|
10
|
-
export function projectTodoNudges(store, { declared = () => true } = {}) {
|
|
11
|
-
const members = new Map(store.members.map((member) => [member.plan.plan_key, member]));
|
|
12
|
-
const lanes = new Map();
|
|
13
|
-
for (const ready of projectTodoStatus(store, TODO_STATUS_DISPATCH_ONLY).next_ready) {
|
|
14
|
-
const member = members.get(ready.plan_key);
|
|
15
|
-
const task = member?.plan.tasks.find(({ task_id: id }) => id === ready.task_id);
|
|
16
|
-
if (task === undefined) continue;
|
|
17
|
-
const planKey = member.plan.plan_key;
|
|
18
|
-
const fire = startPath(planKey, task.task_id, member.coordination?.mode ?? null, declared(planKey, task.task_id));
|
|
19
|
-
const stop = `lattice todo block --plan ${planKey} --task ${task.task_id} --reason <why it cannot move>`;
|
|
20
|
-
const lane = task.lane ?? null;
|
|
21
|
-
if (!lanes.has(lane)) lanes.set(lane, []);
|
|
22
|
-
lanes.get(lane).push({
|
|
23
|
-
plan_key: planKey,
|
|
24
|
-
plan_version: member.plan.plan_version,
|
|
25
|
-
task_id: task.task_id,
|
|
26
|
-
title: task.title,
|
|
27
|
-
done_condition: task.done_condition ?? null,
|
|
28
|
-
fire_actions: fire,
|
|
29
|
-
stop_action: stop,
|
|
30
|
-
prompt: `${planKey}/${task.task_id} 「${task.title}」: its predecessors are finished and it is not started.`
|
|
31
|
-
+ ` Fire it: ${fire.map((command) => `\`${command}\``).join(' then ')}.`
|
|
32
|
-
+ ` If it cannot move once fired, set a stop: \`${stop}\`.`,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
return [...lanes].sort(([left], [right]) => (laneOrder(left) < laneOrder(right) ? -1 : 1))
|
|
36
|
-
.map(([lane, tasks]) => ({ lane, tasks }));
|
|
37
|
-
}
|