@aopslabs/aops 0.3.24 → 0.3.26
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/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/SKILL.md +0 -1
- package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/references/agentspace/SKILL.md +0 -6
- package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/references/collaborative-work/SKILL.md +1 -2
- package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/references/working-disciplines/SKILL.md +2 -5
- package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/user-guides/agentspace.md +1 -16
- package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/user-guides/aops-cli.md +4 -33
- package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/user-guides/working-disciplines.md +32 -138
- package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/manifest.json +17 -22
- package/agent-assets-release/agent-assets/inventory.json +5 -5
- package/agent-assets-release/agent-assets/projection.json +1 -1
- package/agent-assets-release/agent-assets-release.json +48 -53
- package/agent-assets-release/agent-assets-release.sigstore.json +27 -28
- package/assets/agent-assets/core/SKILL.md +0 -1
- package/assets/agent-assets/core/references/agentspace/SKILL.md +0 -6
- package/assets/agent-assets/core/references/collaborative-work/SKILL.md +1 -2
- package/assets/agent-assets/core/references/working-disciplines/SKILL.md +2 -5
- package/assets/agent-assets/core/user-guides/agentspace.md +1 -16
- package/assets/agent-assets/core/user-guides/aops-cli.md +4 -33
- package/assets/agent-assets/core/user-guides/working-disciplines.md +32 -138
- package/dist/commands/checkpoint.js +4 -23
- package/dist/commands/community-server.js +212 -6
- package/dist/commands/db.js +145 -0
- package/dist/commands/experience.js +0 -2
- package/dist/commands/memory.js +8 -2
- package/dist/commands/official-catalog.js +1 -1
- package/dist/commands/plan.js +2 -2
- package/dist/commands/pm/index.js +39 -3
- package/dist/commands/pm/projectman.js +281 -8
- package/dist/commands/start-disciplines.js +8 -21
- package/dist/commands/start.js +20 -504
- package/dist/lib/agent-assets/native-fs.js +2 -2
- package/dist/lib/community-migration-snapshot.js +43 -2
- package/dist/lib/community-native-backup.js +386 -0
- package/dist/lib/community-native-lifecycle.js +93 -4
- package/dist/lib/community-native-migration.js +20 -0
- package/dist/main.js +2 -2
- package/dist/seeds/agents-md.js +1 -1
- package/dist/utils/playbook-workspace.js +5 -33
- package/dist/utils/session-guidance.js +0 -7
- package/native/bin/darwin-arm64/aops-agent-assets-fs +0 -0
- package/native/bin/darwin-x64/aops-agent-assets-fs +0 -0
- package/native/bin/win32-x64/aops-agent-assets-fs.exe +0 -0
- package/native/manifest.json +4 -4
- package/native/qualifications/win32-x64.json +2 -2
- package/native/tui/darwin-arm64/aops-tui +0 -0
- package/native/tui/linux-x64/aops-tui +0 -0
- package/native/tui/win32-x64/aops-tui.exe +0 -0
- package/package.json +18 -6
- package/agent-assets-release/agent-assets/core/647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09/files/references/mission/SKILL.md +0 -54
- package/assets/agent-assets/core/references/mission/SKILL.md +0 -54
- package/dist/commands/mission.js +0 -562
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/references/aops-cli-core/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/references/chatv3/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/references/discuss/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/references/docman/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/references/projectman/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/references/sys/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/references/view/SKILL.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/user-guides/agent-assets.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/user-guides/aops-system.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/user-guides/chatv3.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/user-guides/docman.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/user-guides/projectman.md +0 -0
- /package/agent-assets-release/agent-assets/core/{647c6e84fbc48f9a36945d81660f4d2a5241f58a53a18054365bfc16868b0f09 → bc42dd7792dbe66040e99a7ef3d80b3bc788c72b369b5a065cf936aef29f53fb}/files/user-guides/sys.md +0 -0
|
@@ -2701,6 +2701,283 @@ export async function runPmTaskCreate(options = {}) {
|
|
|
2701
2701
|
process.exitCode = 1;
|
|
2702
2702
|
}
|
|
2703
2703
|
}
|
|
2704
|
+
function readBoardColumnList(payload) {
|
|
2705
|
+
if (Array.isArray(payload))
|
|
2706
|
+
return payload.filter(isRecord);
|
|
2707
|
+
if (!isRecord(payload))
|
|
2708
|
+
return [];
|
|
2709
|
+
return toRecordArray(unwrapHostedToolResult(payload));
|
|
2710
|
+
}
|
|
2711
|
+
function readRecordEnvelope(payload) {
|
|
2712
|
+
if (!isRecord(payload))
|
|
2713
|
+
return {};
|
|
2714
|
+
const unwrapped = unwrapHostedToolResult(payload);
|
|
2715
|
+
if (!isRecord(unwrapped))
|
|
2716
|
+
return {};
|
|
2717
|
+
const inner = unwrapped.data;
|
|
2718
|
+
return isRecord(inner) ? inner : unwrapped;
|
|
2719
|
+
}
|
|
2720
|
+
async function loadBoardColumns(execution, options, boardId) {
|
|
2721
|
+
const listed = await invokeProjectmanTool(execution, options, {
|
|
2722
|
+
toolId: 'projectman.kanban-board-column.list',
|
|
2723
|
+
input: buildOwnerScopedInput(execution.resolvedContext, { board: boardId }),
|
|
2724
|
+
});
|
|
2725
|
+
const placements = readBoardColumnList(listed);
|
|
2726
|
+
if (placements.length === 0)
|
|
2727
|
+
return [];
|
|
2728
|
+
const columnsPayload = await invokeProjectmanTool(execution, options, {
|
|
2729
|
+
toolId: 'projectman.kanban-column.list',
|
|
2730
|
+
input: buildOwnerScopedInput(execution.resolvedContext, {}),
|
|
2731
|
+
});
|
|
2732
|
+
const columns = readBoardColumnList(columnsPayload);
|
|
2733
|
+
const byId = new Map(columns.map((column) => [normalizeNonEmpty(column.id) ?? '', column]));
|
|
2734
|
+
const joined = placements.map((placement) => ({
|
|
2735
|
+
...placement,
|
|
2736
|
+
column: byId.get(normalizeNonEmpty(placement.columnId) ?? '') ?? placement.column ?? null,
|
|
2737
|
+
}));
|
|
2738
|
+
return joined.sort((left, right) => Number(left.position ?? 0) - Number(right.position ?? 0));
|
|
2739
|
+
}
|
|
2740
|
+
function findBoardColumnPlacement(placements, selector) {
|
|
2741
|
+
const wanted = selector.trim().toLowerCase();
|
|
2742
|
+
if (!wanted)
|
|
2743
|
+
return undefined;
|
|
2744
|
+
return placements.find((entry) => {
|
|
2745
|
+
const column = (entry?.column ?? {});
|
|
2746
|
+
return [entry?.id, column?.id, column?.slug, column?.name]
|
|
2747
|
+
.map((value) => (normalizeNonEmpty(value) ?? '').toLowerCase())
|
|
2748
|
+
.includes(wanted);
|
|
2749
|
+
});
|
|
2750
|
+
}
|
|
2751
|
+
export async function runPmColumnList(options = {}) {
|
|
2752
|
+
try {
|
|
2753
|
+
const boardValue = normalizeNonEmpty(options.board);
|
|
2754
|
+
if (!boardValue)
|
|
2755
|
+
throw new Error('Missing required --board.');
|
|
2756
|
+
const execution = await prepareExecution(options);
|
|
2757
|
+
if (!execution)
|
|
2758
|
+
return;
|
|
2759
|
+
const board = await resolveBoardRecord(execution, options, boardValue);
|
|
2760
|
+
const boardId = normalizeNonEmpty(board.id);
|
|
2761
|
+
const columns = await loadBoardColumns(execution, options, boardId ?? '');
|
|
2762
|
+
emitFlowCommandResult(options, {
|
|
2763
|
+
command: 'pm.column.list',
|
|
2764
|
+
toolId: 'projectman.kanban-board-column.list',
|
|
2765
|
+
surface: '/api/agent/tools',
|
|
2766
|
+
resolvedContext: buildResolvedContextEnvelope(execution.resolvedContext),
|
|
2767
|
+
input: { board: boardId },
|
|
2768
|
+
result: { ok: true, data: columns, count: columns.length },
|
|
2769
|
+
});
|
|
2770
|
+
}
|
|
2771
|
+
catch (error) {
|
|
2772
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2773
|
+
logError(`Failed to execute pm column list: ${augmentInvokeErrorMessage('projectman.kanban-board-column.list', message)}`);
|
|
2774
|
+
process.exitCode = 1;
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
export async function runPmColumnAdd(options = {}) {
|
|
2778
|
+
try {
|
|
2779
|
+
ensureWriteFlags('create', options);
|
|
2780
|
+
const boardValue = normalizeNonEmpty(options.board);
|
|
2781
|
+
const name = normalizeNonEmpty(options.name);
|
|
2782
|
+
if (!boardValue)
|
|
2783
|
+
throw new Error('Missing required --board.');
|
|
2784
|
+
if (!name)
|
|
2785
|
+
throw new Error('Missing required --name.');
|
|
2786
|
+
const wipLimit = parseOptionalInteger(options.wipLimit, '--wip-limit');
|
|
2787
|
+
const previewPosition = parseOptionalInteger(options.position, '--position');
|
|
2788
|
+
const execution = await prepareExecution(options);
|
|
2789
|
+
if (!execution)
|
|
2790
|
+
return;
|
|
2791
|
+
const board = await resolveBoardRecord(execution, options, boardValue);
|
|
2792
|
+
const boardId = normalizeNonEmpty(board.id);
|
|
2793
|
+
if (options.preview === true) {
|
|
2794
|
+
const result = compactPayload({
|
|
2795
|
+
ok: true,
|
|
2796
|
+
preview: true,
|
|
2797
|
+
action: 'add-board-column',
|
|
2798
|
+
board: compactPayload({ id: boardId, name: normalizeNonEmpty(board.name) }),
|
|
2799
|
+
column: compactPayload({
|
|
2800
|
+
name,
|
|
2801
|
+
slug: normalizeNonEmpty(options.slug),
|
|
2802
|
+
description: normalizeNonEmpty(options.description),
|
|
2803
|
+
wipLimit,
|
|
2804
|
+
}),
|
|
2805
|
+
placement: compactPayload({ board: boardId, position: previewPosition }),
|
|
2806
|
+
writes: ['projectman.kanban-column.create', 'projectman.kanban-board-column.create'],
|
|
2807
|
+
notes: [
|
|
2808
|
+
'Two hosted writes run in order; the placement carries the id the column create returns.',
|
|
2809
|
+
'If the placement fails the column is deleted again, so a failed run leaves nothing behind.',
|
|
2810
|
+
],
|
|
2811
|
+
});
|
|
2812
|
+
emitFlowCommandResult(options, {
|
|
2813
|
+
command: 'pm.column.add',
|
|
2814
|
+
toolId: 'projectman.kanban-board-column.create',
|
|
2815
|
+
surface: '/api/agent/tools',
|
|
2816
|
+
resolvedContext: buildResolvedContextEnvelope(execution.resolvedContext),
|
|
2817
|
+
input: { board: boardId, name },
|
|
2818
|
+
result,
|
|
2819
|
+
});
|
|
2820
|
+
return;
|
|
2821
|
+
}
|
|
2822
|
+
const created = await invokeProjectmanTool(execution, options, {
|
|
2823
|
+
toolId: 'projectman.kanban-column.create',
|
|
2824
|
+
input: buildOwnerScopedInput(execution.resolvedContext, compactPayload({
|
|
2825
|
+
name,
|
|
2826
|
+
slug: normalizeNonEmpty(options.slug),
|
|
2827
|
+
description: normalizeNonEmpty(options.description),
|
|
2828
|
+
wipLimit: parseOptionalInteger(options.wipLimit, '--wip-limit'),
|
|
2829
|
+
})),
|
|
2830
|
+
});
|
|
2831
|
+
const columnRecord = readRecordEnvelope(created);
|
|
2832
|
+
const columnId = normalizeNonEmpty(columnRecord.id);
|
|
2833
|
+
if (!columnId)
|
|
2834
|
+
throw new Error('Column was created but no id was returned.');
|
|
2835
|
+
let placement;
|
|
2836
|
+
try {
|
|
2837
|
+
placement = await invokeProjectmanTool(execution, options, {
|
|
2838
|
+
toolId: 'projectman.kanban-board-column.create',
|
|
2839
|
+
input: buildOwnerScopedInput(execution.resolvedContext, compactPayload({
|
|
2840
|
+
board: boardId,
|
|
2841
|
+
column: columnId,
|
|
2842
|
+
position: previewPosition,
|
|
2843
|
+
})),
|
|
2844
|
+
});
|
|
2845
|
+
}
|
|
2846
|
+
catch (placementError) {
|
|
2847
|
+
const reason = placementError instanceof Error ? placementError.message : String(placementError);
|
|
2848
|
+
try {
|
|
2849
|
+
await invokeProjectmanTool(execution, options, {
|
|
2850
|
+
toolId: 'projectman.kanban-column.delete',
|
|
2851
|
+
input: buildOwnerScopedInput(execution.resolvedContext, { id: columnId }),
|
|
2852
|
+
});
|
|
2853
|
+
throw new Error(`Placing the column on the board failed, so the column was removed again: ${reason}`);
|
|
2854
|
+
}
|
|
2855
|
+
catch (cleanupError) {
|
|
2856
|
+
const cleanupReason = cleanupError instanceof Error ? cleanupError.message : String(cleanupError);
|
|
2857
|
+
if (cleanupReason.startsWith('Placing the column on the board failed'))
|
|
2858
|
+
throw cleanupError;
|
|
2859
|
+
throw new Error(`Placing the column on the board failed (${reason}) and removing the orphaned column ${columnId} also failed (${cleanupReason}); delete it manually.`);
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
emitFlowCommandResult(options, {
|
|
2863
|
+
command: 'pm.column.add',
|
|
2864
|
+
toolId: 'projectman.kanban-board-column.create',
|
|
2865
|
+
surface: '/api/agent/tools',
|
|
2866
|
+
resolvedContext: buildResolvedContextEnvelope(execution.resolvedContext),
|
|
2867
|
+
input: { board: boardId, name },
|
|
2868
|
+
result: { ok: true, data: { column: columnRecord, placement: readRecordEnvelope(placement) } },
|
|
2869
|
+
});
|
|
2870
|
+
}
|
|
2871
|
+
catch (error) {
|
|
2872
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2873
|
+
logError(`Failed to execute pm column add: ${augmentInvokeErrorMessage('projectman.kanban-board-column.create', message)}`);
|
|
2874
|
+
process.exitCode = 1;
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
export async function runPmColumnRemove(options = {}) {
|
|
2878
|
+
try {
|
|
2879
|
+
ensureWriteFlags('delete', options);
|
|
2880
|
+
const boardValue = normalizeNonEmpty(options.board);
|
|
2881
|
+
const columnValue = normalizeNonEmpty(options.column);
|
|
2882
|
+
if (!boardValue)
|
|
2883
|
+
throw new Error('Missing required --board.');
|
|
2884
|
+
if (!columnValue)
|
|
2885
|
+
throw new Error('Missing required --column.');
|
|
2886
|
+
const execution = await prepareExecution(options);
|
|
2887
|
+
if (!execution)
|
|
2888
|
+
return;
|
|
2889
|
+
const board = await resolveBoardRecord(execution, options, boardValue);
|
|
2890
|
+
const boardId = normalizeNonEmpty(board.id);
|
|
2891
|
+
const placements = await loadBoardColumns(execution, options, boardId ?? '');
|
|
2892
|
+
const placement = findBoardColumnPlacement(placements, columnValue);
|
|
2893
|
+
if (!placement)
|
|
2894
|
+
throw new Error(`Column "${columnValue}" is not on board "${boardValue}".`);
|
|
2895
|
+
const placementId = normalizeNonEmpty(placement.id);
|
|
2896
|
+
const taskPayload = await invokeProjectmanReadTool(execution, options, {
|
|
2897
|
+
toolId: 'projectman.kanban-task.list',
|
|
2898
|
+
input: buildOwnerScopedInput(execution.resolvedContext, { board: boardId }),
|
|
2899
|
+
});
|
|
2900
|
+
const tasks = readBoardColumnList(taskPayload);
|
|
2901
|
+
const occupants = tasks.filter((task) => normalizeNonEmpty(task.boardColumnId) === placementId);
|
|
2902
|
+
if (occupants.length > 0) {
|
|
2903
|
+
const codes = occupants.map((task) => normalizeNonEmpty(task.taskCode) ?? normalizeNonEmpty(task.id) ?? '?').join(', ');
|
|
2904
|
+
throw new Error(`Column "${columnValue}" still holds ${occupants.length} task(s) (${codes}); move them to another column first.`);
|
|
2905
|
+
}
|
|
2906
|
+
const payload = await invokeProjectmanTool(execution, options, {
|
|
2907
|
+
toolId: 'projectman.kanban-board-column.delete',
|
|
2908
|
+
input: buildOwnerScopedInput(execution.resolvedContext, { id: placementId }),
|
|
2909
|
+
});
|
|
2910
|
+
emitFlowCommandResult(options, {
|
|
2911
|
+
command: 'pm.column.remove',
|
|
2912
|
+
toolId: 'projectman.kanban-board-column.delete',
|
|
2913
|
+
surface: '/api/agent/tools',
|
|
2914
|
+
resolvedContext: buildResolvedContextEnvelope(execution.resolvedContext),
|
|
2915
|
+
input: { board: boardId, id: placementId },
|
|
2916
|
+
result: { ok: true, data: payload },
|
|
2917
|
+
});
|
|
2918
|
+
}
|
|
2919
|
+
catch (error) {
|
|
2920
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2921
|
+
logError(`Failed to execute pm column remove: ${augmentInvokeErrorMessage('projectman.kanban-board-column.delete', message)}`);
|
|
2922
|
+
process.exitCode = 1;
|
|
2923
|
+
}
|
|
2924
|
+
}
|
|
2925
|
+
export async function runPmColumnReorder(options = {}) {
|
|
2926
|
+
try {
|
|
2927
|
+
ensureWriteFlags('update', options);
|
|
2928
|
+
const boardValue = normalizeNonEmpty(options.board);
|
|
2929
|
+
const order = normalizeArrayValues(options.order) ?? [];
|
|
2930
|
+
if (!boardValue)
|
|
2931
|
+
throw new Error('Missing required --board.');
|
|
2932
|
+
if (order.length === 0)
|
|
2933
|
+
throw new Error('Missing required --order (repeat it once per column, in the wanted order).');
|
|
2934
|
+
const execution = await prepareExecution(options);
|
|
2935
|
+
if (!execution)
|
|
2936
|
+
return;
|
|
2937
|
+
const board = await resolveBoardRecord(execution, options, boardValue);
|
|
2938
|
+
const boardId = normalizeNonEmpty(board.id);
|
|
2939
|
+
const placements = await loadBoardColumns(execution, options, boardId ?? '');
|
|
2940
|
+
const orderedIds = order.map((value) => {
|
|
2941
|
+
const placement = findBoardColumnPlacement(placements, value);
|
|
2942
|
+
if (!placement)
|
|
2943
|
+
throw new Error(`Column "${value}" is not on board "${boardValue}".`);
|
|
2944
|
+
return normalizeNonEmpty(placement.id);
|
|
2945
|
+
});
|
|
2946
|
+
const seen = new Set();
|
|
2947
|
+
for (let index = 0; index < orderedIds.length; index += 1) {
|
|
2948
|
+
const id = orderedIds[index] ?? '';
|
|
2949
|
+
if (seen.has(id)) {
|
|
2950
|
+
throw new Error(`--order names the same column twice ("${order[index]}"); name every column exactly once.`);
|
|
2951
|
+
}
|
|
2952
|
+
seen.add(id);
|
|
2953
|
+
}
|
|
2954
|
+
const missing = placements
|
|
2955
|
+
.map((placement) => normalizeNonEmpty(placement.id) ?? '')
|
|
2956
|
+
.filter((id) => !seen.has(id));
|
|
2957
|
+
if (missing.length > 0 || orderedIds.length !== placements.length) {
|
|
2958
|
+
throw new Error(`--order must name every column on the board exactly once (${placements.length}); received ${orderedIds.length}` +
|
|
2959
|
+
(missing.length > 0 ? `, missing ${missing.length}` : '') +
|
|
2960
|
+
'.');
|
|
2961
|
+
}
|
|
2962
|
+
const payload = await invokeProjectmanTool(execution, options, {
|
|
2963
|
+
toolId: 'projectman.kanban-board-column.reorder',
|
|
2964
|
+
input: buildOwnerScopedInput(execution.resolvedContext, { board: boardId, orderedIds }),
|
|
2965
|
+
});
|
|
2966
|
+
emitFlowCommandResult(options, {
|
|
2967
|
+
command: 'pm.column.reorder',
|
|
2968
|
+
toolId: 'projectman.kanban-board-column.reorder',
|
|
2969
|
+
surface: '/api/agent/tools',
|
|
2970
|
+
resolvedContext: buildResolvedContextEnvelope(execution.resolvedContext),
|
|
2971
|
+
input: { board: boardId, orderedIds },
|
|
2972
|
+
result: { ok: true, data: payload },
|
|
2973
|
+
});
|
|
2974
|
+
}
|
|
2975
|
+
catch (error) {
|
|
2976
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
2977
|
+
logError(`Failed to execute pm column reorder: ${augmentInvokeErrorMessage('projectman.kanban-board-column.reorder', message)}`);
|
|
2978
|
+
process.exitCode = 1;
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2704
2981
|
export async function runPmBoardCreate(options = {}) {
|
|
2705
2982
|
try {
|
|
2706
2983
|
ensureWriteFlags('create', options);
|
|
@@ -3833,8 +4110,6 @@ export async function runPmSprintCreate(options = {}) {
|
|
|
3833
4110
|
const task = normalizeNonEmpty(options.task);
|
|
3834
4111
|
const name = normalizeNonEmpty(options.name);
|
|
3835
4112
|
const goal = normalizeNonEmpty(options.goal);
|
|
3836
|
-
if (!task)
|
|
3837
|
-
throw new Error('Missing required --task.');
|
|
3838
4113
|
if (!name)
|
|
3839
4114
|
throw new Error('Missing required --name.');
|
|
3840
4115
|
if (!goal)
|
|
@@ -3842,11 +4117,11 @@ export async function runPmSprintCreate(options = {}) {
|
|
|
3842
4117
|
const execution = await prepareExecution(options);
|
|
3843
4118
|
if (!execution)
|
|
3844
4119
|
return;
|
|
3845
|
-
const input = buildOwnerScopedInput(execution.resolvedContext, {
|
|
4120
|
+
const input = buildOwnerScopedInput(execution.resolvedContext, compactPayload({
|
|
3846
4121
|
kanbanTask: task,
|
|
3847
4122
|
name,
|
|
3848
4123
|
goal,
|
|
3849
|
-
});
|
|
4124
|
+
}));
|
|
3850
4125
|
const references = normalizeArrayValues(options.reference);
|
|
3851
4126
|
const scope = normalizeArrayValues(options.scopeItem);
|
|
3852
4127
|
const validationPlan = normalizeArrayValues(options.validationItem);
|
|
@@ -4533,8 +4808,6 @@ export async function runPmPlanCreate(options = {}) {
|
|
|
4533
4808
|
const task = normalizeNonEmpty(options.task);
|
|
4534
4809
|
const name = normalizeNonEmpty(options.name);
|
|
4535
4810
|
const goal = normalizeNonEmpty(options.goal);
|
|
4536
|
-
if (!task)
|
|
4537
|
-
throw new Error('Missing required --task.');
|
|
4538
4811
|
if (!name)
|
|
4539
4812
|
throw new Error('Missing required --name.');
|
|
4540
4813
|
if (!goal)
|
|
@@ -4542,11 +4815,11 @@ export async function runPmPlanCreate(options = {}) {
|
|
|
4542
4815
|
const execution = await prepareExecution(options);
|
|
4543
4816
|
if (!execution)
|
|
4544
4817
|
return;
|
|
4545
|
-
const input = buildOwnerScopedInput(execution.resolvedContext, {
|
|
4818
|
+
const input = buildOwnerScopedInput(execution.resolvedContext, compactPayload({
|
|
4546
4819
|
kanbanTask: task,
|
|
4547
4820
|
name,
|
|
4548
4821
|
goal,
|
|
4549
|
-
});
|
|
4822
|
+
}));
|
|
4550
4823
|
const references = normalizeArrayValues(options.reference);
|
|
4551
4824
|
const scope = normalizeArrayValues(options.scopeItem);
|
|
4552
4825
|
const validationPlan = normalizeArrayValues(options.validationItem);
|
|
@@ -86,10 +86,10 @@ export const START_GUARDRAIL_REGISTRY = [
|
|
|
86
86
|
{
|
|
87
87
|
id: 'assignment-via-canonical-refs',
|
|
88
88
|
title: 'Assignment via canonical refs',
|
|
89
|
-
description: 'Assignments carry
|
|
89
|
+
description: 'Assignments carry ktask/plan refs; chat prose alone is not an assignment.',
|
|
90
90
|
disciplines: ['coordinator-loop'],
|
|
91
91
|
phase: 'execution',
|
|
92
|
-
evidence: ['
|
|
92
|
+
evidence: ['projectman.kanban-task', 'projectman.sprint'],
|
|
93
93
|
enforcementLevel: 'advisory',
|
|
94
94
|
},
|
|
95
95
|
{
|
|
@@ -230,28 +230,19 @@ export const START_GUARDRAIL_REGISTRY = [
|
|
|
230
230
|
{
|
|
231
231
|
id: 'closeout-triage-open-issues',
|
|
232
232
|
title: 'Closeout triages open issues',
|
|
233
|
-
description: 'Open issues are resolved, linked to follow-up work, or explicitly deferred with an owner according to the
|
|
233
|
+
description: 'Open issues are resolved, linked to follow-up work, or explicitly deferred with an owner according to the discipline policy.',
|
|
234
234
|
disciplines: ['solo-pm-loop', 'build-review-chat', 'design-first-consensus', 'coordinator-loop'],
|
|
235
235
|
phase: 'closeout',
|
|
236
236
|
evidence: ['projectman.issue'],
|
|
237
237
|
enforcementLevel: 'soft-preflight',
|
|
238
238
|
},
|
|
239
|
-
{
|
|
240
|
-
id: 'closeout-mission-status-finalized',
|
|
241
|
-
title: 'Closeout finalizes mission status',
|
|
242
|
-
description: 'The mission is left in a truthful status such as handoff or completed instead of a stale active state.',
|
|
243
|
-
disciplines: ['solo-pm-loop', 'build-review-chat', 'design-first-consensus', 'coordinator-loop'],
|
|
244
|
-
phase: 'closeout',
|
|
245
|
-
evidence: ['agentspace.mission.status'],
|
|
246
|
-
enforcementLevel: 'soft-preflight',
|
|
247
|
-
},
|
|
248
239
|
{
|
|
249
240
|
id: 'closeout-resume-readiness',
|
|
250
241
|
title: 'Closeout proves resume readiness',
|
|
251
|
-
description: 'The
|
|
242
|
+
description: 'The resume surfaces carry enough objective, plan, memory, review, issue, and next-action context for the next session.',
|
|
252
243
|
disciplines: ['solo-pm-loop', 'build-review-chat', 'design-first-consensus', 'coordinator-loop'],
|
|
253
244
|
phase: 'closeout',
|
|
254
|
-
evidence: ['agentspace.
|
|
245
|
+
evidence: ['agentspace.memory', 'projectman.implementation-plan', 'projectman.handoff'],
|
|
255
246
|
enforcementLevel: 'soft-preflight',
|
|
256
247
|
},
|
|
257
248
|
{
|
|
@@ -284,10 +275,10 @@ export const START_GUARDRAIL_REGISTRY = [
|
|
|
284
275
|
{
|
|
285
276
|
id: 'closeout-assignment-queue-truthful',
|
|
286
277
|
title: 'Closeout leaves the assignment queue truthful',
|
|
287
|
-
description: 'Coordinator closeout binds every operator request to
|
|
278
|
+
description: 'Coordinator closeout binds every operator request to ktask/plan records, marks it completed, or defers it explicitly with an owner.',
|
|
288
279
|
disciplines: ['coordinator-loop'],
|
|
289
280
|
phase: 'closeout',
|
|
290
|
-
evidence: ['
|
|
281
|
+
evidence: ['projectman.kanban-task'],
|
|
291
282
|
enforcementLevel: 'soft-preflight',
|
|
292
283
|
},
|
|
293
284
|
{
|
|
@@ -343,7 +334,6 @@ export const START_DISCIPLINE_PROFILES = {
|
|
|
343
334
|
'closeout-handoff-memory',
|
|
344
335
|
'closeout-triage-open-reviews',
|
|
345
336
|
'closeout-triage-open-issues',
|
|
346
|
-
'closeout-mission-status-finalized',
|
|
347
337
|
'closeout-resume-readiness',
|
|
348
338
|
'closeout-session-summary',
|
|
349
339
|
],
|
|
@@ -388,7 +378,6 @@ export const START_DISCIPLINE_PROFILES = {
|
|
|
388
378
|
'closeout-handoff-memory',
|
|
389
379
|
'closeout-triage-open-reviews',
|
|
390
380
|
'closeout-triage-open-issues',
|
|
391
|
-
'closeout-mission-status-finalized',
|
|
392
381
|
'closeout-resume-readiness',
|
|
393
382
|
'closeout-session-summary',
|
|
394
383
|
'closeout-slice-review-accounted',
|
|
@@ -433,7 +422,6 @@ export const START_DISCIPLINE_PROFILES = {
|
|
|
433
422
|
'closeout-handoff-memory',
|
|
434
423
|
'closeout-triage-open-reviews',
|
|
435
424
|
'closeout-triage-open-issues',
|
|
436
|
-
'closeout-mission-status-finalized',
|
|
437
425
|
'closeout-resume-readiness',
|
|
438
426
|
'closeout-session-summary',
|
|
439
427
|
'closeout-discuss-output-finalized',
|
|
@@ -451,7 +439,7 @@ export const START_DISCIPLINE_PROFILES = {
|
|
|
451
439
|
],
|
|
452
440
|
plan: {
|
|
453
441
|
owner: 'projectman',
|
|
454
|
-
rhythm: 'operator request -> coordinator research ->
|
|
442
|
+
rhythm: 'operator request -> coordinator research -> ktask/plan authoring -> chat assignment with canonical refs -> per-slice RR -> instructed pathspec commit',
|
|
455
443
|
},
|
|
456
444
|
review: {
|
|
457
445
|
owner: 'projectman.review-request',
|
|
@@ -487,7 +475,6 @@ export const START_DISCIPLINE_PROFILES = {
|
|
|
487
475
|
'closeout-handoff-memory',
|
|
488
476
|
'closeout-triage-open-reviews',
|
|
489
477
|
'closeout-triage-open-issues',
|
|
490
|
-
'closeout-mission-status-finalized',
|
|
491
478
|
'closeout-resume-readiness',
|
|
492
479
|
'closeout-session-summary',
|
|
493
480
|
'closeout-slice-review-accounted',
|