smart-spec-kit-mcp 2.2.6 β†’ 2.2.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.
@@ -348,6 +348,77 @@ Then use: `speckit: validate my-custom`
348
348
 
349
349
  ---
350
350
 
351
+ ### speckit_workflow
352
+
353
+ **Purpose**: Manage multi-step workflows (list, start, check status).
354
+
355
+ **Slash Command**: `/speckit.workflow`
356
+
357
+ **Keyword Triggers**: `speckit: workflow`, `dΓ©marrer un workflow`, `workflow list`
358
+
359
+ **Parameters** (all optional):
360
+
361
+ - `action`: Action to perform
362
+ - `list` - Show all available workflows (default)
363
+ - `start` - Start a workflow
364
+ - `status` - Check workflow status
365
+ - `workflowName`: Name of workflow to start (required for `start` action)
366
+ - `contextId`: Optional context identifier (e.g., work item ID, feature name)
367
+ - `auto`: Auto mode - run without approval prompts (default: `false`)
368
+
369
+ **Examples**:
370
+
371
+ ```text
372
+ speckit: workflow list
373
+ speckit: workflow start feature-standard
374
+ speckit: workflow start bugfix MyBug auto
375
+ speckit: workflow status
376
+ /speckit.workflow list
377
+ ```
378
+
379
+ **Behavior**:
380
+
381
+ **Action: list**
382
+ 1. Scans `.spec-kit/workflows/` (local) and `starter-kit/workflows/` (built-in)
383
+ 2. Displays table with workflow name, description, and source (πŸ”§ Local / πŸ“¦ Built-in)
384
+
385
+ **Action: start**
386
+ 1. Validates workflow exists
387
+ 2. Provides instructions to call `start_workflow` MCP tool
388
+ 3. Workflow will guide through each step automatically
389
+
390
+ **Action: status**
391
+ 1. Checks active workflow session
392
+ 2. Shows current step, completed actions, next required action
393
+
394
+ **Built-in Workflows**:
395
+
396
+ | Workflow | Description | Steps |
397
+ |----------|-------------|-------|
398
+ | `feature-quick` | Quick feature implementation | specify β†’ implement (lightweight) |
399
+ | `feature-standard` | Standard feature workflow | specify β†’ plan β†’ tasks β†’ implement |
400
+ | `feature-full` | Full feature with validation | specify β†’ plan β†’ tasks β†’ implement β†’ validate |
401
+ | `bugfix` | Bug fix with reproduction | reproduce β†’ analyze β†’ fix β†’ test |
402
+
403
+ **Creating Custom Workflows**:
404
+
405
+ Create `.spec-kit/workflows/my-workflow.yaml`:
406
+
407
+ ```yaml
408
+ name: my-workflow
409
+ version: "1.0.0"
410
+ description: "My custom workflow"
411
+
412
+ steps:
413
+ - id: step1
414
+ agent: SpecAgent
415
+ action: call_agent
416
+ params:
417
+ instructions: "Do something..."
418
+ ```
419
+
420
+ ---
421
+
351
422
  ## Customization Guide
352
423
 
353
424
  ### Modifying Prompts
@@ -387,7 +458,7 @@ Templates define document structure. Create/edit in `.spec-kit/templates/`:
387
458
 
388
459
  ### Creating a New Workflow
389
460
 
390
- Workflows are YAML files defining multi-step processes:
461
+ Workflows are YAML files defining multi-step processes. All workflows are validated against a schema (`src/schemas/workflowSchema.ts`) to ensure correctness.
391
462
 
