cxg-workflow 0.1.2
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/LICENSE +21 -0
- package/README.md +266 -0
- package/README.zh-CN.md +266 -0
- package/bin/cxg.mjs +2 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.mjs +47 -0
- package/dist/index.d.mts +133 -0
- package/dist/index.d.ts +133 -0
- package/dist/index.mjs +6 -0
- package/dist/shared/cxg-workflow.BdjkxkKP.mjs +701 -0
- package/package.json +68 -0
- package/templates/prompts/cxg-analyze.md +94 -0
- package/templates/prompts/cxg-commit.md +88 -0
- package/templates/prompts/cxg-debug.md +111 -0
- package/templates/prompts/cxg-enhance.md +83 -0
- package/templates/prompts/cxg-execute.md +74 -0
- package/templates/prompts/cxg-feat.md +85 -0
- package/templates/prompts/cxg-init.md +96 -0
- package/templates/prompts/cxg-optimize.md +88 -0
- package/templates/prompts/cxg-plan.md +116 -0
- package/templates/prompts/cxg-review.md +99 -0
- package/templates/prompts/cxg-test.md +72 -0
- package/templates/prompts/cxg-workflow.md +154 -0
- package/templates/roles/codex/analyzer.md +50 -0
- package/templates/roles/codex/architect.md +46 -0
- package/templates/roles/codex/reviewer.md +70 -0
- package/templates/skills/cxg/analyze/SKILL.md +60 -0
- package/templates/skills/cxg/commit/SKILL.md +53 -0
- package/templates/skills/cxg/debug/SKILL.md +63 -0
- package/templates/skills/cxg/enhance/SKILL.md +42 -0
- package/templates/skills/cxg/execute/SKILL.md +51 -0
- package/templates/skills/cxg/feat/SKILL.md +62 -0
- package/templates/skills/cxg/init/SKILL.md +44 -0
- package/templates/skills/cxg/optimize/SKILL.md +59 -0
- package/templates/skills/cxg/plan/SKILL.md +70 -0
- package/templates/skills/cxg/review/SKILL.md +55 -0
- package/templates/skills/cxg/test/SKILL.md +44 -0
- package/templates/skills/cxg/workflow/SKILL.md +108 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
type McpProvider = 'skip' | 'ace-tool' | 'contextweaver';
|
|
2
|
+
interface CxgConfig {
|
|
3
|
+
general: {
|
|
4
|
+
version: string;
|
|
5
|
+
created_at: string;
|
|
6
|
+
};
|
|
7
|
+
runtime: {
|
|
8
|
+
backend: 'codex';
|
|
9
|
+
lite_mode: boolean;
|
|
10
|
+
};
|
|
11
|
+
paths: {
|
|
12
|
+
prompts: string;
|
|
13
|
+
skills: string;
|
|
14
|
+
roles: string;
|
|
15
|
+
wrapper: string;
|
|
16
|
+
};
|
|
17
|
+
commands: {
|
|
18
|
+
installed: string[];
|
|
19
|
+
};
|
|
20
|
+
mcp?: {
|
|
21
|
+
provider: McpProvider;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
interface InstallResult {
|
|
25
|
+
success: boolean;
|
|
26
|
+
installedPrompts: string[];
|
|
27
|
+
installedSkills: string[];
|
|
28
|
+
installedRoles: string[];
|
|
29
|
+
errors: string[];
|
|
30
|
+
binInstalled?: boolean;
|
|
31
|
+
binPath?: string;
|
|
32
|
+
}
|
|
33
|
+
interface UninstallResult {
|
|
34
|
+
success: boolean;
|
|
35
|
+
removedPrompts: string[];
|
|
36
|
+
removedSkills: string[];
|
|
37
|
+
removedRoles: string[];
|
|
38
|
+
removedBin: boolean;
|
|
39
|
+
errors: string[];
|
|
40
|
+
}
|
|
41
|
+
interface WorkflowConfig {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
nameEn: string;
|
|
45
|
+
category: 'core' | 'development' | 'quality' | 'delivery' | 'bootstrap';
|
|
46
|
+
description: string;
|
|
47
|
+
descriptionEn: string;
|
|
48
|
+
order: number;
|
|
49
|
+
}
|
|
50
|
+
interface AceToolConfig {
|
|
51
|
+
baseUrl?: string;
|
|
52
|
+
token?: string;
|
|
53
|
+
}
|
|
54
|
+
interface ContextWeaverConfig {
|
|
55
|
+
siliconflowApiKey: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface CliOptions {
|
|
59
|
+
force?: boolean;
|
|
60
|
+
lite?: boolean;
|
|
61
|
+
mcp?: string;
|
|
62
|
+
skipMcp?: boolean;
|
|
63
|
+
}
|
|
64
|
+
interface InitOptions extends CliOptions {
|
|
65
|
+
mcpProvider?: McpProvider;
|
|
66
|
+
liteMode?: boolean;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare function init(options?: InitOptions): Promise<void>;
|
|
70
|
+
|
|
71
|
+
declare function uninstall(): Promise<void>;
|
|
72
|
+
|
|
73
|
+
declare function doctor(): Promise<void>;
|
|
74
|
+
|
|
75
|
+
declare function getCodexHome(): string;
|
|
76
|
+
declare function getCxgDir(): string;
|
|
77
|
+
declare function getConfigPath(): string;
|
|
78
|
+
declare function readCxgConfig(): Promise<CxgConfig | null>;
|
|
79
|
+
declare function writeCxgConfig(config: CxgConfig): Promise<void>;
|
|
80
|
+
declare function createDefaultConfig(options?: {
|
|
81
|
+
mcpProvider?: McpProvider;
|
|
82
|
+
liteMode?: boolean;
|
|
83
|
+
}): CxgConfig;
|
|
84
|
+
|
|
85
|
+
declare function getWorkflowConfigs(): WorkflowConfig[];
|
|
86
|
+
declare function getAllCommandIds(): string[];
|
|
87
|
+
/**
|
|
88
|
+
* Install CXG workflow system to ~/.codex/
|
|
89
|
+
*
|
|
90
|
+
* Installs:
|
|
91
|
+
* - Custom Prompts to ~/.codex/prompts/cxg-*.md
|
|
92
|
+
* - Skills to ~/.codex/skills/cxg/* /SKILL.md
|
|
93
|
+
* - Role prompts to ~/.codex/.cxg/roles/codex/*.md
|
|
94
|
+
* - codeagent-wrapper binary to ~/.codex/bin/
|
|
95
|
+
* - Config to ~/.codex/.cxg/config.toml
|
|
96
|
+
*/
|
|
97
|
+
declare function installCxg(options?: {
|
|
98
|
+
force?: boolean;
|
|
99
|
+
liteMode?: boolean;
|
|
100
|
+
mcpProvider?: McpProvider;
|
|
101
|
+
}): Promise<InstallResult>;
|
|
102
|
+
/**
|
|
103
|
+
* Uninstall CXG workflow system from ~/.codex/
|
|
104
|
+
*/
|
|
105
|
+
declare function uninstallCxg(): Promise<UninstallResult>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Install ace-tool MCP server to Codex config.toml
|
|
109
|
+
*/
|
|
110
|
+
declare function installAceTool(config: AceToolConfig): Promise<{
|
|
111
|
+
success: boolean;
|
|
112
|
+
message: string;
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* Install ContextWeaver MCP server to Codex config.toml
|
|
116
|
+
*/
|
|
117
|
+
declare function installContextWeaver(config: ContextWeaverConfig): Promise<{
|
|
118
|
+
success: boolean;
|
|
119
|
+
message: string;
|
|
120
|
+
}>;
|
|
121
|
+
/**
|
|
122
|
+
* Uninstall an MCP server from Codex config.toml
|
|
123
|
+
*/
|
|
124
|
+
declare function uninstallMcpServer(id: string): Promise<{
|
|
125
|
+
success: boolean;
|
|
126
|
+
message: string;
|
|
127
|
+
}>;
|
|
128
|
+
|
|
129
|
+
declare const ALL_COMMANDS: readonly ["cxg-workflow", "cxg-plan", "cxg-execute", "cxg-feat", "cxg-analyze", "cxg-debug", "cxg-optimize", "cxg-test", "cxg-review", "cxg-enhance", "cxg-commit", "cxg-init"];
|
|
130
|
+
declare const WORKFLOW_CONFIGS: WorkflowConfig[];
|
|
131
|
+
|
|
132
|
+
export { ALL_COMMANDS, WORKFLOW_CONFIGS, createDefaultConfig, doctor, getAllCommandIds, getCodexHome, getConfigPath, getCxgDir, getWorkflowConfigs, init, installAceTool, installContextWeaver, installCxg, readCxgConfig, uninstall, uninstallCxg, uninstallMcpServer, writeCxgConfig };
|
|
133
|
+
export type { AceToolConfig, ContextWeaverConfig, CxgConfig, InstallResult, McpProvider, UninstallResult, WorkflowConfig };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
type McpProvider = 'skip' | 'ace-tool' | 'contextweaver';
|
|
2
|
+
interface CxgConfig {
|
|
3
|
+
general: {
|
|
4
|
+
version: string;
|
|
5
|
+
created_at: string;
|
|
6
|
+
};
|
|
7
|
+
runtime: {
|
|
8
|
+
backend: 'codex';
|
|
9
|
+
lite_mode: boolean;
|
|
10
|
+
};
|
|
11
|
+
paths: {
|
|
12
|
+
prompts: string;
|
|
13
|
+
skills: string;
|
|
14
|
+
roles: string;
|
|
15
|
+
wrapper: string;
|
|
16
|
+
};
|
|
17
|
+
commands: {
|
|
18
|
+
installed: string[];
|
|
19
|
+
};
|
|
20
|
+
mcp?: {
|
|
21
|
+
provider: McpProvider;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
interface InstallResult {
|
|
25
|
+
success: boolean;
|
|
26
|
+
installedPrompts: string[];
|
|
27
|
+
installedSkills: string[];
|
|
28
|
+
installedRoles: string[];
|
|
29
|
+
errors: string[];
|
|
30
|
+
binInstalled?: boolean;
|
|
31
|
+
binPath?: string;
|
|
32
|
+
}
|
|
33
|
+
interface UninstallResult {
|
|
34
|
+
success: boolean;
|
|
35
|
+
removedPrompts: string[];
|
|
36
|
+
removedSkills: string[];
|
|
37
|
+
removedRoles: string[];
|
|
38
|
+
removedBin: boolean;
|
|
39
|
+
errors: string[];
|
|
40
|
+
}
|
|
41
|
+
interface WorkflowConfig {
|
|
42
|
+
id: string;
|
|
43
|
+
name: string;
|
|
44
|
+
nameEn: string;
|
|
45
|
+
category: 'core' | 'development' | 'quality' | 'delivery' | 'bootstrap';
|
|
46
|
+
description: string;
|
|
47
|
+
descriptionEn: string;
|
|
48
|
+
order: number;
|
|
49
|
+
}
|
|
50
|
+
interface AceToolConfig {
|
|
51
|
+
baseUrl?: string;
|
|
52
|
+
token?: string;
|
|
53
|
+
}
|
|
54
|
+
interface ContextWeaverConfig {
|
|
55
|
+
siliconflowApiKey: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
interface CliOptions {
|
|
59
|
+
force?: boolean;
|
|
60
|
+
lite?: boolean;
|
|
61
|
+
mcp?: string;
|
|
62
|
+
skipMcp?: boolean;
|
|
63
|
+
}
|
|
64
|
+
interface InitOptions extends CliOptions {
|
|
65
|
+
mcpProvider?: McpProvider;
|
|
66
|
+
liteMode?: boolean;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare function init(options?: InitOptions): Promise<void>;
|
|
70
|
+
|
|
71
|
+
declare function uninstall(): Promise<void>;
|
|
72
|
+
|
|
73
|
+
declare function doctor(): Promise<void>;
|
|
74
|
+
|
|
75
|
+
declare function getCodexHome(): string;
|
|
76
|
+
declare function getCxgDir(): string;
|
|
77
|
+
declare function getConfigPath(): string;
|
|
78
|
+
declare function readCxgConfig(): Promise<CxgConfig | null>;
|
|
79
|
+
declare function writeCxgConfig(config: CxgConfig): Promise<void>;
|
|
80
|
+
declare function createDefaultConfig(options?: {
|
|
81
|
+
mcpProvider?: McpProvider;
|
|
82
|
+
liteMode?: boolean;
|
|
83
|
+
}): CxgConfig;
|
|
84
|
+
|
|
85
|
+
declare function getWorkflowConfigs(): WorkflowConfig[];
|
|
86
|
+
declare function getAllCommandIds(): string[];
|
|
87
|
+
/**
|
|
88
|
+
* Install CXG workflow system to ~/.codex/
|
|
89
|
+
*
|
|
90
|
+
* Installs:
|
|
91
|
+
* - Custom Prompts to ~/.codex/prompts/cxg-*.md
|
|
92
|
+
* - Skills to ~/.codex/skills/cxg/* /SKILL.md
|
|
93
|
+
* - Role prompts to ~/.codex/.cxg/roles/codex/*.md
|
|
94
|
+
* - codeagent-wrapper binary to ~/.codex/bin/
|
|
95
|
+
* - Config to ~/.codex/.cxg/config.toml
|
|
96
|
+
*/
|
|
97
|
+
declare function installCxg(options?: {
|
|
98
|
+
force?: boolean;
|
|
99
|
+
liteMode?: boolean;
|
|
100
|
+
mcpProvider?: McpProvider;
|
|
101
|
+
}): Promise<InstallResult>;
|
|
102
|
+
/**
|
|
103
|
+
* Uninstall CXG workflow system from ~/.codex/
|
|
104
|
+
*/
|
|
105
|
+
declare function uninstallCxg(): Promise<UninstallResult>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Install ace-tool MCP server to Codex config.toml
|
|
109
|
+
*/
|
|
110
|
+
declare function installAceTool(config: AceToolConfig): Promise<{
|
|
111
|
+
success: boolean;
|
|
112
|
+
message: string;
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* Install ContextWeaver MCP server to Codex config.toml
|
|
116
|
+
*/
|
|
117
|
+
declare function installContextWeaver(config: ContextWeaverConfig): Promise<{
|
|
118
|
+
success: boolean;
|
|
119
|
+
message: string;
|
|
120
|
+
}>;
|
|
121
|
+
/**
|
|
122
|
+
* Uninstall an MCP server from Codex config.toml
|
|
123
|
+
*/
|
|
124
|
+
declare function uninstallMcpServer(id: string): Promise<{
|
|
125
|
+
success: boolean;
|
|
126
|
+
message: string;
|
|
127
|
+
}>;
|
|
128
|
+
|
|
129
|
+
declare const ALL_COMMANDS: readonly ["cxg-workflow", "cxg-plan", "cxg-execute", "cxg-feat", "cxg-analyze", "cxg-debug", "cxg-optimize", "cxg-test", "cxg-review", "cxg-enhance", "cxg-commit", "cxg-init"];
|
|
130
|
+
declare const WORKFLOW_CONFIGS: WorkflowConfig[];
|
|
131
|
+
|
|
132
|
+
export { ALL_COMMANDS, WORKFLOW_CONFIGS, createDefaultConfig, doctor, getAllCommandIds, getCodexHome, getConfigPath, getCxgDir, getWorkflowConfigs, init, installAceTool, installContextWeaver, installCxg, readCxgConfig, uninstall, uninstallCxg, uninstallMcpServer, writeCxgConfig };
|
|
133
|
+
export type { AceToolConfig, ContextWeaverConfig, CxgConfig, InstallResult, McpProvider, UninstallResult, WorkflowConfig };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { A as ALL_COMMANDS, W as WORKFLOW_CONFIGS, c as createDefaultConfig, d as doctor, g as getAllCommandIds, a as getCodexHome, b as getConfigPath, e as getCxgDir, f as getWorkflowConfigs, i as init, h as installAceTool, j as installContextWeaver, k as installCxg, r as readCxgConfig, u as uninstall, l as uninstallCxg, m as uninstallMcpServer, w as writeCxgConfig } from './shared/cxg-workflow.BdjkxkKP.mjs';
|
|
2
|
+
import 'fs-extra';
|
|
3
|
+
import 'node:os';
|
|
4
|
+
import 'pathe';
|
|
5
|
+
import 'node:url';
|
|
6
|
+
import 'smol-toml';
|