multi-agents-custom 2.0.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 +201 -0
- package/dist/chunk-C62CM2KR.mjs +795 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +887 -0
- package/dist/cli/index.mjs +83 -0
- package/dist/index.d.mts +224 -0
- package/dist/index.d.ts +224 -0
- package/dist/index.js +839 -0
- package/dist/index.mjs +22 -0
- package/package.json +64 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
ConfigGenerator
|
|
4
|
+
} from "../chunk-C62CM2KR.mjs";
|
|
5
|
+
|
|
6
|
+
// src/cli/index.ts
|
|
7
|
+
var VALID_TARGETS = ["cursor", "copilot", "qwen", "antigravity", "all"];
|
|
8
|
+
function parseArgs(argv) {
|
|
9
|
+
const config = {
|
|
10
|
+
targets: "all",
|
|
11
|
+
projectRoot: process.cwd(),
|
|
12
|
+
overwrite: false,
|
|
13
|
+
verbose: true,
|
|
14
|
+
help: false
|
|
15
|
+
};
|
|
16
|
+
for (const arg of argv) {
|
|
17
|
+
if (arg === "--help" || arg === "-h") {
|
|
18
|
+
config.help = true;
|
|
19
|
+
} else if (arg === "--overwrite") {
|
|
20
|
+
config.overwrite = true;
|
|
21
|
+
} else if (arg === "--quiet" || arg === "-q") {
|
|
22
|
+
config.verbose = false;
|
|
23
|
+
} else if (arg.startsWith("--targets=")) {
|
|
24
|
+
const raw = arg.slice("--targets=".length).split(",").map((s) => s.trim());
|
|
25
|
+
const valid = raw.filter((t) => VALID_TARGETS.includes(t));
|
|
26
|
+
if (valid.length !== raw.length) {
|
|
27
|
+
const invalid = raw.filter((t) => !VALID_TARGETS.includes(t));
|
|
28
|
+
console.error(`Unknown target(s): ${invalid.join(", ")}. Valid: ${VALID_TARGETS.join(", ")}`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
config.targets = valid.length === 1 ? valid[0] : valid;
|
|
32
|
+
} else if (arg.startsWith("--root=")) {
|
|
33
|
+
config.projectRoot = arg.slice("--root=".length);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return config;
|
|
37
|
+
}
|
|
38
|
+
function printHelp() {
|
|
39
|
+
console.log(`
|
|
40
|
+
Usage: npx multi-agents-custom [options]
|
|
41
|
+
|
|
42
|
+
Generates AI tool config files for the multi-agent development pipeline into:
|
|
43
|
+
.cursor/rules/ \u2014 Cursor rules (*.mdc)
|
|
44
|
+
.github/prompts/ \u2014 GitHub Copilot prompt files (*.prompt.md)
|
|
45
|
+
.qwen/ \u2014 Qwen instruction files (*.md)
|
|
46
|
+
.antigravity/ \u2014 Antigravity persona files (*.md)
|
|
47
|
+
|
|
48
|
+
Options:
|
|
49
|
+
--targets=<list> Comma-separated list of tools to target.
|
|
50
|
+
Valid: cursor, copilot, qwen, antigravity, all
|
|
51
|
+
Default: all
|
|
52
|
+
--root=<path> Project root directory. Default: current working directory
|
|
53
|
+
--overwrite Overwrite existing config files (default: skip existing)
|
|
54
|
+
--quiet, -q Suppress progress output
|
|
55
|
+
--help, -h Show this help message
|
|
56
|
+
`);
|
|
57
|
+
}
|
|
58
|
+
async function main() {
|
|
59
|
+
if (process.env.SKIP_MULTI_AGENTS_POSTINSTALL === "1") {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const installRoot = process.env.INIT_CWD ?? process.cwd();
|
|
63
|
+
const args = process.argv.slice(2);
|
|
64
|
+
const config = parseArgs(args);
|
|
65
|
+
if (config.help) {
|
|
66
|
+
printHelp();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (!args.some((a) => a.startsWith("--root="))) {
|
|
70
|
+
config.projectRoot = installRoot;
|
|
71
|
+
}
|
|
72
|
+
const generator = new ConfigGenerator(config);
|
|
73
|
+
try {
|
|
74
|
+
const result = await generator.generate();
|
|
75
|
+
if (!result.success) {
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
} catch (err) {
|
|
79
|
+
console.error("multi-agents-custom: unexpected error during config generation:", err);
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
main();
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported AI tool targets that can receive generated config files.
|
|
3
|
+
*/
|
|
4
|
+
type ToolTarget = 'cursor' | 'copilot' | 'qwen' | 'antigravity' | 'all';
|
|
5
|
+
/**
|
|
6
|
+
* The five agent roles in the software development pipeline.
|
|
7
|
+
*/
|
|
8
|
+
type AgentRole = 'pm' | 'ba' | 'techlead' | 'developer' | 'tester';
|
|
9
|
+
/**
|
|
10
|
+
* A single agent persona definition used to generate config files.
|
|
11
|
+
*/
|
|
12
|
+
interface AgentPersona {
|
|
13
|
+
/** Agent role identifier */
|
|
14
|
+
role: AgentRole;
|
|
15
|
+
/** Human-readable display name */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Short description of the agent's responsibilities */
|
|
18
|
+
description: string;
|
|
19
|
+
/** The system prompt / instruction content written into config files */
|
|
20
|
+
systemPrompt: string;
|
|
21
|
+
/** Optional tags/metadata embedded in the config file */
|
|
22
|
+
tags?: string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Configuration for the config-file generator.
|
|
26
|
+
*/
|
|
27
|
+
interface GeneratorConfig {
|
|
28
|
+
/**
|
|
29
|
+
* Which AI tool(s) to generate config files for.
|
|
30
|
+
* Use 'all' to generate for every supported tool.
|
|
31
|
+
* @default 'all'
|
|
32
|
+
*/
|
|
33
|
+
targets?: ToolTarget | ToolTarget[];
|
|
34
|
+
/**
|
|
35
|
+
* Root directory of the project where config folders will be written.
|
|
36
|
+
* @default process.cwd()
|
|
37
|
+
*/
|
|
38
|
+
projectRoot?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Per-agent overrides for system prompts or metadata.
|
|
41
|
+
*/
|
|
42
|
+
agents?: Partial<Record<AgentRole, Partial<AgentPersona>>>;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to overwrite existing config files.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
overwrite?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether to print progress to stdout.
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
verbose?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Result returned by a single file-write operation.
|
|
56
|
+
*/
|
|
57
|
+
interface WriteResult {
|
|
58
|
+
/** Absolute path of the file that was written (or skipped) */
|
|
59
|
+
filePath: string;
|
|
60
|
+
/** Whether the file was actually written */
|
|
61
|
+
written: boolean;
|
|
62
|
+
/** 'created' | 'overwritten' | 'skipped' (already exists, overwrite=false) */
|
|
63
|
+
status: 'created' | 'overwritten' | 'skipped';
|
|
64
|
+
/** Error message if the write failed */
|
|
65
|
+
error?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Summary result returned after running the generator.
|
|
69
|
+
*/
|
|
70
|
+
interface GeneratorResult {
|
|
71
|
+
/** Whether all writes succeeded (no errors) */
|
|
72
|
+
success: boolean;
|
|
73
|
+
/** Per-file results */
|
|
74
|
+
files: WriteResult[];
|
|
75
|
+
/** Total files written (created + overwritten) */
|
|
76
|
+
written: number;
|
|
77
|
+
/** Total files skipped */
|
|
78
|
+
skipped: number;
|
|
79
|
+
/** Total files that encountered errors */
|
|
80
|
+
errors: number;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Interface every provider-specific writer must implement.
|
|
84
|
+
*/
|
|
85
|
+
interface IProviderWriter {
|
|
86
|
+
/** Tool target this writer handles */
|
|
87
|
+
readonly target: ToolTarget;
|
|
88
|
+
/**
|
|
89
|
+
* Generate all config files for the given personas into `projectRoot`.
|
|
90
|
+
* @returns array of WriteResult, one per file attempted
|
|
91
|
+
*/
|
|
92
|
+
write(personas: AgentPersona[], projectRoot: string, overwrite: boolean): Promise<WriteResult[]>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* ConfigGenerator orchestrates writing AI tool config files for all five
|
|
97
|
+
* agent personas into the appropriate native config folders of each target tool.
|
|
98
|
+
*
|
|
99
|
+
* No network calls are made — all operations are local file-system writes.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* import { ConfigGenerator } from 'multi-agents-custom';
|
|
104
|
+
*
|
|
105
|
+
* const generator = new ConfigGenerator({ targets: 'all', verbose: true });
|
|
106
|
+
* const result = await generator.generate();
|
|
107
|
+
* console.log(`Written: ${result.written}, Skipped: ${result.skipped}`);
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
declare class ConfigGenerator {
|
|
111
|
+
private readonly config;
|
|
112
|
+
private readonly logger;
|
|
113
|
+
constructor(config?: GeneratorConfig);
|
|
114
|
+
/**
|
|
115
|
+
* Run the generator: resolve writers, build personas, and write all config files.
|
|
116
|
+
*/
|
|
117
|
+
generate(): Promise<GeneratorResult>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Default agent persona definitions aligned with the ai-devkit SDLC workflow.
|
|
122
|
+
*
|
|
123
|
+
* Each persona maps to one or more phases of the 8-phase development lifecycle:
|
|
124
|
+
* 1. New Requirement (PM)
|
|
125
|
+
* 2. Review Requirements (BA)
|
|
126
|
+
* 3. Review Design (Tech Lead)
|
|
127
|
+
* 4. Execute Plan + 5. Update Planning (Developer)
|
|
128
|
+
* 6. Check Implementation + 7. Write Tests + 8. Code Review (Tester)
|
|
129
|
+
*
|
|
130
|
+
* Workflow conventions (ai-devkit):
|
|
131
|
+
* - Phase docs: docs/ai/{requirements,design,planning,implementation,testing}/feature-{name}.md
|
|
132
|
+
* - Memory: npx ai-devkit@latest memory search/store
|
|
133
|
+
* - Clarification loops: actively ask questions; never proceed with ambiguity
|
|
134
|
+
* - Mermaid diagrams required in every design doc
|
|
135
|
+
* - 100 % test coverage target
|
|
136
|
+
*
|
|
137
|
+
* @see https://github.com/codeaholicguy/ai-devkit
|
|
138
|
+
*/
|
|
139
|
+
declare const DEFAULT_PERSONAS: AgentPersona[];
|
|
140
|
+
/**
|
|
141
|
+
* Returns all default personas, optionally merged with per-role overrides.
|
|
142
|
+
*/
|
|
143
|
+
declare function buildPersonas(overrides?: Partial<Record<string, Partial<AgentPersona>>>): AgentPersona[];
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Generates `.cursor/rules/<role>.mdc` files.
|
|
147
|
+
*
|
|
148
|
+
* Cursor reads `.mdc` files from the `.cursor/rules/` directory and surfaces
|
|
149
|
+
* them as "Rules" in the Cursor editor — the content is applied as a system
|
|
150
|
+
* prompt when the matching file or context is active.
|
|
151
|
+
*
|
|
152
|
+
* Format: YAML front-matter followed by the instruction body.
|
|
153
|
+
*
|
|
154
|
+
* @see https://docs.cursor.com/context/rules-for-ai
|
|
155
|
+
*/
|
|
156
|
+
declare class CursorWriter implements IProviderWriter {
|
|
157
|
+
readonly target: "cursor";
|
|
158
|
+
write(personas: AgentPersona[], projectRoot: string, overwrite: boolean): Promise<WriteResult[]>;
|
|
159
|
+
private renderMdc;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Generates `.github/prompts/<role>.prompt.md` files.
|
|
164
|
+
*
|
|
165
|
+
* GitHub Copilot (VS Code extension ≥ 0.22 / Copilot Chat) reads prompt files
|
|
166
|
+
* from `.github/prompts/` and exposes them as reusable slash-command prompts.
|
|
167
|
+
* The YAML front-matter `mode` and `description` fields control how Copilot
|
|
168
|
+
* presents and applies the prompt.
|
|
169
|
+
*
|
|
170
|
+
* @see https://code.visualstudio.com/docs/copilot/copilot-customization#_prompt-files-experimental
|
|
171
|
+
*/
|
|
172
|
+
declare class CopilotWriter implements IProviderWriter {
|
|
173
|
+
readonly target: "copilot";
|
|
174
|
+
write(personas: AgentPersona[], projectRoot: string, overwrite: boolean): Promise<WriteResult[]>;
|
|
175
|
+
private renderPrompt;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Generates `.qwen/<role>.md` files.
|
|
180
|
+
*
|
|
181
|
+
* Qwen (Alibaba Cloud's AI coding assistant) reads markdown instruction files
|
|
182
|
+
* from the `.qwen/` directory in the project root. Each file represents a
|
|
183
|
+
* named persona / mode that the assistant can adopt.
|
|
184
|
+
*
|
|
185
|
+
* @see https://qwen.readthedocs.io/en/latest/getting_started/quickstart.html
|
|
186
|
+
*/
|
|
187
|
+
declare class QwenWriter implements IProviderWriter {
|
|
188
|
+
readonly target: "qwen";
|
|
189
|
+
write(personas: AgentPersona[], projectRoot: string, overwrite: boolean): Promise<WriteResult[]>;
|
|
190
|
+
private renderInstruction;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Generates `.antigravity/<role>.md` files.
|
|
195
|
+
*
|
|
196
|
+
* Antigravity reads markdown persona files from the `.antigravity/` directory.
|
|
197
|
+
* The front-matter `role` field is used by the tool to match the persona to
|
|
198
|
+
* its internal routing — the body becomes the system prompt.
|
|
199
|
+
*/
|
|
200
|
+
declare class AntigravityWriter implements IProviderWriter {
|
|
201
|
+
readonly target: "antigravity";
|
|
202
|
+
write(personas: AgentPersona[], projectRoot: string, overwrite: boolean): Promise<WriteResult[]>;
|
|
203
|
+
private renderPersona;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Returns the list of writers to use for the given target(s).
|
|
208
|
+
*
|
|
209
|
+
* @param targets - A single target, array of targets, or 'all'.
|
|
210
|
+
*/
|
|
211
|
+
declare function resolveWriters(targets: ToolTarget | ToolTarget[]): IProviderWriter[];
|
|
212
|
+
|
|
213
|
+
declare class Logger {
|
|
214
|
+
private readonly verbose;
|
|
215
|
+
constructor(verbose?: boolean);
|
|
216
|
+
info(msg: string): void;
|
|
217
|
+
success(msg: string): void;
|
|
218
|
+
warn(msg: string): void;
|
|
219
|
+
error(msg: string): void;
|
|
220
|
+
skip(msg: string): void;
|
|
221
|
+
heading(msg: string): void;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export { type AgentPersona, type AgentRole, AntigravityWriter, ConfigGenerator, CopilotWriter, CursorWriter, DEFAULT_PERSONAS, type GeneratorConfig, type GeneratorResult, type IProviderWriter, Logger, QwenWriter, type ToolTarget, type WriteResult, buildPersonas, resolveWriters };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported AI tool targets that can receive generated config files.
|
|
3
|
+
*/
|
|
4
|
+
type ToolTarget = 'cursor' | 'copilot' | 'qwen' | 'antigravity' | 'all';
|
|
5
|
+
/**
|
|
6
|
+
* The five agent roles in the software development pipeline.
|
|
7
|
+
*/
|
|
8
|
+
type AgentRole = 'pm' | 'ba' | 'techlead' | 'developer' | 'tester';
|
|
9
|
+
/**
|
|
10
|
+
* A single agent persona definition used to generate config files.
|
|
11
|
+
*/
|
|
12
|
+
interface AgentPersona {
|
|
13
|
+
/** Agent role identifier */
|
|
14
|
+
role: AgentRole;
|
|
15
|
+
/** Human-readable display name */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Short description of the agent's responsibilities */
|
|
18
|
+
description: string;
|
|
19
|
+
/** The system prompt / instruction content written into config files */
|
|
20
|
+
systemPrompt: string;
|
|
21
|
+
/** Optional tags/metadata embedded in the config file */
|
|
22
|
+
tags?: string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Configuration for the config-file generator.
|
|
26
|
+
*/
|
|
27
|
+
interface GeneratorConfig {
|
|
28
|
+
/**
|
|
29
|
+
* Which AI tool(s) to generate config files for.
|
|
30
|
+
* Use 'all' to generate for every supported tool.
|
|
31
|
+
* @default 'all'
|
|
32
|
+
*/
|
|
33
|
+
targets?: ToolTarget | ToolTarget[];
|
|
34
|
+
/**
|
|
35
|
+
* Root directory of the project where config folders will be written.
|
|
36
|
+
* @default process.cwd()
|
|
37
|
+
*/
|
|
38
|
+
projectRoot?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Per-agent overrides for system prompts or metadata.
|
|
41
|
+
*/
|
|
42
|
+
agents?: Partial<Record<AgentRole, Partial<AgentPersona>>>;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to overwrite existing config files.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
overwrite?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether to print progress to stdout.
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
verbose?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Result returned by a single file-write operation.
|
|
56
|
+
*/
|
|
57
|
+
interface WriteResult {
|
|
58
|
+
/** Absolute path of the file that was written (or skipped) */
|
|
59
|
+
filePath: string;
|
|
60
|
+
/** Whether the file was actually written */
|
|
61
|
+
written: boolean;
|
|
62
|
+
/** 'created' | 'overwritten' | 'skipped' (already exists, overwrite=false) */
|
|
63
|
+
status: 'created' | 'overwritten' | 'skipped';
|
|
64
|
+
/** Error message if the write failed */
|
|
65
|
+
error?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Summary result returned after running the generator.
|
|
69
|
+
*/
|
|
70
|
+
interface GeneratorResult {
|
|
71
|
+
/** Whether all writes succeeded (no errors) */
|
|
72
|
+
success: boolean;
|
|
73
|
+
/** Per-file results */
|
|
74
|
+
files: WriteResult[];
|
|
75
|
+
/** Total files written (created + overwritten) */
|
|
76
|
+
written: number;
|
|
77
|
+
/** Total files skipped */
|
|
78
|
+
skipped: number;
|
|
79
|
+
/** Total files that encountered errors */
|
|
80
|
+
errors: number;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Interface every provider-specific writer must implement.
|
|
84
|
+
*/
|
|
85
|
+
interface IProviderWriter {
|
|
86
|
+
/** Tool target this writer handles */
|
|
87
|
+
readonly target: ToolTarget;
|
|
88
|
+
/**
|
|
89
|
+
* Generate all config files for the given personas into `projectRoot`.
|
|
90
|
+
* @returns array of WriteResult, one per file attempted
|
|
91
|
+
*/
|
|
92
|
+
write(personas: AgentPersona[], projectRoot: string, overwrite: boolean): Promise<WriteResult[]>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* ConfigGenerator orchestrates writing AI tool config files for all five
|
|
97
|
+
* agent personas into the appropriate native config folders of each target tool.
|
|
98
|
+
*
|
|
99
|
+
* No network calls are made — all operations are local file-system writes.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* import { ConfigGenerator } from 'multi-agents-custom';
|
|
104
|
+
*
|
|
105
|
+
* const generator = new ConfigGenerator({ targets: 'all', verbose: true });
|
|
106
|
+
* const result = await generator.generate();
|
|
107
|
+
* console.log(`Written: ${result.written}, Skipped: ${result.skipped}`);
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
declare class ConfigGenerator {
|
|
111
|
+
private readonly config;
|
|
112
|
+
private readonly logger;
|
|
113
|
+
constructor(config?: GeneratorConfig);
|
|
114
|
+
/**
|
|
115
|
+
* Run the generator: resolve writers, build personas, and write all config files.
|
|
116
|
+
*/
|
|
117
|
+
generate(): Promise<GeneratorResult>;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Default agent persona definitions aligned with the ai-devkit SDLC workflow.
|
|
122
|
+
*
|
|
123
|
+
* Each persona maps to one or more phases of the 8-phase development lifecycle:
|
|
124
|
+
* 1. New Requirement (PM)
|
|
125
|
+
* 2. Review Requirements (BA)
|
|
126
|
+
* 3. Review Design (Tech Lead)
|
|
127
|
+
* 4. Execute Plan + 5. Update Planning (Developer)
|
|
128
|
+
* 6. Check Implementation + 7. Write Tests + 8. Code Review (Tester)
|
|
129
|
+
*
|
|
130
|
+
* Workflow conventions (ai-devkit):
|
|
131
|
+
* - Phase docs: docs/ai/{requirements,design,planning,implementation,testing}/feature-{name}.md
|
|
132
|
+
* - Memory: npx ai-devkit@latest memory search/store
|
|
133
|
+
* - Clarification loops: actively ask questions; never proceed with ambiguity
|
|
134
|
+
* - Mermaid diagrams required in every design doc
|
|
135
|
+
* - 100 % test coverage target
|
|
136
|
+
*
|
|
137
|
+
* @see https://github.com/codeaholicguy/ai-devkit
|
|
138
|
+
*/
|
|
139
|
+
declare const DEFAULT_PERSONAS: AgentPersona[];
|
|
140
|
+
/**
|
|
141
|
+
* Returns all default personas, optionally merged with per-role overrides.
|
|
142
|
+
*/
|
|
143
|
+
declare function buildPersonas(overrides?: Partial<Record<string, Partial<AgentPersona>>>): AgentPersona[];
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Generates `.cursor/rules/<role>.mdc` files.
|
|
147
|
+
*
|
|
148
|
+
* Cursor reads `.mdc` files from the `.cursor/rules/` directory and surfaces
|
|
149
|
+
* them as "Rules" in the Cursor editor — the content is applied as a system
|
|
150
|
+
* prompt when the matching file or context is active.
|
|
151
|
+
*
|
|
152
|
+
* Format: YAML front-matter followed by the instruction body.
|
|
153
|
+
*
|
|
154
|
+
* @see https://docs.cursor.com/context/rules-for-ai
|
|
155
|
+
*/
|
|
156
|
+
declare class CursorWriter implements IProviderWriter {
|
|
157
|
+
readonly target: "cursor";
|
|
158
|
+
write(personas: AgentPersona[], projectRoot: string, overwrite: boolean): Promise<WriteResult[]>;
|
|
159
|
+
private renderMdc;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Generates `.github/prompts/<role>.prompt.md` files.
|
|
164
|
+
*
|
|
165
|
+
* GitHub Copilot (VS Code extension ≥ 0.22 / Copilot Chat) reads prompt files
|
|
166
|
+
* from `.github/prompts/` and exposes them as reusable slash-command prompts.
|
|
167
|
+
* The YAML front-matter `mode` and `description` fields control how Copilot
|
|
168
|
+
* presents and applies the prompt.
|
|
169
|
+
*
|
|
170
|
+
* @see https://code.visualstudio.com/docs/copilot/copilot-customization#_prompt-files-experimental
|
|
171
|
+
*/
|
|
172
|
+
declare class CopilotWriter implements IProviderWriter {
|
|
173
|
+
readonly target: "copilot";
|
|
174
|
+
write(personas: AgentPersona[], projectRoot: string, overwrite: boolean): Promise<WriteResult[]>;
|
|
175
|
+
private renderPrompt;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Generates `.qwen/<role>.md` files.
|
|
180
|
+
*
|
|
181
|
+
* Qwen (Alibaba Cloud's AI coding assistant) reads markdown instruction files
|
|
182
|
+
* from the `.qwen/` directory in the project root. Each file represents a
|
|
183
|
+
* named persona / mode that the assistant can adopt.
|
|
184
|
+
*
|
|
185
|
+
* @see https://qwen.readthedocs.io/en/latest/getting_started/quickstart.html
|
|
186
|
+
*/
|
|
187
|
+
declare class QwenWriter implements IProviderWriter {
|
|
188
|
+
readonly target: "qwen";
|
|
189
|
+
write(personas: AgentPersona[], projectRoot: string, overwrite: boolean): Promise<WriteResult[]>;
|
|
190
|
+
private renderInstruction;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Generates `.antigravity/<role>.md` files.
|
|
195
|
+
*
|
|
196
|
+
* Antigravity reads markdown persona files from the `.antigravity/` directory.
|
|
197
|
+
* The front-matter `role` field is used by the tool to match the persona to
|
|
198
|
+
* its internal routing — the body becomes the system prompt.
|
|
199
|
+
*/
|
|
200
|
+
declare class AntigravityWriter implements IProviderWriter {
|
|
201
|
+
readonly target: "antigravity";
|
|
202
|
+
write(personas: AgentPersona[], projectRoot: string, overwrite: boolean): Promise<WriteResult[]>;
|
|
203
|
+
private renderPersona;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Returns the list of writers to use for the given target(s).
|
|
208
|
+
*
|
|
209
|
+
* @param targets - A single target, array of targets, or 'all'.
|
|
210
|
+
*/
|
|
211
|
+
declare function resolveWriters(targets: ToolTarget | ToolTarget[]): IProviderWriter[];
|
|
212
|
+
|
|
213
|
+
declare class Logger {
|
|
214
|
+
private readonly verbose;
|
|
215
|
+
constructor(verbose?: boolean);
|
|
216
|
+
info(msg: string): void;
|
|
217
|
+
success(msg: string): void;
|
|
218
|
+
warn(msg: string): void;
|
|
219
|
+
error(msg: string): void;
|
|
220
|
+
skip(msg: string): void;
|
|
221
|
+
heading(msg: string): void;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export { type AgentPersona, type AgentRole, AntigravityWriter, ConfigGenerator, CopilotWriter, CursorWriter, DEFAULT_PERSONAS, type GeneratorConfig, type GeneratorResult, type IProviderWriter, Logger, QwenWriter, type ToolTarget, type WriteResult, buildPersonas, resolveWriters };
|