speccrew 0.3.6 → 0.3.7

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.
@@ -4,6 +4,18 @@ description: Feature Design SOP. Guide Feature Designer Agent to transform PRD r
4
4
  tools: Read, Write, Glob, Grep
5
5
  ---
6
6
 
7
+ # Methodology Foundation
8
+
9
+ This skill applies the ISA-95 six-stage methodology (Stages 4-6) as an internal thinking framework:
10
+
11
+ | ISA-95 Stage | Integrated Into | Purpose |
12
+ |---|---|---|
13
+ | Stage 4: Information Flows | Feature Spec Section 3 (Interaction Flow) | Map cross-module data flows, identify API endpoints |
14
+ | Stage 5: Categories of Information | Feature Spec Section 4 (Data Field Definition) | Classify data entities, build data dictionary |
15
+ | Stage 6: Information Descriptions | Feature Spec Section 5 (Business Rules) + API Contract | Define validation rules, output standards, traceability |
16
+
17
+ > ⚠️ **No separate modeling documents.** The methodology guides thinking quality, not document quantity.
18
+
7
19
  # Trigger Scenarios
8
20
 
9
21
  - PRD has been confirmed, user requests to start feature design
@@ -336,6 +348,14 @@ Document user actions and system responses:
336
348
  User Action → Frontend Response → Backend API Call
337
349
  ```
338
350
 
351
+ > **ISA-95 Stage 4 Thinking — Information Flows of Interest**
352
+ > When designing interaction flows:
353
+ > - **Cross-module Information Flow**: Map all data flows between this feature and other modules/systems. Identify data source, destination, format, and frequency.
354
+ > - **Sequence Diagram Coverage**: The sequence diagram must cover the complete interaction chain — user action → frontend → backend → database → external systems.
355
+ > - **Interface Identification**: Every data exchange point becomes a potential API endpoint. List all interface interactions with direction, format, and core fields.
356
+ > - **Exception Flows**: Identify and document alternative/exception paths, not just the happy path.
357
+ > These elements flow into Feature Spec Section 3 (Interaction Flow) — no separate DFD document needed.
358
+
339
359
  **Example:**
340
360
  ```
341
361
  1. User clicks "New User" button
@@ -424,6 +444,14 @@ For each new entity:
424
444
  |-------|------|-------------|-------------|
425
445
  | {field name} | {data type} | {required/unique/etc} | {purpose} |
426
446
 
447
+ > **ISA-95 Stage 5 Thinking — Categories of Information**
448
+ > When defining data fields:
449
+ > - **Information Classification**: Categorize data entities (master data, transactional data, reference data, computed data). This determines storage strategy and update frequency.
450
+ > - **Data Dictionary Rigor**: Every field must have: name, type, constraints, semantic description, and data source.
451
+ > - **Semantic Consistency**: Field names and definitions must align with the domain glossary established in the PRD clarification phase. No "同物异名" (same thing, different names).
452
+ > - **Entity Relationships**: Identify core entity relationships (1:1, 1:N, N:N) that will drive database design downstream.
453
+ > These elements flow into Feature Spec Section 4 (Data Field Definition) — no separate data dictionary document needed.
454
+
427
455
  ### 7.2 Modifications to Existing Data Structures
428
456
 
429
457
  | Entity | Change Type | Details | Impact |
@@ -451,6 +479,14 @@ EntityA --N:1--> EntityC
451
479
 
452
480
  ## Step 8: Business Rules and Constraints
453
481
 
482
+ > **ISA-95 Stage 6 Thinking — Information Descriptions**
483
+ > When defining business rules and constraints:
484
+ > - **Validation Rules**: Define field-level validation (format, range, required), cross-field validation, and business logic validation.
485
+ > - **Output Format Standards**: Specify information output format (JSON for API, specific encoding), ensuring consistency with downstream API Contract.
486
+ > - **Permission Rules**: Define data access permissions that will map to API authorization logic.
487
+ > - **Traceability**: Every business rule should trace back to a PRD requirement. Every data field should trace to a user story.
488
+ > These elements flow into Feature Spec Section 5 (Business Rules) and prepare the foundation for API Contract generation.
489
+
454
490
  ### 8.1 Permission Rules
