speccrew 0.6.12 → 0.6.13

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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: speccrew-feature-designer
3
3
  description: SpecCrew Feature Designer. Reads confirmed PRD documents, transforms user requirement scenarios into system feature specifications, including frontend prototypes, interaction flows, backend interface logic, and data model design. Does not focus on specific technology implementation details, but outlines how to implement user requirements at a functional level. Trigger scenarios: after PRD manual confirmation passes, user requests to start feature design.
4
- tools: Read, Write, Glob, Grep, Bash
4
+ tools: Read, Write, Glob, Grep, Bash, Agent
5
5
  ---
6
6
 
7
7
  # Role Positioning
@@ -305,8 +305,8 @@ Feature inventory exists but detailed analysis may be incomplete.
305
305
  - agent: speccrew-task-worker
306
306
  - task: Execute speccrew-pm-module-matcher skill
307
307
  - context:
308
- skill: speccrew-pm-module-matcher
309
- sync_state_bizs_dir: {sync_state_bizs_dir}
308
+ skill: speccrew-pm-module-matcher
309
+ sync_state_bizs_dir: {sync_state_bizs_dir}
310
310
  ```
311
311
 
312
312
  2. **Worker returns** matched modules with confidence levels
@@ -329,12 +329,8 @@ Feature inventory exists but detailed analysis may be incomplete.
329
329
  ```
330
330
 
331
331
  4. **IF user confirms initialization**:
332
- - For each matched module with confidence >= medium:
333
- - **Dispatch Worker** with `speccrew-pm-module-initializer` skill
334
- - Workers execute in parallel (one per module)
335
- - Wait for all Workers to complete
336
- - Collect initialization summaries as system context
337
- - Proceed to Phase 2
332
+ - Execute Path B Steps 1-5 (see "MANDATORY -- Path C -> Path B Sequence" section below)
333
+ - After all Steps complete, proceed to Phase 2
338
334
 
339
335
  5. **IF user declines**:
340
336
  - Use features-*.json metadata as lightweight system context (module names + feature counts only)
@@ -409,51 +405,95 @@ No knowledge base exists. A lightweight feature inventory scan is triggered to d
409
405
  - If status is now "lite" → **Execute Path B immediately** (see MANDATORY instruction below)
410
406
  - If status is still "none" → Initialization failed, proceed to Step 4
411
407
 
412
- > 🛑 **MANDATORY Path C Path B Sequence**:
408
+ > 🛑 **MANDATORY -- Path C -> Path B Sequence**:
413
409
  > After init-features completes (features-*.json generated), you MUST immediately execute Path B:
414
- > 1. Dispatch Worker with `speccrew-pm-module-matcher` skill to match requirement features against the generated features inventory
415
- > 2. Based on matcher results, dispatch Worker with `speccrew-pm-module-initializer` skill to deep-initialize matched modules' knowledge base
416
- > 3. Only after module initialization completes, proceed to Phase 2 (Requirement Clarification)
417
410
  >
418
- > DO NOT skip Path B. DO NOT proceed directly to Phase 2 after Path C.
419
- > The features-*.json files are INPUT for Path B's matcher, not the final output of Phase 1.
420
-
421
- **Agent Tool Invocation for Path B Step 1 (Matcher)**:
422
- ```
423
- Use the Agent tool to invoke speccrew-task-worker:
424
- - agent: speccrew-task-worker
425
- - task: Execute speccrew-pm-module-matcher skill
426
- - context:
427
- skill: speccrew-pm-module-matcher
428
- sync_state_bizs_dir: {sync_state_bizs_dir}
429
- requirement_summary: <brief summary of user's requirement>
430
- ```
431
-
432
- **Agent Tool Invocation for Path B Step 2 (Module Initializer)**:
433
-
434
- > 🛑 **MANDATORY**: You MUST dispatch a separate Worker for EACH module in matched_modules.
435
- > Each Worker handles ONE module on ONE platform.
436
-
437
- For each module in matched_modules:
438
- ```
439
- Use the Agent tool to invoke speccrew-task-worker:
440
- - agent: speccrew-task-worker
441
- - task: Execute speccrew-pm-module-initializer skill for module "{module.module_name}" on platform "{module.platform_id}"
442
- - context:
443
- skill: speccrew-pm-module-initializer
444
- source_path: {source_path}
445
- module_name: {module.module_name}
446
- platform_id: {module.platform_id}
447
- platform_type: {module.platform_type}
448
- features_file: {sync_state_bizs_dir}/features-{module.platform_id}.json
449
- output_path: {workspace_path}/knowledges
450
- completed_dir: {sync_state_bizs_dir}/completed
451
- sourceFile: features-{module.platform_id}.json
452
- language: {detected user language}
453
- workspace_path: {workspace_path}
454
- ```
455
-
456
- Wait for ALL module-initializer Workers to complete before proceeding to Phase 2.
411
+ > **Path B Step 1: Module Matching**
412
+ > Dispatch Worker with `speccrew-pm-module-matcher` skill to match requirement features against the generated features inventory.
413
+ >
414
+ > **Agent Tool Invocation for Path B Step 1 (Matcher)**:
415
+ > ```
416
+ > Use the Agent tool to invoke speccrew-task-worker:
417
+ > - agent: speccrew-task-worker
418
+ > - task: Execute speccrew-pm-module-matcher skill
419
+ > - context:
420
+ > skill: speccrew-pm-module-matcher
421
+ > sync_state_bizs_dir: {sync_state_bizs_dir}
422
+ > requirement_summary: <brief summary of user's requirement>
423
+ > ```
424
+ >
425
+ > **Path B Step 2: Generate Analyze Task Plan**
426
+ > For EACH matched module, dispatch Worker with `speccrew-pm-module-initializer` skill.
427
+ > This Worker will output a task plan JSON (list of features to analyze + analyzer parameters).
428
+ >
429
+ > **Agent Tool Invocation for Path B Step 2 (Module Initializer)**:
430
+ > ```
431
+ > Use the Agent tool to invoke speccrew-task-worker:
432
+ > - agent: speccrew-task-worker
433
+ > - task: Execute speccrew-pm-module-initializer skill for module "{module.module_name}" on platform "{module.platform_id}"
434
+ > - context:
435
+ > skill: speccrew-pm-module-initializer
436
+ > source_path: {source_path}
437
+ > module_name: {module.module_name}
438
+ > platform_id: {module.platform_id}
439
+ > platform_type: {module.platform_type}
440
+ > platform_subtype: {module.platform_subtype}
441
+ > tech_stack: {module.tech_stack}
442
+ > features_file: {sync_state_bizs_dir}/features-{module.platform_id}.json
443
+ > output_path: {workspace_path}/knowledges
444
+ > completed_dir: {sync_state_bizs_dir}/completed
445
+ > sourceFile: features-{module.platform_id}.json
446
+ > language: {detected user language}
447
+ > workspace_path: {workspace_path}
448
+ > ```
449
+ >
450
+ > Wait for ALL module-initializer Workers to complete. Collect all task plan JSON outputs.
451
+ >
452
+ > **Path B Step 3: Execute Feature Analysis**
453
+ > Based on the task plans from Step 2, dispatch Worker for EACH pending feature.
454
+ >
455
+ > For backend features: dispatch Worker with `speccrew-knowledge-bizs-api-analyze` skill
456
+ > For web/mobile/desktop features: dispatch Worker with `speccrew-knowledge-bizs-ui-analyze` skill
457
+ >
458
+ > **Agent Tool Invocation for each feature**:
459
+ > ```
460
+ > Use the Agent tool to invoke speccrew-task-worker:
461
+ > - agent: speccrew-task-worker
462
+ > - task: Execute {analyzer_skill} for feature "{fileName}"
463
+ > - context:
464
+ > skill: {analyzer_skill}
465
+ > fileName: {task.fileName}
466
+ > sourcePath: {source_path}/{task.sourcePath}
467
+ > documentPath: {workspace_path}/{task.documentPath}
468
+ > module: {task.module}
469
+ > analyzed: false
470
+ > platform_type: {task.platform_type}
471
+ > platform_subtype: {task.platform_subtype}
472
+ > tech_stack: {task.tech_stack}
473
+ > language: {language}
474
+ > completed_dir: {sync_state_bizs_dir}/completed
475
+ > sourceFile: features-{platform_id}.json
476
+ > ```
477
+ >
478
+ > Wait for ALL analyze Workers to complete.
479
+ >
480
+ > **Path B Step 4: Generate Module Summaries**
481
+ > For each matched module, dispatch Worker with `speccrew-knowledge-module-summarize` skill:
482
+ > ```
483
+ > Use the Agent tool to invoke speccrew-task-worker:
484
+ > - agent: speccrew-task-worker
485
+ > - task: Execute speccrew-knowledge-module-summarize for module "{module_name}"
486
+ > - context:
487
+ > skill: speccrew-knowledge-module-summarize
488
+ > module_name: {module_name}
489
+ > module_path: {workspace_path}/knowledges/bizs/{platform_id}/{module_name}
490
+ > language: {language}
491
+ > ```
492
+ >
493
+ > **Path B Step 5: Update Features Status**
494
+ > After all analyze Workers complete, update each analyzed feature's `analyzed` field to `true` in the corresponding features-*.json file.
495
+ >
496
+ > Only after ALL Steps complete, proceed to Phase 2 (Requirement Clarification).
457
497
 
