@blxzer/cursor-trellis 0.2.9 → 0.3.2
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 +94 -0
- package/README.md +85 -19
- package/README.zh-CN.md +60 -21
- package/bin/smart-search.js +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +46 -18
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/capability-smoke.d.ts +24 -0
- package/dist/commands/capability-smoke.d.ts.map +1 -0
- package/dist/commands/capability-smoke.js +83 -0
- package/dist/commands/capability-smoke.js.map +1 -0
- package/dist/commands/channel/agent-loader.d.ts +1 -1
- package/dist/commands/channel/agent-loader.js +4 -4
- package/dist/commands/channel/agent-loader.js.map +1 -1
- package/dist/commands/channel/guard.d.ts +2 -2
- package/dist/commands/channel/guard.js +3 -3
- package/dist/commands/channel/guard.js.map +1 -1
- package/dist/commands/channel/index.js +3 -3
- package/dist/commands/channel/index.js.map +1 -1
- package/dist/commands/channel/list.d.ts +1 -1
- package/dist/commands/channel/list.js +1 -1
- package/dist/commands/channel/rm.d.ts +1 -1
- package/dist/commands/channel/rm.js +1 -1
- package/dist/commands/channel/store/lock.d.ts +1 -1
- package/dist/commands/channel/store/lock.js +1 -1
- package/dist/commands/channel/store/paths.js +1 -1
- package/dist/commands/channel/store/paths.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +197 -91
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts +4 -4
- package/dist/commands/uninstall.js +12 -12
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts +7 -2
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +161 -61
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/upgrade.js +2 -2
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/commands/workflow.d.ts +4 -4
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +10 -9
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/cursor.d.ts +2 -2
- package/dist/configurators/cursor.js +4 -4
- package/dist/configurators/cursor.js.map +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +4 -4
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.d.ts +10 -10
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +32 -32
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +6 -6
- package/dist/configurators/workflow.js +1 -1
- package/dist/constants/paths.d.ts +24 -24
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +16 -16
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.2.10.json +374 -0
- package/dist/migrations/manifests/0.3.0.json +89 -0
- package/dist/migrations/manifests/0.3.1.json +32 -0
- package/dist/templates/common/bundled-skills/{trellis-cursor2plus-setup → cstl-cursor2plus-setup}/SKILL.md +15 -14
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/SKILL.md +75 -75
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/add-project-local-conventions.md +19 -19
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-agents.md +8 -8
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-context-loading.md +26 -26
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-hooks.md +9 -9
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-skills-or-commands.md +8 -8
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-spec-structure.md +17 -17
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-task-lifecycle.md +46 -46
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-workflow.md +18 -18
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/overview.md +55 -55
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/context-injection.md +20 -20
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/generated-files.md +83 -0
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/overview.md +15 -15
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/spec-system.md +12 -12
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/task-system.md +34 -34
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workflow.md +8 -8
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workspace-memory.md +19 -19
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/agents.md +12 -12
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/hooks-and-settings.md +7 -7
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/overview.md +9 -9
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/platform-map.md +7 -7
- package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/skills-and-commands.md +19 -19
- package/dist/templates/common/bundled-skills/{trellis-micro-grill → cstl-micro-grill}/SKILL.md +62 -47
- package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/SKILL.md +44 -44
- package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/authoring-rules.md +97 -97
- package/dist/templates/common/bundled-skills/{trellis-skill-creator/references/trellis-skill-locations.md → cstl-skill-creator/references/cstl-skill-locations.md} +52 -52
- package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/review-checklist.md +47 -47
- package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/SKILL.md +6 -6
- package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/repository-analysis.md +1 -1
- package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-task-planning.md +3 -3
- package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-writing.md +1 -1
- package/dist/templates/common/commands/continue.md +24 -24
- package/dist/templates/common/commands/finish-work.md +5 -5
- package/dist/templates/common/commands/start.md +20 -20
- package/dist/templates/common/index.d.ts +1 -1
- package/dist/templates/common/index.d.ts.map +1 -1
- package/dist/templates/common/skills/before-dev.md +4 -4
- package/dist/templates/common/skills/brainstorm.md +188 -164
- package/dist/templates/common/skills/break-loop.md +3 -3
- package/dist/templates/common/skills/check.md +5 -5
- package/dist/templates/common/skills/update-spec.md +4 -4
- package/dist/templates/cursor/agents/{trellis-check.md → cstl-check.md} +14 -14
- package/dist/templates/cursor/agents/{trellis-implement.md → cstl-implement.md} +14 -14
- package/dist/templates/cursor/agents/{trellis-research.md → cstl-research.md} +11 -11
- package/dist/templates/cursor/commands/cursor2plus-setup.md +15 -15
- 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 +2 -2
- package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
- package/dist/templates/cursor/rules/{trellis-subagent-dispatch.mdc → cstl-subagent-dispatch.mdc} +4 -4
- package/dist/templates/cursor/rules/{trellis-triage.mdc → cstl-triage.mdc} +3 -3
- package/dist/templates/cursor/rules/retrieval-routing.mdc +4 -4
- package/dist/templates/extract.d.ts +1 -1
- package/dist/templates/extract.js +1 -1
- package/dist/templates/markdown/agents.md +13 -13
- package/dist/templates/markdown/prompts/run-semantic-slice-12.md.txt +1 -1
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +634 -634
- package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +5 -5
- package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +7 -1
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +393 -391
- package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +14 -14
- package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +5 -5
- package/dist/templates/markdown/spec/guides/index.md.txt +3 -2
- package/dist/templates/markdown/spec/guides/retrieval-daily-guide.md.txt +10 -10
- package/dist/templates/markdown/workspace-index.md +3 -3
- package/dist/templates/markdown/worktree.yaml.txt +1 -1
- package/dist/templates/shared-hooks/index.d.ts +2 -2
- package/dist/templates/shared-hooks/index.js +2 -2
- package/dist/templates/shared-hooks/inject-retrieval-plan.py +3 -3
- package/dist/templates/shared-hooks/inject-shell-session-context.py +7 -7
- package/dist/templates/shared-hooks/inject-subagent-context.py +4 -4
- package/dist/templates/shared-hooks/inject-workflow-state.py +37 -37
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +2 -2
- package/dist/templates/shared-hooks/session-start.py +16 -16
- package/dist/templates/trellis/config/execution-strategy-rules.json +1 -1
- package/dist/templates/trellis/config.yaml +5 -25
- package/dist/templates/trellis/index.d.ts +2 -2
- package/dist/templates/trellis/index.js +2 -2
- package/dist/templates/trellis/local/README.md +15 -13
- package/dist/templates/trellis/local/patch_wpelc8.py +7 -7
- package/dist/templates/trellis/local/subagent-models.json.example +1 -1
- package/dist/templates/trellis/local/trellis-task-models.json.example +3 -3
- package/dist/templates/trellis/local/trellis-task-models.json5.example +5 -5
- package/dist/templates/trellis/local/trellis_task_models_config.py +6 -6
- package/dist/templates/trellis/scripts/add_session.py +20 -20
- package/dist/templates/trellis/scripts/common/active_task.py +2 -2
- package/dist/templates/trellis/scripts/common/artifact_search.py +587 -587
- package/dist/templates/trellis/scripts/common/cli_adapter.py +3 -3
- package/dist/templates/trellis/scripts/common/codebase_retrieval_router.py +6 -6
- package/dist/templates/trellis/scripts/common/config.py +3 -3
- package/dist/templates/trellis/scripts/common/developer.py +2 -2
- package/dist/templates/trellis/scripts/common/execution_strategy.py +1 -1
- package/dist/templates/trellis/scripts/common/packages_context.py +23 -23
- package/dist/templates/trellis/scripts/common/parent_orchestration.py +702 -702
- package/dist/templates/trellis/scripts/common/paths.py +107 -107
- package/dist/templates/trellis/scripts/common/project_file_stats.py +1 -1
- package/dist/templates/trellis/scripts/common/retrieval_agent_instructions.py +1 -1
- package/dist/templates/trellis/scripts/common/safe_commit.py +31 -31
- package/dist/templates/trellis/scripts/common/session_context.py +1159 -1159
- package/dist/templates/trellis/scripts/common/session_memory.py +360 -360
- package/dist/templates/trellis/scripts/common/smart_search_evidence.py +514 -514
- package/dist/templates/trellis/scripts/common/smart_search_resolve.py +1 -1
- package/dist/templates/trellis/scripts/common/subagent_dispatch.py +7 -7
- package/dist/templates/trellis/scripts/common/task_context.py +1 -1
- package/dist/templates/trellis/scripts/common/task_dashboard.py +140 -140
- package/dist/templates/trellis/scripts/common/task_gates.py +2056 -2034
- package/dist/templates/trellis/scripts/common/task_store.py +1594 -1594
- package/dist/templates/trellis/scripts/common/task_utils.py +3 -3
- package/dist/templates/trellis/scripts/common/tasks.py +1 -1
- package/dist/templates/trellis/scripts/common/trellis_config.py +3 -3
- package/dist/templates/trellis/scripts/common/workflow_phase.py +1 -1
- package/dist/templates/trellis/scripts/cursor_retrieval_probe.py +3 -3
- package/dist/templates/trellis/scripts/cursor_retrieval_probe_prompt.md +11 -11
- package/dist/templates/trellis/scripts/hooks/linear_sync.py +8 -8
- package/dist/templates/trellis/scripts/init_developer.py +2 -2
- package/dist/templates/trellis/scripts/retrieval_probe_matrix_template.json +4 -4
- package/dist/templates/trellis/scripts/route_codebase_retrieval.py +1 -1
- package/dist/templates/trellis/scripts/task.py +918 -918
- package/dist/templates/trellis/tasks/templates/release-readiness/implement.md +2 -2
- package/dist/templates/trellis/workflow.md +805 -805
- package/dist/types/ai-tools.d.ts +1 -1
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +1 -1
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/types/migration.d.ts +1 -1
- package/dist/types/migration.d.ts.map +1 -1
- package/dist/utils/agents-md.d.ts +37 -0
- package/dist/utils/agents-md.d.ts.map +1 -0
- package/dist/utils/agents-md.js +82 -0
- package/dist/utils/agents-md.js.map +1 -0
- package/dist/utils/codebase-retrieval-router.js +5 -5
- package/dist/utils/codebase-retrieval-router.js.map +1 -1
- package/dist/utils/manifest-prune.d.ts +2 -2
- package/dist/utils/manifest-prune.js +4 -4
- package/dist/utils/manifest-prune.js.map +1 -1
- package/dist/utils/mirror-check.d.ts +3 -1
- package/dist/utils/mirror-check.d.ts.map +1 -1
- package/dist/utils/mirror-check.js +22 -11
- package/dist/utils/mirror-check.js.map +1 -1
- package/dist/utils/project-capabilities.d.ts +14 -3
- package/dist/utils/project-capabilities.d.ts.map +1 -1
- package/dist/utils/project-capabilities.js +127 -17
- 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 +6 -3
- 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-fetcher.js +1 -1
- package/dist/utils/template-fetcher.js.map +1 -1
- package/dist/utils/template-hash.d.ts +2 -2
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +12 -10
- package/dist/utils/template-hash.js.map +1 -1
- package/dist/utils/workflow-dir.d.ts +13 -0
- package/dist/utils/workflow-dir.d.ts.map +1 -0
- package/dist/utils/workflow-dir.js +35 -0
- package/dist/utils/workflow-dir.js.map +1 -0
- package/dist/utils/workflow-ownership.d.ts +36 -0
- package/dist/utils/workflow-ownership.d.ts.map +1 -0
- package/dist/utils/workflow-ownership.js +137 -0
- package/dist/utils/workflow-ownership.js.map +1 -0
- package/dist/utils/workflow-resolver.d.ts +1 -1
- package/dist/utils/workflow-resolver.js +1 -1
- package/package.json +3 -4
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +0 -83
- /package/bin/{trellis.js → cstl.js} +0 -0
- /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/mcp-setup.md +0 -0
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
# Change Local Task Lifecycle
|
|
2
2
|
|
|
3
|
-
Task lifecycle includes creation, selection, execution start, context configuration, archive, parent/child tasks, and lifecycle hooks. The default customization targets are `.
|
|
3
|
+
Task lifecycle includes creation, selection, execution start, context configuration, archive, parent/child tasks, and lifecycle hooks. The default customization targets are `.cstl/tasks/`, `.cstl/config.yaml`, and `.cstl/scripts/`.
|
|
4
4
|
|
|
5
5
|
## Read These Files First
|
|
6
6
|
|
|
7
|
-
1. `.
|
|
8
|
-
2. `.
|
|
9
|
-
3. `.
|
|
10
|
-
4. `.
|
|
11
|
-
5. `.
|
|
12
|
-
6. The selected task's `.
|
|
7
|
+
1. `.cstl/workflow.md`
|
|
8
|
+
2. `.cstl/config.yaml`
|
|
9
|
+
3. `.cstl/scripts/task.py`
|
|
10
|
+
4. `.cstl/scripts/common/task_store.py`
|
|
11
|
+
5. `.cstl/scripts/common/task_utils.py`
|
|
12
|
+
6. The selected task's `.cstl/tasks/<task>/task.json`
|
|
13
13
|
|
|
14
14
|
## Common Needs And Edit Points
|
|
15
15
|
|
|
16
16
|
| Need | Edit point |
|
|
17
17
|
| --- | --- |
|
|
18
|
-
| Automatically sync an external system after task creation | `hooks.after_create` in `.
|
|
19
|
-
| Automatically update status after execution start | `hooks.after_start` in `.
|
|
20
|
-
| Clean external resources after archive | `hooks.after_archive` in `.
|
|
21
|
-
| Change default task fields | `.
|
|
22
|
-
| Change task parsing/search | `.
|
|
23
|
-
| Change selected task behavior | `.
|
|
18
|
+
| Automatically sync an external system after task creation | `hooks.after_create` in `.cstl/config.yaml`. |
|
|
19
|
+
| Automatically update status after execution start | `hooks.after_start` in `.cstl/config.yaml`. |
|
|
20
|
+
| Clean external resources after archive | `hooks.after_archive` in `.cstl/config.yaml`. |
|
|
21
|
+
| Change default task fields | `.cstl/scripts/common/task_store.py`. |
|
|
22
|
+
| Change task parsing/search | `.cstl/scripts/common/task_utils.py`. |
|
|
23
|
+
| Change selected task behavior | `.cstl/scripts/common/active_task.py`. |
|
|
24
24
|
|
|
25
25
|
## lifecycle hooks
|
|
26
26
|
|
|
27
|
-
`.
|
|
27
|
+
`.cstl/config.yaml` supports:
|
|
28
28
|
|
|
29
29
|
```yaml
|
|
30
30
|
hooks:
|
|
31
31
|
after_create:
|
|
32
|
-
- "python3 .
|
|
32
|
+
- "python3 .cstl/scripts/hooks/my_sync.py create"
|
|
33
33
|
after_start:
|
|
34
|
-
- "python3 .
|
|
35
|
-
after_archive:
|
|
36
|
-
- "python3 .
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Hook commands receive the `TASK_JSON_PATH` environment variable, pointing to the task's `task.json`. Hook failures should usually warn, but not block the main task operation.
|
|
34
|
+
- "python3 .cstl/scripts/hooks/my_sync.py start"
|
|
35
|
+
after_archive:
|
|
36
|
+
- "python3 .cstl/scripts/hooks/my_sync.py archive"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Hook commands receive the `TASK_JSON_PATH` environment variable, pointing to the task's `task.json`. Hook failures should usually warn, but not block the main task operation.
|
|
40
40
|
|
|
41
41
|
## Change Task Fields
|
|
42
42
|
|
|
@@ -53,36 +53,36 @@ Example:
|
|
|
53
53
|
|
|
54
54
|
If standard fields really need to change, inspect every local script that reads `task.json`.
|
|
55
55
|
|
|
56
|
-
## Change Selected Task
|
|
57
|
-
|
|
58
|
-
Selected task is session-level state stored in `.
|
|
59
|
-
|
|
60
|
-
- `.
|
|
61
|
-
- platform hooks or shell session bridges
|
|
62
|
-
- selected task descriptions in `.
|
|
63
|
-
|
|
64
|
-
### `task.py create` Does Not Select
|
|
65
|
-
|
|
66
|
-
`cmd_create` in `.
|
|
67
|
-
|
|
68
|
-
- The task's `status=planning` is written.
|
|
69
|
-
- No selected-task pointer is written, even when session identity exists.
|
|
70
|
-
- The user or AI selects the task later with `task.py select <dir>` when they explicitly choose to enter it.
|
|
71
|
-
|
|
72
|
-
This keeps new sessions and bare task creation at `Selected task: none` until a live-session choice is made.
|
|
73
|
-
|
|
74
|
-
If you fork `task.py` to add a new creation path (e.g. an external import that bypasses `cmd_create`), audit that it does not auto-select or auto-start the created task. The full status writer table is in `.
|
|
56
|
+
## Change Selected Task
|
|
57
|
+
|
|
58
|
+
Selected task is session-level state stored in `.cstl/.runtime/sessions/`. Do not fall back to a global `.current-task` model. If the user wants to change selected task behavior, edit:
|
|
59
|
+
|
|
60
|
+
- `.cstl/scripts/common/active_task.py`
|
|
61
|
+
- platform hooks or shell session bridges
|
|
62
|
+
- selected task descriptions in `.cstl/workflow.md`
|
|
63
|
+
|
|
64
|
+
### `task.py create` Does Not Select
|
|
65
|
+
|
|
66
|
+
`cmd_create` in `.cstl/scripts/common/task_store.py` writes the task directory and planning artifacts only. The behavior:
|
|
67
|
+
|
|
68
|
+
- The task's `status=planning` is written.
|
|
69
|
+
- No selected-task pointer is written, even when session identity exists.
|
|
70
|
+
- The user or AI selects the task later with `task.py select <dir>` when they explicitly choose to enter it.
|
|
71
|
+
|
|
72
|
+
This keeps new sessions and bare task creation at `Selected task: none` until a live-session choice is made.
|
|
73
|
+
|
|
74
|
+
If you fork `task.py` to add a new creation path (e.g. an external import that bypasses `cmd_create`), audit that it does not auto-select or auto-start the created task. The full status writer table is in `.cstl/spec/cli/backend/workflow-state-contract.md`.
|
|
75
75
|
|
|
76
76
|
## Modification Steps
|
|
77
77
|
|
|
78
|
-
1. Confirm the selected task with `python3 ./.
|
|
79
|
-
2. Read the selected task's `task.json` and confirm status and fields.
|
|
80
|
-
3. For configuration needs, edit `.
|
|
81
|
-
4. For script behavior needs, then edit `.
|
|
82
|
-
5. If the AI flow changed, synchronize `.
|
|
78
|
+
1. Confirm the selected task with `python3 ./.cstl/scripts/task.py selected --source`.
|
|
79
|
+
2. Read the selected task's `task.json` and confirm status and fields.
|
|
80
|
+
3. For configuration needs, edit `.cstl/config.yaml` first.
|
|
81
|
+
4. For script behavior needs, then edit `.cstl/scripts/`.
|
|
82
|
+
5. If the AI flow changed, synchronize `.cstl/workflow.md`.
|
|
83
83
|
|
|
84
84
|
## Do Not
|
|
85
85
|
|
|
86
|
-
- Do not directly edit `.
|
|
86
|
+
- Do not directly edit `.cstl/.runtime/sessions/` to "fix" business state.
|
|
87
87
|
- Do not hard-code project-private fields into scripts; prefer `meta`.
|
|
88
88
|
- Do not default to asking the user to fork Trellis CLI.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Change Local Workflow
|
|
2
2
|
|
|
3
|
-
When the user wants to change Trellis phases, next-action hints, whether to create tasks, whether to use sub-agents, or when to check/wrap up, edit `.
|
|
3
|
+
When the user wants to change Trellis phases, next-action hints, whether to create tasks, whether to use sub-agents, or when to check/wrap up, edit `.cstl/workflow.md` first.
|
|
4
4
|
|
|
5
5
|
## Read These Files First
|
|
6
6
|
|
|
7
|
-
1. `.
|
|
7
|
+
1. `.cstl/workflow.md`
|
|
8
8
|
2. Entry files for the current platform, such as skills/commands/prompts/workflows
|
|
9
|
-
3. The selected task's `task.json` and `prd.md`
|
|
9
|
+
3. The selected task's `task.json` and `prd.md`
|
|
10
10
|
|
|
11
11
|
## Common Needs And Edit Points
|
|
12
12
|
|
|
@@ -21,11 +21,11 @@ When the user wants to change Trellis phases, next-action hints, whether to crea
|
|
|
21
21
|
|
|
22
22
|
## Modification Steps
|
|
23
23
|
|
|
24
|
-
1. Find the relevant section in `.
|
|
24
|
+
1. Find the relevant section in `.cstl/workflow.md`.
|
|
25
25
|
2. When changing rules, keep explicit trigger conditions and next actions.
|
|
26
26
|
3. If adding or renaming a skill/agent, synchronize the corresponding files in platform directories.
|
|
27
|
-
4. Workflow-state changes only need an edit to the `[workflow-state:STATUS]` block in `.
|
|
28
|
-
5. Make the AI reread `.
|
|
27
|
+
4. Workflow-state changes only need an edit to the `[workflow-state:STATUS]` block in `.cstl/workflow.md`. The hook is parser-only — it reads whatever you put in the block. Keep the opening and closing tags' STATUS strings identical (`[workflow-state:foo]…[/workflow-state:foo]`); mismatched STATUS pairs are silently dropped.
|
|
28
|
+
5. Make the AI reread `.cstl/workflow.md`; do not keep using rules from the old conversation.
|
|
29
29
|
|
|
30
30
|
## Example: Relax Task Creation Requirements
|
|
31
31
|
|
|
@@ -41,25 +41,25 @@ If the formal Phase 1 flow also needs to change, synchronize the Phase 1 section
|
|
|
41
41
|
|
|
42
42
|
## Example: One Platform Does Not Use Sub-Agents
|
|
43
43
|
|
|
44
|
-
If the user wants only one platform to avoid sub-agents, first confirm whether that platform has a separate group in the workflow. Then change Phase 2 routing for that platform group instead of deleting all `
|
|
44
|
+
If the user wants only one platform to avoid sub-agents, first confirm whether that platform has a separate group in the workflow. Then change Phase 2 routing for that platform group instead of deleting all `cstl-implement` / `cstl-check` instructions across platforms.
|
|
45
45
|
|
|
46
|
-
##
|
|
46
|
+
## `cstl-continue` Route Table
|
|
47
47
|
|
|
48
|
-
`/
|
|
48
|
+
`cstl-continue` (the continue skill; legacy projects may still invoke it as the `/cstl:continue` slash command) resumes a task by deciding which phase step to load next. The decision combines `task.json.status` with the presence of artifacts inside the task directory. The mapping is fixed in the skill itself; forks that add custom statuses must extend both the workflow.md tag block and this table.
|
|
49
49
|
|
|
50
50
|
| `status` | Artifact state | Resume at |
|
|
51
51
|
| --- | --- | --- |
|
|
52
|
-
| `planning` | `prd.md` missing | Phase 1.1 (load `
|
|
53
|
-
| `planning` | lightweight task with `prd.md` complete | run `task.py start-execution <task> --check`, ask for explicit execution approval, then run `--approved` |
|
|
54
|
-
| `planning` | complex task missing `design.md` or `implement.md` | complete missing planning artifacts |
|
|
55
|
-
| `planning` | complex task has `prd.md`, `design.md`, and `implement.md` | run `task.py start-execution <task> --check`, ask for explicit execution approval, then run `--approved` |
|
|
56
|
-
| `in_progress` | no implementation in conversation history | Phase 2.1 (`
|
|
57
|
-
| `in_progress` | implementation done, no `
|
|
52
|
+
| `planning` | `prd.md` missing | Phase 1.1 (load `cstl-brainstorm`) |
|
|
53
|
+
| `planning` | lightweight task with `prd.md` complete | run `task.py start-execution <task> --check`, ask for explicit execution approval, then run `--approved` |
|
|
54
|
+
| `planning` | complex task missing `design.md` or `implement.md` | complete missing planning artifacts |
|
|
55
|
+
| `planning` | complex task has `prd.md`, `design.md`, and `implement.md` | run `task.py start-execution <task> --check`, ask for explicit execution approval, then run `--approved` |
|
|
56
|
+
| `in_progress` | no implementation in conversation history | Phase 2.1 (`cstl-implement`) |
|
|
57
|
+
| `in_progress` | implementation done, no `cstl-check` run | Phase 2.2 (`cstl-check`) |
|
|
58
58
|
| `in_progress` | check passed | Phase 3.1 (verify quality + spec update) |
|
|
59
|
-
| `completed` | task is still in active tree | Phase 3.5 (run
|
|
59
|
+
| `completed` | task is still in active tree | Phase 3.5 (run `cstl-finish-work` to archive) |
|
|
60
60
|
|
|
61
|
-
When you add a custom status (e.g. `in-review`), add a `[workflow-state:in-review]` block in `.
|
|
61
|
+
When you add a custom status (e.g. `in-review`), add a `[workflow-state:in-review]` block in `.cstl/workflow.md` for the per-turn breadcrumb AND extend this route table — usually by editing the `cstl-continue` skill (`.cursor/skills/cstl-continue/` or the equivalent command file) to add a row that decides where to resume from. Without the route entry, the resume flow will fall through to a default branch and the user will not land on the step you intended.
|
|
62
62
|
|
|
63
63
|
## Notes
|
|
64
64
|
|
|
65
|
-
`.
|
|
65
|
+
`.cstl/workflow.md` is the local project workflow, not an immutable template. The user can adapt it to team habits. After editing it, platform entry files may still contain old descriptions, so inspect them too.
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
# Local Customization Overview
|
|
2
|
-
|
|
3
|
-
This directory is for local AI working in a user project where Trellis was installed through npm and `
|
|
4
|
-
|
|
5
|
-
## First Determine What The User Actually Wants To Change
|
|
6
|
-
|
|
7
|
-
| User wording | Read first |
|
|
8
|
-
| --- | --- |
|
|
9
|
-
| "Change the Trellis flow / phases / next prompt" | `change-workflow.md` |
|
|
10
|
-
| "Change task creation, status, archive, or hooks" | `change-task-lifecycle.md` |
|
|
11
|
-
| "AI did not read context / change injected content" | `change-context-loading.md` |
|
|
12
|
-
| "A platform hook is not behaving as expected" | `change-hooks.md` |
|
|
13
|
-
| "Change implement/check/research agent behavior" | `change-agents.md` |
|
|
14
|
-
| "Add a skill/command/workflow/prompt" | `change-skills-or-commands.md` |
|
|
15
|
-
| "Adjust the project spec structure" | `change-spec-structure.md` |
|
|
16
|
-
| "Add team conventions and local notes" | `add-project-local-conventions.md` |
|
|
17
|
-
|
|
18
|
-
## General Operation Order
|
|
19
|
-
|
|
20
|
-
1. **Confirm platform and directories**: inspect which directories exist; on a fresh `
|
|
21
|
-
2. **Confirm the selected task**: run `python3 ./.
|
|
22
|
-
3. **Read the local source of truth**: prefer `.
|
|
23
|
-
4. **Modify narrowly**: edit only files related to the user's request.
|
|
24
|
-
5. **Synchronize semantics**: if a shared flow changes, check whether platform entry points also need changes; if a platform entry changes, check whether `.
|
|
25
|
-
|
|
26
|
-
## Local File Priority
|
|
27
|
-
|
|
28
|
-
| Layer | Files |
|
|
29
|
-
| --- | --- |
|
|
30
|
-
| Workflow | `.
|
|
31
|
-
| Project configuration | `.
|
|
32
|
-
| Task material | `.
|
|
33
|
-
| Project specs | `.
|
|
34
|
-
| Runtime scripts | `.
|
|
35
|
-
| Platform integration | `.cursor/` plus legacy adapter directories preserved by `
|
|
36
|
-
| Shared skill | `.agents/skills/` |
|
|
37
|
-
|
|
38
|
-
## Things Not To Do By Default
|
|
39
|
-
|
|
40
|
-
- Do not edit the global npm install directory.
|
|
41
|
-
- Do not edit `node_modules/@blxzer/cursor-trellis`.
|
|
42
|
-
- Do not assume the user has the Trellis GitHub repository.
|
|
43
|
-
- Do not overwrite local files already modified by the user with default templates.
|
|
44
|
-
- Do not put team project rules into public `
|
|
45
|
-
|
|
46
|
-
## When To Inspect Upstream Source
|
|
47
|
-
|
|
48
|
-
Switch to an upstream source-code perspective only when the user explicitly expresses one of these goals:
|
|
49
|
-
|
|
50
|
-
- "I want to open a PR to Trellis"
|
|
51
|
-
- "I want to change npm package publish contents"
|
|
52
|
-
- "I want to fork Trellis"
|
|
53
|
-
- "I want to modify the generation logic for `
|
|
54
|
-
|
|
55
|
-
Otherwise, default to modifying local Trellis files inside the user project.
|
|
1
|
+
# Local Customization Overview
|
|
2
|
+
|
|
3
|
+
This directory is for local AI working in a user project where Trellis was installed through npm and `cstl init` has already been run. The AI should modify generated `.cstl/` and platform directories inside the project, not Trellis CLI upstream source code.
|
|
4
|
+
|
|
5
|
+
## First Determine What The User Actually Wants To Change
|
|
6
|
+
|
|
7
|
+
| User wording | Read first |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| "Change the Trellis flow / phases / next prompt" | `change-workflow.md` |
|
|
10
|
+
| "Change task creation, status, archive, or hooks" | `change-task-lifecycle.md` |
|
|
11
|
+
| "AI did not read context / change injected content" | `change-context-loading.md` |
|
|
12
|
+
| "A platform hook is not behaving as expected" | `change-hooks.md` |
|
|
13
|
+
| "Change implement/check/research agent behavior" | `change-agents.md` |
|
|
14
|
+
| "Add a skill/command/workflow/prompt" | `change-skills-or-commands.md` |
|
|
15
|
+
| "Adjust the project spec structure" | `change-spec-structure.md` |
|
|
16
|
+
| "Add team conventions and local notes" | `add-project-local-conventions.md` |
|
|
17
|
+
|
|
18
|
+
## General Operation Order
|
|
19
|
+
|
|
20
|
+
1. **Confirm platform and directories**: inspect which directories exist; on a fresh `cstl init --cursor` only `.cursor/` and `.cstl/` are created.
|
|
21
|
+
2. **Confirm the selected task**: run `python3 ./.cstl/scripts/task.py selected --source`.
|
|
22
|
+
3. **Read the local source of truth**: prefer `.cstl/workflow.md`, `.cstl/config.yaml`, and relevant platform files.
|
|
23
|
+
4. **Modify narrowly**: edit only files related to the user's request.
|
|
24
|
+
5. **Synchronize semantics**: if a shared flow changes, check whether platform entry points also need changes; if a platform entry changes, check whether `.cstl/workflow.md` still agrees.
|
|
25
|
+
|
|
26
|
+
## Local File Priority
|
|
27
|
+
|
|
28
|
+
| Layer | Files |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| Workflow | `.cstl/workflow.md` |
|
|
31
|
+
| Project configuration | `.cstl/config.yaml` |
|
|
32
|
+
| Task material | `.cstl/tasks/<task>/` |
|
|
33
|
+
| Project specs | `.cstl/spec/` |
|
|
34
|
+
| Runtime scripts | `.cstl/scripts/` |
|
|
35
|
+
| Platform integration | `.cursor/` plus legacy adapter directories preserved by `cstl update` |
|
|
36
|
+
| Shared skill | `.agents/skills/` |
|
|
37
|
+
|
|
38
|
+
## Things Not To Do By Default
|
|
39
|
+
|
|
40
|
+
- Do not edit the global npm install directory.
|
|
41
|
+
- Do not edit `node_modules/@blxzer/cursor-trellis`.
|
|
42
|
+
- Do not assume the user has the Trellis GitHub repository.
|
|
43
|
+
- Do not overwrite local files already modified by the user with default templates.
|
|
44
|
+
- Do not put team project rules into public `cstl-meta`; project rules belong in `.cstl/spec/` or a local skill.
|
|
45
|
+
|
|
46
|
+
## When To Inspect Upstream Source
|
|
47
|
+
|
|
48
|
+
Switch to an upstream source-code perspective only when the user explicitly expresses one of these goals:
|
|
49
|
+
|
|
50
|
+
- "I want to open a PR to Trellis"
|
|
51
|
+
- "I want to change npm package publish contents"
|
|
52
|
+
- "I want to fork Trellis"
|
|
53
|
+
- "I want to modify the generation logic for `cstl init/update`"
|
|
54
|
+
|
|
55
|
+
Otherwise, default to modifying local Trellis files inside the user project.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Local Context Injection System
|
|
2
2
|
|
|
3
|
-
Trellis context injection aims to make AI read the right files at the right time instead of relying on model memory. In a user project, injection is implemented by `.
|
|
3
|
+
Trellis context injection aims to make AI read the right files at the right time instead of relying on model memory. In a user project, injection is implemented by `.cstl/` scripts together with platform hooks, agents, and skills.
|
|
4
4
|
|
|
5
5
|
## Injected Context Types
|
|
6
6
|
|
|
7
7
|
| Type | Source | Purpose |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| session context | `.
|
|
10
|
-
| workflow context | `.
|
|
11
|
-
| spec context | `.
|
|
12
|
-
| task context | `.
|
|
9
|
+
| session context | `.cstl/scripts/get_context.py` | Current developer, git status, selected task, Task Dashboard, active tasks, journal, packages. |
|
|
10
|
+
| workflow context | `.cstl/workflow.md` | Current Trellis flow and next action. |
|
|
11
|
+
| spec context | `.cstl/spec/` + task JSONL | Specs that must be followed during implementation/checking. |
|
|
12
|
+
| task context | `.cstl/tasks/<task>/prd.md`, `design.md`, `implement.md`, `research/` | Selected task requirements, design, execution plan, and research. |
|
|
13
13
|
| platform context | Platform hooks/settings/agents | Lets different AI tools read the files above through their own mechanisms. |
|
|
14
14
|
|
|
15
15
|
## session-start
|
|
@@ -17,25 +17,25 @@ Trellis context injection aims to make AI read the right files at the right time
|
|
|
17
17
|
Platforms with session-start support inject a Trellis overview when a session starts, clears, compacts, or receives a similar event. Injected content usually includes:
|
|
18
18
|
|
|
19
19
|
- workflow summary.
|
|
20
|
-
- selected task status.
|
|
21
|
-
- active tasks.
|
|
20
|
+
- selected task status.
|
|
21
|
+
- active tasks.
|
|
22
22
|
- spec index paths.
|
|
23
23
|
- developer identity and git status.
|
|
24
24
|
|
|
25
|
-
If the user feels the AI does not know the selected task in a new session, first check whether the platform's session-start hook or equivalent mechanism is installed and running.
|
|
25
|
+
If the user feels the AI does not know the selected task in a new session, first check whether the platform's session-start hook or equivalent mechanism is installed and running.
|
|
26
26
|
|
|
27
27
|
## workflow-state
|
|
28
28
|
|
|
29
|
-
workflow-state is a lightweight hint injected around each user turn. Based on selected task status, it selects a block from `.
|
|
29
|
+
workflow-state is a lightweight hint injected around each user turn. Based on selected task status, it selects a block from `.cstl/workflow.md`, such as `no_task`, `planning`, `in_progress`, or `completed`.
|
|
30
30
|
|
|
31
|
-
If the user wants to change "what the AI should do next in a given state," edit the corresponding state block in `.
|
|
31
|
+
If the user wants to change "what the AI should do next in a given state," edit the corresponding state block in `.cstl/workflow.md` first.
|
|
32
32
|
|
|
33
33
|
## sub-agent context
|
|
34
34
|
|
|
35
35
|
Implement and check agents need task context. Trellis has two loading modes:
|
|
36
36
|
|
|
37
37
|
1. **hook push**: a platform hook injects jsonl-referenced files plus `prd.md`, `design.md` if present, and `implement.md` if present before the agent starts.
|
|
38
|
-
2. **agent pull**: the agent definition instructs the agent to read the selected task, jsonl context, and task artifacts after startup.
|
|
38
|
+
2. **agent pull**: the agent definition instructs the agent to read the selected task, jsonl context, and task artifacts after startup.
|
|
39
39
|
|
|
40
40
|
In both modes, JSONL files in the task directory are the manifest for spec/research context. Task artifacts are read separately in this order: `prd.md` -> `design.md if present` -> `implement.md if present`.
|
|
41
41
|
|
|
@@ -44,25 +44,25 @@ In both modes, JSONL files in the task directory are the manifest for spec/resea
|
|
|
44
44
|
`implement.jsonl` and `check.jsonl` contain one JSON object per line:
|
|
45
45
|
|
|
46
46
|
```jsonl
|
|
47
|
-
{"file": ".
|
|
47
|
+
{"file": ".cstl/spec/backend/index.md", "reason": "Backend rules"}
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
Readers should skip seed rows without a `file` field. When configuring JSONL, the AI should include only spec/research files, not pre-register code files that will be modified.
|
|
51
51
|
|
|
52
|
-
## Selected Task And Context Key
|
|
53
|
-
|
|
54
|
-
Selected task state lives in `.
|
|
55
|
-
|
|
56
|
-
If shell commands cannot see the same context key, `task.py selected --source` may report no selected task. In that case, check whether the platform passes session identity into the shell instead of hand-writing a global current-task file.
|
|
52
|
+
## Selected Task And Context Key
|
|
53
|
+
|
|
54
|
+
Selected task state lives in `.cstl/.runtime/sessions/` and is isolated per session. Hooks try to resolve the context key from platform events, environment variables, transcript paths, or `TRELLIS_CONTEXT_ID`.
|
|
55
|
+
|
|
56
|
+
If shell commands cannot see the same context key, `task.py selected --source` may report no selected task. In that case, check whether the platform passes session identity into the shell instead of hand-writing a global current-task file.
|
|
57
57
|
|
|
58
58
|
## Local Customization Points
|
|
59
59
|
|
|
60
60
|
| Need | Edit location |
|
|
61
61
|
| --- | --- |
|
|
62
62
|
| Change session-start injected content | The platform's `session-start` hook or plugin file. |
|
|
63
|
-
| Change per-turn workflow-state rules | `[workflow-state:STATUS]` block in `.
|
|
63
|
+
| Change per-turn workflow-state rules | `[workflow-state:STATUS]` block in `.cstl/workflow.md`. The platform workflow-state hook parses these blocks verbatim and embeds no fallback text. |
|
|
64
64
|
| Change how sub-agents read context | Platform agent definitions, the `inject-subagent-context` hook, or agent preludes. |
|
|
65
|
-
| Change JSONL validation/display | `.
|
|
66
|
-
| Change selected task resolution | `.
|
|
65
|
+
| Change JSONL validation/display | `.cstl/scripts/common/task_context.py`. |
|
|
66
|
+
| Change selected task resolution | `.cstl/scripts/common/active_task.py`. |
|
|
67
67
|
|
|
68
68
|
When modifying context injection, verify two things: new sessions can see the correct task, and sub-agents can see the correct task artifacts/spec/research.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Local Files Generated After Init
|
|
2
|
+
|
|
3
|
+
`cstl init` writes the Trellis runtime into the user project. Later, `cstl update` tries to update Trellis-managed template files, but it uses `.cstl/.template-hashes.json` to determine which files have already been modified by the user.
|
|
4
|
+
|
|
5
|
+
This page only describes files that are visible and editable inside the user project.
|
|
6
|
+
|
|
7
|
+
## `.cstl/`
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
.cstl/
|
|
11
|
+
├── workflow.md
|
|
12
|
+
├── config.yaml
|
|
13
|
+
├── .developer
|
|
14
|
+
├── .version
|
|
15
|
+
├── .template-hashes.json
|
|
16
|
+
├── .runtime/
|
|
17
|
+
├── scripts/
|
|
18
|
+
├── spec/
|
|
19
|
+
├── tasks/
|
|
20
|
+
└── workspace/
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
| Path | Usually editable? | Notes |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| `.cstl/workflow.md` | Yes | Local workflow documentation and AI routing rules. |
|
|
26
|
+
| `.cstl/config.yaml` | Yes | Project configuration, hooks, packages, journal line limits, and related settings. |
|
|
27
|
+
| `.cstl/spec/` | Yes | Project specs, intended to be updated regularly by users and AI. |
|
|
28
|
+
| `.cstl/tasks/` | Yes | Task material and research artifacts, maintained by the task workflow. |
|
|
29
|
+
| `.cstl/workspace/` | Yes | Session records, usually written by `add_session.py`. |
|
|
30
|
+
| `.cstl/scripts/` | Carefully | Local runtime. It can be customized, but only after understanding the call chain. |
|
|
31
|
+
| `.cstl/.runtime/` | No | Runtime state, usually written automatically by hooks/scripts. |
|
|
32
|
+
| `.cstl/.developer` | Carefully | Current developer identity. |
|
|
33
|
+
| `.cstl/.version` | No | Trellis version record used by update/migration logic. |
|
|
34
|
+
| `.cstl/.template-hashes.json` | No | Template hash record. Do not hand-write business rules here. |
|
|
35
|
+
|
|
36
|
+
## Platform Directories
|
|
37
|
+
|
|
38
|
+
On a fresh `cstl init --cursor`, the only platform directory created is `.cursor/`. Trellis previously generated per-platform directories for many AI tools (`.claude/`, `.codex/`, `.opencode/`, etc.); those legacy directories are preserved by `cstl update` but new Trellis behavior ships to `.cursor/` only.
|
|
39
|
+
|
|
40
|
+
Common categories inside `.cursor/`:
|
|
41
|
+
|
|
42
|
+
| Category | Path | Purpose |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| hooks | `.cursor/hooks/` | Hook scripts invoked from `.cursor/hooks.json`. Inject session context, workflow-state, and sub-agent context. |
|
|
45
|
+
| settings/registration | `.cursor/hooks.json` | Registers which scripts run on which Cursor events. |
|
|
46
|
+
| rules | `.cursor/rules/*.mdc` (`alwaysApply: true`) | Per-turn policy prepended before every prompt. |
|
|
47
|
+
| agents | `.cursor/agents/` | Define agents such as `cstl-research`, `cstl-implement`, and `cstl-check`. |
|
|
48
|
+
| skills | `.cursor/skills/` | Skills that auto-trigger or can be read by AI. |
|
|
49
|
+
| commands | `.cursor/commands/` | Legacy compatibility-only user-invoked entry points. |
|
|
50
|
+
|
|
51
|
+
When modifying a platform directory, also confirm whether `.cstl/workflow.md` still describes the same flow.
|
|
52
|
+
|
|
53
|
+
## Meaning Of Template Hashes
|
|
54
|
+
|
|
55
|
+
`.cstl/.template-hashes.json` records the content hash from the last time Trellis wrote a template file. `cstl update` uses it to distinguish three cases:
|
|
56
|
+
|
|
57
|
+
| Case | Update behavior |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| File was not modified by the user | It can be updated automatically. |
|
|
60
|
+
| File was modified by the user | Prompt the user to overwrite, keep, or generate `.new`. |
|
|
61
|
+
| File is no longer a current template | It may be deleted, renamed, or preserved according to migration rules. |
|
|
62
|
+
|
|
63
|
+
When an AI customizes local Trellis files, it does not need to maintain hashes manually. It is normal for Trellis update to recognize the result as "modified by the user."
|
|
64
|
+
|
|
65
|
+
## Local Customization Boundaries
|
|
66
|
+
|
|
67
|
+
Editable by default:
|
|
68
|
+
|
|
69
|
+
- `.cstl/workflow.md`
|
|
70
|
+
- `.cstl/config.yaml`
|
|
71
|
+
- `.cstl/spec/**`
|
|
72
|
+
- `.cstl/scripts/**`
|
|
73
|
+
- Platform hooks, settings, agents, skills, commands, prompts, and workflows
|
|
74
|
+
|
|
75
|
+
Do not edit by default:
|
|
76
|
+
|
|
77
|
+
- Global npm install directory
|
|
78
|
+
- `node_modules/@blxzer/cursor-trellis`
|
|
79
|
+
- Trellis GitHub repository source code
|
|
80
|
+
- Concrete state files under `.cstl/.runtime/**`
|
|
81
|
+
- Hash contents inside `.cstl/.template-hashes.json`
|
|
82
|
+
|
|
83
|
+
Switch to the Trellis CLI source-code perspective only when the user explicitly wants to contribute upstream.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Local Trellis Architecture Overview
|
|
2
2
|
|
|
3
|
-
`
|
|
3
|
+
`cstl-meta` is for user projects that have already run `cstl init`. The user's machine usually has only the npm-installed `cstl` command plus the Trellis files generated inside the project; it may not have the Trellis CLI source code.
|
|
4
4
|
|
|
5
5
|
Therefore, when an AI uses this skill, the default customization target is local files inside the user project:
|
|
6
6
|
|
|
7
|
-
- `.
|
|
7
|
+
- `.cstl/`: workflow, tasks, specs, memory, scripts, and runtime state.
|
|
8
8
|
- Platform directory: `.cursor/` — skills, agents, hooks, commands, rules.
|
|
9
9
|
- Shared skill layer: `.agents/skills/` (industry skill-sharing path; kept when present but not extended by new Trellis behavior).
|
|
10
10
|
|
|
@@ -14,8 +14,8 @@ Do not default to guiding the user to fork the Trellis CLI repository. Treat ups
|
|
|
14
14
|
|
|
15
15
|
Trellis provides three layers inside a user project:
|
|
16
16
|
|
|
17
|
-
1. **Workflow layer**: `.
|
|
18
|
-
2. **Persistence layer**: `.
|
|
17
|
+
1. **Workflow layer**: `.cstl/workflow.md` defines phases, routing, next actions, and prompt blocks.
|
|
18
|
+
2. **Persistence layer**: `.cstl/tasks/`, `.cstl/spec/`, and `.cstl/workspace/` store tasks, specs, and session memory.
|
|
19
19
|
3. **Platform integration layer**: hooks, settings, agents, skills, commands, prompts, and workflows in platform directories connect the Trellis workflow to different AI tools.
|
|
20
20
|
|
|
21
21
|
All three layers live inside the user project, so an AI can read and modify them directly.
|
|
@@ -24,21 +24,21 @@ All three layers live inside the user project, so an AI can read and modify them
|
|
|
24
24
|
|
|
25
25
|
| Path | Purpose |
|
|
26
26
|
| --- | --- |
|
|
27
|
-
| `.
|
|
28
|
-
| `.
|
|
29
|
-
| `.
|
|
30
|
-
| `.
|
|
31
|
-
| `.
|
|
32
|
-
| `.
|
|
33
|
-
| `.
|
|
34
|
-
| `.
|
|
27
|
+
| `.cstl/workflow.md` | Workflow phases, skill routing, and workflow-state prompt blocks. |
|
|
28
|
+
| `.cstl/config.yaml` | Project configuration, task lifecycle hooks, monorepo package configuration, and journal configuration. |
|
|
29
|
+
| `.cstl/spec/` | The user's project-specific coding conventions and thinking guides. |
|
|
30
|
+
| `.cstl/tasks/` | Each task's PRD, technical notes, research files, and JSONL context. |
|
|
31
|
+
| `.cstl/workspace/` | Per-developer journals and cross-session memory. |
|
|
32
|
+
| `.cstl/scripts/` | Local Python runtime used by commands, hooks, and context injection. |
|
|
33
|
+
| `.cstl/.runtime/` | Session-level runtime state, such as the selected task pointer. |
|
|
34
|
+
| `.cstl/.template-hashes.json` | Template hashes for Trellis-managed files, used by update to determine whether local files were modified by the user. |
|
|
35
35
|
|
|
36
36
|
## AI Customization Principles
|
|
37
37
|
|
|
38
|
-
1. **Find the local source of truth first**: Do not edit from memory. Read `.
|
|
38
|
+
1. **Find the local source of truth first**: Do not edit from memory. Read `.cstl/workflow.md`, `.cstl/config.yaml`, the relevant platform directory, and related task files first.
|
|
39
39
|
2. **Edit the user project, not the npm package cache**: Modify generated files inside the project, not `node_modules` or the global npm install directory.
|
|
40
|
-
3. **Keep platform files aligned with `.
|
|
41
|
-
4. **Put project-specific rules in `.
|
|
40
|
+
3. **Keep platform files aligned with `.cstl/`**: If workflow routing changes, also check whether platform skills or commands still describe the same flow.
|
|
41
|
+
4. **Put project-specific rules in `.cstl/spec/` or a local skill**: Do not put team conventions into `cstl-meta`.
|
|
42
42
|
5. **Preserve user changes**: If a file was already modified locally, work from the current content instead of overwriting it with a default template.
|
|
43
43
|
|
|
44
44
|
## How To Use This Directory
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Local Spec System
|
|
2
2
|
|
|
3
|
-
`.
|
|
3
|
+
`.cstl/spec/` is the user's project-specific engineering spec library. Trellis is not about making AI memorize conventions; it injects relevant specs or requires the AI to read them at the right time.
|
|
4
4
|
|
|
5
5
|
## Directory Model
|
|
6
6
|
|
|
7
7
|
A common single-repository structure:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
.
|
|
10
|
+
.cstl/spec/
|
|
11
11
|
├── backend/
|
|
12
12
|
│ ├── index.md
|
|
13
13
|
│ └── ...
|
|
@@ -22,7 +22,7 @@ A common single-repository structure:
|
|
|
22
22
|
A common monorepo structure:
|
|
23
23
|
|
|
24
24
|
```text
|
|
25
|
-
.
|
|
25
|
+
.cstl/spec/
|
|
26
26
|
├── cli/
|
|
27
27
|
│ ├── backend/
|
|
28
28
|
│ │ ├── index.md
|
|
@@ -43,7 +43,7 @@ A common monorepo structure:
|
|
|
43
43
|
|
|
44
44
|
## Package Configuration
|
|
45
45
|
|
|
46
|
-
`.
|
|
46
|
+
`.cstl/config.yaml` can declare packages:
|
|
47
47
|
|
|
48
48
|
```yaml
|
|
49
49
|
packages:
|
|
@@ -58,7 +58,7 @@ default_package: cli
|
|
|
58
58
|
The AI can run:
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
python3 ./.
|
|
61
|
+
python3 ./.cstl/scripts/get_context.py --mode packages
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
This command lists packages and spec layers for the current project. Use this output as the reference when configuring context JSONL.
|
|
@@ -68,8 +68,8 @@ This command lists packages and spec layers for the current project. Use this ou
|
|
|
68
68
|
Before a task enters implementation, planning may write relevant specs into `implement.jsonl` / `check.jsonl` when the task needs spec or research context beyond the task artifacts:
|
|
69
69
|
|
|
70
70
|
```jsonl
|
|
71
|
-
{"file": ".
|
|
72
|
-
{"file": ".
|
|
71
|
+
{"file": ".cstl/spec/cli/backend/index.md", "reason": "CLI backend conventions"}
|
|
72
|
+
{"file": ".cstl/spec/cli/unit-test/conventions.md", "reason": "Test expectations"}
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
Sub-agents or platform preludes read these JSONL files and load the referenced specs. On platforms without sub-agent support, the AI should read the relevant specs directly according to the workflow.
|
|
@@ -85,18 +85,18 @@ Specs should contain executable engineering conventions for the project, not gen
|
|
|
85
85
|
- Cases that require tests.
|
|
86
86
|
- Project-specific pitfalls and how to avoid them.
|
|
87
87
|
|
|
88
|
-
When the AI learns a new rule during implementation or debugging, it should update `.
|
|
88
|
+
When the AI learns a new rule during implementation or debugging, it should update `.cstl/spec/` rather than only summarizing it in chat.
|
|
89
89
|
|
|
90
90
|
## Local Customization Points
|
|
91
91
|
|
|
92
92
|
| Need | Edit location |
|
|
93
93
|
| --- | --- |
|
|
94
|
-
| Add a new spec layer | `.
|
|
95
|
-
| Change monorepo spec mapping | `packages` / `default_package` / `spec_scope` in `.
|
|
94
|
+
| Add a new spec layer | `.cstl/spec/<package>/<layer>/index.md` and corresponding guideline files. |
|
|
95
|
+
| Change monorepo spec mapping | `packages` / `default_package` / `spec_scope` in `.cstl/config.yaml`. |
|
|
96
96
|
| Change which specs AI reads before implementation | The task's `implement.jsonl`. |
|
|
97
97
|
| Change which specs AI reads during checking | The task's `check.jsonl`. |
|
|
98
|
-
| Change when specs should be updated | Phase 3.3 in `.
|
|
98
|
+
| Change when specs should be updated | Phase 3.3 in `.cstl/workflow.md` and the `cstl-update-spec` skill. |
|
|
99
99
|
|
|
100
100
|
## Boundaries
|
|
101
101
|
|
|
102
|
-
`.
|
|
102
|
+
`.cstl/spec/` is the user's project specification, not a permanent copy of Trellis built-in templates. The AI should encourage the user to update it according to the actual project code instead of treating Trellis default templates as immutable documents.
|