speccrew 0.1.9 → 0.1.11

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.
@@ -12,6 +12,16 @@ tools: Read, Write, Glob, Grep
12
12
 
13
13
  # Workflow
14
14
 
15
+ ## Absolute Constraints
16
+
17
+ > **These rules apply to ALL document generation steps. Violation = task failure.**
18
+
19
+ 1. **FORBIDDEN: `create_file` for documents** — NEVER use `create_file` to write the test case design document. It MUST be created by copying the template then filling sections with `search_replace`.
20
+
21
+ 2. **FORBIDDEN: Full-file rewrite** — NEVER replace the entire document content in a single operation. Always use targeted `search_replace` on specific sections.
22
+
23
+ 3. **MANDATORY: Template-first workflow** — Copy template MUST execute before filling sections. Skipping copy and writing content directly is FORBIDDEN.
24
+
15
25
  ## Step 1: Read Feature Spec
16
26
 
17
27
  Read the feature spec document specified by `feature_spec_path`:
@@ -243,21 +253,31 @@ Read the template file:
243
253
  speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md
244
254
  ```
245
255
 
246
- ### 7.3 Fill Template
256
+ ### 7.3 Copy Template to Document Path
257
+
258
+ 1. **Read the template file**: `templates/TEST-CASE-DESIGN-TEMPLATE.md` (loaded in 7.2)
259
+ 2. **Replace top-level placeholders** (feature name, module, date, etc.)
260
+ 3. **Create the document** using `create_file` at the path from Step 7.1
261
+ 4. **Verify**: Document has complete section structure ready for filling
262
+
263
+ ### 7.4 Fill Each Section Using search_replace
247
264
 
248
- Fill in the template with:
265
+ Fill each section with test case data using `search_replace`.
249
266
 
250
- | Section | Content |
251
- |---------|---------|
252
- | Test Overview | Feature name, module, scope, related documents |
253
- | Test Case Matrix | All test cases organized by category |
254
- | Test Data Definition | Normal, boundary, and exception data sets |
255
- | Coverage Traceability | Requirement-to-test-case mapping |
256
- | Notes | Additional information and assumptions |
267
+ > ⚠️ **CRITICAL CONSTRAINTS:**
268
+ > - **FORBIDDEN: `create_file` to rewrite the entire document**
269
+ > - **MUST use `search_replace` to fill each section individually**
270
+ > - **All section titles MUST be preserved**
257
271
 
258
- ### 7.4 Write Document
272
+ **Section Filling Order:**
259
273
 
260
- Write the completed test case design document to the output path.
274
+ | Section | Content Source |
275
+ |---------|---------------|
276
+ | **Test Overview** | Feature name, module, scope, related documents |
277
+ | **Test Case Matrix** | All test cases organized by category from Step 5 |
278
+ | **Test Data Definition** | Normal, boundary, and exception data sets |
279
+ | **Coverage Traceability** | Requirement-to-test-case mapping from Step 6 |
280
+ | **Notes** | Additional information and assumptions |
261
281
 
262
282
  # Key Rules
263
283
 
@@ -12,6 +12,18 @@ tools: Read, Write, Glob, Grep
12
12
 
13
13
  # Workflow
14
14
 
15
+ ## Absolute Constraints
16
+
17
+ > **These rules apply to document generation steps (Step 7). Violation = task failure.**
18
+
19
+ 1. **FORBIDDEN: `create_file` for plan document** — NEVER use `create_file` to write the test code plan document. It MUST be created by copying the template then filling sections with `search_replace`.
20
+
21
+ 2. **FORBIDDEN: Full-file rewrite** — NEVER replace the entire document content in a single operation. Always use targeted `search_replace` on specific sections.
22
+
23
+ 3. **MANDATORY: Template-first workflow** — Copy template MUST execute before filling sections.
24
+
25
+ 4. **CLARIFICATION: Test source code is NOT template-filled** — Actual test code files in Step 6 are written directly. The template-fill workflow applies ONLY to the Code Plan document in Step 7.
26
+
15
27
  ## Step 1: Read Test Cases
16
28
 
17
29
  Read the confirmed test case document specified by `test_cases_path`:
@@ -273,7 +285,32 @@ Generate files in dependency order:
273
285
 
274
286
  Output the code plan document for traceability:
275
287
 
276
- **Path**: `speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/code/{platform_id}/[feature]-test-code-plan.md`
288
+ ### 7.1 Copy Template to Document Path
289
+
290
+ 1. **Read the template**: `templates/TEST-CODE-PLAN-TEMPLATE.md`
291
+ 2. **Replace top-level placeholders** (feature name, platform, date, etc.)
292
+ 3. **Create the document** using `create_file`:
293
+ - Target path: `speccrew-workspace/iterations/{number}-{type}-{name}/05.system-test/code/{platform_id}/[feature]-test-code-plan.md`
294
+ - Content: Template with top-level placeholders replaced
295
+ 4. **Verify**: Document has complete section structure
296
+
297
+ ### 7.2 Fill Each Section Using search_replace
298
+
299
+ Fill each section with code plan data from Step 4.
300
+
301
+ > ⚠️ **CRITICAL CONSTRAINTS:**
302
+ > - **FORBIDDEN: `create_file` to rewrite the entire document**
303
+ > - **MUST use `search_replace` to fill each section individually**
304
+ > - **All section titles MUST be preserved**
305
+
306
+ **Section Filling Guide:**
307
+
308
+ | Section | Content Source |
309
+ |---------|---------------|
310
+ | **File-to-TestCase Mapping** | From Step 4.4 |
311
+ | **Mock Strategy** | From Step 4.3 |
312
+ | **Shared Resources** | From Step 4.2 |
313
+ | **Test File Structure** | From Step 4.1 |
277
314
 
278
315
  ### Document Purpose
279
316
 
@@ -282,10 +319,6 @@ Output the code plan document for traceability:
282
319
  - Provides reference for future test maintenance
283
320
  - Enables traceability from test code to test cases
284
321
 
285
- ### Template Reference
286
-
287
- Use: `speccrew-test-code-gen/templates/TEST-CODE-PLAN-TEMPLATE.md`
288
-
289
322
  # Key Rules
290
323
 
291
324
  | Rule | Description |
@@ -12,6 +12,16 @@ tools: Read, Write, Glob, Grep, Terminal
12
12
 
13
13
  # Workflow
14
14
 
15
+ ## Absolute Constraints
16
+
17
+ > **These rules apply to ALL document generation steps. Violation = task failure.**
18
+
19
+ 1. **FORBIDDEN: `create_file` for documents** — NEVER use `create_file` to write test reports or bug reports. Documents MUST be created by copying the template then filling sections with `search_replace`.
20
+
21
+ 2. **FORBIDDEN: Full-file rewrite** — NEVER replace the entire document content in a single operation. Always use targeted `search_replace` on specific sections.
22
+
23
+ 3. **MANDATORY: Template-first workflow** — Copy template MUST execute before filling sections.
24
+
15
25
  ## Step 1: Read Inputs
16
26
 
17
27
  Read the following documents in order:
@@ -179,43 +189,33 @@ For each deviation, analyze:
179
189
 
180
190
  Read template: `speccrew-test-execute/templates/TEST-REPORT-TEMPLATE.md`
181
191
 
182
- ### 6.2 Fill Report Content
183
-
184
- Generate comprehensive test report including:
185
-
186
- **Execution Summary**:
187
- - Feature name and platform
188
- - Test framework and version
189
- - Execution date and duration
190
- - Overall pass rate
192
+ ### 6.2 Copy Template to Report Path
191
193
 
192
- **Results Overview**:
193
- - Counts and percentages for all result types
194
- - Visual pass/fail indication
194
+ 1. **Read template** from Step 6.1
195
+ 2. **Replace top-level placeholders** (feature name, platform, execution date, etc.)
196
+ 3. **Create the document** using `create_file` at: `{output_dir}/{feature}-test-report.md`
197
+ 4. **Verify**: Document has complete section structure
195
198
 
196
- **Results by Test Dimension**:
197
- - Breakdown by test type (happy path, boundary, exception, etc.)
198
- - Pass rate per dimension
199
+ ### 6.3 Fill Each Section Using search_replace
199
200
 
200
- **Failed Test Details**:
201
- - Table of all failed tests
202
- - Links to corresponding bug reports
201
+ Fill each section with test execution data.
203
202
 
204
- **Coverage Status**:
205
- - Requirement-to-test-case mapping
206
- - Status per requirement
203
+ > ⚠️ **CRITICAL CONSTRAINTS:**
204
+ > - **FORBIDDEN: `create_file` to rewrite the entire document**
205
+ > - **MUST use `search_replace` to fill each section individually**
206
+ > - **All section titles MUST be preserved**
207
207
 
208
- **Environment Information**:
209
- - OS, runtime, framework versions
210
- - Key dependencies
208
+ **Section Filling Guide:**
211
209
 
212
- **Recommendations**:
213
- - Priority fixes needed
214
- - Suggested next steps
215
-
216
- ### 6.3 Write Report
217
-
218
- Output path: `{output_dir}/{feature}-test-report.md`
210
+ | Section | Content |
211
+ |---------|---------|
212
+ | **Execution Summary** | Feature name and platform, test framework and version, execution date and duration, overall pass rate |
213
+ | **Results Overview** | Counts and percentages for all result types, visual pass/fail indication |
214
+ | **Results by Test Dimension** | Breakdown by test type (happy path, boundary, exception, etc.), pass rate per dimension |
215
+ | **Failed Test Details** | Table of all failed tests, links to corresponding bug reports |
216
+ | **Coverage Status** | Requirement-to-test-case mapping, status per requirement |
217
+ | **Environment Information** | OS, runtime, framework versions, key dependencies |
218
+ | **Recommendations** | Priority fixes needed, suggested next steps |
219
219
 
220
220
  ## Step 7: Generate Bug Reports
221
221
 
@@ -223,9 +223,22 @@ Output path: `{output_dir}/{feature}-test-report.md`
223
223
 
224
224
  Read template: `speccrew-test-execute/templates/BUG-REPORT-TEMPLATE.md`
225
225
 
226
- ### 7.2 Create Individual Bug Reports
226
+ ### 7.2 Copy Template for Each Bug Report
227
227
 
228
228
  For each FAIL type failure:
229
+ 1. **Read template** from Step 7.1: `templates/BUG-REPORT-TEMPLATE.md`
230
+ 2. **Replace top-level placeholders** (Bug ID, feature name, TC ID)
231
+ 3. **Create document** using `create_file` at: `{output_dir}/bugs/{feature}-bug-{seq}.md`
232
+
233
+ ### 7.3 Fill Each Bug Report Using search_replace
234
+
235
+ For each bug report created in 7.2, fill sections using `search_replace`:
236
+
237
+ > ⚠️ **CRITICAL CONSTRAINTS:**
238
+ > - **FORBIDDEN: `create_file` to rewrite the entire document**
239
+ > - **MUST use `search_replace` to fill each section individually**
240
+
241
+ **Section Filling Guide:**
229
242
 
230
243
  1. **Assign Bug ID**: `BUG-{feature}-{seq}` (sequential numbering)
231
244
 
@@ -246,10 +259,7 @@ For each FAIL type failure:
246
259
  - Relevant error log excerpt
247
260
  - Suggested fix direction
248
261
 
249
- 4. **Write Individual File**:
250
- Output path: `{output_dir}/bugs/{feature}-bug-{seq}.md`
251
-
252
- ### 7.3 Bug Report Quality Checklist
262
+ ### 7.4 Bug Report Quality Checklist
253
263
 
254
264
  Each bug report must include:
255
265
  - [ ] Unique Bug ID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {