@cleocode/cleo 2026.4.27 → 2026.4.28
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/dist/cli/index.js +122 -72
- package/dist/cli/index.js.map +3 -3
- package/package.json +7 -7
package/dist/cli/index.js
CHANGED
|
@@ -110221,7 +110221,9 @@ var init_check = __esm({
|
|
|
110221
110221
|
return wrapResult(result, "query", "check", operation, startTime);
|
|
110222
110222
|
}
|
|
110223
110223
|
case "archive.stats": {
|
|
110224
|
-
const result = await systemArchiveStats(projectRoot
|
|
110224
|
+
const result = await systemArchiveStats(projectRoot, {
|
|
110225
|
+
period: params?.period
|
|
110226
|
+
});
|
|
110225
110227
|
return wrapResult(result, "query", "check", operation, startTime);
|
|
110226
110228
|
}
|
|
110227
110229
|
// T5405: WarpChain validation
|
|
@@ -117397,7 +117399,9 @@ var ADD_PARAMS = [
|
|
|
117397
117399
|
}
|
|
117398
117400
|
];
|
|
117399
117401
|
function registerAddCommand(program) {
|
|
117400
|
-
const cmd = program.command("add").description(
|
|
117402
|
+
const cmd = program.command("add").description(
|
|
117403
|
+
buildOperationHelp("tasks.add", "Create a new task (requires active session)", ADD_PARAMS)
|
|
117404
|
+
);
|
|
117401
117405
|
applyParamDefsToCommand(cmd, ADD_PARAMS, "tasks.add");
|
|
117402
117406
|
cmd.option("--add-phase", "Create new phase if it does not exist").option("--desc <desc>", "Task description (alias for --description)").option("--dry-run", "Show what would be created without making changes").action(async (title, opts) => {
|
|
117403
117407
|
const params = { title };
|
|
@@ -119760,10 +119764,6 @@ function capitalizeFirst(str) {
|
|
|
119760
119764
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
119761
119765
|
}
|
|
119762
119766
|
|
|
119763
|
-
// packages/cleo/src/cli/commands/agents.ts
|
|
119764
|
-
function registerAgentsCommand(_program) {
|
|
119765
|
-
}
|
|
119766
|
-
|
|
119767
119767
|
// packages/cleo/src/cli/commands/analyze.ts
|
|
119768
119768
|
init_cli();
|
|
119769
119769
|
function registerAnalyzeCommand(program) {
|
|
@@ -120219,7 +120219,9 @@ async function promptPassphrase() {
|
|
|
120219
120219
|
}
|
|
120220
120220
|
function registerBackupCommand(program) {
|
|
120221
120221
|
const backup = program.command("backup").description("Add backup of todo files or list available backups");
|
|
120222
|
-
backup.command("add").alias("create").description(
|
|
120222
|
+
backup.command("add").alias("create").description(
|
|
120223
|
+
"Add a new backup of all CLEO data files (backup create is an alias for backup add)"
|
|
120224
|
+
).option("--destination <dir>", "Backup destination directory").option("--global", "Also snapshot global-tier databases (nexus.db)").action(async (opts) => {
|
|
120223
120225
|
await dispatchFromCli(
|
|
120224
120226
|
"mutate",
|
|
120225
120227
|
"admin",
|
|
@@ -120622,7 +120624,7 @@ function registerBrainCommand(program) {
|
|
|
120622
120624
|
init_cli();
|
|
120623
120625
|
function registerBriefingCommand(program) {
|
|
120624
120626
|
program.command("briefing").description(
|
|
120625
|
-
"
|
|
120627
|
+
"Session resume context: last handoff, current task, next tasks, bugs, blockers, epics, and memory. Use at session start to restore context."
|
|
120626
120628
|
).option("-s, --scope <scope>", "Scope filter (global or epic:T###)").option("--max-next <n>", "Maximum next tasks to show", "5").option("--max-bugs <n>", "Maximum bugs to show", "10").option("--max-blocked <n>", "Maximum blocked tasks to show", "10").option("--max-epics <n>", "Maximum active epics to show", "5").action(async (opts) => {
|
|
120627
120629
|
const scope = opts["scope"];
|
|
120628
120630
|
const maxNextTasks = parseInt(opts["maxNext"], 10);
|
|
@@ -120656,7 +120658,7 @@ var SEVERITY_MAP = {
|
|
|
120656
120658
|
};
|
|
120657
120659
|
var VALID_SEVERITIES = Object.keys(SEVERITY_MAP);
|
|
120658
120660
|
function registerBugCommand(program) {
|
|
120659
|
-
program.command("bug <title>").description("Create a bug report task with severity mapping").option("-s, --severity <level>", "Severity level (P0, P1, P2, P3) - required", "P2").option("-e, --epic <id>", "Epic ID to link as parent (optional)").option("-d, --description <desc>", "Bug description").option("--dry-run", "Show what would be created without making changes").action(async (title, opts) => {
|
|
120661
|
+
program.command("bug <title>").description("Create a bug report task with severity mapping (requires active session)").option("-s, --severity <level>", "Severity level (P0, P1, P2, P3) - required", "P2").option("-e, --epic <id>", "Epic ID to link as parent (optional)").option("-d, --description <desc>", "Bug description").option("--dry-run", "Show what would be created without making changes").action(async (title, opts) => {
|
|
120660
120662
|
const severity = opts["severity"] || "P2";
|
|
120661
120663
|
if (!VALID_SEVERITIES.includes(severity)) {
|
|
120662
120664
|
console.error(
|
|
@@ -121170,7 +121172,9 @@ function registerUnclaimCommand(program) {
|
|
|
121170
121172
|
// packages/cleo/src/cli/commands/commands.ts
|
|
121171
121173
|
init_cli();
|
|
121172
121174
|
function registerCommandsCommand(program) {
|
|
121173
|
-
program.command("commands [command]").description(
|
|
121175
|
+
program.command("commands [command]").description(
|
|
121176
|
+
"DEPRECATED: Use `cleo ops` instead. List and query available CLEO commands (delegates to admin help)"
|
|
121177
|
+
).option("-c, --category <category>", "Filter by category").option("-r, --relevance <level>", "Filter by agent relevance").option("--tier <n>", "Help tier level (0=basic, 1=extended, 2=full)", parseInt).action(async (commandName, opts) => {
|
|
121174
121178
|
console.error(
|
|
121175
121179
|
"[DEPRECATED] cleo commands now delegates to admin.help.\nUse: cleo help (CLI)\n"
|
|
121176
121180
|
);
|
|
@@ -121230,7 +121234,13 @@ var COMPLETE_PARAMS = [
|
|
|
121230
121234
|
}
|
|
121231
121235
|
];
|
|
121232
121236
|
function registerCompleteCommand(program) {
|
|
121233
|
-
const cmd = program.command("complete").alias("done").description(
|
|
121237
|
+
const cmd = program.command("complete").alias("done").description(
|
|
121238
|
+
buildOperationHelp(
|
|
121239
|
+
"tasks.complete",
|
|
121240
|
+
"Mark a task as completed (requires active session)",
|
|
121241
|
+
COMPLETE_PARAMS
|
|
121242
|
+
)
|
|
121243
|
+
);
|
|
121234
121244
|
applyParamDefsToCommand(cmd, COMPLETE_PARAMS, "tasks.complete");
|
|
121235
121245
|
cmd.action(async (taskId, opts) => {
|
|
121236
121246
|
const response = await dispatchRaw("mutate", "tasks", "complete", {
|
|
@@ -121441,7 +121451,9 @@ function registerConfigCommand(program) {
|
|
|
121441
121451
|
// packages/cleo/src/cli/commands/consensus.ts
|
|
121442
121452
|
init_cli();
|
|
121443
121453
|
function registerConsensusCommand(program) {
|
|
121444
|
-
const consensus = program.command("consensus").description(
|
|
121454
|
+
const consensus = program.command("consensus").description(
|
|
121455
|
+
"Validate consensus protocol compliance (alias for `cleo check protocol consensus`)"
|
|
121456
|
+
);
|
|
121445
121457
|
consensus.command("validate <taskId>").description("Validate consensus protocol compliance for task").option("--strict", "Exit with error code on violations").option("--voting-matrix <file>", "Path to voting matrix JSON file").action(async (taskId, opts) => {
|
|
121446
121458
|
await dispatchFromCli(
|
|
121447
121459
|
"query",
|
|
@@ -121490,7 +121502,7 @@ function registerContextCommand(program) {
|
|
|
121490
121502
|
{ command: "context" }
|
|
121491
121503
|
);
|
|
121492
121504
|
});
|
|
121493
|
-
context.command("check").description("
|
|
121505
|
+
context.command("check").description("Show context window state (same as status)").option("--session <id>", "Check specific CLEO session").action(async (opts) => {
|
|
121494
121506
|
await dispatchFromCli(
|
|
121495
121507
|
"query",
|
|
121496
121508
|
"admin",
|
|
@@ -121502,7 +121514,7 @@ function registerContextCommand(program) {
|
|
|
121502
121514
|
{ command: "context" }
|
|
121503
121515
|
);
|
|
121504
121516
|
});
|
|
121505
|
-
context.command("list").description("
|
|
121517
|
+
context.command("list").description("Show context window state including all sessions").action(async () => {
|
|
121506
121518
|
await dispatchFromCli(
|
|
121507
121519
|
"query",
|
|
121508
121520
|
"admin",
|
|
@@ -121518,7 +121530,9 @@ function registerContextCommand(program) {
|
|
|
121518
121530
|
// packages/cleo/src/cli/commands/contribution.ts
|
|
121519
121531
|
init_cli();
|
|
121520
121532
|
function registerContributionCommand(program) {
|
|
121521
|
-
const contribution = program.command("contribution").description(
|
|
121533
|
+
const contribution = program.command("contribution").description(
|
|
121534
|
+
"Validate contribution protocol compliance (alias for `cleo check protocol contribution`)"
|
|
121535
|
+
);
|
|
121522
121536
|
contribution.command("validate <taskId>").description("Validate contribution protocol compliance for task").option("--strict", "Exit with error code on violations").action(async (taskId, opts) => {
|
|
121523
121537
|
await dispatchFromCli(
|
|
121524
121538
|
"query",
|
|
@@ -121552,7 +121566,9 @@ function registerContributionCommand(program) {
|
|
|
121552
121566
|
// packages/cleo/src/cli/commands/current.ts
|
|
121553
121567
|
init_cli();
|
|
121554
121568
|
function registerCurrentCommand(program) {
|
|
121555
|
-
program.command("current").description(
|
|
121569
|
+
program.command("current").description(
|
|
121570
|
+
"Show the current task being worked on. Returns: {currentTask: string|null, currentPhase: string|null}"
|
|
121571
|
+
).action(async () => {
|
|
121556
121572
|
await dispatchFromCli("query", "tasks", "current", {}, { command: "current" });
|
|
121557
121573
|
});
|
|
121558
121574
|
}
|
|
@@ -121560,15 +121576,25 @@ function registerCurrentCommand(program) {
|
|
|
121560
121576
|
// packages/cleo/src/cli/commands/dash.ts
|
|
121561
121577
|
init_cli();
|
|
121562
121578
|
function registerDashCommand(program) {
|
|
121563
|
-
program.command("dash").description(
|
|
121564
|
-
|
|
121579
|
+
program.command("dash").description(
|
|
121580
|
+
"Project health dashboard: status summary, phase progress, recent activity, high priority tasks. Use for overall project status."
|
|
121581
|
+
).option("--blocked-limit <n>", "Max blocked tasks to show", parseInt).action(async (opts) => {
|
|
121582
|
+
await dispatchFromCli(
|
|
121583
|
+
"query",
|
|
121584
|
+
"admin",
|
|
121585
|
+
"dash",
|
|
121586
|
+
{ blockedTasksLimit: opts["blockedLimit"] },
|
|
121587
|
+
{ command: "dash" }
|
|
121588
|
+
);
|
|
121565
121589
|
});
|
|
121566
121590
|
}
|
|
121567
121591
|
|
|
121568
121592
|
// packages/cleo/src/cli/commands/decomposition.ts
|
|
121569
121593
|
init_cli();
|
|
121570
121594
|
function registerDecompositionCommand(program) {
|
|
121571
|
-
const decomposition = program.command("decomposition").description(
|
|
121595
|
+
const decomposition = program.command("decomposition").description(
|
|
121596
|
+
"Validate decomposition protocol compliance (alias for `cleo check protocol decomposition`)"
|
|
121597
|
+
);
|
|
121572
121598
|
decomposition.command("validate <taskId>").description("Validate decomposition protocol compliance for task").option("--strict", "Exit with error code on violations").option("--epic <id>", "Specify parent epic ID").action(async (taskId, opts) => {
|
|
121573
121599
|
await dispatchFromCli(
|
|
121574
121600
|
"query",
|
|
@@ -121749,7 +121775,8 @@ function findProjectRoot() {
|
|
|
121749
121775
|
function registerDetectDriftCommand(program) {
|
|
121750
121776
|
program.command("detect-drift").description("Detect documentation drift against TypeScript source of truth").action(async () => {
|
|
121751
121777
|
const projectRoot = findProjectRoot();
|
|
121752
|
-
const isCleoRepo = existsSync129(join125(projectRoot, "
|
|
121778
|
+
const isCleoRepo = existsSync129(join125(projectRoot, "packages", "cleo", "src"));
|
|
121779
|
+
const cleoSrcRoot = isCleoRepo ? join125(projectRoot, "packages", "cleo", "src") : join125(projectRoot, "src");
|
|
121753
121780
|
const safeRead = (filePath) => {
|
|
121754
121781
|
try {
|
|
121755
121782
|
return readFileSync98(filePath, "utf-8");
|
|
@@ -121815,17 +121842,17 @@ function registerDetectDriftCommand(program) {
|
|
|
121815
121842
|
}
|
|
121816
121843
|
};
|
|
121817
121844
|
try {
|
|
121818
|
-
const specPath = join125(projectRoot, "docs", "specs", "CLEO-
|
|
121819
|
-
const registryPath = join125(
|
|
121820
|
-
const dispatchDomainsDir = join125(
|
|
121845
|
+
const specPath = join125(projectRoot, "docs", "specs", "CLEO-OPERATION-CONSTITUTION.md");
|
|
121846
|
+
const registryPath = join125(cleoSrcRoot, "dispatch", "registry.ts");
|
|
121847
|
+
const dispatchDomainsDir = join125(cleoSrcRoot, "dispatch", "domains");
|
|
121821
121848
|
if (!existsSync129(specPath)) {
|
|
121822
|
-
addCheck("Gateway-to-spec sync", "fail", "CLEO-
|
|
121849
|
+
addCheck("Gateway-to-spec sync", "fail", "CLEO-OPERATION-CONSTITUTION.md missing", [
|
|
121823
121850
|
{
|
|
121824
121851
|
severity: "error",
|
|
121825
121852
|
category: "spec",
|
|
121826
121853
|
message: "Operations reference specification not found",
|
|
121827
121854
|
file: specPath,
|
|
121828
|
-
recommendation: "Create docs/specs/CLEO-
|
|
121855
|
+
recommendation: "Create docs/specs/CLEO-OPERATION-CONSTITUTION.md with canonical operation definitions"
|
|
121829
121856
|
}
|
|
121830
121857
|
]);
|
|
121831
121858
|
} else if (!existsSync129(registryPath) || !existsSync129(dispatchDomainsDir)) {
|
|
@@ -121835,7 +121862,7 @@ function registerDetectDriftCommand(program) {
|
|
|
121835
121862
|
category: "implementation",
|
|
121836
121863
|
message: "Dispatch registry or domains directory not found",
|
|
121837
121864
|
file: registryPath,
|
|
121838
|
-
recommendation: "Verify src/dispatch/registry.ts and src/dispatch/domains/ exist"
|
|
121865
|
+
recommendation: "Verify packages/cleo/src/dispatch/registry.ts and packages/cleo/src/dispatch/domains/ exist"
|
|
121839
121866
|
}
|
|
121840
121867
|
]);
|
|
121841
121868
|
} else {
|
|
@@ -121892,14 +121919,14 @@ function registerDetectDriftCommand(program) {
|
|
|
121892
121919
|
]);
|
|
121893
121920
|
}
|
|
121894
121921
|
try {
|
|
121895
|
-
const cliDir = join125(
|
|
121896
|
-
const coreDir = join125(projectRoot, "src", "core");
|
|
121922
|
+
const cliDir = join125(cleoSrcRoot, "cli", "commands");
|
|
121923
|
+
const coreDir = isCleoRepo ? join125(projectRoot, "packages", "core", "src") : join125(projectRoot, "src", "core");
|
|
121897
121924
|
if (!existsSync129(cliDir)) {
|
|
121898
121925
|
addCheck("CLI-to-core sync", "fail", "CLI commands directory missing", [
|
|
121899
121926
|
{
|
|
121900
121927
|
severity: "error",
|
|
121901
121928
|
category: "structure",
|
|
121902
|
-
message:
|
|
121929
|
+
message: `${cliDir} directory not found`,
|
|
121903
121930
|
recommendation: "Verify TypeScript source structure is intact"
|
|
121904
121931
|
}
|
|
121905
121932
|
]);
|
|
@@ -121908,7 +121935,7 @@ function registerDetectDriftCommand(program) {
|
|
|
121908
121935
|
{
|
|
121909
121936
|
severity: "error",
|
|
121910
121937
|
category: "structure",
|
|
121911
|
-
message:
|
|
121938
|
+
message: `${coreDir} directory not found`,
|
|
121912
121939
|
recommendation: "Verify TypeScript source structure is intact"
|
|
121913
121940
|
}
|
|
121914
121941
|
]);
|
|
@@ -121922,13 +121949,13 @@ function registerDetectDriftCommand(program) {
|
|
|
121922
121949
|
addCheck("CLI-to-core sync", "fail", `Error: ${getErrorMessage(e)}`);
|
|
121923
121950
|
}
|
|
121924
121951
|
try {
|
|
121925
|
-
const domainsDir = join125(
|
|
121952
|
+
const domainsDir = join125(cleoSrcRoot, "dispatch", "domains");
|
|
121926
121953
|
if (!existsSync129(domainsDir)) {
|
|
121927
121954
|
addCheck("Domain handler coverage", "fail", "Dispatch domains directory missing", [
|
|
121928
121955
|
{
|
|
121929
121956
|
severity: "error",
|
|
121930
121957
|
category: "structure",
|
|
121931
|
-
message:
|
|
121958
|
+
message: `${domainsDir} not found`,
|
|
121932
121959
|
recommendation: "Verify dispatch domain handlers are in place"
|
|
121933
121960
|
}
|
|
121934
121961
|
]);
|
|
@@ -121940,13 +121967,13 @@ function registerDetectDriftCommand(program) {
|
|
|
121940
121967
|
addCheck("Domain handler coverage", "fail", `Error: ${getErrorMessage(e)}`);
|
|
121941
121968
|
}
|
|
121942
121969
|
try {
|
|
121943
|
-
const matrixPath = join125(
|
|
121970
|
+
const matrixPath = join125(cleoSrcRoot, "dispatch", "lib", "capability-matrix.ts");
|
|
121944
121971
|
if (!existsSync129(matrixPath)) {
|
|
121945
121972
|
addCheck("Capability matrix", "fail", "Capability matrix missing", [
|
|
121946
121973
|
{
|
|
121947
121974
|
severity: "error",
|
|
121948
121975
|
category: "configuration",
|
|
121949
|
-
message:
|
|
121976
|
+
message: `${matrixPath} not found`,
|
|
121950
121977
|
recommendation: "Create capability matrix to document supported operations"
|
|
121951
121978
|
}
|
|
121952
121979
|
]);
|
|
@@ -122078,14 +122105,14 @@ function registerDetectDriftCommand(program) {
|
|
|
122078
122105
|
addCheck("Agent injection", "fail", `Error: ${getErrorMessage(e)}`);
|
|
122079
122106
|
}
|
|
122080
122107
|
try {
|
|
122081
|
-
const exitCodesPath = join125(
|
|
122108
|
+
const exitCodesPath = join125(cleoSrcRoot, "dispatch", "lib", "exit-codes.ts");
|
|
122082
122109
|
if (!existsSync129(exitCodesPath)) {
|
|
122083
122110
|
addCheck("Exit codes", "fail", "Exit codes definition missing", [
|
|
122084
122111
|
{
|
|
122085
122112
|
severity: "error",
|
|
122086
122113
|
category: "protocol",
|
|
122087
|
-
message:
|
|
122088
|
-
recommendation: "Create exit codes
|
|
122114
|
+
message: `${exitCodesPath} not found`,
|
|
122115
|
+
recommendation: "Create exit codes definition for CLI protocol compliance"
|
|
122089
122116
|
}
|
|
122090
122117
|
]);
|
|
122091
122118
|
} else {
|
|
@@ -122098,7 +122125,6 @@ function registerDetectDriftCommand(program) {
|
|
|
122098
122125
|
}
|
|
122099
122126
|
if (result.summary.errors > 0) {
|
|
122100
122127
|
result.recommendations.push("Address all ERROR-level issues before proceeding");
|
|
122101
|
-
result.recommendations.push("Run cleo detect-drift --json for structured output");
|
|
122102
122128
|
}
|
|
122103
122129
|
if (result.summary.warnings > 0) {
|
|
122104
122130
|
result.recommendations.push("Review WARNING-level issues for documentation improvements");
|
|
@@ -122597,7 +122623,7 @@ var FIND_PARAMS = [
|
|
|
122597
122623
|
name: "query",
|
|
122598
122624
|
type: "string",
|
|
122599
122625
|
required: false,
|
|
122600
|
-
description: "
|
|
122626
|
+
description: "Search text (required unless --id is provided)",
|
|
122601
122627
|
cli: { positional: true }
|
|
122602
122628
|
},
|
|
122603
122629
|
{
|
|
@@ -122626,7 +122652,7 @@ var FIND_PARAMS = [
|
|
|
122626
122652
|
name: "field",
|
|
122627
122653
|
type: "string",
|
|
122628
122654
|
required: false,
|
|
122629
|
-
description: "Field to search in (title
|
|
122655
|
+
description: "Field to search in (title|description|notes|id)",
|
|
122630
122656
|
cli: { flag: "in" }
|
|
122631
122657
|
},
|
|
122632
122658
|
{
|
|
@@ -122950,7 +122976,9 @@ function registerHistoryCommand(program) {
|
|
|
122950
122976
|
// packages/cleo/src/cli/commands/implementation.ts
|
|
122951
122977
|
init_cli();
|
|
122952
122978
|
function registerImplementationCommand(program) {
|
|
122953
|
-
const implementation = program.command("implementation").description(
|
|
122979
|
+
const implementation = program.command("implementation").description(
|
|
122980
|
+
"Validate implementation protocol compliance (alias for `cleo check protocol implementation`)"
|
|
122981
|
+
);
|
|
122954
122982
|
implementation.command("validate <taskId>").description("Validate implementation protocol compliance for task").option("--strict", "Exit with error code on violations").action(async (taskId, opts) => {
|
|
122955
122983
|
await dispatchFromCli(
|
|
122956
122984
|
"query",
|
|
@@ -123153,7 +123181,7 @@ function registerLabelsCommand(program) {
|
|
|
123153
123181
|
await dispatchFromCli("query", "tasks", "label.list", {}, { command: "labels" });
|
|
123154
123182
|
});
|
|
123155
123183
|
labels.command("show <label>").description("Show tasks with specific label").action(async (label) => {
|
|
123156
|
-
await dispatchFromCli("query", "tasks", "
|
|
123184
|
+
await dispatchFromCli("query", "tasks", "list", { label }, { command: "labels" });
|
|
123157
123185
|
});
|
|
123158
123186
|
labels.command("stats").description("Show detailed label statistics").action(async () => {
|
|
123159
123187
|
await dispatchFromCli("query", "tasks", "label.list", {}, { command: "labels" });
|
|
@@ -123176,7 +123204,9 @@ function registerLifecycleCommand(program) {
|
|
|
123176
123204
|
{ command: "lifecycle" }
|
|
123177
123205
|
);
|
|
123178
123206
|
});
|
|
123179
|
-
lifecycle.command("start <epicId> <stage>").description(
|
|
123207
|
+
lifecycle.command("start <epicId> <stage>").description(
|
|
123208
|
+
"Start a lifecycle stage. Valid stages: research|consensus|architecture_decision|specification|decomposition|implementation|validation|testing|release|contribution"
|
|
123209
|
+
).action(async (epicId, stage) => {
|
|
123180
123210
|
await dispatchFromCli(
|
|
123181
123211
|
"mutate",
|
|
123182
123212
|
"pipeline",
|
|
@@ -123189,7 +123219,9 @@ function registerLifecycleCommand(program) {
|
|
|
123189
123219
|
{ command: "lifecycle" }
|
|
123190
123220
|
);
|
|
123191
123221
|
});
|
|
123192
|
-
lifecycle.command("complete <epicId> <stage>").description(
|
|
123222
|
+
lifecycle.command("complete <epicId> <stage>").description(
|
|
123223
|
+
"Complete a lifecycle stage. Valid stages: research|consensus|architecture_decision|specification|decomposition|implementation|validation|testing|release|contribution"
|
|
123224
|
+
).option("--artifacts <artifacts>", "Comma-separated artifact paths").option("--notes <notes>", "Completion notes").action(async (epicId, stage, opts) => {
|
|
123193
123225
|
await dispatchFromCli(
|
|
123194
123226
|
"mutate",
|
|
123195
123227
|
"pipeline",
|
|
@@ -123203,7 +123235,9 @@ function registerLifecycleCommand(program) {
|
|
|
123203
123235
|
{ command: "lifecycle" }
|
|
123204
123236
|
);
|
|
123205
123237
|
});
|
|
123206
|
-
lifecycle.command("skip <epicId> <stage>").description(
|
|
123238
|
+
lifecycle.command("skip <epicId> <stage>").description(
|
|
123239
|
+
"Skip a lifecycle stage. Valid stages: research|consensus|architecture_decision|specification|decomposition|implementation|validation|testing|release|contribution"
|
|
123240
|
+
).requiredOption("--reason <reason>", "Reason for skipping").action(async (epicId, stage, opts) => {
|
|
123207
123241
|
await dispatchFromCli(
|
|
123208
123242
|
"mutate",
|
|
123209
123243
|
"pipeline",
|
|
@@ -123256,7 +123290,9 @@ function registerLifecycleCommand(program) {
|
|
|
123256
123290
|
{ command: "lifecycle" }
|
|
123257
123291
|
);
|
|
123258
123292
|
});
|
|
123259
|
-
lifecycle.command("reset <epicId> <stage>").description(
|
|
123293
|
+
lifecycle.command("reset <epicId> <stage>").description(
|
|
123294
|
+
"Reset a lifecycle stage back to pending. Valid stages: research|consensus|architecture_decision|specification|decomposition|implementation|validation|testing|release|contribution"
|
|
123295
|
+
).requiredOption("--reason <reason>", "Reason for resetting the stage").action(async (epicId, stage, opts) => {
|
|
123260
123296
|
await dispatchFromCli(
|
|
123261
123297
|
"mutate",
|
|
123262
123298
|
"pipeline",
|
|
@@ -124286,7 +124322,9 @@ function registerOrchestrateCommand(program) {
|
|
|
124286
124322
|
init_internal();
|
|
124287
124323
|
init_renderers();
|
|
124288
124324
|
function registerOtelCommand(program) {
|
|
124289
|
-
const otel = program.command("otel").description(
|
|
124325
|
+
const otel = program.command("otel").description(
|
|
124326
|
+
"Lightweight token metrics from .cleo/metrics/TOKEN_USAGE.jsonl (session-level, spawn-level events)"
|
|
124327
|
+
);
|
|
124290
124328
|
otel.command("status").description("Show token tracking status and recent activity").action(async () => {
|
|
124291
124329
|
try {
|
|
124292
124330
|
const result = await getOtelStatus();
|
|
@@ -124451,11 +124489,15 @@ function registerPhaseCommand(program) {
|
|
|
124451
124489
|
// packages/cleo/src/cli/commands/phases.ts
|
|
124452
124490
|
init_cli();
|
|
124453
124491
|
function registerPhasesCommand(program) {
|
|
124454
|
-
const phases = program.command("phases").description(
|
|
124492
|
+
const phases = program.command("phases").description(
|
|
124493
|
+
"DEPRECATED: Use `cleo phase` instead. List phases with progress bars and statistics"
|
|
124494
|
+
);
|
|
124455
124495
|
phases.command("list", { isDefault: true }).description("List all phases with progress (default)").action(async () => {
|
|
124496
|
+
console.error("[DEPRECATED] cleo phases is deprecated. Use: cleo phase list");
|
|
124456
124497
|
await dispatchFromCli("query", "pipeline", "phase.list", {}, { command: "phases" });
|
|
124457
124498
|
});
|
|
124458
124499
|
phases.command("show <phase>").description("Show phase details and task counts").action(async (phase) => {
|
|
124500
|
+
console.error("[DEPRECATED] cleo phases is deprecated. Use: cleo phase show");
|
|
124459
124501
|
await dispatchFromCli(
|
|
124460
124502
|
"query",
|
|
124461
124503
|
"pipeline",
|
|
@@ -124465,6 +124507,7 @@ function registerPhasesCommand(program) {
|
|
|
124465
124507
|
);
|
|
124466
124508
|
});
|
|
124467
124509
|
phases.command("stats").description("Show detailed phase statistics").action(async () => {
|
|
124510
|
+
console.error("[DEPRECATED] cleo phases is deprecated. Use: cleo phase list");
|
|
124468
124511
|
await dispatchFromCli("query", "pipeline", "phase.list", {}, { command: "phases" });
|
|
124469
124512
|
});
|
|
124470
124513
|
}
|
|
@@ -124473,7 +124516,7 @@ function registerPhasesCommand(program) {
|
|
|
124473
124516
|
init_cli();
|
|
124474
124517
|
function registerPlanCommand(program) {
|
|
124475
124518
|
program.command("plan").description(
|
|
124476
|
-
"
|
|
124519
|
+
"Task prioritization view: in-progress epics, ready tasks, blocked tasks, open bugs with scoring. Use when deciding what to work on next."
|
|
124477
124520
|
).action(async () => {
|
|
124478
124521
|
await dispatchFromCli(
|
|
124479
124522
|
"query",
|
|
@@ -124682,7 +124725,9 @@ function registerRelatesCommand(program) {
|
|
|
124682
124725
|
handleRawError(response, { command: "relates", operation: "relates" });
|
|
124683
124726
|
cliOutput(response.data ?? {}, { command: "relates" });
|
|
124684
124727
|
});
|
|
124685
|
-
relates.command("add <from> <to> <type> <reason>").description(
|
|
124728
|
+
relates.command("add <from> <to> <type> <reason>").description(
|
|
124729
|
+
"Add a relates entry to a task. Valid types: blocks|related|duplicates|absorbs|fixes|extends|supersedes"
|
|
124730
|
+
).action(async (from, to2, type, reason) => {
|
|
124686
124731
|
await dispatchFromCli(
|
|
124687
124732
|
"mutate",
|
|
124688
124733
|
"tasks",
|
|
@@ -124736,15 +124781,6 @@ function registerReleaseCommand(program) {
|
|
|
124736
124781
|
{ command: "release" }
|
|
124737
124782
|
);
|
|
124738
124783
|
});
|
|
124739
|
-
release2.command("changelog <version>").description("Generate changelog for a release").action(async (version2) => {
|
|
124740
|
-
await dispatchFromCli(
|
|
124741
|
-
"mutate",
|
|
124742
|
-
"pipeline",
|
|
124743
|
-
"release.ship",
|
|
124744
|
-
{ version: version2, step: "changelog" },
|
|
124745
|
-
{ command: "release" }
|
|
124746
|
-
);
|
|
124747
|
-
});
|
|
124748
124784
|
release2.command("cancel <version>").description("Cancel and remove a release in draft or prepared state").action(async (version2) => {
|
|
124749
124785
|
await dispatchFromCli(
|
|
124750
124786
|
"mutate",
|
|
@@ -124890,15 +124926,15 @@ function registerRemoteCommand(program) {
|
|
|
124890
124926
|
const remoteName = opts["remote"];
|
|
124891
124927
|
const result = await pull(remoteName);
|
|
124892
124928
|
if (!result.success) {
|
|
124893
|
-
const
|
|
124929
|
+
const details = {
|
|
124894
124930
|
pulled: false,
|
|
124895
124931
|
branch: result.branch,
|
|
124896
124932
|
remote: result.remote
|
|
124897
124933
|
};
|
|
124898
124934
|
if (result.hasConflicts) {
|
|
124899
|
-
|
|
124935
|
+
details["conflicts"] = result.conflictFiles;
|
|
124900
124936
|
}
|
|
124901
|
-
|
|
124937
|
+
cliError(result.message, 1 /* GENERAL_ERROR */, { details });
|
|
124902
124938
|
process.exit(1 /* GENERAL_ERROR */);
|
|
124903
124939
|
}
|
|
124904
124940
|
cliOutput(
|
|
@@ -124957,7 +124993,7 @@ function registerRemoteCommand(program) {
|
|
|
124957
124993
|
// packages/cleo/src/cli/commands/reorder.ts
|
|
124958
124994
|
init_cli();
|
|
124959
124995
|
function registerReorderCommand(program) {
|
|
124960
|
-
program.command("reorder <task-id>").description("Change task position within sibling group").option("--position <n>", "Move to specific position
|
|
124996
|
+
program.command("reorder <task-id>").description("Change task position within sibling group").option("--position <n>", "Move to specific zero-based position among siblings", parseInt).action(async (taskId, opts) => {
|
|
124961
124997
|
const position = opts["position"];
|
|
124962
124998
|
await dispatchFromCli(
|
|
124963
124999
|
"mutate",
|
|
@@ -126249,7 +126285,13 @@ var SHOW_PARAMS = [
|
|
|
126249
126285
|
}
|
|
126250
126286
|
];
|
|
126251
126287
|
function registerShowCommand(program) {
|
|
126252
|
-
const cmd = program.command("show").description(
|
|
126288
|
+
const cmd = program.command("show").description(
|
|
126289
|
+
buildOperationHelp(
|
|
126290
|
+
"tasks.show",
|
|
126291
|
+
"Show full task details by ID (returns complete task record with metadata, verification, lifecycle)",
|
|
126292
|
+
SHOW_PARAMS
|
|
126293
|
+
)
|
|
126294
|
+
);
|
|
126253
126295
|
applyParamDefsToCommand(cmd, SHOW_PARAMS, "tasks.show");
|
|
126254
126296
|
cmd.action(async (taskId) => {
|
|
126255
126297
|
await dispatchFromCli("query", "tasks", "show", { taskId }, { command: "show" });
|
|
@@ -126481,7 +126523,9 @@ function registerSnapshotCommand(program) {
|
|
|
126481
126523
|
// packages/cleo/src/cli/commands/specification.ts
|
|
126482
126524
|
init_cli();
|
|
126483
126525
|
function registerSpecificationCommand(program) {
|
|
126484
|
-
const specification = program.command("specification").description(
|
|
126526
|
+
const specification = program.command("specification").description(
|
|
126527
|
+
"Validate specification protocol compliance (alias for `cleo check protocol specification`)"
|
|
126528
|
+
);
|
|
126485
126529
|
specification.command("validate <taskId>").description("Validate specification protocol compliance for task").option("--strict", "Exit with error code on violations").option("--spec-file <file>", "Path to specification file").action(async (taskId, opts) => {
|
|
126486
126530
|
await dispatchFromCli(
|
|
126487
126531
|
"query",
|
|
@@ -126517,7 +126561,7 @@ function registerSpecificationCommand(program) {
|
|
|
126517
126561
|
// packages/cleo/src/cli/commands/start.ts
|
|
126518
126562
|
init_cli();
|
|
126519
126563
|
function registerStartCommand(program) {
|
|
126520
|
-
program.command("start <taskId>").description("Start working on a task").action(async (taskId) => {
|
|
126564
|
+
program.command("start <taskId>").description("Start working on a task (sets it as the current task in the active session)").action(async (taskId) => {
|
|
126521
126565
|
await dispatchFromCli("mutate", "tasks", "start", { taskId }, { command: "start" });
|
|
126522
126566
|
});
|
|
126523
126567
|
}
|
|
@@ -126531,7 +126575,7 @@ function registerStatsCommand(program) {
|
|
|
126531
126575
|
"admin",
|
|
126532
126576
|
"stats",
|
|
126533
126577
|
{
|
|
126534
|
-
period: opts["period"]
|
|
126578
|
+
period: opts["period"] ?? 30
|
|
126535
126579
|
},
|
|
126536
126580
|
{ command: "stats", operation: "admin.stats" }
|
|
126537
126581
|
);
|
|
@@ -126728,7 +126772,9 @@ function collect(value, previous) {
|
|
|
126728
126772
|
// packages/cleo/src/cli/commands/stop.ts
|
|
126729
126773
|
init_cli();
|
|
126730
126774
|
function registerStopCommand(program) {
|
|
126731
|
-
program.command("stop").description(
|
|
126775
|
+
program.command("stop").description(
|
|
126776
|
+
"Stop working on the current task (clears the active task, returns {cleared: boolean, previousTask: string|null})"
|
|
126777
|
+
).action(async () => {
|
|
126732
126778
|
await dispatchFromCli("mutate", "tasks", "stop", {}, { command: "stop" });
|
|
126733
126779
|
});
|
|
126734
126780
|
}
|
|
@@ -126880,7 +126926,9 @@ function readPayload(opts, textKey, fileKey) {
|
|
|
126880
126926
|
return text3;
|
|
126881
126927
|
}
|
|
126882
126928
|
function registerTokenCommand(program) {
|
|
126883
|
-
const token = program.command("token").description(
|
|
126929
|
+
const token = program.command("token").description(
|
|
126930
|
+
"Provider-aware token telemetry from tasks.db (historical, per-operation tracking)"
|
|
126931
|
+
);
|
|
126884
126932
|
token.command("summary").description("Summarize recorded token telemetry").option("--provider <provider>", "Filter by provider").option("--transport <transport>", "Filter by transport").option("--domain <domain>", "Filter by domain").option("--operation <name>", "Filter by operation name").option("--session <id>", "Filter by session ID").option("--task <id>", "Filter by task ID").action(async (opts) => {
|
|
126885
126933
|
await dispatchFromCli(
|
|
126886
126934
|
"query",
|
|
@@ -126976,7 +127024,7 @@ function registerTokenCommand(program) {
|
|
|
126976
127024
|
// packages/cleo/src/cli/commands/update.ts
|
|
126977
127025
|
init_cli();
|
|
126978
127026
|
function registerUpdateCommand(program) {
|
|
126979
|
-
program.command("update <taskId>").description("Update a task").option("--title <title>", "New title").option("-s, --status <status>", "New status").option("-p, --priority <priority>", "New priority").option("-t, --type <type>", "New type").option("--size <size>", "New size").option("-P, --phase <phase>", "New phase").option("-d, --description <desc>", "New description").option("-l, --labels <labels>", "Set labels (comma-separated)").option("--add-labels <labels>", "Add labels (comma-separated)").option("--remove-labels <labels>", "Remove labels (comma-separated)").option("-D, --depends <ids>", "Set dependencies (comma-separated)").option("--add-depends <ids>", "Add dependencies (comma-separated)").option("--remove-depends <ids>", "Remove dependencies (comma-separated)").option("--notes <note>", "Add a note").option(
|
|
127027
|
+
program.command("update <taskId>").description("Update a task").option("--title <title>", "New title").option("-s, --status <status>", "New status (pending|active|blocked|done|cancelled)").option("-p, --priority <priority>", "New priority (critical|high|medium|low)").option("-t, --type <type>", "New type (task|epic|subtask|bug)").option("--size <size>", "New size").option("-P, --phase <phase>", "New phase").option("-d, --description <desc>", "New description").option("-l, --labels <labels>", "Set labels (comma-separated)").option("--add-labels <labels>", "Add labels (comma-separated)").option("--remove-labels <labels>", "Remove labels (comma-separated)").option("-D, --depends <ids>", "Set dependencies (comma-separated)").option("--add-depends <ids>", "Add dependencies (comma-separated)").option("--remove-depends <ids>", "Remove dependencies (comma-separated)").option("--notes <note>", "Add a note").option(
|
|
126980
127028
|
"--acceptance <criteria>",
|
|
126981
127029
|
'Set acceptance criteria (pipe-separated, e.g. "AC1|AC2|AC3")'
|
|
126982
127030
|
).option("--files <files>", "Set files (comma-separated)").option("--blocked-by <reason>", "Set blocked-by reason").option("--parent <id>", "Set parent ID").option("--no-auto-complete", "Disable auto-complete for epic").option(
|
|
@@ -127099,7 +127147,10 @@ function registerUpgradeCommand(program) {
|
|
|
127099
127147
|
// packages/cleo/src/cli/commands/validate.ts
|
|
127100
127148
|
init_cli();
|
|
127101
127149
|
function registerValidateCommand(program) {
|
|
127102
|
-
program.command("validate").description(
|
|
127150
|
+
program.command("validate").description(
|
|
127151
|
+
"DEPRECATED: Use `cleo check schema todo` instead. Validate task data against schema and business rules"
|
|
127152
|
+
).option("--strict", "Treat warnings as errors").action(async (opts) => {
|
|
127153
|
+
console.error("[DEPRECATED] cleo validate is deprecated. Use: cleo check schema todo");
|
|
127103
127154
|
await dispatchFromCli(
|
|
127104
127155
|
"query",
|
|
127105
127156
|
"check",
|
|
@@ -127468,7 +127519,6 @@ function getPackageVersion() {
|
|
|
127468
127519
|
var CLI_VERSION = getPackageVersion();
|
|
127469
127520
|
var rootShim = new ShimCommand();
|
|
127470
127521
|
registerAgentCommand(rootShim);
|
|
127471
|
-
registerAgentsCommand(rootShim);
|
|
127472
127522
|
registerAddCommand(rootShim);
|
|
127473
127523
|
registerAddBatchCommand(rootShim);
|
|
127474
127524
|
registerListCommand(rootShim);
|