@blxzer/cursor-trellis 0.2.6 → 0.2.8

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.
Files changed (98) hide show
  1. package/CHANGELOG.md +170 -103
  2. package/README.md +27 -4
  3. package/dist/cli/index.d.ts.map +1 -1
  4. package/dist/cli/index.js +18 -0
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/commands/init.d.ts.map +1 -1
  7. package/dist/commands/init.js +8 -1
  8. package/dist/commands/init.js.map +1 -1
  9. package/dist/commands/update.d.ts.map +1 -1
  10. package/dist/commands/update.js +6 -1
  11. package/dist/commands/update.js.map +1 -1
  12. package/dist/commands/validate-rules.d.ts +6 -0
  13. package/dist/commands/validate-rules.d.ts.map +1 -0
  14. package/dist/commands/validate-rules.js +33 -0
  15. package/dist/commands/validate-rules.js.map +1 -0
  16. package/dist/configurators/cursor2plus-local.d.ts.map +1 -1
  17. package/dist/configurators/cursor2plus-local.js +2 -1
  18. package/dist/configurators/cursor2plus-local.js.map +1 -1
  19. package/dist/configurators/workflow.d.ts.map +1 -1
  20. package/dist/configurators/workflow.js +8 -2
  21. package/dist/configurators/workflow.js.map +1 -1
  22. package/dist/migrations/manifests/0.2.2.json +9 -0
  23. package/dist/migrations/manifests/0.2.4.json +9 -0
  24. package/dist/migrations/manifests/0.2.5.json +9 -0
  25. package/dist/migrations/manifests/0.2.6.json +9 -0
  26. package/dist/migrations/manifests/0.2.7.json +9 -0
  27. package/dist/migrations/manifests/0.2.8.json +9 -0
  28. package/dist/templates/common/bundled-skills/trellis-cursor2plus-setup/SKILL.md +2 -2
  29. package/dist/templates/common/commands/finish-work.md +12 -0
  30. package/dist/templates/common/skills/brainstorm.md +164 -163
  31. package/dist/templates/common/skills/check.md +4 -0
  32. package/dist/templates/cursor/agents/trellis-check.md +32 -0
  33. package/dist/templates/cursor/agents/trellis-implement.md +11 -0
  34. package/dist/templates/cursor/agents/trellis-research.md +29 -0
  35. package/dist/templates/cursor/fixtures/expected-rules.d.ts +14 -0
  36. package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -0
  37. package/dist/templates/cursor/fixtures/expected-rules.js +26 -0
  38. package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -0
  39. package/dist/templates/cursor/rules/trellis-subagent-dispatch.mdc +34 -0
  40. package/dist/templates/markdown/index.d.ts +1 -0
  41. package/dist/templates/markdown/index.d.ts.map +1 -1
  42. package/dist/templates/markdown/index.js +1 -0
  43. package/dist/templates/markdown/index.js.map +1 -1
  44. package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +43 -0
  45. package/dist/templates/markdown/spec/guides/index.md.txt +102 -101
  46. package/dist/templates/trellis/config/execution-strategy-rules.json +31 -0
  47. package/dist/templates/trellis/index.d.ts +2 -0
  48. package/dist/templates/trellis/index.d.ts.map +1 -1
  49. package/dist/templates/trellis/index.js +3 -0
  50. package/dist/templates/trellis/index.js.map +1 -1
  51. package/dist/templates/trellis/local/README.md +61 -37
  52. package/dist/templates/trellis/local/index.d.ts +1 -0
  53. package/dist/templates/trellis/local/index.d.ts.map +1 -1
  54. package/dist/templates/trellis/local/index.js +1 -0
  55. package/dist/templates/trellis/local/index.js.map +1 -1
  56. package/dist/templates/trellis/local/patch_wpelc8.py +162 -38
  57. package/dist/templates/trellis/local/smoke.py +94 -0
  58. package/dist/templates/trellis/scripts/common/codebase_retrieval_router.py +2 -2
  59. package/dist/templates/trellis/scripts/common/cursor_retrieval_env.py +16 -2
  60. package/dist/templates/trellis/scripts/common/execution_strategy.py +268 -0
  61. package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +26 -7
  62. package/dist/templates/trellis/scripts/common/semantic_plan_gate.py +18 -4
  63. package/dist/templates/trellis/scripts/common/task_store.py +1594 -1565
  64. package/dist/templates/trellis/scripts/task.py +918 -877
  65. package/dist/templates/trellis/workflow.md +805 -800
  66. package/dist/utils/codebase-retrieval-router.js +2 -2
  67. package/dist/utils/codebase-retrieval-router.js.map +1 -1
  68. package/dist/utils/cursor-retrieval-env.d.ts +2 -0
  69. package/dist/utils/cursor-retrieval-env.d.ts.map +1 -1
  70. package/dist/utils/cursor-retrieval-env.js +11 -2
  71. package/dist/utils/cursor-retrieval-env.js.map +1 -1
  72. package/dist/utils/mirror-check.d.ts +22 -0
  73. package/dist/utils/mirror-check.d.ts.map +1 -0
  74. package/dist/utils/mirror-check.js +90 -0
  75. package/dist/utils/mirror-check.js.map +1 -0
  76. package/dist/utils/normalize-text.d.ts +7 -0
  77. package/dist/utils/normalize-text.d.ts.map +1 -0
  78. package/dist/utils/normalize-text.js +16 -0
  79. package/dist/utils/normalize-text.js.map +1 -0
  80. package/dist/utils/retrieval-agent-instructions.d.ts.map +1 -1
  81. package/dist/utils/retrieval-agent-instructions.js +14 -7
  82. package/dist/utils/retrieval-agent-instructions.js.map +1 -1
  83. package/dist/utils/retrieval-execution-telemetry.d.ts +12 -3
  84. package/dist/utils/retrieval-execution-telemetry.d.ts.map +1 -1
  85. package/dist/utils/retrieval-execution-telemetry.js +37 -1
  86. package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
  87. package/dist/utils/retrieval-tool-classification.d.ts +2 -0
  88. package/dist/utils/retrieval-tool-classification.d.ts.map +1 -1
  89. package/dist/utils/retrieval-tool-classification.js +13 -0
  90. package/dist/utils/retrieval-tool-classification.js.map +1 -1
  91. package/dist/utils/semantic-plan-gate.d.ts.map +1 -1
  92. package/dist/utils/semantic-plan-gate.js +11 -4
  93. package/dist/utils/semantic-plan-gate.js.map +1 -1
  94. package/dist/utils/validate-rules.d.ts +21 -0
  95. package/dist/utils/validate-rules.d.ts.map +1 -0
  96. package/dist/utils/validate-rules.js +88 -0
  97. package/dist/utils/validate-rules.js.map +1 -0
  98. package/package.json +3 -2