455
491
 
456
492
  | Function | Required Permission | Scope |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: speccrew-pm-requirement-analysis
3
- description: PRD Writing SOP with ISA-95 business modeling. Guide PM Agent through requirements clarification, business domain analysis, and PRD document generation. For complex requirements, applies ISA-95 six-stage methodology for structured domain modeling before PRD writing. Use when PM needs to write PRD, organize requirements, model business domains, or create structured requirement documents.
3
+ description: PRD Writing SOP with ISA-95 methodology integration. Guide PM Agent through requirements clarification, business domain analysis, and PRD document generation. Applies ISA-95 Stages 1-3 as internal thinking framework for clarification, functional decomposition, and prioritization — no separate modeling documents. Use when PM needs to write PRD, organize requirements, or create structured requirement documents.
4
4
  tools: Read, Write, Glob, Grep
5
5
  ---
6
6
 
@@ -8,9 +8,20 @@ tools: Read, Write, Glob, Grep
8
8
 
9
9
  - PM Agent receives user requirement description
10
10
  - User requests "Write a PRD" or "Help organize requirements" or "New feature requirements"
11
- - User requests "Create business model" or "Model business requirements"
12
11
  - User needs structured requirement document with UML diagrams
13
12
 
13
+ ## Methodology Foundation
14
+
15
+ This skill applies the ISA-95 six-stage methodology (Stages 1-3) as an internal thinking framework:
16
+
17
+ | ISA-95 Stage | Integrated Into | Purpose |
18
+ |---|---|---|
19
+ | Stage 1: Domain Description | Clarification process | Define domain boundary, participants, glossary |
20
+ | Stage 2: Functions in Domain | PRD Section 3 (Functional Requirements) | WBS decomposition, capability mapping |
21
+ | Stage 3: Functions of Interest | PRD Section 3.4 (Feature Breakdown) | MoSCoW prioritization, MVP scoping |
22
+
23
+ > ⚠️ **No separate modeling documents.** The methodology guides thinking quality, not document quantity.
24
+
14
25
  # Workflow
15
26
 
16
27
  ## Absolute Constraints
@@ -37,6 +48,13 @@ IF user provided incomplete input:
37
48
 
38
49
  Use progressive questioning to clarify requirements. Do NOT ask all questions at once.
39
50
 
51
+ > **ISA-95 Stage 1 Thinking — Domain Description**
52
+ > During clarification, apply domain description methodology:
53
+ > - **Domain Boundary**: Explicitly define what is in-scope and out-of-scope. Record in clarification summary.
54
+ > - **External Participants**: Identify all user roles, external systems, and integration points.
55
+ > - **Domain Glossary**: Unify key business terms to eliminate ambiguity across stakeholders.
56
+ > These elements should naturally flow into the clarification summary, NOT as a separate document.
57
+
40
58
  ### Round 1: Core Understanding
41
59
 
42
60
  Ask these first (2-3 questions max per round):
@@ -198,94 +216,68 @@ Evaluate requirement complexity to determine the appropriate workflow path:
198
216
  | Modules involved | 1 module | 2+ modules or new domain |
199
217
  | Domain clarity | Well-understood domain | New/unclear domain |
200
218
  | Cross-module deps | None or minimal | Significant |
201
- | Template | PRD-TEMPLATE.md only | BIZS-MODELING-TEMPLATE.md + PRD-TEMPLATE.md |
219
+ | Template | PRD-TEMPLATE.md only | PRD-TEMPLATE.md (with deeper analysis) |
202
220
 
203
221
  **Workflow Path:**
204
222
  - **Simple path**: Skip to Step 7 (Read PRD Template)
205
223
  - **Complex path**: Proceed to Step 5 (ISA-95 Business Modeling) → Step 6 (Module Decomposition)
206
224
 
