pdmt5 0.2.2__tar.gz → 0.2.3__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 (90) hide show
  1. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/settings.json +3 -0
  2. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/skills/local-qa/SKILL.md +2 -1
  3. pdmt5-0.2.3/.claude/skills/speckit-analyze/SKILL.md +193 -0
  4. pdmt5-0.2.3/.claude/skills/speckit-baseline/SKILL.md +114 -0
  5. pdmt5-0.2.3/.claude/skills/speckit-checklist/SKILL.md +304 -0
  6. pdmt5-0.2.3/.claude/skills/speckit-clarify/SKILL.md +193 -0
  7. pdmt5-0.2.3/.claude/skills/speckit-constitution/SKILL.md +101 -0
  8. pdmt5-0.2.3/.claude/skills/speckit-implement/SKILL.md +148 -0
  9. pdmt5-0.2.3/.claude/skills/speckit-plan/SKILL.md +104 -0
  10. pdmt5-0.2.3/.claude/skills/speckit-specify/SKILL.md +267 -0
  11. pdmt5-0.2.3/.claude/skills/speckit-tasks/SKILL.md +146 -0
  12. pdmt5-0.2.3/.claude/skills/speckit-taskstoissues/SKILL.md +42 -0
  13. {pdmt5-0.2.2 → pdmt5-0.2.3}/.github/workflows/ci.yml +2 -24
  14. {pdmt5-0.2.2 → pdmt5-0.2.3}/PKG-INFO +1 -1
  15. {pdmt5-0.2.2 → pdmt5-0.2.3}/pdmt5/dataframe.py +77 -51
  16. {pdmt5-0.2.2 → pdmt5-0.2.3}/pdmt5/mt5.py +12 -3
  17. {pdmt5-0.2.2 → pdmt5-0.2.3}/pdmt5/utils.py +27 -13
  18. {pdmt5-0.2.2 → pdmt5-0.2.3}/pyproject.toml +1 -6
  19. {pdmt5-0.2.2 → pdmt5-0.2.3}/tests/test_dataframe.py +127 -77
  20. {pdmt5-0.2.2 → pdmt5-0.2.3}/tests/test_mt5.py +11 -13
  21. {pdmt5-0.2.2 → pdmt5-0.2.3}/tests/test_trading.py +126 -96
  22. {pdmt5-0.2.2 → pdmt5-0.2.3}/tests/test_utils.py +3 -5
  23. {pdmt5-0.2.2 → pdmt5-0.2.3}/uv.lock +2 -2
  24. pdmt5-0.2.2/.claude/skills/codex-ask/SKILL.md +0 -187
  25. pdmt5-0.2.2/.claude/skills/codex-exec/SKILL.md +0 -313
  26. pdmt5-0.2.2/.claude/skills/codex-review/SKILL.md +0 -357
  27. pdmt5-0.2.2/.claude/skills/codex-search/SKILL.md +0 -431
  28. pdmt5-0.2.2/.claude/skills/speckit-analyze/SKILL.md +0 -86
  29. pdmt5-0.2.2/.claude/skills/speckit-checklist/SKILL.md +0 -106
  30. pdmt5-0.2.2/.claude/skills/speckit-clarify/SKILL.md +0 -99
  31. pdmt5-0.2.2/.claude/skills/speckit-constitution/SKILL.md +0 -89
  32. pdmt5-0.2.2/.claude/skills/speckit-implement/SKILL.md +0 -78
  33. pdmt5-0.2.2/.claude/skills/speckit-plan/SKILL.md +0 -71
  34. pdmt5-0.2.2/.claude/skills/speckit-specify/SKILL.md +0 -75
  35. pdmt5-0.2.2/.claude/skills/speckit-tasks/SKILL.md +0 -79
  36. pdmt5-0.2.2/.claude/skills/speckit-taskstoissues/SKILL.md +0 -131
  37. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/agents/codex.md +0 -0
  38. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/commands/speckit.analyze.md +0 -0
  39. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/commands/speckit.checklist.md +0 -0
  40. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/commands/speckit.clarify.md +0 -0
  41. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/commands/speckit.constitution.md +0 -0
  42. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/commands/speckit.implement.md +0 -0
  43. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/commands/speckit.plan.md +0 -0
  44. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/commands/speckit.specify.md +0 -0
  45. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/commands/speckit.tasks.md +0 -0
  46. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/commands/speckit.taskstoissues.md +0 -0
  47. {pdmt5-0.2.2 → pdmt5-0.2.3}/.claude/skills/local-qa/scripts/qa.sh +0 -0
  48. {pdmt5-0.2.2 → pdmt5-0.2.3}/.codex/prompts/speckit.analyze.md +0 -0
  49. {pdmt5-0.2.2 → pdmt5-0.2.3}/.codex/prompts/speckit.checklist.md +0 -0
  50. {pdmt5-0.2.2 → pdmt5-0.2.3}/.codex/prompts/speckit.clarify.md +0 -0
  51. {pdmt5-0.2.2 → pdmt5-0.2.3}/.codex/prompts/speckit.constitution.md +0 -0
  52. {pdmt5-0.2.2 → pdmt5-0.2.3}/.codex/prompts/speckit.implement.md +0 -0
  53. {pdmt5-0.2.2 → pdmt5-0.2.3}/.codex/prompts/speckit.plan.md +0 -0
  54. {pdmt5-0.2.2 → pdmt5-0.2.3}/.codex/prompts/speckit.specify.md +0 -0
  55. {pdmt5-0.2.2 → pdmt5-0.2.3}/.codex/prompts/speckit.tasks.md +0 -0
  56. {pdmt5-0.2.2 → pdmt5-0.2.3}/.codex/prompts/speckit.taskstoissues.md +0 -0
  57. {pdmt5-0.2.2 → pdmt5-0.2.3}/.github/FUNDING.yml +0 -0
  58. {pdmt5-0.2.2 → pdmt5-0.2.3}/.github/dependabot.yml +0 -0
  59. {pdmt5-0.2.2 → pdmt5-0.2.3}/.github/renovate.json +0 -0
  60. {pdmt5-0.2.2 → pdmt5-0.2.3}/.gitignore +0 -0
  61. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/memory/constitution.md +0 -0
  62. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/scripts/bash/check-prerequisites.sh +0 -0
  63. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/scripts/bash/common.sh +0 -0
  64. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/scripts/bash/create-new-feature.sh +0 -0
  65. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/scripts/bash/setup-plan.sh +0 -0
  66. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/scripts/bash/update-agent-context.sh +0 -0
  67. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/templates/agent-file-template.md +0 -0
  68. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/templates/checklist-template.md +0 -0
  69. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/templates/plan-template.md +0 -0
  70. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/templates/spec-template.md +0 -0
  71. {pdmt5-0.2.2 → pdmt5-0.2.3}/.specify/templates/tasks-template.md +0 -0
  72. {pdmt5-0.2.2 → pdmt5-0.2.3}/AGENTS.md +0 -0
  73. {pdmt5-0.2.2 → pdmt5-0.2.3}/CLAUDE.md +0 -0
  74. {pdmt5-0.2.2 → pdmt5-0.2.3}/LICENSE +0 -0
  75. {pdmt5-0.2.2 → pdmt5-0.2.3}/README.md +0 -0
  76. {pdmt5-0.2.2 → pdmt5-0.2.3}/docs/api/dataframe.md +0 -0
  77. {pdmt5-0.2.2 → pdmt5-0.2.3}/docs/api/index.md +0 -0
  78. {pdmt5-0.2.2 → pdmt5-0.2.3}/docs/api/mt5.md +0 -0
  79. {pdmt5-0.2.2 → pdmt5-0.2.3}/docs/api/trading.md +0 -0
  80. {pdmt5-0.2.2 → pdmt5-0.2.3}/docs/api/utils.md +0 -0
  81. {pdmt5-0.2.2 → pdmt5-0.2.3}/docs/index.md +0 -0
  82. {pdmt5-0.2.2 → pdmt5-0.2.3}/mkdocs.yml +0 -0
  83. {pdmt5-0.2.2 → pdmt5-0.2.3}/pdmt5/__init__.py +0 -0
  84. {pdmt5-0.2.2 → pdmt5-0.2.3}/pdmt5/trading.py +0 -0
  85. {pdmt5-0.2.2 → pdmt5-0.2.3}/specs/042-mt5-core-client/spec.md +0 -0
  86. {pdmt5-0.2.2 → pdmt5-0.2.3}/specs/043-mt5-dataframe-client/spec.md +0 -0
  87. {pdmt5-0.2.2 → pdmt5-0.2.3}/specs/044-mt5-trading-client/spec.md +0 -0
  88. {pdmt5-0.2.2 → pdmt5-0.2.3}/specs/045-mt5-utils/spec.md +0 -0
  89. {pdmt5-0.2.2 → pdmt5-0.2.3}/tests/__init__.py +0 -0
  90. {pdmt5-0.2.2 → pdmt5-0.2.3}/tests/test_init.py +0 -0