458
498
  4. **IF feature inventory fails**:
459
499
  - Report to user: "Project structure scan encountered issues: [specific error]. Continuing without knowledge base context."
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: speccrew-system-designer
3
3
  description: SpecCrew System Designer. Reads confirmed Feature Spec and API Contract documents, loads technology knowledge base (techs), evaluates framework needs, and dispatches per-platform detailed design skills to generate system design documents that add technology-specific implementation details to the feature specification skeleton. Supports web, mobile, and desktop platforms. Trigger scenarios: after Feature Spec and API Contract are confirmed, user requests system design.
4
- tools: Read, Write, Glob, Grep, Bash
4
+ tools: Read, Write, Glob, Grep, Bash, Agent
5
5
  ---
6
6
 
7
7
  # Role Positioning
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: speccrew-system-developer
3
3
  description: SpecCrew System Developer. Reads system design blueprints and coordinates cross-platform development task dispatch. Loads techs knowledge, verifies environment readiness, dispatches per-platform dev skills, performs integration checks, and delivers development completion reports. Supports web, mobile, desktop, and backend platforms.
4
- tools: Read, Write, Glob, Grep, Bash
4
+ tools: Read, Write, Glob, Grep, Bash, Agent
5
5
  ---
6
6
 
7
7
  # Quick Reference — Execution Flow
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: speccrew-team-leader
3
3
  description: SpecCrew team leader, entry-point scheduling Agent for AI engineering implementation. Identifies user intent and invokes corresponding Skill to execute. Trigger scenarios: project initialization, Agent optimization, Skill development, workflow diagnosis, knowledge base sync, AI collaboration system consultation. Business development requests (feature requirements, code modifications, bug fixes) are NOT within this Agent's scope. Use proactively when users mention AI engineering workflows, agent configuration, or project infrastructure.
4
- tools: Read, Write, Glob, Grep, Bash
4
+ tools: Read, Write, Glob, Grep, Bash, Agent
5
5
  ---
6
6
 
7
7
  # Quick Reference — Execution Flow
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: speccrew-test-manager
3
3
  description: SpecCrew Test Manager. Orchestrates three-phase testing workflow: test case design, test code generation, and test execution with bug reporting. Reads feature specs, API contracts, and system design documents to coordinate comprehensive system testing. Trigger scenarios: after development phase completes, user requests to start testing.
4
- tools: Read, Write, Glob, Grep, Bash
4
+ tools: Read, Write, Glob, Grep, Bash, Agent
5
5
  ---
6
6
 
7
7
  # Role Positioning
@@ -19,17 +19,17 @@ Stage 1: Feature Inventory Init
19
19
  └─ 1b: Merge features
20
20
  └─ 1c: Validate inventory
21
21
 
22
- Stage 2: Feature Analysis (PARALLEL)
23
- └─ Dispatch api-analyze + ui-analyze workers per platform
24
- └─ After each analyze worker completes → dispatch corresponding graph worker
22
+ Stage 2: Feature Analysis (Task Preparation)
23
+ └─ Prepare api-analyze + ui-analyze task specifications per platform
24
+ └─ After analyze completes → prepare corresponding graph worker task specification
25
25
  └─ Monitor completion markers
26
26
 
27
- Stage 3: Module Summarize (PARALLEL)
28
- └─ 3.0: module-summarize per module
29
- └─ 3.5: UI style extraction
27
+ Stage 3: Module Summarize (Task Preparation)
28
+ └─ 3.0: Prepare module-summarize task specifications per module
29
+ └─ 3.5: Prepare UI style extraction task specifications
30
30
 
31
- Stage 4: System Summary
32
- └─ system-summarize system-overview.md
31
+ Stage 4: System Summary (Task Preparation)
32
+ └─ Prepare system-summarize task specification
33
33
  ```
34
34
 
35
35
  ## Language Adaptation
@@ -102,19 +102,19 @@ STAGE 1: Feature Inventory
102
102
  STAGE 2: Feature Analysis (REPEAT until all features processed)
103
103
  Step 0: Ensure completed_dir exists
104
104
  Step 1: Get next batch of pending features
105
- Step 2: Launch parallel Workers (API or UI analysis)
105
+ Step 2: Prepare analysis task specifications (API or UI analysis)
106
106
  Step 3: Process batch results, update features.json, write graph
107
107
 
108
- STAGE 3: Module Summarize (parallel per module)
108
+ STAGE 3: Module Summarize (task preparation per module)
109
109
  FOR each module:
110
- Launch Worker with module-summarize skill
110
+ Prepare module-summarize task specification
111
111
 
112
- STAGE 3.5: UI Style Pattern Extract (parallel per frontend platform)
112
+ STAGE 3.5: UI Style Pattern Extract (task preparation per frontend platform)
113
113
  FOR each frontend platform:
114
- Launch Worker with ui-style-extract skill
114
+ Prepare ui-style-extract task specification
115
115
 
116
- STAGE 4: System Summary
117
- Launch Worker with system-summarize skill
116
+ STAGE 4: System Summary (task preparation)
117
+ Prepare system-summarize task specification
118
118
 
119
119
  OUTPUT: system-overview.md, graph data, module overviews
120
120
  ```
@@ -343,9 +343,9 @@ flowchart TB
343
343
 
344
344
  ## Stage 2: Feature Analysis (Batch Processing)
345
345
 
346
- **Overview**: Process all pending features in batches. Each batch gets a set of features, launches Worker Agents to analyze them, then processes the results.
346
+ **Overview**: Process all pending features in batches. Each batch gets a set of features, prepares task specifications for Worker Agents to analyze them, then processes the results.
347
347
 
348
- > **Script execution rule**: All script calls in Stage 2 are executed **directly by the dispatch agent** via `run_in_terminal`. Only the analysis tasks are delegated to Worker Agents.
348
+ > **Script execution rule**: All script calls in Stage 2 are executed **directly by the dispatch agent** via `run_in_terminal`. Task specifications are prepared by this Skill; Worker dispatch is handled by the calling Agent (Team Leader).
349
349
 
350
350
  **Skill Routing Table (by platformType):**
351
351
 
@@ -364,7 +364,7 @@ Repeat the following 3 steps until all features are processed:
364
364
 
365
365
  **Step 0: Ensure completed directory exists (MANDATORY)**
366
366
 
367
- Before launching any Workers, you MUST create the `completed_dir` directory using Node.js (cross-platform compatible):
367
+ Before any Workers are dispatched by the calling Agent, you MUST ensure the `completed_dir` directory exists using Node.js (cross-platform compatible):
368
368
 
