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
package/README.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# multi-agents-custom
|
|
2
|
+
|
|
3
|
+
Generates AI tool config files for a five-role software development pipeline —
|
|
4
|
+
**PM → BA → Tech Lead → Developer → Tester** — directly into each tool's
|
|
5
|
+
**native config folder**.
|
|
6
|
+
|
|
7
|
+
No API calls. No runtime dependencies. Pure local file generation.
|
|
8
|
+
|
|
9
|
+
Supported tools: **Cursor**, **GitHub Copilot**, **Qwen**, **Antigravity**
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## What it does
|
|
14
|
+
|
|
15
|
+
When installed (or run manually), the package writes persona instruction files
|
|
16
|
+
into the correct directories for each AI tool so they pick them up natively:
|
|
17
|
+
|
|
18
|
+
| Tool | Config folder | File format |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| Cursor | `.cursor/rules/` | `<role>.mdc` |
|
|
21
|
+
| GitHub Copilot | `.github/prompts/` | `<role>.prompt.md` |
|
|
22
|
+
| Qwen | `.qwen/` | `<role>.md` |
|
|
23
|
+
| Antigravity | `.antigravity/` | `<role>.md` |
|
|
24
|
+
|
|
25
|
+
Each file contains the system prompt for one of the five agent roles:
|
|
26
|
+
|
|
27
|
+
| Role | Description |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `pm` | Product Manager — extracts objectives, stakeholders & constraints |
|
|
30
|
+
| `ba` | Business Analyst — writes user stories with acceptance criteria |
|
|
31
|
+
| `techlead` | Tech Lead — designs architecture, tech stack & component map |
|
|
32
|
+
| `developer` | Developer — produces implementation plans & code snippets |
|
|
33
|
+
| `tester` | Tester — creates test strategy, test cases & tooling recommendations |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install multi-agents-custom
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Config files are generated automatically via the `postinstall` hook into the
|
|
44
|
+
**project that installed the package** (`INIT_CWD`).
|
|
45
|
+
|
|
46
|
+
To skip postinstall (e.g. in CI):
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
SKIP_MULTI_AGENTS_POSTINSTALL=1 npm install multi-agents-custom
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Manual / CLI usage
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Generate for all tools (default)
|
|
58
|
+
npx multi-agents-custom
|
|
59
|
+
|
|
60
|
+
# Only generate for Cursor and Copilot
|
|
61
|
+
npx multi-agents-custom --targets=cursor,copilot
|
|
62
|
+
|
|
63
|
+
# Overwrite existing files
|
|
64
|
+
npx multi-agents-custom --overwrite
|
|
65
|
+
|
|
66
|
+
# Target a specific project root
|
|
67
|
+
npx multi-agents-custom --root=/path/to/project
|
|
68
|
+
|
|
69
|
+
# Suppress output
|
|
70
|
+
npx multi-agents-custom --quiet
|
|
71
|
+
|
|
72
|
+
# Help
|
|
73
|
+
npx multi-agents-custom --help
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Programmatic API
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
import { ConfigGenerator } from 'multi-agents-custom';
|
|
82
|
+
|
|
83
|
+
const generator = new ConfigGenerator({
|
|
84
|
+
targets: 'all', // 'cursor' | 'copilot' | 'qwen' | 'antigravity' | 'all'
|
|
85
|
+
projectRoot: '/my/app', // default: process.cwd()
|
|
86
|
+
overwrite: false, // skip files that already exist (default)
|
|
87
|
+
verbose: true, // print progress (default)
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const result = await generator.generate();
|
|
91
|
+
// result.success → boolean
|
|
92
|
+
// result.written → number of files created/overwritten
|
|
93
|
+
// result.skipped → number of files left untouched
|
|
94
|
+
// result.errors → number of write failures
|
|
95
|
+
// result.files → WriteResult[] with per-file status
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Custom prompts
|
|
99
|
+
|
|
100
|
+
Override any agent's system prompt before generation:
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
const generator = new ConfigGenerator({
|
|
104
|
+
targets: ['cursor', 'copilot'],
|
|
105
|
+
agents: {
|
|
106
|
+
pm: {
|
|
107
|
+
systemPrompt: 'You are a domain-expert PM for fintech products. ...',
|
|
108
|
+
},
|
|
109
|
+
developer: {
|
|
110
|
+
systemPrompt: 'You are a Python/FastAPI expert. Always use Pydantic v2.',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
await generator.generate();
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Low-level writer access
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
import { CursorWriter, DEFAULT_PERSONAS } from 'multi-agents-custom';
|
|
122
|
+
|
|
123
|
+
const writer = new CursorWriter();
|
|
124
|
+
const results = await writer.write(DEFAULT_PERSONAS, '/my/app', false);
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Configuration reference
|
|
130
|
+
|
|
131
|
+
### `GeneratorConfig`
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
interface GeneratorConfig {
|
|
135
|
+
/** Tool(s) to generate files for. Default: 'all' */
|
|
136
|
+
targets?: 'cursor' | 'copilot' | 'qwen' | 'antigravity' | 'all'
|
|
137
|
+
| ('cursor' | 'copilot' | 'qwen' | 'antigravity' | 'all')[];
|
|
138
|
+
|
|
139
|
+
/** Project root directory. Default: process.cwd() */
|
|
140
|
+
projectRoot?: string;
|
|
141
|
+
|
|
142
|
+
/** Per-role prompt / metadata overrides */
|
|
143
|
+
agents?: Partial<Record<'pm'|'ba'|'techlead'|'developer'|'tester', Partial<AgentPersona>>>;
|
|
144
|
+
|
|
145
|
+
/** Overwrite existing config files. Default: false */
|
|
146
|
+
overwrite?: boolean;
|
|
147
|
+
|
|
148
|
+
/** Print progress to stdout. Default: true */
|
|
149
|
+
verbose?: boolean;
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Environment variables
|
|
156
|
+
|
|
157
|
+
| Variable | Default | Description |
|
|
158
|
+
|---|---|---|
|
|
159
|
+
| `SKIP_MULTI_AGENTS_POSTINSTALL` | `""` | Set to `"1"` to skip the postinstall hook |
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Project structure
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
src/
|
|
167
|
+
├── agents/
|
|
168
|
+
│ └── personas.ts # Five default agent persona definitions
|
|
169
|
+
├── cli/
|
|
170
|
+
│ └── index.ts # CLI entry point (postinstall + npx)
|
|
171
|
+
├── generator/
|
|
172
|
+
│ └── generator.ts # ConfigGenerator orchestrator
|
|
173
|
+
├── providers/
|
|
174
|
+
│ ├── cursor.writer.ts # Writes .cursor/rules/*.mdc
|
|
175
|
+
│ ├── copilot.writer.ts # Writes .github/prompts/*.prompt.md
|
|
176
|
+
│ ├── qwen.writer.ts # Writes .qwen/*.md
|
|
177
|
+
│ ├── antigravity.writer.ts# Writes .antigravity/*.md
|
|
178
|
+
│ └── factory.ts # resolveWriters() factory
|
|
179
|
+
├── types/
|
|
180
|
+
│ └── index.ts # All TypeScript types
|
|
181
|
+
├── utils/
|
|
182
|
+
│ ├── fs.ts # File-system helpers
|
|
183
|
+
│ └── logger.ts # Coloured console logger
|
|
184
|
+
└── index.ts # Public API entry point
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Scripts
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
npm run build # Compile to dist/
|
|
193
|
+
npm run dev # Watch mode build
|
|
194
|
+
npm test # Run unit tests
|
|
195
|
+
npm run typecheck # TypeScript type check
|
|
196
|
+
npm run lint # ESLint
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## License
|