aimx 0.1.0__tar.gz

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 (66) hide show
  1. aimx-0.1.0/.agents/skills/speckit-analyze/SKILL.md +255 -0
  2. aimx-0.1.0/.agents/skills/speckit-checklist/SKILL.md +367 -0
  3. aimx-0.1.0/.agents/skills/speckit-clarify/SKILL.md +249 -0
  4. aimx-0.1.0/.agents/skills/speckit-constitution/SKILL.md +152 -0
  5. aimx-0.1.0/.agents/skills/speckit-git-commit/SKILL.md +53 -0
  6. aimx-0.1.0/.agents/skills/speckit-git-feature/SKILL.md +72 -0
  7. aimx-0.1.0/.agents/skills/speckit-git-initialize/SKILL.md +54 -0
  8. aimx-0.1.0/.agents/skills/speckit-git-remote/SKILL.md +50 -0
  9. aimx-0.1.0/.agents/skills/speckit-git-validate/SKILL.md +54 -0
  10. aimx-0.1.0/.agents/skills/speckit-implement/SKILL.md +204 -0
  11. aimx-0.1.0/.agents/skills/speckit-plan/SKILL.md +151 -0
  12. aimx-0.1.0/.agents/skills/speckit-specify/SKILL.md +325 -0
  13. aimx-0.1.0/.agents/skills/speckit-tasks/SKILL.md +197 -0
  14. aimx-0.1.0/.agents/skills/speckit-taskstoissues/SKILL.md +101 -0
  15. aimx-0.1.0/.codex/hooks.json +15 -0
  16. aimx-0.1.0/.github/workflows/CI.yaml +27 -0
  17. aimx-0.1.0/.github/workflows/publish.yaml +31 -0
  18. aimx-0.1.0/.gitignore +213 -0
  19. aimx-0.1.0/.python-version +1 -0
  20. aimx-0.1.0/AGENTS.md +82 -0
  21. aimx-0.1.0/CLAUDE.md +1 -0
  22. aimx-0.1.0/CONSTITUTION.md +135 -0
  23. aimx-0.1.0/LICENSE +201 -0
  24. aimx-0.1.0/PKG-INFO +78 -0
  25. aimx-0.1.0/README.md +70 -0
  26. aimx-0.1.0/pyproject.toml +36 -0
  27. aimx-0.1.0/specs/001-aim-command-passthrough/checklists/requirements.md +36 -0
  28. aimx-0.1.0/specs/001-aim-command-passthrough/contracts/cli-contract.md +62 -0
  29. aimx-0.1.0/specs/001-aim-command-passthrough/data-model.md +118 -0
  30. aimx-0.1.0/specs/001-aim-command-passthrough/plan.md +99 -0
  31. aimx-0.1.0/specs/001-aim-command-passthrough/quickstart.md +72 -0
  32. aimx-0.1.0/specs/001-aim-command-passthrough/research.md +88 -0
  33. aimx-0.1.0/specs/001-aim-command-passthrough/spec.md +187 -0
  34. aimx-0.1.0/specs/001-aim-command-passthrough/tasks.md +253 -0
  35. aimx-0.1.0/specs/002-aim-query-command/checklists/requirements.md +36 -0
  36. aimx-0.1.0/specs/002-aim-query-command/contracts/query-command.md +74 -0
  37. aimx-0.1.0/specs/002-aim-query-command/data-model.md +54 -0
  38. aimx-0.1.0/specs/002-aim-query-command/plan.md +117 -0
  39. aimx-0.1.0/specs/002-aim-query-command/quickstart.md +101 -0
  40. aimx-0.1.0/specs/002-aim-query-command/research.md +77 -0
  41. aimx-0.1.0/specs/002-aim-query-command/spec.md +192 -0
  42. aimx-0.1.0/specs/002-aim-query-command/tasks.md +202 -0
  43. aimx-0.1.0/src/aimx/__init__.py +3 -0
  44. aimx-0.1.0/src/aimx/__main__.py +13 -0
  45. aimx-0.1.0/src/aimx/cli.py +41 -0
  46. aimx-0.1.0/src/aimx/commands/__init__.py +1 -0
  47. aimx-0.1.0/src/aimx/commands/doctor.py +17 -0
  48. aimx-0.1.0/src/aimx/commands/help.py +19 -0
  49. aimx-0.1.0/src/aimx/commands/query.py +171 -0
  50. aimx-0.1.0/src/aimx/commands/version.py +12 -0
  51. aimx-0.1.0/src/aimx/native_aim/__init__.py +1 -0
  52. aimx-0.1.0/src/aimx/native_aim/locator.py +55 -0
  53. aimx-0.1.0/src/aimx/native_aim/passthrough.py +34 -0
  54. aimx-0.1.0/src/aimx/router.py +39 -0
  55. aimx-0.1.0/tests/conftest.py +58 -0
  56. aimx-0.1.0/tests/contract/test_cli_contract.py +31 -0
  57. aimx-0.1.0/tests/contract/test_query_contract.py +81 -0
  58. aimx-0.1.0/tests/integration/conftest.py +1 -0
  59. aimx-0.1.0/tests/integration/test_missing_native_aim.py +52 -0
  60. aimx-0.1.0/tests/integration/test_passthrough_behavior.py +31 -0
  61. aimx-0.1.0/tests/integration/test_query_command.py +75 -0
  62. aimx-0.1.0/tests/unit/test_locator.py +30 -0
  63. aimx-0.1.0/tests/unit/test_owned_commands.py +21 -0
  64. aimx-0.1.0/tests/unit/test_query_helpers.py +41 -0
  65. aimx-0.1.0/tests/unit/test_router.py +40 -0
  66. aimx-0.1.0/uv.lock +1089 -0