369
369
  ```bash
370
370
  node -e "require('fs').mkdirSync('{completed_dir}', {recursive: true}); console.log('completed dir ready')"
@@ -386,31 +386,35 @@ node -e "require('fs').mkdirSync('{completed_dir}', {recursive: true}); console.
386
386
  - If output `action` is `"done"` → All features processed. Exit Stage 2, proceed to Stage 3.
387
387
  - If output `action` is `"process"` → The `batch` array contains features to analyze. Proceed to Step 2.
388
388
 
389
- **Step 2: Launch Workers MUST BE PARALLEL**
389
+ **Step 2: Prepare Analysis Task Specifications**
390
390
 
391
- ⚠️ **CRITICAL**: You MUST launch ALL features in the current batch SIMULTANEOUSLY as parallel Worker Tasks. **FORBIDDEN**: sequential launch (start one Worker, wait, then start next).
391
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
392
392
 
393
- For each feature in the `batch` array, prepare a Worker Task:
393
+ For each feature in the `batch` array, prepare a task specification:
394
394
  - **Select skill** using the routing table at Stage 2 start
395
- - **Worker parameters**: Pass all feature fields plus `language`, `completed_dir`, `sourceFile`, `skill_path`
396
- - **Behavior constraint**: Worker MUST NOT create any temporary scripts. If execution fails, STOP and report error.
395
+ - **Task parameters**: Prepare all feature fields plus `language`, `completed_dir`, `sourceFile`, `skill_path`
396
+ - **Behavior constraint**: Workers MUST NOT create any temporary scripts
397
397
 
398
- **Execution sequence**:
399
- 1. Prepare ALL Worker Tasks first (do NOT launch yet)
400
- 2. Launch ALL Workers at the SAME TIME in a single batch dispatch
401
- 3. Wait for ALL Workers to complete before proceeding to Step 2.5
398
+ **Task Preparation sequence**:
399
+ 1. Prepare ALL task specifications for the current batch
400
+ 2. Output the task specifications to the calling Agent
401
+ 3. The calling Agent will dispatch Workers based on these specifications
402
402
  4. Each Worker writes `.done` and `.graph.json` marker files to `completed_dir` upon completion
403
403
 
404
- **Step 2.5: Launch Graph Workers PARALLEL per Completed Analyze Worker**
404
+ > **NOTE**: This Skill does NOT dispatch analyze workers. The calling Agent (Team Leader) dispatches workers based on the prepared task specifications.
405
405
 
406
- After each analyze worker completes (writes `.done.json` marker), immediately dispatch the corresponding graph worker:
406
+ **Step 2.5: Graph Worker Task Preparation**
407
+
408
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
409
+
410
+ After each analyze worker completes (writes `.done.json` marker), the calling Agent will dispatch the corresponding graph worker. This Skill prepares the task specifications:
407
411
 
408
412
  | Analyze Worker | Graph Worker | Input |
409
413
  |----------------|--------------|-------|
410
414
  | `speccrew-knowledge-bizs-api-analyze` | `speccrew-knowledge-bizs-api-graph` | `documentPath` from analyze output |
411
415
  | `speccrew-knowledge-bizs-ui-analyze` | `speccrew-knowledge-bizs-ui-graph` | `documentPath` from analyze output |
412
416
 
413
- **Graph Worker Task Prompt Format**:
417
+ **Graph Worker Task Specification Format**:
414
418
 
415
419
  **For API Graph Worker**:
416
420
  ```json
@@ -457,14 +461,14 @@ After each analyze worker completes (writes `.done.json` marker), immediately di
457
461
  }
458
462
  ```
459
463
 
460
- **Execution sequence**:
464
+ **Task Preparation Sequence**:
461
465
  1. Scan `completed_dir` for new `.done.json` files from Step 2
462
- 2. For each completed analyze worker, prepare corresponding graph worker task
463
- 3. Launch ALL graph workers for the current batch in PARALLEL
464
- 4. Wait for ALL graph workers to complete
465
- 5. Each graph worker writes `.graph-done.json` marker to `completed_dir`
466
+ 2. For each completed analyze worker, prepare corresponding graph worker task specification
467
+ 3. Output the task specifications to the calling Agent
468
+ 4. The calling Agent will dispatch graph workers based on these specifications
469
+ 5. Each graph worker writes `.graph-done.json` marker to `completed_dir` upon completion
466
470
 
467
- Example: If batch has 5 features create and launch 5 Worker Tasks simultaneously, NOT one by one.
471
+ > **NOTE**: This Skill does NOT dispatch graph workers. The calling Agent (Team Leader) scans for `.done.json` markers and dispatches corresponding graph workers.
468
472
 
469
473
  **Worker Task Prompt Format**:
470
474
 
@@ -699,7 +703,7 @@ Dispatch 采用完全无状态的文件驱动设计。如果执行过程中发
699
703
  When dealing with modules containing more than **20 features**, consider the following:
700
704
 
701
705
  - **Single Agent Limit**: A single Worker Agent can reliably process ~20 features per session due to context window constraints. Beyond this, context degradation may cause incomplete document generation.
702
- - **Multi-Worker Strategy**: For modules with >20 features, dispatch multiple Worker Agents in parallel, each handling a non-overlapping subset of features (e.g., by batch index range).
706
+ - **Multi-Worker Strategy**: For modules with >20 features, the calling Agent should dispatch multiple Worker Agents in parallel, each handling a non-overlapping subset of features (e.g., by batch index range).
703
707
  - **Resume Support**: The `get-next-batch` script naturally supports resume across sessions — it skips features that already have `.done` files. To resume after a session break, simply restart the Stage 2 loop.
704
708
  - **Validation After Completion**: After all features are marked `analyzed=true`, run `process-batch-results` with `--validateDocs --syncStatePath "{sync_state_path}"` to verify document completeness.
705
709
 
@@ -707,49 +711,53 @@ When dealing with modules containing more than **20 features**, consider the fol
707
711
 
708
712
  ---
709
713
 
710
- ## Stage 3: Module Summarize (Parallel)
714
+ ## Stage 3: Module Summarize (Task Preparation)
711
715
 
712
- **Goal**: Complete each module overview based on feature details.
716
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
717
+
718
+ **Goal**: Prepare task specifications for each module overview based on feature details.
713
719
 
714
720
  **Prerequisite**: Stage 2 completed for the module (in full or incremental mode).
715
721
 
716
722
  **Action (full mode)**:
717
723
  - Read all `features-{platform}.json` files from `{sync_state_bizs_dir}/`
718
724
  - For each platform, group features by `module` to identify unique modules
719
- - For each module, invoke 1 Worker Agent (`speccrew-task-worker.md`) with `skill_name: speccrew-knowledge-module-summarize`
720
- - Parameters to pass to skill:
725
+ - For each module, prepare a task specification for `skill_name: speccrew-knowledge-module-summarize`
726
+ - Parameters to include in task specification:
721
727
  - `module_name`: Module code_name
722
728
  - `module_path`: Path to module directory (e.g., `{workspace_path}/knowledges/bizs/{platform_id}/{module_name}/`)
723
729
  - `workspace_path`: Absolute path to speccrew-workspace directory — **REQUIRED**
724
730
  - `sync_state_bizs_dir`: Absolute path to sync-state/knowledge-bizs directory — **REQUIRED**
725
731
  - `language`: User's language — **REQUIRED**
726
- - **Behavior constraint**: Worker MUST NOT create any temporary scripts or workaround files. If execution fails, STOP and report error immediately.
727
-
728
- Expected Worker Return: `{ "status": "success|failed", "module_name": "...", "output_file": "...-overview.md", "message": "..." }`
732
+ - **Behavior constraint**: Workers MUST NOT create any temporary scripts or workaround files
729
733
 
730
734
  **Action (incremental mode)**:
731
735
  - Reuse module status from Stage 2 (NEW / CHANGED / DELETED / UNMODIFIED).
732
- - Only dispatch Workers for modules with status **NEW** or **CHANGED**.
736
+ - Only prepare task specifications for modules with status **NEW** or **CHANGED**.
733
737
 
734
- **Parallel Tasks** (grouped by platform):
738
+ **Task Specifications** (grouped by platform):
735
739
  ```
736
740
  Platform: Web Frontend (web)