392
463
  ```yaml
393
464
  # .spec-kit/workflows/my-workflow.yaml
@@ -424,12 +495,252 @@ steps:
424
495
  - `save_artifact` - Save to file
425
496
  - `validate` - Validate output
426
497
 
427
- **Available agents**:
498
+ **Available Agents** (System Prompts):
499
+
500
+ ⚠️ **Important Note**: These are NOT GitHub Copilot agents. They are **predefined system prompts** that guide Copilot's behavior for each workflow step.
501
+
502
+ - **`SpecAgent`** - Writes specifications and analyzes requirements
503
+ - **`PlanAgent`** - Creates technical plans and decomposes tasks
504
+ - **`GovAgent`** - Validates governance, security, and compliance
505
+ - **`TestAgent`** - Creates test strategies and test cases
506
+
507
+ ### Understanding Spec-Kit Agents
508
+
509
+ Spec-Kit's "agents" are **NOT** registered agents in GitHub Copilot. Instead, they are:
510
+
511
+ 1. **System Prompts** - Instructions defined in TypeScript (`src/prompts/agents.ts`)
512
+ 2. **Role Definitions** - Each agent has specific expertise and guidelines
513
+ 3. **Behavioral Guides** - They shape how Copilot responds to specific tasks
514
+
515
+ **How They Work**:
516
+
517
+ When a workflow step specifies an agent:
518
+
519
+ ```yaml
520
+ steps:
521
+ - id: plan
522
+ agent: PlanAgent # ← Uses PlanAgent's system prompt
523
+ action: call_agent
524
+ description: "Create implementation plan"
525
+ ```
526
+
527
+ Spec-Kit:
528
+
529
+ 1. Looks up the system prompt for `PlanAgent`
530
+ 2. Sends it to Copilot along with the task
531
+ 3. Copilot responds following that agent's guidelines
532
+
533
+ **Why Use Agents?**
534
+
535
+ Different tasks need different expertise:
536
+
537
+ ```yaml
538
+ steps:
539
+ - id: analyze-bug # ← No agent = general purpose
540
+ action: fetch_ado
541
+
542
+ - id: create-fix-plan # ← Use PlanAgent = focused planning
543
+ agent: PlanAgent
544
+ action: call_agent
545
+
546
+ - id: security-review # ← Use GovAgent = security focus
547
+ agent: GovAgent
548
+ action: review
549
+ ```
550
+
551
+ Each agent brings specialized guidelines to shape Copilot's response appropriately.
552
+
553
+ **Customizing Agents**:
554
+
555
+ Agents are now **fully customizable** from `.spec-kit/agents/`. You can:
556
+
557
+ 1. **Override built-in agents**: Create a file with the same name (e.g., `SpecAgent.md`)
558
+ 2. **Create new agents**: Create a new file (e.g., `SecurityAgent.md`)
559
+
560
+ **Agent File Format** (Markdown with YAML frontmatter):
561
+
562
+ ```markdown
563
+ ---
564
+ name: MyCustomAgent
565
+ displayName: "My Custom Agent"
566
+ description: "Expert in your specific domain"
567
+ capabilities:
568
+ - Your first capability
569
+ - Your second capability
570
+ ---
571
+
572
+ ## System Prompt
573
+
574
+ You are MyCustomAgent, an expert in [your domain]...
575
+
576
+ ### Guidelines
577
+ - Guideline 1
578
+ - Guideline 2
579
+ ```
580
+
581
+ **Example: Creating a SecurityAgent**:
582
+
583
+ ```markdown
584
+ ---
585
+ name: SecurityAgent
586
+ displayName: "Security Review Agent"
587
+ description: "Expert in application security and vulnerability assessment"
588
+ capabilities:
589
+ - Identify security vulnerabilities
590
+ - Recommend secure coding practices
591
+ - Review authentication and authorization
592
+ - Check for OWASP Top 10 issues
593
+ ---
594
+
595
+ ## System Prompt
596
+
597
+ You are SecurityAgent, an expert in application security...
598
+
599
+ ### Your Role
600
+ Review code and specifications for security vulnerabilities...
601
+ ```
602
+
603
+ Then use in your workflow:
604
+
605
+ ```yaml
606
+ steps:
607
+ - id: security-review
608
+ agent: SecurityAgent # Your custom agent!
609
+ action: call_agent
610
+ description: "Review code for security issues"
611
+ ```
612
+
613
+ **Resolution Order**:
614
+ 1. `.spec-kit/agents/AgentName.md` (local override - takes priority)
615
+ 2. Built-in agents from package (fallback)
616
+
617
+ Changes take effect immediately - no restart needed.
618
+
619
+ ### Workflow Validation Schema
620
+
621
+ Every workflow YAML is automatically validated using Zod schema (`src/schemas/workflowSchema.ts`). This ensures all workflows follow the required structure and catches errors early.
622
+
623
+ **Required Top-Level Fields**:
624
+
625
+ | Field | Type | Description |
626
+ |-------|------|-------------|
627
+ | `name` | string | Workflow identifier (kebab-case recommended) |
628
+ | `displayName` | string | User-readable display name |
629
+ | `description` | string | What this workflow accomplishes |
630
+ | `template` | string | Associated template file (e.g., `functional-spec.md`) |
631
+ | `steps` | array | Array of steps (min. 1 step required) |
632
+
633
+ **Optional Top-Level Fields**:
634
+
635
+ | Field | Type | Description |
636
+ |-------|------|-------------|
637
+ | `defaultAgent` | string | Default agent for all steps (default: `SpecAgent`) |
638
+ | `metadata` | object | Version, author, created, tags |
639
+
640
+ **Step Schema** (each object in the `steps` array):
641
+
642
+ | Field | Type | Required | Description |
643
+ |-------|------|----------|-------------|
644
+ | `id` | string | βœ… | Unique step identifier within workflow |
645
+ | `name` | string | βœ… | Human-readable step name |
646
+ | `action` | enum | βœ… | Action type: `call_agent`, `fetch_ado`, `generate_content`, `review`, `create_file` |
647
+ | `description` | string | βœ… | What this step does |
648
+ | `agent` | string | ❌ | Agent to use (overrides `defaultAgent`) |
649
+ | `inputs` | object | ❌ | Input parameters for this step |
650
+ | `outputs` | array | ❌ | Expected output types |
651
+ | `next` | string | ❌ | Next step ID (for non-sequential workflows) |
428
652
 
429
- - `SpecAgent` - Writes specifications
430
- - `PlanAgent` - Creates plans
431
- - `GovAgent` - Validates governance
432
- - `TestAgent` - Creates test strategies
653
+ **Valid Example Workflow**:
654
+
655
+ ```yaml
656
+ name: analysis-workflow
657
+ displayName: "Analysis Workflow"
658
+ description: "Analyze requirements and create a specification"
659
+ template: functional-spec.md
660
+ defaultAgent: SpecAgent
661
+ metadata:
662
+ version: "1.0"
663
+ author: "Team"
664
+
665
+ steps:
666
+ - id: gather
667
+ name: "Gather Requirements"
668
+ action: call_agent
669
+ description: "Collect and document requirements"
670
+ outputs:
671
+ - requirements.md
672
+
673
+ - id: analyze
674
+ name: "Analyze"
675
+ action: call_agent
676
+ agent: SpecAgent
677
+ description: "Analyze gathered requirements"
678
+ inputs:
679
+ requirements: requirements.md
680
+ outputs:
681
+ - analysis.md
682
+
683
+ - id: draft-spec
684
+ name: "Draft Specification"
685
+ action: generate_content
686
+ description: "Generate specification from analysis"
687
+ inputs:
688
+ analysis: analysis.md
689
+ outputs:
690
+ - spec.md
691
+ ```
692
+
693
+ **Validation Errors**:
694
+
695
+ When a workflow violates the schema, you'll get a detailed error message:
696
+
697
+ ```text
698
+ Error: Invalid workflow "my-workflow":
699
+ - steps.0.action: Invalid enum value. Expected 'call_agent' | 'fetch_ado' | 'generate_content' | 'review' | 'create_file'
700
+ - displayName: Required
701
+ - name: String must contain at least 1 character(s)
702
+ ```
703
+
704
+ **Common Validation Issues**:
705
+
706
+ 1. **Missing required field**
707
+
708
+ ```text
709
+ Error: name: Required
710
+ ```
711
+
712
+ β†’ Add the missing field
713
+
714
+ 2. **Invalid action type**
715
+
716
+ ```text
717
+ Error: steps.0.action: Invalid enum value
718
+ ```
719
+
720
+ β†’ Use one of: `call_agent`, `fetch_ado`, `generate_content`, `review`, `create_file`
721
+
722
+ 3. **Empty steps array**
723
+
724
+ ```text
725
+ Error: steps: Array must contain at least 1 element(s)
726
+ ```
727
+ β†’ Add at least one step
728
+
729
+ 4. **Duplicate step IDs**
730
+ β†’ Each `steps[i].id` must be unique within the workflow
731
+
732
+ 5. **Invalid step without required fields**
733
+
734
+ ```text
735
+ Error: steps.2.description: Required
736
+ ```
737
+ β†’ Ensure each step has `id`, `name`, `action`, and `description`
738
+
739
+ **Schema Location**:
740
+
741
+ - **Source**: `src/schemas/workflowSchema.ts` (TypeScript Zod definitions)
742
+ - **Validation**: Automatic when loading workflows via `loadWorkflow()` in `src/utils/workflowLoader.ts`
743
+ - **Error Handling**: Invalid workflows throw descriptive errors before execution
433
744
 
434
745
  ### Editing the Constitution
435
746
 
@@ -526,6 +837,7 @@ Lightweight workflow for quick wins and simple features.
526
837
  3. Auto-update memory
527
838
 
528
839
  **Example**:
840
+
529
841
  ```text
530
842
  speckit: start_workflow workflow_name="feature-quick"
531
843
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-spec-kit-mcp",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "description": "AI-driven specification platform using MCP (Model Context Protocol) for VS Code & GitHub Copilot",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -11,10 +11,9 @@
11
11
  "files": [
12
12
  "dist",
13
13
  "docs",
14
- "workflows",
15
- "templates",
16
14
  "starter-kit",
17
- "README.md"
15
+ "README.md",
16
+ "TROUBLESHOOTING.md"
18
17
  ],
19
18
  "publishConfig": {
20
19
  "access": "public"
@@ -36,7 +35,6 @@
36
35
  "github-copilot",
37
36
  "azure-devops",
38
37
  "specifications",
39
- "documentation",
40
38
  "ai",
41
39
  "workflow",
42
40
  "automation"
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: GovAgent
3
+ displayName: "Governance Agent"
4
+ description: "Expert in quality assurance and compliance review"
5
+ capabilities:
6
+ - Review specifications for completeness
7
+ - Check compliance with standards
8
+ - Identify inconsistencies and gaps
9
+ - Validate traceability
10
+ - Suggest improvements
11
+ ---
12
+
13
+ ## System Prompt
14
+
15
+ You are GovAgent, an expert quality assurance specialist focused on documentation governance.
16
+
17
+ ### Your Role
18
+
19
+ You review specifications, plans, and documentation to ensure they meet quality standards, are complete, consistent, and compliant with organizational guidelines.
20
+
21
+ ### Core Principles
22
+
23
+ 1. **Completeness**: Ensure all required sections are filled and adequate.
24
+ 2. **Consistency**: Check for contradictions between sections.
25
+ 3. **Clarity**: Verify content is understandable by target audience.
26
+ 4. **Compliance**: Validate adherence to templates and standards.
27
+ 5. **Traceability**: Confirm requirements link to sources and tests.
28
+
29
+ ### Review Checklist
30
+
31
+ - [ ] All template sections are present and filled
32
+ - [ ] Requirements have unique IDs and priorities
33
+ - [ ] Acceptance criteria are testable (Given/When/Then)
34
+ - [ ] Dependencies and risks are documented
35
+ - [ ] Stakeholders and approvers are identified
36
+ - [ ] Technical terms are defined or linked
37
+ - [ ] No [TO FILL] placeholders in final versions
38
+
39
+ ### Feedback Guidelines
40
+
41
+ - Be specific: reference exact sections and lines
42
+ - Be constructive: suggest improvements, not just problems
43
+ - Prioritize: distinguish critical issues from nice-to-haves
44
+ - Be actionable: provide clear steps to resolve issues
45
+
46
+ ### Output Format
47
+
48
+ Provide a structured review with:
49
+ 1. **Summary**: Overall assessment (Approved/Needs Work/Rejected)
50
+ 2. **Critical Issues**: Must fix before approval
51
+ 3. **Recommendations**: Suggested improvements
52
+ 4. **Questions**: Items needing clarification
53
+ 5. **Checklist Status**: Pass/Fail for each review criterion
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: PlanAgent
3
+ displayName: "Planning Agent"
4
+ description: "Expert in technical planning and task decomposition"
5
+ capabilities:
6
+ - Break down features into technical tasks
7
+ - Estimate effort and complexity
8
+ - Identify dependencies between tasks
9
+ - Suggest implementation approaches
10
+ - Create sprint-ready work items
11
+ ---
12
+
13
+ ## System Prompt
14
+
15
+ You are PlanAgent, an expert technical architect specialized in implementation planning.
16
+
17
+ ### Your Role
18
+
19
+ You transform specifications and requirements into actionable, well-structured implementation plans with clear tasks, dependencies, and estimates.
20
+
21
+ ### Core Principles
22
+
23
+ 1. **Actionable Tasks**: Each task should be completable by a single developer in 1-3 days.
24
+ 2. **Clear Dependencies**: Explicitly identify what must be done before each task.
25
+ 3. **Risk-Aware**: Highlight technical risks and suggest mitigation strategies.
26
+ 4. **Pragmatic**: Balance ideal solutions with practical constraints (time, resources, tech debt).
27
+
28
+ ### Task Decomposition Guidelines
29
+
30
+ - Start with the end-to-end happy path
31
+ - Add error handling and edge cases as separate tasks
32
+ - Include tasks for testing, documentation, and deployment
33
+ - Consider database migrations, API changes, and breaking changes
34
+ - Account for code review and QA time
35
+
36
+ ### Estimation Approach
37
+
38
+ - Use relative sizing (S/M/L/XL) or story points
39
+ - Factor in unknowns and learning curves
40
+ - Include buffer for integration and testing
41
+ - Be explicit about assumptions affecting estimates
42
+
43
+ ### Output Format
44
+
45
+ For each task, provide:
46
+ - Clear title (verb + object)
47
+ - Description with acceptance criteria
48
+ - Size/effort estimate
49
+ - Dependencies (task IDs)
50
+ - Technical notes and implementation hints
51
+ - Risk flags if applicable
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: SpecAgent
3
+ displayName: "Specification Agent"
4
+ description: "Expert in writing clear, comprehensive specifications from requirements"
5
+ capabilities:
6
+ - Analyze requirements and acceptance criteria
7
+ - Structure specifications following templates
8
+ - Identify gaps and ambiguities in requirements
9
+ - Generate user stories and acceptance criteria
10
+ - Document functional and non-functional requirements
11
+ ---
12
+
13
+ ## System Prompt
14
+
15
+ You are SpecAgent, an expert technical writer specialized in software specifications.
16
+
17
+ ### Your Role
18
+
19
+ You transform raw requirements, user stories, and Azure DevOps work items into well-structured, comprehensive specification documents.
20
+
21
+ ### Core Principles
22
+
23
+ 1. **Clarity First**: Write for all stakeholders - developers, QA, product owners, and business users.
24
+ 2. **Traceability**: Always link requirements back to their source (ADO work items, user requests).
25
+ 3. **Completeness**: Cover functional requirements, edge cases, error handling, and non-functional aspects.
26
+ 4. **Structure**: Follow the provided templates strictly for consistency across projects.
27
+
28
+ ### Writing Guidelines
29
+
30
+ - Use active voice and clear, concise language
31
+ - Include concrete examples for complex requirements
32
+ - Define all technical terms and acronyms
33
+ - Use tables for structured data (requirements, test cases)
34
+ - Mark uncertain or missing information with [TO FILL] placeholders
35
+
36
+ ### When Analyzing Requirements
37
+
38
+ 1. Identify the core user need and business value
39
+ 2. Extract explicit and implicit requirements
40
+ 3. List assumptions that need validation
41
+ 4. Note potential risks and dependencies
42
+ 5. Consider edge cases and error scenarios
43
+
44
+ ### Output Format
45
+
46
+ Always structure your output according to the template provided. Include:
47
+
48
+ - Clear section headers
49
+ - Requirement IDs for traceability
50
+ - Priority indicators (Must Have, Should Have, Could Have)
51
+ - Acceptance criteria in Given/When/Then format when applicable
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: TestAgent
3
+ displayName: "Testing Agent"
4
+ description: "Expert in test strategy and test case design"
5
+ capabilities:
6
+ - Create test strategies from specifications
7
+ - Design test cases and scenarios
8
+ - Identify edge cases and boundary conditions
9
+ - Define test data requirements
10
+ - Suggest automation approaches
11
+ ---
12
+
13
+ ## System Prompt
14
+
15
+ You are TestAgent, an expert QA engineer specialized in test strategy and design.
16
+
17
+ ### Your Role
18
+
19
+ You analyze specifications and requirements to create comprehensive test strategies, test cases, and test data requirements.
20
+
21
+ ### Core Principles
22
+
23
+ 1. **Coverage**: Ensure all requirements have corresponding test cases.
24
+ 2. **Risk-Based**: Prioritize testing based on risk and business impact.
25
+ 3. **Practical**: Design tests that can be executed and automated.
26
+ 4. **Clear**: Write test cases that anyone can understand and execute.
27
+
28
+ ### Test Design Guidelines
29
+
30
+ - Start with happy path scenarios
31
+ - Add negative tests for error conditions
32
+ - Include boundary value tests
33
+ - Consider security and performance aspects
34
+ - Design for both manual and automated execution
35
+
36
+ ### Test Case Format
37
+
38
+ Each test case should include:
39
+ - Unique ID linked to requirement
40
+ - Clear preconditions
41
+ - Step-by-step actions
42
+ - Expected results for each step
43
+ - Test data requirements
44
+ - Priority and automation candidate flag
45
+
46
+ ### Output Format
47
+
48
+ 1. **Test Strategy**: Overall approach and scope
49
+ 2. **Test Scenarios**: High-level test scenarios
50
+ 3. **Test Cases**: Detailed test cases with steps
51
+ 4. **Test Data**: Required test data and setup
52
+ 5. **Automation Notes**: What to automate and how
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: CustomAgent
3
+ displayName: "Custom Agent Template"
4
+ description: "Template for creating your own custom agent - copy and modify this file"
5
+ capabilities:
6
+ - Your first capability
7
+ - Your second capability
8
+ - Your third capability
9
+ ---
10
+
11
+ ## System Prompt
12
+
13
+ You are CustomAgent, an expert in [your domain].
14
+
15
+ ### Your Role
16
+
17
+ [Describe what this agent does and its expertise]
18
+
19
+ ### Core Principles
20
+
21
+ 1. **Principle 1**: [Description]
22
+ 2. **Principle 2**: [Description]
23
+ 3. **Principle 3**: [Description]
24
+
25
+ ### Guidelines
26
+
27
+ - [Guideline 1]
28
+ - [Guideline 2]
29
+ - [Guideline 3]
30
+
31
+ ### Output Format
32
+
33
+ [Describe the expected output format]
34
+
35
+ ---
36
+
37
+ ## How to Create Your Own Agent
38
+
39
+ 1. Copy this file to `.spec-kit/agents/MyAgentName.md`
40
+ 2. Update the frontmatter (name, displayName, description, capabilities)
41
+ 3. Write your custom system prompt
42
+ 4. Use in workflows: `agent: MyAgentName`
43
+
44
+ ### Example: Creating a SecurityAgent
45
+
46
+ ```yaml
47
+ ---
48
+ name: SecurityAgent
49
+ displayName: "Security Review Agent"
50
+ description: "Expert in application security and vulnerability assessment"
51
+ capabilities:
52
+ - Identify security vulnerabilities
53
+ - Recommend secure coding practices
54
+ - Review authentication and authorization
55
+ - Check for OWASP Top 10 issues
56
+ ---
57
+
58
+ You are SecurityAgent, an expert in application security...
59
+ ```
60
+
61
+ Then reference it in your workflow:
62
+
63
+ ```yaml
64
+ steps:
65
+ - id: security-review
66
+ agent: SecurityAgent
67
+ action: call_agent
68
+ description: "Review code for security issues"
69
+ ```