@@ -11,5 +11,8 @@
11
11
  ]
12
12
  }
13
13
  ]
14
+ },
15
+ "enabledPlugins": {
16
+ "code-simplifier@claude-plugins-official": true
14
17
  }
15
18
  }
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: local-qa
3
- description: Run local QA for the repository. Use when asked to run formatting, linting, testing, or pre-commit checks, when verifying local QA, or whenever any file has been updated and local QA should be re-run.
3
+ description: Run local QA including formatting, linting, and testing for the repository. Use whenever any file has been updated.
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
7
  # Local QA (format, lint, and test)
@@ -0,0 +1,193 @@
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
+ ---
5
+
6
+ # Spec Kit Analyze Skill
7
+
8
+ ## When to Use
9
+
10
+ - You have `spec.md`, `plan.md`, and `tasks.md` and need a read-only consistency analysis before implementation.
11
+
12
+ ## Inputs
13
+
14
+ - `specs/<feature>/spec.md`, `plan.md`, `tasks.md`
15
+ - `.specify/memory/constitution.md`
16
+ - Any user concerns or focus areas from the request
17
+
18
+ ## Goal
19
+
20
+ Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. This skill MUST run only after a complete `tasks.md` exists (typically after speckit-tasks).
21
+
22
+ ## Operating Constraints
23
+
24
+ **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 edits are performed manually).
25
+
26
+ **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 this skill.
27
+
28
+ ## Workflow
29
+
30
+ ### 1. Initialize Analysis Context
31
+
32
+ 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:
33
+
34
+ - SPEC = FEATURE_DIR/spec.md
35
+ - PLAN = FEATURE_DIR/plan.md
36
+ - TASKS = FEATURE_DIR/tasks.md
37
+
38
+ Abort with an error message if any required file is missing (instruct the user to run the missing prerequisite skill or script).
39
+ 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").
40
+
41
+ ### 2. Load Artifacts (Progressive Disclosure)
42
+
43
+ Load only the minimal necessary context from each artifact:
44
+
45
+ **From spec.md:**
46
+
47
+ - Overview/Context
48
+ - Functional Requirements
49
+ - Non-Functional Requirements
50
+ - User Stories
51
+ - Edge Cases (if present)
52
+
53
+ **From plan.md:**
54
+
55
+ - Architecture/stack choices
56
+ - Data Model references
57
+ - Phases
58
+ - Technical constraints
59
+
60
+ **From tasks.md:**
61
+
62
+ - Task IDs
63
+ - Descriptions
64
+ - Phase grouping
65
+ - Parallel markers [P]
66
+ - Referenced file paths
67
+
68
+ **From constitution:**
69
+
70
+ - Load `.specify/memory/constitution.md` for principle validation
71
+
72
+ ### 3. Build Semantic Models
73
+
74
+ Create internal representations (do not include raw artifacts in output):
75
+
76
+ - **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`)
77
+ - **User story/action inventory**: Discrete user actions with acceptance criteria
78
+ - **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
79
+ - **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements
80
+
81
+ ### 4. Detection Passes (Token-Efficient Analysis)
82
+
83
+ Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
84
+
85
+ #### A. Duplication Detection
86
+
87
+ - Identify near-duplicate requirements
88
+ - Mark lower-quality phrasing for consolidation
89
+
90
+ #### B. Ambiguity Detection
91
+
92
+ - Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria
93
+ - Flag unresolved placeholders (TODO, TKTK, ???, `<placeholder>`, etc.)
94
+
95
+ #### C. Underspecification
96
+
97
+ - Requirements with verbs but missing object or measurable outcome
98
+ - User stories missing acceptance criteria alignment
99
+ - Tasks referencing files or components not defined in spec/plan
100
+
101
+ #### D. Constitution Alignment
102
+
103
+ - Any requirement or plan element conflicting with a MUST principle
104
+ - Missing mandated sections or quality gates from constitution
105
+
106
+ #### E. Coverage Gaps
107
+
108
+ - Requirements with zero associated tasks
109
+ - Tasks with no mapped requirement/story
110
+ - Non-functional requirements not reflected in tasks (e.g., performance, security)
111
+
112
+ #### F. Inconsistency
113
+
114
+ - Terminology drift (same concept named differently across files)
115
+ - Data entities referenced in plan but absent in spec (or vice versa)
116
+ - Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note)
117
+ - Conflicting requirements (e.g., one requires Next.js while other specifies Vue)
118
+
119
+ ### 5. Severity Assignment
120
+
121
+ Use this heuristic to prioritize findings:
122
+
123
+ - **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
124
+ - **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
125
+ - **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
126
+ - **LOW**: Style/wording improvements, minor redundancy not affecting execution order
127
+
128
+ ### 6. Produce Compact Analysis Report
129
+
130
+ Output a Markdown report (no file writes) with the following structure:
131
+
132
+ ## Specification Analysis Report
133
+
134
+ | ID | Category | Severity | Location(s) | Summary | Recommendation |
135
+ | --- | ----------- | -------- | ---------------- | ---------------------------- | ------------------------------------ |
136
+ | A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
137
+
138
+ (Add one row per finding; generate stable IDs prefixed by category initial.)
139
+
140
+ **Coverage Summary Table:**
141
+
142
+ | Requirement Key | Has Task? | Task IDs | Notes |
143
+ | --------------- | --------- | -------- | ----- |
144
+
145
+ **Constitution Alignment Issues:** (if any)
146
+
147
+ **Unmapped Tasks:** (if any)
148
+
149
+ **Metrics:**
150
+
151
+ - Total Requirements
152
+ - Total Tasks
153
+ - Coverage % (requirements with >=1 task)
154
+ - Ambiguity Count
155
+ - Duplication Count
156
+ - Critical Issues Count
157
+
158
+ ### 7. Provide Next Actions
159
+
160
+ At end of report, output a concise Next Actions block:
161
+
162
+ - If CRITICAL issues exist: Recommend resolving before speckit-implement
163
+ - If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
164
+ - Provide explicit next-step suggestions: e.g., "Run speckit-specify to refine requirements", "Run speckit-plan to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'"
165
+
166
+ ### 8. Offer Remediation
167
+
168
+ Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
169
+
170
+ ## Outputs
171
+
172
+ - Read-only analysis report in the response (no file writes)
173
+
174
+ ## Operating Principles
175
+
176
+ ### Context Efficiency
177
+
178
+ - **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
179
+ - **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
180
+ - **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
181
+ - **Deterministic results**: Rerunning without changes should produce consistent IDs and counts
182
+
183
+ ### Analysis Guidelines
184
+
185
+ - **NEVER modify files** (this is read-only analysis)
186
+ - **NEVER hallucinate missing sections** (if absent, report them accurately)
187
+ - **Prioritize constitution violations** (these are always CRITICAL)
188
+ - **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
189
+ - **Report zero issues gracefully** (emit success report with coverage statistics)
190
+
191
+ ## Context
192
+
193
+ the user's request and any stated focus areas
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: speckit-baseline
3
+ description: Generate feature specifications by analyzing existing source code.
4
+ ---
5
+
6
+ # Spec Kit Baseline Skill
7
+
8
+ ## When to Use
9
+
10
+ - You need a spec for existing or legacy code.
11
+ - You want to document a feature before refactoring.
12
+ - You inherited a codebase without written requirements.
13
+
14
+ ## Inputs
15
+
16
+ - A target path, file list, or glob pattern describing the code to analyze.
17
+ - Repo context with `.specify/` scripts and templates.
18
+
19
+ If the target is missing or ambiguous, ask a focused question before continuing.
20
+
21
+ ## Goal
22
+
23
+ Generate a technology-agnostic spec for existing code, then create the feature branch/spec file using the standard Spec Kit templates.
24
+
25
+ ## Workflow
26
+
27
+ 1. **Parse target input**: Identify files, directories, or patterns to analyze.
28
+ - Accept file paths, glob patterns, or directory paths.
29
+ - If empty: stop and ask for a concrete target.
30
+
31
+ 2. **Discover and read source files**:
32
+ - Expand globs to a file list.
33
+ - Read file contents for analysis.
34
+ - Identify primary language(s) and frameworks.
35
+ - Map key file relationships and dependencies.
36
+
37
+ 3. **Analyze code structure**:
38
+ - Identify entry points and public interfaces.
39
+ - Extract function/method signatures and behaviors.
40
+ - Find data models and entities.
41
+ - Detect API endpoints and routes.
42
+ - Identify user-facing functionality.
43
+
44
+ 4. **Generate a short name** (2-4 words) from the analyzed code:
45
+ - Use action-noun format (e.g., "user-auth", "payment-processing").
46
+ - Base on primary functionality discovered.
47
+ - Preserve technical terms where meaningful.
48
+
49
+ 5. **Create the feature branch and spec file**:
50
+ - Find the highest existing feature number for this short name (branches/specs).
51
+ - Run `.specify/scripts/bash/create-new-feature.sh --json` with the calculated number and short name.
52
+ - Read BRANCH_NAME, FEATURE_DIR, and SPEC_FILE paths from the script JSON output.
53
+ - 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").
54
+
55
+ 6. **Load the spec template** from `.specify/templates/spec-template.md`.
56
+
57
+ 7. **Draft the specification** using the template structure:
58
+ - **User Stories**: Infer from user-facing code paths and interactions.
59
+ - **Acceptance Scenarios**: Derive from validation logic, error handling, and tests.
60
+ - **Functional Requirements**: Extract from business rules and constraints.
61
+ - **Key Entities**: Identify from data models and schemas.
62
+ - **Success Criteria**: Infer from metrics, logging, or performance-related code.
63
+ - **Assumptions**: Document inferences made during analysis.
64
+
65
+ 8. **Abstract implementation details**:
66
+ - Convert technical patterns to user-focused requirements.
67
+ - Remove framework-specific terminology.
68
+ - Focus on WHAT the code does, not HOW it does it.
69
+
70
+ 9. **Create spec quality checklist** at `FEATURE_DIR/checklists/requirements.md`.
71
+
72
+ 10. **Report completion** with:
73
+ - Branch name and spec file path.
74
+ - Summary of analyzed files.
75
+ - Key features discovered.
76
+ - Areas needing clarification or review.
77
+
78
+ ## Outputs
79
+
80
+ - `specs/<feature>/spec.md`
81
+ - `specs/<feature>/checklists/requirements.md`
82
+
83
+ ## Key rules
84
+
85
+ - Focus on extracting WHAT and WHY from HOW.
86
+ - Abstract away implementation details in the generated spec.
87
+ - Document assumptions made during code analysis.
88
+ - Flag areas where code behavior is unclear.
89
+ - Preserve discovered business rules and constraints.
90
+ - Use `[NEEDS CLARIFICATION]` for ambiguous code sections (max 3).
91
+ - Generated specs should be validated by someone who knows the feature.
92
+
93
+ ## Examples
94
+
95
+ **Code Pattern → Spec Requirement**:
96
+
97
+ - `if (user.role === 'admin')` → "System MUST restrict action to administrator users"
98
+ - `password.length >= 8` → "Passwords MUST be at least 8 characters"
99
+ - `cache.set(key, value, 3600)` → "System MUST cache results for improved performance"
100
+ - `try { ... } catch (e) { notify(e) }` → "System MUST notify users when errors occur"
101
+
102
+ **Code Pattern → User Story**:
103
+
104
+ - Login endpoint with OAuth → "As a user, I can sign in using my social account"
105
+ - Shopping cart logic → "As a customer, I can add items to my cart for later purchase"
106
+ - Report generation → "As an analyst, I can generate reports on system activity"
107
+
108
+ ## Next Steps
109
+
110
+ After generating spec.md:
111
+
112
+ - **Clarify** with domain experts using speckit-clarify.
113
+ - **Plan** modernization/refactoring with speckit-plan.
114
+ - **Compare** the generated spec with actual requirements to identify gaps.
@@ -0,0 +1,304 @@
1
+ ---
2
+ name: speckit-checklist
3
+ description: Generate a custom checklist for the current feature based on user requirements.
4
+ ---
5
+
6
+ # Spec Kit Checklist Skill
7
+
8
+ ## When to Use
9
+
10
+ - You need a requirements-quality checklist tailored to a feature or domain.
11
+
12
+ ## Inputs
13
+
14
+ - The user's request describing the checklist focus and scope.
15
+ - Existing artifacts (spec/plan/tasks) for context when available.
16
+
17
+ If the request is empty or unclear, ask a targeted question before continuing.
18
+
19
+ ## Checklist Purpose: "Unit Tests for English"
20
+
21
+ **CRITICAL CONCEPT**: Checklists are **UNIT TESTS FOR REQUIREMENTS WRITING** - they validate the quality, clarity, and completeness of requirements in a given domain.
22
+
23
+ **NOT for verification/testing**:
24
+
25
+ - ❌ NOT "Verify the button clicks correctly"
26
+ - ❌ NOT "Test error handling works"
27
+ - ❌ NOT "Confirm the API returns 200"
28
+ - ❌ NOT checking if code/implementation matches the spec
29
+
30
+ **FOR requirements quality validation**:
31
+
32
+ - ✅ "Are visual hierarchy requirements defined for all card types?" (completeness)
33
+ - ✅ "Is 'prominent display' quantified with specific sizing/positioning?" (clarity)
34
+ - ✅ "Are hover state requirements consistent across all interactive elements?" (consistency)
35
+ - ✅ "Are accessibility requirements defined for keyboard navigation?" (coverage)
36
+ - ✅ "Does the spec define what happens when logo image fails to load?" (edge cases)
37
+
38
+ **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.
39
+
40
+ ## Workflow
41
+
42
+ 1. **Setup**: Run `.specify/scripts/bash/check-prerequisites.sh --json` from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS list.
43
+ - All file paths must be absolute.
44
+ - 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").
45
+
46
+ 2. **Clarify intent (dynamic)**: Derive up to THREE initial contextual clarifying questions (no pre-baked catalog). They MUST:
47
+ - Be generated from the user's phrasing + extracted signals from spec/plan/tasks
48
+ - Only ask about information that materially changes checklist content
49
+ - Be skipped individually if already unambiguous in the user's request
50
+ - Prefer precision over breadth
51
+
52
+ Generation algorithm:
53
+ 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").
54
+ 2. Cluster signals into candidate focus areas (max 4) ranked by relevance.
55
+ 3. Identify probable audience & timing (author, reviewer, QA, release) if not explicit.
56
+ 4. Detect missing dimensions: scope breadth, depth/rigor, risk emphasis, exclusion boundaries, measurable acceptance criteria.
57
+ 5. Formulate questions chosen from these archetypes:
58
+ - Scope refinement (e.g., "Should this include integration touchpoints with X and Y or stay limited to local module correctness?")
59
+ - Risk prioritization (e.g., "Which of these potential risk areas should receive mandatory gating checks?")
60
+ - Depth calibration (e.g., "Is this a lightweight pre-commit sanity list or a formal release gate?")
61
+ - Audience framing (e.g., "Will this be used by the author only or peers during PR review?")
62
+ - Boundary exclusion (e.g., "Should we explicitly exclude performance tuning items this round?")
63
+ - Scenario class gap (e.g., "No recovery flows detected—are rollback / partial failure paths in scope?")
64
+
65
+ Question formatting rules:
66
+ - If presenting options, generate a compact table with columns: Option | Candidate | Why It Matters
67
+ - Limit to A–E options maximum; omit table if a free-form answer is clearer
68
+ - Never ask the user to restate what they already said
69
+ - Avoid speculative categories (no hallucination). If uncertain, ask explicitly: "Confirm whether X belongs in scope."
70
+
71
+ Defaults when interaction impossible:
72
+ - Depth: Standard
73
+ - Audience: Reviewer (PR) if code-related; Author otherwise
74
+ - Focus: Top 2 relevance clusters
75
+
76
+ 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.
77
+
78
+ 3. **Understand user request**: Combine the user's request + clarifying answers:
79
+ - Derive checklist theme (e.g., security, review, deploy, ux)
80
+ - Consolidate explicit must-have items mentioned by user
81
+ - Map focus selections to category scaffolding
82
+ - Infer any missing context from spec/plan/tasks (do NOT hallucinate)
83
+
84
+ 4. **Load feature context**: Read from FEATURE_DIR:
85
+ - spec.md: Feature requirements and scope
86
+ - plan.md (if exists): Technical details, dependencies
87
+ - tasks.md (if exists): Implementation tasks
88
+
89
+ **Context Loading Strategy**:
90
+ - Load only necessary portions relevant to active focus areas (avoid full-file dumping)
91
+ - Prefer summarizing long sections into concise scenario/requirement bullets
92
+ - Use progressive disclosure: add follow-on retrieval only if gaps detected
93
+ - If source docs are large, generate interim summary items instead of embedding raw text
94
+
95
+ 5. **Generate checklist** - Create "Unit Tests for Requirements":
96
+ - Create `FEATURE_DIR/checklists/` directory if it doesn't exist
97
+ - Generate unique checklist filename:
98
+ - Use short, descriptive name based on domain (e.g., `ux.md`, `api.md`, `security.md`)
99
+ - Format: `[domain].md`
100
+ - If file exists, append to existing file
101
+ - Number items sequentially starting from CHK001
102
+ - Each checklist run creates a NEW file (never overwrites existing checklists)
103
+
104
+ **CORE PRINCIPLE - Test the Requirements, Not the Implementation**:
105
+ Every checklist item MUST evaluate the REQUIREMENTS THEMSELVES for:
106
+ - **Completeness**: Are all necessary requirements present?
107
+ - **Clarity**: Are requirements unambiguous and specific?
108
+ - **Consistency**: Do requirements align with each other?
109
+ - **Measurability**: Can requirements be objectively verified?
110
+ - **Coverage**: Are all scenarios/edge cases addressed?
111
+
112
+ **Category Structure** - Group items by requirement quality dimensions:
113
+ - **Requirement Completeness** (Are all necessary requirements documented?)
114
+ - **Requirement Clarity** (Are requirements specific and unambiguous?)
115
+ - **Requirement Consistency** (Do requirements align without conflicts?)
116
+ - **Acceptance Criteria Quality** (Are success criteria measurable?)
117
+ - **Scenario Coverage** (Are all flows/cases addressed?)
118
+ - **Edge Case Coverage** (Are boundary conditions defined?)
119
+ - **Non-Functional Requirements** (Performance, Security, Accessibility, etc. - are they specified?)
120
+ - **Dependencies & Assumptions** (Are they documented and validated?)
121
+ - **Ambiguities & Conflicts** (What needs clarification?)
122
+
123
+ **HOW TO WRITE CHECKLIST ITEMS - "Unit Tests for English"**:
124
+
125
+ ❌ **WRONG** (Testing implementation):
126
+ - "Verify landing page displays 3 episode cards"
127
+ - "Test hover states work on desktop"
128
+ - "Confirm logo click navigates home"
129
+
130
+ ✅ **CORRECT** (Testing requirements quality):
131
+ - "Are the exact number and layout of featured episodes specified?" [Completeness]
132
+ - "Is 'prominent display' quantified with specific sizing/positioning?" [Clarity]
133
+ - "Are hover state requirements consistent across all interactive elements?" [Consistency]
134
+ - "Are keyboard navigation requirements defined for all interactive UI?" [Coverage]
135
+ - "Is the fallback behavior specified when logo image fails to load?" [Edge Cases]
136
+ - "Are loading states defined for asynchronous episode data?" [Completeness]
137
+ - "Does the spec define visual hierarchy for competing UI elements?" [Clarity]
138
+
139
+ **ITEM STRUCTURE**:
140
+ Each item should follow this pattern:
141
+ - Question format asking about requirement quality
142
+ - Focus on what's WRITTEN (or not written) in the spec/plan
143
+ - Include quality dimension in brackets [Completeness/Clarity/Consistency/etc.]
144
+ - Reference spec section `[Spec §X.Y]` when checking existing requirements
145
+ - Use `[Gap]` marker when checking for missing requirements
146
+
147
+ **EXAMPLES BY QUALITY DIMENSION**:
148
+
149
+ Completeness:
150
+ - "Are error handling requirements defined for all API failure modes? [Gap]"
151
+ - "Are accessibility requirements specified for all interactive elements? [Completeness]"
152
+ - "Are mobile breakpoint requirements defined for responsive layouts? [Gap]"
153
+
154
+ Clarity:
155
+ - "Is 'fast loading' quantified with specific timing thresholds? [Clarity, Spec §NFR-2]"
156
+ - "Are 'related episodes' selection criteria explicitly defined? [Clarity, Spec §FR-5]"
157
+ - "Is 'prominent' defined with measurable visual properties? [Ambiguity, Spec §FR-4]"
158
+
159
+ Consistency:
160
+ - "Do navigation requirements align across all pages? [Consistency, Spec §FR-10]"
161
+ - "Are card component requirements consistent between landing and detail pages? [Consistency]"
162
+
163
+ Coverage:
164
+ - "Are requirements defined for zero-state scenarios (no episodes)? [Coverage, Edge Case]"
165
+ - "Are concurrent user interaction scenarios addressed? [Coverage, Gap]"
166
+ - "Are requirements specified for partial data loading failures? [Coverage, Exception Flow]"
167
+
168
+ Measurability:
169
+ - "Are visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]"
170
+ - "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]"
171
+
172
+ **Scenario Classification & Coverage** (Requirements Quality Focus):
173
+ - Check if requirements exist for: Primary, Alternate, Exception/Error, Recovery, Non-Functional scenarios
174
+ - For each scenario class, ask: "Are [scenario type] requirements complete, clear, and consistent?"
175
+ - If scenario class missing: "Are [scenario type] requirements intentionally excluded or missing? [Gap]"
176
+ - Include resilience/rollback when state mutation occurs: "Are rollback requirements defined for migration failures? [Gap]"
177
+
178
+ **Traceability Requirements**:
179
+ - MINIMUM: ≥80% of items MUST include at least one traceability reference
180
+ - Each item should reference: spec section `[Spec §X.Y]`, or use markers: `[Gap]`, `[Ambiguity]`, `[Conflict]`, `[Assumption]`
181
+ - If no ID system exists: "Is a requirement & acceptance criteria ID scheme established? [Traceability]"
182
+
183
+ **Surface & Resolve Issues** (Requirements Quality Problems):
184
+ Ask questions about the requirements themselves:
185
+ - Ambiguities: "Is the term 'fast' quantified with specific metrics? [Ambiguity, Spec §NFR-1]"
186
+ - Conflicts: "Do navigation requirements conflict between §FR-10 and §FR-10a? [Conflict]"
187
+ - Assumptions: "Is the assumption of 'always available podcast API' validated? [Assumption]"
188
+ - Dependencies: "Are external podcast API requirements documented? [Dependency, Gap]"
189
+ - Missing definitions: "Is 'visual hierarchy' defined with measurable criteria? [Gap]"
190
+
191
+ **Content Consolidation**:
192
+ - Soft cap: If raw candidate items > 40, prioritize by risk/impact
193
+ - Merge near-duplicates checking the same requirement aspect
194
+ - If >5 low-impact edge cases, create one item: "Are edge cases X, Y, Z addressed in requirements? [Coverage]"
195
+
196
+ **🚫 ABSOLUTELY PROHIBITED** - These make it an implementation test, not a requirements test:
197
+ - ❌ Any item starting with "Verify", "Test", "Confirm", "Check" + implementation behavior
198
+ - ❌ References to code execution, user actions, system behavior
199
+ - ❌ "Displays correctly", "works properly", "functions as expected"
200
+ - ❌ "Click", "navigate", "render", "load", "execute"
201
+ - ❌ Test cases, test plans, QA procedures
202
+ - ❌ Implementation details (frameworks, APIs, algorithms)
203
+
204
+ **✅ REQUIRED PATTERNS** - These test requirements quality:
205
+ - ✅ "Are [requirement type] defined/specified/documented for [scenario]?"
206
+ - ✅ "Is [vague term] quantified/clarified with specific criteria?"
207
+ - ✅ "Are requirements consistent between [section A] and [section B]?"
208
+ - ✅ "Can [requirement] be objectively measured/verified?"
209
+ - ✅ "Are [edge cases/scenarios] addressed in requirements?"
210
+ - ✅ "Does the spec define [missing aspect]?"
211
+
212
+ 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.
213
+
214
+ 7. **Report**: Output full path to created checklist, item count, and remind user that each run creates a new file. Summarize:
215
+ - Focus areas selected
216
+ - Depth level
217
+ - Actor/timing
218
+ - Any explicit user-specified must-have items incorporated
219
+
220
+ **Important**: Each checklist run creates a checklist file using short, descriptive names unless the file already exists. This allows:
221
+
222
+ - Multiple checklists of different types (e.g., `ux.md`, `test.md`, `security.md`)
223
+ - Simple, memorable filenames that indicate checklist purpose
224
+ - Easy identification and navigation in the `checklists/` folder
225
+
226
+ To avoid clutter, use descriptive types and clean up obsolete checklists when done.
227
+
228
+ ## Example Checklist Types & Sample Items
229
+
230
+ **UX Requirements Quality:** `ux.md`
231
+
232
+ Sample items (testing the requirements, NOT the implementation):
233
+
234
+ - "Are visual hierarchy requirements defined with measurable criteria? [Clarity, Spec §FR-1]"
235
+ - "Is the number and positioning of UI elements explicitly specified? [Completeness, Spec §FR-1]"
236
+ - "Are interaction state requirements (hover, focus, active) consistently defined? [Consistency]"
237
+ - "Are accessibility requirements specified for all interactive elements? [Coverage, Gap]"
238
+ - "Is fallback behavior defined when images fail to load? [Edge Case, Gap]"
239
+ - "Can 'prominent display' be objectively measured? [Measurability, Spec §FR-4]"
240
+
241
+ **API Requirements Quality:** `api.md`
242
+
243
+ Sample items:
244
+
245
+ - "Are error response formats specified for all failure scenarios? [Completeness]"
246
+ - "Are rate limiting requirements quantified with specific thresholds? [Clarity]"
247
+ - "Are authentication requirements consistent across all endpoints? [Consistency]"
248
+ - "Are retry/timeout requirements defined for external dependencies? [Coverage, Gap]"
249
+ - "Is versioning strategy documented in requirements? [Gap]"
250
+
251
+ **Performance Requirements Quality:** `performance.md`
252
+
253
+ Sample items:
254
+
255
+ - "Are performance requirements quantified with specific metrics? [Clarity]"
256
+ - "Are performance targets defined for all critical user journeys? [Coverage]"
257
+ - "Are performance requirements under different load conditions specified? [Completeness]"
258
+ - "Can performance requirements be objectively measured? [Measurability]"
259
+ - "Are degradation requirements defined for high-load scenarios? [Edge Case, Gap]"
260
+
261
+ **Security Requirements Quality:** `security.md`
262
+
263
+ Sample items:
264
+
265
+ - "Are authentication requirements specified for all protected resources? [Coverage]"
266
+ - "Are data protection requirements defined for sensitive information? [Completeness]"
267
+ - "Is the threat model documented and requirements aligned to it? [Traceability]"
268
+ - "Are security requirements consistent with compliance obligations? [Consistency]"
269
+ - "Are security failure/breach response requirements defined? [Gap, Exception Flow]"
270
+
271
+ ## Anti-Examples: What NOT To Do
272
+
273
+ **❌ WRONG - These test implementation, not requirements:**
274
+
275
+ ```markdown
276
+ - [ ] CHK001 - Verify landing page displays 3 episode cards [Spec §FR-001]
277
+ - [ ] CHK002 - Test hover states work correctly on desktop [Spec §FR-003]
278
+ - [ ] CHK003 - Confirm logo click navigates to home page [Spec §FR-010]
279
+ - [ ] CHK004 - Check that related episodes section shows 3-5 items [Spec §FR-005]
280
+ ```
281
+
282
+ **✅ CORRECT - These test requirements quality:**
283
+
284
+ ```markdown
285
+ - [ ] CHK001 - Are the number and layout of featured episodes explicitly specified? [Completeness, Spec §FR-001]
286
+ - [ ] CHK002 - Are hover state requirements consistently defined for all interactive elements? [Consistency, Spec §FR-003]
287
+ - [ ] CHK003 - Are navigation requirements clear for all clickable brand elements? [Clarity, Spec §FR-010]
288
+ - [ ] CHK004 - Is the selection criteria for related episodes documented? [Gap, Spec §FR-005]
289
+ - [ ] CHK005 - Are loading state requirements defined for asynchronous episode data? [Gap]
290
+ - [ ] CHK006 - Can "visual hierarchy" requirements be objectively measured? [Measurability, Spec §FR-001]
291
+ ```
292
+
293
+ **Key Differences:**
294
+
295
+ - Wrong: Tests if the system works correctly
296
+ - Correct: Tests if the requirements are written correctly
297
+ - Wrong: Verification of behavior
298
+ - Correct: Validation of requirement quality
299
+ - Wrong: "Does it do X?"
300
+ - Correct: "Is X clearly specified?"
301
+
302
+ ## Outputs
303
+
304
+ - `specs/<feature>/checklists/<domain>.md` (new checklist file per run)