specweave 0.6.6 → 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.
Files changed (46) hide show
  1. package/.claude-plugin/marketplace.json +0 -1
  2. package/CLAUDE.md +116 -25
  3. package/README.md +35 -0
  4. package/dist/adapters/adapter-interface.d.ts +11 -11
  5. package/dist/adapters/adapter-interface.d.ts.map +1 -1
  6. package/dist/adapters/adapter-interface.js +1 -1
  7. package/dist/adapters/adapter-loader.d.ts +1 -2
  8. package/dist/adapters/adapter-loader.d.ts.map +1 -1
  9. package/dist/adapters/adapter-loader.js +3 -6
  10. package/dist/adapters/adapter-loader.js.map +1 -1
  11. package/dist/adapters/agents-md-generator.d.ts +3 -3
  12. package/dist/adapters/agents-md-generator.js +3 -3
  13. package/dist/adapters/generic/adapter.d.ts +2 -2
  14. package/dist/adapters/generic/adapter.d.ts.map +1 -1
  15. package/dist/adapters/generic/adapter.js +28 -9
  16. package/dist/adapters/generic/adapter.js.map +1 -1
  17. package/dist/cli/commands/init.d.ts.map +1 -1
  18. package/dist/cli/commands/init.js +102 -102
  19. package/dist/cli/commands/init.js.map +1 -1
  20. package/dist/core/types/config.d.ts +2 -2
  21. package/dist/core/types/config.d.ts.map +1 -1
  22. package/package.json +1 -1
  23. package/plugins/specweave/commands/do.md +2 -0
  24. package/plugins/specweave/commands/done.md +2 -0
  25. package/plugins/specweave/commands/inc.md +1 -1
  26. package/plugins/specweave/commands/validate.md +2 -0
  27. package/plugins/specweave/hooks/docs-changed.sh +23 -3
  28. package/plugins/specweave/hooks/human-input-required.sh +23 -3
  29. package/plugins/specweave/hooks/post-task-completion.sh +20 -1
  30. package/plugins/specweave/hooks/pre-implementation.sh +23 -3
  31. package/src/adapters/README.md +27 -63
  32. package/src/adapters/adapter-interface.ts +11 -11
  33. package/src/adapters/adapter-loader.ts +3 -6
  34. package/src/adapters/agents-md-generator.ts +3 -3
  35. package/src/adapters/generic/adapter.ts +28 -9
  36. package/src/templates/AGENTS.md.template +351 -0
  37. package/dist/adapters/copilot/adapter.d.ts +0 -86
  38. package/dist/adapters/copilot/adapter.d.ts.map +0 -1
  39. package/dist/adapters/copilot/adapter.js +0 -396
  40. package/dist/adapters/copilot/adapter.js.map +0 -1
  41. package/plugins/.specweave/logs/hooks-debug.log +0 -24
  42. package/plugins/.specweave/logs/last-hook-fire +0 -1
  43. package/plugins/.specweave/logs/last-todowrite-time +0 -1
  44. package/plugins/.specweave/logs/tasks.log +0 -6
  45. package/src/adapters/copilot/README.md +0 -240
  46. package/src/adapters/copilot/adapter.ts +0 -444
@@ -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"}