737
- Worker 1: module="order", module_path="speccrew-workspace/knowledges/bizs/web/order/"
738
- Worker 2: module="payment", module_path="speccrew-workspace/knowledges/bizs/web/payment/"
741
+ Task 1: module="order", module_path="speccrew-workspace/knowledges/bizs/web/order/"
742
+ Task 2: module="payment", module_path="speccrew-workspace/knowledges/bizs/web/payment/"
739
743
 
740
744
  Platform: Mobile App (mobile-flutter)
741
- Worker 3: module="order", module_path="speccrew-workspace/knowledges/bizs/mobile-flutter/order/"
742
- Worker 4: module="payment", module_path="speccrew-workspace/knowledges/bizs/mobile-flutter/payment/"
745
+ Task 3: module="order", module_path="speccrew-workspace/knowledges/bizs/mobile-flutter/order/"
746
+ Task 4: module="payment", module_path="speccrew-workspace/knowledges/bizs/mobile-flutter/payment/"
743
747
  ```
744
748
 
749
+ > **NOTE**: This Skill does NOT dispatch module summarize workers. The calling Agent (Team Leader) dispatches workers based on the prepared task specifications.
750
+
745
751
  **Output per Module**:
746
752
  - `{{module_name}}-overview.md` (complete version)
747
753
 
748
754
  ---
749
755
 
750
- ## Stage 3.5: UI Style Pattern Extract (Parallel by Platform)
756
+ ## Stage 3.5: UI Style Pattern Extract (Task Preparation)
757
+
758
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
751
759
 
752
- **Goal**: Extract UI design patterns (page types, component patterns, layout patterns) from analyzed feature documents, aggregating cross-module patterns and outputting to the techs knowledge base `ui-style-patterns/` directory.
760
+ **Goal**: Prepare task specifications for extracting UI design patterns (page types, component patterns, layout patterns) from analyzed feature documents.
753
761
 
754
762
  **Prerequisite**: All Stage 3 tasks completed.
755
763
 
@@ -761,8 +769,8 @@ Platform: Mobile App (mobile-flutter)
761
769
  - Read all `features-{platform}.json` files from `{sync_state_bizs_dir}/`
762
770
  - Filter platforms where platformType is web/mobile/desktop
763
771
  - Determine platform_id (format: `{platformType}-{platformSubtype}`, e.g., `web-vue`, `mobile-uniapp`, `backend-system`)
764
- - For each qualifying platform, launch 1 Worker Agent (`speccrew-task-worker`) with `skill_name: speccrew-knowledge-bizs-ui-style-extract`
765
- - Parameters to pass:
772
+ - For each qualifying platform, prepare a task specification for `skill_name: speccrew-knowledge-bizs-ui-style-extract`
773
+ - Parameters to include in task specification:
766
774
  - `platform_id`: Platform identifier
767
775
  - `platform_type`: Platform type
768
776
  - `feature_docs_path`: Feature document base path for that platform (e.g., `{workspace_path}/knowledges/bizs/{platform_id}`)
@@ -772,7 +780,7 @@ Platform: Mobile App (mobile-flutter)
772
780
  - `workspace_path`: Absolute path to speccrew-workspace directory — **REQUIRED**
773
781
  - `sync_state_bizs_dir`: Absolute path to sync-state/knowledge-bizs directory — **REQUIRED**
774
782
  - `language`: User's language
775
- - **Behavior constraint**: Worker MUST NOT create any temporary scripts or workaround files. If execution fails, STOP and report error immediately.
783
+ - **Behavior constraint**: Workers MUST NOT create any temporary scripts or workaround files
776
784
 
777
785
  **Cross-Pipeline Output**:
778
786
  - This stage writes to techs knowledge base, not bizs knowledge base
@@ -780,7 +788,9 @@ Platform: Mobile App (mobile-flutter)
780
788
  - Subdirectories: `page-types/`, `components/`, `layouts/`
781
789
  - `ui-style-guide.md` and `styles/` are managed by techs pipeline, this stage does not modify them
782
790
 
783
- **Parallel Tasks**: One Worker per frontend platform, can execute in parallel.
791
+ **Task Specifications**: One task specification per frontend platform.
792
+
793
+ > **NOTE**: This Skill does NOT dispatch UI style extract workers. The calling Agent (Team Leader) dispatches workers based on the prepared task specifications.
784
794
 
785
795
  **Output per Platform**:
786
796
  ```
@@ -797,24 +807,26 @@ Platform: Mobile App (mobile-flutter)
797
807
 
798
808
  ---
799
809
 
800
- ## Stage 4: System Summarize (Single Task)
810
+ ## Stage 4: System Summarize (Task Preparation)
811
+
812
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
801
813
 
802
- **Goal**: Generate complete system-overview.md aggregating all platforms and modules.
814
+ **Goal**: Prepare task specification for generating complete system-overview.md aggregating all platforms and modules.
803
815
 
804
816
  **Prerequisite**: All Stage 3 tasks completed.
805
817
 
806
818
  **Action**:
807
819
  - Read all `features-{platform}.json` files from `{sync_state_bizs_dir}/` to get platform structure
808
- - Invoke 1 Worker Agent (`speccrew-task-worker.md`) with `skill_name: speccrew-knowledge-system-summarize`
809
- - Parameters to pass to skill:
820
+ - Prepare a task specification for `skill_name: speccrew-knowledge-system-summarize`
821
+ - Parameters to include in task specification:
810
822
  - `modules_path`: Path to knowledge base directory containing all platform modules (e.g., `{workspace_path}/knowledges/bizs/`)
811
823
  - `output_path`: Output path for system-overview.md (e.g., `{workspace_path}/knowledges/bizs/`)
812
824
  - `workspace_path`: Absolute path to speccrew-workspace directory — **REQUIRED**
813
825
  - `sync_state_bizs_dir`: Absolute path to sync-state/knowledge-bizs directory — **REQUIRED**
814
826
  - `language`: User's language — **REQUIRED**
815
- - **Behavior constraint**: Worker MUST NOT create any temporary scripts or workaround files. If execution fails, STOP and report error immediately.
827
+ - **Behavior constraint**: Workers MUST NOT create any temporary scripts or workaround files
816
828
 
817
- Expected Worker Return: `{ "status": "success|failed", "output_file": "system-overview.md", "message": "..." }`
829
+ > **NOTE**: This Skill does NOT dispatch system summarize workers. The calling Agent (Team Leader) dispatches workers based on the prepared task specification.
818
830
 
819
831
  **Output**:
820
832
  - `{workspace_path}/knowledges/bizs/system-overview.md` (complete with platform index and module hierarchy)
@@ -62,7 +62,9 @@ For each platform detected in Step 1, identify business module entry directories
62
62
 
63
63
  **Option A: Invoke Skill (Recommended)**
64
64
 
65
- Dispatch Worker with `speccrew-knowledge-bizs-identify-entries` skill:
65
+ Execute `speccrew-knowledge-bizs-identify-entries` skill with the following parameters:
66
+
67
+ > **NOTE**: Worker dispatch is handled by the calling Agent. This Skill only specifies the parameters needed.
66
68
 
67
69
  | Parameter | Value |
68
70
  |-----------|-------|
@@ -71,7 +73,7 @@ Dispatch Worker with `speccrew-knowledge-bizs-identify-entries` skill:
71
73
  | `sync_state_bizs_dir` | `{sync_state_bizs_dir}` |
72
74
  | `configs_dir` | `{configs_dir}` |
73
75
 
74
- Worker generates `entry-dirs-{platform_id}.json` files in `{sync_state_bizs_dir}/`.
76
+ Expected output: `entry-dirs-{platform_id}.json` files in `{sync_state_bizs_dir}/`.
75
77
 
76
78
  **Option B: Direct Execution**
77
79
 
@@ -59,20 +59,22 @@ Stage 1: Platform Detection
59
59
  └─ Read techs-manifest.json → Identify platforms & tech stacks
60
60
 
61
61
  Stage 2: Tech Doc Generation (PARALLEL)