@@ -0,0 +1,33 @@
1
+ import chalk from "chalk";
2
+ import { assertCursorRulesValid, formatRuleValidationErrors, validateRulesDir, validateTemplateRules, } from "../utils/validate-rules.js";
3
+ export async function runValidateRules(cwd, options = {}) {
4
+ if (options.dir) {
5
+ const result = validateRulesDir(options.dir);
6
+ if (!result.ok) {
7
+ console.error(chalk.red("Cursor rules validation failed:"));
8
+ console.error(formatRuleValidationErrors(result));
9
+ process.exit(1);
10
+ }
11
+ console.log(chalk.green(`✓ Cursor rules valid (${options.dir})`));
12
+ return;
13
+ }
14
+ const templateResult = validateTemplateRules();
15
+ if (!templateResult.ok) {
16
+ console.error(chalk.red("Cursor rules template validation failed:"));
17
+ console.error(formatRuleValidationErrors(templateResult));
18
+ process.exit(1);
19
+ }
20
+ console.log(chalk.green("✓ Cursor rules templates valid"));
21
+ if (options.templatesOnly) {
22
+ return;
23
+ }
24
+ try {
25
+ assertCursorRulesValid(cwd);
26
+ console.log(chalk.green(`✓ Cursor rules installation valid (${cwd})`));
27
+ }
28
+ catch (error) {
29
+ console.error(chalk.red("Error:"), error instanceof Error ? error.message : error);
30
+ process.exit(1);
31
+ }
32
+ }
33
+ //# sourceMappingURL=validate-rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-rules.js","sourceRoot":"","sources":["../../src/commands/validate-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AAOpC,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,GAAW,EACX,UAAgC,EAAE;IAElC,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAChB,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;YAC5D,OAAO,CAAC,KAAK,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC;YAClD,OAAO,CAAC,IA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CAwB5E"}
1
+ {"version":3,"file":"cursor2plus-local.d.ts","sourceRoot":"","sources":["../../src/configurators/cursor2plus-local.ts"],"names":[],"mappings":"AAaA;;;GAGG;AACH,wBAAsB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB5E"}
@@ -1,7 +1,7 @@
1
1
  import path from "node:path";
2
2
  import { DIR_NAMES } from "../constants/paths.js";
3
3
  import { ensureDir, writeFile } from "../utils/file-writer.js";
