aided-dev 1.0.2 → 1.0.4

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.
@@ -59,6 +59,7 @@ export declare class BMADLoader {
59
59
  getPath(): string | undefined;
60
60
  getFormatType(): 'npm' | 'local' | 'unknown';
61
61
  listAgents(): Promise<string[]>;
62
+ listProjectAgents(): Promise<string[]>;
62
63
  loadAgent(name: string): Promise<AgentConfig | undefined>;
63
64
  loadAgents(names: string[]): Promise<Map<string, AgentConfig>>;
64
65
  getLoadedAgents(): Map<string, AgentConfig>;
@@ -2,9 +2,11 @@ import fs from 'fs-extra';
2
2
  import path from 'path';
3
3
  import yaml from 'js-yaml';
4
4
  export function findBMADPath() {
5
+ const packageDir = path.resolve(path.dirname(new URL(import.meta.url).pathname), '../..');
5
6
  const possiblePaths = [
7
+ path.join(packageDir, 'node_modules/bmad-method'),
6
8
  path.resolve(process.cwd(), 'node_modules/bmad-method'),
7
- path.resolve(path.dirname(new URL(import.meta.url).pathname), '../../node_modules/bmad-method'),
9
+ path.resolve(packageDir, '../bmad-method'),
8
10
  path.resolve(process.cwd(), '../BMAD-METHOD'),
9
11
  process.env.BMAD_PATH,
10
12
  ].filter(Boolean);
@@ -147,6 +149,11 @@ export class BMADLoader {
147
149
  this.agentsPaths = [localAgentsPath];
148
150
  }
149
151
  }
152
+ const projectAgentsDir = path.join(process.cwd(), 'agents');
153
+ if (fs.existsSync(projectAgentsDir)) {
154
+ this.agentsPaths.push(projectAgentsDir);
155
+ }
156
+ this.agentsPaths.push(process.cwd());
150
157
  }
151
158
  isAvailable() {
152
159
  return !!this.bmadPath && this.agentsPaths.length > 0;
@@ -174,6 +181,31 @@ export class BMADLoader {
174
181
  }
175
182
  return [...new Set(agents)];
176
183
  }
184
+ async listProjectAgents() {
185
+ const agents = [];
186
+ const cwd = process.cwd();
187
+ const agentsDir = path.join(cwd, 'agents');
188
+ if (fs.existsSync(agentsDir)) {
189
+ const files = await fs.readdir(agentsDir);
190
+ for (const file of files) {
191
+ if (file.endsWith('.md') && !file.startsWith('_')) {
192
+ agents.push(file.replace('.md', ''));
193
+ }
194
+ else if (file.endsWith('.agent.yaml')) {
195
+ agents.push(file.replace('.agent.yaml', ''));
196
+ }
197
+ }
198
+ }
199
+ if (fs.existsSync(cwd)) {
200
+ const files = await fs.readdir(cwd);
201
+ for (const file of files) {
202
+ if (file.endsWith('.agent.yaml')) {
203
+ agents.push(file.replace('.agent.yaml', ''));
204
+ }
205
+ }
206
+ }
207
+ return [...new Set(agents)];
208
+ }
177
209
  async loadAgent(name) {
178
210
  if (this.agentCache.has(name)) {
179
211
  return this.agentCache.get(name);
package/dist/cli.js CHANGED
@@ -161,6 +161,21 @@ program
161
161
  if (allAgents.length > agentNames.length) {
162
162
  console.log(chalk.dim(`Other available agents: ${allAgents.filter(a => !agentNames.includes(a)).join(', ')}`));
163
163
  }
164
+ const projectAgents = await loader.listProjectAgents();
165
+ if (projectAgents.length > 0) {
166
+ console.log('');
167
+ console.log(chalk.bold('Custom Project Agents'));
168
+ console.log(chalk.dim(`Location: ${process.cwd()}`));
169
+ console.log('');
170
+ for (const agentName of projectAgents) {
171
+ const agent = await loader.loadAgent(agentName);
172
+ if (agent) {
173
+ console.log(`${agent.icon} ${chalk.green(agent.name)} - ${agent.title}`);
174
+ console.log(chalk.dim(` Role: ${agent.persona.role}`));
175
+ console.log('');
176
+ }
177
+ }
178
+ }
164
179
  });
165
180
  program
166
181
  .command('create-agent')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aided-dev",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "AI Development Team Orchestrator - BMAD-METHOD integration for automated code generation",
5
5
  "keywords": [
6
6
  "ai",