specweave 0.6.7 → 0.6.8
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/CLAUDE.md +30 -21
- package/dist/adapters/adapter-interface.d.ts +11 -11
- package/dist/adapters/adapter-interface.d.ts.map +1 -1
- package/dist/adapters/adapter-interface.js +1 -1
- package/dist/adapters/adapter-loader.d.ts +1 -2
- package/dist/adapters/adapter-loader.d.ts.map +1 -1
- package/dist/adapters/adapter-loader.js +3 -6
- package/dist/adapters/adapter-loader.js.map +1 -1
- package/dist/adapters/agents-md-generator.d.ts +3 -3
- package/dist/adapters/agents-md-generator.js +3 -3
- package/dist/adapters/generic/adapter.d.ts +2 -2
- package/dist/adapters/generic/adapter.d.ts.map +1 -1
- package/dist/adapters/generic/adapter.js +28 -9
- package/dist/adapters/generic/adapter.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +51 -22
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/core/types/config.d.ts +2 -2
- package/dist/core/types/config.d.ts.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/commands/do.md +2 -0
- package/plugins/specweave/commands/done.md +2 -0
- package/plugins/specweave/commands/inc.md +1 -1
- package/plugins/specweave/commands/validate.md +2 -0
- package/plugins/specweave/hooks/docs-changed.sh +23 -3
- package/plugins/specweave/hooks/human-input-required.sh +23 -3
- package/plugins/specweave/hooks/post-task-completion.sh +20 -1
- package/plugins/specweave/hooks/pre-implementation.sh +23 -3
- package/src/adapters/README.md +27 -63
- package/src/adapters/adapter-interface.ts +11 -11
- package/src/adapters/adapter-loader.ts +3 -6
- package/src/adapters/agents-md-generator.ts +3 -3
- package/src/adapters/generic/adapter.ts +28 -9
- package/src/templates/AGENTS.md.template +351 -0
- package/dist/adapters/copilot/adapter.d.ts +0 -86
- package/dist/adapters/copilot/adapter.d.ts.map +0 -1
- package/dist/adapters/copilot/adapter.js +0 -396
- package/dist/adapters/copilot/adapter.js.map +0 -1
- package/plugins/.specweave/logs/hooks-debug.log +0 -24
- package/plugins/.specweave/logs/last-hook-fire +0 -1
- package/plugins/.specweave/logs/last-todowrite-time +0 -1
- package/plugins/.specweave/logs/tasks.log +0 -6
- package/src/adapters/copilot/README.md +0 -240
- package/src/adapters/copilot/adapter.ts +0 -444
|
@@ -11,7 +11,6 @@ import * as YAML from 'yaml';
|
|
|
11
11
|
import { execSync } from 'child_process';
|
|
12
12
|
import { IAdapter } from './adapter-interface.js';
|
|
13
13
|
import { CursorAdapter } from './cursor/adapter.js';
|
|
14
|
-
import { CopilotAdapter } from './copilot/adapter.js';
|
|
15
14
|
import { GeminiAdapter } from './gemini/adapter.js';
|
|
16
15
|
import { CodexAdapter } from './codex/adapter.js';
|
|
17
16
|
import { GenericAdapter } from './generic/adapter.js';
|
|
@@ -53,7 +52,6 @@ export class AdapterLoader {
|
|
|
53
52
|
private initializeAdapters(): void {
|
|
54
53
|
// Note: No ClaudeAdapter - Claude is the baseline, not an adaptation!
|
|
55
54
|
this.adapters.set('cursor', new CursorAdapter());
|
|
56
|
-
this.adapters.set('copilot', new CopilotAdapter());
|
|
57
55
|
this.adapters.set('gemini', new GeminiAdapter());
|
|
58
56
|
this.adapters.set('codex', new CodexAdapter());
|
|
59
57
|
this.adapters.set('generic', new GenericAdapter());
|
|
@@ -101,8 +99,7 @@ export class AdapterLoader {
|
|
|
101
99
|
* 2. Cursor (if cursor CLI or .cursor/ or .cursorrules exists)
|
|
102
100
|
* 3. Gemini CLI (if gemini CLI found)
|
|
103
101
|
* 4. Codex (if codex CLI found)
|
|
104
|
-
* 5.
|
|
105
|
-
* 6. Generic (only if explicitly requested via --adapter generic)
|
|
102
|
+
* 5. Generic (only if explicitly requested via --adapter generic)
|
|
106
103
|
*
|
|
107
104
|
* @returns Promise<string> Detected tool name (not adapter - Claude has no adapter!)
|
|
108
105
|
*/
|
|
@@ -110,7 +107,7 @@ export class AdapterLoader {
|
|
|
110
107
|
console.log('🔍 Detecting AI coding tool...\n');
|
|
111
108
|
|
|
112
109
|
// Check other tools first (if they have specific indicators)
|
|
113
|
-
const detectionOrder = ['cursor', 'gemini', 'codex'
|
|
110
|
+
const detectionOrder = ['cursor', 'gemini', 'codex'];
|
|
114
111
|
|
|
115
112
|
for (const adapterName of detectionOrder) {
|
|
116
113
|
const adapter = this.adapters.get(adapterName);
|
|
@@ -241,7 +238,7 @@ export class AdapterLoader {
|
|
|
241
238
|
if (explicitChoice) {
|
|
242
239
|
const adapter = this.adapters.get(explicitChoice);
|
|
243
240
|
if (!adapter) {
|
|
244
|
-
throw new Error(`Invalid adapter: ${explicitChoice}. Use 'claude', 'cursor',
|
|
241
|
+
throw new Error(`Invalid adapter: ${explicitChoice}. Use 'claude', 'cursor', or 'generic'`);
|
|
245
242
|
}
|
|
246
243
|
return adapter;
|
|
247
244
|
}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
* IMPORTANT:
|
|
8
8
|
* - Claude Code does NOT read this file - it only reads CLAUDE.md
|
|
9
|
-
* - This file is for: Cursor,
|
|
9
|
+
* - This file is for: Cursor, GitHub Copilot, ChatGPT, Gemini, and ANY other AI tool
|
|
10
10
|
*
|
|
11
11
|
* This ONE file replaces:
|
|
12
|
-
* - .cursorrules (Cursor)
|
|
13
|
-
* - .github/copilot/instructions.md (Copilot)
|
|
12
|
+
* - .cursorrules (Cursor - legacy)
|
|
13
|
+
* - .github/copilot/instructions.md (Copilot - no longer needed, Copilot reads AGENTS.md)
|
|
14
14
|
* - Any other tool-specific configuration files
|
|
15
15
|
*/
|
|
16
16
|
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Universal adapter that works with ANY AI tool.
|
|
5
5
|
* All AI tools can read AGENTS.md (universal standard) for workflow instructions.
|
|
6
6
|
*
|
|
7
|
-
* This adapter ensures 100% compatibility - works with
|
|
8
|
-
* Gemini, or literally ANY AI that can read markdown and follow instructions.
|
|
7
|
+
* This adapter ensures 100% compatibility - works with GitHub Copilot, ChatGPT web,
|
|
8
|
+
* Claude web, Gemini, or literally ANY AI that can read markdown and follow instructions.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import * as path from 'path';
|
|
@@ -18,7 +18,7 @@ import type { SupportedLanguage } from '../../core/i18n/types.js';
|
|
|
18
18
|
|
|
19
19
|
export class GenericAdapter extends AdapterBase {
|
|
20
20
|
name = 'generic';
|
|
21
|
-
description = 'Generic adapter - AGENTS.md works with ANY AI tool (ChatGPT, Gemini, etc.)';
|
|
21
|
+
description = 'Generic adapter - AGENTS.md works with ANY AI tool (Copilot, ChatGPT, Gemini, etc.)';
|
|
22
22
|
automationLevel = 'manual' as const;
|
|
23
23
|
|
|
24
24
|
/**
|
|
@@ -49,7 +49,7 @@ export class GenericAdapter extends AdapterBase {
|
|
|
49
49
|
console.log('\n📦 Configuring for Universal AI Tool Compatibility\n');
|
|
50
50
|
|
|
51
51
|
// No files to install - any AI can read AGENTS.md
|
|
52
|
-
console.log('✅ AGENTS.md works with any AI tool (ChatGPT, Gemini, Claude web, etc.)');
|
|
52
|
+
console.log('✅ AGENTS.md works with any AI tool (Copilot, ChatGPT, Gemini, Claude web, etc.)');
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -72,19 +72,38 @@ Your project is now configured for ANY AI tool!
|
|
|
72
72
|
|
|
73
73
|
WHAT THIS PROVIDES:
|
|
74
74
|
|
|
75
|
-
- AGENTS.
|
|
76
|
-
-
|
|
75
|
+
- AGENTS.MD (Universal Standard)
|
|
76
|
+
- GitHub Copilot automatically reads this file
|
|
77
|
+
- ChatGPT, Gemini, Claude web can also use it
|
|
77
78
|
- Contains all workflow instructions
|
|
78
79
|
- Project structure and templates
|
|
79
80
|
- Following agents.md standard (https://agents.md/)
|
|
80
81
|
|
|
81
82
|
- 100% Compatibility
|
|
83
|
+
- GitHub Copilot (best experience with AGENTS.md)
|
|
82
84
|
- ChatGPT (web), Claude (web), Gemini
|
|
83
85
|
- Any AI that can read markdown
|
|
84
86
|
|
|
85
87
|
HOW TO USE AGENTS.MD WITH ANY AI:
|
|
86
88
|
|
|
87
|
-
Method 1:
|
|
89
|
+
Method 1: Command Discovery (GitHub Copilot - Recommended!)
|
|
90
|
+
1. AI reads AGENTS.md automatically (Copilot scans project files)
|
|
91
|
+
2. AGENTS.md contains "SpecWeave Commands" section with all 17 commands
|
|
92
|
+
3. Ask: "create increment for payments" or "run /inc payments"
|
|
93
|
+
4. AI reads plugins/specweave/commands/inc.md
|
|
94
|
+
5. AI executes PM-led workflow (market research, spec.md, plan.md, tasks.md)
|
|
95
|
+
6. Increment created - same result as Claude Code!
|
|
96
|
+
|
|
97
|
+
Available commands AI can execute:
|
|
98
|
+
- /inc "feature" - Plan new increment
|
|
99
|
+
- /do - Execute implementation tasks
|
|
100
|
+
- /done 0001 - Close increment
|
|
101
|
+
- /validate 0001 - Quality validation
|
|
102
|
+
- /progress - Check status
|
|
103
|
+
- /sync-docs - Sync living documentation
|
|
104
|
+
... and 11 more commands!
|
|
105
|
+
|
|
106
|
+
Method 2: Copy-Paste Workflow (ChatGPT web, Claude web, etc.)
|
|
88
107
|
1. Open AGENTS.md in your browser/editor
|
|
89
108
|
2. Copy relevant section (e.g., "Creating a Feature Increment")
|
|
90
109
|
3. Paste into AI chat (ChatGPT, Claude web, Gemini, etc.)
|
|
@@ -92,10 +111,10 @@ Method 1: Copy-Paste Workflow (ChatGPT web, Claude web, etc.)
|
|
|
92
111
|
5. AI generates content (spec.md, plan.md, etc.)
|
|
93
112
|
6. Copy AI's response, save to files
|
|
94
113
|
|
|
95
|
-
Method
|
|
114
|
+
Method 3: File System Access (AI with file access)
|
|
96
115
|
1. AI automatically reads AGENTS.md
|
|
97
116
|
2. Ask: "Create increment for user authentication"
|
|
98
|
-
3. AI follows AGENTS.md workflow
|
|
117
|
+
3. AI follows AGENTS.md workflow and command execution instructions
|
|
99
118
|
4. AI creates files directly
|
|
100
119
|
|
|
101
120
|
UNDERSTANDING "MANUAL":
|
|
@@ -205,6 +205,357 @@ cat plugins/specweave-github/commands/github-sync.md
|
|
|
205
205
|
|
|
206
206
|
---
|
|
207
207
|
|
|
208
|
+
## 🚀 SpecWeave Commands (Executable Workflows)
|
|
209
|
+
|
|
210
|
+
**⚡ CRITICAL FOR NON-CLAUDE TOOLS**: Commands are NOT automatic in GitHub Copilot, Cursor, or other tools. You MUST manually discover and execute them.
|
|
211
|
+
|
|
212
|
+
### What Are Commands?
|
|
213
|
+
|
|
214
|
+
Commands are **executable workflows** defined as `.md` files in `plugins/specweave/commands/`. Each file contains:
|
|
215
|
+
- Command name (from filename, e.g., `inc.md` → `/inc`)
|
|
216
|
+
- Complete workflow instructions
|
|
217
|
+
- Parameters and usage examples
|
|
218
|
+
- Step-by-step execution guide
|
|
219
|
+
|
|
220
|
+
**Think of them as runnable scripts** - when user requests a command, you read the file and execute the workflow.
|
|
221
|
+
|
|
222
|
+
### Command Discovery (MANDATORY!)
|
|
223
|
+
|
|
224
|
+
**At the start of EVERY session**, discover available commands:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
# List all core commands
|
|
228
|
+
ls plugins/specweave/commands/
|
|
229
|
+
|
|
230
|
+
# Common output:
|
|
231
|
+
# inc.md - Plan new increment (/inc "feature")
|
|
232
|
+
# do.md - Execute implementation (/do)
|
|
233
|
+
# done.md - Close increment (/done 0001)
|
|
234
|
+
# validate.md - Validate increment (/validate 0001)
|
|
235
|
+
# progress.md - Check status (/progress)
|
|
236
|
+
# sync-docs.md - Sync living docs (/sync-docs)
|
|
237
|
+
# next.md - Smart increment transition
|
|
238
|
+
# costs.md - Display AI cost dashboard
|
|
239
|
+
# translate.md - Translate content
|
|
240
|
+
# tdd-*.md - TDD workflow commands
|
|
241
|
+
# ... (17 commands total)
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**For plugin commands** (if plugins/ folder exists):
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# List plugin commands
|
|
248
|
+
ls plugins/specweave-github/commands/
|
|
249
|
+
|
|
250
|
+
# Example output:
|
|
251
|
+
# github-create-issue.md
|
|
252
|
+
# github-sync.md
|
|
253
|
+
# github-close-issue.md
|
|
254
|
+
# github-status.md
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### How to Execute Commands (Step-by-Step)
|
|
258
|
+
|
|
259
|
+
**When user says**: "create new increment for user auth" or "run /inc user auth"
|
|
260
|
+
|
|
261
|
+
**You should**:
|
|
262
|
+
|
|
263
|
+
1. **Identify the command**:
|
|
264
|
+
- Keywords match: "create increment" → `inc.md`
|
|
265
|
+
- Explicit slash: "/inc" → `inc.md`
|
|
266
|
+
- Map request to command file
|
|
267
|
+
|
|
268
|
+
2. **Read the command file**:
|
|
269
|
+
```bash
|
|
270
|
+
cat plugins/specweave/commands/inc.md
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
3. **Parse the workflow**:
|
|
274
|
+
- Read YAML frontmatter for metadata
|
|
275
|
+
- Read markdown body for steps
|
|
276
|
+
- Note required parameters
|
|
277
|
+
- Understand expected output
|
|
278
|
+
|
|
279
|
+
4. **Execute the workflow**:
|
|
280
|
+
- Follow instructions EXACTLY as written
|
|
281
|
+
- Use parameters from user request
|
|
282
|
+
- Reference related files (spec templates, etc.)
|
|
283
|
+
- Show progress as you work
|
|
284
|
+
|
|
285
|
+
5. **Provide output**:
|
|
286
|
+
- Confirm completion
|
|
287
|
+
- Show created files
|
|
288
|
+
- Suggest next steps
|
|
289
|
+
|
|
290
|
+
### Example: Executing /inc Command
|
|
291
|
+
|
|
292
|
+
**User says**: "create new increment for user authentication"
|
|
293
|
+
|
|
294
|
+
**Your workflow**:
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
# Step 1: Identify command
|
|
298
|
+
# "create increment" → inc.md
|
|
299
|
+
|
|
300
|
+
# Step 2: Read command file
|
|
301
|
+
cat plugins/specweave/commands/inc.md
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**After reading inc.md, you learn**:
|
|
305
|
+
- This is PM-led increment planning
|
|
306
|
+
- Requires: feature description
|
|
307
|
+
- Creates: spec.md, plan.md, tasks.md, tests.md
|
|
308
|
+
- Location: `.specweave/increments/####-feature-name/`
|
|
309
|
+
|
|
310
|
+
**Step 3: Execute workflow from inc.md**:
|
|
311
|
+
|
|
312
|
+
```markdown
|
|
313
|
+
# You see these instructions in inc.md:
|
|
314
|
+
|
|
315
|
+
1. **Detect tech stack** (TypeScript, Python, Go, etc.)
|
|
316
|
+
2. **PM-led planning**:
|
|
317
|
+
- Market research
|
|
318
|
+
- Create spec.md (WHAT & WHY)
|
|
319
|
+
- Create plan.md (HOW)
|
|
320
|
+
- Auto-generate tasks.md from plan
|
|
321
|
+
- Create tests.md (test strategy)
|
|
322
|
+
3. **Strategic agent review**:
|
|
323
|
+
- Architect designs system
|
|
324
|
+
- Security reviews threats
|
|
325
|
+
- QA defines test strategy
|
|
326
|
+
4. **User review checkpoint**
|
|
327
|
+
5. **Ready to build**
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**Step 4: Execute those steps**:
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
📂 Creating increment 0001-user-authentication...
|
|
334
|
+
|
|
335
|
+
🔍 Tech stack detected: TypeScript + Node.js + PostgreSQL
|
|
336
|
+
|
|
337
|
+
👔 Adopting PM role to create spec.md...
|
|
338
|
+
✓ Market research: Auth requirements
|
|
339
|
+
✓ User stories: Login, Register, Password Reset
|
|
340
|
+
✓ Acceptance criteria: TC-0001 to TC-0015
|
|
341
|
+
✓ Created spec.md (WHAT & WHY, technology-agnostic)
|
|
342
|
+
|
|
343
|
+
🏗️ Adopting Architect role to create plan.md...
|
|
344
|
+
✓ Architecture: JWT + bcrypt + Prisma
|
|
345
|
+
✓ API contracts: POST /auth/login, /auth/register
|
|
346
|
+
✓ Data model: User table schema
|
|
347
|
+
✓ Created plan.md (HOW, technology-specific)
|
|
348
|
+
|
|
349
|
+
📋 Auto-generating tasks.md from plan.md...
|
|
350
|
+
✓ Generated 42 tasks with model hints
|
|
351
|
+
✓ Estimated: 3-4 weeks
|
|
352
|
+
|
|
353
|
+
🧪 Creating tests.md (QA strategy)...
|
|
354
|
+
✓ 12 test cases, 85% coverage target
|
|
355
|
+
|
|
356
|
+
✅ Increment 0001-user-authentication ready!
|
|
357
|
+
|
|
358
|
+
Next: /do 0001 (execute implementation)
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
**Step 5: Confirm completion**:
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
✅ Created increment 0001-user-authentication
|
|
365
|
+
|
|
366
|
+
Files:
|
|
367
|
+
• .specweave/increments/0001-user-authentication/spec.md
|
|
368
|
+
• .specweave/increments/0001-user-authentication/plan.md
|
|
369
|
+
• .specweave/increments/0001-user-authentication/tasks.md
|
|
370
|
+
• .specweave/increments/0001-user-authentication/tests.md
|
|
371
|
+
|
|
372
|
+
Next steps:
|
|
373
|
+
1. Review generated files
|
|
374
|
+
2. Run: /do 0001 (execute implementation)
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Core Command Reference
|
|
378
|
+
|
|
379
|
+
**Most Common** (use these daily):
|
|
380
|
+
|
|
381
|
+
| Command | File | Purpose | Example |
|
|
382
|
+
|---------|------|---------|---------|
|
|
383
|
+
| `/inc` | `inc.md` | Plan new increment | `/inc "user auth"` |
|
|
384
|
+
| `/do` | `do.md` | Execute implementation | `/do 0001` |
|
|
385
|
+
| `/done` | `done.md` | Close increment | `/done 0001` |
|
|
386
|
+
| `/validate` | `validate.md` | Validate quality | `/validate 0001` |
|
|
387
|
+
| `/progress` | `progress.md` | Check status | `/progress` |
|
|
388
|
+
|
|
389
|
+
**Specialized** (use when needed):
|
|
390
|
+
|
|
391
|
+
| Command | File | Purpose | Example |
|
|
392
|
+
|---------|------|---------|---------|
|
|
393
|
+
| `/sync-docs` | `sync-docs.md` | Sync living docs | `/sync-docs update` |
|
|
394
|
+
| `/next` | `next.md` | Smart increment transition | `/next` |
|
|
395
|
+
| `/costs` | `costs.md` | AI cost dashboard | `/costs 0001` |
|
|
396
|
+
| `/translate` | `translate.md` | Translate content | `/translate ru` |
|
|
397
|
+
| `/tdd-cycle` | `tdd-cycle.md` | TDD workflow | `/tdd-cycle` |
|
|
398
|
+
|
|
399
|
+
**Plugin Commands** (when plugins installed):
|
|
400
|
+
|
|
401
|
+
| Command | File | Purpose | Plugin |
|
|
402
|
+
|---------|------|---------|--------|
|
|
403
|
+
| `/github:sync` | `plugins/specweave-github/commands/github-sync.md` | Sync to GitHub | specweave-github |
|
|
404
|
+
| `/github:create-issue` | `plugins/specweave-github/commands/github-create-issue.md` | Create GitHub issue | specweave-github |
|
|
405
|
+
|
|
406
|
+
### Command Execution Pattern (Template)
|
|
407
|
+
|
|
408
|
+
Use this pattern for ANY command execution:
|
|
409
|
+
|
|
410
|
+
```bash
|
|
411
|
+
# 1. User request
|
|
412
|
+
# User: "sync to GitHub"
|
|
413
|
+
|
|
414
|
+
# 2. Identify command
|
|
415
|
+
# Keywords: "sync", "GitHub" → github-sync.md
|
|
416
|
+
|
|
417
|
+
# 3. Read command file
|
|
418
|
+
cat plugins/specweave-github/commands/github-sync.md
|
|
419
|
+
|
|
420
|
+
# 4. Parse workflow
|
|
421
|
+
# - Requires: increment ID, GitHub token
|
|
422
|
+
# - Creates: GitHub issue
|
|
423
|
+
# - Syncs: tasks, progress, labels
|
|
424
|
+
|
|
425
|
+
# 5. Execute workflow
|
|
426
|
+
# Follow steps in github-sync.md:
|
|
427
|
+
# - Load increment
|
|
428
|
+
# - Create/update GitHub issue
|
|
429
|
+
# - Sync task checklist
|
|
430
|
+
# - Add labels and milestone
|
|
431
|
+
# - Post comment with summary
|
|
432
|
+
|
|
433
|
+
# 6. Confirm completion
|
|
434
|
+
# "✅ Synced increment 0001 to GitHub issue #42"
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Why This Matters (Claude Code vs Other Tools)
|
|
438
|
+
|
|
439
|
+
**Claude Code** (automatic):
|
|
440
|
+
- Commands work via native slash syntax: `/inc "feature"`
|
|
441
|
+
- No manual reading needed
|
|
442
|
+
- Commands execute automatically
|
|
443
|
+
|
|
444
|
+
**Other Tools** (manual):
|
|
445
|
+
- ❌ No native command support
|
|
446
|
+
- ✅ **Solution**: Read command .md file and execute workflow
|
|
447
|
+
- Commands become "pseudo-executable" via this pattern
|
|
448
|
+
- Same workflows, just manual discovery
|
|
449
|
+
|
|
450
|
+
**GitHub Copilot Example**:
|
|
451
|
+
|
|
452
|
+
```
|
|
453
|
+
User: "create increment for payments"
|
|
454
|
+
|
|
455
|
+
Copilot (you):
|
|
456
|
+
1. Recognize command request: "create increment" → /inc
|
|
457
|
+
2. Read: cat plugins/specweave/commands/inc.md
|
|
458
|
+
3. Execute: Follow PM-led workflow from inc.md
|
|
459
|
+
4. Create: spec.md, plan.md, tasks.md in .specweave/increments/0002-payments/
|
|
460
|
+
5. Confirm: "✅ Increment 0002-payments created"
|
|
461
|
+
|
|
462
|
+
User gets SAME result as Claude Code, just via manual execution!
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
### Command Discovery Checklist (Session Start)
|
|
466
|
+
|
|
467
|
+
**MANDATORY for non-Claude tools**:
|
|
468
|
+
|
|
469
|
+
```bash
|
|
470
|
+
# 1. Discover core commands
|
|
471
|
+
ls plugins/specweave/commands/
|
|
472
|
+
# Note: 17 commands available (inc, do, done, validate, etc.)
|
|
473
|
+
|
|
474
|
+
# 2. Check for plugin commands
|
|
475
|
+
if [ -d "plugins/specweave-github" ]; then
|
|
476
|
+
ls plugins/specweave-github/commands/
|
|
477
|
+
# Note: 4 GitHub commands available
|
|
478
|
+
fi
|
|
479
|
+
|
|
480
|
+
# 3. Document available commands
|
|
481
|
+
echo "Session Context:
|
|
482
|
+
- Core commands: 17 available (inc, do, done, validate, ...)
|
|
483
|
+
- Plugin commands: 4 GitHub commands (if plugin installed)
|
|
484
|
+
- Command execution: Read .md file → Execute workflow
|
|
485
|
+
"
|
|
486
|
+
|
|
487
|
+
# 4. Ready to execute commands when requested
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
### Advanced: Batch Command Execution
|
|
491
|
+
|
|
492
|
+
Some workflows require multiple commands:
|
|
493
|
+
|
|
494
|
+
**Example**: Complete increment lifecycle
|
|
495
|
+
|
|
496
|
+
```bash
|
|
497
|
+
# User: "Plan, build, and close user auth feature"
|
|
498
|
+
|
|
499
|
+
# Step 1: Execute /inc
|
|
500
|
+
cat plugins/specweave/commands/inc.md
|
|
501
|
+
# → Create spec.md, plan.md, tasks.md
|
|
502
|
+
|
|
503
|
+
# Step 2: Execute /do
|
|
504
|
+
cat plugins/specweave/commands/do.md
|
|
505
|
+
# → Execute all 42 tasks
|
|
506
|
+
|
|
507
|
+
# Step 3: Execute /validate
|
|
508
|
+
cat plugins/specweave/commands/validate.md
|
|
509
|
+
# → Quality checks
|
|
510
|
+
|
|
511
|
+
# Step 4: Execute /done
|
|
512
|
+
cat plugins/specweave/commands/done.md
|
|
513
|
+
# → PM validation and closure
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
### Troubleshooting
|
|
517
|
+
|
|
518
|
+
**Command file not found?**
|
|
519
|
+
|
|
520
|
+
```bash
|
|
521
|
+
# Check if command exists
|
|
522
|
+
ls plugins/specweave/commands/ | grep inc
|
|
523
|
+
# If not found, command doesn't exist
|
|
524
|
+
|
|
525
|
+
# Check plugin commands
|
|
526
|
+
ls plugins/specweave-*/commands/
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
**Command syntax unclear?**
|
|
530
|
+
|
|
531
|
+
```bash
|
|
532
|
+
# Read command README
|
|
533
|
+
cat plugins/specweave/commands/README.md
|
|
534
|
+
# Contains overview of all commands
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
**Command fails during execution?**
|
|
538
|
+
|
|
539
|
+
- Re-read command file for missed steps
|
|
540
|
+
- Check required files exist (spec.md, plan.md, etc.)
|
|
541
|
+
- Verify parameters are correct
|
|
542
|
+
- Check error messages for hints
|
|
543
|
+
|
|
544
|
+
### Summary: Making Commands Work Without Claude Code
|
|
545
|
+
|
|
546
|
+
**The Key Insight**: Commands are just markdown files with workflows!
|
|
547
|
+
|
|
548
|
+
1. **Discover**: `ls plugins/specweave/commands/`
|
|
549
|
+
2. **Read**: `cat plugins/specweave/commands/{command}.md`
|
|
550
|
+
3. **Execute**: Follow the workflow in the file
|
|
551
|
+
4. **Confirm**: Show completion and next steps
|
|
552
|
+
|
|
553
|
+
**Result**: GitHub Copilot, Cursor, and other tools get the SAME SpecWeave command capabilities as Claude Code, just via manual execution instead of slash syntax.
|
|
554
|
+
|
|
555
|
+
**This is CRITICAL** - without command execution, you're missing 90% of SpecWeave's automation!
|
|
556
|
+
|
|
557
|
+
---
|
|
558
|
+
|
|
208
559
|
## Available Agents (Specialized Roles)
|
|
209
560
|
|
|
210
561
|
SpecWeave uses role-based development. When working on tasks, adopt the appropriate role:
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub Copilot Adapter
|
|
3
|
-
*
|
|
4
|
-
* Basic automation adapter for GitHub Copilot.
|
|
5
|
-
* Compiles SpecWeave plugins to AGENTS.md (universal standard) for context and suggestions.
|
|
6
|
-
*
|
|
7
|
-
* This adapter compiles skills, agents, and commands into AGENTS.md format.
|
|
8
|
-
*/
|
|
9
|
-
import { AdapterBase } from '../adapter-base.js';
|
|
10
|
-
import { AdapterOptions, AdapterFile } from '../adapter-interface.js';
|
|
11
|
-
import type { Plugin } from '../../core/types/plugin.js';
|
|
12
|
-
export declare class CopilotAdapter extends AdapterBase {
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
automationLevel: "basic";
|
|
16
|
-
/**
|
|
17
|
-
* Detect if GitHub Copilot is available
|
|
18
|
-
*
|
|
19
|
-
* Note: Detection is best-effort since Copilot might be installed
|
|
20
|
-
* but we can't detect it reliably. This adapter is safe to use
|
|
21
|
-
* as a fallback since Copilot reads AGENTS.md (universal standard).
|
|
22
|
-
*/
|
|
23
|
-
detect(): Promise<boolean>;
|
|
24
|
-
/**
|
|
25
|
-
* Get files to install for Copilot adapter
|
|
26
|
-
*
|
|
27
|
-
* Note: Copilot automatically reads AGENTS.md (universal standard).
|
|
28
|
-
* No additional files needed.
|
|
29
|
-
*/
|
|
30
|
-
getFiles(): AdapterFile[];
|
|
31
|
-
/**
|
|
32
|
-
* Install Copilot adapter
|
|
33
|
-
*/
|
|
34
|
-
install(options: AdapterOptions): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Post-installation instructions
|
|
37
|
-
*/
|
|
38
|
-
postInstall(options: AdapterOptions): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Get usage instructions for Copilot adapter
|
|
41
|
-
*/
|
|
42
|
-
getInstructions(): string;
|
|
43
|
-
/**
|
|
44
|
-
* Check if Copilot adapter supports plugins
|
|
45
|
-
*
|
|
46
|
-
* Copilot has plugin support via AGENTS.md compilation (same as Cursor)
|
|
47
|
-
*
|
|
48
|
-
* @returns boolean True for Copilot
|
|
49
|
-
*/
|
|
50
|
-
supportsPlugins(): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Read language configuration from project config
|
|
53
|
-
*
|
|
54
|
-
* @returns Language setting from config, defaults to 'en'
|
|
55
|
-
*/
|
|
56
|
-
private getLanguageConfig;
|
|
57
|
-
/**
|
|
58
|
-
* Inject system prompt for non-English languages
|
|
59
|
-
*
|
|
60
|
-
* Prepends language instruction to markdown content if language !== 'en'
|
|
61
|
-
*
|
|
62
|
-
* @param content Original markdown content
|
|
63
|
-
* @param language Target language
|
|
64
|
-
* @returns Modified content with system prompt (or unchanged if English)
|
|
65
|
-
*/
|
|
66
|
-
private injectSystemPrompt;
|
|
67
|
-
/**
|
|
68
|
-
* Compile and install a plugin for Copilot
|
|
69
|
-
*
|
|
70
|
-
* Copilot uses AGENTS.md compilation (same as Cursor)
|
|
71
|
-
*
|
|
72
|
-
* NEW: Injects system prompts for non-English languages
|
|
73
|
-
*
|
|
74
|
-
* @param plugin Plugin to install
|
|
75
|
-
*/
|
|
76
|
-
compilePlugin(plugin: Plugin): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* Unload a plugin from Copilot
|
|
79
|
-
*/
|
|
80
|
-
unloadPlugin(pluginName: string): Promise<void>;
|
|
81
|
-
/**
|
|
82
|
-
* Get list of installed plugins for Copilot
|
|
83
|
-
*/
|
|
84
|
-
getInstalledPlugins(): Promise<string[]>;
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/adapters/copilot/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAKzD,qBAAa,cAAe,SAAQ,WAAW;IAC7C,IAAI,SAAa;IACjB,WAAW,SAA8D;IACzE,eAAe,EAAG,OAAO,CAAU;IAEnC;;;;;;OAMG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAMhC;;;;;OAKG;IACH,QAAQ,IAAI,WAAW,EAAE;IAIzB;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAwErD;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD;;OAEG;IACH,eAAe,IAAI,MAAM;IAuHzB;;;;;;OAMG;IACH,eAAe,IAAI,OAAO;IAI1B;;;;OAIG;YACW,iBAAiB;IAiB/B;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;;;;;;;OAQG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsElD;;OAEG;IACG,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmCrD;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAmB/C"}
|