62
- └─ Dispatch techs-generate workers per platform
63
- └─ After each generate worker completesdispatch quality check worker
62
+ └─ Prepare task plans for techs-generate workers per platform
63
+ └─ After generate workers completeprepare quality check worker task plans
64
64
  └─ Monitor completion markers
65
65
 
66
66
  Stage 2.5: Completion Verification
67
67
  └─ Step A: Scan completion markers
68
68
  └─ Step B: Verify output integrity
69
- └─ Step C: Update dispatch progress
69
+ └─ Step C: Update progress status
70
70
 
71
71
  Stage 3: Root Index Generation
72
72
  └─ Generate techs/README.md root index
73
73
  └─ Cross-platform consistency check
74
74
  ```
75
75
 
76
+ > **NOTE**: All worker dispatch operations are handled by the calling Agent (Team Leader). This Skill only prepares task plans and monitors completion markers.
77
+
76
78
  ## Workflow Overview
77
79
 
78
80
  ```mermaid
@@ -90,10 +92,14 @@ flowchart TB
90
92
  **Step 1a: Read Configuration**
91
93
  - Read `speccrew-workspace/docs/configs/platform-mapping.json` for standardized platform mapping rules
92
94
 
93
- **Step 1b: Invoke Worker**
94
- - Invoke 1 Worker Agent (`speccrew-task-worker.md`) with skill `speccrew-knowledge-techs-init/SKILL.md`
95
- - Task: Analyze project structure, detect technology platforms
96
- - Parameters to pass to skill:
95
+ **Step 1b: Prepare Task Plan**
96
+
97
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
98
+
99
+ Prepare the following task for the calling Agent to dispatch:
100
+ - **Skill**: `speccrew-knowledge-techs-init/SKILL.md`
101
+ - **Task**: Analyze project structure, detect technology platforms
102
+ - **Parameters**:
97
103
  - `source_path`: Source code directory path
98
104
  - `output_path`: Output directory (default: `speccrew-workspace/knowledges/base/sync-state/knowledge-techs/`)
99
105
  - `language`: User's language — **REQUIRED**
