specpulse 1.3.2__py3-none-any.whl → 1.3.3__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.
specpulse/__init__.py CHANGED
@@ -3,7 +3,7 @@ SpecPulse: Specification-Driven Development Framework
3
3
  Built for the AI era
4
4
  """
5
5
 
6
- __version__ = "1.3.2"
6
+ __version__ = "1.3.3"
7
7
  __author__ = "SpecPulse"
8
8
  __url__ = "https://github.com/specpulse"
9
9
 
specpulse/cli/main.py CHANGED
@@ -67,10 +67,11 @@ class SpecPulseCLI:
67
67
  ".gemini/commands",
68
68
  "memory",
69
69
  "specs",
70
- "plans",
70
+ "plans",
71
71
  "tasks",
72
72
  "scripts",
73
- "templates"
73
+ "templates",
74
+ "templates/decomposition"
74
75
  ]
75
76
 
76
77
  # Create directories with progress bar
@@ -198,7 +199,17 @@ class SpecPulseCLI:
198
199
  task_template = self.specpulse.get_task_template()
199
200
  with open(templates_dir / "task.md", 'w', encoding='utf-8') as f:
200
201
  f.write(task_template)
201
-
202
+
203
+ # Copy decomposition templates
204
+ decomp_dir = templates_dir / "decomposition"
205
+ decomp_dir.mkdir(parents=True, exist_ok=True)
206
+
207
+ resources_decomp_dir = self.specpulse.resources_dir / "templates" / "decomposition"
208
+ if resources_decomp_dir.exists():
209
+ for template_file in resources_decomp_dir.iterdir():
210
+ if template_file.is_file():
211
+ shutil.copy2(template_file, decomp_dir / template_file.name)
212
+
202
213
  self.console.success("Created templates")
203
214
 
204
215
  def _create_memory_files(self, project_path: Path):
@@ -27,6 +27,9 @@ fi
27
27
 
28
28
  FEATURE_DIR="$1"
29
29
 
30
+ # Extract feature ID from directory name (e.g., "001-feature-name" -> "001")
31
+ FEATURE_ID=$(echo "$FEATURE_DIR" | grep -o '^[0-9]\{3\}' || echo "001")
32
+
30
33
  # Sanitize feature directory
31
34
  SANITIZED_DIR=$(echo "$FEATURE_DIR" | sed 's/[^a-zA-Z0-9_-]//g')
32
35
 
@@ -34,20 +37,6 @@ if [ -z "$SANITIZED_DIR" ]; then
34
37
  error_exit "Invalid feature directory: '$FEATURE_DIR'"
35
38
  fi
36
39
 
37
- # Find feature directory if not provided
38
- if [ -z "$FEATURE_DIR" ]; then
39
- CONTEXT_FILE="$PROJECT_ROOT/memory/context.md"
40
- if [ -f "$CONTEXT_FILE" ]; then
41
- FEATURE_DIR=$(grep -A1 "Active Feature" "$CONTEXT_FILE" | tail -1 | cut -d: -f2 | xargs)
42
- if [ -z "$FEATURE_DIR" ]; then
43
- error_exit "No active feature found in context file"
44
- fi
45
- log "Using active feature from context: $FEATURE_DIR"
46
- else
47
- error_exit "No feature directory provided and no context file found"
48
- fi
49
- fi
50
-
51
40
  PLAN_DIR="$PROJECT_ROOT/plans/${FEATURE_DIR}"
52
41
  SPEC_DIR="$PROJECT_ROOT/specs/${FEATURE_DIR}"
53
42
  TEMPLATE_FILE="$PROJECT_ROOT/templates/plan.md"
@@ -28,6 +28,9 @@ fi
28
28
  FEATURE_DIR="$1"
29
29
  SPEC_CONTENT="${2:-}"
30
30
 
31
+ # Extract feature ID from directory name (e.g., "001-feature-name" -> "001")
32
+ FEATURE_ID=$(echo "$FEATURE_DIR" | grep -o '^[0-9]\{3\}' || echo "001")
33
+
31
34
  # Sanitize feature directory
32
35
  SANITIZED_DIR=$(echo "$FEATURE_DIR" | sed 's/[^a-zA-Z0-9_-]//g')
33
36
 
@@ -35,20 +38,6 @@ if [ -z "$SANITIZED_DIR" ]; then
35
38
  error_exit "Invalid feature directory: '$FEATURE_DIR'"
36
39
  fi
37
40
 
38
- # Find feature directory if not provided
39
- if [ -z "$FEATURE_DIR" ]; then
40
- CONTEXT_FILE="$PROJECT_ROOT/memory/context.md"
41
- if [ -f "$CONTEXT_FILE" ]; then
42
- FEATURE_DIR=$(grep -A1 "Active Feature" "$CONTEXT_FILE" | tail -1 | cut -d: -f2 | xargs)
43
- if [ -z "$FEATURE_DIR" ]; then
44
- error_exit "No active feature found in context file"
45
- fi
46
- log "Using active feature from context: $FEATURE_DIR"
47
- else
48
- error_exit "No feature directory provided and no context file found"
49
- fi
50
- fi
51
-
52
41
  SPEC_DIR="$PROJECT_ROOT/specs/${FEATURE_DIR}"
53
42
  TEMPLATE_FILE="$PROJECT_ROOT/templates/spec.md"
54
43
 
@@ -27,6 +27,9 @@ fi
27
27
 
28
28
  FEATURE_DIR="$1"
29
29
 
30
+ # Extract feature ID from directory name (e.g., "001-feature-name" -> "001")
31
+ FEATURE_ID=$(echo "$FEATURE_DIR" | grep -o '^[0-9]\{3\}' || echo "001")
32
+
30
33
  # Sanitize feature directory
31
34
  SANITIZED_DIR=$(echo "$FEATURE_DIR" | sed 's/[^a-zA-Z0-9_-]//g')
32
35
 
@@ -34,20 +37,6 @@ if [ -z "$SANITIZED_DIR" ]; then
34
37
  error_exit "Invalid feature directory: '$FEATURE_DIR'"
35
38
  fi
36
39
 
37
- # Find feature directory if not provided
38
- if [ -z "$FEATURE_DIR" ]; then
39
- CONTEXT_FILE="$PROJECT_ROOT/memory/context.md"
40
- if [ -f "$CONTEXT_FILE" ]; then
41
- FEATURE_DIR=$(grep -A1 "Active Feature" "$CONTEXT_FILE" | tail -1 | cut -d: -f2 | xargs)
42
- if [ -z "$FEATURE_DIR" ]; then
43
- error_exit "No active feature found in context file"
44
- fi
45
- log "Using active feature from context: $FEATURE_DIR"
46
- else
47
- error_exit "No feature directory provided and no context file found"
48
- fi
49
- fi
50
-
51
40
  TASK_DIR="$PROJECT_ROOT/tasks/${FEATURE_DIR}"
52
41
  PLAN_DIR="$PROJECT_ROOT/plans/${FEATURE_DIR}"
53
42
  SPEC_DIR="$PROJECT_ROOT/specs/${FEATURE_DIR}"
@@ -132,10 +121,9 @@ if [ "$PLAN_GATE_STATUS" != "COMPLETED" ]; then
132
121
  fi
133
122
 
134
123
  # Calculate completion percentage
135
- if [ "$TOTAL_TASKS" -gt 0 ]; then
136
- COMPLETION_PERCENTAGE=$((COMPLETED_TASKS * 100 / TOTAL_TASKS))
137
- else
138
- COMPLETION_PERCENTAGE=0
124
+ COMPLETION_PERCENTAGE=0
125
+ if [ "${TOTAL_TASKS:-0}" -gt 0 ] && [ "${COMPLETED_TASKS:-0}" -ge 0 ]; then
126
+ COMPLETION_PERCENTAGE=$(( (COMPLETED_TASKS * 100) / TOTAL_TASKS ))
139
127
  fi
140
128
 
141
129
  log "Task analysis completed - Total: $TOTAL_TASKS, Completed: $COMPLETED_TASKS ($COMPLETION_PERCENTAGE%), Parallel: $PARALLEL_TASKS"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: specpulse
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: Specification-Driven Development Framework
5
5
  Home-page: https://github.com/specpulse
6
6
  Author: SpecPulse
@@ -1,6 +1,6 @@
1
- specpulse/__init__.py,sha256=g_B-PLlQJTQfZFEW4aHlWd_Bvt3ZTqvzjNnFFDR2xOI,270
1
+ specpulse/__init__.py,sha256=kYgVcf5KKzNWm3EZCK0jY8hX5ygDK6-KJBe3GTPWraI,270
2
2
  specpulse/cli/__init__.py,sha256=DpX6FoRJtSNjudsmZ3mTih_RIaWyiIgxew4-f8mOmFY,70
3
- specpulse/cli/main.py,sha256=K1kQ5KotsU54kvXYen2fOWGmIM--feQa3bmnEzmRT3k,32831
3
+ specpulse/cli/main.py,sha256=2VST6mGdplReNgfFJriULTQQ9mOAgUF3OlIb9OnCEXg,33333
4
4
  specpulse/core/__init__.py,sha256=VKHGdPDM38QM9yDIq05jxol4q8WFlFAeltOzYLsPuto,132
5
5
  specpulse/core/specpulse.py,sha256=glEYB-AiXN6wTKgVc3Yu0BHjUMByNBzcjMds7CA-FBo,32717
6
6
  specpulse/core/validator.py,sha256=VsXU0qD8uUbZS3a8umqKpUx__sNlVRqTA7YTek9lezQ,18669
@@ -26,9 +26,9 @@ specpulse/resources/memory/decisions.md,sha256=ZwzVyOPB2mIzwveWpGmedej7ncI81GALg
26
26
  specpulse/resources/scripts/sp-pulse-decompose.sh,sha256=EN8iF02pij4yse3of3fgO8ZI6YKFUV7Z7f4epEmaKXI,1431
27
27
  specpulse/resources/scripts/sp-pulse-execute.sh,sha256=696vgsj0NpV-Mr0KMyoJ63NkTqmS1tmQ1X4BzK0kQGA,5493
28
28
  specpulse/resources/scripts/sp-pulse-init.sh,sha256=ECqLvgt6H-Wtp1hpKhkCKv_k70ZVfkmb13YyxT8Ni2M,3285
29
- specpulse/resources/scripts/sp-pulse-plan.sh,sha256=yJhAKa8Ay_76nvFOrGnAzqPhZWvCWuFCI04b5B1k2LI,4302
30
- specpulse/resources/scripts/sp-pulse-spec.sh,sha256=F8UFjx94h38WGCfMPhRV4vtJxMhU3VEllQmbP6Jk9Zk,4297
31
- specpulse/resources/scripts/sp-pulse-task.sh,sha256=SzimpHA4iIX0FrUZXavUl-b9AmXnTvXl6jreq0mCb4A,5144
29
+ specpulse/resources/scripts/sp-pulse-plan.sh,sha256=KHSpm3K1qyryBaiz693ytHZU61YDRLN85Ew063KFOYQ,3911
30
+ specpulse/resources/scripts/sp-pulse-spec.sh,sha256=1QBHkJKpopH2Vn8fIGYSMuuiqMrtu3F1WZCyk5liN-Y,3906
31
+ specpulse/resources/scripts/sp-pulse-task.sh,sha256=E-2ld9TX4ipybtCEDH6rmcpcK_VOw3qoymBiVB51BiM,4801
32
32
  specpulse/resources/templates/plan.md,sha256=KSCB5HvYRjqrM-VTe7nwJgR1MjGI748YE2BJtn41g4Q,6689
33
33
  specpulse/resources/templates/spec.md,sha256=yVWn2LhZn0IMLJ9XuBjPWSWNS4GYJFowRrqRMT2wJf4,3748
34
34
  specpulse/resources/templates/task.md,sha256=mGRlE4WD2E1Lh5gGr7kyOEmoXDbjLhUVMG9D7ZGCpmw,5357
@@ -40,9 +40,9 @@ specpulse/resources/templates/decomposition/service-plan.md,sha256=YCAu0-jRKNQ-G
40
40
  specpulse/utils/__init__.py,sha256=VTGRDsVLl2JIXYyHB9Sidxj5acY_W-LJI2MMtY1pwb0,122
41
41
  specpulse/utils/console.py,sha256=xn4Koc1_ph61bvBTlvPOwAbqZ5ac7TZ51xTWJbwG0sc,12973
42
42
  specpulse/utils/git_utils.py,sha256=RzJBZoyWp5on1_wq2lY1bs__UJsGKSDpAUeDKFdRYlQ,6095
43
- specpulse-1.3.2.dist-info/licenses/LICENSE,sha256=ImSFezK-Phy0oTBqZipcajsJfPZT8mmg8m3jkgNdNhA,1066
44
- specpulse-1.3.2.dist-info/METADATA,sha256=nNoy4_h7HMxM2IWzmPsELyiYS2Jl9KVGxGta85DKV5I,21109
45
- specpulse-1.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
- specpulse-1.3.2.dist-info/entry_points.txt,sha256=GwMaCKWSCFZlJMrTNavEYrnREynIS6dM3B0ILxnaouA,83
47
- specpulse-1.3.2.dist-info/top_level.txt,sha256=pEfkFil5xe38J00OHrBrJ07xpbm6bRnGhI8B07O9KeI,10
48
- specpulse-1.3.2.dist-info/RECORD,,
43
+ specpulse-1.3.3.dist-info/licenses/LICENSE,sha256=ImSFezK-Phy0oTBqZipcajsJfPZT8mmg8m3jkgNdNhA,1066
44
+ specpulse-1.3.3.dist-info/METADATA,sha256=KBo0aGm9qp4rz9yhIvSwiJrrT4KvcWkaiDlWaBmgwi0,21109
45
+ specpulse-1.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
+ specpulse-1.3.3.dist-info/entry_points.txt,sha256=GwMaCKWSCFZlJMrTNavEYrnREynIS6dM3B0ILxnaouA,83
47
+ specpulse-1.3.3.dist-info/top_level.txt,sha256=pEfkFil5xe38J00OHrBrJ07xpbm6bRnGhI8B07O9KeI,10
48
+ specpulse-1.3.3.dist-info/RECORD,,