@blxzer/cursor-trellis 0.4.1 → 0.4.3
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 +49 -0
- package/README.md +25 -14
- package/README.zh-CN.md +14 -10
- package/bin/smart-search.js +10 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +36 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +42 -153
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate.d.ts +10 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/migrate.js +38 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/update.d.ts +5 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +144 -41
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/cursor.d.ts +2 -1
- package/dist/configurators/cursor.d.ts.map +1 -1
- package/dist/configurators/cursor.js +4 -2
- package/dist/configurators/cursor.js.map +1 -1
- package/dist/configurators/index.js +4 -4
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.d.ts +8 -0
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +27 -1
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +0 -9
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +12 -45
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +13 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +17 -0
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.3.0.json +1 -1
- package/dist/templates/common/bundled-skills/cstl-check/SKILL.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/hooks-and-settings.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/overview.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/skills-and-commands.md +2 -4
- package/dist/templates/common/bundled-skills/cstl-skill-creator/SKILL.md +10 -7
- package/dist/templates/common/bundled-skills/cstl-skill-creator/references/authoring-rules.md +93 -19
- package/dist/templates/common/bundled-skills/cstl-skill-creator/references/general-authoring.md +189 -0
- package/dist/templates/common/bundled-skills/cstl-skill-creator/references/review-checklist.md +10 -5
- package/dist/templates/common/commands/continue.md +6 -5
- package/dist/templates/common/index.d.ts +20 -0
- package/dist/templates/common/index.d.ts.map +1 -1
- package/dist/templates/common/index.js +21 -2
- package/dist/templates/common/index.js.map +1 -1
- package/dist/templates/common/optional-skills/chrome-cdp/SKILL.md +179 -0
- package/dist/templates/common/optional-skills/chrome-cdp/examples/fetch-hook-api-capture.md +149 -0
- package/dist/templates/common/optional-skills/chrome-cdp/scripts/cdp.mjs +903 -0
- package/dist/templates/common/skills/brainstorm.md +2 -2
- package/dist/templates/cursor/agents/cstl-check.md +2 -2
- package/dist/templates/cursor/agents/cstl-implement.md +1 -1
- package/dist/templates/cursor/agents/cstl-research.md +2 -2
- package/dist/templates/cursor/fixtures/expected-rules.d.ts +1 -1
- package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -1
- package/dist/templates/cursor/fixtures/expected-rules.js +7 -24
- package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
- package/dist/templates/cursor/hooks.json +4 -0
- package/dist/templates/cursor/index.d.ts +1 -1
- package/dist/templates/cursor/index.js +1 -1
- package/dist/templates/cursor/rules/cstl-bootstrap.mdc +17 -0
- package/dist/templates/markdown/agents.md +36 -3
- package/dist/templates/markdown/{spec/guides → framework}/cursor-native-modes-guide.md.txt +13 -10
- package/dist/templates/markdown/{spec/guides → framework}/cursor-subagent-policy.md.txt +63 -127
- package/dist/templates/markdown/framework/dogfood-only-surfaces.md.txt +29 -0
- package/dist/templates/markdown/{spec/guides → framework}/execution-strategy.md.txt +2 -0
- package/dist/templates/markdown/framework/index.md.txt +31 -0
- package/dist/templates/markdown/framework/internal-skills-cursor-reachability.md.txt +45 -0
- package/dist/templates/markdown/framework/middleware-protocol.md.txt +83 -0
- package/dist/templates/markdown/framework/parallel-first-execution.md.txt +78 -0
- package/dist/templates/markdown/framework/prd-grill-frontier.md.txt +83 -0
- package/dist/templates/markdown/framework/release-boundary.md.txt +30 -0
- package/dist/templates/markdown/{spec/guides → framework}/retrieval-daily-guide.md.txt +1 -1
- package/dist/templates/markdown/framework/upgrade.md.txt +15 -0
- package/dist/templates/markdown/{spec/guides → framework}/verification-strength-guide.md.txt +2 -2
- package/dist/templates/markdown/index.d.ts +26 -10
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +87 -11
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +1 -1
- package/dist/templates/markdown/spec/guides/index.md.txt +5 -19
- package/dist/templates/markdown/spec/guides/prototype-guide.md.txt +10 -10
- package/dist/templates/markdown/spec/guides/test-discipline-guide.md.txt +1 -1
- package/dist/templates/shared-hooks/event-bridge.py +60 -0
- package/dist/templates/shared-hooks/index.d.ts +1 -1
- package/dist/templates/shared-hooks/index.d.ts.map +1 -1
- package/dist/templates/shared-hooks/index.js +1 -0
- package/dist/templates/shared-hooks/index.js.map +1 -1
- package/dist/templates/shared-hooks/session-start.py +19 -2
- package/dist/templates/trellis/CONTEXT.md +63 -3
- package/dist/templates/trellis/config.yaml +1 -1
- package/dist/templates/trellis/gitignore.txt +39 -39
- package/dist/templates/trellis/index.d.ts +12 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +73 -15
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/pool/README.md +12 -3
- package/dist/templates/trellis/pool/plan.md +24 -5
- package/dist/templates/trellis/scripts/common/adapter_middleware.py +158 -0
- package/dist/templates/trellis/scripts/common/artifact_locale.py +12 -3
- package/dist/templates/trellis/scripts/common/cursor_retrieval_env.py +5 -2
- package/dist/templates/trellis/scripts/common/full_quality.py +237 -0
- package/dist/templates/trellis/scripts/common/git.py +6 -0
- package/dist/templates/trellis/scripts/common/git_context.py +17 -5
- package/dist/templates/trellis/scripts/common/kernel_command.py +367 -0
- package/dist/templates/trellis/scripts/common/lite_context.py +280 -0
- package/dist/templates/trellis/scripts/common/ondemand_topology.py +225 -0
- package/dist/templates/trellis/scripts/common/parent_orchestration.py +1 -1
- package/dist/templates/trellis/scripts/common/pool_store.py +16 -4
- package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +2 -2
- package/dist/templates/trellis/scripts/common/session_context.py +28 -2
- package/dist/templates/trellis/scripts/common/task_gates.py +73 -12
- package/dist/templates/trellis/scripts/common/task_map.py +42 -9
- package/dist/templates/trellis/scripts/common/task_store.py +293 -61
- package/dist/templates/trellis/scripts/common/test_adapter_middleware.py +56 -0
- package/dist/templates/trellis/scripts/common/test_depends_mode_block.py +9 -0
- package/dist/templates/trellis/scripts/common/test_full_quality.py +197 -0
- package/dist/templates/trellis/scripts/common/test_kernel_command.py +326 -0
- package/dist/templates/trellis/scripts/common/test_lite_path.py +190 -0
- package/dist/templates/trellis/scripts/common/test_observable_defaults.py +10 -4
- package/dist/templates/trellis/scripts/common/test_ondemand_topology.py +122 -0
- package/dist/templates/trellis/scripts/common/test_pool_store.py +17 -0
- package/dist/templates/trellis/scripts/common/test_task_store_kernel_patch.py +163 -0
- package/dist/templates/trellis/scripts/common/workflow_phase.py +3 -0
- package/dist/templates/trellis/scripts/cursor_retrieval_probe_prompt.md +4 -5
- package/dist/templates/trellis/scripts/get_context.py +1 -0
- package/dist/templates/trellis/scripts/pool.py +5 -0
- package/dist/templates/trellis/scripts/task.py +83 -7
- package/dist/templates/trellis/workflow.md +109 -23
- package/dist/utils/cursor-retrieval-env.d.ts +2 -1
- package/dist/utils/cursor-retrieval-env.d.ts.map +1 -1
- package/dist/utils/cursor-retrieval-env.js +3 -2
- package/dist/utils/cursor-retrieval-env.js.map +1 -1
- package/dist/utils/cursor2plus-residue-cleanup.d.ts +38 -0
- package/dist/utils/cursor2plus-residue-cleanup.d.ts.map +1 -0
- package/dist/utils/cursor2plus-residue-cleanup.js +145 -0
- package/dist/utils/cursor2plus-residue-cleanup.js.map +1 -0
- package/dist/utils/manifest-prune.d.ts.map +1 -1
- package/dist/utils/manifest-prune.js +7 -2
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/p36-upgrade.d.ts +62 -0
- package/dist/utils/p36-upgrade.d.ts.map +1 -0
- package/dist/utils/p36-upgrade.js +160 -0
- package/dist/utils/p36-upgrade.js.map +1 -0
- package/dist/utils/project-capabilities.d.ts +1 -12
- package/dist/utils/project-capabilities.d.ts.map +1 -1
- package/dist/utils/project-capabilities.js +3 -100
- package/dist/utils/project-capabilities.js.map +1 -1
- package/dist/utils/readiness.d.ts +10 -0
- package/dist/utils/readiness.d.ts.map +1 -1
- package/dist/utils/readiness.js +58 -26
- package/dist/utils/readiness.js.map +1 -1
- package/dist/utils/retrieval-agent-instructions.js +1 -1
- package/dist/utils/retrieval-agent-instructions.js.map +1 -1
- package/dist/utils/retrieval-execution-telemetry.js +1 -1
- package/dist/utils/retrieval-execution-telemetry.js.map +1 -1
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +11 -1
- package/dist/utils/template-hash.js.map +1 -1
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +52 -14
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/dist/utils/update-rollout-report.d.ts +14 -0
- package/dist/utils/update-rollout-report.d.ts.map +1 -1
- package/dist/utils/update-rollout-report.js +1 -0
- package/dist/utils/update-rollout-report.js.map +1 -1
- package/dist/utils/workflow-ownership.d.ts +1 -1
- package/dist/utils/workflow-ownership.js +4 -4
- package/dist/utils/workflow-ownership.js.map +1 -1
- package/package.json +5 -4
- package/scripts/postinstall.js +6 -7
- package/dist/commands/campaign/canvas-render.d.ts +0 -68
- package/dist/commands/campaign/canvas-render.d.ts.map +0 -1
- package/dist/commands/campaign/canvas-render.js +0 -414
- package/dist/commands/campaign/canvas-render.js.map +0 -1
- package/dist/commands/campaign/compose.d.ts +0 -15
- package/dist/commands/campaign/compose.d.ts.map +0 -1
- package/dist/commands/campaign/compose.js +0 -110
- package/dist/commands/campaign/compose.js.map +0 -1
- package/dist/commands/campaign/index.d.ts +0 -13
- package/dist/commands/campaign/index.d.ts.map +0 -1
- package/dist/commands/campaign/index.js +0 -134
- package/dist/commands/campaign/index.js.map +0 -1
- package/dist/commands/campaign/kind-map.d.ts +0 -6
- package/dist/commands/campaign/kind-map.d.ts.map +0 -1
- package/dist/commands/campaign/kind-map.js +0 -21
- package/dist/commands/campaign/kind-map.js.map +0 -1
- package/dist/commands/campaign/mcp-server.d.ts +0 -6
- package/dist/commands/campaign/mcp-server.d.ts.map +0 -1
- package/dist/commands/campaign/mcp-server.js +0 -167
- package/dist/commands/campaign/mcp-server.js.map +0 -1
- package/dist/commands/campaign/render.d.ts +0 -5
- package/dist/commands/campaign/render.d.ts.map +0 -1
- package/dist/commands/campaign/render.js +0 -103
- package/dist/commands/campaign/render.js.map +0 -1
- package/dist/commands/campaign/trellis-load.d.ts +0 -13
- package/dist/commands/campaign/trellis-load.d.ts.map +0 -1
- package/dist/commands/campaign/trellis-load.js +0 -122
- package/dist/commands/campaign/trellis-load.js.map +0 -1
- package/dist/commands/campaign/types.d.ts +0 -61
- package/dist/commands/campaign/types.d.ts.map +0 -1
- package/dist/commands/campaign/types.js +0 -3
- package/dist/commands/campaign/types.js.map +0 -1
- package/dist/commands/goal/index.d.ts +0 -3
- package/dist/commands/goal/index.d.ts.map +0 -1
- package/dist/commands/goal/index.js +0 -159
- package/dist/commands/goal/index.js.map +0 -1
- package/dist/commands/goal/review.d.ts +0 -6
- package/dist/commands/goal/review.d.ts.map +0 -1
- package/dist/commands/goal/review.js +0 -28
- package/dist/commands/goal/review.js.map +0 -1
- package/dist/commands/rpc/client.d.ts +0 -51
- package/dist/commands/rpc/client.d.ts.map +0 -1
- package/dist/commands/rpc/client.js +0 -147
- package/dist/commands/rpc/client.js.map +0 -1
- package/dist/commands/rpc/index.d.ts +0 -10
- package/dist/commands/rpc/index.d.ts.map +0 -1
- package/dist/commands/rpc/index.js +0 -157
- package/dist/commands/rpc/index.js.map +0 -1
- package/dist/commands/rpc/serve.d.ts +0 -23
- package/dist/commands/rpc/serve.d.ts.map +0 -1
- package/dist/commands/rpc/serve.js +0 -60
- package/dist/commands/rpc/serve.js.map +0 -1
- package/dist/commands/rpc/smoke.d.ts +0 -16
- package/dist/commands/rpc/smoke.d.ts.map +0 -1
- package/dist/commands/rpc/smoke.js +0 -92
- package/dist/commands/rpc/smoke.js.map +0 -1
- package/dist/commands/sdk/index.d.ts +0 -9
- package/dist/commands/sdk/index.d.ts.map +0 -1
- package/dist/commands/sdk/index.js +0 -58
- package/dist/commands/sdk/index.js.map +0 -1
- package/dist/commands/sdk/run.d.ts +0 -42
- package/dist/commands/sdk/run.d.ts.map +0 -1
- package/dist/commands/sdk/run.js +0 -220
- package/dist/commands/sdk/run.js.map +0 -1
- package/dist/commands/sdk/status.d.ts +0 -14
- package/dist/commands/sdk/status.d.ts.map +0 -1
- package/dist/commands/sdk/status.js +0 -69
- package/dist/commands/sdk/status.js.map +0 -1
- package/dist/configurators/cursor2plus-local.d.ts +0 -6
- package/dist/configurators/cursor2plus-local.d.ts.map +0 -1
- package/dist/configurators/cursor2plus-local.js +0 -21
- package/dist/configurators/cursor2plus-local.js.map +0 -1
- package/dist/goal/action-packet.d.ts +0 -89
- package/dist/goal/action-packet.d.ts.map +0 -1
- package/dist/goal/action-packet.js +0 -113
- package/dist/goal/action-packet.js.map +0 -1
- package/dist/goal/audit.d.ts +0 -14
- package/dist/goal/audit.d.ts.map +0 -1
- package/dist/goal/audit.js +0 -12
- package/dist/goal/audit.js.map +0 -1
- package/dist/goal/constants.d.ts +0 -26
- package/dist/goal/constants.d.ts.map +0 -1
- package/dist/goal/constants.js +0 -24
- package/dist/goal/constants.js.map +0 -1
- package/dist/goal/paths.d.ts +0 -8
- package/dist/goal/paths.d.ts.map +0 -1
- package/dist/goal/paths.js +0 -36
- package/dist/goal/paths.js.map +0 -1
- package/dist/goal/preflight.d.ts +0 -21
- package/dist/goal/preflight.d.ts.map +0 -1
- package/dist/goal/preflight.js +0 -97
- package/dist/goal/preflight.js.map +0 -1
- package/dist/goal/review-seam.d.ts +0 -44
- package/dist/goal/review-seam.d.ts.map +0 -1
- package/dist/goal/review-seam.js +0 -153
- package/dist/goal/review-seam.js.map +0 -1
- package/dist/goal/reviewer-rules.d.ts +0 -13
- package/dist/goal/reviewer-rules.d.ts.map +0 -1
- package/dist/goal/reviewer-rules.js +0 -153
- package/dist/goal/reviewer-rules.js.map +0 -1
- package/dist/goal/reviewer.d.ts +0 -9
- package/dist/goal/reviewer.d.ts.map +0 -1
- package/dist/goal/reviewer.js +0 -54
- package/dist/goal/reviewer.js.map +0 -1
- package/dist/goal/runtime.d.ts +0 -32
- package/dist/goal/runtime.d.ts.map +0 -1
- package/dist/goal/runtime.js +0 -242
- package/dist/goal/runtime.js.map +0 -1
- package/dist/goal/sdk-client.d.ts +0 -10
- package/dist/goal/sdk-client.d.ts.map +0 -1
- package/dist/goal/sdk-client.js +0 -34
- package/dist/goal/sdk-client.js.map +0 -1
- package/dist/goal/state.d.ts +0 -40
- package/dist/goal/state.d.ts.map +0 -1
- package/dist/goal/state.js +0 -37
- package/dist/goal/state.js.map +0 -1
- package/dist/goal/task-triggers.d.ts +0 -15
- package/dist/goal/task-triggers.d.ts.map +0 -1
- package/dist/goal/task-triggers.js +0 -23
- package/dist/goal/task-triggers.js.map +0 -1
- package/dist/goal/walls.d.ts +0 -12
- package/dist/goal/walls.d.ts.map +0 -1
- package/dist/goal/walls.js +0 -65
- package/dist/goal/walls.js.map +0 -1
- package/dist/goal/worker-prompt.d.ts +0 -13
- package/dist/goal/worker-prompt.d.ts.map +0 -1
- package/dist/goal/worker-prompt.js +0 -41
- package/dist/goal/worker-prompt.js.map +0 -1
- package/dist/goal/worker.d.ts +0 -42
- package/dist/goal/worker.d.ts.map +0 -1
- package/dist/goal/worker.js +0 -180
- package/dist/goal/worker.js.map +0 -1
- package/dist/templates/common/bundled-skills/cstl-cursor2plus-setup/SKILL.md +0 -63
- package/dist/templates/cursor/commands/cursor2plus-setup.md +0 -82
- package/dist/templates/cursor/rules/cstl-cursor-modes.mdc +0 -32
- package/dist/templates/cursor/rules/cstl-session-rename.mdc +0 -31
- package/dist/templates/cursor/rules/cstl-subagent-dispatch.mdc +0 -34
- package/dist/templates/cursor/rules/cstl-triage.mdc +0 -36
- package/dist/templates/cursor/rules/retrieval-routing.mdc +0 -78
- package/dist/templates/markdown/spec/guides/cursor-trellis-release-coexistence-guide.md.txt +0 -166
- package/dist/templates/markdown/spec/guides/goal-release-regression-runbook.md.txt +0 -132
- package/dist/templates/trellis/local/README.md +0 -85
- package/dist/templates/trellis/local/config.local.json.example +0 -6
- package/dist/templates/trellis/local/index.d.ts +0 -8
- package/dist/templates/trellis/local/index.d.ts.map +0 -1
- package/dist/templates/trellis/local/index.js +0 -15
- package/dist/templates/trellis/local/index.js.map +0 -1
- package/dist/templates/trellis/local/patch_wpelc8.py +0 -421
- package/dist/templates/trellis/local/smoke.py +0 -94
- package/dist/templates/trellis/local/subagent-models.json.example +0 -4
- package/dist/templates/trellis/local/trellis-task-models.json.example +0 -10
- package/dist/templates/trellis/local/trellis-task-models.json5.example +0 -45
- package/dist/templates/trellis/local/trellis_task_models_config.py +0 -200
- package/dist/utils/cursor-sdk-gate.d.ts +0 -10
- package/dist/utils/cursor-sdk-gate.d.ts.map +0 -1
- package/dist/utils/cursor-sdk-gate.js +0 -32
- package/dist/utils/cursor-sdk-gate.js.map +0 -1
- /package/dist/templates/markdown/{spec/guides → framework}/artifact-locale-guide.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/cursor-context-injection-guide.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/cursor-semantic-compliance.md.txt +0 -0
- /package/dist/templates/markdown/{spec/guides → framework}/injection-budget-guide.md.txt +0 -0
|
@@ -26,15 +26,6 @@ export interface WorkflowOptions {
|
|
|
26
26
|
* entry for non-native workflows so update.ts treats them as user-managed.
|
|
27
27
|
*/
|
|
28
28
|
workflowMdOverride?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Whether to materialize the Cursor++ BYOK local operator bundle
|
|
31
|
-
* (`.cstl/local/cursor2plus/`). Defaults to `false` from 1.1.0: only
|
|
32
|
-
* written when the user opts in during `cstl init` (interactive BYOK
|
|
33
|
-
* question) or passes `--cursor2plus`. Native Cursor API users do not need
|
|
34
|
-
* these assets. `cstl update` keeps existing bundles (detected by
|
|
35
|
-
* directory presence) regardless of this flag.
|
|
36
|
-
*/
|
|
37
|
-
cursor2plus?: boolean;
|
|
38
29
|
}
|
|
39
30
|
/**
|
|
40
31
|
* Create workflow structure based on project type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/configurators/workflow.ts"],"names":[],"mappings":"AA8CA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,eAAe,EACrB,MAAM,8BAA8B,CAAC;AAOtC;;;;;GAKG;AACH,wBAAgB,4BAA4B,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAKlE;AAED;;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;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,IAAI,CAAC,CAwEf"}
|
|
@@ -8,10 +8,9 @@ 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,
|
|
11
|
+
guidesIndexContent, guidesCrossLayerThinkingGuideContent, guidesCodeReuseThinkingGuideContent, guidesDurableLearningDecisionGuideContent, guidesDebugLoopGuideContent, guidesPrototypeGuideContent, guidesTestDisciplineGuideContent, guidesCrossPlatformThinkingGuideContent, frameworkDocs, } from "../templates/markdown/index.js";
|
|
12
12
|
import { writeFile, ensureDir } from "../utils/file-writer.js";
|
|
13
13
|
import { replacePythonCommandLiterals } from "./shared.js";
|
|
14
|
-
import { writeCursor2plusLocalBundle } from "./cursor2plus-local.js";
|
|
15
14
|
import { sanitizePkgName, } from "../utils/project-detector.js";
|
|
16
15
|
/**
|
|
17
16
|
* Root-level files written by the workflow configurator (outside `.cstl/`).
|
|
@@ -50,6 +49,8 @@ export async function createWorkflowStructure(cwd, options) {
|
|
|
50
49
|
await writeScriptTemplates(path.join(cwd, PATHS.SCRIPTS));
|
|
51
50
|
// Review-pool skeleton (mechanism docs only; no sample items)
|
|
52
51
|
await writePoolSkeleton(path.join(cwd, PATHS.POOL));
|
|
52
|
+
// Do not create or write `.cstl/middleware/`. Users drop Manifests there;
|
|
53
|
+
// init/update never write, delete, or hash that overlay.
|
|
53
54
|
// Copy workflow.md (native bundled template or selected marketplace variant)
|
|
54
55
|
await writeFile(path.join(cwd, PATHS.WORKFLOW_GUIDE_FILE), replacePythonCommandLiterals(workflowMd));
|
|
55
56
|
// Copy .gitignore from templates
|
|
@@ -73,9 +74,6 @@ export async function createWorkflowStructure(cwd, options) {
|
|
|
73
74
|
await writeFile(path.join(cwd, PATHS.WORKSPACE, "index.md"), replacePythonCommandLiterals(agentProgressIndexContent));
|
|
74
75
|
// Create tasks/ directory
|
|
75
76
|
ensureDir(path.join(cwd, PATHS.TASKS));
|
|
76
|
-
if (options?.cursor2plus) {
|
|
77
|
-
await writeCursor2plusLocalBundle(cwd);
|
|
78
|
-
}
|
|
79
77
|
// Create spec templates based on project type
|
|
80
78
|
// These are NOT dogfooded - they are generic templates for new projects
|
|
81
79
|
if (packages && packages.length > 0) {
|
|
@@ -192,50 +190,10 @@ async function createSpecTemplates(cwd, projectType, packages, remoteSpecPackage
|
|
|
192
190
|
name: "code-reuse-thinking-guide.md",
|
|
193
191
|
content: guidesCodeReuseThinkingGuideContent,
|
|
194
192
|
},
|
|
195
|
-
{
|
|
196
|
-
name: "retrieval-daily-guide.md",
|
|
197
|
-
content: guidesRetrievalDailyGuideContent,
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
name: "cursor-semantic-compliance.md",
|
|
201
|
-
content: guidesCursorSemanticComplianceContent,
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
name: "cursor-subagent-policy.md",
|
|
205
|
-
content: guidesCursorSubagentPolicyContent,
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
name: "execution-strategy.md",
|
|
209
|
-
content: guidesExecutionStrategyContent,
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
name: "cursor-context-injection-guide.md",
|
|
213
|
-
content: guidesCursorContextInjectionGuideContent,
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
name: "cursor-native-modes-guide.md",
|
|
217
|
-
content: guidesCursorNativeModesGuideContent,
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
name: "verification-strength-guide.md",
|
|
221
|
-
content: guidesVerificationStrengthGuideContent,
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
name: "injection-budget-guide.md",
|
|
225
|
-
content: guidesInjectionBudgetGuideContent,
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
name: "artifact-locale-guide.md",
|
|
229
|
-
content: guidesArtifactLocaleGuideContent,
|
|
230
|
-
},
|
|
231
193
|
{
|
|
232
194
|
name: "debug-loop-guide.md",
|
|
233
195
|
content: guidesDebugLoopGuideContent,
|
|
234
196
|
},
|
|
235
|
-
{
|
|
236
|
-
name: "goal-release-regression-runbook.md",
|
|
237
|
-
content: guidesGoalReleaseRegressionRunbookContent,
|
|
238
|
-
},
|
|
239
197
|
{
|
|
240
198
|
name: "prototype-guide.md",
|
|
241
199
|
content: guidesPrototypeGuideContent,
|
|
@@ -252,6 +210,15 @@ async function createSpecTemplates(cwd, projectType, packages, remoteSpecPackage
|
|
|
252
210
|
for (const doc of guidesDocs) {
|
|
253
211
|
await writeFile(path.join(guidesDir, doc.name), doc.content);
|
|
254
212
|
}
|
|
213
|
+
// Framework docs (.cstl/framework/) — framework-owned, refreshed by update.
|
|
214
|
+
// Apply the same platform command rewrite as update.ts collectTemplateFiles
|
|
215
|
+
// so init-written content matches the hash update expects (no-op on
|
|
216
|
+
// same-version update instead of a spurious rewrite).
|
|
217
|
+
const frameworkDir = path.join(cwd, PATHS.FRAMEWORK);
|
|
218
|
+
ensureDir(frameworkDir);
|
|
219
|
+
for (const doc of frameworkDocs) {
|
|
220
|
+
await writeFile(path.join(frameworkDir, doc.name), replacePythonCommandLiterals(doc.content));
|
|
221
|
+
}
|
|
255
222
|
if (packages && packages.length > 0) {
|
|
256
223
|
// Monorepo mode: create spec/<name>/ for each package
|
|
257
224
|
for (const pkg of packages) {
|
|
@@ -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,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,EAC1B,iBAAiB,EACjB,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,
|
|
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,kBAAkB,EAClB,iBAAiB,EACjB,0BAA0B,EAC1B,iBAAiB,EACjB,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,6BA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AAE,GAAG,CAAC,IAAI,CAAC,EACjC,4BAA4B,CAAC,GAAG,CAAC,OAAO,CAAC,CAC1C,CAAC;IACJ,CAAC;IAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,sDAAsD;QACtD,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC3B,MAAM,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC1C,IAAI,kBAAkB,EAAE,GAAG,CAAC,OAAO,CAAC;gBAAE,SAAS;YAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC,CAAC;YAC/D,SAAS,CAAC,WAAW,CAAC,CAAC;YACvB,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;YAChE,MAAM,gBAAgB,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"}
|
|
@@ -15,10 +15,14 @@ export declare const DIR_NAMES: {
|
|
|
15
15
|
readonly ARCHIVE: "archive";
|
|
16
16
|
/** Spec/guidelines directory (under .cstl/) */
|
|
17
17
|
readonly SPEC: "spec";
|
|
18
|
+
/** Framework docs directory (under .cstl/) - framework-owned, update-managed */
|
|
19
|
+
readonly FRAMEWORK: "framework";
|
|
18
20
|
/** Scripts directory (under .cstl/) */
|
|
19
21
|
readonly SCRIPTS: "scripts";
|
|
20
22
|
/** Review-pool directory (under .cstl/) */
|
|
21
23
|
readonly POOL: "pool";
|
|
24
|
+
/** User middleware overlay (under .cstl/) — never written/hashed by init/update */
|
|
25
|
+
readonly MIDDLEWARE: "middleware";
|
|
22
26
|
};
|
|
23
27
|
export declare const FILE_NAMES: {
|
|
24
28
|
/** Root agent instructions file */
|
|
@@ -45,10 +49,14 @@ export declare const PATHS: {
|
|
|
45
49
|
readonly TASKS: ".cstl/tasks";
|
|
46
50
|
/** .cstl/spec/ */
|
|
47
51
|
readonly SPEC: ".cstl/spec";
|
|
52
|
+
/** .cstl/framework/ */
|
|
53
|
+
readonly FRAMEWORK: ".cstl/framework";
|
|
48
54
|
/** .cstl/scripts/ */
|
|
49
55
|
readonly SCRIPTS: ".cstl/scripts";
|
|
50
56
|
/** .cstl/pool/ */
|
|
51
57
|
readonly POOL: ".cstl/pool";
|
|
58
|
+
/** .cstl/middleware/ — user overlay; update never writes, deletes, or hashes */
|
|
59
|
+
readonly MIDDLEWARE: ".cstl/middleware";
|
|
52
60
|
/** .cstl/.developer */
|
|
53
61
|
readonly DEVELOPER_FILE: ".cstl/.developer";
|
|
54
62
|
/** .cstl/.current-task */
|
|
@@ -71,4 +79,9 @@ export declare function getTaskDir(taskName: string): string;
|
|
|
71
79
|
* @example getArchiveDir() => ".cstl/tasks/archive"
|
|
72
80
|
*/
|
|
73
81
|
export declare function getArchiveDir(): string;
|
|
82
|
+
/**
|
|
83
|
+
* True for the user middleware overlay and any file under it.
|
|
84
|
+
* `cstl init` / `cstl update` must never write, delete, or hash these paths.
|
|
85
|
+
*/
|
|
86
|
+
export declare function isUserMiddlewareOverlayPath(relativePath: string): boolean;
|
|
74
87
|
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,eAAO,MAAM,SAAS;IACpB,8BAA8B;;IAE9B,gEAAgE;;IAEhE,4DAA4D;;IAE5D,uCAAuC;;IAEvC,+CAA+C;;IAE/C,uCAAuC;;IAEvC,2CAA2C;;
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,eAAO,MAAM,SAAS;IACpB,8BAA8B;;IAE9B,gEAAgE;;IAEhE,4DAA4D;;IAE5D,uCAAuC;;IAEvC,+CAA+C;;IAE/C,gFAAgF;;IAEhF,uCAAuC;;IAEvC,2CAA2C;;IAE3C,mFAAmF;;CAE3E,CAAC;AAGX,eAAO,MAAM,UAAU;IACrB,mCAAmC;;IAEnC,8BAA8B;;IAE9B,2BAA2B;;IAE3B,oBAAoB;;IAEpB,4BAA4B;;IAE5B,qBAAqB;;IAErB,0BAA0B;;CAElB,CAAC;AAGX,eAAO,MAAM,KAAK;IAChB,aAAa;;IAEb,uBAAuB;;IAEvB,mBAAmB;;IAEnB,kBAAkB;;IAElB,uBAAuB;;IAEvB,qBAAqB;;IAErB,kBAAkB;;IAElB,gFAAgF;;IAEhF,uBAAuB;;IAEvB,0BAA0B;;IAE1B,wBAAwB;;CAEhB,CAAC;AAEX;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAMzE"}
|
package/dist/constants/paths.js
CHANGED
|
@@ -16,10 +16,14 @@ export const DIR_NAMES = {
|
|
|
16
16
|
ARCHIVE: "archive",
|
|
17
17
|
/** Spec/guidelines directory (under .cstl/) */
|
|
18
18
|
SPEC: "spec",
|
|
19
|
+
/** Framework docs directory (under .cstl/) - framework-owned, update-managed */
|
|
20
|
+
FRAMEWORK: "framework",
|
|
19
21
|
/** Scripts directory (under .cstl/) */
|
|
20
22
|
SCRIPTS: "scripts",
|
|
21
23
|
/** Review-pool directory (under .cstl/) */
|
|
22
24
|
POOL: "pool",
|
|
25
|
+
/** User middleware overlay (under .cstl/) — never written/hashed by init/update */
|
|
26
|
+
MIDDLEWARE: "middleware",
|
|
23
27
|
};
|
|
24
28
|
// File names
|
|
25
29
|
export const FILE_NAMES = {
|
|
@@ -48,10 +52,14 @@ export const PATHS = {
|
|
|
48
52
|
TASKS: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.TASKS}`,
|
|
49
53
|
/** .cstl/spec/ */
|
|
50
54
|
SPEC: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.SPEC}`,
|
|
55
|
+
/** .cstl/framework/ */
|
|
56
|
+
FRAMEWORK: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.FRAMEWORK}`,
|
|
51
57
|
/** .cstl/scripts/ */
|
|
52
58
|
SCRIPTS: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.SCRIPTS}`,
|
|
53
59
|
/** .cstl/pool/ */
|
|
54
60
|
POOL: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.POOL}`,
|
|
61
|
+
/** .cstl/middleware/ — user overlay; update never writes, deletes, or hashes */
|
|
62
|
+
MIDDLEWARE: `${DIR_NAMES.WORKFLOW}/${DIR_NAMES.MIDDLEWARE}`,
|
|
55
63
|
/** .cstl/.developer */
|
|
56
64
|
DEVELOPER_FILE: `${DIR_NAMES.WORKFLOW}/${FILE_NAMES.DEVELOPER}`,
|
|
57
65
|
/** .cstl/.current-task */
|
|
@@ -80,4 +88,13 @@ export function getTaskDir(taskName) {
|
|
|
80
88
|
export function getArchiveDir() {
|
|
81
89
|
return `${PATHS.TASKS}/${DIR_NAMES.ARCHIVE}`;
|
|
82
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* True for the user middleware overlay and any file under it.
|
|
93
|
+
* `cstl init` / `cstl update` must never write, delete, or hash these paths.
|
|
94
|
+
*/
|
|
95
|
+
export function isUserMiddlewareOverlayPath(relativePath) {
|
|
96
|
+
const normalized = relativePath.replace(/\\/g, "/");
|
|
97
|
+
return (normalized === PATHS.MIDDLEWARE ||
|
|
98
|
+
normalized.startsWith(`${PATHS.MIDDLEWARE}/`));
|
|
99
|
+
}
|
|
83
100
|
//# sourceMappingURL=paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,mCAAmC;AACnC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,8BAA8B;IAC9B,QAAQ,EAAE,OAAO;IACjB,gEAAgE;IAChE,SAAS,EAAE,WAAW;IACtB,4DAA4D;IAC5D,KAAK,EAAE,OAAO;IACd,uCAAuC;IACvC,OAAO,EAAE,SAAS;IAClB,+CAA+C;IAC/C,IAAI,EAAE,MAAM;IACZ,uCAAuC;IACvC,OAAO,EAAE,SAAS;IAClB,2CAA2C;IAC3C,IAAI,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,mCAAmC;AACnC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,8BAA8B;IAC9B,QAAQ,EAAE,OAAO;IACjB,gEAAgE;IAChE,SAAS,EAAE,WAAW;IACtB,4DAA4D;IAC5D,KAAK,EAAE,OAAO;IACd,uCAAuC;IACvC,OAAO,EAAE,SAAS;IAClB,+CAA+C;IAC/C,IAAI,EAAE,MAAM;IACZ,gFAAgF;IAChF,SAAS,EAAE,WAAW;IACtB,uCAAuC;IACvC,OAAO,EAAE,SAAS;IAClB,2CAA2C;IAC3C,IAAI,EAAE,MAAM;IACZ,mFAAmF;IACnF,UAAU,EAAE,YAAY;CAChB,CAAC;AAEX,aAAa;AACb,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,mCAAmC;IACnC,MAAM,EA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,CAAC,cAAc,EAAE;CACjE,CAAC;AAEX;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,OAAO,GAAG,KAAK,CAAC,SAAS,IAAI,SAAS,EAAE,CAAC;AAC3C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,OAAO,GAAG,KAAK,CAAC,KAAK,IAAI,QAAQ,EAAE,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,GAAG,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,YAAoB;IAC9D,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpD,OAAO,CACL,UAAU,KAAK,KAAK,CAAC,UAAU;QAC/B,UAAU,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,UAAU,GAAG,CAAC,CAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"breaking": true,
|
|
5
5
|
"recommendMigrate": true,
|
|
6
6
|
"changelog": "**@blxzer/cursor-trellis 0.3.0 / @blxzer/cursor-trellis-core 0.3.0**\n\n### Breaking\n- feat(cli): rename CLI command from `trellis`/`tl` to `cstl`. The `trellis` and `tl` bin aliases are **removed**. Update any aliases, CI scripts, or shell history that reference `trellis` or `tl`.\n- feat(templates): all skill, command, agent, and rule names renamed `trellis-*` -> `cstl-*` (hard cut, no compatibility aliases).\n - `.cursor/commands/trellis-continue.md` -> `cstl-continue.md`\n - `.cursor/commands/trellis-finish-work.md` -> `cstl-finish-work.md`\n - `.cursor/commands/trellis-cursor2plus-setup.md` -> `cstl-cursor2plus-setup.md`\n - `.cursor/rules/trellis-triage.mdc` -> `cstl-triage.mdc`\n - `.cursor/rules/trellis-subagent-dispatch.mdc` -> `cstl-subagent-dispatch.mdc`\n - `.cursor/agents/trellis-research.md` -> `cstl-research.md`\n - `.cursor/agents/trellis-implement.md` -> `cstl-implement.md`\n - `.cursor/agents/trellis-check.md` -> `cstl-check.md`\n - `.cursor/skills/trellis-meta/` -> `cstl-meta/` (and 4 other bundled skill dirs)\n- fix(hooks): `<!-- trellis-hook-injected -->` marker -> `<!-- cstl-hook-injected -->`\n- fix(subagents): `subagent_type` identifiers `trellis-research/implement/check` -> `cstl-research/implement/check` (affects Cursor++ BYOK `trellis-task-models.json5` keys)\n\n### Upgrade\n\n**Manual npm install required** — the old `trellis upgrade` command no longer exists after install.\n\n```bash\nnpm install -g @blxzer/cursor-trellis@latest\ncstl update --migrate\n```\n\nThe `--migrate` flag is REQUIRED to trigger the file renames in your project. Renames are hash-verified; locally modified files are preserved with a warning.",
|
|
7
|
-
"aiInstructions": "When helping a user migrate from 0.2.x to 0.3.0:\n1. **Manual npm install required** — the old `trellis upgrade` command no longer exists after install. Run: `npm install -g @blxzer/cursor-trellis@latest`\n2. **Run `cstl update --migrate`** in each project — the `--migrate` flag is REQUIRED to trigger the rename of `.cursor/commands/trellis-*.md` -> `cstl-*.md`, `.cursor/rules/trellis-*.mdc` -> `cstl-*.mdc`, `.cursor/agents/trellis-*.md` -> `cstl-*.md`, and `.cursor/skills/trellis-*` -> `cstl-*` directories.\n3. Renames are hash-verified; locally modified files are preserved with a warning. The user can manually rename modified files or accept the new template and re-apply their customizations.\n4. Update any personal aliases, CI scripts, or shell history that reference `trellis` or `tl` to use `cstl`.\n5.
|
|
7
|
+
"aiInstructions": "When helping a user migrate from 0.2.x to 0.3.0:\n1. **Manual npm install required** — the old `trellis upgrade` command no longer exists after install. Run: `npm install -g @blxzer/cursor-trellis@latest`\n2. **Run `cstl update --migrate`** in each project — the `--migrate` flag is REQUIRED to trigger the rename of `.cursor/commands/trellis-*.md` -> `cstl-*.md`, `.cursor/rules/trellis-*.mdc` -> `cstl-*.mdc`, `.cursor/agents/trellis-*.md` -> `cstl-*.md`, and `.cursor/skills/trellis-*` -> `cstl-*` directories.\n3. Renames are hash-verified; locally modified files are preserved with a warning. The user can manually rename modified files or accept the new template and re-apply their customizations.\n4. Update any personal aliases, CI scripts, or shell history that reference `trellis` or `tl` to use `cstl`.\n5. **Cursor++ retired:** do not run `cstl-cursor2plus-setup` or `patch_wpelc8.py`. If leftover `.cstl/local/cursor2plus/` (or legacy `.trellis/local/cursor2plus/`) exists, treat it as residue — `cstl update` hash-safe cleanup removes pristine managed copies; delete unmodified leftovers manually if unused. Product path is Native Cursor.\n6. The `.trellis/` directory name is UNCHANGED — only the CLI command and skill/command/agent/rule name prefixes changed.",
|
|
8
8
|
"migrations": [
|
|
9
9
|
{
|
|
10
10
|
"type": "rename",
|
|
@@ -62,7 +62,7 @@ Report **Standards and Spec in two separate sections** — never merge them into
|
|
|
62
62
|
|
|
63
63
|
#### Test Coverage (verification strength — not TDD)
|
|
64
64
|
|
|
65
|
-
Follow `.cstl/
|
|
65
|
+
Follow `.cstl/framework/verification-strength-guide.md` for **graded** validation depth by closeout profile. cstl does **not** mandate red-green TDD or per-function unit tests.
|
|
66
66
|
|
|
67
67
|
- [ ] **Lite:** focused validation on touched behavior recorded in `verify.md` (`Validation:` line + result)
|
|
68
68
|
- [ ] **Full:** above + `Check evidence:` + `Reviewed change-set:` when contract requires code-review gate
|
|
@@ -6,7 +6,7 @@ Hooks/settings are the entry layer that connects Cursor to Trellis. They decide
|
|
|
6
6
|
|
|
7
7
|
`.cursor/hooks.json` registers:
|
|
8
8
|
|
|
9
|
-
- session-start hook: injects a Trellis overview when a new session starts or context resets (note the Cursor `additional_context` bug #158452 — see
|
|
9
|
+
- session-start hook: injects a Trellis overview when a new session starts or context resets (note the Cursor `additional_context` bug #158452 — see `.cstl/framework/cursor-context-injection-guide.md`).
|
|
10
10
|
- workflow-state hook: parses `[workflow-state:STATUS]` blocks from `.cstl/workflow.md` and emits the body matching the selected task `status` on each user input. Parser-only; the script does not embed fallback content.
|
|
11
11
|
- sub-agent context hook: injects task context when implementation/check/research agents start.
|
|
12
12
|
- shell/session bridge: lets shell commands see the same Trellis session identity.
|
|
@@ -35,7 +35,7 @@ Cursor exposes sessionStart, preToolUse on Task/Subagent, beforeShellExecution,
|
|
|
35
35
|
|
|
36
36
|
| User need | Edit location |
|
|
37
37
|
| --- | --- |
|
|
38
|
-
| AI should see more/less context in a new session | `.cursor/hooks.json` → `session-start` hook (or `.cursor/rules/*.mdc` for content the model must see every turn — see
|
|
38
|
+
| AI should see more/less context in a new session | `.cursor/hooks.json` → `session-start` hook (or `.cursor/rules/*.mdc` for content the model must see every turn — see `.cstl/framework/cursor-context-injection-guide.md`). |
|
|
39
39
|
| Per-turn hint policy should change | `[workflow-state:STATUS]` block in `.cstl/workflow.md`. The hook parses workflow.md verbatim — no script edit required. |
|
|
40
40
|
| Sub-agent cannot read PRD/spec | `inject-subagent-context.py` hook or agent prelude in `.cursor/agents/*.md`. |
|
|
41
41
|
| `task.py selected` in shell has no selected task | `inject-shell-session-context.py` hook or environment-variable configuration. |
|
package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/overview.md
CHANGED
|
@@ -17,7 +17,7 @@ Platform files do not store business state. They let Cursor read Trellis state,
|
|
|
17
17
|
| --- | --- | --- |
|
|
18
18
|
| settings/config | `.cursor/hooks.json` | Register hooks and platform behavior. |
|
|
19
19
|
| hooks | `.cursor/hooks/` | Inject context at session start, pre-tool-use on Task/Subagent, before-shell-execution, and stop events. |
|
|
20
|
-
| rules | `.cursor/rules/*.mdc` (`alwaysApply: true`) | Per-turn policy prepended before every prompt (e.g. Request Triage, retrieval routing). See
|
|
20
|
+
| rules | `.cursor/rules/*.mdc` (`alwaysApply: true`) | Per-turn policy prepended before every prompt (e.g. Request Triage, retrieval routing). See `.cstl/framework/cursor-context-injection-guide.md` for the channel-reliability matrix. |
|
|
21
21
|
| agents | `.cursor/agents/` | Define `cstl-research`, `cstl-implement`, and `cstl-check` for Task / Agent-session dispatch. |
|
|
22
22
|
| skills | `.cursor/skills/` | Capability descriptions that auto-trigger or can be read on demand. |
|
|
23
23
|
| commands | `.cursor/commands/` | User-invocable `/slash` entry points (e.g. `cstl-continue`, `record-session`). |
|
|
@@ -16,7 +16,7 @@ Skills and commands are textual entry points for user interaction with Trellis.
|
|
|
16
16
|
Trellis has two skill families:
|
|
17
17
|
|
|
18
18
|
- Workflow skills: `brainstorm`, `before-dev`, `check`, `update-spec`, and `break-loop`.
|
|
19
|
-
- Multi-file bundled skills include `cstl-meta`, `cstl-spec-bootstrap`, `cstl-skill-creator`, `smart-search-cli`, `cstl-micro-grill
|
|
19
|
+
- Multi-file bundled skills include `cstl-meta`, `cstl-spec-bootstrap`, `cstl-skill-creator`, `smart-search-cli`, and `cstl-micro-grill`.
|
|
20
20
|
|
|
21
21
|
Bundled skills are installed as directories and may include nested `agents/`, `examples/`, `references/`, or other lazy-loadable files. Do not describe bundled skills as a closed `cstl-*` list: `smart-search-cli` intentionally keeps its existing non-`cstl-` name.
|
|
22
22
|
|
|
@@ -28,7 +28,7 @@ Bundled skills are installed as directories and may include nested `agents/`, `e
|
|
|
28
28
|
|
|
29
29
|
`cstl-micro-grill` is the Trellis clarification adapter. It asks one high-value question at a time and escalates to Lite, Full, or Parent/Child task modes only when durable artifacts or broader risk require it.
|
|
30
30
|
|
|
31
|
-
`cstl-cursor2plus-setup`
|
|
31
|
+
> **Retired:** `cstl-cursor2plus-setup` / Cursor++ local bundle are no longer product surfaces. Do not run patch scripts; product path is Native Cursor.
|
|
32
32
|
|
|
33
33
|
## Common Paths (Cursor)
|
|
34
34
|
|
|
@@ -59,8 +59,6 @@ smart-search-cli/
|
|
|
59
59
|
└── references/
|
|
60
60
|
cstl-micro-grill/
|
|
61
61
|
└── SKILL.md
|
|
62
|
-
cstl-cursor2plus-setup/
|
|
63
|
-
└── SKILL.md
|
|
64
62
|
```
|
|
65
63
|
|
|
66
64
|
`SKILL.md` should tell the AI:
|
|
@@ -5,27 +5,29 @@ description: "Create or improve Trellis-compatible agent skills. Use when the us
|
|
|
5
5
|
|
|
6
6
|
# Trellis Skill Creator
|
|
7
7
|
|
|
8
|
-
Create high-quality skills for Trellis-managed projects and Trellis bundled templates.
|
|
8
|
+
Create high-quality skills for Trellis-managed projects and Trellis bundled templates. This unified guide covers general authoring method plus Trellis packaging constraints.
|
|
9
9
|
|
|
10
10
|
This skill is the authoring and review guide for skill files. It is not the local Trellis architecture map. Use `cstl-meta` first when the user needs to understand or customize `.cstl/`, hooks, settings, commands, prompts, workflows, agents, or platform directory layout.
|
|
11
11
|
|
|
12
12
|
## Hard Constraints
|
|
13
13
|
|
|
14
14
|
- Always inspect existing skill directories and platform conventions before creating or changing a skill.
|
|
15
|
-
- Always keep `SKILL.md`
|
|
15
|
+
- Always keep `SKILL.md` under 500 lines, in English, and focused on trigger, constraints, workflow, references, and boundaries.
|
|
16
16
|
- Always use lowercase letters, numbers, and hyphens in the frontmatter `name`.
|
|
17
|
-
- Always write a trigger-rich frontmatter `description` that states what the skill does and when it should trigger.
|
|
17
|
+
- Always write a trigger-rich frontmatter `description` that states what the skill does (WHAT) and when it should trigger (WHEN).
|
|
18
18
|
- Always place safety, sequencing, and reliability rules in a `## Hard Constraints` section before `## Workflow`.
|
|
19
|
+
- Always write Hard Constraints (and any other rule list) as imperative one-liners ("Always X. Never Y."). Never bury rules in prose paragraphs.
|
|
19
20
|
- Always move long guidance, examples, prompts, and reference material into directly linked files.
|
|
20
21
|
- Always make helper scripts deterministic, runnable from the skill directory, and explicit about inputs and outputs.
|
|
22
|
+
- Never repeat the same rule in two sections — Hard Constraints is the single source of truth.
|
|
21
23
|
- Never duplicate `cstl-meta` architecture guidance or project-private conventions inside a public Trellis skill.
|
|
22
24
|
- Never edit Cursor's built-in `create-skill`; create or update Trellis-compatible skill files instead.
|
|
23
25
|
|
|
24
26
|
## Workflow
|
|
25
27
|
|
|
26
28
|
1. Classify the target skill location and read `references/cstl-skill-locations.md`.
|
|
27
|
-
2. Gather
|
|
28
|
-
3. Draft or revise `SKILL.md` using `references/authoring-rules.md`.
|
|
29
|
+
2. Gather requirements (six elements): purpose and scope, trigger scenarios, target location, domain constraints (tools / APIs / reliability), output style, and existing patterns. Infer from conversation context when available; ask the user when discrete choices are ambiguous. Capture tool budget and overlap with existing skills.
|
|
30
|
+
3. Design, then draft: choose a specific skill name, write a trigger-rich description, decide script / no-script, and define success and stop criteria. Draft or revise `SKILL.md` using `references/authoring-rules.md` and `references/general-authoring.md`.
|
|
29
31
|
4. Add `references/`, `examples/`, `prompts/`, or `scripts/` only when they reduce entry-file size or make execution more deterministic.
|
|
30
32
|
5. Verify the result with `references/review-checklist.md`.
|
|
31
33
|
6. Report changed files, validation performed, and any boundaries or follow-up work.
|
|
@@ -33,7 +35,8 @@ This skill is the authoring and review guide for skill files. It is not the loca
|
|
|
33
35
|
## References
|
|
34
36
|
|
|
35
37
|
- `references/cstl-skill-locations.md`: Choose project-local, shared, platform-specific, or upstream bundled skill locations.
|
|
36
|
-
- `references/authoring-rules.md`: Frontmatter, trigger descriptions, hard
|
|
38
|
+
- `references/authoring-rules.md`: Frontmatter, trigger descriptions, hard-constraint form, progressive disclosure, writing-for-agents techniques, deterministic scripts, and anti-patterns.
|
|
39
|
+
- `references/general-authoring.md`: General authoring method — principles, directory layout, patterns, utility scripts, and the minimal template.
|
|
37
40
|
- `references/review-checklist.md`: Final quality checklist before handing off a skill change.
|
|
38
41
|
|
|
39
42
|
## When NOT To Use
|
|
@@ -41,4 +44,4 @@ This skill is the authoring and review guide for skill files. It is not the loca
|
|
|
41
44
|
- Do not use for general Trellis architecture discovery; use `cstl-meta`.
|
|
42
45
|
- Do not use for project coding conventions that belong in `.cstl/spec/`.
|
|
43
46
|
- Do not use for one-off commands or prompts unless the user wants a durable auto-triggered capability.
|
|
44
|
-
- Do not use for non-Trellis global skill installation or platform configuration unless the user explicitly asks for that scope.
|
|
47
|
+
- Do not use for non-Trellis global skill installation or platform configuration unless the user explicitly asks for that scope.
|
package/dist/templates/common/bundled-skills/cstl-skill-creator/references/authoring-rules.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Use these rules when creating or reviewing a Trellis-compatible skill.
|
|
4
4
|
|
|
5
|
+
Imperative constraints (length, English, `name` charset, WHAT+WHEN description, Hard Constraints placement and form, no duplicated rules, no `cstl-meta` duplication) live in `SKILL.md` Hard Constraints. This file shows how to apply them.
|
|
6
|
+
|
|
5
7
|
## Required Shape
|
|
6
8
|
|
|
7
9
|
Every active skill directory needs a `SKILL.md` with YAML frontmatter:
|
|
@@ -13,19 +15,23 @@ description: Specific capability and trigger scenarios.
|
|
|
13
15
|
---
|
|
14
16
|
```
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- Use lowercase letters, numbers, and hyphens in `name`.
|
|
19
|
-
- Write `description` in third person because platforms inject it into tool or skill discovery prompts.
|
|
20
|
-
- Include both what the skill does and when it should trigger.
|
|
21
|
-
- Keep `SKILL.md` under 500 lines and usually far shorter.
|
|
22
|
-
- Keep `SKILL.md` in English unless the target platform or user explicitly requires another language.
|
|
18
|
+
Keep the body focused on trigger, constraints, workflow, references, and boundaries. Long guidance belongs in directly linked files.
|
|
23
19
|
|
|
24
20
|
## Description Quality
|
|
25
21
|
|
|
26
|
-
The description is the trigger surface.
|
|
22
|
+
The description is the trigger surface. Platforms inject it into discovery prompts, so write it in third person and include concrete task nouns plus user-intent phrases.
|
|
23
|
+
|
|
24
|
+
1. **Write in third person**
|
|
25
|
+
- Good: "Processes Excel files and generates reports"
|
|
26
|
+
- Avoid: "I can help you process Excel files"
|
|
27
|
+
2. **Be specific and include trigger terms**
|
|
28
|
+
- Good: "Fetch and verify one specific news event with minimal tool calls. Use when user asks whether a specific claim is true."
|
|
29
|
+
- Vague: "Helps with news."
|
|
30
|
+
3. **Include both WHAT and WHEN**
|
|
31
|
+
- WHAT: what the skill does (specific capabilities)
|
|
32
|
+
- WHEN: when the agent should use it (trigger scenarios)
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
Trellis example:
|
|
29
35
|
|
|
30
36
|
```yaml
|
|
31
37
|
description: "Create or improve Trellis-compatible agent skills. Use when the user asks to author a project-local skill, shared .agents skill, platform-specific skill, or upstream Trellis bundled skill."
|
|
@@ -45,9 +51,9 @@ Checklist:
|
|
|
45
51
|
- Avoids broad utility wording such as "helper", "tools", or "useful".
|
|
46
52
|
- Does not claim support for platforms or files the skill does not cover.
|
|
47
53
|
|
|
48
|
-
## Hard Constraints
|
|
54
|
+
## Hard Constraints Form
|
|
49
55
|
|
|
50
|
-
Put
|
|
56
|
+
Put `## Hard Constraints` near the top, before `## Workflow`, when the skill has safety, sequencing, scope, or reliability rules.
|
|
51
57
|
|
|
52
58
|
Write constraints as imperative one-liners:
|
|
53
59
|
|
|
@@ -55,7 +61,7 @@ Write constraints as imperative one-liners:
|
|
|
55
61
|
- Never modify global configuration without explicit user approval.
|
|
56
62
|
- Always run the validator before final output.
|
|
57
63
|
|
|
58
|
-
Do not bury constraints in paragraphs. Do not
|
|
64
|
+
Do not bury constraints in paragraphs. Do not restate the same rule elsewhere; Hard Constraints is the only rule list.
|
|
59
65
|
|
|
60
66
|
## Progressive Disclosure
|
|
61
67
|
|
|
@@ -72,6 +78,18 @@ Good candidates for references:
|
|
|
72
78
|
|
|
73
79
|
Keep references one level deep and link them directly from `SKILL.md`. Avoid reference chains where one reference requires reading another reference before it is useful.
|
|
74
80
|
|
|
81
|
+
## Writing for agents (four techniques)
|
|
82
|
+
|
|
83
|
+
Write instructions for how agents consume text: tokens in, behavior out. Apply these techniques to `SKILL.md`, descriptions, and references.
|
|
84
|
+
|
|
85
|
+
1. **Leading words** — Open each instruction with the load-bearing verb or decision; agents anchor behavior on the first tokens of a line or sentence. Criterion: the first two words of every instruction state the action, not the context. Bad: "After checking the environment, update the file." Good: "Inspect local files first, then edit."
|
|
86
|
+
|
|
87
|
+
2. **No-op test** — Test redundancy by deleting the whole sentence, not a word. Criterion: if the skill still holds with the sentence removed, cut it; word-level trimming hides leftover redundancy. Bad: deleting "local" from "inspect local files" leaves the same ambiguity.
|
|
88
|
+
|
|
89
|
+
3. **Negation anti-pattern** — Prefer positive wording over stacked "do not" instructions. Criterion: each "do not"/"never" line should be rewritable as a "do" statement or merged into an existing constraint. Bad: "Do not edit files you have not read." Good: "Read a file before editing it."
|
|
90
|
+
|
|
91
|
+
4. **Context pointer wording** — Phrase references with their trigger branch so the agent knows when to load them. Criterion: every pointer names the condition or decision that should open it. Vague: "See authoring rules." Actionable: "Load `references/authoring-rules.md` when reviewing skill shape or descriptions."
|
|
92
|
+
|
|
75
93
|
## Deterministic Scripts
|
|
76
94
|
|
|
77
95
|
Add scripts only when they make the skill more reliable than generated ad hoc code.
|
|
@@ -87,11 +105,67 @@ Script rules:
|
|
|
87
105
|
|
|
88
106
|
## Common Anti-Patterns
|
|
89
107
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
108
|
+
### Vague description or name
|
|
109
|
+
|
|
110
|
+
Vague frontmatter descriptions trigger on unrelated work.
|
|
111
|
+
|
|
112
|
+
- Good names: `processing-pdfs`, `render-mermaid`
|
|
113
|
+
- Avoid: `helper`, `utils`, `tools`
|
|
114
|
+
|
|
115
|
+
### Mixing unrelated workflows
|
|
116
|
+
|
|
117
|
+
One skill should not address multiple unrelated concerns. Split into separate skills.
|
|
118
|
+
|
|
119
|
+
### Pasting long prompts or full scripts into SKILL.md
|
|
120
|
+
|
|
121
|
+
Link references instead of inlining long material.
|
|
122
|
+
|
|
123
|
+
### Repeated rules
|
|
124
|
+
|
|
125
|
+
Do not restate the same rule in several sections with slightly different wording.
|
|
126
|
+
|
|
127
|
+
### Missing stop conditions
|
|
128
|
+
|
|
129
|
+
Multiple broad search loops without explicit exit criteria.
|
|
130
|
+
|
|
131
|
+
### Cross-step variable sharing
|
|
132
|
+
|
|
133
|
+
Each tool call is independent and stateless. Shell variables set in one call do not exist in the next.
|
|
134
|
+
|
|
135
|
+
```markdown
|
|
136
|
+
# Bad — variable $TS differs between Write and Bash calls
|
|
137
|
+
Write content to /tmp/data-$TS.txt # tool call 1: timestamp A
|
|
138
|
+
Bash: cmd --input /tmp/data-$TS.txt # tool call 2: timestamp B → file not found
|
|
139
|
+
|
|
140
|
+
# Good — use a fixed path; let the script handle dynamic naming internally
|
|
141
|
+
Write content to /var/skill-name/input.txt
|
|
142
|
+
Bash: cmd --input /var/skill-name/input.txt
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Exposing internal decisions as parameters
|
|
146
|
+
|
|
147
|
+
If a value can be determined by the script itself, do not expose it as a parameter.
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
# Bad — unnecessary parameters the agent must coordinate
|
|
151
|
+
cmd --input file.txt --output out.png --format png --theme default
|
|
152
|
+
|
|
153
|
+
# Good — only the essential input; script decides the rest
|
|
154
|
+
cmd --input file.txt
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Too many options
|
|
158
|
+
|
|
159
|
+
```markdown
|
|
160
|
+
# Bad
|
|
161
|
+
"You can use pypdf, or pdfplumber, or PyMuPDF, or..."
|
|
162
|
+
|
|
163
|
+
# Good — provide a default with an escape hatch
|
|
164
|
+
"Use pdfplumber for text extraction.
|
|
165
|
+
For scanned PDFs requiring OCR, use pdf2image with pytesseract instead."
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Broken or private references
|
|
169
|
+
|
|
96
170
|
- References to files, scripts, or examples that do not exist.
|
|
97
|
-
- Project-private conventions added to public Trellis bundled skills.
|
|
171
|
+
- Project-private conventions added to public Trellis bundled skills.
|