207
- ## Step 5: ISA-95 Business Modeling (Complex Requirements Only)
225
+ ## Step 5: ISA-95 Business Modeling Thinking (Complex Requirements Only)
208
226
 
209
- Read the modeling template:
210
- ```
211
- speccrew-pm-requirement-analysis/templates/BIZS-MODELING-TEMPLATE.md
212
- ```
227
+ > ⚠️ **This step is a THINKING PROCESS, not a document generation step.**
228
+ > Apply ISA-95 methodology internally to deepen your analysis. Results flow into the PRD.
213
229
 
214
- Execute ISA-95 six stages **in condensed form**:
230
+ Apply ISA-95 six stages as internal thinking framework:
215
231
 
216
- ### 5.1 Stage 1 - Domain Description
232
+ ### 5.1 Stage 1 - Domain Description (Thinking)
217
233
  - Define domain boundary (in-scope, out-of-scope)
218
234
  - Identify external participants (users, systems, agents)
219
235
  - Create domain glossary
220
- - Draw system context diagram (graph TD)
236
+ - Visualize system context (mental model or rough sketch)
221
237
 
222
238
  **Checkpoint A: Briefly confirm domain boundary with user before proceeding.**
223
239
  Ask: "Here is the domain boundary and key participants. Does this match your understanding?"
224
240
 
225
- ### 5.2 Stage 2 - Functions in Domain
226
- - Create WBS decomposition (graph TD)
241
+ ### 5.2 Stage 2 - Functions in Domain (Thinking)
242
+ - Create WBS decomposition (mental or rough sketch)
227
243
  - Map functions to business capabilities
228
- - Select UML visualization as needed (Use Case / Activity / State Machine)
244
+ - Identify module boundaries
229
245
 
230
- ### 5.3 Stage 3 - Functions of Interest
246
+ ### 5.3 Stage 3 - Functions of Interest (Thinking)
231
247
  - Apply MoSCoW prioritization
232
- - Create focused use case diagram (graph TB)
248
+ - Identify core vs non-core functions
233
249
  - Document non-core functions and their iteration plan
234
250
 
235
251
  **Checkpoint B: Confirm MVP scope with user before proceeding.**
236
252
  Ask: "Here are the core functions (Must have) and deferred functions. Is the MVP scope correct?"
237
253
 
238
- ### 5.4 Stage 4 - Information Flows
254
+ ### 5.4 Stage 4 - Information Flows (Thinking)
239
255
  - Document core information flows
240
- - Create sequence diagram (sequenceDiagram)
241
- - Create Data Flow Diagram (graph TD)
242
- - List interface interactions
256
+ - Identify key interfaces
257
+ - Understand data movement patterns
243
258
 
244
- ### 5.5 Stage 5 - Categories of Information
259
+ ### 5.5 Stage 5 - Categories of Information (Thinking)
245
260
  - Define information categories
246
- - Create data dictionary
247
- - Draw conceptual class diagram (classDiagram)
261
+ - Identify core entities
262
+ - Understand data relationships
263
+
264
+ ### 5.6 Stage 6 - Information Descriptions (Thinking)
265
+ - Consider technical implications
266
+ - Identify component boundaries
267
+ - Note implementation considerations
248
268
 
249
- ### 5.6 Stage 6 - Information Descriptions
250
- - Create design class diagram with technical details
251
- - Create component diagram (graph TB)
252
- - Document implementation standards
269
+ **Checkpoint C: Present analysis summary to user for final confirmation.**
253
270
 
254
- **Checkpoint C: Present complete modeling results (Stages 4-6) to user for final confirmation.**
271
+ > All ISA-95 thinking results will be reflected in the PRD document, NOT as a separate modeling file.
255
272
 
256
273
  **Key rules for this step:**
257
274
  - Use 3 checkpoints (A/B/C) for progressive confirmation, not all-at-once
