workflow-agent-cli 2.4.3 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -15
- package/dist/{chunk-WXXFUPYO.js → chunk-6NWQLGHI.js} +3 -1
- package/dist/{chunk-RDVTKGQV.js → chunk-DEAF7P4L.js} +36 -2
- package/dist/chunk-DEAF7P4L.js.map +1 -0
- package/dist/chunk-HKRWHFVI.js +415 -0
- package/dist/chunk-HKRWHFVI.js.map +1 -0
- package/dist/cli/index.js +3308 -468
- package/dist/cli/index.js.map +1 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{schema-OJg7YAI_.d.ts → schema-D0zTM83x.d.ts} +111 -0
- package/dist/scripts/postinstall.js +51 -71
- package/dist/scripts/postinstall.js.map +1 -1
- package/dist/validators/index.d.ts +1 -1
- package/package.json +34 -2
- package/templates/PATTERN_ANALYSIS_WORKFLOW.md +72 -55
- package/dist/chunk-RDVTKGQV.js.map +0 -1
- /package/dist/{chunk-WXXFUPYO.js.map → chunk-6NWQLGHI.js.map} +0 -0
package/dist/config/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WorkflowConfig } from '../schema-
|
|
2
|
-
export { B as BranchType, C as ConventionalType, S as Scope, a as WorkflowConfigSchema } from '../schema-
|
|
1
|
+
import { W as WorkflowConfig } from '../schema-D0zTM83x.js';
|
|
2
|
+
export { B as BranchType, C as ConventionalType, S as Scope, a as WorkflowConfigSchema } from '../schema-D0zTM83x.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
declare function loadConfig(cwd?: string): Promise<WorkflowConfig | null>;
|
package/dist/config/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { hasConfig, loadConfig } from './config/index.js';
|
|
2
2
|
export { ValidationResult, discoverCustomScopes, getAllScopes, invalidateCustomScopesCache, validateBranchName, validateCommitMessage, validatePRTitle } from './validators/index.js';
|
|
3
|
-
export { B as BranchType, C as ConventionalType, S as Scope, W as WorkflowConfig, a as WorkflowConfigSchema } from './schema-
|
|
3
|
+
export { B as BranchType, C as ConventionalType, S as Scope, W as WorkflowConfig, a as WorkflowConfigSchema } from './schema-D0zTM83x.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
interface CheckDefinition {
|
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
runAllSetups,
|
|
10
10
|
runCheck,
|
|
11
11
|
stageAllChanges
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6NWQLGHI.js";
|
|
13
13
|
import {
|
|
14
14
|
discoverCustomScopes,
|
|
15
15
|
getAllScopes,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
WorkflowConfigSchema,
|
|
23
23
|
hasConfig,
|
|
24
24
|
loadConfig
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-DEAF7P4L.js";
|
|
26
26
|
export {
|
|
27
27
|
QUALITY_CHECKS,
|
|
28
28
|
WorkflowConfigSchema,
|
|
@@ -100,6 +100,79 @@ declare const WorkflowConfigSchema: z.ZodObject<{
|
|
|
100
100
|
additionalMandatory?: string[] | undefined;
|
|
101
101
|
optionalOverrides?: string[] | undefined;
|
|
102
102
|
}>>;
|
|
103
|
+
advisory: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
105
|
+
defaultDepth: z.ZodDefault<z.ZodEnum<["executive", "quick", "standard", "comprehensive"]>>;
|
|
106
|
+
outputDir: z.ZodDefault<z.ZodString>;
|
|
107
|
+
customQuestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
108
|
+
category: z.ZodString;
|
|
109
|
+
question: z.ZodString;
|
|
110
|
+
context: z.ZodOptional<z.ZodString>;
|
|
111
|
+
priority: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
category: string;
|
|
114
|
+
question: string;
|
|
115
|
+
context?: string | undefined;
|
|
116
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
117
|
+
}, {
|
|
118
|
+
category: string;
|
|
119
|
+
question: string;
|
|
120
|
+
context?: string | undefined;
|
|
121
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
122
|
+
}>, "many">>;
|
|
123
|
+
riskThresholds: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
high: z.ZodDefault<z.ZodNumber>;
|
|
125
|
+
medium: z.ZodDefault<z.ZodNumber>;
|
|
126
|
+
low: z.ZodDefault<z.ZodNumber>;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
high: number;
|
|
129
|
+
medium: number;
|
|
130
|
+
low: number;
|
|
131
|
+
}, {
|
|
132
|
+
high?: number | undefined;
|
|
133
|
+
medium?: number | undefined;
|
|
134
|
+
low?: number | undefined;
|
|
135
|
+
}>>;
|
|
136
|
+
categories: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
137
|
+
excludePatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
138
|
+
includeHealthMetrics: z.ZodDefault<z.ZodBoolean>;
|
|
139
|
+
}, "strip", z.ZodTypeAny, {
|
|
140
|
+
enabled: boolean;
|
|
141
|
+
defaultDepth: "executive" | "quick" | "standard" | "comprehensive";
|
|
142
|
+
outputDir: string;
|
|
143
|
+
categories: string[];
|
|
144
|
+
includeHealthMetrics: boolean;
|
|
145
|
+
customQuestions?: {
|
|
146
|
+
category: string;
|
|
147
|
+
question: string;
|
|
148
|
+
context?: string | undefined;
|
|
149
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
150
|
+
}[] | undefined;
|
|
151
|
+
riskThresholds?: {
|
|
152
|
+
high: number;
|
|
153
|
+
medium: number;
|
|
154
|
+
low: number;
|
|
155
|
+
} | undefined;
|
|
156
|
+
excludePatterns?: string[] | undefined;
|
|
157
|
+
}, {
|
|
158
|
+
enabled?: boolean | undefined;
|
|
159
|
+
defaultDepth?: "executive" | "quick" | "standard" | "comprehensive" | undefined;
|
|
160
|
+
outputDir?: string | undefined;
|
|
161
|
+
customQuestions?: {
|
|
162
|
+
category: string;
|
|
163
|
+
question: string;
|
|
164
|
+
context?: string | undefined;
|
|
165
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
166
|
+
}[] | undefined;
|
|
167
|
+
riskThresholds?: {
|
|
168
|
+
high?: number | undefined;
|
|
169
|
+
medium?: number | undefined;
|
|
170
|
+
low?: number | undefined;
|
|
171
|
+
} | undefined;
|
|
172
|
+
categories?: string[] | undefined;
|
|
173
|
+
excludePatterns?: string[] | undefined;
|
|
174
|
+
includeHealthMetrics?: boolean | undefined;
|
|
175
|
+
}>>;
|
|
103
176
|
}, "strip", z.ZodTypeAny, {
|
|
104
177
|
projectName: string;
|
|
105
178
|
scopes: {
|
|
@@ -116,6 +189,25 @@ declare const WorkflowConfigSchema: z.ZodObject<{
|
|
|
116
189
|
nodeVersions?: string[] | undefined;
|
|
117
190
|
checks?: ("build" | "test" | "lint" | "typecheck" | "format")[] | undefined;
|
|
118
191
|
} | undefined;
|
|
192
|
+
advisory?: {
|
|
193
|
+
enabled: boolean;
|
|
194
|
+
defaultDepth: "executive" | "quick" | "standard" | "comprehensive";
|
|
195
|
+
outputDir: string;
|
|
196
|
+
categories: string[];
|
|
197
|
+
includeHealthMetrics: boolean;
|
|
198
|
+
customQuestions?: {
|
|
199
|
+
category: string;
|
|
200
|
+
question: string;
|
|
201
|
+
context?: string | undefined;
|
|
202
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
203
|
+
}[] | undefined;
|
|
204
|
+
riskThresholds?: {
|
|
205
|
+
high: number;
|
|
206
|
+
medium: number;
|
|
207
|
+
low: number;
|
|
208
|
+
} | undefined;
|
|
209
|
+
excludePatterns?: string[] | undefined;
|
|
210
|
+
} | undefined;
|
|
119
211
|
branchTypes?: ("test" | "docs" | "feature" | "bugfix" | "hotfix" | "chore" | "refactor" | "release")[] | undefined;
|
|
120
212
|
conventionalTypes?: ("build" | "test" | "docs" | "ci" | "chore" | "refactor" | "feat" | "fix" | "perf" | "style" | "revert")[] | undefined;
|
|
121
213
|
analytics?: {
|
|
@@ -150,6 +242,25 @@ declare const WorkflowConfigSchema: z.ZodObject<{
|
|
|
150
242
|
defaultBranch?: string | undefined;
|
|
151
243
|
checks?: ("build" | "test" | "lint" | "typecheck" | "format")[] | undefined;
|
|
152
244
|
} | undefined;
|
|
245
|
+
advisory?: {
|
|
246
|
+
enabled?: boolean | undefined;
|
|
247
|
+
defaultDepth?: "executive" | "quick" | "standard" | "comprehensive" | undefined;
|
|
248
|
+
outputDir?: string | undefined;
|
|
249
|
+
customQuestions?: {
|
|
250
|
+
category: string;
|
|
251
|
+
question: string;
|
|
252
|
+
context?: string | undefined;
|
|
253
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
254
|
+
}[] | undefined;
|
|
255
|
+
riskThresholds?: {
|
|
256
|
+
high?: number | undefined;
|
|
257
|
+
medium?: number | undefined;
|
|
258
|
+
low?: number | undefined;
|
|
259
|
+
} | undefined;
|
|
260
|
+
categories?: string[] | undefined;
|
|
261
|
+
excludePatterns?: string[] | undefined;
|
|
262
|
+
includeHealthMetrics?: boolean | undefined;
|
|
263
|
+
} | undefined;
|
|
153
264
|
branchTypes?: ("test" | "docs" | "feature" | "bugfix" | "hotfix" | "chore" | "refactor" | "release")[] | undefined;
|
|
154
265
|
conventionalTypes?: ("build" | "test" | "docs" | "ci" | "chore" | "refactor" | "feat" | "fix" | "perf" | "style" | "revert")[] | undefined;
|
|
155
266
|
enforcement?: "strict" | "advisory" | "learning" | undefined;
|
|
@@ -1,45 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
SCRIPT_CATEGORIES,
|
|
4
|
+
TOTAL_SCRIPTS,
|
|
5
|
+
WORKFLOW_SCRIPTS,
|
|
6
|
+
generateCopilotInstructions
|
|
7
|
+
} from "../chunk-HKRWHFVI.js";
|
|
2
8
|
|
|
3
9
|
// src/scripts/postinstall.ts
|
|
4
10
|
import { readFileSync, writeFileSync, existsSync } from "fs";
|
|
5
11
|
import { join } from "path";
|
|
6
|
-
var WORKFLOW_SCRIPTS = {
|
|
7
|
-
// Core Commands
|
|
8
|
-
"workflow:init": "workflow-agent init",
|
|
9
|
-
"workflow:validate": "workflow-agent validate",
|
|
10
|
-
"workflow:config": "workflow-agent config",
|
|
11
|
-
"workflow:suggest": "workflow-agent suggest",
|
|
12
|
-
"workflow:setup": "workflow-agent setup",
|
|
13
|
-
"workflow:doctor": "workflow-agent doctor",
|
|
14
|
-
// Scope Commands
|
|
15
|
-
"workflow:scope:create": "workflow-agent scope:create",
|
|
16
|
-
"workflow:scope:migrate": "workflow-agent scope:migrate",
|
|
17
|
-
// Verification & Auto-Setup
|
|
18
|
-
"workflow:verify": "workflow-agent verify",
|
|
19
|
-
"workflow:verify:fix": "workflow-agent verify --fix",
|
|
20
|
-
"workflow:auto-setup": "workflow-agent auto-setup",
|
|
21
|
-
// Learning System Commands
|
|
22
|
-
"workflow:learn:record": "workflow-agent learn:record",
|
|
23
|
-
"workflow:learn:list": "workflow-agent learn:list",
|
|
24
|
-
"workflow:learn:apply": "workflow-agent learn:apply",
|
|
25
|
-
"workflow:learn:sync": "workflow-agent learn:sync",
|
|
26
|
-
"workflow:learn:config": "workflow-agent learn:config",
|
|
27
|
-
"workflow:learn:deprecate": "workflow-agent learn:deprecate",
|
|
28
|
-
"workflow:learn:stats": "workflow-agent learn:stats",
|
|
29
|
-
// Solution Pattern Commands
|
|
30
|
-
"workflow:solution:capture": "workflow-agent solution:capture",
|
|
31
|
-
"workflow:solution:search": "workflow-agent solution:search",
|
|
32
|
-
"workflow:solution:list": "workflow-agent solution:list",
|
|
33
|
-
"workflow:solution:apply": "workflow-agent solution:apply",
|
|
34
|
-
"workflow:solution:deprecate": "workflow-agent solution:deprecate",
|
|
35
|
-
"workflow:solution:stats": "workflow-agent solution:stats"
|
|
36
|
-
};
|
|
37
12
|
function isGlobalInstall() {
|
|
38
13
|
const installPath = process.env.npm_config_global;
|
|
39
14
|
return installPath === "true";
|
|
40
15
|
}
|
|
41
16
|
function findProjectRoot() {
|
|
42
|
-
|
|
17
|
+
const currentDir = process.cwd();
|
|
43
18
|
if (currentDir.includes("node_modules")) {
|
|
44
19
|
const parts = currentDir.split("node_modules");
|
|
45
20
|
if (parts.length > 0 && parts[0]) {
|
|
@@ -66,61 +41,66 @@ function addScriptsToPackageJson() {
|
|
|
66
41
|
if (!packageJson.scripts) {
|
|
67
42
|
packageJson.scripts = {};
|
|
68
43
|
}
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
);
|
|
72
|
-
if (hasWorkflowScripts) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
let addedCount = 0;
|
|
44
|
+
const addedScripts = [];
|
|
45
|
+
const updatedScripts = [];
|
|
76
46
|
for (const [scriptName, scriptCommand] of Object.entries(
|
|
77
47
|
WORKFLOW_SCRIPTS
|
|
78
48
|
)) {
|
|
79
49
|
if (!packageJson.scripts[scriptName]) {
|
|
80
50
|
packageJson.scripts[scriptName] = scriptCommand;
|
|
81
|
-
|
|
51
|
+
addedScripts.push(scriptName);
|
|
52
|
+
} else if (packageJson.scripts[scriptName] !== scriptCommand) {
|
|
53
|
+
packageJson.scripts[scriptName] = scriptCommand;
|
|
54
|
+
updatedScripts.push(scriptName);
|
|
82
55
|
}
|
|
83
56
|
}
|
|
84
|
-
|
|
57
|
+
const totalChanges = addedScripts.length + updatedScripts.length;
|
|
58
|
+
if (totalChanges > 0) {
|
|
85
59
|
writeFileSync(
|
|
86
60
|
packageJsonPath,
|
|
87
61
|
JSON.stringify(packageJson, null, 2) + "\n",
|
|
88
62
|
"utf-8"
|
|
89
63
|
);
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
console.log(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
console.log(
|
|
112
|
-
|
|
113
|
-
console.log("\n Solution Patterns:");
|
|
114
|
-
console.log(" - workflow:solution:capture");
|
|
115
|
-
console.log(" - workflow:solution:search");
|
|
116
|
-
console.log(" - workflow:solution:list");
|
|
117
|
-
console.log(" - workflow:solution:apply");
|
|
118
|
-
console.log(" - workflow:solution:deprecate");
|
|
119
|
-
console.log(" - workflow:solution:stats");
|
|
64
|
+
const summaryParts = [];
|
|
65
|
+
if (addedScripts.length > 0) {
|
|
66
|
+
summaryParts.push(`${addedScripts.length} new`);
|
|
67
|
+
}
|
|
68
|
+
if (updatedScripts.length > 0) {
|
|
69
|
+
summaryParts.push(`${updatedScripts.length} updated`);
|
|
70
|
+
}
|
|
71
|
+
console.log(
|
|
72
|
+
`
|
|
73
|
+
\u2713 Workflow scripts configured in package.json (${summaryParts.join(", ")}):`
|
|
74
|
+
);
|
|
75
|
+
for (const [category, scripts] of Object.entries(SCRIPT_CATEGORIES)) {
|
|
76
|
+
console.log(`
|
|
77
|
+
${category}:`);
|
|
78
|
+
for (const script of scripts) {
|
|
79
|
+
const isNew = addedScripts.includes(script);
|
|
80
|
+
const isUpdated = updatedScripts.includes(script);
|
|
81
|
+
const marker = isNew ? " (new)" : isUpdated ? " (updated)" : "";
|
|
82
|
+
console.log(` - ${script}${marker}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
console.log(`
|
|
86
|
+
Total: ${TOTAL_SCRIPTS} scripts available`);
|
|
120
87
|
console.log(
|
|
121
88
|
"\nRun them with: npm run workflow:init (or pnpm run workflow:init)\n"
|
|
122
89
|
);
|
|
123
90
|
}
|
|
91
|
+
const guidelinesDir = join(projectRoot, "guidelines");
|
|
92
|
+
if (existsSync(guidelinesDir)) {
|
|
93
|
+
const result = generateCopilotInstructions(projectRoot, { silent: true });
|
|
94
|
+
if (result.success) {
|
|
95
|
+
const status = result.isNew ? "Generated" : "Updated";
|
|
96
|
+
console.log(
|
|
97
|
+
`\u2713 ${status} .github/copilot-instructions.md from ${result.guidelinesCount} guidelines`
|
|
98
|
+
);
|
|
99
|
+
if (result.preservedCustomContent) {
|
|
100
|
+
console.log(" (Custom content preserved)");
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
124
104
|
} catch (error) {
|
|
125
105
|
}
|
|
126
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/scripts/postinstall.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * Post-install script that automatically adds workflow scripts to package.json\n * when installed as a local dependency (not global)
|
|
1
|
+
{"version":3,"sources":["../../src/scripts/postinstall.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * Post-install script that automatically adds workflow scripts to package.json\n * when installed as a local dependency (not global).\n *\n * On package update, this will also add any new scripts that were added in newer versions.\n */\n\nimport { readFileSync, writeFileSync, existsSync } from \"fs\";\nimport { join } from \"path\";\nimport {\n WORKFLOW_SCRIPTS,\n SCRIPT_CATEGORIES,\n TOTAL_SCRIPTS,\n} from \"./workflow-scripts.js\";\nimport { generateCopilotInstructions } from \"./copilot-instructions-generator.js\";\n\nfunction isGlobalInstall(): boolean {\n // Check if we're being installed globally\n const installPath = process.env.npm_config_global;\n return installPath === \"true\";\n}\n\nfunction findProjectRoot(): string | null {\n // When installed as a dependency, npm/pnpm runs postinstall from the package directory\n // which is inside node_modules/@hawkinside_out/workflow-agent\n // We need to find the project root (the directory containing node_modules)\n\n const currentDir = process.cwd();\n\n // Check if we're inside node_modules\n if (currentDir.includes(\"node_modules\")) {\n // Split on 'node_modules' and take everything before it\n // This handles both node_modules/@scope/package and node_modules/package\n const parts = currentDir.split(\"node_modules\");\n if (parts.length > 0 && parts[0]) {\n // Remove trailing slash\n return parts[0].replace(/\\/$/, \"\");\n }\n }\n\n // If not in node_modules, we're probably in a monorepo workspace during development\n // Don't modify package.json in this case\n return null;\n}\n\nfunction addScriptsToPackageJson(): void {\n try {\n // Don't run for global installs\n if (isGlobalInstall()) {\n return;\n }\n\n const projectRoot = findProjectRoot();\n if (!projectRoot) {\n return;\n }\n\n const packageJsonPath = join(projectRoot, \"package.json\");\n\n if (!existsSync(packageJsonPath)) {\n return;\n }\n\n // Read existing package.json\n const packageJsonContent = readFileSync(packageJsonPath, \"utf-8\");\n const packageJson = JSON.parse(packageJsonContent);\n\n // Initialize scripts object if it doesn't exist\n if (!packageJson.scripts) {\n packageJson.scripts = {};\n }\n\n // Track added and updated scripts separately\n const addedScripts: string[] = [];\n const updatedScripts: string[] = [];\n\n // Always add/update all workflow scripts (ensures updates get new scripts)\n for (const [scriptName, scriptCommand] of Object.entries(\n WORKFLOW_SCRIPTS,\n )) {\n if (!packageJson.scripts[scriptName]) {\n // Script doesn't exist - add it\n packageJson.scripts[scriptName] = scriptCommand;\n addedScripts.push(scriptName);\n } else if (packageJson.scripts[scriptName] !== scriptCommand) {\n // Script exists but has different value - update it\n packageJson.scripts[scriptName] = scriptCommand;\n updatedScripts.push(scriptName);\n }\n // If script exists with same value, do nothing (already up to date)\n }\n\n const totalChanges = addedScripts.length + updatedScripts.length;\n\n if (totalChanges > 0) {\n // Write back to package.json with proper formatting\n writeFileSync(\n packageJsonPath,\n JSON.stringify(packageJson, null, 2) + \"\\n\",\n \"utf-8\",\n );\n\n // Build summary message\n const summaryParts: string[] = [];\n if (addedScripts.length > 0) {\n summaryParts.push(`${addedScripts.length} new`);\n }\n if (updatedScripts.length > 0) {\n summaryParts.push(`${updatedScripts.length} updated`);\n }\n\n console.log(\n `\\n✓ Workflow scripts configured in package.json (${summaryParts.join(\", \")}):`,\n );\n\n // Display scripts by category\n for (const [category, scripts] of Object.entries(SCRIPT_CATEGORIES)) {\n console.log(`\\n ${category}:`);\n for (const script of scripts) {\n const isNew = addedScripts.includes(script);\n const isUpdated = updatedScripts.includes(script);\n const marker = isNew ? \" (new)\" : isUpdated ? \" (updated)\" : \"\";\n console.log(` - ${script}${marker}`);\n }\n }\n\n console.log(`\\n Total: ${TOTAL_SCRIPTS} scripts available`);\n console.log(\n \"\\nRun them with: npm run workflow:init (or pnpm run workflow:init)\\n\",\n );\n }\n\n // Generate .github/copilot-instructions.md if guidelines exist\n const guidelinesDir = join(projectRoot, \"guidelines\");\n if (existsSync(guidelinesDir)) {\n const result = generateCopilotInstructions(projectRoot, { silent: true });\n if (result.success) {\n const status = result.isNew ? \"Generated\" : \"Updated\";\n console.log(\n `✓ ${status} .github/copilot-instructions.md from ${result.guidelinesCount} guidelines`,\n );\n if (result.preservedCustomContent) {\n console.log(\" (Custom content preserved)\");\n }\n }\n }\n } catch (error) {\n // Silently fail - this is a nice-to-have feature\n // We don't want to break the installation if something goes wrong\n }\n}\n\n// Run the script\naddScriptsToPackageJson();\n"],"mappings":"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","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workflow-agent-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "A self-evolving workflow management system for AI agent development",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"workflow",
|
|
@@ -50,7 +50,39 @@
|
|
|
50
50
|
"typecheck": "tsc --noEmit",
|
|
51
51
|
"clean": "rm -rf dist",
|
|
52
52
|
"postinstall": "node dist/scripts/postinstall.js || true",
|
|
53
|
-
"prepublishOnly": "pnpm build && pnpm test"
|
|
53
|
+
"prepublishOnly": "pnpm build && pnpm test",
|
|
54
|
+
"workflow": "node dist/cli/index.js",
|
|
55
|
+
"workflow:init": "node dist/cli/index.js init",
|
|
56
|
+
"workflow:validate": "node dist/cli/index.js validate",
|
|
57
|
+
"workflow:doctor": "node dist/cli/index.js doctor",
|
|
58
|
+
"workflow:verify": "node dist/cli/index.js verify",
|
|
59
|
+
"workflow:setup": "node dist/cli/index.js setup",
|
|
60
|
+
"workflow:suggest": "node dist/cli/index.js suggest",
|
|
61
|
+
"workflow:config": "node dist/cli/index.js config",
|
|
62
|
+
"workflow:auto-setup": "node dist/cli/index.js auto-setup",
|
|
63
|
+
"advisory": "node dist/cli/index.js advisory",
|
|
64
|
+
"advisory:quick": "node dist/cli/index.js advisory --depth quick",
|
|
65
|
+
"advisory:standard": "node dist/cli/index.js advisory --depth standard",
|
|
66
|
+
"advisory:comprehensive": "node dist/cli/index.js advisory --depth comprehensive",
|
|
67
|
+
"advisory:executive": "node dist/cli/index.js advisory --depth executive",
|
|
68
|
+
"advisory:ci": "node dist/cli/index.js advisory --ci",
|
|
69
|
+
"learn": "node dist/cli/index.js learn:list",
|
|
70
|
+
"learn:record": "node dist/cli/index.js learn:record",
|
|
71
|
+
"learn:list": "node dist/cli/index.js learn:list",
|
|
72
|
+
"learn:apply": "node dist/cli/index.js learn:apply",
|
|
73
|
+
"learn:sync": "node dist/cli/index.js learn:sync",
|
|
74
|
+
"learn:config": "node dist/cli/index.js learn:config",
|
|
75
|
+
"learn:deprecate": "node dist/cli/index.js learn:deprecate",
|
|
76
|
+
"learn:stats": "node dist/cli/index.js learn:stats",
|
|
77
|
+
"solution": "node dist/cli/index.js solution:list",
|
|
78
|
+
"solution:capture": "node dist/cli/index.js solution:capture",
|
|
79
|
+
"solution:search": "node dist/cli/index.js solution:search",
|
|
80
|
+
"solution:list": "node dist/cli/index.js solution:list",
|
|
81
|
+
"solution:apply": "node dist/cli/index.js solution:apply",
|
|
82
|
+
"solution:deprecate": "node dist/cli/index.js solution:deprecate",
|
|
83
|
+
"solution:stats": "node dist/cli/index.js solution:stats",
|
|
84
|
+
"scope:create": "node dist/cli/index.js scope:create",
|
|
85
|
+
"scope:migrate": "node dist/cli/index.js scope:migrate"
|
|
54
86
|
},
|
|
55
87
|
"dependencies": {
|
|
56
88
|
"@clack/prompts": "^0.7.0",
|