speccrew 0.6.61 → 0.6.63
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.
|
@@ -330,11 +330,31 @@ Continue with knowledge base generation?
|
|
|
330
330
|
</block>
|
|
331
331
|
|
|
332
332
|
<block type="loop" id="S1b-L1" over="${platforms}" as="platform" parallel="true" max-concurrency="${max_concurrent_workers}" desc="Generate Feature inventory for each platform IN PARALLEL">
|
|
333
|
-
<!-- Step 1:
|
|
334
|
-
<block type="task" id="S1b-B1" action="
|
|
335
|
-
<field name="
|
|
336
|
-
<field name="
|
|
337
|
-
|
|
333
|
+
<!-- Step 1: Dispatch Worker to generate feature inventory -->
|
|
334
|
+
<block type="task" id="S1b-B1" action="dispatch-to-worker" status="pending" desc="Dispatch Worker to generate feature inventory">
|
|
335
|
+
<field name="worker">speccrew-knowledge-bizs-init-features-xml</field>
|
|
336
|
+
<field name="instructions">
|
|
337
|
+
Generate feature inventory for the specified platform by analyzing entry directories.
|
|
338
|
+
|
|
339
|
+
Requirements:
|
|
340
|
+
- Read entry-dirs JSON file to get module entry directories
|
|
341
|
+
- Scan source files in each entry directory
|
|
342
|
+
- Generate features JSON with feature metadata
|
|
343
|
+
- Output to features-{platformId}.json in sync_state_bizs_dir
|
|
344
|
+
</field>
|
|
345
|
+
<field name="context">{
|
|
346
|
+
"platformId": "${platform.platformId}",
|
|
347
|
+
"platformName": "${platform.platformName}",
|
|
348
|
+
"platformType": "${platform.platformType}",
|
|
349
|
+
"platformSubtype": "${platform.platformSubtype}",
|
|
350
|
+
"sourcePath": "${platform.sourcePath}",
|
|
351
|
+
"techIdentifier": "${platform.techIdentifier}",
|
|
352
|
+
"entryDirsFile": "${sync_state_bizs_dir}/entry-dirs-${platform.platformId}.json",
|
|
353
|
+
"outputDir": "${sync_state_bizs_dir}",
|
|
354
|
+
"workspace_path": "${workspace_path}",
|
|
355
|
+
"sync_state_bizs_dir": "${sync_state_bizs_dir}",
|
|
356
|
+
"language": "${language}"
|
|
357
|
+
}</field>
|
|
338
358
|
<field name="output" var="features_${platform.platformId}"/>
|
|
339
359
|
</block>
|
|
340
360
|
|
|
@@ -104,7 +104,7 @@ For each platform, generates:
|
|
|
104
104
|
<field name="platform_type" value="${platform.platformType}"/>
|
|
105
105
|
<field name="platform_subtype" value="${platform.platformSubtype}"/>
|
|
106
106
|
<field name="tech_stack" value="${platform.techStack}"/>
|
|
107
|
-
<field name="logic_backend" value="Find all directories containing *Controller.java or *Controller.kt files. These are API entry directories. Module name = the business package name of the entry directory"/>
|
|
107
|
+
<field name="logic_backend" value="Find all directories containing *Controller.java or *Controller.kt files. These are API entry directories. Module name = the business package name of the entry directory. CRITICAL: Group by DIRECTORY, not by individual controller files. If multiple controllers reside in the same directory, that is ONE module with that directory as entryDirs"/>
|
|
108
108
|
<field name="logic_frontend_vue_react" value="Find views/ or pages/ directories. First-level subdirectories under these directories are business modules"/>
|
|
109
109
|
<field name="logic_mobile_uniapp" value="Find first-level subdirectories under pages/. Plus top-level pages-* directories (module name = directory name without pages- prefix)"/>
|
|
110
110
|
<field name="logic_mobile_miniprogram" value="Find first-level subdirectories under pages/ as modules"/>
|
|
@@ -161,8 +161,10 @@ For each platform, generates:
|
|
|
161
161
|
- Each module in "modules" array MUST have exactly two fields: "name" (string) and "entryDirs" (array of strings)
|
|
162
162
|
- For platforms with hierarchical directory structure (e.g. frontend views/system/user/), flatten into individual modules
|
|
163
163
|
- Module names should use hyphen-separated composite names for sub-modules (e.g. "system-user", "system-role")
|
|
164
|
+
- Multiple modules MUST NOT share the same entryDirs value. If multiple business areas share the same directory, they belong to ONE module.
|
|
164
165
|
- If the generated JSON does not match this format, you MUST regenerate it before proceeding
|
|
165
166
|
</field>
|
|
167
|
+
<field name="text">Output is strictly the entry-dirs JSON file at the specified output path. Per xml-workflow-spec.md "Strict Block Adherence" rule, no extra files are permitted.</field>
|
|
166
168
|
</block>
|
|
167
169
|
|
|
168
170
|
<!-- Checkpoint: Persist Generated JSON -->
|
|
@@ -240,6 +242,37 @@ For each platform, generates:
|
|
|
240
242
|
}
|
|
241
243
|
```
|
|
242
244
|
|
|
245
|
+
### Module Granularity (CRITICAL)
|
|
246
|
+
|
|
247
|
+
- **modules = directory-level groupings**, NOT file-level features
|
|
248
|
+
- Each module represents a distinct source directory (or set of directories) containing entry files
|
|
249
|
+
- **NEVER create multiple modules pointing to the SAME entryDirs** — if 10 controller files all reside in `module_admin/controller/`, that is ONE module named `admin` with entryDirs `["module_admin/controller"]`, NOT 10 separate modules
|
|
250
|
+
- The downstream `generate-inventory.js` script handles file-level decomposition within each module's entryDirs — that is NOT the job of this skill
|
|
251
|
+
- Module names should correspond to directory names, not individual file names
|
|
252
|
+
- Typical module count for a medium project: 3-10 modules (not 30+)
|
|
253
|
+
|
|
254
|
+
**Correct example** (directory-level):
|
|
255
|
+
```json
|
|
256
|
+
{
|
|
257
|
+
"modules": [
|
|
258
|
+
{ "name": "admin", "entryDirs": ["module_admin/controller"] },
|
|
259
|
+
{ "name": "ai", "entryDirs": ["module_ai/controller"] },
|
|
260
|
+
{ "name": "bpm", "entryDirs": ["module_bpm/controller"] }
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**WRONG example** (file-level — FORBIDDEN):
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"modules": [
|
|
269
|
+
{ "name": "system-user", "entryDirs": ["module_admin/controller"] },
|
|
270
|
+
{ "name": "system-config", "entryDirs": ["module_admin/controller"] },
|
|
271
|
+
{ "name": "system-dept", "entryDirs": ["module_admin/controller"] }
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
243
276
|
### Format Constraints
|
|
244
277
|
|
|
245
278
|
- **MUST use `modules` array** — never use `businessModules`, `components`, or any alternative field name
|
package/package.json
CHANGED
|
@@ -482,6 +482,19 @@ Team Leader executes:
|
|
|
482
482
|
7. **`rule level="forbidden"`** = immediate stop if violated
|
|
483
483
|
8. **Input/Output blocks** define the contract — respect required parameters
|
|
484
484
|
|
|
485
|
+
### Strict Block Adherence
|
|
486
|
+
|
|
487
|
+
When executing an XML workflow, the Agent MUST strictly follow the block sequence defined in the workflow:
|
|
488
|
+
|
|
489
|
+
1. **Only perform actions defined by blocks** — Every action the Agent takes must correspond to a specific block in the workflow. The Agent MUST NOT perform any actions not defined by the blocks.
|
|
490
|
+
2. **Prohibited extra actions** include but are not limited to:
|
|
491
|
+
- Generating files not specified in block output paths (e.g. summary reports, analysis documents, logs)
|
|
492
|
+
- Running scripts or commands not defined in any block
|
|
493
|
+
- Creating intermediate/temporary files outside of block definitions
|
|
494
|
+
- Adding "bonus" analysis steps or documentation beyond what blocks require
|
|
495
|
+
3. **Output scope** — The workflow's output is strictly limited to what is defined in `output` blocks or block-level output fields (`<field name="output">`). Any file or artifact not traceable to a block definition is considered an error.
|
|
496
|
+
4. **When in doubt, don't do it** — If an action is not explicitly defined in any block, the Agent must skip it, even if it seems "helpful".
|
|
497
|
+
|
|
485
498
|
### Block Execution Announcement Protocol
|
|
486
499
|
|
|
487
500
|
Before executing each `<block>`, the agent MUST announce the block being executed. The announcement format is:
|