@@ -0,0 +1,255 @@
1
+ ---
2
+ name: "speckit-analyze"
3
+ description: "Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation."
4
+ compatibility: "Requires spec-kit project structure with .specify/ directory"
5
+ metadata:
6
+ author: "github-spec-kit"
7
+ source: "templates/commands/analyze.md"
8
+ ---
9
+
10
+
11
+ ## User Input
12
+
13
+ ```text
14
+ $ARGUMENTS
15
+ ```
16
+
17
+ You **MUST** consider the user input before proceeding (if not empty).
18
+
19
+ ## Pre-Execution Checks
20
+
21
+ **Check for extension hooks (before analysis)**:
22
+ - Check if `.specify/extensions.yml` exists in the project root.
23
+ - If it exists, read it and look for entries under the `hooks.before_analyze` key
24
+ - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
25
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
26
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
27
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
28
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
29
+ - For each executable hook, output the following based on its `optional` flag:
30
+ - **Optional hook** (`optional: true`):
31
+ ```
32
+ ## Extension Hooks
33
+
34
+ **Optional Pre-Hook**: {extension}
35
+ Command: `/{command}`
36
+ Description: {description}
37
+
38
+ Prompt: {prompt}
39
+ To execute: `/{command}`
40
+ ```
41
+ - **Mandatory hook** (`optional: false`):
42
+ ```
43
+ ## Extension Hooks
44
+
45
+ **Automatic Pre-Hook**: {extension}
46
+ Executing: `/{command}`
47
+ EXECUTE_COMMAND: {command}
48
+
49
+ Wait for the result of the hook command before proceeding to the Goal.
50
+ ```
51
+ - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
52
+
53
+ ## Goal
54
+
55
+ 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`.
56
+
57
+ ## Operating Constraints
58
+
59
+ **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).
60
+
61
+ **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`.
62
+
63
+ ## Execution Steps
64
+
65
+ ### 1. Initialize Analysis Context
66
+
67
+ 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:
68
+
69
+ - SPEC = FEATURE_DIR/spec.md
70
+ - PLAN = FEATURE_DIR/plan.md
71
+ - TASKS = FEATURE_DIR/tasks.md
72
+
73
+ Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
74
+ 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").
75
+
76
+ ### 2. Load Artifacts (Progressive Disclosure)
77
+
78
+ Load only the minimal necessary context from each artifact:
79
+
80
+ **From spec.md:**
81
+
82
+ - Overview/Context
83
+ - Functional Requirements
84
+ - Success Criteria (measurable outcomes — e.g., performance, security, availability, user success, business impact)
85
+ - User Stories
86
+ - Edge Cases (if present)
87
+
88
+ **From plan.md:**
89
+
90
+ - Architecture/stack choices
91
+ - Data Model references
92
+ - Phases
93
+ - Technical constraints
94
+
95
+ **From tasks.md:**
96
+
97
+ - Task IDs
98
+ - Descriptions
99
+ - Phase grouping
100
+ - Parallel markers [P]
101
+ - Referenced file paths
102
+
103
+ **From constitution:**
104
+
105
+ - Load `.specify/memory/constitution.md` for principle validation
106
+
107
+ ### 3. Build Semantic Models
108
+
109
+ Create internal representations (do not include raw artifacts in output):
110
+
111
+ - **Requirements inventory**: For each Functional Requirement (FR-###) and Success Criterion (SC-###), record a stable key. Use the explicit FR-/SC- identifier as the primary key when present, and optionally also derive an imperative-phrase slug for readability (e.g., "User can upload file" → `user-can-upload-file`). Include only Success Criteria items that require buildable work (e.g., load-testing infrastructure, security audit tooling), and exclude post-launch outcome metrics and business KPIs (e.g., "Reduce support tickets by 50%").
112
+ - **User story/action inventory**: Discrete user actions with acceptance criteria
113
+ - **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
114
+ - **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements
115
+
116
+ ### 4. Detection Passes (Token-Efficient Analysis)
117
+
118
+ Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
119
+
120
+ #### A. Duplication Detection
121
+
122
+ - Identify near-duplicate requirements
123
+ - Mark lower-quality phrasing for consolidation
124
+
125
+ #### B. Ambiguity Detection
126
+
127
+ - Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria
128
+ - Flag unresolved placeholders (TODO, TKTK, ???, `<placeholder>`, etc.)
129
+
130
+ #### C. Underspecification
131
+
132
+ - Requirements with verbs but missing object or measurable outcome
133
+ - User stories missing acceptance criteria alignment
134
+ - Tasks referencing files or components not defined in spec/plan
135
+
136
+ #### D. Constitution Alignment
137
+
138
+ - Any requirement or plan element conflicting with a MUST principle
139
+ - Missing mandated sections or quality gates from constitution
140
+
141
+ #### E. Coverage Gaps
142
+
143
+ - Requirements with zero associated tasks
144
+ - Tasks with no mapped requirement/story
145
+ - Success Criteria requiring buildable work (performance, security, availability) not reflected in tasks
146
+
147
+ #### F. Inconsistency
148
+
149
+ - Terminology drift (same concept named differently across files)
150
+ - Data entities referenced in plan but absent in spec (or vice versa)
151
+ - Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note)
152
+ - Conflicting requirements (e.g., one requires Next.js while other specifies Vue)
153
+
154
+ ### 5. Severity Assignment
155
+
156
+ Use this heuristic to prioritize findings:
157
+
158
+ - **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
159
+ - **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
160
+ - **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
161
+ - **LOW**: Style/wording improvements, minor redundancy not affecting execution order
162
+
163
+ ### 6. Produce Compact Analysis Report
164
+
165
+ Output a Markdown report (no file writes) with the following structure:
166
+
167
+ ## Specification Analysis Report
168
+
169
+ | ID | Category | Severity | Location(s) | Summary | Recommendation |
170
+ |----|----------|----------|-------------|---------|----------------|
171
+ | A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
172
+
173
+ (Add one row per finding; generate stable IDs prefixed by category initial.)
174
+
175
+ **Coverage Summary Table:**
176
+
177
+ | Requirement Key | Has Task? | Task IDs | Notes |
178
+ |-----------------|-----------|----------|-------|
179
+
180
+ **Constitution Alignment Issues:** (if any)
181
+
182
+ **Unmapped Tasks:** (if any)
183
+
184
+ **Metrics:**
185
+
186
+ - Total Requirements
187
+ - Total Tasks
188
+ - Coverage % (requirements with >=1 task)
189
+ - Ambiguity Count
190
+ - Duplication Count
191
+ - Critical Issues Count
192
+
193
+ ### 7. Provide Next Actions
194
+
195
+ At end of report, output a concise Next Actions block:
196
+
197
+ - If CRITICAL issues exist: Recommend resolving before `/speckit.implement`
198
+ - If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
199
+ - 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'"
200
+
201
+ ### 8. Offer Remediation
202
+
203
+ Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
204
+
205
+ ### 9. Check for extension hooks
206
+
207
+ After reporting, check if `.specify/extensions.yml` exists in the project root.
208
+ - If it exists, read it and look for entries under the `hooks.after_analyze` key
209
+ - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
210
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
211
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
212
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
213
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
214
+ - For each executable hook, output the following based on its `optional` flag:
215
+ - **Optional hook** (`optional: true`):
216
+ ```
217
+ ## Extension Hooks
218
+
219
+ **Optional Hook**: {extension}
220
+ Command: `/{command}`
221
+ Description: {description}
222
+
223
+ Prompt: {prompt}
224
+ To execute: `/{command}`
225
+ ```
226
+ - **Mandatory hook** (`optional: false`):
227
+ ```
228
+ ## Extension Hooks
229
+
230
+ **Automatic Hook**: {extension}
231
+ Executing: `/{command}`
232
+ EXECUTE_COMMAND: {command}
233
+ ```
234
+ - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
235
+
236
+ ## Operating Principles
237
+
238
+ ### Context Efficiency
239
+
240
+ - **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
241
+ - **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
242
+ - **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
243
+ - **Deterministic results**: Rerunning without changes should produce consistent IDs and counts
244
+
245
+ ### Analysis Guidelines
246
+
247
+ - **NEVER modify files** (this is read-only analysis)
248
+ - **NEVER hallucinate missing sections** (if absent, report them accurately)
249
+ - **Prioritize constitution violations** (these are always CRITICAL)
250
+ - **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
251
+ - **Report zero issues gracefully** (emit success report with coverage statistics)
252
+
253
+ ## Context
254
+
255
+ $ARGUMENTS
@@ -0,0 +1,367 @@
1
+ ---
2
+ name: "speckit-checklist"
3
+ description: "Generate a custom checklist for the current feature based on user requirements."
4
+ compatibility: "Requires spec-kit project structure with .specify/ directory"
5
+ metadata:
6
+ author: "github-spec-kit"
7
+ source: "templates/commands/checklist.md"
8
+ ---
9
+
10
+
11
+ ## Checklist Purpose: "Unit Tests for English"
12
+
13
+ **CRITICAL CONCEPT**: Checklists are **UNIT TESTS FOR REQUIREMENTS WRITING** - they validate the quality, clarity, and completeness of requirements in a given domain.
14
+
15
+ **NOT for verification/testing**:
16
+
17
+ - ❌ NOT "Verify the button clicks correctly"
18
+ - ❌ NOT "Test error handling works"
19
+ - ❌ NOT "Confirm the API returns 200"
20
+ - ❌ NOT checking if code/implementation matches the spec
21
+
22
+ **FOR requirements quality validation**:
23
+
24
+ - ✅ "Are visual hierarchy requirements defined for all card types?" (completeness)
25
+ - ✅ "Is 'prominent display' quantified with specific sizing/positioning?" (clarity)
26
+ - ✅ "Are hover state requirements consistent across all interactive elements?" (consistency)
27
+ - ✅ "Are accessibility requirements defined for keyboard navigation?" (coverage)
28
+ - ✅ "Does the spec define what happens when logo image fails to load?" (edge cases)
29
+
30
+ **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.
31
+
32
+ ## User Input
33
+
34
+ ```text
35
+ $ARGUMENTS
36
+ ```
37
+
38
+ You **MUST** consider the user input before proceeding (if not empty).
39
+
40
+ ## Pre-Execution Checks
41
+
42
+ **Check for extension hooks (before checklist generation)**:
43
+ - Check if `.specify/extensions.yml` exists in the project root.
44
+ - If it exists, read it and look for entries under the `hooks.before_checklist` key
45
+ - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
46
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
47
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
48
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
49
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
50
+ - For each executable hook, output the following based on its `optional` flag:
51
+ - **Optional hook** (`optional: true`):
52
+ ```
53
+ ## Extension Hooks
54
+
55
+ **Optional Pre-Hook**: {extension}
56
+ Command: `/{command}`
57
+ Description: {description}
58
+
59
+ Prompt: {prompt}
60
+ To execute: `/{command}`
61
+ ```
62
+ - **Mandatory hook** (`optional: false`):
63
+ ```
64
+ ## Extension Hooks
65
+
66
+ **Automatic Pre-Hook**: {extension}
67
+ Executing: `/{command}`
68
+ EXECUTE_COMMAND: {command}
69
+
70
+ Wait for the result of the hook command before proceeding to the Execution Steps.
71
+ ```
72
+ - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
73
+
74
+ ## Execution Steps
75
+
76
+ 1. **Setup**: Run `.specify/scripts/bash/check-prerequisites.sh --json` from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS list.
77
+ - All file paths must be absolute.
78
+ - 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").
79
+
80
+ 2. **Clarify intent (dynamic)**: Derive up to THREE initial contextual clarifying questions (no pre-baked catalog). They MUST:
81
+ - Be generated from the user's phrasing + extracted signals from spec/plan/tasks
82
+ - Only ask about information that materially changes checklist content
83
+ - Be skipped individually if already unambiguous in `$ARGUMENTS`
84
+ - Prefer precision over breadth
85
+
86
+ Generation algorithm:
87
+ 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").
88
+ 2. Cluster signals into candidate focus areas (max 4) ranked by relevance.
89
+ 3. Identify probable audience & timing (author, reviewer, QA, release) if not explicit.
90
+ 4. Detect missing dimensions: scope breadth, depth/rigor, risk emphasis, exclusion boundaries, measurable acceptance criteria.
91
+ 5. Formulate questions chosen from these archetypes:
92
+ - Scope refinement (e.g., "Should this include integration touchpoints with X and Y or stay limited to local module correctness?")
93
+ - Risk prioritization (e.g., "Which of these potential risk areas should receive mandatory gating checks?")
94
+ - Depth calibration (e.g., "Is this a lightweight pre-commit sanity list or a formal release gate?")
95
+ - Audience framing (e.g., "Will this be used by the author only or peers during PR review?")
96
+ - Boundary exclusion (e.g., "Should we explicitly exclude performance tuning items this round?")
97
+ - Scenario class gap (e.g., "No recovery flows detected—are rollback / partial failure paths in scope?")
98
+
99
+ Question formatting rules:
100
+ - If presenting options, generate a compact table with columns: Option | Candidate | Why It Matters
101
+ - Limit to A–E options maximum; omit table if a free-form answer is clearer
102
+ - Never ask the user to restate what they already said
103
+ - Avoid speculative categories (no hallucination). If uncertain, ask explicitly: "Confirm whether X belongs in scope."
104
+
105
+ Defaults when interaction impossible:
106
+ - Depth: Standard
107
+ - Audience: Reviewer (PR) if code-related; Author otherwise
108
+ - Focus: Top 2 relevance clusters
109
+
110
+ 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.
111
+
112
+ 3. **Understand user request**: Combine `$ARGUMENTS` + clarifying answers:
113
+ - Derive checklist theme (e.g., security, review, deploy, ux)
114
+ - Consolidate explicit must-have items mentioned by user
115
+ - Map focus selections to category scaffolding
116
+ - Infer any missing context from spec/plan/tasks (do NOT hallucinate)
117
+
118
+ 4. **Load feature context**: Read from FEATURE_DIR:
119
+ - spec.md: Feature requirements and scope
120
+ - plan.md (if exists): Technical details, dependencies
121
+ - tasks.md (if exists): Implementation tasks
122
+
123
+ **Context Loading Strategy**:
124
+ - Load only necessary portions relevant to active focus areas (avoid full-file dumping)
125
+ - Prefer summarizing long sections into concise scenario/requirement bullets
126
+ - Use progressive disclosure: add follow-on retrieval only if gaps detected
127
+ - If source docs are large, generate interim summary items instead of embedding raw text
128
+
129
+ 5. **Generate checklist** - Create "Unit Tests for Requirements":
130
+ - Create `FEATURE_DIR/checklists/` directory if it doesn't exist
131
+ - Generate unique checklist filename:
132
+ - Use short, descriptive name based on domain (e.g., `ux.md`, `api.md`, `security.md`)
133
+ - Format: `[domain].md`
134
+ - File handling behavior:
135
+ - If file does NOT exist: Create new file and number items starting from CHK001
136
+ - If file exists: Append new items to existing file, continuing from the last CHK ID (e.g., if last item is CHK015, start new items at CHK016)
137
+ - Never delete or replace existing checklist content - always preserve and append
138
+
139
+ **CORE PRINCIPLE - Test the Requirements, Not the Implementation**:
140
+ Every checklist item MUST evaluate the REQUIREMENTS THEMSELVES for:
141
+ - **Completeness**: Are all necessary requirements present?
142
+ - **Clarity**: Are requirements unambiguous and specific?
143
+ - **Consistency**: Do requirements align with each other?
144
+ - **Measurability**: Can requirements be objectively verified?
145
+ - **Coverage**: Are all scenarios/edge cases addressed?
146
+
147
+ **Category Structure** - Group items by requirement quality dimensions:
148
+ - **Requirement Completeness** (Are all necessary requirements documented?)
149
+ - **Requirement Clarity** (Are requirements specific and unambiguous?)
150
+ - **Requirement Consistency** (Do requirements align without conflicts?)
151
+ - **Acceptance Criteria Quality** (Are success criteria measurable?)
152
+ - **Scenario Coverage** (Are all flows/cases addressed?)
153
+ - **Edge Case Coverage** (Are boundary conditions defined?)
154
+ - **Non-Functional Requirements** (Performance, Security, Accessibility, etc. - are they specified?)
155
+ - **Dependencies & Assumptions** (Are they documented and validated?)
156
+ - **Ambiguities & Conflicts** (What needs clarification?)
157
+
158
+ **HOW TO WRITE CHECKLIST ITEMS - "Unit Tests for English"**:
159
+
160
+ ❌ **WRONG** (Testing implementation):
161
+ - "Verify landing page displays 3 episode cards"
162
+ - "Test hover states work on desktop"
163
+ - "Confirm logo click navigates home"
164
+
165
+ ✅ **CORRECT** (Testing requirements quality):
166
+ - "Are the exact number and layout of featured episodes specified?" [Completeness]
167
+ - "Is 'prominent display' quantified with specific sizing/positioning?" [Clarity]
168
+ - "Are hover state requirements consistent across all interactive elements?" [Consistency]
169
+ - "Are keyboard navigation requirements defined for all interactive UI?" [Coverage]
170
+ - "Is the fallback behavior specified when logo image fails to load?" [Edge Cases]
171
+ - "Are loading states defined for asynchronous episode data?" [Completeness]
172
+ - "Does the spec define visual hierarchy for competing UI elements?" [Clarity]
173
+
174
+ **ITEM STRUCTURE**:
175
+ Each item should follow this pattern:
176
+ - Question format asking about requirement quality
177
+ - Focus on what's WRITTEN (or not written) in the spec/plan
178
+ - Include quality dimension in brackets [Completeness/Clarity/Consistency/etc.]
179
+ - Reference spec section `[Spec §X.Y]` when checking existing requirements
180
+ - Use `[Gap]` marker when checking for missing requirements
181
+
182
+ **EXAMPLES BY QUALITY DIMENSION**:
183
+
184
+ Completeness:
185
+ - "Are error handling requirements defined for all API failure modes? [Gap]"
186
+ - "Are accessibility requirements specified for all interactive elements? [Completeness]"
187
+ - "Are mobile breakpoint requirements defined for responsive layouts? [Gap]"
188
+
189
+ Clarity:
190
+ - "Is 'fast loading' quantified with specific timing thresholds? [Clarity, Spec §NFR-2]"
191
+ - "Are 'related episodes' selection criteria explicitly defined? [Clarity, Spec §FR-5]"
192
+ - "Is 'prominent' defined with measurable visual properties? [Ambiguity, Spec §FR-4]"
193
+
194
+ Consistency:
195
+ - "Do navigation requirements align across all pages? [Consistency, Spec §FR-10]"
196
+ - "Are card component requirements consistent between landing and detail pages? [Consistency]"
197
+
198
+ Coverage:
199
+ - "Are requirements defined for zero-state scenarios (no episodes)? [Coverage, Edge Case]"
200
+ - "Are concurrent user interaction scenarios addressed? [Coverage, Gap]"
201
+ - "Are requirements specified for partial data loading failures? [Coverage, Exception Flow]"
202
+
203
+ Measurability:
204
+ - "Are visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]"
205
+ - "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]"
206
+
207
+ **Scenario Classification & Coverage** (Requirements Quality Focus):
208
+ - Check if requirements exist for: Primary, Alternate, Exception/Error, Recovery, Non-Functional scenarios
209
+ - For each scenario class, ask: "Are [scenario type] requirements complete, clear, and consistent?"
210
+ - If scenario class missing: "Are [scenario type] requirements intentionally excluded or missing? [Gap]"
211
+ - Include resilience/rollback when state mutation occurs: "Are rollback requirements defined for migration failures? [Gap]"
212
+
213
+ **Traceability Requirements**:
214
+ - MINIMUM: ≥80% of items MUST include at least one traceability reference
215
+ - Each item should reference: spec section `[Spec §X.Y]`, or use markers: `[Gap]`, `[Ambiguity]`, `[Conflict]`, `[Assumption]`
216
+ - If no ID system exists: "Is a requirement & acceptance criteria ID scheme established? [Traceability]"
217
+
218
+ **Surface & Resolve Issues** (Requirements Quality Problems):
219
+ Ask questions about the requirements themselves:
220
+ - Ambiguities: "Is the term 'fast' quantified with specific metrics? [Ambiguity, Spec §NFR-1]"
221
+ - Conflicts: "Do navigation requirements conflict between §FR-10 and §FR-10a? [Conflict]"
222
+ - Assumptions: "Is the assumption of 'always available podcast API' validated? [Assumption]"
223
+ - Dependencies: "Are external podcast API requirements documented? [Dependency, Gap]"
224
+ - Missing definitions: "Is 'visual hierarchy' defined with measurable criteria? [Gap]"
225
+
226
+ **Content Consolidation**:
227
+ - Soft cap: If raw candidate items > 40, prioritize by risk/impact
228
+ - Merge near-duplicates checking the same requirement aspect
229
+ - If >5 low-impact edge cases, create one item: "Are edge cases X, Y, Z addressed in requirements? [Coverage]"
230
+
231
+ **🚫 ABSOLUTELY PROHIBITED** - These make it an implementation test, not a requirements test:
232
+ - ❌ Any item starting with "Verify", "Test", "Confirm", "Check" + implementation behavior
233
+ - ❌ References to code execution, user actions, system behavior
234
+ - ❌ "Displays correctly", "works properly", "functions as expected"
235
+ - ❌ "Click", "navigate", "render", "load", "execute"
236
+ - ❌ Test cases, test plans, QA procedures
237
+ - ❌ Implementation details (frameworks, APIs, algorithms)
238
+
239
+ **✅ REQUIRED PATTERNS** - These test requirements quality:
240
+ - ✅ "Are [requirement type] defined/specified/documented for [scenario]?"
241
+ - ✅ "Is [vague term] quantified/clarified with specific criteria?"
242
+ - ✅ "Are requirements consistent between [section A] and [section B]?"
243
+ - ✅ "Can [requirement] be objectively measured/verified?"
244
+ - ✅ "Are [edge cases/scenarios] addressed in requirements?"
245
+ - ✅ "Does the spec define [missing aspect]?"
246
+
247
+ 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.
248
+
249
+ 7. **Report**: Output full path to checklist file, item count, and summarize whether the run created a new file or appended to an existing one. Summarize:
250
+ - Focus areas selected
251
+ - Depth level
252
+ - Actor/timing
253
+ - Any explicit user-specified must-have items incorporated
254
+
255
+ **Important**: Each `/speckit.checklist` command invocation uses a short, descriptive checklist filename and either creates a new file or appends to an existing one. This allows:
256
+
257
+ - Multiple checklists of different types (e.g., `ux.md`, `test.md`, `security.md`)
258
+ - Simple, memorable filenames that indicate checklist purpose
259
+ - Easy identification and navigation in the `checklists/` folder
260
+
261
+ To avoid clutter, use descriptive types and clean up obsolete checklists when done.
262
+
263
+ ## Example Checklist Types & Sample Items
264
+
265
+ **UX Requirements Quality:** `ux.md`
266
+
267
+ Sample items (testing the requirements, NOT the implementation):
268
+
269
+ - "Are visual hierarchy requirements defined with measurable criteria? [Clarity, Spec §FR-1]"
270
+ - "Is the number and positioning of UI elements explicitly specified? [Completeness, Spec §FR-1]"
271
+ - "Are interaction state requirements (hover, focus, active) consistently defined? [Consistency]"
272
+ - "Are accessibility requirements specified for all interactive elements? [Coverage, Gap]"
273
+ - "Is fallback behavior defined when images fail to load? [Edge Case, Gap]"
274
+ - "Can 'prominent display' be objectively measured? [Measurability, Spec §FR-4]"
275
+
276
+ **API Requirements Quality:** `api.md`
277
+
278
+ Sample items:
279
+
280
+ - "Are error response formats specified for all failure scenarios? [Completeness]"
281
+ - "Are rate limiting requirements quantified with specific thresholds? [Clarity]"
282
+ - "Are authentication requirements consistent across all endpoints? [Consistency]"
283
+ - "Are retry/timeout requirements defined for external dependencies? [Coverage, Gap]"
284
+ - "Is versioning strategy documented in requirements? [Gap]"
285
+
286
+ **Performance Requirements Quality:** `performance.md`
287
+
288
+ Sample items:
289
+
290
+ - "Are performance requirements quantified with specific metrics? [Clarity]"
291
+ - "Are performance targets defined for all critical user journeys? [Coverage]"
292
+ - "Are performance requirements under different load conditions specified? [Completeness]"
293
+ - "Can performance requirements be objectively measured? [Measurability]"
294
+ - "Are degradation requirements defined for high-load scenarios? [Edge Case, Gap]"
295
+
296
+ **Security Requirements Quality:** `security.md`
297
+
298
+ Sample items:
299
+
300
+ - "Are authentication requirements specified for all protected resources? [Coverage]"
301
+ - "Are data protection requirements defined for sensitive information? [Completeness]"
302
+ - "Is the threat model documented and requirements aligned to it? [Traceability]"
303
+ - "Are security requirements consistent with compliance obligations? [Consistency]"
304
+ - "Are security failure/breach response requirements defined? [Gap, Exception Flow]"
305
+
306
+ ## Anti-Examples: What NOT To Do
307
+
308
+ **❌ WRONG - These test implementation, not requirements:**
309
+
310
+ ```markdown
311
+ - [ ] CHK001 - Verify landing page displays 3 episode cards [Spec §FR-001]
312
+ - [ ] CHK002 - Test hover states work correctly on desktop [Spec §FR-003]
313
+ - [ ] CHK003 - Confirm logo click navigates to home page [Spec §FR-010]
314
+ - [ ] CHK004 - Check that related episodes section shows 3-5 items [Spec §FR-005]
315
+ ```
316
+
317
+ **✅ CORRECT - These test requirements quality:**
318
+
319
+ ```markdown
320
+ - [ ] CHK001 - Are the number and layout of featured episodes explicitly specified? [Completeness, Spec §FR-001]
321
+ - [ ] CHK002 - Are hover state requirements consistently defined for all interactive elements? [Consistency, Spec §FR-003]
322
+ - [ ] CHK003 - Are navigation requirements clear for all clickable brand elements? [Clarity, Spec §FR-010]
323
+ - [ ] CHK004 - Is the selection criteria for related episodes documented? [Gap, Spec §FR-005]
324
+ - [ ] CHK005 - Are loading state requirements defined for asynchronous episode data? [Gap]
325
+ - [ ] CHK006 - Can "visual hierarchy" requirements be objectively measured? [Measurability, Spec §FR-001]
326
+ ```
327
+
328
+ **Key Differences:**
329
+
330
+ - Wrong: Tests if the system works correctly
331
+ - Correct: Tests if the requirements are written correctly
332
+ - Wrong: Verification of behavior
333
+ - Correct: Validation of requirement quality
334
+ - Wrong: "Does it do X?"
335
+ - Correct: "Is X clearly specified?"
336
+
337
+ ## Post-Execution Checks
338
+
339
+ **Check for extension hooks (after checklist generation)**:
340
+ Check if `.specify/extensions.yml` exists in the project root.
341
+ - If it exists, read it and look for entries under the `hooks.after_checklist` key
342
+ - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
343
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
344
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
345
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
346
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
347
+ - For each executable hook, output the following based on its `optional` flag:
348
+ - **Optional hook** (`optional: true`):
349
+ ```
350
+ ## Extension Hooks
351
+
352
+ **Optional Hook**: {extension}
353
+ Command: `/{command}`
354
+ Description: {description}
355
+
356
+ Prompt: {prompt}
357
+ To execute: `/{command}`
358
+ ```
359
+ - **Mandatory hook** (`optional: false`):
360
+ ```
361
+ ## Extension Hooks
362
+
363
+ **Automatic Hook**: {extension}
364
+ Executing: `/{command}`
365
+ EXECUTE_COMMAND: {command}
366
+ ```
367
+ - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently