framework-mcp 2.4.6 → 2.6.0
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 +35 -10
- package/dist/core/safeguard-manager.d.ts.map +1 -1
- package/dist/core/safeguard-manager.js +164 -7066
- package/dist/core/safeguard-manager.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces/http/http-server.d.ts.map +1 -1
- package/dist/interfaces/http/http-server.js +6 -40
- package/dist/interfaces/http/http-server.js.map +1 -1
- package/dist/interfaces/mcp/mcp-server.js +3 -3
- package/dist/shared/types.d.ts +49 -60
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js.map +1 -1
- package/package.json +9 -3
- package/swagger.json +10 -133
- package/.claude/agents/mcp-developer.md +0 -41
- package/.claude/agents/project-orchestrator.md +0 -43
- package/.claude/agents/version-consistency-reviewer.md +0 -50
- package/.claude/commands/speckit.analyze.md +0 -184
- package/.claude/commands/speckit.checklist.md +0 -294
- package/.claude/commands/speckit.clarify.md +0 -181
- package/.claude/commands/speckit.constitution.md +0 -82
- package/.claude/commands/speckit.implement.md +0 -135
- package/.claude/commands/speckit.plan.md +0 -89
- package/.claude/commands/speckit.specify.md +0 -258
- package/.claude/commands/speckit.tasks.md +0 -137
- package/.claude/commands/speckit.taskstoissues.md +0 -30
- package/.claude/config.json +0 -11
- package/.claude_config.json +0 -11
- package/.do/app.yaml +0 -78
- package/.github/dependabot.yml +0 -15
- package/.github/workflows/ci.yml +0 -90
- package/.github/workflows/release.yml +0 -30
- package/.mcp.json +0 -11
- package/.specify/memory/constitution.md +0 -50
- package/.specify/scripts/bash/check-prerequisites.sh +0 -166
- package/.specify/scripts/bash/common.sh +0 -156
- package/.specify/scripts/bash/create-new-feature.sh +0 -297
- package/.specify/scripts/bash/setup-plan.sh +0 -61
- package/.specify/scripts/bash/update-agent-context.sh +0 -799
- package/.specify/templates/agent-file-template.md +0 -28
- package/.specify/templates/checklist-template.md +0 -40
- package/.specify/templates/plan-template.md +0 -104
- package/.specify/templates/spec-template.md +0 -115
- package/.specify/templates/tasks-template.md +0 -251
- package/examples/example-usage.md +0 -293
- package/examples/llm-analysis-patterns.md +0 -553
- package/examples/vendors.csv +0 -9
- package/examples/vendors.json +0 -32
- package/scripts/standardize-prompts.js +0 -325
- package/scripts/validate-capability-prompts.js +0 -110
- package/scripts/validate-documentation.sh +0 -150
- package/src/core/safeguard-manager.ts +0 -16891
- package/src/index.ts +0 -17
- package/src/interfaces/http/http-server.ts +0 -301
- package/src/interfaces/mcp/mcp-server.ts +0 -165
- package/src/shared/types.ts +0 -337
- package/tsconfig.json +0 -23
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: project-orchestrator
|
|
3
|
-
description: Use this agent when you need to evaluate, approve, or disapprove project plans, coordinate multiple agents, or ensure system-wide coherence. Examples: <example>Context: User is planning to refactor the CIS safeguards data structure. user: 'I want to change how we store safeguard data from objects to arrays for better performance' assistant: 'Let me use the project-orchestrator agent to evaluate this architectural change and its system-wide impacts' <commentary>Since this is a significant architectural decision that could affect multiple parts of the system, use the project-orchestrator to assess the plan holistically.</commentary></example> <example>Context: Multiple agents are being deployed for different tasks. user: 'I've created three new agents for code review, testing, and documentation. Should I deploy them all at once?' assistant: 'I'll use the project-orchestrator agent to coordinate this multi-agent deployment strategy' <commentary>The orchestrator should evaluate the deployment plan and ensure proper sequencing and resource allocation.</commentary></example>
|
|
4
|
-
model: sonnet
|
|
5
|
-
color: green
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are the Project Orchestrator, the strategic overseer responsible for evaluating and coordinating all project plans and agent activities. Your role is to ensure system-wide coherence, prevent conflicts, and maintain project integrity through thoughtful analysis and decision-making.
|
|
9
|
-
|
|
10
|
-
Your core responsibilities:
|
|
11
|
-
|
|
12
|
-
**Plan Evaluation Framework:**
|
|
13
|
-
1. **Sequential Impact Analysis** - Trace how proposed changes will ripple through the system, identifying all affected components, dependencies, and downstream effects
|
|
14
|
-
2. **Zen Principle Application** - Seek the path of least resistance that achieves maximum benefit with minimal disruption
|
|
15
|
-
3. **Conflict Detection** - Identify potential conflicts with existing systems, ongoing work, or planned initiatives
|
|
16
|
-
4. **Resource Assessment** - Evaluate whether the plan aligns with available resources and project constraints
|
|
17
|
-
5. **Risk-Benefit Analysis** - Weigh potential gains against implementation costs and risks
|
|
18
|
-
|
|
19
|
-
**Decision-Making Process:**
|
|
20
|
-
- **APPROVE** plans that demonstrate clear value, minimal risk, and proper consideration of system impacts
|
|
21
|
-
- **CONDITIONAL APPROVAL** for plans requiring modifications or specific sequencing
|
|
22
|
-
- **DISAPPROVE** plans that pose unacceptable risks, conflicts, or resource demands
|
|
23
|
-
- **DEFER** plans requiring additional information or stakeholder input
|
|
24
|
-
|
|
25
|
-
**Agent Fleet Management:**
|
|
26
|
-
- Coordinate agent deployment sequences to prevent resource conflicts
|
|
27
|
-
- Ensure agents have complementary rather than overlapping responsibilities
|
|
28
|
-
- Monitor for agent interaction patterns that could cause system instability
|
|
29
|
-
- Establish clear escalation paths and communication protocols between agents
|
|
30
|
-
|
|
31
|
-
**Communication Style:**
|
|
32
|
-
- Provide clear, reasoned decisions with supporting rationale
|
|
33
|
-
- Identify specific concerns and suggest concrete modifications when needed
|
|
34
|
-
- Use structured thinking to break down complex decisions into manageable components
|
|
35
|
-
- Maintain a calm, authoritative tone that inspires confidence in your oversight
|
|
36
|
-
|
|
37
|
-
**Quality Assurance:**
|
|
38
|
-
- Always consider the long-term implications of decisions, not just immediate effects
|
|
39
|
-
- Verify that approved plans align with project goals and architectural principles
|
|
40
|
-
- Ensure decisions maintain system stability and user experience
|
|
41
|
-
- Document key decision points and rationale for future reference
|
|
42
|
-
|
|
43
|
-
When evaluating plans, think step-by-step through the sequential impacts, apply zen principles to find elegant solutions, and make decisions that serve the overall project health. Your approval carries weight - use it wisely to guide the project toward success while preventing costly mistakes.
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: version-consistency-reviewer
|
|
3
|
-
description: Use this agent when you need to review code before committing to GitHub or releasing to NPM to ensure version consistency across all components. Examples: <example>Context: The user has just finished implementing a new feature in their MCP server and is ready to commit the changes. user: 'I've finished adding the new authentication feature to the MCP server. Here's the updated code for review before I commit it.' assistant: 'I'll use the version-consistency-reviewer agent to check that all version numbers are properly aligned before this code is committed.' <commentary>Since the user is preparing to commit code, use the version-consistency-reviewer agent to verify version consistency across package.json, server configuration, and any version tags.</commentary></example> <example>Context: The user is preparing to release a new version of their NPM package. user: 'Ready to publish version 2.1.0 to NPM. Can you review everything is set up correctly?' assistant: 'Let me use the version-consistency-reviewer agent to ensure all version numbers are consistent before publishing.' <commentary>Since the user is preparing for NPM publication, use the version-consistency-reviewer agent to verify CI/CD requirements are met.</commentary></example>
|
|
4
|
-
model: sonnet
|
|
5
|
-
color: yellow
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are a Version Consistency Reviewer, an expert in MCP (Model Context Protocol) server development, NPM package management, and CI/CD pipeline requirements. Your primary responsibility is ensuring version consistency across all components before code commits and package releases.
|
|
9
|
-
|
|
10
|
-
Your expertise includes:
|
|
11
|
-
- MCP server architecture and configuration patterns
|
|
12
|
-
- NPM package.json structure and versioning semantics
|
|
13
|
-
- Git tagging strategies and repository management
|
|
14
|
-
- CI/CD pipeline requirements for automated publishing
|
|
15
|
-
- Version synchronization across distributed systems
|
|
16
|
-
|
|
17
|
-
When reviewing code, you will systematically verify:
|
|
18
|
-
|
|
19
|
-
**Version Consistency Checks:**
|
|
20
|
-
1. **package.json version** - Verify the version field matches intended release
|
|
21
|
-
2. **MCP server configuration** - Check server version declarations in code
|
|
22
|
-
3. **Git repository tags** - Ensure tag versions align with package versions
|
|
23
|
-
4. **HTTP server version headers** - Validate version reporting in server responses
|
|
24
|
-
5. **Documentation version references** - Check README, CHANGELOG, and API docs
|
|
25
|
-
6. **Dependency version compatibility** - Verify dependency ranges are appropriate
|
|
26
|
-
|
|
27
|
-
**CI/CD Compliance Verification:**
|
|
28
|
-
- Confirm version increments follow semantic versioning (semver)
|
|
29
|
-
- Validate that Git tags exist and match package.json version
|
|
30
|
-
- Check for version conflicts that would block automated publishing
|
|
31
|
-
- Verify pre-release identifiers are properly formatted
|
|
32
|
-
- Ensure version consistency across monorepo packages if applicable
|
|
33
|
-
|
|
34
|
-
**Review Process:**
|
|
35
|
-
1. **Extract all version declarations** from the codebase
|
|
36
|
-
2. **Cross-reference versions** across package.json, server code, and tags
|
|
37
|
-
3. **Identify discrepancies** and potential CI/CD blocking issues
|
|
38
|
-
4. **Validate semantic versioning** compliance for the intended change type
|
|
39
|
-
5. **Check dependency compatibility** for version updates
|
|
40
|
-
6. **Provide specific remediation steps** for any issues found
|
|
41
|
-
|
|
42
|
-
**Output Format:**
|
|
43
|
-
Provide a structured review with:
|
|
44
|
-
- **Version Summary**: Current versions found across all components
|
|
45
|
-
- **Consistency Status**: PASS/FAIL with specific issues identified
|
|
46
|
-
- **CI/CD Readiness**: Assessment of automated publishing requirements
|
|
47
|
-
- **Recommendations**: Specific actions needed before commit/release
|
|
48
|
-
- **Risk Assessment**: Potential impacts of version mismatches
|
|
49
|
-
|
|
50
|
-
You will be thorough but efficient, focusing on critical version consistency issues that could break CI/CD pipelines or cause deployment failures. Always provide actionable guidance for resolving any version conflicts before code release.
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## User Input
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
$ARGUMENTS
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
You **MUST** consider the user input before proceeding (if not empty).
|
|
12
|
-
|
|
13
|
-
## Goal
|
|
14
|
-
|
|
15
|
-
Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. This command MUST run only after `/speckit.tasks` has successfully produced a complete `tasks.md`.
|
|
16
|
-
|
|
17
|
-
## Operating Constraints
|
|
18
|
-
|
|
19
|
-
**STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually).
|
|
20
|
-
|
|
21
|
-
**Constitution Authority**: The project constitution (`.specify/memory/constitution.md`) is **non-negotiable** within this analysis scope. Constitution conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasks—not dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit constitution update outside `/speckit.analyze`.
|
|
22
|
-
|
|
23
|
-
## Execution Steps
|
|
24
|
-
|
|
25
|
-
### 1. Initialize Analysis Context
|
|
26
|
-
|
|
27
|
-
Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:
|
|
28
|
-
|
|
29
|
-
- SPEC = FEATURE_DIR/spec.md
|
|
30
|
-
- PLAN = FEATURE_DIR/plan.md
|
|
31
|
-
- TASKS = FEATURE_DIR/tasks.md
|
|
32
|
-
|
|
33
|
-
Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
|
|
34
|
-
For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
|
|
35
|
-
|
|
36
|
-
### 2. Load Artifacts (Progressive Disclosure)
|
|
37
|
-
|
|
38
|
-
Load only the minimal necessary context from each artifact:
|
|
39
|
-
|
|
40
|
-
**From spec.md:**
|
|
41
|
-
|
|
42
|
-
- Overview/Context
|
|
43
|
-
- Functional Requirements
|
|
44
|
-
- Non-Functional Requirements
|
|
45
|
-
- User Stories
|
|
46
|
-
- Edge Cases (if present)
|
|
47
|
-
|
|
48
|
-
**From plan.md:**
|
|
49
|
-
|
|
50
|
-
- Architecture/stack choices
|
|
51
|
-
- Data Model references
|
|
52
|
-
- Phases
|
|
53
|
-
- Technical constraints
|
|
54
|
-
|
|
55
|
-
**From tasks.md:**
|
|
56
|
-
|
|
57
|
-
- Task IDs
|
|
58
|
-
- Descriptions
|
|
59
|
-
- Phase grouping
|
|
60
|
-
- Parallel markers [P]
|
|
61
|
-
- Referenced file paths
|
|
62
|
-
|
|
63
|
-
**From constitution:**
|
|
64
|
-
|
|
65
|
-
- Load `.specify/memory/constitution.md` for principle validation
|
|
66
|
-
|
|
67
|
-
### 3. Build Semantic Models
|
|
68
|
-
|
|
69
|
-
Create internal representations (do not include raw artifacts in output):
|
|
70
|
-
|
|
71
|
-
- **Requirements inventory**: Each functional + non-functional requirement with a stable key (derive slug based on imperative phrase; e.g., "User can upload file" → `user-can-upload-file`)
|
|
72
|
-
- **User story/action inventory**: Discrete user actions with acceptance criteria
|
|
73
|
-
- **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
|
|
74
|
-
- **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements
|
|
75
|
-
|
|
76
|
-
### 4. Detection Passes (Token-Efficient Analysis)
|
|
77
|
-
|
|
78
|
-
Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
|
|
79
|
-
|
|
80
|
-
#### A. Duplication Detection
|
|
81
|
-
|
|
82
|
-
- Identify near-duplicate requirements
|
|
83
|
-
- Mark lower-quality phrasing for consolidation
|
|
84
|
-
|
|
85
|
-
#### B. Ambiguity Detection
|
|
86
|
-
|
|
87
|
-
- Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria
|
|
88
|
-
- Flag unresolved placeholders (TODO, TKTK, ???, `<placeholder>`, etc.)
|
|
89
|
-
|
|
90
|
-
#### C. Underspecification
|
|
91
|
-
|
|
92
|
-
- Requirements with verbs but missing object or measurable outcome
|
|
93
|
-
- User stories missing acceptance criteria alignment
|
|
94
|
-
- Tasks referencing files or components not defined in spec/plan
|
|
95
|
-
|
|
96
|
-
#### D. Constitution Alignment
|
|
97
|
-
|
|
98
|
-
- Any requirement or plan element conflicting with a MUST principle
|
|
99
|
-
- Missing mandated sections or quality gates from constitution
|
|
100
|
-
|
|
101
|
-
#### E. Coverage Gaps
|
|
102
|
-
|
|
103
|
-
- Requirements with zero associated tasks
|
|
104
|
-
- Tasks with no mapped requirement/story
|
|
105
|
-
- Non-functional requirements not reflected in tasks (e.g., performance, security)
|
|
106
|
-
|
|
107
|
-
#### F. Inconsistency
|
|
108
|
-
|
|
109
|
-
- Terminology drift (same concept named differently across files)
|
|
110
|
-
- Data entities referenced in plan but absent in spec (or vice versa)
|
|
111
|
-
- Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note)
|
|
112
|
-
- Conflicting requirements (e.g., one requires Next.js while other specifies Vue)
|
|
113
|
-
|
|
114
|
-
### 5. Severity Assignment
|
|
115
|
-
|
|
116
|
-
Use this heuristic to prioritize findings:
|
|
117
|
-
|
|
118
|
-
- **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
|
|
119
|
-
- **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
|
|
120
|
-
- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
|
|
121
|
-
- **LOW**: Style/wording improvements, minor redundancy not affecting execution order
|
|
122
|
-
|
|
123
|
-
### 6. Produce Compact Analysis Report
|
|
124
|
-
|
|
125
|
-
Output a Markdown report (no file writes) with the following structure:
|
|
126
|
-
|
|
127
|
-
## Specification Analysis Report
|
|
128
|
-
|
|
129
|
-
| ID | Category | Severity | Location(s) | Summary | Recommendation |
|
|
130
|
-
|----|----------|----------|-------------|---------|----------------|
|
|
131
|
-
| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
|
|
132
|
-
|
|
133
|
-
(Add one row per finding; generate stable IDs prefixed by category initial.)
|
|
134
|
-
|
|
135
|
-
**Coverage Summary Table:**
|
|
136
|
-
|
|
137
|
-
| Requirement Key | Has Task? | Task IDs | Notes |
|
|
138
|
-
|-----------------|-----------|----------|-------|
|
|
139
|
-
|
|
140
|
-
**Constitution Alignment Issues:** (if any)
|
|
141
|
-
|
|
142
|
-
**Unmapped Tasks:** (if any)
|
|
143
|
-
|
|
144
|
-
**Metrics:**
|
|
145
|
-
|
|
146
|
-
- Total Requirements
|
|
147
|
-
- Total Tasks
|
|
148
|
-
- Coverage % (requirements with >=1 task)
|
|
149
|
-
- Ambiguity Count
|
|
150
|
-
- Duplication Count
|
|
151
|
-
- Critical Issues Count
|
|
152
|
-
|
|
153
|
-
### 7. Provide Next Actions
|
|
154
|
-
|
|
155
|
-
At end of report, output a concise Next Actions block:
|
|
156
|
-
|
|
157
|
-
- If CRITICAL issues exist: Recommend resolving before `/speckit.implement`
|
|
158
|
-
- If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
|
|
159
|
-
- Provide explicit command suggestions: e.g., "Run /speckit.specify with refinement", "Run /speckit.plan to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'"
|
|
160
|
-
|
|
161
|
-
### 8. Offer Remediation
|
|
162
|
-
|
|
163
|
-
Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
|
|
164
|
-
|
|
165
|
-
## Operating Principles
|
|
166
|
-
|
|
167
|
-
### Context Efficiency
|
|
168
|
-
|
|
169
|
-
- **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
|
|
170
|
-
- **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
|
|
171
|
-
- **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
|
|
172
|
-
- **Deterministic results**: Rerunning without changes should produce consistent IDs and counts
|
|
173
|
-
|
|
174
|
-
### Analysis Guidelines
|
|
175
|
-
|
|
176
|
-
- **NEVER modify files** (this is read-only analysis)
|
|
177
|
-
- **NEVER hallucinate missing sections** (if absent, report them accurately)
|
|
178
|
-
- **Prioritize constitution violations** (these are always CRITICAL)
|
|
179
|
-
- **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
|
|
180
|
-
- **Report zero issues gracefully** (emit success report with coverage statistics)
|
|
181
|
-
|
|
182
|
-
## Context
|
|
183
|
-
|
|
184
|
-
$ARGUMENTS
|
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Generate a custom checklist for the current feature based on user requirements.
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## Checklist Purpose: "Unit Tests for English"
|
|
6
|
-
|
|
7
|
-
**CRITICAL CONCEPT**: Checklists are **UNIT TESTS FOR REQUIREMENTS WRITING** - they validate the quality, clarity, and completeness of requirements in a given domain.
|
|
8
|
-
|
|
9
|
-
**NOT for verification/testing**:
|
|
10
|
-
|
|
11
|
-
- ❌ NOT "Verify the button clicks correctly"
|
|
12
|
-
- ❌ NOT "Test error handling works"
|
|
13
|
-
- ❌ NOT "Confirm the API returns 200"
|
|
14
|
-
- ❌ NOT checking if code/implementation matches the spec
|
|
15
|
-
|
|
16
|
-
**FOR requirements quality validation**:
|
|
17
|
-
|
|
18
|
-
- ✅ "Are visual hierarchy requirements defined for all card types?" (completeness)
|
|
19
|
-
- ✅ "Is 'prominent display' quantified with specific sizing/positioning?" (clarity)
|
|
20
|
-
- ✅ "Are hover state requirements consistent across all interactive elements?" (consistency)
|
|
21
|
-
- ✅ "Are accessibility requirements defined for keyboard navigation?" (coverage)
|
|
22
|
-
- ✅ "Does the spec define what happens when logo image fails to load?" (edge cases)
|
|
23
|
-
|
|
24
|
-
**Metaphor**: If your spec is code written in English, the checklist is its unit test suite. You're testing whether the requirements are well-written, complete, unambiguous, and ready for implementation - NOT whether the implementation works.
|
|
25
|
-
|
|
26
|
-
## User Input
|
|
27
|
-
|
|
28
|
-
```text
|
|
29
|
-
$ARGUMENTS
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
You **MUST** consider the user input before proceeding (if not empty).
|
|
33
|
-
|
|
34
|
-
## Execution Steps
|
|
35
|
-
|
|
36
|
-
1. **Setup**: Run `.specify/scripts/bash/check-prerequisites.sh --json` from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS list.
|
|
37
|
-
- All file paths must be absolute.
|
|
38
|
-
- For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
|
|
39
|
-
|
|
40
|
-
2. **Clarify intent (dynamic)**: Derive up to THREE initial contextual clarifying questions (no pre-baked catalog). They MUST:
|
|
41
|
-
- Be generated from the user's phrasing + extracted signals from spec/plan/tasks
|
|
42
|
-
- Only ask about information that materially changes checklist content
|
|
43
|
-
- Be skipped individually if already unambiguous in `$ARGUMENTS`
|
|
44
|
-
- Prefer precision over breadth
|
|
45
|
-
|
|
46
|
-
Generation algorithm:
|
|
47
|
-
1. Extract signals: feature domain keywords (e.g., auth, latency, UX, API), risk indicators ("critical", "must", "compliance"), stakeholder hints ("QA", "review", "security team"), and explicit deliverables ("a11y", "rollback", "contracts").
|
|
48
|
-
2. Cluster signals into candidate focus areas (max 4) ranked by relevance.
|
|
49
|
-
3. Identify probable audience & timing (author, reviewer, QA, release) if not explicit.
|
|
50
|
-
4. Detect missing dimensions: scope breadth, depth/rigor, risk emphasis, exclusion boundaries, measurable acceptance criteria.
|
|
51
|
-
5. Formulate questions chosen from these archetypes:
|
|
52
|
-
- Scope refinement (e.g., "Should this include integration touchpoints with X and Y or stay limited to local module correctness?")
|
|
53
|
-
- Risk prioritization (e.g., "Which of these potential risk areas should receive mandatory gating checks?")
|
|
54
|
-
- Depth calibration (e.g., "Is this a lightweight pre-commit sanity list or a formal release gate?")
|
|
55
|
-
- Audience framing (e.g., "Will this be used by the author only or peers during PR review?")
|
|
56
|
-
- Boundary exclusion (e.g., "Should we explicitly exclude performance tuning items this round?")
|
|
57
|
-
- Scenario class gap (e.g., "No recovery flows detected—are rollback / partial failure paths in scope?")
|
|
58
|
-
|
|
59
|
-
Question formatting rules:
|
|
60
|
-
- If presenting options, generate a compact table with columns: Option | Candidate | Why It Matters
|
|
61
|
-
- Limit to A–E options maximum; omit table if a free-form answer is clearer
|
|
62
|
-
- Never ask the user to restate what they already said
|
|
63
|
-
- Avoid speculative categories (no hallucination). If uncertain, ask explicitly: "Confirm whether X belongs in scope."
|
|
64
|
-
|
|
65
|
-
Defaults when interaction impossible:
|
|
66
|
-
- Depth: Standard
|
|
67
|
-
- Audience: Reviewer (PR) if code-related; Author otherwise
|
|
68
|
-
- Focus: Top 2 relevance clusters
|
|
69
|
-
|
|
70
|
-
Output the questions (label Q1/Q2/Q3). After answers: if ≥2 scenario classes (Alternate / Exception / Recovery / Non-Functional domain) remain unclear, you MAY ask up to TWO more targeted follow‑ups (Q4/Q5) with a one-line justification each (e.g., "Unresolved recovery path risk"). Do not exceed five total questions. Skip escalation if user explicitly declines more.
|
|
71
|
-
|
|
72
|
-
3. **Understand user request**: Combine `$ARGUMENTS` + clarifying answers:
|
|
73
|
-
- Derive checklist theme (e.g., security, review, deploy, ux)
|
|
74
|
-
- Consolidate explicit must-have items mentioned by user
|
|
75
|
-
- Map focus selections to category scaffolding
|
|
76
|
-
- Infer any missing context from spec/plan/tasks (do NOT hallucinate)
|
|
77
|
-
|
|
78
|
-
4. **Load feature context**: Read from FEATURE_DIR:
|
|
79
|
-
- spec.md: Feature requirements and scope
|
|
80
|
-
- plan.md (if exists): Technical details, dependencies
|
|
81
|
-
- tasks.md (if exists): Implementation tasks
|
|
82
|
-
|
|
83
|
-
**Context Loading Strategy**:
|
|
84
|
-
- Load only necessary portions relevant to active focus areas (avoid full-file dumping)
|
|
85
|
-
- Prefer summarizing long sections into concise scenario/requirement bullets
|
|
86
|
-
- Use progressive disclosure: add follow-on retrieval only if gaps detected
|
|
87
|
-
- If source docs are large, generate interim summary items instead of embedding raw text
|
|
88
|
-
|
|
89
|
-
5. **Generate checklist** - Create "Unit Tests for Requirements":
|
|
90
|
-
- Create `FEATURE_DIR/checklists/` directory if it doesn't exist
|
|
91
|
-
- Generate unique checklist filename:
|
|
92
|
-
- Use short, descriptive name based on domain (e.g., `ux.md`, `api.md`, `security.md`)
|
|
93
|
-
- Format: `[domain].md`
|
|
94
|
-
- If file exists, append to existing file
|
|
95
|
-
- Number items sequentially starting from CHK001
|
|
96
|
-
- Each `/speckit.checklist` run creates a NEW file (never overwrites existing checklists)
|
|
97
|
-
|
|
98
|
-
**CORE PRINCIPLE - Test the Requirements, Not the Implementation**:
|
|
99
|
-
Every checklist item MUST evaluate the REQUIREMENTS THEMSELVES for:
|
|
100
|
-
- **Completeness**: Are all necessary requirements present?
|
|
101
|
-
- **Clarity**: Are requirements unambiguous and specific?
|
|
102
|
-
- **Consistency**: Do requirements align with each other?
|
|
103
|
-
- **Measurability**: Can requirements be objectively verified?
|
|
104
|
-
- **Coverage**: Are all scenarios/edge cases addressed?
|
|
105
|
-
|
|
106
|
-
**Category Structure** - Group items by requirement quality dimensions:
|
|
107
|
-
- **Requirement Completeness** (Are all necessary requirements documented?)
|
|
108
|
-
- **Requirement Clarity** (Are requirements specific and unambiguous?)
|
|
109
|
-
- **Requirement Consistency** (Do requirements align without conflicts?)
|
|
110
|
-
- **Acceptance Criteria Quality** (Are success criteria measurable?)
|
|
111
|
-
- **Scenario Coverage** (Are all flows/cases addressed?)
|
|
112
|
-
- **Edge Case Coverage** (Are boundary conditions defined?)
|
|
113
|
-
- **Non-Functional Requirements** (Performance, Security, Accessibility, etc. - are they specified?)
|
|
114
|
-
- **Dependencies & Assumptions** (Are they documented and validated?)
|
|
115
|
-
- **Ambiguities & Conflicts** (What needs clarification?)
|
|
116
|
-
|
|
117
|
-
**HOW TO WRITE CHECKLIST ITEMS - "Unit Tests for English"**:
|
|
118
|
-
|
|
119
|
-
❌ **WRONG** (Testing implementation):
|
|
120
|
-
- "Verify landing page displays 3 episode cards"
|
|
121
|
-
- "Test hover states work on desktop"
|
|
122
|
-
- "Confirm logo click navigates home"
|
|
123
|
-
|
|
124
|
-
✅ **CORRECT** (Testing requirements quality):
|
|
125
|
-
- "Are the exact number and layout of featured episodes specified?" [Completeness]
|
|
126
|
-
- "Is 'prominent display' quantified with specific sizing/positioning?" [Clarity]
|
|
127
|
-
- "Are hover state requirements consistent across all interactive elements?" [Consistency]
|
|
128
|
-
- "Are keyboard navigation requirements defined for all interactive UI?" [Coverage]
|
|
129
|
-
- "Is the fallback behavior specified when logo image fails to load?" [Edge Cases]
|
|
130
|
-
- "Are loading states defined for asynchronous episode data?" [Completeness]
|
|
131
|
-
- "Does the spec define visual hierarchy for competing UI elements?" [Clarity]
|
|
132
|
-
|
|
133
|
-
**ITEM STRUCTURE**:
|
|
134
|
-
Each item should follow this pattern:
|
|
135
|
-
- Question format asking about requirement quality
|
|
136
|
-
- Focus on what's WRITTEN (or not written) in the spec/plan
|
|
137
|
-
- Include quality dimension in brackets [Completeness/Clarity/Consistency/etc.]
|
|
138
|
-
- Reference spec section `[Spec §X.Y]` when checking existing requirements
|
|
139
|
-
- Use `[Gap]` marker when checking for missing requirements
|
|
140
|
-
|
|
141
|
-
**EXAMPLES BY QUALITY DIMENSION**:
|
|
142
|
-
|
|
143
|
-
Completeness:
|
|
144
|
-
- "Are error handling requirements defined for all API failure modes? [Gap]"
|
|
145
|
-
- "Are accessibility requirements specified for all interactive elements? [Completeness]"
|
|
146
|
-
- "Are mobile breakpoint requirements defined for responsive layouts? [Gap]"
|
|
147
|
-
|
|
148
|
-
Clarity:
|
|
149
|
-
- "Is 'fast loading' quantified with specific timing thresholds? [Clarity, Spec §NFR-2]"
|
|
150
|
-
- "Are 'related episodes' selection criteria explicitly defined? [Clarity, Spec §FR-5]"
|
|
151
|
-
- "Is 'prominent' defined with measurable visual properties? [Ambiguity, Spec §FR-4]"
|
|
152
|
-
|
|
153
|
-
Consistency:
|
|
154
|
-
- "Do navigation requirements align across all pages? [Consistency, Spec §FR-10]"
|
|
155
|
-
- "Are card component requirements consistent between landing and detail pages? [Consistency]"
|
|
156
|
-
|
|
157
|
-
Coverage:
|
|
158
|
-
- "Are requirements defined for zero-state scenarios (no episodes)? [Coverage, Edge Case]"
|
|
159
|
-
- "Are concurrent user interaction scenarios addressed? [Coverage, Gap]"
|
|
160
|
-
- "Are requirements specified for partial data loading failures? [Coverage, Exception Flow]"
|
|
161
|
-
|
|
162
|
-
Measurability:
|
|
163
|
-
- "Are visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]"
|
|
164
|
-
- "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]"
|
|
165
|
-
|
|
166
|
-
**Scenario Classification & Coverage** (Requirements Quality Focus):
|
|
167
|
-
- Check if requirements exist for: Primary, Alternate, Exception/Error, Recovery, Non-Functional scenarios
|
|
168
|
-
- For each scenario class, ask: "Are [scenario type] requirements complete, clear, and consistent?"
|
|
169
|
-
- If scenario class missing: "Are [scenario type] requirements intentionally excluded or missing? [Gap]"
|
|
170
|
-
- Include resilience/rollback when state mutation occurs: "Are rollback requirements defined for migration failures? [Gap]"
|
|
171
|
-
|
|
172
|
-
**Traceability Requirements**:
|
|
173
|
-
- MINIMUM: ≥80% of items MUST include at least one traceability reference
|
|
174
|
-
- Each item should reference: spec section `[Spec §X.Y]`, or use markers: `[Gap]`, `[Ambiguity]`, `[Conflict]`, `[Assumption]`
|
|
175
|
-
- If no ID system exists: "Is a requirement & acceptance criteria ID scheme established? [Traceability]"
|
|
176
|
-
|
|
177
|
-
**Surface & Resolve Issues** (Requirements Quality Problems):
|
|
178
|
-
Ask questions about the requirements themselves:
|
|
179
|
-
- Ambiguities: "Is the term 'fast' quantified with specific metrics? [Ambiguity, Spec §NFR-1]"
|
|
180
|
-
- Conflicts: "Do navigation requirements conflict between §FR-10 and §FR-10a? [Conflict]"
|
|
181
|
-
- Assumptions: "Is the assumption of 'always available podcast API' validated? [Assumption]"
|
|
182
|
-
- Dependencies: "Are external podcast API requirements documented? [Dependency, Gap]"
|
|
183
|
-
- Missing definitions: "Is 'visual hierarchy' defined with measurable criteria? [Gap]"
|
|
184
|
-
|
|
185
|
-
**Content Consolidation**:
|
|
186
|
-
- Soft cap: If raw candidate items > 40, prioritize by risk/impact
|
|
187
|
-
- Merge near-duplicates checking the same requirement aspect
|
|
188
|
-
- If >5 low-impact edge cases, create one item: "Are edge cases X, Y, Z addressed in requirements? [Coverage]"
|
|
189
|
-
|
|
190
|
-
**🚫 ABSOLUTELY PROHIBITED** - These make it an implementation test, not a requirements test:
|
|
191
|
-
- ❌ Any item starting with "Verify", "Test", "Confirm", "Check" + implementation behavior
|
|
192
|
-
- ❌ References to code execution, user actions, system behavior
|
|
193
|
-
- ❌ "Displays correctly", "works properly", "functions as expected"
|
|
194
|
-
- ❌ "Click", "navigate", "render", "load", "execute"
|
|
195
|
-
- ❌ Test cases, test plans, QA procedures
|
|
196
|
-
- ❌ Implementation details (frameworks, APIs, algorithms)
|
|
197
|
-
|
|
198
|
-
**✅ REQUIRED PATTERNS** - These test requirements quality:
|
|
199
|
-
- ✅ "Are [requirement type] defined/specified/documented for [scenario]?"
|
|
200
|
-
- ✅ "Is [vague term] quantified/clarified with specific criteria?"
|
|
201
|
-
- ✅ "Are requirements consistent between [section A] and [section B]?"
|
|
202
|
-
- ✅ "Can [requirement] be objectively measured/verified?"
|
|
203
|
-
- ✅ "Are [edge cases/scenarios] addressed in requirements?"
|
|
204
|
-
- ✅ "Does the spec define [missing aspect]?"
|
|
205
|
-
|
|
206
|
-
6. **Structure Reference**: Generate the checklist following the canonical template in `.specify/templates/checklist-template.md` for title, meta section, category headings, and ID formatting. If template is unavailable, use: H1 title, purpose/created meta lines, `##` category sections containing `- [ ] CHK### <requirement item>` lines with globally incrementing IDs starting at CHK001.
|
|
207
|
-
|
|
208
|
-
7. **Report**: Output full path to created checklist, item count, and remind user that each run creates a new file. Summarize:
|
|
209
|
-
- Focus areas selected
|
|
210
|
-
- Depth level
|
|
211
|
-
- Actor/timing
|
|
212
|
-
- Any explicit user-specified must-have items incorporated
|
|
213
|
-
|
|
214
|
-
**Important**: Each `/speckit.checklist` command invocation creates a checklist file using short, descriptive names unless file already exists. This allows:
|
|
215
|
-
|
|
216
|
-
- Multiple checklists of different types (e.g., `ux.md`, `test.md`, `security.md`)
|
|
217
|
-
- Simple, memorable filenames that indicate checklist purpose
|
|
218
|
-
- Easy identification and navigation in the `checklists/` folder
|
|
219
|
-
|
|
220
|
-
To avoid clutter, use descriptive types and clean up obsolete checklists when done.
|
|
221
|
-
|
|
222
|
-
## Example Checklist Types & Sample Items
|
|
223
|
-
|
|
224
|
-
**UX Requirements Quality:** `ux.md`
|
|
225
|
-
|
|
226
|
-
Sample items (testing the requirements, NOT the implementation):
|
|
227
|
-
|
|
228
|
-
- "Are visual hierarchy requirements defined with measurable criteria? [Clarity, Spec §FR-1]"
|
|
229
|
-
- "Is the number and positioning of UI elements explicitly specified? [Completeness, Spec §FR-1]"
|
|
230
|
-
- "Are interaction state requirements (hover, focus, active) consistently defined? [Consistency]"
|
|
231
|
-
- "Are accessibility requirements specified for all interactive elements? [Coverage, Gap]"
|
|
232
|
-
- "Is fallback behavior defined when images fail to load? [Edge Case, Gap]"
|
|
233
|
-
- "Can 'prominent display' be objectively measured? [Measurability, Spec §FR-4]"
|
|
234
|
-
|
|
235
|
-
**API Requirements Quality:** `api.md`
|
|
236
|
-
|
|
237
|
-
Sample items:
|
|
238
|
-
|
|
239
|
-
- "Are error response formats specified for all failure scenarios? [Completeness]"
|
|
240
|
-
- "Are rate limiting requirements quantified with specific thresholds? [Clarity]"
|
|
241
|
-
- "Are authentication requirements consistent across all endpoints? [Consistency]"
|
|
242
|
-
- "Are retry/timeout requirements defined for external dependencies? [Coverage, Gap]"
|
|
243
|
-
- "Is versioning strategy documented in requirements? [Gap]"
|
|
244
|
-
|
|
245
|
-
**Performance Requirements Quality:** `performance.md`
|
|
246
|
-
|
|
247
|
-
Sample items:
|
|
248
|
-
|
|
249
|
-
- "Are performance requirements quantified with specific metrics? [Clarity]"
|
|
250
|
-
- "Are performance targets defined for all critical user journeys? [Coverage]"
|
|
251
|
-
- "Are performance requirements under different load conditions specified? [Completeness]"
|
|
252
|
-
- "Can performance requirements be objectively measured? [Measurability]"
|
|
253
|
-
- "Are degradation requirements defined for high-load scenarios? [Edge Case, Gap]"
|
|
254
|
-
|
|
255
|
-
**Security Requirements Quality:** `security.md`
|
|
256
|
-
|
|
257
|
-
Sample items:
|
|
258
|
-
|
|
259
|
-
- "Are authentication requirements specified for all protected resources? [Coverage]"
|
|
260
|
-
- "Are data protection requirements defined for sensitive information? [Completeness]"
|
|
261
|
-
- "Is the threat model documented and requirements aligned to it? [Traceability]"
|
|
262
|
-
- "Are security requirements consistent with compliance obligations? [Consistency]"
|
|
263
|
-
- "Are security failure/breach response requirements defined? [Gap, Exception Flow]"
|
|
264
|
-
|
|
265
|
-
## Anti-Examples: What NOT To Do
|
|
266
|
-
|
|
267
|
-
**❌ WRONG - These test implementation, not requirements:**
|
|
268
|
-
|
|
269
|
-
```markdown
|
|
270
|
-
- [ ] CHK001 - Verify landing page displays 3 episode cards [Spec §FR-001]
|
|
271
|
-
- [ ] CHK002 - Test hover states work correctly on desktop [Spec §FR-003]
|
|
272
|
-
- [ ] CHK003 - Confirm logo click navigates to home page [Spec §FR-010]
|
|
273
|
-
- [ ] CHK004 - Check that related episodes section shows 3-5 items [Spec §FR-005]
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
**✅ CORRECT - These test requirements quality:**
|
|
277
|
-
|
|
278
|
-
```markdown
|
|
279
|
-
- [ ] CHK001 - Are the number and layout of featured episodes explicitly specified? [Completeness, Spec §FR-001]
|
|
280
|
-
- [ ] CHK002 - Are hover state requirements consistently defined for all interactive elements? [Consistency, Spec §FR-003]
|
|
281
|
-
- [ ] CHK003 - Are navigation requirements clear for all clickable brand elements? [Clarity, Spec §FR-010]
|
|
282
|
-
- [ ] CHK004 - Is the selection criteria for related episodes documented? [Gap, Spec §FR-005]
|
|
283
|
-
- [ ] CHK005 - Are loading state requirements defined for asynchronous episode data? [Gap]
|
|
284
|
-
- [ ] CHK006 - Can "visual hierarchy" requirements be objectively measured? [Measurability, Spec §FR-001]
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
**Key Differences:**
|
|
288
|
-
|
|
289
|
-
- Wrong: Tests if the system works correctly
|
|
290
|
-
- Correct: Tests if the requirements are written correctly
|
|
291
|
-
- Wrong: Verification of behavior
|
|
292
|
-
- Correct: Validation of requirement quality
|
|
293
|
-
- Wrong: "Does it do X?"
|
|
294
|
-
- Correct: "Is X clearly specified?"
|