mcoda 0.1.15 → 0.1.17
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/bin/McodaEntrypoint.d.ts.map +1 -1
- package/dist/bin/McodaEntrypoint.js +6 -1
- package/dist/commands/backlog/BacklogCommands.d.ts.map +1 -1
- package/dist/commands/backlog/BacklogCommands.js +2 -1
- package/dist/commands/estimate/EstimateCommands.d.ts +1 -0
- package/dist/commands/estimate/EstimateCommands.d.ts.map +1 -1
- package/dist/commands/estimate/EstimateCommands.js +44 -8
- package/dist/commands/workspace/ProjectGuidanceCommand.d.ts +11 -0
- package/dist/commands/workspace/ProjectGuidanceCommand.d.ts.map +1 -0
- package/dist/commands/workspace/ProjectGuidanceCommand.js +107 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McodaEntrypoint.d.ts","sourceRoot":"","sources":["../../src/bin/McodaEntrypoint.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"McodaEntrypoint.d.ts","sourceRoot":"","sources":["../../src/bin/McodaEntrypoint.ts"],"names":[],"mappings":";AA4BA,qBAAa,eAAe;WACb,GAAG,CAAC,IAAI,GAAE,MAAM,EAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;CAsLxE"}
|
|
@@ -24,6 +24,7 @@ import { RoutingCommands } from "../commands/routing/RoutingCommands.js";
|
|
|
24
24
|
import { TestAgentCommand } from "../commands/agents/TestAgentCommand.js";
|
|
25
25
|
import { AgentRunCommand } from "../commands/agents/AgentRunCommand.js";
|
|
26
26
|
import { SetWorkspaceCommand } from "../commands/workspace/SetWorkspaceCommand.js";
|
|
27
|
+
import { ProjectGuidanceCommand } from "../commands/workspace/ProjectGuidanceCommand.js";
|
|
27
28
|
export class McodaEntrypoint {
|
|
28
29
|
static async run(argv = process.argv.slice(2)) {
|
|
29
30
|
const applyCodexNoSandboxFlag = (value) => {
|
|
@@ -79,7 +80,7 @@ export class McodaEntrypoint {
|
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
if (!command) {
|
|
82
|
-
throw new Error("Usage: mcoda <agent|gateway-agent|test-agent|agent-run|routing|docs|openapi|job|jobs|tokens|telemetry|create-tasks|migrate-tasks|refine-tasks|order-tasks|tasks|work-on-tasks|gateway-trio|code-review|qa-tasks|backlog|task|task-detail|estimate|update|set-workspace|pdr|sds> [...args]\n" +
|
|
83
|
+
throw new Error("Usage: mcoda <agent|gateway-agent|test-agent|agent-run|routing|docs|openapi|job|jobs|tokens|telemetry|create-tasks|migrate-tasks|refine-tasks|order-tasks|tasks|work-on-tasks|gateway-trio|code-review|qa-tasks|backlog|task|task-detail|estimate|update|set-workspace|project-guidance|pdr|sds> [...args]\n" +
|
|
83
84
|
"Routing: use `mcoda routing defaults` to view/update workspace/global defaults, `mcoda routing preview|explain` to inspect agent selection/provenance (override → workspace_default → global_default).\n" +
|
|
84
85
|
"Aliases: `tasks order-by-deps` forwards to `order-tasks` (dependency-aware ordering), `task`/`task-detail` show a single task.\n" +
|
|
85
86
|
"Job commands (mcoda job --help for details): list|status|watch|logs|inspect|resume|cancel|tokens\n" +
|
|
@@ -197,6 +198,10 @@ export class McodaEntrypoint {
|
|
|
197
198
|
await SetWorkspaceCommand.run(rest);
|
|
198
199
|
return;
|
|
199
200
|
}
|
|
201
|
+
if (command === "project-guidance") {
|
|
202
|
+
await ProjectGuidanceCommand.run(rest);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
200
205
|
throw new Error(`Unknown command: ${command}`);
|
|
201
206
|
}
|
|
202
207
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BacklogCommands.d.ts","sourceRoot":"","sources":["../../../src/commands/backlog/BacklogCommands.ts"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AA6BD,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"BacklogCommands.d.ts","sourceRoot":"","sources":["../../../src/commands/backlog/BacklogCommands.ts"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AA6BD,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,KAAG,UAuHjD,CAAC;AAgLF,qBAAa,eAAe;WACb,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA4DhD"}
|
|
@@ -12,7 +12,7 @@ const usage = `mcoda backlog \\
|
|
|
12
12
|
[--include-done] \\
|
|
13
13
|
[--include-cancelled] \\
|
|
14
14
|
[--order dependencies] # dependency-aware ordering (topological, most depended-on first) \\
|
|
15
|
-
[--view summary|epics|stories|tasks] \\
|
|
15
|
+
[--view summary|epics|stories|tasks] # default: tasks \\
|
|
16
16
|
[--limit <N> | --top <N>] \\
|
|
17
17
|
[--json] \\
|
|
18
18
|
[--verbose]`;
|
|
@@ -32,6 +32,7 @@ export const parseBacklogArgs = (argv) => {
|
|
|
32
32
|
includeDone: false,
|
|
33
33
|
includeCancelled: false,
|
|
34
34
|
orderDependencies: false,
|
|
35
|
+
view: "tasks",
|
|
35
36
|
json: false,
|
|
36
37
|
verbose: false,
|
|
37
38
|
};
|
|
@@ -18,6 +18,7 @@ interface ParsedArgs {
|
|
|
18
18
|
debug: boolean;
|
|
19
19
|
}
|
|
20
20
|
export declare const parseEstimateArgs: (argv: string[]) => ParsedArgs;
|
|
21
|
+
export declare const formatTimeLeft: (hours: number | null | undefined) => string;
|
|
21
22
|
export declare class EstimateCommands {
|
|
22
23
|
static run(argv: string[]): Promise<void>;
|
|
23
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EstimateCommands.d.ts","sourceRoot":"","sources":["../../../src/commands/estimate/EstimateCommands.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,cAAc,EAGf,MAAM,aAAa,CAAC;AAErB,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,cAAc,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB;AA6BD,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"EstimateCommands.d.ts","sourceRoot":"","sources":["../../../src/commands/estimate/EstimateCommands.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,cAAc,EAGf,MAAM,aAAa,CAAC;AAErB,UAAU,UAAU;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B,cAAc,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB;AA6BD,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,KAAG,UA4HlD,CAAC;AAkBF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,GAAG,IAAI,GAAG,SAAS,KAAG,MAwBjE,CAAC;AA4HF,qBAAa,gBAAgB;WACd,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAgEhD"}
|
|
@@ -34,6 +34,8 @@ export const parseEstimateArgs = (argv) => {
|
|
|
34
34
|
quiet: false,
|
|
35
35
|
noColor: false,
|
|
36
36
|
noTelemetry: false,
|
|
37
|
+
velocityMode: "empirical",
|
|
38
|
+
velocityWindow: 50,
|
|
37
39
|
};
|
|
38
40
|
for (let i = 0; i < argv.length; i += 1) {
|
|
39
41
|
const arg = argv[i];
|
|
@@ -87,7 +89,12 @@ export const parseEstimateArgs = (argv) => {
|
|
|
87
89
|
i += 1;
|
|
88
90
|
break;
|
|
89
91
|
case "--velocity-mode":
|
|
90
|
-
|
|
92
|
+
{
|
|
93
|
+
const mode = parseVelocityMode(argv[i + 1]);
|
|
94
|
+
if (mode) {
|
|
95
|
+
parsed.velocityMode = mode;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
91
98
|
i += 1;
|
|
92
99
|
break;
|
|
93
100
|
case "--velocity-window":
|
|
@@ -133,7 +140,10 @@ export const parseEstimateArgs = (argv) => {
|
|
|
133
140
|
parsed.assignee = arg.split("=")[1];
|
|
134
141
|
}
|
|
135
142
|
else if (arg.startsWith("--velocity-mode=")) {
|
|
136
|
-
|
|
143
|
+
const mode = parseVelocityMode(arg.split("=")[1]);
|
|
144
|
+
if (mode) {
|
|
145
|
+
parsed.velocityMode = mode;
|
|
146
|
+
}
|
|
137
147
|
}
|
|
138
148
|
else if (arg.startsWith("--velocity-window=") || arg.startsWith("--window=")) {
|
|
139
149
|
const value = parseNumber(arg.split("=")[1]);
|
|
@@ -173,6 +183,32 @@ const fmt = (value) => {
|
|
|
173
183
|
return `${value}`;
|
|
174
184
|
return value.toFixed(2);
|
|
175
185
|
};
|
|
186
|
+
export const formatTimeLeft = (hours) => {
|
|
187
|
+
if (hours === null || hours === undefined)
|
|
188
|
+
return "N/A";
|
|
189
|
+
if (!Number.isFinite(hours) || hours <= 0)
|
|
190
|
+
return "0h";
|
|
191
|
+
let remainingHours = Math.max(1, Math.round(hours));
|
|
192
|
+
const monthHours = 24 * 30;
|
|
193
|
+
const weekHours = 24 * 7;
|
|
194
|
+
const dayHours = 24;
|
|
195
|
+
const months = Math.floor(remainingHours / monthHours);
|
|
196
|
+
remainingHours -= months * monthHours;
|
|
197
|
+
const weeks = Math.floor(remainingHours / weekHours);
|
|
198
|
+
remainingHours -= weeks * weekHours;
|
|
199
|
+
const days = Math.floor(remainingHours / dayHours);
|
|
200
|
+
remainingHours -= days * dayHours;
|
|
201
|
+
const parts = [];
|
|
202
|
+
if (months > 0)
|
|
203
|
+
parts.push(`${months}mo`);
|
|
204
|
+
if (weeks > 0)
|
|
205
|
+
parts.push(`${weeks}w`);
|
|
206
|
+
if (days > 0)
|
|
207
|
+
parts.push(`${days}d`);
|
|
208
|
+
if (remainingHours > 0 || parts.length === 0)
|
|
209
|
+
parts.push(`${remainingHours}h`);
|
|
210
|
+
return parts.join("");
|
|
211
|
+
};
|
|
176
212
|
const pad2 = (value) => `${value}`.padStart(2, "0");
|
|
177
213
|
const formatLocalDateTime = (date) => `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())} ${pad2(date.getHours())}:${pad2(date.getMinutes())}`;
|
|
178
214
|
const formatRelativeDuration = (targetMs, nowMs) => {
|
|
@@ -226,35 +262,35 @@ const renderResult = (result) => {
|
|
|
226
262
|
"Implementation",
|
|
227
263
|
fmt(result.backlogTotals.implementation.story_points),
|
|
228
264
|
fmt(result.effectiveVelocity.implementationSpPerHour),
|
|
229
|
-
|
|
265
|
+
formatTimeLeft(result.durationsHours.implementationHours),
|
|
230
266
|
],
|
|
231
267
|
[
|
|
232
268
|
"Review",
|
|
233
269
|
fmt(result.backlogTotals.review.story_points),
|
|
234
270
|
fmt(result.effectiveVelocity.reviewSpPerHour),
|
|
235
|
-
|
|
271
|
+
formatTimeLeft(result.durationsHours.reviewHours),
|
|
236
272
|
],
|
|
237
273
|
[
|
|
238
274
|
"QA",
|
|
239
275
|
fmt(result.backlogTotals.qa.story_points),
|
|
240
276
|
fmt(result.effectiveVelocity.qaSpPerHour),
|
|
241
|
-
|
|
277
|
+
formatTimeLeft(result.durationsHours.qaHours),
|
|
242
278
|
],
|
|
243
279
|
[
|
|
244
280
|
"Done",
|
|
245
281
|
fmt(result.backlogTotals.done.story_points),
|
|
246
282
|
fmt(null),
|
|
247
|
-
|
|
283
|
+
formatTimeLeft(0),
|
|
248
284
|
],
|
|
249
285
|
[
|
|
250
286
|
"Total",
|
|
251
287
|
fmt(totalSp),
|
|
252
288
|
fmt(null),
|
|
253
|
-
|
|
289
|
+
formatTimeLeft(result.durationsHours.totalHours),
|
|
254
290
|
],
|
|
255
291
|
];
|
|
256
292
|
// eslint-disable-next-line no-console
|
|
257
|
-
console.log(formatTable(["LANE", "STORY_POINTS", spHeader, "
|
|
293
|
+
console.log(formatTable(["LANE", "STORY_POINTS", spHeader, "TIME_LEFT"], rows));
|
|
258
294
|
const samples = velocity.samples ?? { implementation: 0, review: 0, qa: 0 };
|
|
259
295
|
const windowLabel = velocity.windowTasks ? ` (window ${velocity.windowTasks})` : "";
|
|
260
296
|
const fallbackNote = velocity.requestedMode && velocity.requestedMode !== velocity.source
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ParsedProjectGuidanceArgs {
|
|
2
|
+
workspaceRoot?: string;
|
|
3
|
+
force: boolean;
|
|
4
|
+
json: boolean;
|
|
5
|
+
help: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const parseProjectGuidanceArgs: (argv: string[]) => ParsedProjectGuidanceArgs;
|
|
8
|
+
export declare class ProjectGuidanceCommand {
|
|
9
|
+
static run(argv: string[]): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ProjectGuidanceCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectGuidanceCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/workspace/ProjectGuidanceCommand.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,yBAAyB;IACxC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf;AAUD,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,EAAE,KAAG,yBAqDzD,CAAC;AAEF,qBAAa,sBAAsB;WACpB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CA0ChD"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { WorkspaceResolver, ensureProjectGuidance } from "@mcoda/core";
|
|
3
|
+
const USAGE = "Usage: mcoda project-guidance [--workspace <path>|--workspace-root <path>] [--force] [--json]";
|
|
4
|
+
const parseBooleanFlag = (value, defaultValue) => {
|
|
5
|
+
if (value === undefined)
|
|
6
|
+
return defaultValue;
|
|
7
|
+
const normalized = value.trim().toLowerCase();
|
|
8
|
+
if (["0", "false", "off", "no"].includes(normalized))
|
|
9
|
+
return false;
|
|
10
|
+
if (["1", "true", "on", "yes"].includes(normalized))
|
|
11
|
+
return true;
|
|
12
|
+
return defaultValue;
|
|
13
|
+
};
|
|
14
|
+
export const parseProjectGuidanceArgs = (argv) => {
|
|
15
|
+
const parsed = {
|
|
16
|
+
force: false,
|
|
17
|
+
json: false,
|
|
18
|
+
help: false,
|
|
19
|
+
};
|
|
20
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
21
|
+
const arg = argv[i];
|
|
22
|
+
if (arg.startsWith("--workspace-root=") || arg.startsWith("--workspace=")) {
|
|
23
|
+
const [, raw] = arg.split("=", 2);
|
|
24
|
+
if (raw)
|
|
25
|
+
parsed.workspaceRoot = path.resolve(raw);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (arg.startsWith("--force=")) {
|
|
29
|
+
const [, raw] = arg.split("=", 2);
|
|
30
|
+
parsed.force = parseBooleanFlag(raw, true);
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (arg.startsWith("--json=")) {
|
|
34
|
+
const [, raw] = arg.split("=", 2);
|
|
35
|
+
parsed.json = parseBooleanFlag(raw, true);
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
switch (arg) {
|
|
39
|
+
case "--workspace":
|
|
40
|
+
case "--workspace-root":
|
|
41
|
+
if (argv[i + 1]) {
|
|
42
|
+
parsed.workspaceRoot = path.resolve(argv[i + 1]);
|
|
43
|
+
i += 1;
|
|
44
|
+
}
|
|
45
|
+
break;
|
|
46
|
+
case "--force": {
|
|
47
|
+
const next = argv[i + 1];
|
|
48
|
+
if (next && !next.startsWith("--")) {
|
|
49
|
+
parsed.force = parseBooleanFlag(next, true);
|
|
50
|
+
i += 1;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
parsed.force = true;
|
|
54
|
+
}
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
case "--json":
|
|
58
|
+
parsed.json = true;
|
|
59
|
+
break;
|
|
60
|
+
case "--help":
|
|
61
|
+
case "-h":
|
|
62
|
+
parsed.help = true;
|
|
63
|
+
break;
|
|
64
|
+
default:
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return parsed;
|
|
69
|
+
};
|
|
70
|
+
export class ProjectGuidanceCommand {
|
|
71
|
+
static async run(argv) {
|
|
72
|
+
const parsed = parseProjectGuidanceArgs(argv);
|
|
73
|
+
if (parsed.help) {
|
|
74
|
+
// eslint-disable-next-line no-console
|
|
75
|
+
console.log(USAGE);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
const workspace = await WorkspaceResolver.resolveWorkspace({
|
|
80
|
+
cwd: process.cwd(),
|
|
81
|
+
explicitWorkspace: parsed.workspaceRoot,
|
|
82
|
+
});
|
|
83
|
+
const result = await ensureProjectGuidance(workspace.workspaceRoot, {
|
|
84
|
+
mcodaDir: workspace.mcodaDir,
|
|
85
|
+
force: parsed.force,
|
|
86
|
+
});
|
|
87
|
+
if (parsed.json) {
|
|
88
|
+
// eslint-disable-next-line no-console
|
|
89
|
+
console.log(JSON.stringify({
|
|
90
|
+
workspaceRoot: workspace.workspaceRoot,
|
|
91
|
+
mcodaDir: workspace.mcodaDir,
|
|
92
|
+
path: result.path,
|
|
93
|
+
status: result.status,
|
|
94
|
+
}, null, 2));
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
// eslint-disable-next-line no-console
|
|
98
|
+
console.log(`project-guidance ${result.status}: ${result.path}`);
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
102
|
+
// eslint-disable-next-line no-console
|
|
103
|
+
console.error(`project-guidance failed: ${message}`);
|
|
104
|
+
process.exitCode = 1;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,4 +17,5 @@ export * from "./commands/planning/QaTasksCommand.js";
|
|
|
17
17
|
export * from "./commands/update/UpdateCommands.js";
|
|
18
18
|
export * from "./commands/routing/RoutingCommands.js";
|
|
19
19
|
export * from "./commands/agents/TestAgentCommand.js";
|
|
20
|
+
export * from "./commands/workspace/ProjectGuidanceCommand.js";
|
|
20
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gDAAgD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,3 +17,4 @@ export * from "./commands/planning/QaTasksCommand.js";
|
|
|
17
17
|
export * from "./commands/update/UpdateCommands.js";
|
|
18
18
|
export * from "./commands/routing/RoutingCommands.js";
|
|
19
19
|
export * from "./commands/agents/TestAgentCommand.js";
|
|
20
|
+
export * from "./commands/workspace/ProjectGuidanceCommand.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcoda",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "Local-first CLI for planning, documentation, and execution workflows with agent assistance.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"yaml": "^2.4.2",
|
|
48
|
-
"@mcoda/core": "0.1.
|
|
49
|
-
"@mcoda/shared": "0.1.
|
|
48
|
+
"@mcoda/core": "0.1.17",
|
|
49
|
+
"@mcoda/shared": "0.1.17"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@mcoda/
|
|
53
|
-
"@mcoda/
|
|
52
|
+
"@mcoda/integrations": "0.1.17",
|
|
53
|
+
"@mcoda/db": "0.1.17"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "tsc -p tsconfig.json",
|