sdd-mcp-server 2.2.1 → 3.0.1
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 +93 -33
- package/dist/agents/AgentManager.d.ts +61 -0
- package/dist/agents/AgentManager.js +75 -0
- package/dist/agents/AgentManager.js.map +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.js +3 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/cli/install-skills.d.ts +56 -11
- package/dist/cli/install-skills.js +311 -122
- package/dist/cli/install-skills.js.map +1 -1
- package/dist/cli/sdd-mcp-cli.js +0 -0
- package/dist/contexts/ContextManager.d.ts +53 -0
- package/dist/contexts/ContextManager.js +64 -0
- package/dist/contexts/ContextManager.js.map +1 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/contexts/index.js +3 -0
- package/dist/contexts/index.js.map +1 -0
- package/dist/hooks/HookLoader.d.ts +67 -0
- package/dist/hooks/HookLoader.js +180 -0
- package/dist/hooks/HookLoader.js.map +1 -0
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/di/container.js +24 -0
- package/dist/infrastructure/di/container.js.map +1 -1
- package/dist/infrastructure/di/types.d.ts +4 -0
- package/dist/infrastructure/di/types.js +5 -0
- package/dist/infrastructure/di/types.js.map +1 -1
- package/dist/rules/RulesManager.d.ts +53 -0
- package/dist/rules/RulesManager.js +62 -0
- package/dist/rules/RulesManager.js.map +1 -0
- package/dist/rules/index.d.ts +1 -0
- package/dist/rules/index.js +3 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/shared/BaseManager.d.ts +130 -0
- package/dist/shared/BaseManager.js +274 -0
- package/dist/shared/BaseManager.js.map +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/utils/sddPaths.d.ts +69 -0
- package/dist/utils/sddPaths.js +138 -0
- package/dist/utils/sddPaths.js.map +1 -0
- package/documentGenerator.js +1 -1
- package/mcp-server.js +39 -39
- package/package.json +1 -1
- package/skills/sdd-review/SKILL.md +191 -0
- package/skills/sdd-security-check/SKILL.md +193 -0
- package/skills/sdd-test-gen/SKILL.md +295 -0
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
A Model Context Protocol (MCP) server implementing Spec-Driven Development (SDD) workflows for AI-agent CLIs and IDEs like Claude Code, Cursor, and others.
|
|
8
8
|
|
|
9
|
+
> 🚀 **v3.0.0 - Comprehensive Plugin Architecture**: SDD-MCP is now a full-featured Claude Code plugin system! Adds **6 component types** (skills, steering, rules, contexts, agents, hooks), **4 new managers** (RulesManager, ContextManager, AgentManager, HookLoader), and **3 new skills** (sdd-review, sdd-security-check, sdd-test-gen). Unified install CLI supports `--rules`, `--contexts`, `--agents`, `--hooks`, `--all` flags. Inspired by everything-claude-code architecture.
|
|
10
|
+
|
|
9
11
|
> 🔧 **v2.2.1 - CLI Fix**: Fixed `npx sdd-mcp` not working due to npm package name collision. Now use `npx sdd-mcp-server` for all CLI commands. The unified entry point handles both CLI commands and MCP server mode.
|
|
10
12
|
|
|
11
13
|
> 🎯 **v2.2.0 - Unified Installation & Crash Safety**: `npx sdd-mcp-server install` command installs both skills (to `.claude/skills/`) AND steering documents (to `.spec/steering/`) in one step! Skills now explicitly reference their relevant steering documents for better guidance. Also includes **atomic file writes** for spec.json crash safety - files are never left in a corrupted state even if the process is interrupted. (Thanks to @Lucas Wang for the atomic writes contribution!)
|
|
@@ -165,28 +167,42 @@ SDD now uses a **hybrid architecture** for better token efficiency:
|
|
|
165
167
|
- **MCP Tools**: Action-oriented operations (init, status, approve, quality-check, validate, spec-impl)
|
|
166
168
|
- **Agent Skills**: Template/guidance-heavy operations (requirements, design, tasks, steering, implement, commit)
|
|
167
169
|
|
|
168
|
-
### Installing
|
|
170
|
+
### Installing Components (v3.0+)
|
|
169
171
|
|
|
170
172
|
```bash
|
|
171
|
-
# Recommended: Install
|
|
172
|
-
npx sdd-mcp-server install
|
|
173
|
+
# Recommended: Install ALL components (skills, steering, rules, contexts, agents, hooks)
|
|
174
|
+
npx sdd-mcp-server install --all
|
|
173
175
|
|
|
174
|
-
# Install
|
|
175
|
-
npx sdd-mcp-server install --skills
|
|
176
|
+
# Install specific component types
|
|
177
|
+
npx sdd-mcp-server install --skills # Skills to .claude/skills/
|
|
178
|
+
npx sdd-mcp-server install --steering # Steering to .spec/steering/
|
|
179
|
+
npx sdd-mcp-server install --rules # Rules to .claude/rules/
|
|
180
|
+
npx sdd-mcp-server install --contexts # Contexts to .claude/contexts/
|
|
181
|
+
npx sdd-mcp-server install --agents # Agents to .claude/agents/
|
|
182
|
+
npx sdd-mcp-server install --hooks # Hooks to .claude/hooks/
|
|
176
183
|
|
|
177
|
-
# Install
|
|
178
|
-
npx sdd-mcp-server install --
|
|
184
|
+
# Install multiple component types
|
|
185
|
+
npx sdd-mcp-server install --skills --rules --agents
|
|
186
|
+
|
|
187
|
+
# Default: Install skills + steering (backward compatible)
|
|
188
|
+
npx sdd-mcp-server install
|
|
179
189
|
|
|
180
|
-
# List available
|
|
190
|
+
# List all available components
|
|
181
191
|
npx sdd-mcp-server install --list
|
|
182
192
|
|
|
183
|
-
# Legacy: Install skills only
|
|
193
|
+
# Legacy: Install skills only
|
|
184
194
|
npx sdd-mcp-server install-skills
|
|
185
195
|
```
|
|
186
196
|
|
|
187
|
-
**
|
|
188
|
-
|
|
189
|
-
|
|
197
|
+
**Component Types (v3.0):**
|
|
198
|
+
| Component | Install Path | Purpose |
|
|
199
|
+
|-----------|--------------|---------|
|
|
200
|
+
| **Skills** | `.claude/skills/` | Workflow guidance (requirements, design, tasks, implement, etc.) |
|
|
201
|
+
| **Steering** | `.spec/steering/` | Project-wide conventions (TDD guidelines, SOLID principles, security) |
|
|
202
|
+
| **Rules** | `.claude/rules/` | Always-active guidelines (coding-style, testing, security, git-workflow) |
|
|
203
|
+
| **Contexts** | `.claude/contexts/` | Mode-specific prompts (dev, review, planning, security-audit, research) |
|
|
204
|
+
| **Agents** | `.claude/agents/` | Specialized AI personas (planner, architect, reviewer, implementer) |
|
|
205
|
+
| **Hooks** | `.claude/hooks/` | Event-driven automation (pre-tool-use, post-tool-use, session events) |
|
|
190
206
|
|
|
191
207
|
### Migrating from .kiro to .spec (v2.1.0+)
|
|
192
208
|
|
|
@@ -219,6 +235,9 @@ After installation, use these skills in Claude Code:
|
|
|
219
235
|
| `/sdd-steering` | Create/update project-specific steering documents |
|
|
220
236
|
| `/sdd-steering-custom` | Create custom steering with inclusion modes |
|
|
221
237
|
| `/sdd-commit` | Commit/PR guidelines with conventional commits |
|
|
238
|
+
| `/sdd-review` | **NEW in v3.0** - Linus-style direct code review with severity levels |
|
|
239
|
+
| `/sdd-security-check` | **NEW in v3.0** - OWASP Top 10 security audit checklist |
|
|
240
|
+
| `/sdd-test-gen` | **NEW in v3.0** - TDD test generation with Red-Green-Refactor workflow |
|
|
222
241
|
|
|
223
242
|
### Token Efficiency
|
|
224
243
|
|
|
@@ -302,38 +321,55 @@ Once connected to your AI client, you can use these MCP tools:
|
|
|
302
321
|
Use sdd-context-load to restore project memory
|
|
303
322
|
```
|
|
304
323
|
|
|
305
|
-
## Latest Updates (
|
|
324
|
+
## Latest Updates (v3.0.0)
|
|
306
325
|
|
|
307
|
-
**What's New**:
|
|
308
|
-
-
|
|
309
|
-
-
|
|
310
|
-
-
|
|
311
|
-
-
|
|
326
|
+
**What's New - Comprehensive Plugin Architecture**:
|
|
327
|
+
- 🚀 **6 Component Types**: Skills, Steering, Rules, Contexts, Agents, Hooks
|
|
328
|
+
- 🤖 **4 New Managers**: RulesManager, ContextManager, AgentManager, HookLoader
|
|
329
|
+
- ✨ **3 New Skills**: sdd-review (Linus-style review), sdd-security-check (OWASP audit), sdd-test-gen (TDD)
|
|
330
|
+
- 🎯 **Unified CLI**: `--rules`, `--contexts`, `--agents`, `--hooks`, `--all` flags
|
|
331
|
+
- 📦 **Plugin Manifest**: `.claude-plugin/plugin.json` for Claude Code integration
|
|
332
|
+
- ✅ **199 Tests**: 58 new tests for component managers, full TDD coverage
|
|
333
|
+
|
|
334
|
+
**New Component Details**:
|
|
335
|
+
| Component | Count | Examples |
|
|
336
|
+
|-----------|-------|----------|
|
|
337
|
+
| Rules | 6 | coding-style, testing, security, git-workflow, error-handling, sdd-workflow |
|
|
338
|
+
| Contexts | 5 | dev, review, planning, security-audit, research |
|
|
339
|
+
| Agents | 6 | planner, architect, reviewer, implementer, security-auditor, tdd-guide |
|
|
340
|
+
| Hooks | 7 | validate-sdd-workflow, check-test-coverage, update-spec-status, load-project-context |
|
|
312
341
|
|
|
313
342
|
**Upgrade Commands**:
|
|
314
343
|
```bash
|
|
315
|
-
# Install
|
|
316
|
-
npx sdd-mcp-server install
|
|
317
|
-
|
|
318
|
-
# Install skills only
|
|
319
|
-
npx sdd-mcp-server install --skills
|
|
344
|
+
# Install ALL components (recommended for v3.0)
|
|
345
|
+
npx sdd-mcp-server install --all
|
|
320
346
|
|
|
321
|
-
# Install
|
|
322
|
-
npx sdd-mcp-server install --
|
|
347
|
+
# Install specific components
|
|
348
|
+
npx sdd-mcp-server install --skills --rules --agents
|
|
323
349
|
|
|
324
|
-
# List available
|
|
350
|
+
# List all available components
|
|
325
351
|
npx sdd-mcp-server install --list
|
|
326
352
|
|
|
327
353
|
# Show CLI help
|
|
328
354
|
npx sdd-mcp-server --help
|
|
329
355
|
```
|
|
330
356
|
|
|
331
|
-
**Previous Versions (v2.
|
|
332
|
-
- v2.
|
|
357
|
+
**Previous Versions (v2.x)**:
|
|
358
|
+
- v2.2.1: CLI fix for npm package name collision
|
|
359
|
+
- v2.2.0: Unified installation, atomic file writes, skill-steering references
|
|
360
|
+
- v2.1.0: Directory migration from .kiro to .spec
|
|
361
|
+
- v2.0.3: CLI subcommand support
|
|
333
362
|
- v2.0.0: Hybrid MCP + Agent Skills architecture, ~55% token savings
|
|
334
363
|
|
|
335
364
|
## Previous Versions
|
|
336
365
|
|
|
366
|
+
### v2.2.x
|
|
367
|
+
- v2.2.1: CLI fix for npm package name collision
|
|
368
|
+
- v2.2.0: Unified installation, atomic file writes, skill-steering references
|
|
369
|
+
|
|
370
|
+
### v2.1.x
|
|
371
|
+
- v2.1.0: Directory migration from `.kiro` to `.spec`
|
|
372
|
+
|
|
337
373
|
### v2.0.x
|
|
338
374
|
- v2.0.3: CLI subcommand support (`npx sdd-mcp-server install-skills` works)
|
|
339
375
|
- v2.0.2: ESM compatibility fix for install-skills CLI
|
|
@@ -423,15 +459,28 @@ claude mcp add sdd "sdd-mcp-server"
|
|
|
423
459
|
|
|
424
460
|
## 🏗️ Key Features
|
|
425
461
|
|
|
462
|
+
### Core SDD Workflow
|
|
426
463
|
- **5-Phase SDD Workflow**: INIT → REQUIREMENTS → DESIGN → TASKS → IMPLEMENTATION
|
|
427
|
-
- **Comprehensive Multi-Language Analysis**: Automatic detection of TypeScript, JavaScript, Java, Python, Go, Ruby, PHP, Rust, C#, Scala projects with framework-specific insights
|
|
428
|
-
- **Framework Detection**: Recognizes Spring Boot, Django, FastAPI, Flask, Rails, Laravel, Express, React, Vue, Angular, Next.js, and 20+ other frameworks
|
|
429
464
|
- **TDD-First Task Generation**: All implementation tasks follow Test-Driven Development (RED-GREEN-REFACTOR) methodology
|
|
430
|
-
- **Coding Principles Enforcement**: Built-in SOLID, DRY, KISS, YAGNI, Separation of Concerns, and Modularity guidance
|
|
431
|
-
- **Context-Aware Generation**: Analyzes package.json, dependencies, build tools, test frameworks, and project structure for real content
|
|
432
465
|
- **EARS-Formatted Requirements**: Generate acceptance criteria based on actual npm scripts and dependencies
|
|
433
|
-
- **Architecture Pattern Recognition**: Detects DDD, MVC, Microservices, Clean Architecture patterns in your codebase
|
|
434
466
|
- **Quality Enforcement**: Linus-style 5-layer code review system with security (OWASP Top 10) checks
|
|
467
|
+
|
|
468
|
+
### Plugin Architecture (v3.0)
|
|
469
|
+
- **6 Component Types**: Skills, Steering, Rules, Contexts, Agents, Hooks for comprehensive AI guidance
|
|
470
|
+
- **Specialized Agents**: Planner, Architect, Reviewer, Implementer, Security-Auditor, TDD-Guide personas
|
|
471
|
+
- **Always-Active Rules**: Coding-style, Testing, Security, Git-workflow, Error-handling enforcement
|
|
472
|
+
- **Mode-Specific Contexts**: Development, Review, Planning, Security-audit, Research modes
|
|
473
|
+
- **Event-Driven Hooks**: Pre/post tool-use and session lifecycle automation
|
|
474
|
+
- **Plugin Manifest**: `.claude-plugin/plugin.json` for Claude Code integration
|
|
475
|
+
|
|
476
|
+
### Codebase Analysis
|
|
477
|
+
- **Comprehensive Multi-Language Analysis**: Automatic detection of TypeScript, JavaScript, Java, Python, Go, Ruby, PHP, Rust, C#, Scala projects with framework-specific insights
|
|
478
|
+
- **Framework Detection**: Recognizes Spring Boot, Django, FastAPI, Flask, Rails, Laravel, Express, React, Vue, Angular, Next.js, and 20+ other frameworks
|
|
479
|
+
- **Architecture Pattern Recognition**: Detects DDD, MVC, Microservices, Clean Architecture patterns in your codebase
|
|
480
|
+
- **Context-Aware Generation**: Analyzes package.json, dependencies, build tools, test frameworks, and project structure for real content
|
|
481
|
+
|
|
482
|
+
### Guidelines & Standards
|
|
483
|
+
- **Coding Principles Enforcement**: Built-in SOLID, DRY, KISS, YAGNI, Separation of Concerns, and Modularity guidance
|
|
435
484
|
- **Comprehensive Steering Documents**: 8 auto-generated guidance docs (product, tech, structure, linus-review, commit, tdd-guideline, security-check, principles)
|
|
436
485
|
- **Multi-Language Support**: 10 languages with cultural adaptation (en, es, fr, de, it, pt, ru, ja, zh, ko)
|
|
437
486
|
- **Template Engine**: Handlebars-based file generation with project-specific data
|
|
@@ -558,10 +607,21 @@ As of v1.4.3, comprehensive codebase analysis is automatic with multi-language d
|
|
|
558
607
|
## 📖 Advanced Documentation
|
|
559
608
|
|
|
560
609
|
For detailed documentation on:
|
|
610
|
+
- **📥 Installation Guide**: See [docs/INSTALL-GUIDE.md](docs/INSTALL-GUIDE.md) for complete CLI usage examples with real output
|
|
611
|
+
- **🔄 Workflow Diagrams**: See [docs/WORKFLOW.md](docs/WORKFLOW.md) for sequence diagrams showing component interactions
|
|
561
612
|
- **🤖 AI Agent Guide**: See [AGENTS.md](AGENTS.md) for detailed instructions on using this server with AI agents
|
|
562
613
|
- **🏗️ Architecture Overview**: See [ARCHITECTURE.md](ARCHITECTURE.md) for complete system design, layered architecture, module loading, and Mermaid diagrams
|
|
614
|
+
- **📦 Plugin Manifest**: See [.claude-plugin/plugin.json](.claude-plugin/plugin.json) for Claude Code plugin configuration
|
|
563
615
|
- **Plugin Development**: See [DEPLOYMENT.md](DEPLOYMENT.md)
|
|
564
616
|
- **Docker Deployment**: See [Dockerfile](Dockerfile) and [docker-compose.yml](docker-compose.yml)
|
|
617
|
+
|
|
618
|
+
**Component Documentation (v3.0)**:
|
|
619
|
+
- **Rules**: See `rules/*.md` for always-active coding guidelines
|
|
620
|
+
- **Contexts**: See `contexts/*.md` for mode-specific system prompts
|
|
621
|
+
- **Agents**: See `agents/*.md` for specialized AI personas
|
|
622
|
+
- **Hooks**: See `hooks/**/*.md` for event-driven automation
|
|
623
|
+
|
|
624
|
+
**Steering Documents**:
|
|
565
625
|
- **Code Quality Standards**: Review `.spec/steering/linus-review.md`
|
|
566
626
|
- **TDD Guidelines**: See `.spec/steering/tdd-guideline.md` for complete Test-Driven Development workflow
|
|
567
627
|
- **Coding Principles**: Review `.spec/steering/principles.md` for SOLID, DRY, KISS, YAGNI, SoC, and Modularity guidance
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BaseManager, ComponentDescriptor } from '../shared/BaseManager.js';
|
|
2
|
+
/**
|
|
3
|
+
* Descriptor for an agent component
|
|
4
|
+
*/
|
|
5
|
+
export interface AgentDescriptor extends ComponentDescriptor {
|
|
6
|
+
/** Agent name */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Brief description of the agent */
|
|
9
|
+
description: string;
|
|
10
|
+
/** Path to the agent file */
|
|
11
|
+
path: string;
|
|
12
|
+
/** Role identifier (planner, architect, reviewer, implementer, etc.) */
|
|
13
|
+
role: string;
|
|
14
|
+
/** Area of expertise */
|
|
15
|
+
expertise: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Manages agent components - discovery, listing, and installation
|
|
19
|
+
*
|
|
20
|
+
* Agents are specialized AI personas that can be invoked for different tasks.
|
|
21
|
+
* Each agent has a specific role and expertise area.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const manager = new AgentManager('/path/to/agents');
|
|
26
|
+
* const agents = await manager.listComponents();
|
|
27
|
+
* const reviewer = await manager.getAgentByRole('reviewer');
|
|
28
|
+
* await manager.installComponents('/project/.claude/agents');
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare class AgentManager extends BaseManager<AgentDescriptor> {
|
|
32
|
+
/**
|
|
33
|
+
* Create a new AgentManager
|
|
34
|
+
* @param agentsPath - Path to the agents directory
|
|
35
|
+
*/
|
|
36
|
+
constructor(agentsPath: string);
|
|
37
|
+
/**
|
|
38
|
+
* Parse metadata from agent file content
|
|
39
|
+
* @param content - Raw content of the agent file
|
|
40
|
+
* @param filePath - Path to the agent file
|
|
41
|
+
* @returns Parsed agent descriptor
|
|
42
|
+
*/
|
|
43
|
+
protected parseMetadata(content: string, filePath: string): AgentDescriptor;
|
|
44
|
+
/**
|
|
45
|
+
* Get an agent by its role identifier
|
|
46
|
+
* @param role - Role identifier to search for
|
|
47
|
+
* @returns Agent descriptor if found, null otherwise
|
|
48
|
+
*/
|
|
49
|
+
getAgentByRole(role: string): Promise<AgentDescriptor | null>;
|
|
50
|
+
/**
|
|
51
|
+
* Get all available roles
|
|
52
|
+
* @returns Array of unique role identifiers
|
|
53
|
+
*/
|
|
54
|
+
listRoles(): Promise<string[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Get agents filtered by expertise keyword
|
|
57
|
+
* @param keyword - Keyword to search in expertise field
|
|
58
|
+
* @returns Array of agents with matching expertise
|
|
59
|
+
*/
|
|
60
|
+
findByExpertise(keyword: string): Promise<AgentDescriptor[]>;
|
|
61
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as path from 'path';
|
|
2
|
+
import { BaseManager } from '../shared/BaseManager.js';
|
|
3
|
+
/**
|
|
4
|
+
* Manages agent components - discovery, listing, and installation
|
|
5
|
+
*
|
|
6
|
+
* Agents are specialized AI personas that can be invoked for different tasks.
|
|
7
|
+
* Each agent has a specific role and expertise area.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const manager = new AgentManager('/path/to/agents');
|
|
12
|
+
* const agents = await manager.listComponents();
|
|
13
|
+
* const reviewer = await manager.getAgentByRole('reviewer');
|
|
14
|
+
* await manager.installComponents('/project/.claude/agents');
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export class AgentManager extends BaseManager {
|
|
18
|
+
/**
|
|
19
|
+
* Create a new AgentManager
|
|
20
|
+
* @param agentsPath - Path to the agents directory
|
|
21
|
+
*/
|
|
22
|
+
constructor(agentsPath) {
|
|
23
|
+
super({
|
|
24
|
+
componentPath: agentsPath,
|
|
25
|
+
structureType: 'file',
|
|
26
|
+
fileExtension: '.md',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Parse metadata from agent file content
|
|
31
|
+
* @param content - Raw content of the agent file
|
|
32
|
+
* @param filePath - Path to the agent file
|
|
33
|
+
* @returns Parsed agent descriptor
|
|
34
|
+
*/
|
|
35
|
+
parseMetadata(content, filePath) {
|
|
36
|
+
const metadata = this.parseYamlFrontmatter(content);
|
|
37
|
+
const fileName = path.basename(filePath, this.config.fileExtension);
|
|
38
|
+
return {
|
|
39
|
+
name: metadata.name || fileName,
|
|
40
|
+
description: metadata.description || '',
|
|
41
|
+
path: filePath,
|
|
42
|
+
role: metadata.role || 'assistant', // Default role
|
|
43
|
+
expertise: metadata.expertise || '',
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get an agent by its role identifier
|
|
48
|
+
* @param role - Role identifier to search for
|
|
49
|
+
* @returns Agent descriptor if found, null otherwise
|
|
50
|
+
*/
|
|
51
|
+
async getAgentByRole(role) {
|
|
52
|
+
const agents = await this.listComponents();
|
|
53
|
+
return agents.find(agent => agent.role === role) || null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get all available roles
|
|
57
|
+
* @returns Array of unique role identifiers
|
|
58
|
+
*/
|
|
59
|
+
async listRoles() {
|
|
60
|
+
const agents = await this.listComponents();
|
|
61
|
+
const roles = agents.map(agent => agent.role);
|
|
62
|
+
return [...new Set(roles)]; // Return unique roles
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get agents filtered by expertise keyword
|
|
66
|
+
* @param keyword - Keyword to search in expertise field
|
|
67
|
+
* @returns Array of agents with matching expertise
|
|
68
|
+
*/
|
|
69
|
+
async findByExpertise(keyword) {
|
|
70
|
+
const agents = await this.listComponents();
|
|
71
|
+
const lowerKeyword = keyword.toLowerCase();
|
|
72
|
+
return agents.filter(agent => agent.expertise.toLowerCase().includes(lowerKeyword));
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=AgentManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AgentManager.js","sourceRoot":"","sources":["../../src/agents/AgentManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAuB,MAAM,0BAA0B,CAAC;AAkB5E;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,YAAa,SAAQ,WAA4B;IAC5D;;;OAGG;IACH,YAAY,UAAkB;QAC5B,KAAK,CAAC;YACJ,aAAa,EAAE,UAAU;YACzB,aAAa,EAAE,MAAM;YACrB,aAAa,EAAE,KAAK;SACrB,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACO,aAAa,CAAC,OAAe,EAAE,QAAgB;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAEpE,OAAO;YACL,IAAI,EAAG,QAAQ,CAAC,IAAe,IAAI,QAAQ;YAC3C,WAAW,EAAG,QAAQ,CAAC,WAAsB,IAAI,EAAE;YACnD,IAAI,EAAE,QAAQ;YACd,IAAI,EAAG,QAAQ,CAAC,IAAe,IAAI,WAAW,EAAE,eAAe;YAC/D,SAAS,EAAG,QAAQ,CAAC,SAAoB,IAAI,EAAE;SAChD,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,cAAc,CAAC,IAAY;QAC/B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC3C,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,IAAI,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS;QACb,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,sBAAsB;IACpD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAe,CAAC,OAAe;QACnC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC3C,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC3B,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CACrD,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AgentManager, AgentDescriptor } from './AgentManager.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA,wBAAwB;AAExB,OAAO,EAAE,YAAY,EAAmB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Component types that can be installed
|
|
4
|
+
*/
|
|
5
|
+
export type ComponentType = 'skills' | 'steering' | 'rules' | 'contexts' | 'agents' | 'hooks';
|
|
2
6
|
/**
|
|
3
7
|
* CLI options for install-skills command
|
|
4
8
|
*/
|
|
@@ -7,6 +11,14 @@ export interface CLIOptions {
|
|
|
7
11
|
targetPath: string;
|
|
8
12
|
/** Target path for steering installation */
|
|
9
13
|
steeringPath: string;
|
|
14
|
+
/** Target path for rules installation */
|
|
15
|
+
rulesPath: string;
|
|
16
|
+
/** Target path for contexts installation */
|
|
17
|
+
contextsPath: string;
|
|
18
|
+
/** Target path for agents installation */
|
|
19
|
+
agentsPath: string;
|
|
20
|
+
/** Target path for hooks installation */
|
|
21
|
+
hooksPath: string;
|
|
10
22
|
/** Only list skills, don't install */
|
|
11
23
|
listOnly: boolean;
|
|
12
24
|
/** Show help message */
|
|
@@ -15,12 +27,26 @@ export interface CLIOptions {
|
|
|
15
27
|
skillsOnly: boolean;
|
|
16
28
|
/** Install steering only (for unified install) */
|
|
17
29
|
steeringOnly: boolean;
|
|
30
|
+
/** Install rules only */
|
|
31
|
+
rulesOnly: boolean;
|
|
32
|
+
/** Install contexts only */
|
|
33
|
+
contextsOnly: boolean;
|
|
34
|
+
/** Install agents only */
|
|
35
|
+
agentsOnly: boolean;
|
|
36
|
+
/** Install hooks only */
|
|
37
|
+
hooksOnly: boolean;
|
|
38
|
+
/** Components to install (empty means all) */
|
|
39
|
+
components: ComponentType[];
|
|
18
40
|
}
|
|
19
41
|
/**
|
|
20
|
-
* CLI for installing SDD
|
|
42
|
+
* CLI for installing SDD components to a project
|
|
21
43
|
*/
|
|
22
44
|
export declare class InstallSkillsCLI {
|
|
23
45
|
private skillManager;
|
|
46
|
+
private rulesManager;
|
|
47
|
+
private contextManager;
|
|
48
|
+
private agentManager;
|
|
49
|
+
private hookLoader;
|
|
24
50
|
private steeringPath;
|
|
25
51
|
/**
|
|
26
52
|
* Create CLI instance
|
|
@@ -29,13 +55,10 @@ export declare class InstallSkillsCLI {
|
|
|
29
55
|
*/
|
|
30
56
|
constructor(skillsPath?: string, steeringPath?: string);
|
|
31
57
|
/**
|
|
32
|
-
* Get the default
|
|
33
|
-
|
|
34
|
-
private getDefaultSkillsPath;
|
|
35
|
-
/**
|
|
36
|
-
* Get the default steering path based on package location
|
|
58
|
+
* Get the default path for a component type based on package location
|
|
59
|
+
* @param componentDir - The component directory name (skills, steering, rules, etc.)
|
|
37
60
|
*/
|
|
38
|
-
private
|
|
61
|
+
private getDefaultPath;
|
|
39
62
|
/**
|
|
40
63
|
* Parse command line arguments
|
|
41
64
|
* @param args - Command line arguments (process.argv.slice(2))
|
|
@@ -48,7 +71,7 @@ export declare class InstallSkillsCLI {
|
|
|
48
71
|
*/
|
|
49
72
|
run(options: CLIOptions): Promise<void>;
|
|
50
73
|
/**
|
|
51
|
-
* Run unified install (
|
|
74
|
+
* Run unified install (all components)
|
|
52
75
|
* @param options - CLI options
|
|
53
76
|
*/
|
|
54
77
|
runUnified(options: CLIOptions): Promise<void>;
|
|
@@ -61,19 +84,41 @@ export declare class InstallSkillsCLI {
|
|
|
61
84
|
*/
|
|
62
85
|
private listSteering;
|
|
63
86
|
/**
|
|
64
|
-
* List all available
|
|
87
|
+
* List all available components
|
|
65
88
|
*/
|
|
66
89
|
private listAll;
|
|
67
90
|
/**
|
|
68
91
|
* Install skills to target directory
|
|
69
|
-
* @param targetPath - Target directory
|
|
70
92
|
*/
|
|
71
93
|
private installSkills;
|
|
72
94
|
/**
|
|
73
95
|
* Install steering documents to target directory
|
|
74
|
-
* @param targetPath - Target directory (e.g., .spec/steering)
|
|
75
96
|
*/
|
|
76
97
|
private installSteering;
|
|
98
|
+
/**
|
|
99
|
+
* Copy steering files to target directory
|
|
100
|
+
*/
|
|
101
|
+
private installSteeringFiles;
|
|
102
|
+
/**
|
|
103
|
+
* Log installation results with consistent formatting
|
|
104
|
+
*/
|
|
105
|
+
private logInstallResult;
|
|
106
|
+
/**
|
|
107
|
+
* Install rules to target directory
|
|
108
|
+
*/
|
|
109
|
+
private installRules;
|
|
110
|
+
/**
|
|
111
|
+
* Install contexts to target directory
|
|
112
|
+
*/
|
|
113
|
+
private installContexts;
|
|
114
|
+
/**
|
|
115
|
+
* Install agents to target directory
|
|
116
|
+
*/
|
|
117
|
+
private installAgents;
|
|
118
|
+
/**
|
|
119
|
+
* Install hooks to target directory
|
|
120
|
+
*/
|
|
121
|
+
private installHooks;
|
|
77
122
|
/**
|
|
78
123
|
* Get help text
|
|
79
124
|
* @returns Help message
|