speccrew 0.7.73 → 0.7.75
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.
- package/.speccrew/agents/speccrew-feature-designer.md +96 -0
- package/.speccrew/agents/speccrew-product-manager.md +55 -0
- package/.speccrew/agents/speccrew-system-deployer.md +178 -0
- package/.speccrew/agents/speccrew-system-developer.md +177 -0
- package/.speccrew/agents/speccrew-task-worker.md +18 -0
- package/.speccrew/agents/speccrew-team-leader.md +56 -0
- package/.speccrew/agents/speccrew-test-manager.md +167 -0
- package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +6 -149
- package/.speccrew/skills/speccrew-deploy-build/SKILL.md +2 -59
- package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +2 -64
- package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +2 -75
- package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +2 -70
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +2 -381
- package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +2 -369
- package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +2 -362
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +2 -304
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +2 -294
- package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +2 -204
- package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +2 -173
- package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +2 -169
- package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +2 -173
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +2 -251
- package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +2 -254
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +2 -748
- package/.speccrew/skills/speccrew-feature-designer-orchestration/SKILL.md +6 -105
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +6 -33
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +3 -138
- package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +3 -283
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +3 -1014
- package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +4 -343
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +4 -235
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +6 -72
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +3 -534
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +3 -432
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +4 -391
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -98
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -92
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +3 -181
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +3 -148
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +3 -330
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +6 -159
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +3 -142
- package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +3 -568
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +3 -180
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +3 -154
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +3 -176
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -135
- package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +4 -88
- package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +4 -178
- package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -102
- package/.speccrew/skills/speccrew-pm-phase0-init/SKILL.md +5 -78
- package/.speccrew/skills/speccrew-pm-phase1-knowledge-check/SKILL.md +5 -85
- package/.speccrew/skills/speccrew-pm-phase2-complexity-assess/SKILL.md +4 -100
- package/.speccrew/skills/speccrew-pm-phase5-subprd-dispatch/SKILL.md +14 -106
- package/.speccrew/skills/speccrew-pm-phase6-verify-confirm/SKILL.md +7 -84
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +6 -66
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +4 -96
- package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +4 -131
- package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +4 -76
- package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +3 -281
- package/.speccrew/skills/speccrew-product-manager-orchestration/SKILL.md +6 -165
- package/.speccrew/skills/speccrew-system-deployer-orchestration/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-system-designer-orchestration/SKILL.md +2 -35
- package/.speccrew/skills/speccrew-system-developer-orchestration/SKILL.md +6 -98
- package/.speccrew/skills/speccrew-task-worker-execution/SKILL.md +6 -94
- package/.speccrew/skills/speccrew-team-leader-routing/SKILL.md +6 -79
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +2 -58
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +2 -61
- package/.speccrew/skills/speccrew-test-manager-orchestration/SKILL.md +6 -94
- package/.speccrew/skills/speccrew-test-reporter/SKILL.md +2 -102
- package/.speccrew/skills/speccrew-test-runner/SKILL.md +3 -121
- package/package.json +1 -1
- package/workspace-template/docs/rules/agentflow-spec.md +56 -8
|
@@ -1,88 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: speccrew-pm-requirement-model
|
|
3
|
-
description: SpecCrew PM Requirement Modeling Skill. Applies ISA-95 Stages 1-3 for business domain analysis, WBS decomposition, and module ordering. Produces .module-design.md as interface contract
|
|
3
|
+
description: SpecCrew PM Requirement Modeling Skill. Applies ISA-95 Stages 1-3 for business domain analysis, WBS decomposition, and module ordering. Produces .module-design.md as interface contract.
|
|
4
4
|
tools: Read, Write, Glob, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
ISA-95 business modeling and module decomposition. Produces `.module-design.md` as the interface contract for PRD generation.
|
|
10
|
-
|
|
11
|
-
## Trigger Scenarios
|
|
12
|
-
|
|
13
|
-
- Clarification completed (`.clarification-summary.md` exists)
|
|
7
|
+
# Trigger Scenarios
|
|
8
|
+
- Clarification completed (.clarification-summary.md exists)
|
|
14
9
|
- Complex requirements requiring ISA-95 analysis
|
|
15
10
|
- Multi-module system requiring decomposition
|
|
16
11
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
| Parameter | Type | Required | Description |
|
|
20
|
-
|-----------|------|----------|-------------|
|
|
21
|
-
| `iteration_path` | string | Yes | Path to iteration directory |
|
|
22
|
-
| `clarification_file` | string | No | Path to clarification summary (default: `{iteration_path}/01.product-requirement/.clarification-summary.md`) |
|
|
23
|
-
|
|
24
|
-
## Methodology Foundation
|
|
25
|
-
|
|
26
|
-
Applies ISA-95 Stages 1-3 as structured analysis framework:
|
|
27
|
-
|
|
28
|
-
| Stage | Purpose | Output |
|
|
29
|
-
|-------|---------|--------|
|
|
30
|
-
| Stage 1: Domain Description | Boundary, actors, glossary | Domain model |
|
|
31
|
-
| Stage 2: Functions in Domain | WBS decomposition | Function map |
|
|
32
|
-
| Stage 3: Functions of Interest | MoSCoW prioritization | MVP scope |
|
|
33
|
-
|
|
34
|
-
## PM Stage Content Boundary
|
|
35
|
-
|
|
36
|
-
> **DO NOT include:** API definitions, DB structures, code snippets, technical terminology. These belong to Feature Designer or System Designer.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
# AgentFlow Definition
|
|
41
|
-
|
|
12
|
+
## AgentFlow Definition
|
|
42
13
|
<!-- @agentflow: SKILL.xml -->
|
|
43
|
-
|
|
44
|
-
>
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
# Output Checklist
|
|
49
|
-
|
|
50
|
-
- [ ] `.clarification-summary.md` verified (prerequisite)
|
|
51
|
-
- [ ] ISA-95 Stage 1 complete (Domain Description)
|
|
52
|
-
- [ ] Checkpoint A passed (domain boundary confirmed)
|
|
53
|
-
- [ ] ISA-95 Stage 2 complete (Functions in Domain)
|
|
54
|
-
- [ ] ISA-95 Stage 3 complete (Functions of Interest)
|
|
55
|
-
- [ ] Checkpoint B passed (MVP scope confirmed)
|
|
56
|
-
- [ ] Checkpoint C passed (complete analysis confirmed)
|
|
57
|
-
- [ ] Module list defined
|
|
58
|
-
- [ ] Dependency matrix created
|
|
59
|
-
- [ ] Implementation phases determined
|
|
60
|
-
- [ ] Module decomposition confirmed with user
|
|
61
|
-
- [ ] `.module-design.md` created
|
|
62
|
-
- [ ] `.checkpoints.json` updated via script
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
# Constraints
|
|
67
|
-
|
|
68
|
-
**Must do:**
|
|
69
|
-
- Verify `.clarification-summary.md` exists before starting
|
|
70
|
-
- Use 3 checkpoints (A/B/C) for progressive user confirmation
|
|
71
|
-
- Define clear module boundaries with minimal coupling
|
|
72
|
-
- Use `update-progress.js` for JSON files
|
|
73
|
-
|
|
74
|
-
**Must not do:**
|
|
75
|
-
- Skip user checkpoints in complex mode
|
|
76
|
-
- Include technical implementation details
|
|
77
|
-
- Create circular module dependencies
|
|
78
|
-
- Manually write JSON files
|
|
79
|
-
|
|
80
|
-
### Diagram Format Rule (MANDATORY)
|
|
81
|
-
- All diagrams MUST use Mermaid syntax (graph TB, graph TD, graph LR, etc.)
|
|
82
|
-
- ASCII art diagrams are FORBIDDEN
|
|
83
|
-
- Reference `mermaid-rule.md` for compatibility
|
|
84
|
-
|
|
85
|
-
### Template
|
|
86
|
-
- Module design document MUST follow `templates/MODULE-DESIGN-TEMPLATE.md` structure
|
|
87
|
-
- All 10 sections are required
|
|
88
|
-
- Fill template with analyzed data from ISA-95 stages
|
|
14
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
15
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|
|
@@ -1,87 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: speccrew-pm-requirement-simple
|
|
3
|
-
description: SpecCrew PM Simple Requirement Skill. Handles lightweight requirements
|
|
3
|
+
description: SpecCrew PM Simple Requirement Skill. Handles lightweight requirements with a streamlined PRD generation process. Produces a single concise PRD document without Master-Sub structure.
|
|
4
4
|
tools: Read, Write, Glob, Grep, Terminal
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
|
|
9
|
-
Simple requirement analysis skill for lightweight changes. Produces a single concise PRD.
|
|
10
|
-
|
|
11
|
-
## Trigger Scenarios
|
|
12
|
-
|
|
7
|
+
# Trigger Scenarios
|
|
13
8
|
- User requests a small change (add field, modify behavior, fix workflow)
|
|
14
9
|
- Requirement scope is within 1-2 modules
|
|
15
10
|
- Estimated 1-5 Features
|
|
16
11
|
|
|
17
|
-
## Methodology Foundation
|
|
18
|
-
|
|
19
|
-
This skill applies ISA-95 Stages 1-3 in lightweight mode:
|
|
20
|
-
|
|
21
|
-
| ISA-95 Stage | Lightweight Application |
|
|
22
|
-
|---|---|
|
|
23
|
-
| Stage 1: Domain Description | Quick scope confirmation (no formal glossary needed) |
|
|
24
|
-
| Stage 2: Functions in Domain | Identify affected functions (no full WBS needed) |
|
|
25
|
-
| Stage 3: Functions of Interest | All identified features are core (no MoSCoW filtering) |
|
|
26
|
-
|
|
27
|
-
> **No separate modeling documents.** Lightweight mode focuses on speed and clarity.
|
|
28
|
-
|
|
29
|
-
## PM Stage Content Boundary
|
|
30
|
-
|
|
31
|
-
> **PM Stage Content Boundary — DO NOT include:**
|
|
32
|
-
> - API endpoint definitions, HTTP methods, request/response JSON
|
|
33
|
-
> - Design class diagrams, component diagrams, deployment diagrams
|
|
34
|
-
> - Database table structures, ER diagrams, SQL queries
|
|
35
|
-
> - Code snippets, pseudocode, implementation logic
|
|
36
|
-
> - Technical terminology (e.g., UUID, JWT, REST, Microservice, JSON)
|
|
37
|
-
> - Technical metrics (e.g., "code files", "latency < 100ms", "CPU usage")
|
|
38
|
-
>
|
|
39
|
-
> These belong to **Feature Designer** (interaction design, API contracts) or **System Designer** (technical architecture).
|
|
40
|
-
>
|
|
41
|
-
> **Required:** Use business language only. Describe WHAT business operation needs to happen, not HOW the system implements it.
|
|
42
|
-
> ✅ "Customer can search by name" ❌ "SELECT * FROM customers WHERE name LIKE '%keyword%'"
|
|
43
|
-
> ✅ "Show friendly error message" ❌ "return HTTP 400 Bad Request"
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Prerequisites
|
|
48
|
-
|
|
49
|
-
> 🚨 MANDATORY: `.clarification-summary.md` MUST exist in the current iteration directory.
|
|
50
|
-
> This file is generated by the `speccrew-pm-requirement-clarify` skill.
|
|
51
|
-
> IF `.clarification-summary.md` is missing → ABORT immediately.
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
12
|
## AgentFlow Definition
|
|
56
|
-
|
|
57
13
|
<!-- @agentflow: SKILL.xml -->
|
|
58
|
-
|
|
59
|
-
>
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Output Checklist
|
|
64
|
-
|
|
65
|
-
- [ ] `.clarification-summary.md` read and complexity verified
|
|
66
|
-
- [ ] PRD file created at correct path
|
|
67
|
-
- [ ] All relevant sections filled (skip empty optional sections)
|
|
68
|
-
- [ ] No technical implementation details (no API, no code, no class diagrams)
|
|
69
|
-
- [ ] Feature Breakdown table present with at least 1 feature
|
|
70
|
-
- [ ] Acceptance criteria are concrete and testable
|
|
71
|
-
- [ ] Business language only — no technical jargon
|
|
72
|
-
|
|
73
|
-
## Constraints
|
|
74
|
-
|
|
75
|
-
**Must do:**
|
|
76
|
-
- Verify `.clarification-summary.md` exists before proceeding
|
|
77
|
-
- Keep PRD concise — 1-3 page PRDs
|
|
78
|
-
- Use business language throughout
|
|
79
|
-
- Extract key decisions from clarification summary into PRD
|
|
80
|
-
|
|
81
|
-
**Must not do:**
|
|
82
|
-
- Proceed without `.clarification-summary.md`
|
|
83
|
-
- Generate Master-Sub PRD structure
|
|
84
|
-
- Dispatch worker agents
|
|
85
|
-
- Generate API definitions, class diagrams, or technical artifacts
|
|
86
|
-
- Wait for user confirmation (handled by PM Agent)
|
|
87
|
-
- Auto-transition to Feature Design stage
|
|
14
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
15
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|
|
@@ -4,289 +4,11 @@ description: Generate a single Sub-PRD document for one module. Used by PM Agent
|
|
|
4
4
|
tools: Read, Write, Glob, Grep
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## PM Stage Content Boundary
|
|
8
|
-
|
|
9
|
-
> ⚠️ **This Sub-PRD MUST adhere to PM Stage Content Boundary:**
|
|
10
|
-
> - NO API endpoint definitions, HTTP methods, request/response JSON
|
|
11
|
-
> - NO Database table structures, ER diagrams, SQL queries
|
|
12
|
-
> - NO Design class diagrams, component diagrams, deployment diagrams
|
|
13
|
-
> - NO Code snippets, pseudocode, implementation logic
|
|
14
|
-
> - NO Technical terminology (e.g., UUID, JWT, REST, Microservice, JSON)
|
|
15
|
-
> - NO Technical metrics (e.g., "code files", "latency < 100ms", "CPU usage")
|
|
16
|
-
>
|
|
17
|
-
> **Required:** Use BUSINESS LANGUAGE ONLY.
|
|
18
|
-
> Describe WHAT business operation needs to happen, not HOW the system implements it.
|
|
19
|
-
>
|
|
20
|
-
> **ABORT CONDITIONS:**
|
|
21
|
-
> - IF any section being generated contains SQL, API definitions, or code → STOP
|
|
22
|
-
> - IF inherited module_requirements contain technical details → Strip them, use business descriptions only
|
|
23
|
-
|
|
24
7
|
# Trigger Scenarios
|
|
25
|
-
|
|
26
8
|
- PM Agent dispatches worker to generate Sub-PRD for a specific module
|
|
27
9
|
- Worker receives module context from PM Agent's dispatch plan
|
|
28
10
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
| Parameter | Required | Description |
|
|
32
|
-
|-----------|----------|-------------|
|
|
33
|
-
| module_id | Yes | Module ID for feature registry (e.g., "M1", "M2") |
|
|
34
|
-
| module_name | Yes | Human-readable module name (e.g., "Customer Management") |
|
|
35
|
-
| module_key | Yes | Module identifier for file naming (e.g., "customer") |
|
|
36
|
-
| module_scope | Yes | What this module covers |
|
|
37
|
-
| module_entities | Yes | Core business entities in this module |
|
|
38
|
-
| module_user_stories | Yes | User stories specific to this module |
|
|
39
|
-
| module_requirements | Yes | Functional requirements for this module (P0/P1/P2) |
|
|
40
|
-
| module_features | Yes | Feature Breakdown entries for this module (Feature IDs, Types, Dependencies) |
|
|
41
|
-
| module_dependencies | No | Dependencies on other modules |
|
|
42
|
-
| master_prd_path | Yes | Path to the Master PRD (for cross-referencing) |
|
|
43
|
-
| feature_name | Yes | System-level feature name (for file naming prefix) |
|
|
44
|
-
| template_path | Yes | Path to PRD-TEMPLATE.md |
|
|
45
|
-
| output_path | Yes | Full path for the Sub-PRD output file |
|
|
46
|
-
|
|
47
|
-
# Absolute Constraints
|
|
48
|
-
|
|
49
|
-
> **These rules apply to ALL document generation steps. Violation = task failure.**
|
|
50
|
-
|
|
51
|
-
1. **FORBIDDEN: Full-file rewrite** — NEVER replace the entire document content in a single operation. Always use targeted `search_replace` on specific sections.
|
|
52
|
-
2. **MANDATORY: Template-first workflow** — Copy template MUST execute before filling sections.
|
|
53
|
-
|
|
54
|
-
# AgentFlow Definition
|
|
55
|
-
|
|
11
|
+
## AgentFlow Definition
|
|
56
12
|
<!-- @agentflow: SKILL.xml -->
|
|
57
|
-
|
|
58
|
-
>
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Step 1: Load Context
|
|
63
|
-
|
|
64
|
-
1. Read Master PRD at `{master_prd_path}` to understand:
|
|
65
|
-
- System-wide background and goals
|
|
66
|
-
- Cross-module dependency matrix
|
|
67
|
-
- This module's position in the overall system
|
|
68
|
-
|
|
69
|
-
2. Read PRD template at `{template_path}`
|
|
70
|
-
|
|
71
|
-
## Step 2: Create Sub-PRD File
|
|
72
|
-
|
|
73
|
-
1. Copy template content to `{output_path}` using `create_file`
|
|
74
|
-
2. Replace the title: `# PRD - [Feature Name]` → `# Sub-PRD - {module_name}`
|
|
75
|
-
|
|
76
|
-
## Step 3: Fill Module-Specific Content
|
|
77
|
-
|
|
78
|
-
> **⚠️ CRITICAL: Two-Phase Strategy (Skeleton-First, Content-After)**
|
|
79
|
-
>
|
|
80
|
-
> This step MUST be executed in two phases to ensure consistent document structure.
|
|
81
|
-
|
|
82
|
-
### Phase A: Skeleton Construction (BEFORE any content filling)
|
|
83
|
-
|
|
84
|
-
1. Read PRD-TEMPLATE.md to identify the complete section structure
|
|
85
|
-
2. Count the number of features from `{module_features}` input
|
|
86
|
-
3. For Section 3.5 Feature Details, replicate the template's Feature block structure for EACH feature:
|
|
87
|
-
- Copy the EXACT template structure (all 6 sub-sections) from PRD-TEMPLATE.md
|
|
88
|
-
- Create `#### Feature 1: {feature_name}` through `#### Feature N: {feature_name}`
|
|
89
|
-
- Each feature block MUST contain these 6 sub-section headers (copied from template):
|
|
90
|
-
```
|
|
91
|
-
**Requirement Description:**
|
|
92
|
-
[TO BE FILLED]
|
|
93
|
-
|
|
94
|
-
**Interaction Flow:**
|
|
95
|
-
[TO BE FILLED]
|
|
96
|
-
|
|
97
|
-
**Boundary Conditions:**
|
|
98
|
-
[TO BE FILLED]
|
|
99
|
-
|
|
100
|
-
**Exception Scenarios:**
|
|
101
|
-
[TO BE FILLED]
|
|
102
|
-
|
|
103
|
-
**Operation Flow Diagram:**
|
|
104
|
-
[TO BE FILLED]
|
|
105
|
-
|
|
106
|
-
**Operation Steps Detail:**
|
|
107
|
-
[TO BE FILLED]
|
|
108
|
-
```
|
|
109
|
-
4. Verify skeleton: confirm ALL features have ALL 6 sub-section headers before proceeding
|
|
110
|
-
|
|
111
|
-
> ⚠️ DO NOT start filling content until the complete skeleton is verified.
|
|
112
|
-
|
|
113
|
-
### Phase B: Content Filling (AFTER skeleton is complete)
|
|
114
|
-
|
|
115
|
-
Fill each `[TO BE FILLED]` placeholder with actual content:
|
|
116
|
-
- Requirement Description → Business requirements in business language
|
|
117
|
-
- Interaction Flow → User interaction steps (numbered list)
|
|
118
|
-
- Boundary Conditions → Table with Condition Type | Scenario | Handling Rule
|
|
119
|
-
- Exception Scenarios → Bullet list of exception handling
|
|
120
|
-
- Operation Flow Diagram → Mermaid `graph LR` diagram showing operation flow
|
|
121
|
-
- Operation Steps Detail → Table with Step | Action | Expected Outcome | Exception Handling
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
Fill each section using `search_replace`:
|
|
126
|
-
|
|
127
|
-
### 3.1 Section 1: Background & Goals
|
|
128
|
-
- 1.1 Background: Why this module exists within the system, what problem it solves
|
|
129
|
-
- 1.2 Goals: Module-specific business objectives
|
|
130
|
-
|
|
131
|
-
### 3.2 Section 2: User Stories
|
|
132
|
-
- 2.1 Target Users: Users who interact with this specific module
|
|
133
|
-
- 2.2 User Scenarios: Module-specific user stories in "As a / I want / So that" format
|
|
134
|
-
|
|
135
|
-
### 3.3 Section 3: Functional Requirements
|
|
136
|
-
- 3.1 Use Case Diagram: Module-specific use case diagram (Mermaid flowchart TB) — **Business use cases showing user interactions — NOT system APIs or technical components**
|
|
137
|
-
- 3.2 Business Process Flow: Module-internal process flow — **Business process steps — NOT database operations or API calls**
|
|
138
|
-
- 3.3 Feature List: Module features with P0/P1/P2 priority — **Business feature descriptions — NOT technical implementation**
|
|
139
|
-
- 3.4 Feature Breakdown: **REQUIRED** — Fill with `{module_features}` data:
|
|
140
|
-
- Feature ID, Feature Name, Type (User Interaction / Backend Process), Scope, Description
|
|
141
|
-
- Feature Dependencies table
|
|
142
|
-
- 3.5 Feature Details: **FOR EACH feature in module_features, fill ALL 6 sub-sections below:**
|
|
143
|
-
|
|
144
|
-
**Complete structure (MUST repeat for every Feature 1, 2, ... N):**
|
|
145
|
-
- Requirement Description — **Business requirements in business language**
|
|
146
|
-
- Interaction Flow — **User interaction steps in business terms**
|
|
147
|
-
- Boundary Conditions table — **Business scenarios and business handling rules**
|
|
148
|
-
- Exception Scenarios — **Business exception handling in business language**
|
|
149
|
-
- Operation Flow Diagram — **Mermaid `graph LR` showing business operation steps (REQUIRED for EVERY feature)**
|
|
150
|
-
- Operation Steps Detail — **Table: Step | Action | Expected Outcome | Business Exception Handling (REQUIRED for EVERY feature)**
|
|
151
|
-
|
|
152
|
-
> ⚠️ **CRITICAL**: ALL features MUST have the SAME 6-section structure. DO NOT skip Operation Flow Diagram or Operation Steps Detail for ANY feature. Check the PRD-TEMPLATE.md for the exact format.
|
|
153
|
-
|
|
154
|
-
### 3.4 Section 4: Non-functional Requirements
|
|
155
|
-
- Module-specific performance, security, compatibility requirements
|
|
156
|
-
- Reference Master PRD for system-wide NFRs
|
|
157
|
-
|
|
158
|
-
### 3.5 Section 5: Acceptance Criteria
|
|
159
|
-
- 5.1 Must Have: Module-specific acceptance items
|
|
160
|
-
- 5.2 Should Have: Module-specific nice-to-have items
|
|
161
|
-
|
|
162
|
-
### 3.6 Section 6: Boundary Description
|
|
163
|
-
- 6.1 In Scope: What this module covers
|
|
164
|
-
- 6.2 Out of Scope: What this module explicitly does NOT cover
|
|
165
|
-
|
|
166
|
-
### 3.7 Section 7: Assumptions & Dependencies
|
|
167
|
-
- Dependencies on other modules (reference Master PRD dependency matrix)
|
|
168
|
-
- External system dependencies
|
|
169
|
-
- Prerequisites
|
|
170
|
-
|
|
171
|
-
> ⚠️ **FORBIDDEN: `create_file` to rewrite the entire document. MUST use `search_replace` per section.**
|
|
172
|
-
|
|
173
|
-
### ⚠️ Content Boundary Validation
|
|
174
|
-
|
|
175
|
-
Before filling each section, verify:
|
|
176
|
-
- Feature descriptions use BUSINESS language (✅ "Customer can view order history" ❌ "GET /api/orders returns JSON")
|
|
177
|
-
- Boundary conditions describe BUSINESS scenarios (✅ "Customer name is empty" ❌ "null pointer exception")
|
|
178
|
-
- Exception handling describes BUSINESS rules (✅ "Show friendly error message" ❌ "return HTTP 400")
|
|
179
|
-
- Process flows show BUSINESS steps (✅ "Customer submits order" ❌ "POST request to order service")
|
|
180
|
-
|
|
181
|
-
## Step 4: Verify Output
|
|
182
|
-
|
|
183
|
-
1. Read the generated file to verify:
|
|
184
|
-
- File exists and is non-empty
|
|
185
|
-
- File size > 3KB (not a placeholder)
|
|
186
|
-
- Section 3.4 Feature Breakdown is populated
|
|
187
|
-
- Title contains module name
|
|
188
|
-
|
|
189
|
-
2. Report result:
|
|
190
|
-
|
|
191
|
-
```
|
|
192
|
-
IF verification passes:
|
|
193
|
-
→ Output: "✅ Sub-PRD generated: {output_path}"
|
|
194
|
-
IF verification fails:
|
|
195
|
-
→ Output: "❌ Sub-PRD verification failed: {reason}"
|
|
196
|
-
→ Attempt to fix the specific issue
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
## Step 5: Write Module Features to Feature List
|
|
200
|
-
|
|
201
|
-
> **Purpose:** Separate feature data from dispatch plan into dedicated `.prd-feature-list.json` file.
|
|
202
|
-
> Each Sub-PRD Worker writes its module's features upon completion.
|
|
203
|
-
|
|
204
|
-
> **CRITICAL: UTF-8 Encoding**
|
|
205
|
-
>
|
|
206
|
-
> When writing ANY file (JSON, Markdown, or other text files), you MUST ensure UTF-8 encoding:
|
|
207
|
-
> - Use `create_file` tool (which defaults to UTF-8) for file creation
|
|
208
|
-
> - If using Node.js scripts: `fs.writeFileSync(path, content, 'utf8')`
|
|
209
|
-
> - NEVER rely on system default encoding (may be GBK on Chinese Windows)
|
|
210
|
-
> - This applies to ALL output files including `.prd-feature-list.json`
|
|
211
|
-
|
|
212
|
-
### 5.1 Determine Feature List File Path
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
feature_list_path = dirname(output_path) + '/.prd-feature-list.json'
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
This is the same directory containing `.sub-prd-dispatch-plan.json`.
|
|
219
|
-
|
|
220
|
-
### 5.2 Read or Initialize Feature List File
|
|
221
|
-
|
|
222
|
-
```javascript
|
|
223
|
-
IF file exists at feature_list_path:
|
|
224
|
-
feature_list = read_json(feature_list_path)
|
|
225
|
-
ELSE:
|
|
226
|
-
feature_list = {
|
|
227
|
-
"created_at": "{timestamp from update-progress.js}",
|
|
228
|
-
"updated_at": "{timestamp from update-progress.js}",
|
|
229
|
-
"modules": []
|
|
230
|
-
}
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
> ⚠️ **Timestamp constraint:** Use `node scripts/update-progress.js write-checkpoint` or similar script to get accurate timestamps. DO NOT fabricate timestamps.
|
|
234
|
-
|
|
235
|
-
### 5.3 Build Current Module Feature Entry
|
|
236
|
-
|
|
237
|
-
Construct the module entry from input parameters:
|
|
238
|
-
|
|
239
|
-
```json
|
|
240
|
-
{
|
|
241
|
-
"module_id": "{module_id}",
|
|
242
|
-
"module_name": "{module_name}",
|
|
243
|
-
"module_key": "{module_key}",
|
|
244
|
-
"source_prd": "{feature_name}-sub-{module_key}.md",
|
|
245
|
-
"feature_count": {module_features.length},
|
|
246
|
-
"features": [
|
|
247
|
-
// Map each item in module_features to:
|
|
248
|
-
{
|
|
249
|
-
"feature_id": "{item.feature_id}",
|
|
250
|
-
"feature_name": "{item.feature_name}",
|
|
251
|
-
"type": "{item.type}",
|
|
252
|
-
"priority": "{item.priority}",
|
|
253
|
-
"sub_features": "{item.sub_features}",
|
|
254
|
-
"description": "{item.description}"
|
|
255
|
-
}
|
|
256
|
-
]
|
|
257
|
-
}
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### 5.4 Merge into Feature List
|
|
261
|
-
|
|
262
|
-
```javascript
|
|
263
|
-
existing_index = find_index(feature_list.modules, m => m.module_key === module_key)
|
|
264
|
-
|
|
265
|
-
IF existing_index >= 0:
|
|
266
|
-
// Retry scenario: replace existing entry
|
|
267
|
-
feature_list.modules[existing_index] = module_entry
|
|
268
|
-
ELSE:
|
|
269
|
-
// New module: append
|
|
270
|
-
feature_list.modules.push(module_entry)
|
|
271
|
-
|
|
272
|
-
// Update timestamp
|
|
273
|
-
feature_list.updated_at = "{current timestamp}"
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
### 5.5 Write Feature List File
|
|
277
|
-
|
|
278
|
-
Write the updated `feature_list` to `{feature_list_path}` using `create_file`.
|
|
279
|
-
|
|
280
|
-
### 5.6 Report Result
|
|
281
|
-
|
|
282
|
-
```
|
|
283
|
-
IF write succeeds:
|
|
284
|
-
→ Output: "✅ Feature list updated: {feature_count} features for module {module_id}"
|
|
285
|
-
IF write fails:
|
|
286
|
-
→ Output: "⚠️ Feature list write failed: {error}"
|
|
287
|
-
→ Continue without blocking Sub-PRD completion
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
---
|
|
291
|
-
|
|
292
|
-
> **Note:** Step 5 is a pure incremental operation. Failure here should NOT affect the Sub-PRD file generation result. The primary deliverable is the Sub-PRD document itself.
|
|
13
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
14
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|
|
@@ -1,177 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: speccrew-product-manager-orchestration
|
|
3
|
-
version: 2.0.0
|
|
4
3
|
description: Product Manager core orchestration skill (pure routing layer v2.0), responsible for workflow resume routing and dispatch-to-worker scheduling for each Phase Skill. All business logic is executed by independent Phase Skills.
|
|
5
4
|
tools: Read, Write, Glob, Grep, Bash, Agent
|
|
6
5
|
---
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
>
|
|
10
|
-
> **Step 1**: Load XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md` — this defines all block types and action-to-tool mappings
|
|
11
|
-
>
|
|
12
|
-
> **Step 2**: Execute this SKILL.md's XML workflow **block by block in document order**. For EVERY block, you MUST follow this 3-step cycle:
|
|
13
|
-
>
|
|
14
|
-
> ```
|
|
15
|
-
> 🏷️ Block [ID] (action=[action]) — [desc]
|
|
16
|
-
> 🔧 Tool: [which IDE tool to call]
|
|
17
|
-
> ✅ Result: [output or status]
|
|
18
|
-
> ```
|
|
7
|
+
# Trigger Scenarios
|
|
19
8
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
> - `action="run-skill"` → Invoke via **Skill tool** (pass the `<field name="skill">` value EXACTLY)
|
|
24
|
-
> - `action="run-script"` → Execute via **Terminal tool** (pass the `<field name="command">` value EXACTLY)
|
|
25
|
-
> - `action="dispatch-to-worker"` → Create **Task** via **Task tool** for `speccrew-task-worker`
|
|
26
|
-
> - `action="read-file"` → Read via **Read tool**
|
|
27
|
-
> - `action="log"` → Output message directly
|
|
28
|
-
> - `action="user-confirm"` → Present to user and wait for EXPLICIT confirmation (NON-SKIPPABLE)
|
|
29
|
-
>
|
|
30
|
-
> **CRITICAL DISPATCH RULE:**
|
|
31
|
-
> - PM Agent (Team Leader) MUST NOT execute Skills directly
|
|
32
|
-
> - ALL Skill executions MUST go through `dispatch-to-worker` action
|
|
33
|
-
> - Worker Agent (`speccrew-task-worker`) receives the Skill name and context, then executes the Skill
|
|
34
|
-
>
|
|
35
|
-
> **Step 3**: Execute ALL blocks sequentially without pausing (only stop at explicit `<event action="user-confirm">` blocks)
|
|
36
|
-
|
|
37
|
-
# Product Manager Orchestration (v2.0)
|
|
38
|
-
|
|
39
|
-
Pure routing layer orchestration skill, responsible for:
|
|
40
|
-
|
|
41
|
-
1. **Workflow Initialization** - Phase 0 initialization and returning resume target
|
|
42
|
-
2. **Resume Routing** - Jump to the correct Phase based on `resume_target`
|
|
43
|
-
3. **Phase Dispatch** - Each Phase has only one `dispatch-to-worker` call
|
|
44
|
-
4. **User Confirmation Gates** - Mandatory user confirmation gates for Phase 3 and Phase 4a
|
|
45
|
-
|
|
46
|
-
## Architecture: Pure Routing Layer
|
|
47
|
-
|
|
48
|
-
This Skill is a **pure routing layer**, all business logic is executed by independent Phase Skills:
|
|
49
|
-
|
|
50
|
-
| Phase | Block ID | Skill | Purpose |
|
|
51
|
-
|-------|----------|-------|---------|
|
|
52
|
-
| Phase 0 | P0 | `speccrew-pm-phase0-init` | Workflow initialization, iteration directory creation/locating, resume state detection |
|
|
53
|
-
| Phase 1 | P1 | `speccrew-pm-phase1-knowledge-check` | Knowledge base status detection, module matching, knowledge initialization |
|
|
54
|
-
| Phase 2 | P2 | `speccrew-pm-phase2-complexity-assess` | Complexity assessment, simple/complex path decision |
|
|
55
|
-
| Phase 3 | P3 | `speccrew-pm-requirement-clarify` | Requirement clarification, Q&A collection |
|
|
56
|
-
| Phase 4 Simple | P4-SIMPLE | `speccrew-pm-requirement-simple` | Simple requirements: single PRD generation |
|
|
57
|
-
| Phase 4a | P4A | `speccrew-pm-requirement-model` | Complex requirements: ISA-95 modeling |
|
|
58
|
-
| Phase 4b | P4B | `speccrew-pm-requirement-analysis` | Complex requirements: Master PRD generation |
|
|
59
|
-
| Phase 5 | P5 | `speccrew-pm-phase5-subprd-dispatch` | Sub-PRD Worker dispatch |
|
|
60
|
-
| Phase 6 | P6 | `speccrew-pm-phase6-verify-confirm` | Verification checklist, user review, final confirmation |
|
|
61
|
-
|
|
62
|
-
## User Confirmation Gates (MANDATORY)
|
|
63
|
-
|
|
64
|
-
There are **mandatory user confirmation gates** after Phase 3 and Phase 4a:
|
|
65
|
-
|
|
66
|
-
### R-CONFIRM Rule Block
|
|
67
|
-
|
|
68
|
-
```xml
|
|
69
|
-
<block type="rule" id="R-CONFIRM" level="mandatory" desc="User confirmation is MANDATORY">
|
|
70
|
-
<field name="text">MANDATORY: After each phase completes, you MUST wait for EXPLICIT user confirmation.</field>
|
|
71
|
-
<field name="text">DO NOT mark checkpoint as passed by yourself. DO NOT skip user confirmation.</field>
|
|
72
|
-
<field name="text">The checkpoint write-checkpoint command MUST ONLY be executed AFTER user confirms.</field>
|
|
73
|
-
</block>
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### user-confirm Event Block
|
|
77
|
-
|
|
78
|
-
```xml
|
|
79
|
-
<block type="event" id="P3-CONFIRM" action="user-confirm" desc="User confirmation required">
|
|
80
|
-
<field name="prompt">📋 Phase Complete. Please review and confirm.</field>
|
|
81
|
-
<field name="skippable" value="false"/>
|
|
82
|
-
</block>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**Key Points:**
|
|
86
|
-
- `action="user-confirm"` — Must wait for explicit user confirmation
|
|
87
|
-
- `skippable="false"` — Cannot be skipped
|
|
88
|
-
- Checkpoint write **MUST** be executed after user confirmation
|
|
89
|
-
|
|
90
|
-
## Resume Router
|
|
91
|
-
|
|
92
|
-
Phase 0 outputs `resume_target` to control resume routing:
|
|
93
|
-
|
|
94
|
-
| resume_target | Target Block | Description |
|
|
95
|
-
|---------------|--------------|-------------|
|
|
96
|
-
| `PHASE_1_KNOWLEDGE_CHECK` | P1 | Start from knowledge base check |
|
|
97
|
-
| `PHASE_3_USER_CONFIRMATION` | P3-CONFIRM | Resume to Phase 3 confirmation gate |
|
|
98
|
-
| `PHASE_4_PRD_SIMPLE` | P4-SIMPLE | Simple path PRD generation |
|
|
99
|
-
| `PHASE_4A_MODEL` | P4A | Complex path modeling |
|
|
100
|
-
| `PHASE_4A_CONFIRMATION` | P4A-CONFIRM | Resume to Phase 4a confirmation gate |
|
|
101
|
-
| `PHASE_4B_PRD_GENERATION` | P4B | Master PRD generation |
|
|
102
|
-
| `PHASE_5_SUBPRD_DISPATCH` | P5 | Sub-PRD dispatch |
|
|
103
|
-
| `PHASE_6_VERIFICATION` | P6 | Verification and confirmation |
|
|
104
|
-
|
|
105
|
-
## Invocation Method
|
|
106
|
-
|
|
107
|
-
**CRITICAL**: This skill is loaded directly by Product Manager Agent — do NOT invoke via Worker Agent.
|
|
108
|
-
|
|
109
|
-
```xml
|
|
110
|
-
<block type="task" action="run-skill" desc="Product Manager orchestration workflow">
|
|
111
|
-
<field name="skill">speccrew-product-manager-orchestration</field>
|
|
112
|
-
</block>
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Input Parameters
|
|
116
|
-
|
|
117
|
-
| Parameter | Type | Required | Description |
|
|
118
|
-
|-----------|------|----------|-------------|
|
|
119
|
-
| `user_requirement` | string | Yes | User requirement description or requirement document path |
|
|
120
|
-
| `workspace_root` | string | Yes | speccrew-workspace root directory path |
|
|
121
|
-
| `source_path` | string | No | Project source code root directory (read from .speccrewrc) |
|
|
122
|
-
| `language` | string | No | User language (default auto-detect) |
|
|
123
|
-
|
|
124
|
-
## Output
|
|
125
|
-
|
|
126
|
-
- `status` - Execution status (success / partial / failed)
|
|
127
|
-
- `prd_files` - List of generated PRD files
|
|
128
|
-
- `feature_list` - Feature list file path
|
|
129
|
-
- `workflow_stage` - Current workflow stage status
|
|
130
|
-
- `next_agent` - Recommended next Agent
|
|
131
|
-
|
|
132
|
-
---
|
|
9
|
+
- Product Manager Agent starts the PRD workflow for a new user requirement
|
|
10
|
+
- User submits a requirement and needs PRD generation
|
|
11
|
+
- Workflow resume after Phase checkpoint (resume_target routing)
|
|
133
12
|
|
|
134
13
|
## AgentFlow Definition
|
|
135
14
|
|
|
136
15
|
<!-- @agentflow: SKILL.xml -->
|
|
137
16
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
## CONTINUOUS EXECUTION RULES
|
|
141
|
-
|
|
142
|
-
This skill MUST execute tasks continuously without unnecessary interruptions.
|
|
143
|
-
|
|
144
|
-
### FORBIDDEN Interruptions
|
|
145
|
-
|
|
146
|
-
1. DO NOT ask user "Should I continue?" after completing a subtask
|
|
147
|
-
2. DO NOT suggest "Let me split this into batches" or "Let's do this in parts"
|
|
148
|
-
3. DO NOT pause to list what you plan to do next — just do it
|
|
149
|
-
4. DO NOT ask for confirmation before generating output files
|
|
150
|
-
5. DO NOT warn about "large number of files" — proceed with generation
|
|
151
|
-
6. DO NOT offer "Should I proceed with the remaining items?"
|
|
152
|
-
|
|
153
|
-
### When to Pause (ONLY these cases)
|
|
154
|
-
|
|
155
|
-
1. **User Confirmation Gates** — `action="user-confirm"` blocks (Phase 3, Phase 4a)
|
|
156
|
-
2. Ambiguous requirements that genuinely need clarification
|
|
157
|
-
3. Unrecoverable errors that prevent further progress
|
|
158
|
-
4. Security-sensitive operations (e.g., deleting existing files)
|
|
159
|
-
|
|
160
|
-
### Orchestrator Principle (v2.0)
|
|
161
|
-
|
|
162
|
-
This agent is a **pure router/dispatcher**. Key constraints:
|
|
163
|
-
|
|
164
|
-
| Phase | Skill | ORCHESTRATOR Rule |
|
|
165
|
-
|-------|-------|-------------------|
|
|
166
|
-
| Phase 0 | `speccrew-pm-phase0-init` | Route to correct Phase based on resume_target |
|
|
167
|
-
| Phase 1-6 | All Phase Skills | DO NOT execute logic yourself — Dispatch Worker |
|
|
168
|
-
|
|
169
|
-
**UNIVERSAL DISPATCH RULE:**
|
|
170
|
-
- PM Agent NEVER invokes Skills directly via `action="run-skill"`
|
|
171
|
-
- ALL Skill invocations use `action="dispatch-to-worker"` with `speccrew-task-worker`
|
|
172
|
-
- Worker Agent receives the Skill name in context and executes it
|
|
173
|
-
|
|
174
|
-
**UNIVERSAL ABORT RULE:**
|
|
175
|
-
- IF ANY skill fails → STOP and report to user
|
|
176
|
-
- DO NOT generate content as fallback
|
|
177
|
-
- DO NOT proceed to next phase
|
|
17
|
+
> **REQUIRED**: Before executing this workflow, read the XML workflow specification: speccrew-workspace/docs/rules/agentflow-spec.md
|
|
18
|
+
> Then read and execute the XML workflow in SKILL.xml block-by-block as the authoritative execution plan.
|