specpulse 1.0.6__py3-none-any.whl → 1.1.0__py3-none-any.whl

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 (43) hide show
  1. specpulse/__init__.py +1 -1
  2. specpulse/cli/main.py +598 -617
  3. specpulse/core/specpulse.py +1110 -1105
  4. specpulse/resources/commands/claude/sp-continue.md +203 -0
  5. specpulse/resources/commands/claude/{plan.md → sp-plan.md} +53 -38
  6. specpulse/resources/commands/claude/sp-pulse.md +142 -0
  7. specpulse/resources/commands/claude/{spec.md → sp-spec.md} +36 -23
  8. specpulse/resources/commands/claude/sp-status.md +170 -0
  9. specpulse/resources/commands/claude/{task.md → sp-task.md} +68 -48
  10. specpulse/resources/commands/gemini/sp-continue.toml +56 -0
  11. specpulse/resources/commands/gemini/sp-plan.toml +68 -0
  12. specpulse/resources/commands/gemini/{pulse.toml → sp-pulse.toml} +12 -6
  13. specpulse/resources/commands/gemini/sp-spec.toml +54 -0
  14. specpulse/resources/commands/gemini/sp-status.toml +61 -0
  15. specpulse/resources/commands/gemini/sp-task.toml +79 -0
  16. specpulse/resources/memory/constitution.md +5 -5
  17. specpulse/resources/memory/context.md +12 -1
  18. specpulse/resources/scripts/{pulse-init.py → sp-pulse-init.py} +6 -6
  19. specpulse/resources/scripts/{pulse-init.sh → sp-pulse-init.sh} +95 -95
  20. specpulse/resources/scripts/{pulse-plan.py → sp-pulse-plan.py} +32 -7
  21. specpulse/resources/scripts/{pulse-plan.sh → sp-pulse-plan.sh} +136 -126
  22. specpulse/resources/scripts/{pulse-spec.py → sp-pulse-spec.py} +26 -6
  23. specpulse/resources/scripts/{pulse-spec.sh → sp-pulse-spec.sh} +126 -103
  24. specpulse/resources/scripts/{pulse-task.py → sp-pulse-task.py} +42 -6
  25. specpulse/resources/scripts/{pulse-task.sh → sp-pulse-task.sh} +32 -16
  26. specpulse/resources/templates/plan.md +206 -206
  27. specpulse/resources/templates/spec.md +125 -125
  28. specpulse/resources/templates/task.md +164 -163
  29. {specpulse-1.0.6.dist-info → specpulse-1.1.0.dist-info}/METADATA +35 -35
  30. specpulse-1.1.0.dist-info/RECORD +41 -0
  31. specpulse/resources/commands/claude/pulse.md +0 -91
  32. specpulse/resources/commands/gemini/plan.toml +0 -59
  33. specpulse/resources/commands/gemini/spec.toml +0 -45
  34. specpulse/resources/commands/gemini/task.toml +0 -69
  35. specpulse/resources/scripts/pulse-init.ps1 +0 -186
  36. specpulse/resources/scripts/pulse-plan.ps1 +0 -251
  37. specpulse/resources/scripts/pulse-spec.ps1 +0 -185
  38. specpulse/resources/scripts/pulse-task.ps1 +0 -263
  39. specpulse-1.0.6.dist-info/RECORD +0 -41
  40. {specpulse-1.0.6.dist-info → specpulse-1.1.0.dist-info}/WHEEL +0 -0
  41. {specpulse-1.0.6.dist-info → specpulse-1.1.0.dist-info}/entry_points.txt +0 -0
  42. {specpulse-1.0.6.dist-info → specpulse-1.1.0.dist-info}/licenses/LICENSE +0 -0
  43. {specpulse-1.0.6.dist-info → specpulse-1.1.0.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: specpulse
3
- Version: 1.0.6
3
+ Version: 1.1.0
4
4
  Summary: Specification-Driven Development Framework
5
5
  Home-page: https://github.com/specpulse
6
6
  Author: SpecPulse
@@ -66,11 +66,12 @@ Dynamic: requires-python
66
66
 
67
67
  SpecPulse revolutionizes AI-assisted development by enforcing a **specification-first approach**. Instead of jumping straight into code, SpecPulse ensures every feature starts with clear specifications, validated plans, and tracked tasks - guaranteeing quality from day one.
68
68
 
69
- > **Latest Update (v1.0.6)**:
70
- > - 🐛 **Critical Bug Fix**: Fixed cross-platform template initialization bug
71
- > - **Proper Resource Management**: All cross-platform scripts now correctly copied from @specpulse/resources
72
- > - **Complete Script Availability**: All 12 scripts (4 types × 3 platforms) properly installed
73
- > - **Enhanced Package Configuration**: Fixed package data inclusion for Python and PowerShell scripts
69
+ > **Latest Update (v1.1.0)**:
70
+ > - 🔧 **Command Prefix System**: All commands now use `sp-` prefix to avoid conflicts
71
+ > - 📋 **Multi-Spec Workflow**: Support for multiple specs/plans/tasks per feature
72
+ > - 🗂️ **Versioned File System**: Automatic spec-001.md, plan-001.md, task-001.md naming
73
+ > - 🎯 **Context Detection**: Automatic feature detection using git branches
74
+ > - 🤖 **Enhanced AI Integration**: Improved manual workflow control
74
75
  > - ✅ **Improved Error Handling**: Better resource path resolution and script copying operations
75
76
 
76
77
  ### Why SpecPulse?
@@ -126,21 +127,21 @@ specpulse init --ai gemini
126
127
 
127
128
  ```bash
128
129
  # Initialize a new feature
129
- /pulse user-authentication
130
+ /sp-pulse user-authentication
130
131
  # Creates structure for 001-user-authentication feature
131
132
 
132
133
  # Create the specification
133
- /spec create user login with OAuth2 and email/password
134
- # Or just: /spec (for interactive mode)
134
+ /sp-spec create user login with OAuth2 and email/password
135
+ # Or just: /sp-spec (for interactive mode)
135
136
 
136
137
  # Generate implementation plan
137
- /plan generate
138
- # Or: /plan validate (to check existing plan)
138
+ /sp-plan generate
139
+ # Or: /sp-plan validate (to check existing plan)
139
140
 
140
141
  # Break down into tasks
141
- /task breakdown
142
- # Or: /task update (to update task status)
143
- # Or: /task status (to see progress)
142
+ /sp-task breakdown
143
+ # Or: /sp-task update (to update task status)
144
+ # Or: /sp-task status (to see progress)
144
145
  ```
145
146
 
146
147
  ### Step 4: Validate & Ship
@@ -264,23 +265,22 @@ Claude and Gemini use slash commands that accept arguments via `$ARGUMENTS`:
264
265
  - **Unicode Support**: Full international character support (≤, ≥, →, ←)
265
266
 
266
267
  ```bash
267
- /pulse user-authentication # Start new feature with name
268
- /spec create OAuth2 login # Create specification with description
269
- /spec update # Update existing specification
270
- /spec validate # Validate specification completeness
271
- /plan generate # Generate plan from specification
272
- /plan validate # Validate plan against constitution
273
- /task breakdown # Create task list from plan
274
- /task update # Update task statuses
275
- /task status # Show current progress
268
+ /sp-pulse user-authentication # Start new feature with name
269
+ /sp-spec create OAuth2 login # Create specification with description
270
+ /sp-spec update # Update existing specification
271
+ /sp-spec validate # Validate specification completeness
272
+ /sp-plan generate # Generate plan from specification
273
+ /sp-plan validate # Validate plan against constitution
274
+ /sp-task breakdown # Create task list from plan
275
+ /sp-task update # Update task statuses
276
+ /sp-task status # Show current progress
276
277
  ```
277
278
 
278
279
  **Behind the Scenes:**
279
280
  - Commands capture arguments using `$ARGUMENTS` variable
280
281
  - **Multi-platform scripts** in `resources/scripts/` folder process the arguments:
281
- - `pulse-*.py` - Python scripts (universal)
282
- - `pulse-*.ps1` - PowerShell scripts (Windows)
283
- - `pulse-*.sh` - Bash scripts (Linux/macOS)
282
+ - `sp-pulse-*.py` - Python scripts (universal)
283
+ - `sp-pulse-*.sh` - Bash scripts (Linux/macOS)
284
284
  - AI reads templates from `resources/templates/` folder
285
285
  - Results are saved in `specs/`, `plans/`, `tasks/` folders
286
286
  - Memory system tracks progress in `memory/` folder
@@ -325,19 +325,19 @@ my-project/
325
325
  │ └── decisions.md # Architecture Decision Records
326
326
  ├── specs/ # Feature specifications
327
327
  │ └── 001-feature/
328
- │ └── spec.md
328
+ │ └── spec-001.md
329
329
  ├── plans/ # Implementation plans
330
330
  │ └── 001-feature/
331
- │ └── plan.md
331
+ │ └── plan-001.md
332
332
  ├── tasks/ # Task breakdowns
333
333
  │ └── 001-feature/
334
- │ └── tasks.md
334
+ │ └── task-001.md
335
335
  ├── templates/ # Customizable templates
336
336
  ├── scripts/ # Shell scripts for AI execution
337
- │ ├── pulse-init.sh # Feature initialization
338
- │ ├── pulse-spec.sh # Specification creation
339
- │ ├── pulse-plan.sh # Plan generation
340
- │ └── pulse-task.sh # Task breakdown
337
+ │ ├── sp-pulse-init.sh # Feature initialization
338
+ │ ├── sp-pulse-spec.sh # Specification creation
339
+ │ ├── sp-pulse-plan.sh # Plan generation
340
+ │ └── sp-pulse-task.sh # Task breakdown
341
341
  └── PULSE.md # Project manifest
342
342
  ```
343
343
 
@@ -349,7 +349,7 @@ Create project-specific templates:
349
349
 
350
350
  ```bash
351
351
  # Copy and modify templates
352
- cp templates/spec.md templates/custom-spec.md
352
+ cp templates/spec-001.md templates/custom-spec.md
353
353
  # Edit to match your needs
354
354
  ```
355
355
 
@@ -413,7 +413,7 @@ specpulse validate --component constitution
413
413
  **Solution**: Check template path in config.yaml
414
414
 
415
415
  ### AI Commands Not Working
416
- **Problem**: `/pulse` commands not recognized
416
+ **Problem**: `/sp-pulse` commands not recognized
417
417
  **Solution**: Ensure you ran `specpulse init --ai claude` or `--ai gemini`
418
418
 
419
419
  </details>
@@ -0,0 +1,41 @@
1
+ specpulse/__init__.py,sha256=S9i2N7RizTFgCe7PsAehlM3Ba_FtbAQPxCDSKcO_tbQ,270
2
+ specpulse/cli/__init__.py,sha256=DpX6FoRJtSNjudsmZ3mTih_RIaWyiIgxew4-f8mOmFY,70
3
+ specpulse/cli/main.py,sha256=U8BzBSrnVbkudKdd0ADfeQmmmjbT5OpR819I6gVp3OE,23478
4
+ specpulse/core/__init__.py,sha256=VKHGdPDM38QM9yDIq05jxol4q8WFlFAeltOzYLsPuto,132
5
+ specpulse/core/specpulse.py,sha256=dGOuDVaeTrUHa3u-tGs2yN3A-ao1TnI6Cu5uTUjFTWA,31753
6
+ specpulse/core/validator.py,sha256=dnaNUx7tj8V2K1TE6WPwrNWEiCpqC_b_DKryq6-A7Hk,12057
7
+ specpulse/resources/commands/claude/sp-continue.md,sha256=3_vikDSNRN0slNtKQGWl9dWEgkT-Q7nFpUxHKnzBCKs,5175
8
+ specpulse/resources/commands/claude/sp-plan.md,sha256=eOVioaBpsOhEoFcFRRaxqBULIWbGx85A1L-ZwQyiUiQ,7009
9
+ specpulse/resources/commands/claude/sp-pulse.md,sha256=IjoB2NeoTIjJEATcxG0mCfagRuzlRb7CwHawiotAIjk,5023
10
+ specpulse/resources/commands/claude/sp-spec.md,sha256=i3NmQbzbWlFSlu9jJpg6j3TyfW2TCAoMH9qVtJvIWW0,6242
11
+ specpulse/resources/commands/claude/sp-status.md,sha256=pUcFsYdmvAPTA1BdRjiN-AWi9I8IN4GiEErjfK4wNOU,4633
12
+ specpulse/resources/commands/claude/sp-task.md,sha256=El9iwPTlLPJdbJKYKYkDwBzRy_JvWoqu_AjPgLQ0WVs,9168
13
+ specpulse/resources/commands/gemini/sp-continue.toml,sha256=_iyo_g9IV0-FtIpiVknKNaegmhyc3DHb41lvfpf7anU,1784
14
+ specpulse/resources/commands/gemini/sp-plan.toml,sha256=ROG9G3V9VGahHmQqdxs2znQgnrYx_8Hg4Wu3Yzp0Fpo,2271
15
+ specpulse/resources/commands/gemini/sp-pulse.toml,sha256=YFpp1V_jCnP1mODU-9jpXyoGW61oSX-Y1YXewDCYYac,1307
16
+ specpulse/resources/commands/gemini/sp-spec.toml,sha256=0U5BIiCMGaXDvp4KoXEKu08VpL54iCiMMuoVoxRG1BE,2284
17
+ specpulse/resources/commands/gemini/sp-status.toml,sha256=PNZvCwwbzTYyA5Bm2M4SYw1ndz0vRqCkqT-_3pYJ_Qs,1979
18
+ specpulse/resources/commands/gemini/sp-task.toml,sha256=fuQkdK8wI279wy_qAOKGqxJQqIQc5C9xCDf7oNoCah8,2663
19
+ specpulse/resources/memory/constitution.md,sha256=34M0dMDzeE9JfAaNjK1S9uxVSD1I8KIaEtb8C3_7Ru8,8341
20
+ specpulse/resources/memory/context.md,sha256=rMQGXeJ9TaKmx2BVfQd8X6_ekwrKDdBsvWObCTiOTC0,812
21
+ specpulse/resources/memory/decisions.md,sha256=ZwzVyOPB2mIzwveWpGmedej7ncI81GALg8WVy6AeZA4,686
22
+ specpulse/resources/scripts/sp-pulse-init.py,sha256=-_L9TOr1zKCSJOS8dBUbeKOkWBlR5I6kB5ZUuEF3GBQ,6688
23
+ specpulse/resources/scripts/sp-pulse-init.sh,sha256=Be3ogbKQCy2WMONC22Ht-15gxgQS0sB7U74EoSrDnMU,3164
24
+ specpulse/resources/scripts/sp-pulse-plan.py,sha256=PYyvVPP0Wo-6VAAnRAeesfv6gV2qegs6nEWwLeqBTj4,8614
25
+ specpulse/resources/scripts/sp-pulse-plan.sh,sha256=0G6WMDV2ChO4kkulgEL49qZFg7adwf3-lqeH3Rvs7T4,4199
26
+ specpulse/resources/scripts/sp-pulse-spec.py,sha256=IzThoWPcfgApJ_FeTGoA54_LEoWahQkgLeEHpHx0bKs,7485
27
+ specpulse/resources/scripts/sp-pulse-spec.sh,sha256=TVA1ktylZZy_9yj-4inncP1_FoVp8vteP5kaWelLeks,4194
28
+ specpulse/resources/scripts/sp-pulse-task.py,sha256=hVi7E81azLWqRuzEYtzz_uIJKahfh-mGu8zxOvwjsVY,10826
29
+ specpulse/resources/scripts/sp-pulse-task.sh,sha256=RmV6fIVIssK9QR4jAKzHhghrl4voG7PpXXC0yPi6_Rk,5039
30
+ specpulse/resources/templates/plan.md,sha256=KSCB5HvYRjqrM-VTe7nwJgR1MjGI748YE2BJtn41g4Q,6689
31
+ specpulse/resources/templates/spec.md,sha256=yVWn2LhZn0IMLJ9XuBjPWSWNS4GYJFowRrqRMT2wJf4,3748
32
+ specpulse/resources/templates/task.md,sha256=mGRlE4WD2E1Lh5gGr7kyOEmoXDbjLhUVMG9D7ZGCpmw,5357
33
+ specpulse/utils/__init__.py,sha256=VTGRDsVLl2JIXYyHB9Sidxj5acY_W-LJI2MMtY1pwb0,122
34
+ specpulse/utils/console.py,sha256=xn4Koc1_ph61bvBTlvPOwAbqZ5ac7TZ51xTWJbwG0sc,12973
35
+ specpulse/utils/git_utils.py,sha256=RzJBZoyWp5on1_wq2lY1bs__UJsGKSDpAUeDKFdRYlQ,6095
36
+ specpulse-1.1.0.dist-info/licenses/LICENSE,sha256=ImSFezK-Phy0oTBqZipcajsJfPZT8mmg8m3jkgNdNhA,1066
37
+ specpulse-1.1.0.dist-info/METADATA,sha256=57zA7ltiXaOvCGhydaZRtaLVbIX6MocMHbx9g0ZFlRI,16610
38
+ specpulse-1.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
39
+ specpulse-1.1.0.dist-info/entry_points.txt,sha256=GwMaCKWSCFZlJMrTNavEYrnREynIS6dM3B0ILxnaouA,83
40
+ specpulse-1.1.0.dist-info/top_level.txt,sha256=pEfkFil5xe38J00OHrBrJ07xpbm6bRnGhI8B07O9KeI,10
41
+ specpulse-1.1.0.dist-info/RECORD,,
@@ -1,91 +0,0 @@
1
- ---
2
- name: pulse
3
- description: Initialize a new feature with SpecPulse framework
4
- allowed_tools:
5
- - Bash
6
- - Read
7
- - Write
8
- - Edit
9
- - TodoWrite
10
- ---
11
-
12
- # /pulse Command
13
-
14
- Initialize a new feature following SpecPulse methodology with constitutional compliance.
15
-
16
- ## Usage
17
- ```
18
- /pulse <feature-name> [feature-id]
19
- ```
20
-
21
- ## Implementation
22
-
23
- When called with `/pulse $ARGUMENTS`, I will:
24
-
25
- 1. **Validate arguments** and extract feature name + optional ID
26
- 2. **Run initialization script** with cross-platform detection:
27
- - **Windows**: `powershell scripts/pulse-init.ps1 "$FEATURE_NAME" "$OPTIONAL_ID"`
28
- - **Linux/macOS**: `bash scripts/pulse-init.sh "$FEATURE_NAME" "$OPTIONAL_ID"`
29
- - **Python Fallback**: `python scripts/pulse-init.py "$FEATURE_NAME" "$OPTIONAL_ID"`
30
- 3. **Create complete feature structure**:
31
- - Generate feature ID (001, 002, etc.) or use provided ID
32
- - Create sanitized branch name: `ID-feature-name`
33
- - Create directories: `specs/ID-feature-name/`, `plans/ID-feature-name/`, `tasks/ID-feature-name/`
34
- - Copy AI-optimized templates to feature directories
35
- - Update `memory/context.md` with current feature metadata
36
- - Create and switch to git branch if in git repository
37
-
38
- 4. **Validate structure** and report comprehensive status
39
- 5. **Create todo list** for tracking feature development progress
40
-
41
- ## Constitutional Compliance
42
-
43
- **Article I: Simplicity**
44
- - [ ] Feature name is clear and specific
45
- - [ ] No unnecessary abstractions in initial structure
46
- - [ ] Single responsibility per feature
47
-
48
- **Article II: Anti-Abstraction**
49
- - [ ] Direct template usage (no wrapper layers)
50
- - [ ] Minimal initial structure
51
- - [ ] Framework-ready files
52
-
53
- ## Example
54
- ```
55
- User: /pulse user-authentication-oauth2
56
- ```
57
-
58
- I will:
59
- - Run: `bash scripts/pulse-init.sh "user-authentication-oauth2"`
60
- - Create: `specs/001-user-authentication-oauth2/spec.md`
61
- - Create: `plans/001-user-authentication-oauth2/plan.md`
62
- - Create: `tasks/001-user-authentication-oauth2/tasks.md`
63
- - Branch: `001-user-authentication-oauth2`
64
- - Status: `STATUS=initialized, BRANCH_NAME=001-user-authentication-oauth2`
65
-
66
- ## Error Handling
67
-
68
- Enhanced validation includes:
69
- - Feature name sanitization (alphanumeric, hyphens only)
70
- - Directory creation validation
71
- - Template existence verification
72
- - Git repository validation
73
- - Context file management
74
-
75
- ## Next Steps (Constitutional Order)
76
-
77
- 1. **Phase -1**: Use `/spec` to create specification with constitutional gates
78
- 2. **Phase 0**: Use `/plan` to generate implementation plan with complexity tracking
79
- 3. **Phase 1**: Use `/task` to break down into executable tasks
80
- 4. **Implementation**: Begin development following constitutional principles
81
-
82
- ## Integration Features
83
-
84
- - **Automatic context tracking** in `memory/context.md`
85
- - **Enhanced error reporting** with specific failure reasons
86
- - **Git integration** with branch management
87
- - **Template validation** before copying
88
- - **Todo list creation** for progress tracking
89
- - **Cross-platform script execution** with automatic detection
90
- - **Multiple language support**: Bash, PowerShell, Python
91
- - **Platform-agnostic operation** for any development environment
@@ -1,59 +0,0 @@
1
- description = "Generate or validate implementation plans"
2
- prompt = """
3
- Handle the /plan command with arguments: {{args}}
4
-
5
- Parse arguments to determine action:
6
- - If "validate": Check plan against constitution
7
- - Otherwise: Generate new plan
8
-
9
- ## For /plan generate or /plan:
10
- 1. Read current specification from @{specs/*/spec.md}
11
-
12
- 2. Run Phase Gates checks:
13
- - Constitutional compliance
14
- - Simplicity check (≤3 modules)
15
- - Test-first strategy defined
16
- - Framework selection complete
17
- - Research completed
18
-
19
- 3. Generate plan sections:
20
- - Technology stack
21
- - Architecture overview
22
- - Implementation phases
23
- - API contracts
24
- - Data models
25
- - Testing strategy
26
-
27
- 4. Track complexity:
28
- - If >3 modules, document justification
29
- - Create simplification roadmap
30
-
31
- 5. Write plan to plans/XXX-feature/plan.md
32
- 6. Run cross-platform validation:
33
- - Windows: !{powershell scripts/pulse-plan.ps1 "XXX-feature"}
34
- - Linux/macOS: !{bash scripts/pulse-plan.sh "XXX-feature"}
35
- - Fallback: !{python scripts/pulse-plan.py "XXX-feature"}
36
-
37
- ## For /plan validate:
38
- 1. Read existing plan from @{plans/*/plan.md}
39
- 2. Run cross-platform validation:
40
- - Windows: !{powershell scripts/pulse-plan.ps1 "XXX-feature"}
41
- - Linux/macOS: !{bash scripts/pulse-plan.sh "XXX-feature"}
42
- - Fallback: !{python scripts/pulse-plan.py "XXX-feature"}
43
- 3. Verify Phase Gates compliance
44
- 4. Check complexity tracking
45
- 5. Ensure test-first approach
46
- 6. Validate framework choices
47
- 7. Report validation results
48
-
49
- Phase Gates (Phase -1) must pass before implementation:
50
- - ✅ Using ≤3 projects/modules
51
- - ✅ Tests defined before code
52
- - ✅ Using framework features directly
53
- - ✅ No premature abstractions
54
- - ✅ Research completed
55
-
56
- Examples:
57
- - /plan generate
58
- - /plan validate
59
- """
@@ -1,45 +0,0 @@
1
- description = "Create or manage feature specifications"
2
- prompt = """
3
- Handle the /spec command with arguments: {{args}}
4
-
5
- Parse the arguments to determine the action:
6
- - If starts with "create": Generate new specification
7
- - If starts with "update": Modify existing specification
8
- - If starts with "validate": Check specification completeness
9
- - If no action specified: Default to "create" with full arguments as description
10
-
11
- ## For /spec create [description] or /spec [description]:
12
- 1. Read template from @{templates/spec.md}
13
- 2. Parse the description to identify:
14
- - Functional requirements (Must/Should/Could have)
15
- - User stories and acceptance criteria
16
- - Technical requirements
17
- 3. Mark any uncertainties with [NEEDS CLARIFICATION: detail]
18
- 4. Find current feature directory (latest in specs/)
19
- 5. Write specification to specs/XXX-feature/spec.md
20
- 6. Run cross-platform validation:
21
- - Windows: !{powershell scripts/pulse-spec.ps1 "XXX-feature"}
22
- - Linux/macOS: !{bash scripts/pulse-spec.sh "XXX-feature"}
23
- - Fallback: !{python scripts/pulse-spec.py "XXX-feature"}
24
-
25
- ## For /spec update:
26
- 1. Read existing specification from @{specs/*/spec.md}
27
- 2. Ask user for clarifications or changes
28
- 3. Update content while preserving structure
29
- 4. Remove resolved [NEEDS CLARIFICATION] markers
30
-
31
- ## For /spec validate:
32
- 1. Run cross-platform validation:
33
- - Windows: !{powershell scripts/pulse-spec.ps1 "XXX-feature"}
34
- - Linux/macOS: !{bash scripts/pulse-spec.sh "XXX-feature"}
35
- - Fallback: !{python scripts/pulse-spec.py "XXX-feature"}
36
- 2. Check all required sections are filled
37
- 3. Count [NEEDS CLARIFICATION] markers
38
- 4. Verify acceptance criteria are testable
39
- 5. Report validation results
40
-
41
- Examples:
42
- - /spec user authentication with OAuth2 and email/password
43
- - /spec update
44
- - /spec validate
45
- """
@@ -1,69 +0,0 @@
1
- description = "Generate and manage task breakdowns"
2
- prompt = """
3
- Handle the /task command with arguments: {{args}}
4
-
5
- Parse arguments to determine action:
6
- - If "update": Update task status
7
- - If "status": Show progress
8
- - Otherwise: Generate task breakdown
9
-
10
- ## For /task breakdown or /task:
11
- 1. Read implementation plan from @{plans/*/plan.md}
12
-
13
- 2. Generate tasks from plan:
14
- - Create task categories:
15
- • Critical Path (Phase 0)
16
- • Phase 1: Foundation
17
- • Phase 2: Core Features
18
- • Phase 3: Polish
19
- • Phase 4: Testing
20
-
21
- - For each task:
22
- • Use T[XXX] format (T001, T002)
23
- • Include clear description
24
- • Mark dependencies
25
- • Estimate complexity (S/M/L/XL)
26
- • Assign priority
27
-
28
- 3. Write tasks to tasks/XXX-feature/tasks.md
29
- 4. Run cross-platform validation:
30
- - Windows: !{powershell scripts/pulse-task.ps1 "XXX-feature"}
31
- - Linux/macOS: !{bash scripts/pulse-task.sh "XXX-feature"}
32
- - Fallback: !{python scripts/pulse-task.py "XXX-feature"}
33
-
34
- ## For /task update:
35
- 1. Read current tasks from @{tasks/*/tasks.md}
36
- 2. Ask which tasks to update
37
- 3. Mark tasks as completed/in-progress
38
- 4. Add newly discovered tasks
39
- 5. Update dependencies and blockers
40
- 6. Save updated task list
41
- 7. Run cross-platform validation:
42
- - Windows: !{powershell scripts/pulse-task.ps1 "XXX-feature"}
43
- - Linux/macOS: !{bash scripts/pulse-task.sh "XXX-feature"}
44
- - Fallback: !{python scripts/pulse-task.py "XXX-feature"}
45
-
46
- ## For /task status:
47
- 1. Read current tasks
48
- 2. Run cross-platform analysis:
49
- - Windows: !{powershell scripts/pulse-task.ps1 "XXX-feature"}
50
- - Linux/macOS: !{bash scripts/pulse-task.sh "XXX-feature"}
51
- - Fallback: !{python scripts/pulse-task.py "XXX-feature"}
52
- 3. Count completed vs total
53
- 4. Show current phase progress
54
- 5. List any blockers
55
- 6. Estimate remaining work
56
- 7. Display progress summary
57
-
58
- Task Format:
59
- ```markdown
60
- - [ ] T001: [S] Set up project structure
61
- - [ ] T002: [M] Create database schema
62
- - [x] T003: [L] Implement authentication
63
- ```
64
-
65
- Examples:
66
- - /task breakdown
67
- - /task update
68
- - /task status
69
- """
@@ -1,186 +0,0 @@
1
- # SpecPulse Feature Initialization Script
2
- # Cross-platform PowerShell equivalent of pulse-init.sh
3
-
4
- param(
5
- [Parameter(Mandatory=$true)]
6
- [string]$FeatureName,
7
-
8
- [string]$CustomId = ""
9
- )
10
-
11
- $ErrorActionPreference = "Stop"
12
- $ProgressPreference = "SilentlyContinue"
13
-
14
- # Configuration
15
- $ScriptName = $MyInvocation.MyCommand.Name
16
- $ProjectRoot = $PSScriptRoot | Split-Path -Parent | Split-Path -Parent
17
- $MemoryDir = Join-Path $ProjectRoot "memory"
18
- $ContextFile = Join-Path $MemoryDir "context.md"
19
- $TemplatesDir = Join-Path $ProjectRoot "resources" "templates"
20
-
21
- function Write-Log {
22
- param([string]$Message)
23
- $Timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
24
- Write-Host "[$Timestamp] $ScriptName : $Message" -ForegroundColor Yellow
25
- }
26
-
27
- function Exit-WithError {
28
- param([string]$Message)
29
- Write-Log "ERROR: $Message"
30
- exit 1
31
- }
32
-
33
- function Sanitize-FeatureName {
34
- param([string]$Name)
35
-
36
- if ([string]::IsNullOrWhiteSpace($Name)) {
37
- Exit-WithError "Feature name cannot be empty"
38
- }
39
-
40
- # Convert to lowercase, replace spaces and special chars with hyphens
41
- $Sanitized = $Name.ToLower() -replace '[^a-z0-9-]', '-'
42
- $Sanitized = $Sanitized -replace '-+', '-' # Remove consecutive hyphens
43
- $Sanitized = $Sanitized.Trim('-') # Remove leading/trailing hyphens
44
-
45
- if ([string]::IsNullOrWhiteSpace($Sanitized)) {
46
- Exit-WithError "Invalid feature name: '$Name'"
47
- }
48
-
49
- return $Sanitized
50
- }
51
-
52
- function Get-FeatureId {
53
- param([string]$CustomId)
54
-
55
- if ($CustomId) {
56
- return "{0:D3}" -f [int]$CustomId
57
- }
58
-
59
- # Find existing feature directories
60
- $SpecsDir = Join-Path $ProjectRoot "specs"
61
- if (Test-Path $SpecsDir) {
62
- $Existing = Get-ChildItem -Path $SpecsDir -Directory |
63
- Where-Object { $_.Name -match '^\d+$' } |
64
- Sort-Object Name
65
- $NextId = $Existing.Count + 1
66
- } else {
67
- $NextId = 1
68
- }
69
-
70
- return "{0:D3}" -f $NextId
71
- }
72
-
73
- function Create-Directories {
74
- param([string]$BranchName)
75
-
76
- $Directories = @(
77
- (Join-Path $ProjectRoot "specs" $BranchName),
78
- (Join-Path $ProjectRoot "plans" $BranchName),
79
- (Join-Path $ProjectRoot "tasks" $BranchName)
80
- )
81
-
82
- foreach ($Directory in $Directories) {
83
- try {
84
- New-Item -ItemType Directory -Path $Directory -Force | Out-Null
85
- Write-Log "Created directory: $Directory"
86
- } catch {
87
- Exit-WithError "Failed to create directory $Directory : $_"
88
- }
89
- }
90
- }
91
-
92
- function Copy-Templates {
93
- param([string]$BranchName)
94
-
95
- $Templates = @{
96
- "spec.md" = (Join-Path $ProjectRoot "specs" $BranchName "spec.md")
97
- "plan.md" = (Join-Path $ProjectRoot "plans" $BranchName "plan.md")
98
- "task.md" = (Join-Path $ProjectRoot "tasks" $BranchName "tasks.md")
99
- }
100
-
101
- foreach ($Template in $Templates.GetEnumerator()) {
102
- $TemplatePath = Join-Path $TemplatesDir $Template.Key
103
- $TargetPath = $Template.Value
104
-
105
- if (-not (Test-Path $TemplatePath)) {
106
- Exit-WithError "Template not found: $TemplatePath"
107
- }
108
-
109
- try {
110
- Copy-Item $TemplatePath $TargetPath -Force
111
- Write-Log "Copied template to: $TargetPath"
112
- } catch {
113
- Exit-WithError "Failed to copy template $TemplatePath : $_"
114
- }
115
- }
116
- }
117
-
118
- function Update-Context {
119
- param(
120
- [string]$FeatureName,
121
- [string]$FeatureId,
122
- [string]$BranchName
123
- )
124
-
125
- try {
126
- New-Item -ItemType Directory -Path $MemoryDir -Force | Out-Null
127
-
128
- $ContextEntry = @"
129
-
130
- ## Active Feature: $FeatureName
131
- - Feature ID: $FeatureId
132
- - Branch: $BranchName
133
- - Started: $(Get-Date -Format "o")
134
- "@
135
-
136
- Add-Content -Path $ContextFile -Value $ContextEntry -Encoding UTF8
137
- Write-Log "Updated context file: $ContextFile"
138
- } catch {
139
- Exit-WithError "Failed to update context file: $_"
140
- }
141
- }
142
-
143
- function New-GitBranch {
144
- param([string]$BranchName)
145
-
146
- $GitDir = Join-Path $ProjectRoot ".git"
147
- if (-not (Test-Path $GitDir)) {
148
- return
149
- }
150
-
151
- try {
152
- # Check if branch already exists
153
- $ExistingBranch = git branch --list $BranchName
154
- if ($ExistingBranch) {
155
- Write-Log "Git branch '$BranchName' already exists, checking out"
156
- git checkout $BranchName
157
- } else {
158
- Write-Log "Creating new git branch '$BranchName'"
159
- git checkout -b $BranchName
160
- }
161
- } catch {
162
- Exit-WithError "Git operation failed: $_"
163
- }
164
- }
165
-
166
- # Main execution
167
- Write-Log "Initializing feature: $FeatureName"
168
-
169
- # Sanitize and generate identifiers
170
- $SanitizedName = Sanitize-FeatureName -Name $FeatureName
171
- $FeatureId = Get-FeatureId -CustomId $CustomId
172
- $BranchName = "$FeatureId-$SanitizedName"
173
-
174
- # Create structure
175
- Create-Directories -BranchName $BranchName
176
- Copy-Templates -BranchName $BranchName
177
- Update-Context -FeatureName $FeatureName -FeatureId $FeatureId -BranchName $BranchName
178
- New-GitBranch -BranchName $BranchName
179
-
180
- # Output results
181
- Write-Host "BRANCH_NAME=$BranchName"
182
- Write-Host "SPEC_DIR=specs/$BranchName"
183
- Write-Host "FEATURE_ID=$FeatureId"
184
- Write-Host "STATUS=initialized"
185
-
186
- Write-Log "Successfully initialized feature '$FeatureName' with ID $FeatureId"