@@ -108,11 +114,13 @@ See [Platform Status Tracking Fields](#platform-status-tracking-fields) for stat
108
114
  ---
109
115
 
110
116
  > **⚠️ MANDATORY RULES FOR PARALLEL EXECUTION (Stage 2)**:
111
- > 1. ALL platform workers MUST be dispatched in PARALLEL — sequential execution is FORBIDDEN
117
+ > 1. ALL platform task plans should be prepared for parallel dispatch by the calling Agent — sequential execution is NOT recommended
112
118
  > 2. Each platform worker runs independently via techs-generate Skill
113
119
  > 3. Monitor completion via marker files in each platform directory
114
120
  > 4. Failed workers can be retried independently
115
121
  > 5. Do NOT proceed to Stage 2.5 until ALL workers have completed or failed
122
+ >
123
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares task plans.
116
124
 
117
125
  ## Stage 2: Generate Platform Documents (Parallel)
118
126
 
@@ -120,21 +128,27 @@ See [Platform Status Tracking Fields](#platform-status-tracking-fields) for stat
120
128
 
121
129
  **Action**:
122
130
  - Read `speccrew-workspace/knowledges/base/sync-state/knowledge-techs/techs-manifest.json`
123
- - For each platform in `platforms` array, invoke 2 Worker Agents in PARALLEL:
124
- - Worker 1: `speccrew-knowledge-techs-generate-conventions/SKILL.md` (ALL platforms)
125
- - Worker 2: `speccrew-knowledge-techs-generate-ui-style/SKILL.md` (frontend platforms ONLY: web, mobile, desktop)
126
- - Parameters to pass to each skill:
127
- - `platform_id`: Platform identifier from manifest
128
- - `platform_type`: Platform type (web, mobile, backend, desktop)
129
- - `framework`: Primary framework
130
- - `source_path`: Platform source directory
131
- - `config_files`: List of configuration file paths (conventions worker only)
132
- - `convention_files`: List of convention file paths (conventions worker only)
133
- - `output_path`: Output directory for platform docs (e.g., `speccrew-workspace/knowledges/techs/{platform_id}/`)
134
- - `completed_dir`: Directory for Worker output markers (e.g., `speccrew-workspace/knowledges/techs/.sync-status/`)
135
- - `language`: User's language — **REQUIRED**
136
131
 
137
- When launching each platform Worker, the Workers will output:
132
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
133
+
134
+ **Prepare Task Plans for Each Platform**:
135
+
136
+ For each platform in `platforms` array, prepare tasks for parallel execution:
137
+ - **Task 1**: `speccrew-knowledge-techs-generate-conventions/SKILL.md` (ALL platforms)
138
+ - **Task 2**: `speccrew-knowledge-techs-generate-ui-style/SKILL.md` (frontend platforms ONLY: web, mobile, desktop)
139
+
140
+ **Parameters for each skill**:
141
+ - `platform_id`: Platform identifier from manifest
142
+ - `platform_type`: Platform type (web, mobile, backend, desktop)
143
+ - `framework`: Primary framework
144
+ - `source_path`: Platform source directory
145
+ - `config_files`: List of configuration file paths (conventions worker only)
146
+ - `convention_files`: List of convention file paths (conventions worker only)
147
+ - `output_path`: Output directory for platform docs (e.g., `speccrew-workspace/knowledges/techs/{platform_id}/`)
148
+ - `completed_dir`: Directory for Worker output markers (e.g., `speccrew-workspace/knowledges/techs/.sync-status/`)
149
+ - `language`: User's language — **REQUIRED**
150
+
151
+ **Expected Worker Output Markers**:
138
152
  - `{completed_dir}/{platform_id}.done-conventions.json` — conventions worker completion marker
139
153
  - `{completed_dir}/{platform_id}.done-ui-style.json` — ui-style worker completion marker (frontend only)
140
154
  - `{completed_dir}/{platform_id}.analysis-conventions.json` — conventions coverage report
@@ -150,9 +164,11 @@ When launching each platform Worker, the Workers will output:
150
164
  - IF platform.platform_type IN ["web", "mobile", "desktop"]: SET `platform.workers.ui_style.status = "processing"`
151
165
  - WRITE manifest to techs-manifest.json
152
166
 
153
- **Step 2b: Launch Conventions Worker (ALL Platforms)**
167
+ **Step 2b: Prepare Conventions Worker Task Plans (ALL Platforms)**
168
+
169
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
154
170
 
155
- For each platform, invoke `speccrew-task-worker` with:
171
+ For each platform, prepare a task with:
156
172
  - skill_path: `speccrew-knowledge-techs-generate-conventions/SKILL.md`
157
173
  - context:
158
174
  - platform_id: platform.platform_id
@@ -165,10 +181,12 @@ For each platform, invoke `speccrew-task-worker` with:
165
181
  - completed_dir: completed_dir
166
182
  - language: language
167
183
 
168
- **Step 2c: Launch UI-Style Worker (Frontend Platforms ONLY)**
184
+ **Step 2c: Prepare UI-Style Worker Task Plans (Frontend Platforms ONLY)**
185
+
186
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
169
187
 
170
188
  IF platform.platform_type IN ["web", "mobile", "desktop"]:
171
- 1. Invoke `speccrew-task-worker` with:
189
+ 1. Prepare a task with:
172
190
  - skill_path: `speccrew-knowledge-techs-generate-ui-style/SKILL.md`
173
191
  - context:
174
192
  - platform_id: platform.platform_id
@@ -179,13 +197,20 @@ IF platform.platform_type IN ["web", "mobile", "desktop"]:
179
197
  - completed_dir: completed_dir
180
198
  - language: language
181
199
 
182
- **Step 2d: Wait for All Workers**
183
- - WAIT_ALL workers complete
200
+ **Step 2d: Completion Marker Monitoring**
201
+
202
+ > **NOTE**: Worker dispatch and wait operations are handled by the calling Agent (Team Leader). This Skill only monitors completion markers.
203
+
204
+ The calling Agent should:
205
+ - Monitor for `{platform_id}.done-conventions.json` markers
206
+ - Monitor for `{platform_id}.done-ui-style.json` markers (frontend platforms)
184
207
  - Both workers run in PARALLEL for the same platform
185
208
 
186
- **Step 2e: Launch Quality Check Workers PARALLEL per Completed Generate Worker**
209
+ **Step 2e: Prepare Quality Check Worker Task Plans**
210
+
211
+ > **NOTE**: Quality worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
187
212
 
188
- After each `speccrew-knowledge-techs-generate` worker completes (writes `.done-conventions.json` marker), immediately dispatch the corresponding quality check worker:
213
+ After each `speccrew-knowledge-techs-generate` worker completes (writes `.done-conventions.json` or `.done-ui-style.json` marker), the calling Agent should dispatch the corresponding quality check worker.
189
214
 
190
215
  | Generate Worker | Quality Worker | Input |
191
216
  |-----------------|----------------|-------|
@@ -206,12 +231,25 @@ After each `speccrew-knowledge-techs-generate` worker completes (writes `.done-c
206
231
  }
207
232
  ```
208
233
 
209
- **Execution sequence**:
210
- 1. Scan `completed_dir` for new `.done-conventions.json` and `.done-ui-style.json` files
211
- 2. For each completed generate worker, prepare corresponding quality worker task
212
- 3. Launch ALL quality workers for the current batch in PARALLEL
213
- 4. Wait for ALL quality workers to complete
214
- 5. Each quality worker writes `.quality-done.json` marker to `completed_dir`
234
+ **Quality Worker Completion Marker**:
235
+
236
+ Each quality worker writes a `.quality-done.json` marker to `completed_dir` upon completion:
237
+
238
+ ```json
239
+ {
240
+ "platform_id": "web-vue",
241
+ "worker_type": "quality",
242
+ "status": "completed",
243
+ "quality_score": 85,
244
+ "issues_found": 2,
245
+ "completed_at": "2024-01-15T11:00:00Z"
246
+ }
247
+ ```
248
+
249
+ **Expected Completion Markers after Stage 2**:
250
+ 1. `{platform_id}.done-conventions.json` — conventions worker marker
251
+ 2. `{platform_id}.done-ui-style.json` — ui-style worker marker (frontend only)
252
+ 3. `{platform_id}.quality-done.json` — quality worker marker
215
253
 
216
254
  > **Stage 2 Completion Condition**: ALL generate workers AND ALL quality check workers completed (`.done-*.json` and `.quality-done.json` markers present) before proceeding to Stage 2.5
217
255
 
@@ -585,8 +623,12 @@ Write to `speccrew-workspace/knowledges/base/sync-state/knowledge-techs/stage2-s
585
623
 
586
624
  **Action**:
587
625
  - Read `speccrew-workspace/knowledges/base/sync-state/knowledge-techs/techs-manifest.json`
588
- - Invoke 1 Worker Agent (`speccrew-task-worker.md`) with skill `speccrew-knowledge-techs-index/SKILL.md`
589
- - Parameters to pass to skill:
626
+
627
+ > **NOTE**: Worker dispatch is handled by the calling Agent (Team Leader). This Skill only prepares the task plan and parameters.
628
+
629
+ **Prepare Task Plan**:
630
+ - **Skill**: `speccrew-knowledge-techs-index/SKILL.md`
631
+ - **Parameters**:
590
632
  - `manifest_path`: Path to techs-manifest.json
591
633
  - `techs_base_path`: Base path for techs documentation (e.g., `speccrew-workspace/knowledges/techs/`)
592
634
  - `output_path`: Output path for root INDEX.md (e.g., `speccrew-workspace/knowledges/techs/`)
@@ -638,17 +680,19 @@ THRESHOLD: warnings > 5 → flag for manual review
638
680
 
639
681
  ## Execution Flow
640
682
 
683
+ > **NOTE**: All worker dispatch and wait operations are handled by the calling Agent (Team Leader). This Skill only prepares task plans and monitors completion markers.
684
+
641
685
  ```
642
686
  1. Run Stage 1 (Platform Detection)
643
- └─ Wait for completion
687
+ └─ Prepare task plan → Monitor completion
644
688
 
645
689
  2. Run Stage 2 (Tech Doc Generation)
646
690
  ├─ Read techs-manifest.json
647
- ├─ Launch ALL platform Workers in parallel
648
- └─ Wait for ALL Workers → generate stage2-status.json
691
+ ├─ Prepare ALL platform task plans for parallel dispatch
692
+ └─ Monitor completion markers → generate stage2-status.json
649
693
 
650
694
  3. Run Stage 3 (Root Index)
651
- └─ Wait for completion → generate stage3-status.json
695
+ └─ Prepare task plan → Monitor completion → generate stage3-status.json
652
696
  ```
653
697
 
654
698
  ---
@@ -1,15 +1,14 @@
1
1
  ---
2
2
  name: speccrew-pm-module-initializer
3
- description: Initialize knowledge base for a single business module by analyzing its features. Dispatches api-analyze or ui-analyze based on platform type, then generates module summary. Used by Worker Agent, invoked by PM Agent for on-demand module initialization.
3
+ description: Generate analyze task plan for a single business module. Reads features-*.json, filters matched module's pending features, and outputs a task plan JSON (list of features to analyze with analyzer parameters). Used by Worker Agent, invoked by PM Agent for on-demand module task planning.
4
4
  tools: Read, Write, Skill, Bash
5
5
  ---
6
6
 
7
- # Module Initializer
7
+ # Module Initializer (Task Plan Generator)
8
8
 
9
- Initialize knowledge base for a single business module by analyzing its features. Dispatches api-analyze or ui-analyze based on platform type, then generates module summary. Used by Worker Agent, invoked by PM Agent for on-demand module initialization.
9
+ Generate analyze task plan for a single business module. Reads features-*.json, filters matched module's pending features, and outputs a task plan JSON (list of features to analyze with analyzer parameters). Used by Worker Agent, invoked by PM Agent for on-demand module task planning.
10
10
 
11
- > **Positioning**: Lightweight knowledge base initializer for PM phase, processes only modules matched by PM matcher.
12
- > Difference from bizs-dispatch: module-initializer processes single modules on-demand, does not generate graph data, output is for PRD authoring reference only.
11
+ > **Positioning**: Task plan generator for PM phase. Generates task list for PM Agent to orchestrate. Does NOT execute analyze or summarize directly — PM Agent handles Worker dispatch based on task plan output.
13
12
 
14
13
  ## Language Adaptation
15
14
 
@@ -23,10 +22,9 @@ Initialize knowledge base for a single business module by analyzing its features
23
22
 
24
23
  ## Trigger Scenarios
25
24
 
26
- - "Initialize module {name}"
27
- - "Deep analyze module {name}"
28
- - "Generate knowledge for module {name}"
29
- - "Start module analysis"
25
+ - "Generate task plan for module {name}"
26
+ - "Plan module {name} initialization"
27
+ - "List pending features for module {name}"
30
28
 
31
29
  ## Input
32
30
 
@@ -34,7 +32,7 @@ Initialize knowledge base for a single business module by analyzing its features
34
32
  |-----------|------|----------|-------------|
35
33
  | `source_path` | string | Yes | Project source code root path |
36
34
  | `module_name` | string | Yes | Module name |
37
- | `platform_id` | string | Yes | Platform ID (e.g., "web-vue3", "admin-api") |
35
+ | `platform_id` | string | Yes | Platform ID (e.g., "web-vue", "admin-api") |
38
36
  | `platform_type` | string | Yes | web / mobile / backend / desktop |
39
37
  | `platform_subtype` | string | No | Platform subtype (e.g., "vue", "spring-boot") |
40
38
  | `tech_stack` | array | No | Platform tech stack (e.g., ["java", "spring-boot"]) |
@@ -43,29 +41,47 @@ Initialize knowledge base for a single business module by analyzing its features
43
41
  | `completed_dir` | string | Yes | Marker file output directory for api-analyze .done.json markers. Value from PM Agent: `{sync_state_bizs_dir}/completed` |
44
42
  | `sourceFile` | string | Yes | Features JSON filename (e.g., "features-backend-system.json"), used for api-analyze marking |
45
43
  | `language` | string | Yes | Output language (zh / en) |
44
+ | `workspace_path` | string | Yes | Workspace root path for constructing absolute paths |
46
45
 
47
46
  ## Output JSON
48
47
 
49
48
  ```json
50
49
  {
51
- "status": "success | partial | failed",
52
50
  "module_name": "system",
53
- "platform_id": "web-vue3",
54
- "features_analyzed": 12,
55
- "features_failed": 0,
56
- "output_dir": "speccrew-workspace/knowledges/bizs/web-vue3/system/",
57
- "overview_file": "system-overview.md",
58
- "errors": []
51
+ "platform_id": "web-vue",
52
+ "analyzer_skill": "speccrew-knowledge-bizs-ui-analyze",
53
+ "tasks": [
54
+ {
55
+ "fileName": "index",
56
+ "sourcePath": "src/views/system/user/index.vue",
57
+ "documentPath": "knowledges/bizs/web-vue/system/features",
58
+ "module": "system",
59
+ "platform_type": "web",
60
+ "platform_subtype": "vue",
61
+ "tech_stack": ["vue", "typescript"],
62
+ "language": "zh"
63
+ }
64
+ ],
65
+ "total_pending": 90,
66
+ "summarize_params": {
67
+ "skill": "speccrew-knowledge-module-summarize",
68
+ "module_name": "system",
69
+ "module_path": "knowledges/bizs/web-vue/system",
70
+ "language": "zh"
71
+ }
59
72
  }
60
73
  ```
61
74
 
62
- **Status Definitions**:
75
+ **Field Definitions**:
63
76
 
64
- | Status | Condition |
65
- |--------|-----------|
66
- | `success` | All features analyzed successfully, overview generated |
67
- | `partial` | Some features analyzed or overview generated with warnings |
68
- | `failed` | No features analyzed or critical error occurred |
77
+ | Field | Description |
78
+ |-------|-------------|
79
+ | `module_name` | Module being processed |
80
+ | `platform_id` | Platform identifier |
81
+ | `analyzer_skill` | Selected analyzer skill name |
82
+ | `tasks` | Array of pending features to analyze |
83
+ | `total_pending` | Count of pending features |
84
+ | `summarize_params` | Parameters for module-summarize skill (to be executed after all analyze tasks complete) |
69
85
 
70
86
  ## Workflow
71
87
 
@@ -73,9 +89,9 @@ Initialize knowledge base for a single business module by analyzing its features
73
89
  flowchart TD
74
90
  Start([Start]) --> Step1[Step 1: Read and filter features]
75
91
  Step1 --> Step2[Step 2: Select analyzer by platform_type]
76
- Step2 --> Step3[Step 3: Analyze each pending feature]
77
- Step3 --> Step4[Step 4: Generate module summary]
78
- Step4 --> Step5[Step 5: Return result]
92
+ Step2 --> Step3[Step 3: Build task list]
93
+ Step3 --> Step4[Step 4: Build summarize params]
94
+ Step4 --> Step5[Step 5: Output task plan JSON]
79
95
  Step5 --> End([End])
80
96
  ```
81
97
 
@@ -88,7 +104,6 @@ flowchart TD
88
104
  3. **Record counts**:
89
105
  - Total features for this module
90
106
  - Pending features (analyzed = false)
91
- - If no pending features found, skip to Step 4 (still generate/update module summary)
92
107
 
93
108
  **Output**: "Step 1 Status: ✅ COMPLETED - Found {total} total features, {pending} pending for analysis"
94
109
 
@@ -105,121 +120,74 @@ Based on `platform_type`, select the appropriate analyzer Skill:
105
120
 
106
121
  **Output**: "Step 2 Status: ✅ COMPLETED - Selected analyzer: {skill_name}"
107
122
 
108
- ### Step 3: Analyze Each Pending Feature (Sequential)
123
+ ### Step 3: Build Task List
109
124
 
110
125
  **Step 3 Status: 🔄 IN PROGRESS**
111
126
 
112
- For each pending feature from Step 1, call the appropriate analyzer skill.
127
+ For each pending feature from Step 1, build a task object with analyzer parameters.
113
128
 
114
- > 🛑 **FORBIDDEN**: DO NOT write custom scripts. You MUST call the analyzer skill directly using the Agent tool or execute it as defined in the skill's SKILL.md.
129
+ > 🛑 **IMPORTANT**: This Skill does NOT execute analyze. It ONLY generates the task list. PM Agent will dispatch Workers based on this task plan.
115
130
 
116
- #### For backend modules (api-analyze):
131
+ #### Task object structure for each pending feature:
117
132
 
118
- For each pending feature, invoke the `speccrew-knowledge-bizs-api-analyze` skill with these parameters:
119
-
120
- ```
121
- Use Agent tool to invoke speccrew-task-worker:
122
- - agent: speccrew-task-worker
123
- - task: Execute speccrew-knowledge-bizs-api-analyze skill
124
- - context:
125
- skill: speccrew-knowledge-bizs-api-analyze
126
- fileName: {feature.fileName}
127
- sourcePath: {source_path}/{feature.sourcePath}
128
- documentPath: {output_path}/bizs/{platform_id}/{feature.module}/features
129
- module: {feature.module}
130
- analyzed: false
131
- platform_type: backend
132
- platform_subtype: {platform_subtype}
133
- tech_stack: {tech_stack}
134
- language: {language}
135
- completed_dir: {completed_dir}
136
- sourceFile: {sourceFile}
133
+ ```json
134
+ {
135
+ "fileName": "{feature.fileName}",
136
+ "sourcePath": "{feature.sourcePath}",
137
+ "documentPath": "{output_path}/bizs/{platform_id}/{feature.module}/features",
138
+ "module": "{feature.module}",
139
+ "platform_type": "{platform_type}",
140
+ "platform_subtype": "{platform_subtype}",
141
+ "tech_stack": "{tech_stack}",
142
+ "language": "{language}"
143
+ }
137
144
  ```
138
145
 
139
- #### For web/mobile/desktop modules (ui-analyze):
140
-
141
- For each pending feature, invoke the `speccrew-knowledge-bizs-ui-analyze` skill with these parameters:
142
-
143
- ```
144
- Use Agent tool to invoke speccrew-task-worker:
145
- - agent: speccrew-task-worker
146
- - task: Execute speccrew-knowledge-bizs-ui-analyze skill
147
- - context:
148
- skill: speccrew-knowledge-bizs-ui-analyze
149
- fileName: {feature.fileName}
150
- sourcePath: {source_path}/{feature.sourcePath}
151
- documentPath: {output_path}/bizs/{platform_id}/{feature.module}/features
152
- module: {feature.module}
153
- analyzed: false
154
- platform_type: {platform_type}
155
- platform_subtype: {platform_subtype}
156
- tech_stack: {tech_stack}
157
- language: {language}
146
+ For backend features (api-analyze), also include:
147
+ ```json
148
+ {
149
+ "completed_dir": "{completed_dir}",
150
+ "sourceFile": "{sourceFile}"
151
+ }
158
152
  ```
159
153
 
160
- > **NOTE**: UI Analyzer does NOT write .done.json marker files (handled by ui-graph skill in bizs-dispatch).
154
+ **Output**: "Step 3 Status: COMPLETED - Built {count} task entries"
161
155
 
162
- #### After each successful analysis:
163
- Update the feature's `analyzed` field to `true` in the features JSON file.
164
-
165
- #### Error handling:
166
- - If an analyzer fails, log the error, increment `features_failed` counter
167
- - Continue with next feature (do NOT abort the entire module)
168
- - A module with partial analysis is better than no analysis
169
-
170
- **Output**: "Step 3 Status: ✅ COMPLETED - Analyzed {success} features, {failed} failed"
171
-
172
- ### Step 4: Generate Module Summary
156
+ ### Step 4: Build Summarize Parameters
173
157
 
174
158
  **Step 4 Status: 🔄 IN PROGRESS**
175
159
 
176
- **Pre-check**: Verify that feature documents exist at `{output_path}/bizs/{platform_id}/{module_name}/features/`.
160
+ Build the summarize_params object for module-summarize skill. This will be used by PM Agent after all analyze tasks complete.
177
161
 
178
- IF no feature documents exist AND features_analyzed == 0:
179
- - Set status to "partial"
180
- - Skip module-summarize
181
- - Proceed to Step 5
182
-
183
- IF feature documents exist:
184
- Invoke `speccrew-knowledge-module-summarize` skill:
185
- ```
186
- Use Agent tool to invoke speccrew-task-worker:
187
- - agent: speccrew-task-worker
188
- - task: Execute speccrew-knowledge-module-summarize skill
189
- - context:
190
- skill: speccrew-knowledge-module-summarize
191
- module_name: {module_name}
192
- module_path: {output_path}/bizs/{platform_id}/{module_name}
193
- language: {language}
194
- ```
162
+ ```json
163
+ {
164
+ "skill": "speccrew-knowledge-module-summarize",
165
+ "module_name": "{module_name}",
166
+ "module_path": "{output_path}/bizs/{platform_id}/{module_name}",
167
+ "language": "{language}"
168
+ }
169
+ ```
195
170
 
196
- **Output**: "Step 4 Status: ✅ COMPLETED - Module overview generated at {module_path}/{module_name}-overview.md"
171
+ **Output**: "Step 4 Status: ✅ COMPLETED - Summarize params ready"
197
172
 
198
- ### Step 5: Return Result
173
+ ### Step 5: Output Task Plan JSON
199
174
 
200
175
  **Step 5 Status: 🔄 IN PROGRESS**
201
176
 
202
- Compile and return the final result:
177
+ Compile and output the final task plan:
203
178
 
204
179
  ```json
205
180
  {
206
- "status": "success | partial | failed",
207
181
  "module_name": "...",
208
182
  "platform_id": "...",
209
- "features_analyzed": <count>,
210
- "features_failed": <count>,
211
- "output_dir": "...",
212
- "overview_file": "...",
213
- "errors": [...]
183
+ "analyzer_skill": "...",
184
+ "tasks": [...],
185
+ "total_pending": <count>,
186
+ "summarize_params": {...}
214
187
  }
215
188
  ```
216
189
 
217
- **Status determination**:
218
- - `success`: All features analyzed successfully, overview generated
219
- - `partial`: Some features failed but overview generated, or no pending features but overview updated
220
- - `failed`: All features failed or critical error prevented overview generation
221
-
222
- **Output**: "Step 5 Status: ✅ COMPLETED - Module initialization {status}"
190
+ **Output**: "Step 5 Status: ✅ COMPLETED - Task plan generated with {count} pending features"
223
191
 
224
192
  ## Constraints
225
193
 
@@ -231,21 +199,21 @@ Compile and return the final result:
231
199
 
232
200
  3. **Worker context**: This Skill runs in Worker Agent context, invoked by PM Agent
233
201
 
234
- 4. **Sequential execution**: Process features sequentially within this Worker (PM Agent handles module-level parallelism)
202
+ 4. **NO execution**: This Skill generates task plan ONLY. It does NOT:
203
+ - Execute analyzer skills
204
+ - Execute summarize skills
205
+ - Update features.json analyzed field
206
+ - All execution is handled by PM Agent based on task plan output
235
207
 
236
- 5. **No sync-state modification**: Do not directly create or modify sync-state directory files (that's dispatch's responsibility), but can update features.json analyzed markers
237
-
238
- 6. **Mutual exclusion with full dispatch**: Do not run simultaneously with full dispatch process
208
+ 5. **Mutual exclusion with full dispatch**: Do not run simultaneously with full dispatch process
239
209
 
240
210
  ## Error Handling
241
211
 
242
212
  | Scenario | Action |
243
213
  |----------|--------|
244
- | Features file not found | Return `status: failed` with error message |
245
- | No features for module | Skip to Step 4, generate overview if possible |
246
- | No pending features | Skip to Step 4, update existing overview |
247
- | Analyzer fails for feature | Record in errors array, continue with next feature |
248
- | Module summarize fails | Return `status: partial` with error details |
214
+ | Features file not found | Return error with message |
215
+ | No features for module | Return empty tasks array with summarize_params |
216
+ | No pending features | Return empty tasks array with summarize_params |
249
217
 
250
218
  ## Reference: Analyzer Input Parameters
251
219
 
@@ -253,10 +221,9 @@ Compile and return the final result:
253
221
 
254
222
  | Variable | Type | Description | Example |
255
223
  |----------|------|-------------|---------|
256
- | `feature` | object | Complete feature object from features.json | - |
257
224
  | `fileName` | string | Controller file name | `"UserController"` |
258
225
  | `sourcePath` | string | Relative path to source file | `"src/.../UserController.java"` |
259
- | `documentPath` | string | Target path for generated document | `"knowledges/bizs/.../UserController.md"` |
226
+ | `documentPath` | string | Target path for generated document | `"knowledges/bizs/.../features"` |
260
227
  | `module` | string | Business module name | `"system"` |
261
228
  | `analyzed` | boolean | Analysis status flag | `false` |
262
229
  | `platform_type` | string | Platform type | `"backend"` |
@@ -270,18 +237,15 @@ Compile and return the final result:
270
237
 
271
238
  | Variable | Type | Description | Example |
272
239
  |----------|------|-------------|---------|
273
- | `feature` | object | Complete feature object from features.json | - |
274
240
  | `fileName` | string | Feature file name | `"index"` |
275
241
  | `sourcePath` | string | Relative path to source file | `"src/views/system/user/index.vue"` |
276
- | `documentPath` | string | Target path for generated document | `"knowledges/bizs/.../index.md"` |
242
+ | `documentPath` | string | Target path for generated document | `"knowledges/bizs/.../features"` |
277
243
  | `module` | string | Business module name | `"system"` |
278
244
  | `analyzed` | boolean | Analysis status flag | `false` |
279
245
  | `platform_type` | string | Platform type | `"web"` |
280
246
  | `platform_subtype` | string | Platform subtype | `"vue"` |
281
247
  | `tech_stack` | array | Platform tech stack | `["vue", "typescript"]` |
282
248
  | `language` | string | Target language | `"zh"` |
283
- | `completed_dir` | string | Marker output directory (absolute path) | `".../knowledges/base/sync-state/completed"` |
284
- | `sourceFile` | string | Source features JSON filename | `"features-web-vue3.json"` |
285
249
 
286
250
  ## Task Completion Report
287
251
 
@@ -289,25 +253,16 @@ When the task is complete, report:
289
253
 
290
254
  ```json
291
255
  {
292
- "status": "success | failed",
256
+ "status": "success",
293
257
  "skill": "speccrew-pm-module-initializer",
294
258
  "output": {
295
- "status": "success | partial | failed",
296
259
  "module_name": "...",
297
260
  "platform_id": "...",
298
- "features_analyzed": 12,
299
- "features_failed": 0,
300
- "output_dir": "...",
301
- "overview_file": "...",
302
- "errors": []
303
- },
304
- "metrics": {
305
- "features_total": 15,
306
- "features_analyzed": 12,
307
- "features_skipped": 3,
308
- "features_failed": 0
309
- },
310
- "errors": []
261
+ "analyzer_skill": "...",
262
+ "tasks": [...],
263
+ "total_pending": <count>,
264
+ "summarize_params": {...}
265
+ }
311
266
  }
312
267
  ```
313
268
 
@@ -315,6 +270,6 @@ When the task is complete, report:
315
270
 
316
271
  - [ ] Step 1: Read features file and filtered by module
317
272
  - [ ] Step 2: Selected analyzer type based on platform_type
318
- - [ ] Step 3: Analyzed each pending feature sequentially
319
- - [ ] Step 4: Generated module summary via module-summarize
320
- - [ ] Step 5: Returned aggregated result with correct status
273
+ - [ ] Step 3: Built task list with analyzer parameters
274
+ - [ ] Step 4: Built summarize parameters
275
+ - [ ] Step 5: Output task plan JSON
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.6.12",
3
+ "version": "0.6.13",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {