pi-gsd 2.0.1 → 2.0.3
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/pi-gsd-hooks.js +1533 -0
- package/dist/pi-gsd-tools.js +53 -52
- package/package.json +3 -5
- package/.gsd/extensions/pi-gsd-hooks.ts +0 -973
- package/src/cli.ts +0 -644
- package/src/commands/base.ts +0 -67
- package/src/commands/commit.ts +0 -22
- package/src/commands/config.ts +0 -71
- package/src/commands/frontmatter.ts +0 -51
- package/src/commands/index.ts +0 -76
- package/src/commands/init.ts +0 -43
- package/src/commands/milestone.ts +0 -37
- package/src/commands/phase.ts +0 -92
- package/src/commands/progress.ts +0 -71
- package/src/commands/roadmap.ts +0 -40
- package/src/commands/scaffold.ts +0 -19
- package/src/commands/state.ts +0 -102
- package/src/commands/template.ts +0 -52
- package/src/commands/verify.ts +0 -70
- package/src/commands/workstream.ts +0 -98
- package/src/commands/wxp.ts +0 -65
- package/src/lib/commands.ts +0 -1040
- package/src/lib/config.ts +0 -385
- package/src/lib/core.ts +0 -1167
- package/src/lib/frontmatter.ts +0 -462
- package/src/lib/init.ts +0 -517
- package/src/lib/milestone.ts +0 -290
- package/src/lib/model-profiles.ts +0 -272
- package/src/lib/phase.ts +0 -1012
- package/src/lib/profile-output.ts +0 -237
- package/src/lib/profile-pipeline.ts +0 -556
- package/src/lib/roadmap.ts +0 -378
- package/src/lib/schemas.ts +0 -290
- package/src/lib/security.ts +0 -176
- package/src/lib/state.ts +0 -1175
- package/src/lib/template.ts +0 -246
- package/src/lib/uat.ts +0 -289
- package/src/lib/verify.ts +0 -879
- package/src/lib/workstream.ts +0 -524
- package/src/output.ts +0 -45
- package/src/schemas/pi-gsd-settings.schema.json +0 -80
- package/src/schemas/wxp.xsd +0 -619
- package/src/schemas/wxp.zod.ts +0 -318
- package/src/wxp/__tests__/arguments.test.ts +0 -86
- package/src/wxp/__tests__/conditions.test.ts +0 -106
- package/src/wxp/__tests__/executor.test.ts +0 -95
- package/src/wxp/__tests__/helpers.ts +0 -26
- package/src/wxp/__tests__/integration.test.ts +0 -166
- package/src/wxp/__tests__/new-features.test.ts +0 -222
- package/src/wxp/__tests__/parser.test.ts +0 -159
- package/src/wxp/__tests__/paste.test.ts +0 -66
- package/src/wxp/__tests__/schema.test.ts +0 -120
- package/src/wxp/__tests__/security.test.ts +0 -87
- package/src/wxp/__tests__/shell.test.ts +0 -85
- package/src/wxp/__tests__/string-ops.test.ts +0 -25
- package/src/wxp/__tests__/variables.test.ts +0 -65
- package/src/wxp/arguments.ts +0 -89
- package/src/wxp/conditions.ts +0 -78
- package/src/wxp/executor.ts +0 -191
- package/src/wxp/index.ts +0 -191
- package/src/wxp/parser.ts +0 -198
- package/src/wxp/paste.ts +0 -51
- package/src/wxp/security.ts +0 -102
- package/src/wxp/shell.ts +0 -81
- package/src/wxp/string-ops.ts +0 -44
- package/src/wxp/variables.ts +0 -109
package/src/commands/base.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Command, Flags } from "@oclif/core";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import fs from "node:fs";
|
|
4
|
-
import {
|
|
5
|
-
findProjectRoot,
|
|
6
|
-
getActiveWorkstream,
|
|
7
|
-
gsdError,
|
|
8
|
-
resolveWorktreeRoot,
|
|
9
|
-
} from "../lib/core.js";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* BaseCommand — extends oclif Command with GSD global flags.
|
|
13
|
-
* All pi-gsd-tools commands extend this.
|
|
14
|
-
*/
|
|
15
|
-
export abstract class BaseCommand extends Command {
|
|
16
|
-
static override enableJsonFlag = false;
|
|
17
|
-
|
|
18
|
-
static override baseFlags = {
|
|
19
|
-
cwd: Flags.string({ description: "Working directory", default: "" }),
|
|
20
|
-
ws: Flags.string({ description: "Workstream override", default: "" }),
|
|
21
|
-
raw: Flags.boolean({ description: "Raw JSON output", default: false }),
|
|
22
|
-
output: Flags.string({
|
|
23
|
-
description: "Output format",
|
|
24
|
-
options: ["json", "toon"],
|
|
25
|
-
default: "json",
|
|
26
|
-
}),
|
|
27
|
-
pick: Flags.string({ description: "JSONPath pick expression", default: "" }),
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/** Resolve cwd + ws from flags and environment, following GSD conventions. */
|
|
31
|
-
protected resolveContext(flags: {
|
|
32
|
-
cwd?: string;
|
|
33
|
-
ws?: string;
|
|
34
|
-
raw?: boolean;
|
|
35
|
-
output?: string;
|
|
36
|
-
pick?: string;
|
|
37
|
-
}): { cwd: string; ws: string | null; raw: boolean } {
|
|
38
|
-
let cwd = flags.cwd ? path.resolve(flags.cwd) : process.cwd();
|
|
39
|
-
|
|
40
|
-
if (!fs.existsSync(cwd) || !fs.statSync(cwd).isDirectory()) {
|
|
41
|
-
gsdError(`Invalid --cwd: ${cwd}`);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Worktree resolution
|
|
45
|
-
if (!fs.existsSync(path.join(cwd, ".planning"))) {
|
|
46
|
-
const worktreeRoot = resolveWorktreeRoot(cwd);
|
|
47
|
-
if (worktreeRoot !== cwd) cwd = worktreeRoot;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
let ws: string | null = null;
|
|
51
|
-
if (flags.ws) {
|
|
52
|
-
ws = flags.ws;
|
|
53
|
-
} else if (process.env["GSD_WORKSTREAM"]) {
|
|
54
|
-
ws = process.env["GSD_WORKSTREAM"].trim();
|
|
55
|
-
} else {
|
|
56
|
-
ws = getActiveWorkstream(cwd);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (ws && !/^[a-zA-Z0-9_-]+$/.test(ws)) gsdError("Invalid workstream name");
|
|
60
|
-
if (ws) process.env["GSD_WORKSTREAM"] = ws;
|
|
61
|
-
|
|
62
|
-
// Root resolution (most commands)
|
|
63
|
-
cwd = findProjectRoot(cwd);
|
|
64
|
-
|
|
65
|
-
return { cwd, ws, raw: flags.raw ?? false };
|
|
66
|
-
}
|
|
67
|
-
}
|
package/src/commands/commit.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from "@oclif/core";
|
|
2
|
-
import { BaseCommand } from "./base.js";
|
|
3
|
-
|
|
4
|
-
export class CommitCommand extends BaseCommand {
|
|
5
|
-
static override description = "Commit GSD changes to git";
|
|
6
|
-
static override flags = {
|
|
7
|
-
...BaseCommand.baseFlags,
|
|
8
|
-
amend: Flags.boolean({ description: "Amend last commit", default: false }),
|
|
9
|
-
"no-verify": Flags.boolean({ description: "Skip git hooks", default: false }),
|
|
10
|
-
files: Flags.string({ description: "Files to include", multiple: true }),
|
|
11
|
-
};
|
|
12
|
-
static override strict = false;
|
|
13
|
-
|
|
14
|
-
async run() {
|
|
15
|
-
const { flags, argv } = await this.parse(CommitCommand);
|
|
16
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
17
|
-
const { cmdCommit } = await import("../lib/commands.js");
|
|
18
|
-
const rawArgv = argv as string[];
|
|
19
|
-
const message = rawArgv.filter((a) => !a.startsWith("--")).join(" ") || undefined;
|
|
20
|
-
cmdCommit(cwd, message, flags.files ?? [], raw, flags.amend, flags["no-verify"]);
|
|
21
|
-
}
|
|
22
|
-
}
|
package/src/commands/config.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from "@oclif/core";
|
|
2
|
-
import { BaseCommand } from "./base.js";
|
|
3
|
-
|
|
4
|
-
export class ConfigGetCommand extends BaseCommand {
|
|
5
|
-
static override description = "Get a config value";
|
|
6
|
-
static override args = { key: Args.string({ required: true }) };
|
|
7
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
8
|
-
|
|
9
|
-
async run() {
|
|
10
|
-
const { flags, args } = await this.parse(ConfigGetCommand);
|
|
11
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
12
|
-
const { cmdConfigGet } = await import("../lib/config.js");
|
|
13
|
-
cmdConfigGet(cwd, args.key, raw);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export class ConfigSetCommand extends BaseCommand {
|
|
18
|
-
static override description = "Set a config value";
|
|
19
|
-
static override args = {
|
|
20
|
-
key: Args.string({ required: false }),
|
|
21
|
-
value: Args.string({ required: false }),
|
|
22
|
-
};
|
|
23
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
24
|
-
|
|
25
|
-
async run() {
|
|
26
|
-
const { flags, args } = await this.parse(ConfigSetCommand);
|
|
27
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
28
|
-
const { cmdConfigSet } = await import("../lib/config.js");
|
|
29
|
-
cmdConfigSet(cwd, args.key, args.value, raw);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export class ConfigSetModelProfileCommand extends BaseCommand {
|
|
34
|
-
static override description = "Set the active model profile";
|
|
35
|
-
static override args = { profile: Args.string({ required: true }) };
|
|
36
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
37
|
-
|
|
38
|
-
async run() {
|
|
39
|
-
const { flags, args } = await this.parse(ConfigSetModelProfileCommand);
|
|
40
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
41
|
-
const { cmdConfigSetModelProfile } = await import("../lib/config.js");
|
|
42
|
-
cmdConfigSetModelProfile(cwd, args.profile, raw);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export class ConfigNewProjectCommand extends BaseCommand {
|
|
47
|
-
static override description = "Initialise a new project config";
|
|
48
|
-
static override flags = {
|
|
49
|
-
...BaseCommand.baseFlags,
|
|
50
|
-
choices: Flags.string({ description: "Choices JSON" }),
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
async run() {
|
|
54
|
-
const { flags } = await this.parse(ConfigNewProjectCommand);
|
|
55
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
56
|
-
const { cmdConfigNewProject } = await import("../lib/config.js");
|
|
57
|
-
cmdConfigNewProject(cwd, flags.choices, raw);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export class ConfigEnsureSectionCommand extends BaseCommand {
|
|
62
|
-
static override description = "Ensure a config section exists";
|
|
63
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
64
|
-
|
|
65
|
-
async run() {
|
|
66
|
-
const { flags } = await this.parse(ConfigEnsureSectionCommand);
|
|
67
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
68
|
-
const { cmdConfigEnsureSection } = await import("../lib/config.js");
|
|
69
|
-
cmdConfigEnsureSection(cwd, raw);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from "@oclif/core";
|
|
2
|
-
import { BaseCommand } from "./base.js";
|
|
3
|
-
|
|
4
|
-
export class FrontmatterGetCommand extends BaseCommand {
|
|
5
|
-
static override description = "Get frontmatter field from a file";
|
|
6
|
-
static override args = { file: Args.string({ required: true }) };
|
|
7
|
-
static override flags = {
|
|
8
|
-
...BaseCommand.baseFlags,
|
|
9
|
-
field: Flags.string({ description: "Field name" }),
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
async run() {
|
|
13
|
-
const { flags, args } = await this.parse(FrontmatterGetCommand);
|
|
14
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
15
|
-
const fm = await import("../lib/frontmatter.js");
|
|
16
|
-
fm.cmdFrontmatterGet(cwd, args.file, flags.field ?? null, raw);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export class FrontmatterSetCommand extends BaseCommand {
|
|
21
|
-
static override description = "Set frontmatter field in a file";
|
|
22
|
-
static override args = { file: Args.string({ required: true }) };
|
|
23
|
-
static override flags = {
|
|
24
|
-
...BaseCommand.baseFlags,
|
|
25
|
-
field: Flags.string({ description: "Field name" }),
|
|
26
|
-
value: Flags.string({ description: "Field value" }),
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
async run() {
|
|
30
|
-
const { flags, args } = await this.parse(FrontmatterSetCommand);
|
|
31
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
32
|
-
const fm = await import("../lib/frontmatter.js");
|
|
33
|
-
fm.cmdFrontmatterSet(cwd, args.file, flags.field, flags.value, raw);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export class FrontmatterMergeCommand extends BaseCommand {
|
|
38
|
-
static override description = "Merge frontmatter data into a file";
|
|
39
|
-
static override args = { file: Args.string({ required: true }) };
|
|
40
|
-
static override flags = {
|
|
41
|
-
...BaseCommand.baseFlags,
|
|
42
|
-
data: Flags.string({ description: "JSON data to merge" }),
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
async run() {
|
|
46
|
-
const { flags, args } = await this.parse(FrontmatterMergeCommand);
|
|
47
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
48
|
-
const fm = await import("../lib/frontmatter.js");
|
|
49
|
-
fm.cmdFrontmatterMerge(cwd, args.file, flags.data, raw);
|
|
50
|
-
}
|
|
51
|
-
}
|
package/src/commands/index.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// Re-export all command classes
|
|
2
|
-
export {
|
|
3
|
-
StateJsonCommand,
|
|
4
|
-
StateGetCommand,
|
|
5
|
-
StateUpdateCommand,
|
|
6
|
-
StatePatchCommand,
|
|
7
|
-
StateAdvancePlanCommand,
|
|
8
|
-
StateLoadCommand,
|
|
9
|
-
StateUpdateProgressCommand,
|
|
10
|
-
} from "./state.js";
|
|
11
|
-
|
|
12
|
-
export { InitCommand } from "./init.js";
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
RoadmapAnalyzeCommand,
|
|
16
|
-
RoadmapGetPhaseCommand,
|
|
17
|
-
RoadmapUpdatePlanProgressCommand,
|
|
18
|
-
} from "./roadmap.js";
|
|
19
|
-
|
|
20
|
-
export {
|
|
21
|
-
ConfigGetCommand,
|
|
22
|
-
ConfigSetCommand,
|
|
23
|
-
ConfigSetModelProfileCommand,
|
|
24
|
-
ConfigNewProjectCommand,
|
|
25
|
-
ConfigEnsureSectionCommand,
|
|
26
|
-
} from "./config.js";
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
PhaseNextDecimalCommand,
|
|
30
|
-
PhaseAddCommand,
|
|
31
|
-
PhaseInsertCommand,
|
|
32
|
-
PhaseRemoveCommand,
|
|
33
|
-
PhaseCompleteCommand,
|
|
34
|
-
PhasePlanIndexCommand,
|
|
35
|
-
} from "./phase.js";
|
|
36
|
-
|
|
37
|
-
export { MilestoneCompleteCommand, RequirementsMarkCompleteCommand } from "./milestone.js";
|
|
38
|
-
|
|
39
|
-
export {
|
|
40
|
-
ValidateConsistencyCommand,
|
|
41
|
-
ValidateHealthCommand,
|
|
42
|
-
ValidateAgentsCommand,
|
|
43
|
-
VerifyCommand,
|
|
44
|
-
AuditUatCommand,
|
|
45
|
-
} from "./verify.js";
|
|
46
|
-
|
|
47
|
-
export {
|
|
48
|
-
WorkstreamCreateCommand,
|
|
49
|
-
WorkstreamListCommand,
|
|
50
|
-
WorkstreamStatusCommand,
|
|
51
|
-
WorkstreamCompleteCommand,
|
|
52
|
-
WorkstreamSetCommand,
|
|
53
|
-
WorkstreamGetCommand,
|
|
54
|
-
WorkstreamProgressCommand,
|
|
55
|
-
} from "./workstream.js";
|
|
56
|
-
|
|
57
|
-
export { ScaffoldCommand } from "./scaffold.js";
|
|
58
|
-
export { CommitCommand } from "./commit.js";
|
|
59
|
-
|
|
60
|
-
export {
|
|
61
|
-
FrontmatterGetCommand,
|
|
62
|
-
FrontmatterSetCommand,
|
|
63
|
-
FrontmatterMergeCommand,
|
|
64
|
-
} from "./frontmatter.js";
|
|
65
|
-
|
|
66
|
-
export { TemplateSelectCommand, TemplateFillCommand } from "./template.js";
|
|
67
|
-
|
|
68
|
-
export {
|
|
69
|
-
ProgressCommand,
|
|
70
|
-
StatsCommand,
|
|
71
|
-
TodoCompleteCommand,
|
|
72
|
-
TodoMatchPhaseCommand,
|
|
73
|
-
SummaryExtractCommand,
|
|
74
|
-
} from "./progress.js";
|
|
75
|
-
|
|
76
|
-
export { WxpProcessCommand } from "./wxp.js";
|
package/src/commands/init.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Args } from "@oclif/core";
|
|
2
|
-
import { BaseCommand } from "./base.js";
|
|
3
|
-
|
|
4
|
-
export class InitCommand extends BaseCommand {
|
|
5
|
-
static override description = "Initialise a GSD workflow context";
|
|
6
|
-
static override args = {
|
|
7
|
-
workflow: Args.string({ required: true }),
|
|
8
|
-
phase: Args.string({ required: false }),
|
|
9
|
-
rest: Args.string({ required: false }),
|
|
10
|
-
};
|
|
11
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
12
|
-
static override strict = false;
|
|
13
|
-
|
|
14
|
-
async run() {
|
|
15
|
-
const { flags, argv } = await this.parse(InitCommand);
|
|
16
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
17
|
-
const rawArgv = argv as string[];
|
|
18
|
-
const workflow = rawArgv[0];
|
|
19
|
-
const init = await import("../lib/init.js");
|
|
20
|
-
const { gsdError } = await import("../lib/core.js");
|
|
21
|
-
|
|
22
|
-
switch (workflow) {
|
|
23
|
-
case "execute-phase": return init.cmdInitExecutePhase(cwd, rawArgv[1], raw);
|
|
24
|
-
case "plan-phase": return init.cmdInitPlanPhase(cwd, rawArgv[1], raw);
|
|
25
|
-
case "new-project": return init.cmdInitNewProject(cwd, raw);
|
|
26
|
-
case "new-milestone": return init.cmdInitNewMilestone(cwd, raw);
|
|
27
|
-
case "quick": return init.cmdInitQuick(cwd, rawArgv.slice(1).join(" "), raw);
|
|
28
|
-
case "resume": return init.cmdInitResume(cwd, raw);
|
|
29
|
-
case "verify-work": return init.cmdInitVerifyWork(cwd, rawArgv[1], raw);
|
|
30
|
-
case "phase-op": return init.cmdInitPhaseOp(cwd, rawArgv[1], raw);
|
|
31
|
-
case "todos": return init.cmdInitTodos(cwd, rawArgv[1], raw);
|
|
32
|
-
case "milestone-op": return init.cmdInitMilestoneOp(cwd, raw);
|
|
33
|
-
case "map-codebase": return init.cmdInitMapCodebase(cwd, raw);
|
|
34
|
-
case "progress": return init.cmdInitProgress(cwd, raw);
|
|
35
|
-
case "manager": return init.cmdInitManager(cwd, raw);
|
|
36
|
-
case "new-workspace": return init.cmdInitNewWorkspace(cwd, raw);
|
|
37
|
-
case "list-workspaces": return init.cmdInitListWorkspaces(cwd, raw);
|
|
38
|
-
case "remove-workspace": return init.cmdInitRemoveWorkspace(cwd, rawArgv[1], raw);
|
|
39
|
-
default:
|
|
40
|
-
gsdError(`Unknown init workflow: ${workflow}`);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from "@oclif/core";
|
|
2
|
-
import { BaseCommand } from "./base.js";
|
|
3
|
-
|
|
4
|
-
export class MilestoneCompleteCommand extends BaseCommand {
|
|
5
|
-
static override description = "Complete the current milestone";
|
|
6
|
-
static override args = { version: Args.string({ required: false }) };
|
|
7
|
-
static override flags = {
|
|
8
|
-
...BaseCommand.baseFlags,
|
|
9
|
-
name: Flags.string({ description: "Milestone name" }),
|
|
10
|
-
"archive-phases": Flags.boolean({ description: "Archive phases", default: false }),
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
async run() {
|
|
14
|
-
const { flags, args } = await this.parse(MilestoneCompleteCommand);
|
|
15
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
16
|
-
const { cmdMilestoneComplete } = await import("../lib/milestone.js");
|
|
17
|
-
cmdMilestoneComplete(
|
|
18
|
-
cwd,
|
|
19
|
-
args.version ?? "",
|
|
20
|
-
{ name: flags.name ?? null, archivePhases: flags["archive-phases"] },
|
|
21
|
-
raw,
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export class RequirementsMarkCompleteCommand extends BaseCommand {
|
|
27
|
-
static override description = "Mark requirements as complete";
|
|
28
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
29
|
-
static override strict = false;
|
|
30
|
-
|
|
31
|
-
async run() {
|
|
32
|
-
const { flags, argv } = await this.parse(RequirementsMarkCompleteCommand);
|
|
33
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
34
|
-
const { cmdRequirementsMarkComplete } = await import("../lib/milestone.js");
|
|
35
|
-
cmdRequirementsMarkComplete(cwd, argv as string[], raw);
|
|
36
|
-
}
|
|
37
|
-
}
|
package/src/commands/phase.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from "@oclif/core";
|
|
2
|
-
import { BaseCommand } from "./base.js";
|
|
3
|
-
|
|
4
|
-
export class PhaseNextDecimalCommand extends BaseCommand {
|
|
5
|
-
static override description = "Get next decimal phase number";
|
|
6
|
-
static override args = { phase: Args.string({ required: true }) };
|
|
7
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
8
|
-
|
|
9
|
-
async run() {
|
|
10
|
-
const { flags, args } = await this.parse(PhaseNextDecimalCommand);
|
|
11
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
12
|
-
const phase = await import("../lib/phase.js");
|
|
13
|
-
phase.cmdPhaseNextDecimal(cwd, args.phase, raw);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export class PhaseAddCommand extends BaseCommand {
|
|
18
|
-
static override description = "Add a new phase";
|
|
19
|
-
static override flags = {
|
|
20
|
-
...BaseCommand.baseFlags,
|
|
21
|
-
id: Flags.string({ description: "Custom phase ID" }),
|
|
22
|
-
};
|
|
23
|
-
static override strict = false;
|
|
24
|
-
|
|
25
|
-
async run() {
|
|
26
|
-
const { flags, argv } = await this.parse(PhaseAddCommand);
|
|
27
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
28
|
-
const phase = await import("../lib/phase.js");
|
|
29
|
-
const desc = (argv as string[]).join(" ");
|
|
30
|
-
phase.cmdPhaseAdd(cwd, desc, raw, flags.id ?? null);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export class PhaseInsertCommand extends BaseCommand {
|
|
35
|
-
static override description = "Insert a phase at position";
|
|
36
|
-
static override args = {
|
|
37
|
-
position: Args.string({ required: true }),
|
|
38
|
-
description: Args.string({ required: false }),
|
|
39
|
-
};
|
|
40
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
41
|
-
static override strict = false;
|
|
42
|
-
|
|
43
|
-
async run() {
|
|
44
|
-
const { flags, argv } = await this.parse(PhaseInsertCommand);
|
|
45
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
46
|
-
const rawArgv = argv as string[];
|
|
47
|
-
const phase = await import("../lib/phase.js");
|
|
48
|
-
phase.cmdPhaseInsert(cwd, rawArgv[0], rawArgv.slice(1).join(" "), raw);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export class PhaseRemoveCommand extends BaseCommand {
|
|
53
|
-
static override description = "Remove a phase";
|
|
54
|
-
static override args = { phase: Args.string({ required: true }) };
|
|
55
|
-
static override flags = {
|
|
56
|
-
...BaseCommand.baseFlags,
|
|
57
|
-
force: Flags.boolean({ description: "Force removal", default: false }),
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
async run() {
|
|
61
|
-
const { flags, args } = await this.parse(PhaseRemoveCommand);
|
|
62
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
63
|
-
const phase = await import("../lib/phase.js");
|
|
64
|
-
phase.cmdPhaseRemove(cwd, args.phase, { force: flags.force }, raw);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export class PhaseCompleteCommand extends BaseCommand {
|
|
69
|
-
static override description = "Mark a phase as complete";
|
|
70
|
-
static override args = { phase: Args.string({ required: true }) };
|
|
71
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
72
|
-
|
|
73
|
-
async run() {
|
|
74
|
-
const { flags, args } = await this.parse(PhaseCompleteCommand);
|
|
75
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
76
|
-
const phase = await import("../lib/phase.js");
|
|
77
|
-
phase.cmdPhaseComplete(cwd, args.phase, raw);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export class PhasePlanIndexCommand extends BaseCommand {
|
|
82
|
-
static override description = "Get phase plan index";
|
|
83
|
-
static override args = { phase: Args.string({ required: true }) };
|
|
84
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
85
|
-
|
|
86
|
-
async run() {
|
|
87
|
-
const { flags, args } = await this.parse(PhasePlanIndexCommand);
|
|
88
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
89
|
-
const { cmdPhasePlanIndex } = await import("../lib/phase.js");
|
|
90
|
-
cmdPhasePlanIndex(cwd, args.phase, raw);
|
|
91
|
-
}
|
|
92
|
-
}
|
package/src/commands/progress.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Args } from "@oclif/core";
|
|
2
|
-
import { BaseCommand } from "./base.js";
|
|
3
|
-
|
|
4
|
-
export class ProgressCommand extends BaseCommand {
|
|
5
|
-
static override description = "Show project progress";
|
|
6
|
-
static override args = { format: Args.string({ default: "json" }) };
|
|
7
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
8
|
-
|
|
9
|
-
async run() {
|
|
10
|
-
const { flags, args } = await this.parse(ProgressCommand);
|
|
11
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
12
|
-
const { cmdProgressRender } = await import("../lib/commands.js");
|
|
13
|
-
cmdProgressRender(cwd, args.format, raw);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export class StatsCommand extends BaseCommand {
|
|
18
|
-
static override description = "Show project statistics";
|
|
19
|
-
static override args = { format: Args.string({ default: "json" }) };
|
|
20
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
21
|
-
|
|
22
|
-
async run() {
|
|
23
|
-
const { flags, args } = await this.parse(StatsCommand);
|
|
24
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
25
|
-
const { cmdStats } = await import("../lib/commands.js");
|
|
26
|
-
cmdStats(cwd, args.format, raw);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export class TodoCompleteCommand extends BaseCommand {
|
|
31
|
-
static override description = "Mark a todo as complete";
|
|
32
|
-
static override args = { id: Args.string({ required: true }) };
|
|
33
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
34
|
-
|
|
35
|
-
async run() {
|
|
36
|
-
const { flags, args } = await this.parse(TodoCompleteCommand);
|
|
37
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
38
|
-
const { cmdTodoComplete } = await import("../lib/commands.js");
|
|
39
|
-
cmdTodoComplete(cwd, args.id, raw);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export class TodoMatchPhaseCommand extends BaseCommand {
|
|
44
|
-
static override description = "Match todos to phase";
|
|
45
|
-
static override args = { phase: Args.string({ required: true }) };
|
|
46
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
47
|
-
|
|
48
|
-
async run() {
|
|
49
|
-
const { flags, args } = await this.parse(TodoMatchPhaseCommand);
|
|
50
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
51
|
-
const { cmdTodoMatchPhase } = await import("../lib/commands.js");
|
|
52
|
-
cmdTodoMatchPhase(cwd, args.phase, raw);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export class SummaryExtractCommand extends BaseCommand {
|
|
57
|
-
static override description = "Extract fields from summary files";
|
|
58
|
-
static override args = { phase: Args.string({ required: true }) };
|
|
59
|
-
static override flags = {
|
|
60
|
-
...BaseCommand.baseFlags,
|
|
61
|
-
fields: BaseCommand.baseFlags.pick, // reuse pick flag for field list
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
async run() {
|
|
65
|
-
const { flags, args } = await this.parse(SummaryExtractCommand);
|
|
66
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
67
|
-
const { cmdSummaryExtract } = await import("../lib/commands.js");
|
|
68
|
-
const fields = flags.fields ? flags.fields.split(",") : null;
|
|
69
|
-
cmdSummaryExtract(cwd, args.phase, fields, raw);
|
|
70
|
-
}
|
|
71
|
-
}
|
package/src/commands/roadmap.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Args } from "@oclif/core";
|
|
2
|
-
import { BaseCommand } from "./base.js";
|
|
3
|
-
|
|
4
|
-
export class RoadmapAnalyzeCommand extends BaseCommand {
|
|
5
|
-
static override description = "Analyze roadmap phases and status";
|
|
6
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
7
|
-
|
|
8
|
-
async run() {
|
|
9
|
-
const { flags } = await this.parse(RoadmapAnalyzeCommand);
|
|
10
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
11
|
-
const roadmap = await import("../lib/roadmap.js");
|
|
12
|
-
roadmap.cmdRoadmapAnalyze(cwd, raw);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export class RoadmapGetPhaseCommand extends BaseCommand {
|
|
17
|
-
static override description = "Get details for a specific phase";
|
|
18
|
-
static override args = { phase: Args.string({ required: true }) };
|
|
19
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
20
|
-
|
|
21
|
-
async run() {
|
|
22
|
-
const { flags, args } = await this.parse(RoadmapGetPhaseCommand);
|
|
23
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
24
|
-
const roadmap = await import("../lib/roadmap.js");
|
|
25
|
-
roadmap.cmdRoadmapGetPhase(cwd, args.phase, raw);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export class RoadmapUpdatePlanProgressCommand extends BaseCommand {
|
|
30
|
-
static override description = "Update plan progress in roadmap";
|
|
31
|
-
static override args = { phase: Args.string({ required: true }) };
|
|
32
|
-
static override flags = { ...BaseCommand.baseFlags };
|
|
33
|
-
|
|
34
|
-
async run() {
|
|
35
|
-
const { flags, args } = await this.parse(RoadmapUpdatePlanProgressCommand);
|
|
36
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
37
|
-
const roadmap = await import("../lib/roadmap.js");
|
|
38
|
-
roadmap.cmdRoadmapUpdatePlanProgress(cwd, args.phase, raw);
|
|
39
|
-
}
|
|
40
|
-
}
|
package/src/commands/scaffold.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from "@oclif/core";
|
|
2
|
-
import { BaseCommand } from "./base.js";
|
|
3
|
-
|
|
4
|
-
export class ScaffoldCommand extends BaseCommand {
|
|
5
|
-
static override description = "Scaffold a GSD artefact";
|
|
6
|
-
static override args = { type: Args.string({ required: true }) };
|
|
7
|
-
static override flags = {
|
|
8
|
-
...BaseCommand.baseFlags,
|
|
9
|
-
phase: Flags.string({ description: "Phase number" }),
|
|
10
|
-
name: Flags.string({ description: "Artefact name" }),
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
async run() {
|
|
14
|
-
const { flags, args } = await this.parse(ScaffoldCommand);
|
|
15
|
-
const { cwd, raw } = this.resolveContext(flags);
|
|
16
|
-
const { cmdScaffold } = await import("../lib/commands.js");
|
|
17
|
-
cmdScaffold(cwd, args.type, { phase: flags.phase ?? null, name: flags.name ?? null }, raw);
|
|
18
|
-
}
|
|
19
|
-
}
|