@blxzer/cursor-trellis 0.2.7 → 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.
- package/CHANGELOG.md +170 -133
- package/README.md +14 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +18 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +8 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +4 -0
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/validate-rules.d.ts +6 -0
- package/dist/commands/validate-rules.d.ts.map +1 -0
- package/dist/commands/validate-rules.js +33 -0
- package/dist/commands/validate-rules.js.map +1 -0
- package/dist/configurators/cursor2plus-local.d.ts.map +1 -1
- package/dist/configurators/cursor2plus-local.js +2 -1
- package/dist/configurators/cursor2plus-local.js.map +1 -1
- package/dist/migrations/manifests/0.2.2.json +8 -8
- package/dist/migrations/manifests/0.2.4.json +8 -8
- package/dist/migrations/manifests/0.2.5.json +8 -8
- package/dist/migrations/manifests/0.2.6.json +8 -8
- package/dist/migrations/manifests/0.2.7.json +8 -8
- package/dist/migrations/manifests/0.2.8.json +9 -0
- package/dist/templates/common/bundled-skills/trellis-cursor2plus-setup/SKILL.md +2 -2
- package/dist/templates/common/commands/finish-work.md +12 -0
- package/dist/templates/common/skills/check.md +4 -0
- package/dist/templates/cursor/agents/trellis-check.md +32 -0
- package/dist/templates/cursor/agents/trellis-implement.md +11 -0
- package/dist/templates/cursor/agents/trellis-research.md +29 -0
- package/dist/templates/cursor/fixtures/expected-rules.d.ts +14 -0
- package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -0
- package/dist/templates/cursor/fixtures/expected-rules.js +26 -0
- package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -0
- package/dist/templates/cursor/rules/trellis-subagent-dispatch.mdc +34 -0
- package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +42 -42
- package/dist/templates/trellis/config/execution-strategy-rules.json +30 -30
- package/dist/templates/trellis/local/README.md +61 -37
- package/dist/templates/trellis/local/index.d.ts +1 -0
- package/dist/templates/trellis/local/index.d.ts.map +1 -1
- package/dist/templates/trellis/local/index.js +1 -0
- package/dist/templates/trellis/local/index.js.map +1 -1
- package/dist/templates/trellis/local/patch_wpelc8.py +162 -38
- package/dist/templates/trellis/local/smoke.py +94 -0
- package/dist/templates/trellis/scripts/common/codebase_retrieval_router.py +2 -2
- package/dist/templates/trellis/scripts/common/cursor_retrieval_env.py +16 -2
- package/dist/templates/trellis/scripts/common/execution_strategy.py +267 -267
- package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +26 -7
- package/dist/templates/trellis/scripts/common/semantic_plan_gate.py +18 -4
- package/dist/templates/trellis/scripts/task.py +12 -0
- package/dist/utils/codebase-retrieval-router.js +2 -2
- package/dist/utils/codebase-retrieval-router.js.map +1 -1
- package/dist/utils/cursor-retrieval-env.d.ts +2 -0
- package/dist/utils/cursor-retrieval-env.d.ts.map +1 -1
- package/dist/utils/cursor-retrieval-env.js +11 -2
- package/dist/utils/cursor-retrieval-env.js.map +1 -1
- package/dist/utils/mirror-check.d.ts +22 -0
- package/dist/utils/mirror-check.d.ts.map +1 -0
- package/dist/utils/mirror-check.js +90 -0
- package/dist/utils/mirror-check.js.map +1 -0
- package/dist/utils/normalize-text.d.ts +7 -0
- package/dist/utils/normalize-text.d.ts.map +1 -0
- package/dist/utils/normalize-text.js +16 -0
- package/dist/utils/normalize-text.js.map +1 -0
- package/dist/utils/retrieval-agent-instructions.d.ts.map +1 -1
- package/dist/utils/retrieval-agent-instructions.js +14 -7
- package/dist/utils/retrieval-agent-instructions.js.map +1 -1
- package/dist/utils/retrieval-execution-telemetry.d.ts +12 -3
- package/dist/utils/retrieval-execution-telemetry.d.ts.map +1 -1
- package/dist/utils/retrieval-execution-telemetry.js +37 -1
- package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
- package/dist/utils/retrieval-tool-classification.d.ts +2 -0
- package/dist/utils/retrieval-tool-classification.d.ts.map +1 -1
- package/dist/utils/retrieval-tool-classification.js +13 -0
- package/dist/utils/retrieval-tool-classification.js.map +1 -1
- package/dist/utils/semantic-plan-gate.d.ts.map +1 -1
- package/dist/utils/semantic-plan-gate.js +11 -4
- package/dist/utils/semantic-plan-gate.js.map +1 -1
- package/dist/utils/validate-rules.d.ts +21 -0
- package/dist/utils/validate-rules.d.ts.map +1 -0
- package/dist/utils/validate-rules.js +88 -0
- package/dist/utils/validate-rules.js.map +1 -0
- 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,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,yBAAyB,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAClE,OAAO;IACT,CAAC;IAED,MAAM,cAAc,GAAG,qBAAqB,EAAE,CAAC;IAC/C,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC;QACvB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC,CAAC;QACrE,OAAO,CAAC,KAAK,CAAC,0BAA0B,CAAC,cAAc,CAAC,CAAC,CAAC;QAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC,CAAC;IAE3D,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;QAC1B,OAAO;IACT,CAAC;IAED,IAAI,CAAC;QACH,sBAAsB,CAAC,GAAG,CAAC,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,sCAAsC,GAAG,GAAG,CAAC,CAAC,CAAC;IACzE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EACnB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAC/C,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cursor2plus-local.d.ts","sourceRoot":"","sources":["../../src/configurators/cursor2plus-local.ts"],"names":[],"mappings":"
|
|
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,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,qCAAqC,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,GAAW;IAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACtD,SAAS,CAAC,SAAS,CAAC,CAAC;IAErB,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,EAAE,sBAAsB,CAAC,CAAC;IACjF,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,+BAA+B,CAAC,EACrD,yBAAyB,CAC1B,CAAC;IACF,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE,iBAAiB,CAAC,CAAC;IACtE,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,EACjD,wBAAwB,CACzB,CAAC;IAEF,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,8BAA8B,CAAC,EACpD,qBAAqB,CACtB,CAAC;IACF,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mCAAmC,CAAC,EACzD,6BAA6B,CAC9B,CAAC;AACJ,CAAC"}
|
|
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,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,qCAAqC,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,GAAW;IAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IACtD,SAAS,CAAC,SAAS,CAAC,CAAC;IAErB,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,EAAE,sBAAsB,CAAC,CAAC;IACjF,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,+BAA+B,CAAC,EACrD,yBAAyB,CAC1B,CAAC;IACF,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,sBAAsB,CAAC,CAAC;IAC1E,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE,iBAAiB,CAAC,CAAC;IACtE,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,2BAA2B,CAAC,EACjD,wBAAwB,CACzB,CAAC;IAEF,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,8BAA8B,CAAC,EACpD,qBAAqB,CACtB,CAAC;IACF,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mCAAmC,CAAC,EACzD,6BAA6B,CAC9B,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +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."
|
|
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
9
|
}
|
|
@@ -1,9 +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."
|
|
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
9
|
}
|
|
@@ -1,9 +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."
|
|
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
9
|
}
|
|
@@ -1,9 +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."
|
|
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
9
|
}
|
|
@@ -1,9 +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."
|
|
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
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
|
|
@@ -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.
|
|
@@ -3,6 +3,17 @@ name: trellis-check
|
|
|
3
3
|
description: Trellis quality check agent. Use this exact agent for Trellis task verification, check.jsonl context injection, and self-fixing code review. Do not use generic/default/generalPurpose agents for Trellis checks.
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
5
5
|
---
|
|
6
|
+
|
|
7
|
+
## Entry points
|
|
8
|
+
|
|
9
|
+
- **Agent session:** Open this agent file manually in a new chat — context from this file + your main-session prompt.
|
|
10
|
+
- **Task dispatch:** Run `python ./.trellis/scripts/generate_dispatch_prompt.py --agent check` → pass stdout as `Task(..., prompt=...)` — context from the Layer 2 prompt.
|
|
11
|
+
|
|
12
|
+
## Context source
|
|
13
|
+
|
|
14
|
+
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(trellis-check)`.
|
|
15
|
+
- **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
|
|
16
|
+
|
|
6
17
|
# Check Agent
|
|
7
18
|
|
|
8
19
|
You are the Check Agent in the Trellis workflow.
|
|
@@ -107,6 +118,27 @@ If failed, fix issues and re-run.
|
|
|
107
118
|
- [ ] **`verify.md` lists unresolved retrieval gaps** (unverified external facts, missing `research/` or `research/smart-search/` evidence, claims without source/Git/test proof)
|
|
108
119
|
- [ ] If `{TASK}/research/retrieval-pack-latest.json` exists (research-end hook), cite top ranked items or document gaps in `verify.md`
|
|
109
120
|
|
|
121
|
+
**Evidence pack (graceful):** Pack path is `{TASK}/research/retrieval-pack-latest.json`. If missing, skip this block — no error.
|
|
122
|
+
|
|
123
|
+
When the pack exists:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Optional: confirm path from selected task
|
|
127
|
+
python ./.trellis/scripts/task.py selected --source
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Read `{TASK}/research/retrieval-pack-latest.json` and use `contextPack.selected` (top items: `title`, `source`, `reference`, `score`). Add or update `verify.md` with:
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
## Evidence pack reference
|
|
134
|
+
|
|
135
|
+
- Pack: `{TASK}/research/retrieval-pack-latest.json` (contextPack.selected=N, artifacts=M, smart-search=K)
|
|
136
|
+
- Cited: <title> — <source> — <reference>
|
|
137
|
+
- Gaps: <any high-score omitted items or unverified external claims>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
If `contextPack.selected` is empty but research artifacts exist, document why (budget, failed manifests, or stale pack) instead of silently ignoring the pack.
|
|
141
|
+
|
|
110
142
|
---
|
|
111
143
|
|
|
112
144
|
## Report Format
|
|
@@ -3,6 +3,17 @@ name: trellis-implement
|
|
|
3
3
|
description: Trellis implementation agent. Use this exact agent for Trellis task implementation, implement.jsonl context injection, and hook-injection tests. Do not use generic/default/generalPurpose agents for Trellis implementation. No git commit allowed.
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
5
5
|
---
|
|
6
|
+
|
|
7
|
+
## Entry points
|
|
8
|
+
|
|
9
|
+
- **Agent session:** Open this agent file manually in a new chat — context from this file + your main-session prompt.
|
|
10
|
+
- **Task dispatch:** Run `python ./.trellis/scripts/generate_dispatch_prompt.py --agent implement` → pass stdout as `Task(..., prompt=...)` — context from the Layer 2 prompt.
|
|
11
|
+
|
|
12
|
+
## Context source
|
|
13
|
+
|
|
14
|
+
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(trellis-implement)`.
|
|
15
|
+
- **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
|
|
16
|
+
|
|
6
17
|
# Implement Agent
|
|
7
18
|
|
|
8
19
|
You are the Implement Agent in the Trellis workflow.
|
|
@@ -3,6 +3,17 @@ name: trellis-research
|
|
|
3
3
|
description: Trellis research agent. Use this exact agent for Trellis task research and research/ persistence. Do not use generic/default/generalPurpose agents for Trellis research.
|
|
4
4
|
tools: Read, Write, Glob, Grep, Bash, WebSearch, WebFetch, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
|
|
5
5
|
---
|
|
6
|
+
|
|
7
|
+
## Entry points
|
|
8
|
+
|
|
9
|
+
- **Agent session:** Open this agent file manually in a new chat — context from this file + your main-session prompt.
|
|
10
|
+
- **Task dispatch:** Run `python ./.trellis/scripts/generate_dispatch_prompt.py --agent research` → pass stdout as `Task(..., prompt=...)` — context from the Layer 2 prompt.
|
|
11
|
+
|
|
12
|
+
## Context source
|
|
13
|
+
|
|
14
|
+
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(trellis-research)`.
|
|
15
|
+
- **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
|
|
16
|
+
|
|
6
17
|
# Research Agent
|
|
7
18
|
|
|
8
19
|
You are the Research Agent in the Trellis workflow.
|
|
@@ -55,6 +66,24 @@ Classify: internal / external / mixed. Determine scope (global / specific direct
|
|
|
55
66
|
|
|
56
67
|
Run independent searches in parallel (Glob + Grep + smart-search CLI for external topics) for efficiency.
|
|
57
68
|
|
|
69
|
+
#### External search — provider relevance caveats
|
|
70
|
+
|
|
71
|
+
- **Context7** and generic third-party library docs are often **irrelevant** to Trellis/Cursor platform questions. Prefer **Cursor / Cursor++ official documentation**, `docs.cursor.com`, and **local `.trellis/spec/`** before trusting Context7 hits.
|
|
72
|
+
- Every smart-search result you persist must **label the provider source** (e.g. `exa`, `context7`, `cursor-docs`, `tavily`) in the research file — in frontmatter or per bullet — so downstream check/finish can audit provenance.
|
|
73
|
+
- Trellis harness facts: `./.trellis/scripts/run_smart_search.py` writes manifests under `{TASK}/research/smart-search/<run-id>/`; scored pack output (when built) is `{TASK}/research/retrieval-pack-latest.json`.
|
|
74
|
+
|
|
75
|
+
#### External search — manual query refinement
|
|
76
|
+
|
|
77
|
+
When the first smart-search pass returns irrelevant results, **refine before falling back** to Cursor web tools:
|
|
78
|
+
|
|
79
|
+
1. Add site scope: `site:cursor.com`, `site:docs.cursor.com`, or `site:github.com/cursor-ide`
|
|
80
|
+
2. Add product scope: `+Trellis`, `+cursor-trellis`, or the exact API/hook name
|
|
81
|
+
3. Switch route: `--intent official-source --include-domain cursor.com` or `--intent docs` for API reference
|
|
82
|
+
4. Narrow time or topic: shorter query, version number, or feature name from local spec
|
|
83
|
+
5. Re-run: `python ./.trellis/scripts/run_smart_search.py "<refined query>" --intent deep-research --json`
|
|
84
|
+
|
|
85
|
+
Only use Cursor WebSearch/WebFetch when smart-search is unavailable (`not_configured` / `failed` / timeout) — then persist with `source: cursor-web-fallback`.
|
|
86
|
+
|
|
58
87
|
### Step 4: Persist Each Topic
|
|
59
88
|
|
|
60
89
|
For each distinct research topic, Write a markdown file at `{TASK_DIR}/research/<topic-slug>.md`. Use the File Format below.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expected Cursor rules manifest for validate-rules hard gate.
|
|
3
|
+
* Update alongside rule content changes in templates/cursor/rules/.
|
|
4
|
+
*/
|
|
5
|
+
export interface ExpectedRule {
|
|
6
|
+
/** Filename including .mdc extension, e.g. "trellis-triage.mdc" */
|
|
7
|
+
filename: string;
|
|
8
|
+
/** Substrings that must appear in rule body (case-sensitive) */
|
|
9
|
+
requiredSections: string[];
|
|
10
|
+
/** Minimum byte length of normalized rule content */
|
|
11
|
+
minBytes: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const expectedRules: ExpectedRule[];
|
|
14
|
+
//# sourceMappingURL=expected-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expected-rules.d.ts","sourceRoot":"","sources":["../../../../src/templates/cursor/fixtures/expected-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,EAAE,YAAY,EAoBvC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expected Cursor rules manifest for validate-rules hard gate.
|
|
3
|
+
* Update alongside rule content changes in templates/cursor/rules/.
|
|
4
|
+
*/
|
|
5
|
+
export const expectedRules = [
|
|
6
|
+
{
|
|
7
|
+
filename: "trellis-triage.mdc",
|
|
8
|
+
requiredSections: [
|
|
9
|
+
"Decision tree",
|
|
10
|
+
"Classification mark",
|
|
11
|
+
"Consent gate",
|
|
12
|
+
],
|
|
13
|
+
minBytes: 500,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
filename: "trellis-subagent-dispatch.mdc",
|
|
17
|
+
requiredSections: ["Layer 2", "generate_dispatch_prompt", "CLI"],
|
|
18
|
+
minBytes: 400,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
filename: "retrieval-routing.mdc",
|
|
22
|
+
requiredSections: ["Native", "BYOK", "codegraph", "smart-search"],
|
|
23
|
+
minBytes: 600,
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
//# sourceMappingURL=expected-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expected-rules.js","sourceRoot":"","sources":["../../../../src/templates/cursor/fixtures/expected-rules.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C;QACE,QAAQ,EAAE,oBAAoB;QAC9B,gBAAgB,EAAE;YAChB,eAAe;YACf,qBAAqB;YACrB,cAAc;SACf;QACD,QAAQ,EAAE,GAAG;KACd;IACD;QACE,QAAQ,EAAE,+BAA+B;QACzC,gBAAgB,EAAE,CAAC,SAAS,EAAE,0BAA0B,EAAE,KAAK,CAAC;QAChE,QAAQ,EAAE,GAAG;KACd;IACD;QACE,QAAQ,EAAE,uBAAuB;QACjC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC;QACjE,QAAQ,EAAE,GAAG;KACd;CACF,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Trellis subagent dispatch — generate dispatch prompt via CLI before Task tool (hook injection is broken in Cursor 3.8.22; this rule is the D-1 workaround)"
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Trellis Subagent Dispatch (CLI Layer 2 — MANDATORY)
|
|
7
|
+
|
|
8
|
+
**CLI Layer 2 is the primary Cursor path.** The `preToolUse` hook does NOT fire for the Task tool in Cursor 3.8.22. Agent definition body does NOT enter subagent system prompt. The ONLY reliable context channel is the `Task` tool's `prompt` parameter.
|
|
9
|
+
|
|
10
|
+
## Rule
|
|
11
|
+
|
|
12
|
+
Before calling `Task(subagent_type="trellis-research|trellis-implement|trellis-check", ...)` you MUST:
|
|
13
|
+
|
|
14
|
+
1. Generate a complete dispatch prompt via CLI:
|
|
15
|
+
|
|
16
|
+
```powershell
|
|
17
|
+
python ./.trellis/scripts/generate_dispatch_prompt.py --agent <research|implement|check> --task "<task-path>" --repo-root "<repo-root>"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
2. Use the CLI output as the `prompt` parameter value for `Task(...)`.
|
|
21
|
+
|
|
22
|
+
3. Append any additional user instructions AFTER the generated prompt, separated by `\n\n---\n\n`.
|
|
23
|
+
|
|
24
|
+
## Why
|
|
25
|
+
|
|
26
|
+
The generated prompt carries role identity ("You are the Trellis Research/Implement/Check Agent"), write scope constraints, recursion guard, and dynamic context (prd.md, design.md, implement.md, spec tree, jsonl files). Without this, the subagent receives only a bare user instruction with no Trellis context.
|
|
27
|
+
|
|
28
|
+
## Auto-detection
|
|
29
|
+
|
|
30
|
+
If `--task` is omitted, the script resolves the currently selected task. If `--repo-root` is omitted, it auto-detects via `.trellis` or `.git` upward search.
|
|
31
|
+
|
|
32
|
+
## Exception
|
|
33
|
+
|
|
34
|
+
This rule does NOT apply to `generalPurpose`, `explore`, `shell`, or other non-Trellis subagent types. Only `trellis-research`, `trellis-implement`, `trellis-check` require CLI-generated prompts.
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
# Execution strategy (execution_mode / isolation)
|
|
2
|
-
|
|
3
|
-
> **Purpose**: Suggest a Development Strategy Contract before you freeze `implement.md`, and align Phase 2 dispatch with the approved contract.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Two orthogonal dimensions
|
|
8
|
-
|
|
9
|
-
| Field | Question |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| `execution_mode` | **Who** implements and checks? (`inline` main session, `worker` trellis-implement/check agents, `child-task` Child worker) |
|
|
12
|
-
| `isolation` | **Where** are files edited? (`main-worktree` vs `git-worktree` for Child) |
|
|
13
|
-
|
|
14
|
-
Non-git repo roots do **not** force `inline` for code Full tasks; they only affect whether `git-worktree` / `prepare-child-worktree` is recommended.
|
|
15
|
-
|
|
16
|
-
## Suggest (planning)
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
python3 ./.trellis/scripts/task.py suggest-execution-strategy <task-dir>
|
|
20
|
-
python3 ./.trellis/scripts/task.py suggest-execution-strategy <task-dir> --json
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Run during brainstorm / before finalizing the YAML block in `implement.md`. Reconcile suggestion with product intent; the contract in `implement.md` is authoritative after approval.
|
|
24
|
-
|
|
25
|
-
## Default policy (v1)
|
|
26
|
-
|
|
27
|
-
| Profile / signal | Suggested `execution_mode` | Suggested `isolation` |
|
|
28
|
-
| --- | --- | --- |
|
|
29
|
-
| Lite | (no contract) | — |
|
|
30
|
-
| Full + touches code | `worker` | `main-worktree` |
|
|
31
|
-
| Full + doc-only capabilities | `inline` | `main-worktree` |
|
|
32
|
-
| Parent / has children | `inline` | `main-worktree` |
|
|
33
|
-
| Child (`task.json` parent set) | `child-task` | `git-worktree` when git package root resolves; else `main-worktree` + WARN |
|
|
34
|
-
|
|
35
|
-
`touches_code` is deterministic: code `optional_capabilities`, `package`/`scope` path segments (`src`, `packages`, `scripts`, …), or Full with `design.md` and non-doc-only capabilities. Rules live in `.trellis/config/execution-strategy-rules.json`.
|
|
36
|
-
|
|
37
|
-
## Drift warning (preflight)
|
|
38
|
-
|
|
39
|
-
`task.py start-execution <task> --check` prints `[execution-strategy] WARN` when the approved contract differs from a fresh suggestion. **Advisory only** — does not fail the gate.
|
|
40
|
-
|
|
41
|
-
## Phase 2 alignment
|
|
42
|
-
|
|
1
|
+
# Execution strategy (execution_mode / isolation)
|
|
2
|
+
|
|
3
|
+
> **Purpose**: Suggest a Development Strategy Contract before you freeze `implement.md`, and align Phase 2 dispatch with the approved contract.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Two orthogonal dimensions
|
|
8
|
+
|
|
9
|
+
| Field | Question |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `execution_mode` | **Who** implements and checks? (`inline` main session, `worker` trellis-implement/check agents, `child-task` Child worker) |
|
|
12
|
+
| `isolation` | **Where** are files edited? (`main-worktree` vs `git-worktree` for Child) |
|
|
13
|
+
|
|
14
|
+
Non-git repo roots do **not** force `inline` for code Full tasks; they only affect whether `git-worktree` / `prepare-child-worktree` is recommended.
|
|
15
|
+
|
|
16
|
+
## Suggest (planning)
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
python3 ./.trellis/scripts/task.py suggest-execution-strategy <task-dir>
|
|
20
|
+
python3 ./.trellis/scripts/task.py suggest-execution-strategy <task-dir> --json
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Run during brainstorm / before finalizing the YAML block in `implement.md`. Reconcile suggestion with product intent; the contract in `implement.md` is authoritative after approval.
|
|
24
|
+
|
|
25
|
+
## Default policy (v1)
|
|
26
|
+
|
|
27
|
+
| Profile / signal | Suggested `execution_mode` | Suggested `isolation` |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| Lite | (no contract) | — |
|
|
30
|
+
| Full + touches code | `worker` | `main-worktree` |
|
|
31
|
+
| Full + doc-only capabilities | `inline` | `main-worktree` |
|
|
32
|
+
| Parent / has children | `inline` | `main-worktree` |
|
|
33
|
+
| Child (`task.json` parent set) | `child-task` | `git-worktree` when git package root resolves; else `main-worktree` + WARN |
|
|
34
|
+
|
|
35
|
+
`touches_code` is deterministic: code `optional_capabilities`, `package`/`scope` path segments (`src`, `packages`, `scripts`, …), or Full with `design.md` and non-doc-only capabilities. Rules live in `.trellis/config/execution-strategy-rules.json`.
|
|
36
|
+
|
|
37
|
+
## Drift warning (preflight)
|
|
38
|
+
|
|
39
|
+
`task.py start-execution <task> --check` prints `[execution-strategy] WARN` when the approved contract differs from a fresh suggestion. **Advisory only** — does not fail the gate.
|
|
40
|
+
|
|
41
|
+
## Phase 2 alignment
|
|
42
|
+
|
|
43
43
|
See `workflow.md` Phase 2.1 / 2.2 tables: spawn `trellis-implement` / `trellis-check` only when `execution_mode: worker`.
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1,
|
|
3
|
-
"doc_only_capabilities": [
|
|
4
|
-
"markdown-documentation"
|
|
5
|
-
],
|
|
6
|
-
"code_capabilities": [
|
|
7
|
-
"cli-templates",
|
|
8
|
-
"python-task-scripts",
|
|
9
|
-
"vitest-integration",
|
|
10
|
-
"typescript",
|
|
11
|
-
"python"
|
|
12
|
-
],
|
|
13
|
-
"code_path_segments": [
|
|
14
|
-
"src",
|
|
15
|
-
"packages",
|
|
16
|
-
"scripts",
|
|
17
|
-
"lib"
|
|
18
|
-
],
|
|
19
|
-
"pair_warnings": [
|
|
20
|
-
{
|
|
21
|
-
"execution_mode": "worker",
|
|
22
|
-
"isolation": "git-worktree",
|
|
23
|
-
"message": "worker usually runs in main-worktree; git-worktree is rare for trellis-implement"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"execution_mode": "inline",
|
|
27
|
-
"isolation": "git-worktree",
|
|
28
|
-
"message": "inline + git-worktree is unusual; consider child-task if isolation is intentional"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"doc_only_capabilities": [
|
|
4
|
+
"markdown-documentation"
|
|
5
|
+
],
|
|
6
|
+
"code_capabilities": [
|
|
7
|
+
"cli-templates",
|
|
8
|
+
"python-task-scripts",
|
|
9
|
+
"vitest-integration",
|
|
10
|
+
"typescript",
|
|
11
|
+
"python"
|
|
12
|
+
],
|
|
13
|
+
"code_path_segments": [
|
|
14
|
+
"src",
|
|
15
|
+
"packages",
|
|
16
|
+
"scripts",
|
|
17
|
+
"lib"
|
|
18
|
+
],
|
|
19
|
+
"pair_warnings": [
|
|
20
|
+
{
|
|
21
|
+
"execution_mode": "worker",
|
|
22
|
+
"isolation": "git-worktree",
|
|
23
|
+
"message": "worker usually runs in main-worktree; git-worktree is rare for trellis-implement"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"execution_mode": "inline",
|
|
27
|
+
"isolation": "git-worktree",
|
|
28
|
+
"message": "inline + git-worktree is unusual; consider child-task if isolation is intentional"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
31
|
}
|