4
- import { cursor2plusPatchScript, cursor2plusReadme, cursor2plusConfigExample, subagentModelsExample, trellisTaskModelsJson5Example, trellisTaskModelsConfigPy, } from "../templates/trellis/local/index.js";
4
+ import { cursor2plusPatchScript, cursor2plusReadme, cursor2plusSmokeScript, cursor2plusConfigExample, subagentModelsExample, trellisTaskModelsJson5Example, trellisTaskModelsConfigPy, } from "../templates/trellis/local/index.js";
5
5
  /**
6
6
  * Materialize Cursor++ BYOK local operator bundle (strategy C).
7
7
  * Native Cursor API users can ignore. Never overwrites config.local.json.
@@ -12,6 +12,7 @@ export async function writeCursor2plusLocalBundle(cwd) {
12
12
  ensureDir(bundleDir);
13
13
  await writeFile(path.join(bundleDir, "patch_wpelc8.py"), cursor2plusPatchScript);
14
14
  await writeFile(path.join(bundleDir, "trellis_task_models_config.py"), trellisTaskModelsConfigPy);
15
+ await writeFile(path.join(bundleDir, "smoke.py"), cursor2plusSmokeScript);
15
16
  await writeFile(path.join(bundleDir, "README.md"), cursor2plusReadme);
16
17
  await writeFile(path.join(bundleDir, "config.local.json.example"), cursor2plusConfigExample);
17
18
  await writeFile(path.join(localRoot, "subagent-models.json.example"), subagentModelsExample);
@@ -1 +1 @@
1
- {"version":3,"file":"cursor2plus-local.js","sourceRoot":"","sources":["../../src/configurators/cursor2plus-local.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAA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
- {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AA0CA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,8BAA8B,CAAC;AAOtC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,yFAAyF;IACzF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACjC;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CAsDf"}
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AA4CA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,8BAA8B,CAAC;AAOtC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,yFAAyF;IACzF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACjC;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CA2Df"}
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import { DIR_NAMES, PATHS } from "../constants/paths.js";
3
- import { getAllScripts, workflowMdTemplate, configYamlTemplate, gitignoreTemplate, } from "../templates/trellis/index.js";
3
+ import { getAllScripts, workflowMdTemplate, configYamlTemplate, gitignoreTemplate, executionStrategyRulesJson, } from "../templates/trellis/index.js";
4
4
  // Import markdown templates
5
5
  import { agentProgressIndexContent,
6
6
  // Backend structure (multi-doc)
@@ -8,7 +8,7 @@ backendIndexContent, backendDirectoryStructureContent, backendDatabaseGuidelines
8
8
  // Frontend structure (multi-doc)
9
9
  frontendIndexContent, frontendDirectoryStructureContent, frontendTypeSafetyContent, frontendHookGuidelinesContent, frontendComponentGuidelinesContent, frontendQualityGuidelinesContent, frontendStateManagementContent,
10
10
  // Guides structure
11
- guidesIndexContent, guidesCrossLayerThinkingGuideContent, guidesCodeReuseThinkingGuideContent, guidesDurableLearningDecisionGuideContent, guidesRetrievalDailyGuideContent, guidesCursorSemanticComplianceContent, guidesCursorSubagentPolicyContent, guidesCursorContextInjectionGuideContent, } from "../templates/markdown/index.js";
11
+ guidesIndexContent, guidesCrossLayerThinkingGuideContent, guidesCodeReuseThinkingGuideContent, guidesDurableLearningDecisionGuideContent, guidesRetrievalDailyGuideContent, guidesCursorSemanticComplianceContent, guidesCursorSubagentPolicyContent, guidesExecutionStrategyContent, guidesCursorContextInjectionGuideContent, } from "../templates/markdown/index.js";
12
12
  import { writeFile, ensureDir } from "../utils/file-writer.js";
13
13
  import { replacePythonCommandLiterals } from "./shared.js";
14
14
  import { writeCursor2plusLocalBundle } from "./cursor2plus-local.js";
@@ -42,6 +42,8 @@ export async function createWorkflowStructure(cwd, options) {
42
42
  await writeFile(path.join(cwd, DIR_NAMES.WORKFLOW, ".gitignore"), gitignoreTemplate);
43
43
  // Copy config.yaml from templates
44
44
  await writeFile(path.join(cwd, DIR_NAMES.WORKFLOW, "config.yaml"), configYamlTemplate);
45
+ ensureDir(path.join(cwd, DIR_NAMES.WORKFLOW, "config"));
46
+ await writeFile(path.join(cwd, DIR_NAMES.WORKFLOW, "config", "execution-strategy-rules.json"), executionStrategyRulesJson);
45
47
  // Create workspace/ with index.md
46
48
  ensureDir(path.join(cwd, PATHS.WORKSPACE));
47
49
  await writeFile(path.join(cwd, PATHS.WORKSPACE, "index.md"), replacePythonCommandLiterals(agentProgressIndexContent));
@@ -167,6 +169,10 @@ async function createSpecTemplates(cwd, projectType, packages, remoteSpecPackage
167
169
  name: "cursor-subagent-policy.md",
168
170
  content: guidesCursorSubagentPolicyContent,
169
171
  },
172
+ {
173
+ name: "execution-strategy.md",
174
+ content: guidesExecutionStrategyContent,
175
+ },
170
176
  {
171
177
  name: "cursor-context-injection-guide.md",
172
178
  content: guidesCursorContextInjectionGuideContent,
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AAEvC,4BAA4B;AAC5B,OAAO,EACL,yBAAyB;AACzB,gCAAgC;AAChC,mBAAmB,EACnB,gCAAgC,EAChC,gCAAgC,EAChC,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B;AAC3B,iCAAiC;AACjC,oBAAoB,EACpB,iCAAiC,EACjC,yBAAyB,EACzB,6BAA6B,EAC7B,kCAAkC,EAClC,gCAAgC,EAChC,8BAA8B;AAC9B,mBAAmB;AACnB,kBAAkB,EAClB,oCAAoC,EACpC,mCAAmC,EACnC,yCAAyC,EACzC,gC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CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;SAAM,CAAC;QACN,mBAAmB;QACnB,MAAM,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,GAC3B,MAAM,+BAA+B,CAAC;AAEvC,4BAA4B;AAC5B,OAAO,EACL,yBAAyB;AACzB,gCAAgC;AAChC,mBAAmB,EACnB,gCAAgC,EAChC,gCAAgC,EAChC,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B;AAC3B,iCAAiC;AACjC,oBAAoB,EACpB,iCAAiC,EACjC,yBAAyB,EACzB,6BAA6B,EAC7B,kCAAkC,EAClC,gCAAgC,EAChC,8BAA8B;AAC9B,mBAAmB;AACnB,kBAAkB,EAClB,oCAAoC,EACpC,mCAAmC,EACnC,yCAAyC,EACzC,gCAAgC,EAChC,qCAAqC,EACrC,iCAAiC,EACjC,8BAA8B,EAC9B,wCAAwC,GACzC,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EACL,eAAe,GAGhB,MAAM,8BAA8B,CAAC;AAsCtC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,GAA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AM,CAAC;QACN,mBAAmB;QACnB,MAAM,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.2.2",
3
+ "description": "v0.2.2 — smart-search wrapper path fix (backfilled manifest).",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**@blxzer/cursor-trellis 0.2.2 / @blxzer/cursor-trellis-core 0.2.2**\n\n### Fixed\n- fix: smart-search wrapper path resolution\n\n### Upgrade\n```bash\nnpm install -g @blxzer/cursor-trellis@0.2.2\ntrellis update\n```",
7
+ "migrations": [],
8
+ "notes": "Manifest backfilled for npm continuity; shipped without repo manifest."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.2.4",
3
+ "description": "v0.2.4 — aligned core/cli publish (backfilled manifest).",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**@blxzer/cursor-trellis 0.2.4 / @blxzer/cursor-trellis-core 0.2.4**\n\n### Changed\n- chore: synchronized @blxzer/cursor-trellis-core with CLI release line\n\n### Upgrade\n```bash\nnpm install -g @blxzer/cursor-trellis@0.2.4\ntrellis update\n```",
7
+ "migrations": [],
8
+ "notes": "Manifest backfilled for npm continuity."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.2.5",
3
+ "description": "v0.2.5 — smart-search bin wrapper path fix.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**@blxzer/cursor-trellis 0.2.5 / @blxzer/cursor-trellis-core 0.2.5**\n\n### Fixed\n- fix(bin): smart-search wrapper path under npm/bin/\n\n### Upgrade\n```bash\nnpm install -g @blxzer/cursor-trellis@0.2.5\ntrellis update\n```",
7
+ "migrations": [],
8
+ "notes": "Matches chore(release): 0.2.5 on main."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.2.6",
3
+ "description": "v0.2.6 — public docs expansion (skills, subagents, task-system).",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**@blxzer/cursor-trellis 0.2.6 / @blxzer/cursor-trellis-core 0.2.6**\n\n### Changed\n- docs: GitHub docs — workflow, retrieval, skills, subagents, task-system, spec-system\n- docs(community): Linux.do release companion doc\n\n### Upgrade\n```bash\nnpm install -g @blxzer/cursor-trellis@0.2.6\ntrellis update\n```",
7
+ "migrations": [],
8
+ "notes": "Published at 0.2.6; manifest added in 0.2.7 release train."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.2.7",
3
+ "description": "v0.2.7 — execution strategy suggest + contract-aware workflow dispatch.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**@blxzer/cursor-trellis 0.2.7 / @blxzer/cursor-trellis-core 0.2.7**\n\n### Added\n- feat(task): `suggest-execution-strategy`, `execution-strategy-rules.json`, drift WARN on `start-execution --check`\n- docs: `execution-strategy.md` guide; backfilled manifests 0.2.2–0.2.6\n\n### Changed\n- workflow: Phase 2 dispatch follows `execution_mode` (`worker` vs `inline` vs `child-task`)\n\nRun `trellis update` in each project.",
7
+ "migrations": [],
8
+ "notes": "Full code-touching tasks default-suggest worker + main-worktree; contract in implement.md remains authoritative."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.2.8",
3
+ "description": "v0.2.8 — Cursor platform adaptation Phase 0 + Phase 1+2: validate-rules gate, agent entry-points, cursor2plus safety, retrieval compliance, evidence pack, task path fallback.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**@blxzer/cursor-trellis 0.2.8 / @blxzer/cursor-trellis-core 0.2.8**\n\n### Added\n- feat(cursor): `trellis validate-rules` hard gate + `pnpm mirror-check` for rules/agents templates\n- feat(cursor): agent templates open with Entry points + Context source (Layer 2 PRIMARY)\n- feat(cursor2plus): Method 2.5 safety gate (`--approve`, `--check-compat`, `smoke.py`, Native safe-to-ignore)\n- feat(retrieval): BYOK/Native compliance, `unknown` conservative, LSP caveat, telemetry planned/executed split\n- feat(cli): task.py select fallback tip + `generate_dispatch_prompt.py --task` primary fallback\n- feat(retrieval): evidence pack integration (finish/check cite pack) + research prompt provider caveats\n\n### Changed\n- agent templates now open with Entry points / Context source sections\n- retrieval router: LSP/GO_TO_DEFINITION → codegraph + Read + caveat\n- `patch_wpelc8.py` bare invocation no longer implicit writes\n\nRun `trellis update` in each project.",
7
+ "migrations": [],
8
+ "notes": "init/update now run assertCursorRulesValid(); Cursor++ patch requires --approve; unknown cursorEnv routes conservatively to BYOK + warning."
9
+ }
@@ -20,7 +20,7 @@ Do **not** ask the user to hand-edit slugs (`model-xxxxx`) unless they prefer it
20
20
  - User says they use **Cursor++ BYOK** and want per–subagent-type models.
21
21
  - After Cursor++ **providers** change: re-list, adjust fallbacks, re-patch.
22
22
 
23
- Native **Cursor API** (no Cursor++): **stop** — frontmatter `model:` works; this skill does not apply.
23
+ Native **Cursor API** (no Cursor++): **stop** — frontmatter `model:` works; this skill does not apply. Tell the user: **`.trellis/local/cursor2plus/` is safe to ignore or delete** unless they use Cursor++ BYOK.
24
24
 
25
25
  ## Workflow
26
26
 
@@ -40,7 +40,7 @@ Native **Cursor API** (no Cursor++): **stop** — frontmatter `model:` works; th
40
40
  5. Run:
41
41
  ```bash
42
42
  python ./.trellis/local/cursor2plus/patch_wpelc8.py --print-map
43
- python ./.trellis/local/cursor2plus/patch_wpelc8.py
43
+ python ./.trellis/local/cursor2plus/patch_wpelc8.py --apply --approve
44
44
  ```
45
45
  6. Tell user: **Developer: Reload Window** in Cursor (once per patch).
46
46
  7. If stderr shows `WARN ... using fallback`, explain that primary was missing from current `providers.json` and fallback was used — suggest updating primary/fallback names, not panicking.
@@ -4,6 +4,18 @@ Wrap up the current session: archive the selected task (and any other completed-
4
4
 
5
5
  Before archive, confirm `verify.md` includes Phase 3.3 **Learning decision** (`update-spec` | `no-update` | `unsure`) and gate-compatible evidence per `.trellis/spec/guides/durable-learning-decision-guide.md`. Run `task.py archive <task> --check` when unsure.
6
6
 
7
+ ## Evidence pack reference (optional — graceful skip)
8
+
9
+ When the selected task has `{TASK}/research/retrieval-pack-latest.json` (written by the research-end `stop` hook via `get_context --mode retrieval-pack`, or by an explicit pack run during Phase 3.1):
10
+
11
+ 1. Read the JSON; note top `contextPack.selected` items (`title`, `source`, `reference`, `score`) and `collection` counts.
12
+ 2. Ensure `verify.md` includes an `## Evidence pack reference` section citing those ranked sources or documenting explicit gaps.
13
+ 3. If the section is missing, add it before proceeding to archive.
14
+
15
+ If the file does not exist: **skip silently** — no error, no user prompt. Pack absence is normal when the task did not use research/smart-search.
16
+
17
+ Pack format: `version`, `source` (`retrieval-pack-orchestrator`), `contextPack.selected[]`, `scoredEvidence`, `collection`. Smart-search manifests that feed scoring live under `{TASK}/research/smart-search/<run-id>/` (from `run_smart_search.py`).
18
+
7
19
  ## Step 1: Survey current state
8
20
 
9
21
  ```bash
@@ -1,164 +1,165 @@
1
- # Trellis Brainstorm
2
-
3
- ## Non-Negotiable Interview Contract
4
-
5
- Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
6
-
7
- Ask the questions one at a time.
8
-
9
- ## Non-Negotiable Evidence Rule
10
-
11
- If a question can be answered by exploring the codebase, explore the codebase instead.
12
-
13
- This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
14
-
15
- Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, or decisions that remain ambiguous after inspection.
16
-
17
- ---
18
-
19
- Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
20
-
21
- **Agent-capable platforms:** Do **not** use legacy Claude-only grill subagents as a hard gate. Complete **PRD Grill** (below) and **`trellis-micro-grill`** for blocking open questions before treating planning as ready for `design.md` / `implement.md` / `start-execution --check`.
22
-
23
- ## Preconditions
24
-
25
- Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
26
-
27
- If no task exists yet, create one:
28
-
29
- ```bash
30
- TASK_DIR=$(python ./.trellis/scripts/task.py create "<short task title>" --slug <slug>)
31
- ```
32
-
33
- Use a concise title from the user's request. Use a slug without a date prefix. `task.py create` adds the `MM-DD-` directory prefix automatically.
34
-
35
- `task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
36
-
37
- ## Two-phase planning overview
38
-
39
- | Phase | Name | User questions |
40
- | --- | --- | --- |
41
- | **A** | Discovery Before Questions + PRD draft | None until repo evidence is exhausted |
42
- | **B** | PRD Grill pass + Micro-grill unresolved | Only blocking business / risk / preference |
43
-
44
- External facts during Discovery or Research: load `smart-search-cli`; on CLI/doctor failure use Cursor WebSearch/WebFetch and persist under `{TASK}/research/` with `source: cursor-web-fallback`.
45
-
46
- ---
47
-
48
- ## Phase A — Discovery Before Questions
49
-
50
- Run **before** any user interview questions.
51
-
52
- Inspect and record in `prd.md` (sections: **Confirmed facts**, initial **Out of scope**, draft **Goal**):
53
-
54
- 1. **Code & tests** — relevant modules, fixtures, configs, error paths.
55
- 2. **Specs** — `.trellis/spec/` indexes and layer guides for touched packages.
56
- 3. **History** — archived tasks, active task research, developer journal when useful.
57
- 4. **Platform** — project platform hooks, agents, and skills (see `.trellis/spec/guides/cursor-subagent-policy.md` when using Cursor); shared `.agents/skills/` when behavior spans platforms.
58
- 5. **Parent/Child** — if multiple independent deliverables, note child split early in `prd.md`.
59
-
60
- Use retrieval per `.trellis/spec/guides/retrieval-daily-guide.md` (rg for literals, codegraph for structure, fast-context for semantic sweep).
61
-
62
- Dispatch **`trellis-research`** (writable Agent) when a topic needs a dedicated `{TASK}/research/<topic>.md` file; do **not** use a subagent for PRD Grill itself.
63
-
64
- ## Phase A — PRD draft
65
-
66
- After Discovery, flesh out `prd.md`:
67
-
68
- - goal and user value
69
- - confirmed facts (not restated as unverified requirements)
70
- - requirements
71
- - draft acceptance criteria
72
- - out of scope
73
- - open questions (tag **blocking** vs **nice-to-have**)
74
-
75
- For complex tasks, start `design.md` / `implement.md` skeletons only when boundaries are already clear from Discovery; otherwise wait until Phase B.
76
-
77
- ## Phase B — PRD Grill pass
78
-
79
- Treat `prd.md` (+ existing `design.md` fragments) as the **only document surface**. Run this checklist; fix the PRD in place (no new subagent):
80
-
81
- | # | Check |
82
- | --- | --- |
83
- | 1 | **Goal & user value** — single clear statement |
84
- | 2 | **Confirmed facts vs assumptions** — repo facts not listed as assumptions |
85
- | 3 | **Testable acceptance criteria** |
86
- | 4 | **Out of scope** explicit |
87
- | 5 | **Dependencies & sequencing** |
88
- | 6 | **Parent/Child & deliverables** when applicable |
89
- | 7 | **Research & external facts** — smart-search or documented fallback |
90
- | 8 | **Execution gate & artifacts** — `design.md` / `implement.md` / `verify.md` expectations |
91
- | 9 | **Durable Learning** — Phase 3.3 will need `update-spec` \| `no-update` \| `unsure` |
92
- | 10 | **Platform** — Cursor-first; PRD Grill in-session (no legacy grill-me / grill-with-docs subagent gate) |
93
- | 11 | **Risk & rollback** for complex tasks |
94
- | 12 | **Open questions** — only **blocking** strategic/preference items remain |
95
-
96
- ## Phase B — Micro-grill unresolved
97
-
98
- For each **blocking** open question after the checklist, embed the **`trellis-micro-grill` contract**:
99
-
100
- - exactly **one** question per message
101
- - **Simplified Chinese** for user-facing text
102
- - recommended answer + trade-off
103
- - **update `prd.md` after every answer** before the next question
104
-
105
- Stop micro-grill when no blocking open questions remain.
106
-
107
- Do not ask process questions ("should I search?"). Do not re-ask facts Discovery already confirmed.
108
-
109
- ## Question Rules (Phase B only)
110
-
111
- Each question must include:
112
-
113
- - the decision needed
114
- - why the answer matters
115
- - your recommended answer
116
- - the trade-off if the user chooses differently
117
-
118
- ## Artifact Rules
119
-
120
- `prd.md` records requirements and acceptance:
121
-
122
- - goal and user value
123
- - confirmed facts
124
- - requirements
125
- - acceptance criteria
126
- - out of scope
127
- - open questions that still block planning
128
-
129
- `design.md` records technical design for complex tasks:
130
-
131
- - architecture and boundaries
132
- - data flow and contracts
133
- - compatibility and migration notes
134
- - important trade-offs
135
- - operational or rollback considerations
136
-
137
- `implement.md` records execution planning for complex tasks:
138
-
139
- - ordered implementation checklist
140
- - validation commands
141
- - risky files or rollback points
142
- - follow-up checks before `task.py start-execution --check`
143
-
144
- Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start-execution --check`.
145
-
146
- `implement.md` is not a replacement for `implement.jsonl`. Use JSONL files only for manifest-style spec and research references when the task needs them.
147
-
148
- ## Completion criteria — PRD Grill done
149
-
150
- Planning is ready for execution gate when **all** hold:
151
-
152
- - PRD Grill checklist (12 items) satisfied or explicitly N/A with rationale in `prd.md`
153
- - **No blocking** open questions in `prd.md`
154
- - Acceptance criteria are testable; out of scope is explicit
155
- - Complex tasks: `design.md` and `implement.md` present
156
- - User reviewed artifacts or explicitly approved proceeding
157
-
158
- Then proceed to Phase 1.2 Research (if needed), Phase 1.4 `task.py start-execution --check`, and implementation only after user approval.
159
-
160
- Do not start implementation until the user approves or asks for implementation.
161
-
162
- ## Legacy planning flow (summary)
163
-
1
+ # Trellis Brainstorm
2
+
3
+ ## Non-Negotiable Interview Contract
4
+
5
+ Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
6
+
7
+ Ask the questions one at a time.
8
+
9
+ ## Non-Negotiable Evidence Rule
10
+
11
+ If a question can be answered by exploring the codebase, explore the codebase instead.
12
+
13
+ This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
14
+
15
+ Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, or decisions that remain ambiguous after inspection.
16
+
17
+ ---
18
+
19
+ Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
20
+
21
+ **Agent-capable platforms:** Do **not** use legacy Claude-only grill subagents as a hard gate. Complete **PRD Grill** (below) and **`trellis-micro-grill`** for blocking open questions before treating planning as ready for `design.md` / `implement.md` / `start-execution --check`.
22
+
23
+ ## Preconditions
24
+
25
+ Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
26
+
27
+ If no task exists yet, create one:
28
+
29
+ ```bash
30
+ TASK_DIR=$(python ./.trellis/scripts/task.py create "<short task title>" --slug <slug>)
31
+ ```
32
+
33
+ Use a concise title from the user's request. Use a slug without a date prefix. `task.py create` adds the `MM-DD-` directory prefix automatically.
34
+
35
+ `task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
36
+
37
+ ## Two-phase planning overview
38
+
39
+ | Phase | Name | User questions |
40
+ | --- | --- | --- |
41
+ | **A** | Discovery Before Questions + PRD draft | None until repo evidence is exhausted |
42
+ | **B** | PRD Grill pass + Micro-grill unresolved | Only blocking business / risk / preference |
43
+
44
+ External facts during Discovery or Research: load `smart-search-cli`; on CLI/doctor failure use Cursor WebSearch/WebFetch and persist under `{TASK}/research/` with `source: cursor-web-fallback`.
45
+
46
+ ---
47
+
48
+ ## Phase A — Discovery Before Questions
49
+
50
+ Run **before** any user interview questions.
51
+
52
+ Inspect and record in `prd.md` (sections: **Confirmed facts**, initial **Out of scope**, draft **Goal**):
53
+
54
+ 1. **Code & tests** — relevant modules, fixtures, configs, error paths.
55
+ 2. **Specs** — `.trellis/spec/` indexes and layer guides for touched packages.
56
+ 3. **History** — archived tasks, active task research, developer journal when useful.
57
+ 4. **Platform** — project platform hooks, agents, and skills (see `.trellis/spec/guides/cursor-subagent-policy.md` when using Cursor); shared `.agents/skills/` when behavior spans platforms.
58
+ 5. **Parent/Child** — if multiple independent deliverables, note child split early in `prd.md`.
59
+
60
+ Use retrieval per `.trellis/spec/guides/retrieval-daily-guide.md` (rg for literals, codegraph for structure, fast-context for semantic sweep).
61
+
62
+ Dispatch **`trellis-research`** (writable Agent) when a topic needs a dedicated `{TASK}/research/<topic>.md` file; do **not** use a subagent for PRD Grill itself.
63
+
64
+ ## Phase A — PRD draft
65
+
66
+ After Discovery, flesh out `prd.md`:
67
+
68
+ - goal and user value
69
+ - confirmed facts (not restated as unverified requirements)
70
+ - requirements
71
+ - draft acceptance criteria
72
+ - out of scope
73
+ - open questions (tag **blocking** vs **nice-to-have**)
74
+
75
+ For complex tasks, start `design.md` / `implement.md` skeletons only when boundaries are already clear from Discovery; otherwise wait until Phase B.
76
+
77
+ ## Phase B — PRD Grill pass
78
+
79
+ Treat `prd.md` (+ existing `design.md` fragments) as the **only document surface**. Run this checklist; fix the PRD in place (no new subagent):
80
+
81
+ | # | Check |
82
+ | --- | --- |
83
+ | 1 | **Goal & user value** — single clear statement |
84
+ | 2 | **Confirmed facts vs assumptions** — repo facts not listed as assumptions |
85
+ | 3 | **Testable acceptance criteria** |
86
+ | 4 | **Out of scope** explicit |
87
+ | 5 | **Dependencies & sequencing** |
88
+ | 6 | **Parent/Child & deliverables** when applicable |
89
+ | 7 | **Research & external facts** — smart-search or documented fallback |
90
+ | 8 | **Execution gate & artifacts** — `design.md` / `implement.md` / `verify.md` expectations |
91
+ | 9 | **Durable Learning** — Phase 3.3 will need `update-spec` \| `no-update` \| `unsure` |
92
+ | 10 | **Platform** — Cursor-first; PRD Grill in-session (no legacy grill-me / grill-with-docs subagent gate) |
93
+ | 11 | **Risk & rollback** for complex tasks |
94
+ | 12 | **Open questions** — only **blocking** strategic/preference items remain |
95
+
96
+ ## Phase B — Micro-grill unresolved
97
+
98
+ For each **blocking** open question after the checklist, embed the **`trellis-micro-grill` contract**:
99
+
100
+ - exactly **one** question per message
101
+ - **Simplified Chinese** for user-facing text
102
+ - recommended answer + trade-off
103
+ - **update `prd.md` after every answer** before the next question
104
+
105
+ Stop micro-grill when no blocking open questions remain.
106
+
107
+ Do not ask process questions ("should I search?"). Do not re-ask facts Discovery already confirmed.
108
+
109
+ ## Question Rules (Phase B only)
110
+
111
+ Each question must include:
112
+
113
+ - the decision needed
114
+ - why the answer matters
115
+ - your recommended answer
116
+ - the trade-off if the user chooses differently
117
+
118
+ ## Artifact Rules
119
+
120
+ `prd.md` records requirements and acceptance:
121
+
122
+ - goal and user value
123
+ - confirmed facts
124
+ - requirements
125
+ - acceptance criteria
126
+ - out of scope
127
+ - open questions that still block planning
128
+
129
+ `design.md` records technical design for complex tasks:
130
+
131
+ - architecture and boundaries
132
+ - data flow and contracts
133
+ - compatibility and migration notes
134
+ - important trade-offs
135
+ - operational or rollback considerations
136
+
137
+ `implement.md` records execution planning for complex tasks:
138
+
139
+ - ordered implementation checklist
140
+ - validation commands
141
+ - risky files or rollback points
142
+ - **Development Strategy Contract** (`execution_mode`, `isolation`, …): before finalizing, run `python3 ./.trellis/scripts/task.py suggest-execution-strategy <task-dir>` (or `--json`); reconcile suggestion with scope, then paste the approved YAML block into `implement.md`
143
+ - follow-up checks before `task.py start-execution --check`
144
+
145
+ Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start-execution --check`.
146
+
147
+ `implement.md` is not a replacement for `implement.jsonl`. Use JSONL files only for manifest-style spec and research references when the task needs them.
148
+
149
+ ## Completion criteria — PRD Grill done
150
+
151
+ Planning is ready for execution gate when **all** hold:
152
+
153
+ - PRD Grill checklist (12 items) satisfied or explicitly N/A with rationale in `prd.md`
154
+ - **No blocking** open questions in `prd.md`
155
+ - Acceptance criteria are testable; out of scope is explicit
156
+ - Complex tasks: `design.md` and `implement.md` present
157
+ - User reviewed artifacts or explicitly approved proceeding
158
+
159
+ Then proceed to Phase 1.2 Research (if needed), Phase 1.4 `task.py start-execution --check`, and implementation only after user approval.
160
+
161
+ Do not start implementation until the user approves or asks for implementation.
162
+
163
+ ## Legacy planning flow (summary)
164
+
164
165
  The former single "Planning Flow" is now Phase A + B above. Steps 4–6 map to Phase B micro-grill and artifact updates.
@@ -70,6 +70,10 @@ Run the project's lint, type-check, and test commands. Fix any failures before p
70
70
  - [ ] **`verify.md` lists unresolved retrieval gaps** — external facts still unverified, missing `research/` or `research/smart-search/` evidence, or claims without source/Git/test corroboration
71
71
  - [ ] If `{TASK}/research/retrieval-pack-latest.json` exists, top `contextPack.selected` items are cited or gaps are explicitly noted in `verify.md`
72
72
 
73
+ **Evidence pack (graceful):** Path `{TASK}/research/retrieval-pack-latest.json`. If absent, skip — no error.
74
+
75
+ When present, Read the pack and ensure `verify.md` has `## Evidence pack reference` citing `contextPack.selected` (`title`, `source`, `reference`, `score`) or explicit gaps. Empty `selected` with existing `research/` → note stale pack or scoring failure in `verify.md`.
76
+
73
77
  ## Step 5: Cross-Layer Dimensions (if applicable)
74
78
 
75
79
  Skip this step if your change is confined to a single layer.