speccrew 0.7.11 → 0.7.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.
@@ -254,6 +254,14 @@
254
254
  </field>
255
255
  </block>
256
256
 
257
+ <!-- Source Link Path Prefix Rule -->
258
+ <block type="rule" id="R-SRCLINK" level="mandatory" desc="Source link path prefix is FIXED at 6 levels">
259
+ <field name="text">MANDATORY: All source file links in the document MUST use exactly 6 levels of parent directory traversal: ../../../../../../</field>
260
+ <field name="text">The path format is: [View](../../../../../../{relative-path-from-project-root})</field>
261
+ <field name="text">DO NOT compute or modify the path prefix. DO NOT use fewer levels like ../../ or ../../../../</field>
262
+ <field name="text">This is because documents are located at: speccrew-workspace/knowledges/bizs/{platformId}/{module}/{file}.md (6 levels deep from project root)</field>
263
+ </block>
264
+
257
265
  <!-- Ensure Document Output Directory Exists -->
258
266
  <block type="task" id="B14a" action="run-script" desc="Ensure document output directory exists">
259
267
  <field name="command">node -e "require('fs').mkdirSync(require('path').dirname('${documentPath}'), {recursive: true})"</field>
@@ -489,6 +497,8 @@
489
497
  <field name="module" value="${module}"/>
490
498
  <field name="sourcePath" value="${sourcePath}"/>
491
499
  <field name="documentPath" value="${documentPath}"/>
500
+ <field name="text">Each node MUST have: id (string, unique), type (string), label (string, human-readable name, REQUIRED), properties (object)</field>
501
+ <field name="text">Example node: {"id": "api-dept-list", "type": "api-endpoint", "label": "GET /system/dept/list - 获取部门列表", "properties": {"method": "GET", "path": "/system/dept/list"}}</field>
492
502
  <field name="output" var="apiNodes"/>
493
503
  </block>
494
504
 
@@ -497,12 +507,16 @@
497
507
  <field name="module" value="${module}"/>
498
508
  <field name="sourcePath" value="${sourcePath}"/>
499
509
  <field name="documentPath" value="${documentPath}"/>
510
+ <field name="text">Each node MUST have: id (string, unique), type (string), label (string, human-readable name, REQUIRED), properties (object)</field>
511
+ <field name="text">Example node: {"id": "svc-dept", "type": "service", "label": "DeptService - 部门服务", "properties": {"className": "DeptService", "methods": ["list", "get", "save", "delete"]}}</field>
500
512
  <field name="output" var="serviceNodes"/>
501
513
  </block>
502
514
 
503
515
  <block type="task" id="B32c" action="analyze" desc="Construct table nodes">
504
516
  <field name="tables" value="${databaseTables}"/>
505
517
  <field name="module" value="${module}"/>
518
+ <field name="text">Each node MUST have: id (string, unique), type (string), label (string, human-readable name, REQUIRED), properties (object)</field>
519
+ <field name="text">Example node: {"id": "tbl-sys-dept", "type": "database-table", "label": "sys_dept - 部门表", "properties": {"tableName": "sys_dept", "schema": "public"}}</field>
506
520
  <field name="output" var="tableNodes"/>
507
521
  </block>
508
522
 
@@ -214,6 +214,14 @@
214
214
  </field>
215
215
  </block>
216
216
 
217
+ <!-- Source Link Path Prefix Rule -->
218
+ <block type="rule" id="R-SRCLINK" level="mandatory" desc="Source link path prefix is FIXED at 6 levels">
219
+ <field name="text">MANDATORY: All source file links in the document MUST use exactly 6 levels of parent directory traversal: ../../../../../../</field>
220
+ <field name="text">The path format is: [View](../../../../../../{relative-path-from-project-root})</field>
221
+ <field name="text">DO NOT compute or modify the path prefix. DO NOT use fewer levels like ../../ or ../../../../</field>
222
+ <field name="text">This is because documents are located at: speccrew-workspace/knowledges/bizs/{platformId}/{module}/{file}.md (6 levels deep from project root)</field>
223
+ </block>
224
+
217
225
  <!-- Ensure Document Output Directory Exists -->
218
226
  <block type="task" id="B5a0" action="run-script" desc="Ensure document output directory exists">
219
227
  <field name="command">node -e "require('fs').mkdirSync(require('path').dirname('${documentPath}'), {recursive: true})"</field>
@@ -395,6 +403,8 @@
395
403
  <field name="sourcePath" value="${sourcePath}"/>
396
404
  <field name="documentPath" value="${documentPath}"/>
397
405
  <field name="platform" value="${platform_type}-${platform_subtype}"/>
406
+ <field name="text">Each node MUST have: id (string, unique), type (string), label (string, human-readable name, REQUIRED), properties (object)</field>
407
+ <field name="text">Example node: {"id": "page-system-user", "type": "page", "label": "用户管理页面 - User Management", "properties": {"route": "/system/user", "platform": "web-vue"}}</field>
398
408
  <field name="output" var="pageNode"/>
399
409
  </block>
400
410
 
@@ -402,6 +412,8 @@
402
412
  <field name="components" value="${analysisResult.components}"/>
403
413
  <field name="module" value="${module}"/>
404
414
  <field name="documentPath" value="${documentPath}"/>
415
+ <field name="text">Each node MUST have: id (string, unique), type (string), label (string, human-readable name, REQUIRED), properties (object)</field>
416
+ <field name="text">Example node: {"id": "comp-user-table", "type": "component", "label": "UserTable - 用户列表组件", "properties": {"componentName": "UserTable", "props": ["data", "loading"]}}</field>
405
417
  <field name="output" var="componentNodes"/>
406
418
  </block>
407
419
 
@@ -409,6 +421,8 @@
409
421
  <field name="routes" value="${analysisResult.routes}"/>
410
422
  <field name="module" value="${module}"/>
411
423
  <field name="sourcePath" value="${sourcePath}"/>
424
+ <field name="text">Each node MUST have: id (string, unique), type (string), label (string, human-readable name, REQUIRED), properties (object)</field>
425
+ <field name="text">Example node: {"id": "route-user-edit", "type": "route", "label": "/system/user/edit - 用户编辑路由", "properties": {"path": "/system/user/edit", "name": "UserEdit"}}</field>
412
426
  <field name="output" var="routeNodes"/>
413
427
  </block>
414
428
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speccrew",
3
- "version": "0.7.11",
3
+ "version": "0.7.13",
4
4
  "description": "Spec-Driven Development toolkit for AI-powered IDEs",
5
5
  "author": "charlesmu99",
6
6
  "repository": {