258
- - All Mermaid diagrams MUST follow mermaid-rule.md:
259
- - No HTML tags (`<br/>`)
260
- - No nested subgraphs
261
- - No `direction` keyword
262
- - No `style` definitions
263
- - No special characters in node text
264
- - **Write modeling document using template-fill workflow:**
265
-
266
- **5.7a Copy Template to Document Path:**
267
- 1. Read `templates/BIZS-MODELING-TEMPLATE.md`
268
- 2. Replace top-level placeholders (feature name, domain name, etc.)
269
- 3. Create document using `create_file` at: `iterations/{number}-{type}-{name}/01.product-requirement/{feature-name}-bizs-modeling.md`
270
-
271
- **5.7b Fill Each Section Using search_replace:**
272
- Fill each modeling stage section with results from Stages 1-6 above, using `search_replace` per section.
273
- > ⚠️ FORBIDDEN: `create_file` to rewrite entire document. MUST use `search_replace` per section.
274
-
275
- **ISA-95 Quick Reference:**
276
-
277
- | Stage | Focus | Key Output | UML Type |
278
- |-------|-------|------------|----------|
279
- | 1. Domain Description | Boundary, terminology | System context diagram | graph TD |
280
- | 2. Functions in Domain | All functions | WBS, use case diagram | graph TD, graph TB |
281
- | 3. Functions of Interest | Core functions (MVP) | MoSCoW table | graph TB |
282
- | 4. Information Flows | Interactions, interfaces | Sequence diagram, DFD | sequenceDiagram, graph TD |
283
- | 5. Categories of Information | Entities, data dictionary | Conceptual class diagram | classDiagram |
284
- | 6. Information Descriptions | Design details | Design class diagram | classDiagram, graph TB |
275
+ - This is an analysis phase — focus on understanding, not documentation
276
+ - Results integrate into PRD Sections 3-7 during Step 9
285
277
 
286
278
  ## Step 6: Module Decomposition & Ordering (Complex Requirements Only)
287
279
 
288
- Map WBS Level-1 nodes from Stage 2 into independent modules. For each module:
280
+ Based on ISA-95 analysis from Step 5, map identified modules into independent units. For each module:
289
281
 
290
282
  ### 6.1 Define Module List
291
283
 
@@ -295,7 +287,7 @@ Map WBS Level-1 nodes from Stage 2 into independent modules. For each module:
295
287
 
296
288
  ### 6.2 Cross-Module Dependency Matrix
297
289
 
298
- Extract dependencies from Stage 4 information flows and graph query results:
290
+ Based on information flow analysis from Step 5, identify dependencies:
299
291
 
300
292
  | Module | Depends On | Dependency Type | Shared Entities |
301
293
  |--------|-----------|-----------------|-----------------|
@@ -381,6 +373,14 @@ Fill in according to the template structure, requirements:
381
373
  - **Background & Goals**: Explain why we're doing this and what success looks like
382
374
  - **User Stories**: `As a [user role], I want [to do something], so that [I can achieve some goal]`
383
375
  - **Functional Requirements**: Group by priority (P0 Core / P1 Important / P2 Optional)
376
+
377
+ > **ISA-95 Stage 2 Thinking — Functions in Domain**
378
+ > When decomposing functional requirements:
379
+ > - **WBS Decomposition**: Break down the system into functional modules using Work Breakdown Structure logic. Each module should map to a clear business capability.
380
+ > - **Function-Capability Mapping**: Every function must answer "what business capability does this deliver?"
381
+ > - **Module Boundaries**: Ensure modules have clear boundaries with minimal coupling.
382
+ > This thinking drives PRD Section 3 content quality — no separate WBS document needed.
383
+
384
384
  - **Feature Breakdown**: Extract business operation units for downstream Feature Design (see Step 9.1)
385
385
  - **Non-functional Requirements**: Performance, security, compatibility, etc.
386
386
  - **Acceptance Criteria**: Quantifiable, verifiable definition of done
@@ -391,6 +391,13 @@ Fill in according to the template structure, requirements:
391
391
 
392
392
  For both simple and complex requirements, extract Feature Breakdown to guide downstream Feature Design:
393
393
 
394
+ > **ISA-95 Stage 3 Thinking — Functions of Interest**
395
+ > When creating the Feature Breakdown table:
396
+ > - **MoSCoW Prioritization**: Classify each feature as Must-have (P0), Should-have (P1), Could-have (P2), or Won't-have (deferred).
397
+ > - **MVP Focus**: The Feature Breakdown table IS the MVP definition. Features marked P0 form the core scope.
398
+ > - **Non-core Exclusion**: Explicitly note deferred features in Section 6 (Boundary & Constraints) with planned iteration.
399
+ > The Feature Breakdown table in Section 3.4 serves as the core function selection — no separate priority matrix needed.
400
+
394
401
  **Analysis Steps:**
395
402
  1. **Analyze user stories and functional requirements** for this module/feature
396
403
  2. **Identify business operation units** - each unit should represent:
@@ -1,3 +1,9 @@
1
+ <!--
2
+ INTERNAL REFERENCE ONLY — This template is NOT used to generate standalone documents.
3
+ ISA-95 methodology is internalized into the PRD generation process.
4
+ All modeling insights should flow into PRD-TEMPLATE.md sections.
5
+ See SKILL.md "Methodology Foundation" section for the integration mapping.
6
+ -->
1
7
  # Business Modeling - [Feature/Skill Name]
2
8
 
3
9
  ## Document Info
@@ -8,6 +8,31 @@
8
8
  ### 1.2 Goals
9
9
  [Describe the business objectives to be achieved]
10
10
 
11
+ ### 1.3 Domain Boundary
12
+
13
+ **In-Scope Domains:**
14
+ - {Domain 1: brief description}
15
+ - {Domain 2: brief description}
16
+
17
+ **Out-of-Scope Domains:**
18
+ - {Domain 1: reason for exclusion}
19
+
20
+ **External Participants:**
21
+
22
+ | Participant Type | Name | Description |
23
+ |------------------|------|-------------|
24
+ | User | {Role name} | {Role description} |
25
+ | System | {System name} | {Integration description} |
26
+
27
+ ### 1.4 Domain Glossary
28
+
29
+ > Unify key business terms to eliminate cross-stakeholder ambiguity.
30
+
31
+ | Term | Definition | Related Concepts |
32
+ |------|------------|------------------|
33
+ | {Term 1} | {Precise definition} | {Related terms or modules} |
34
+ | {Term 2} | {Precise definition} | {Related terms or modules} |
35
+
11
36
  ## 2. User Stories
12
37
 
13
38
  ### 2.1 Target Users
@@ -107,10 +132,12 @@ graph TB
107
132
 
108
133
  > List all business operation units in this module. Each feature represents a cohesive business operation (e.g., one frontend page with its backend APIs, or one API group for backend-only). This breakdown guides downstream Feature Design to generate per-feature specs.
109
134
 
110
- | Feature ID | Feature Name | Type | Pages/Endpoints | Description |
111
- |------------|-------------|------|-----------------|-------------|
112
- | F-{MODULE}-01 | {Feature name} | Page+API / API-only | {page count or endpoint count} | {Brief description} |
113
- | F-{MODULE}-02 | {Feature name} | Page+API / API-only | {page count or endpoint count} | {Brief description} |
135
+ > Priority follows MoSCoW method: P0 = Must have (MVP core), P1 = Should have, P2 = Could have, Deferred = Won't have this iteration.
136
+
137
+ | Feature ID | Feature Name | Type | Priority | Pages/Endpoints | Description |
138
+ |------------|-------------|------|----------|-----------------|-------------|
139
+ | F-{MODULE}-01 | {Feature name} | Page+API / API-only | P0 (Must) / P1 (Should) / P2 (Could) | {count} | {Brief description} |
140
+ | F-{MODULE}-02 | {Feature name} | Page+API / API-only | P0 (Must) / P1 (Should) / P2 (Could) | {count} | {Brief description} |
114
141
 
115
142
  #### Feature Dependencies
116
143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {