@blxzer/cursor-trellis 0.2.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +37 -12
  3. package/README.zh-CN.md +41 -16
  4. package/bin/{trellis.js → cstl.js} +1 -1
  5. package/dist/cli/index.d.ts.map +1 -1
  6. package/dist/cli/index.js +30 -4
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/commands/capability-smoke.d.ts +24 -0
  9. package/dist/commands/capability-smoke.d.ts.map +1 -0
  10. package/dist/commands/capability-smoke.js +83 -0
  11. package/dist/commands/capability-smoke.js.map +1 -0
  12. package/dist/commands/init.d.ts.map +1 -1
  13. package/dist/commands/init.js +94 -34
  14. package/dist/commands/init.js.map +1 -1
  15. package/dist/commands/uninstall.d.ts +1 -1
  16. package/dist/commands/uninstall.js +2 -2
  17. package/dist/commands/uninstall.js.map +1 -1
  18. package/dist/commands/update.d.ts +1 -1
  19. package/dist/commands/update.d.ts.map +1 -1
  20. package/dist/commands/update.js +79 -34
  21. package/dist/commands/update.js.map +1 -1
  22. package/dist/commands/upgrade.js +2 -2
  23. package/dist/commands/upgrade.js.map +1 -1
  24. package/dist/configurators/cursor.d.ts +2 -2
  25. package/dist/configurators/cursor.js +4 -4
  26. package/dist/configurators/cursor.js.map +1 -1
  27. package/dist/configurators/index.js +3 -3
  28. package/dist/configurators/index.js.map +1 -1
  29. package/dist/configurators/shared.d.ts +10 -10
  30. package/dist/configurators/shared.d.ts.map +1 -1
  31. package/dist/configurators/shared.js +26 -26
  32. package/dist/configurators/shared.js.map +1 -1
  33. package/dist/configurators/workflow.d.ts +2 -2
  34. package/dist/migrations/manifests/0.2.10.json +374 -0
  35. package/dist/migrations/manifests/0.3.0.json +89 -0
  36. package/dist/templates/common/bundled-skills/{trellis-cursor2plus-setup → cstl-cursor2plus-setup}/SKILL.md +5 -4
  37. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/SKILL.md +75 -75
  38. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/add-project-local-conventions.md +8 -8
  39. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-agents.md +6 -6
  40. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-context-loading.md +7 -7
  41. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-skills-or-commands.md +1 -1
  42. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-spec-structure.md +2 -2
  43. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-task-lifecycle.md +31 -31
  44. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-workflow.md +12 -12
  45. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/overview.md +55 -55
  46. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/context-injection.md +13 -13
  47. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/generated-files.md +83 -83
  48. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/overview.md +2 -2
  49. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/spec-system.md +1 -1
  50. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/task-system.md +22 -22
  51. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workflow.md +5 -5
  52. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workspace-memory.md +3 -3
  53. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/agents.md +11 -11
  54. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/hooks-and-settings.md +1 -1
  55. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/overview.md +4 -4
  56. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/platform-map.md +5 -5
  57. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/skills-and-commands.md +15 -15
  58. package/dist/templates/common/bundled-skills/{trellis-micro-grill → cstl-micro-grill}/SKILL.md +62 -47
  59. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/SKILL.md +44 -44
  60. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/authoring-rules.md +97 -97
  61. package/dist/templates/common/bundled-skills/{trellis-skill-creator/references/trellis-skill-locations.md → cstl-skill-creator/references/cstl-skill-locations.md} +52 -52
  62. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/review-checklist.md +47 -47
  63. package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/SKILL.md +1 -1
  64. package/dist/templates/common/commands/continue.md +20 -20
  65. package/dist/templates/common/commands/start.md +11 -11
  66. package/dist/templates/common/index.d.ts +1 -1
  67. package/dist/templates/common/index.d.ts.map +1 -1
  68. package/dist/templates/common/skills/brainstorm.md +188 -164
  69. package/dist/templates/common/skills/check.md +1 -1
  70. package/dist/templates/cursor/agents/{trellis-check.md → cstl-check.md} +8 -8
  71. package/dist/templates/cursor/agents/{trellis-implement.md → cstl-implement.md} +8 -8
  72. package/dist/templates/cursor/agents/{trellis-research.md → cstl-research.md} +2 -2
  73. package/dist/templates/cursor/commands/cursor2plus-setup.md +5 -5
  74. package/dist/templates/cursor/fixtures/expected-rules.d.ts +1 -1
  75. package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -1
  76. package/dist/templates/cursor/fixtures/expected-rules.js +2 -2
  77. package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
  78. package/dist/templates/cursor/rules/{trellis-subagent-dispatch.mdc → cstl-subagent-dispatch.mdc} +2 -2
  79. package/dist/templates/cursor/rules/{trellis-triage.mdc → cstl-triage.mdc} +1 -1
  80. package/dist/templates/markdown/agents.md +4 -4
  81. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +634 -634
  82. package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +4 -4
  83. package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +6 -0
  84. package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +393 -391
  85. package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +6 -6
  86. package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +2 -2
  87. package/dist/templates/markdown/spec/guides/index.md.txt +3 -2
  88. package/dist/templates/shared-hooks/index.d.ts +1 -1
  89. package/dist/templates/shared-hooks/index.js +1 -1
  90. package/dist/templates/shared-hooks/inject-subagent-context.py +3 -3
  91. package/dist/templates/shared-hooks/inject-workflow-state.py +27 -27
  92. package/dist/templates/shared-hooks/research-end-retrieval-pack.py +1 -1
  93. package/dist/templates/shared-hooks/session-start.py +3 -3
  94. package/dist/templates/trellis/config/execution-strategy-rules.json +1 -1
  95. package/dist/templates/trellis/config.yaml +4 -4
  96. package/dist/templates/trellis/local/README.md +12 -10
  97. package/dist/templates/trellis/local/patch_wpelc8.py +3 -3
  98. package/dist/templates/trellis/local/subagent-models.json.example +1 -1
  99. package/dist/templates/trellis/local/trellis-task-models.json.example +3 -3
  100. package/dist/templates/trellis/local/trellis-task-models.json5.example +5 -5
  101. package/dist/templates/trellis/local/trellis_task_models_config.py +6 -6
  102. package/dist/templates/trellis/scripts/common/cli_adapter.py +3 -3
  103. package/dist/templates/trellis/scripts/common/execution_strategy.py +1 -1
  104. package/dist/templates/trellis/scripts/common/parent_orchestration.py +702 -702
  105. package/dist/templates/trellis/scripts/common/session_context.py +1159 -1159
  106. package/dist/templates/trellis/scripts/common/subagent_dispatch.py +5 -5
  107. package/dist/templates/trellis/scripts/common/task_gates.py +2056 -2034
  108. package/dist/templates/trellis/scripts/common/task_store.py +1594 -1594
  109. package/dist/templates/trellis/workflow.md +805 -805
  110. package/dist/types/ai-tools.d.ts +1 -1
  111. package/dist/types/ai-tools.d.ts.map +1 -1
  112. package/dist/types/ai-tools.js +1 -1
  113. package/dist/types/ai-tools.js.map +1 -1
  114. package/dist/utils/project-capabilities.d.ts +14 -3
  115. package/dist/utils/project-capabilities.d.ts.map +1 -1
  116. package/dist/utils/project-capabilities.js +122 -12
  117. package/dist/utils/project-capabilities.js.map +1 -1
  118. package/dist/utils/readiness.d.ts +10 -0
  119. package/dist/utils/readiness.d.ts.map +1 -1
  120. package/dist/utils/readiness.js +6 -3
  121. package/dist/utils/readiness.js.map +1 -1
  122. package/package.json +3 -4
  123. /package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-hooks.md +0 -0
  124. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/mcp-setup.md +0 -0
  125. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/repository-analysis.md +0 -0
  126. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-task-planning.md +0 -0
  127. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-writing.md +0 -0
@@ -1,6 +1,6 @@
1
1
  # Add Project-Local Conventions
2
2
 
3
- Often the user does not need to change Trellis mechanics; they need local AI to understand their team's conventions. In that case, prefer `.trellis/spec/` or a project-local skill instead of editing `trellis-meta`.
3
+ Often the user does not need to change Trellis mechanics; they need local AI to understand their team's conventions. In that case, prefer `.trellis/spec/` or a project-local skill instead of editing `cstl-meta`.
4
4
 
5
5
  ## Where To Put Things
6
6
 
@@ -62,22 +62,22 @@ If the content is a coding convention, write it to spec. Examples:
62
62
 
63
63
  After writing it, update the corresponding `index.md` so AI can find the new rule from the entry point.
64
64
 
65
- ## Make The Selected Task Use New Conventions
66
-
67
- After writing a spec, add it to the selected task context:
65
+ ## Make The Selected Task Use New Conventions
66
+
67
+ After writing a spec, add it to the selected task context:
68
68
 
69
69
  ```bash
70
70
  python3 ./.trellis/scripts/task.py add-context <task> implement ".trellis/spec/backend/error-handling.md" "Error handling conventions"
71
71
  python3 ./.trellis/scripts/task.py add-context <task> check ".trellis/spec/backend/error-handling.md" "Review error handling"
72
72
  ```
73
73
 
74
- ## Do Not Store Project-Private Rules In `trellis-meta`
74
+ ## Do Not Store Project-Private Rules In `cstl-meta`
75
75
 
76
- `trellis-meta` is a public skill for understanding Trellis architecture and local customization entry points. Put project-private content in:
76
+ `cstl-meta` is a public skill for understanding Trellis architecture and local customization entry points. Put project-private content in:
77
77
 
78
78
  - `.trellis/spec/`
79
79
  - a project-local skill
80
- - the selected task
80
+ - the selected task
81
81
  - workspace journal
82
82
 
83
- This prevents future updates to Trellis's built-in `trellis-meta` from overwriting the team's own conventions.
83
+ This prevents future updates to Trellis's built-in `cstl-meta` from overwriting the team's own conventions.
@@ -1,6 +1,6 @@
1
1
  # Change Local Agents
2
2
 
3
- When the user wants to change `trellis-research`, `trellis-implement`, or `trellis-check` behavior, edit platform agent files in the user project.
3
+ When the user wants to change `cstl-research`, `cstl-implement`, or `cstl-check` behavior, edit platform agent files in the user project.
4
4
 
5
5
  ## Read These Files First
6
6
 
@@ -14,7 +14,7 @@ When the user wants to change `trellis-research`, `trellis-implement`, or `trell
14
14
 
15
15
  | Platform | Path |
16
16
  | --- | --- |
17
- | Cursor | `.cursor/agents/trellis-*.md` |
17
+ | Cursor | `.cursor/agents/cstl-*.md` |
18
18
 
19
19
  If a user project still contains legacy platform agent directories (`.claude/agents/`, `.codex/agents/`, etc.), inspect them but route new agent definitions to `.cursor/agents/`.
20
20
 
@@ -24,9 +24,9 @@ Use the actual paths in the user project as authoritative.
24
24
 
25
25
  | Need | Which agent to edit |
26
26
  | --- | --- |
27
- | Research must write files, not only reply in chat | `trellis-research` |
28
- | Certain local specs must be read before implementation | `trellis-implement` + `implement.jsonl` configuration rules |
29
- | Specific commands must run during checking | `trellis-check` |
27
+ | Research must write files, not only reply in chat | `cstl-research` |
28
+ | Certain local specs must be read before implementation | `cstl-implement` + `implement.jsonl` configuration rules |
29
+ | Specific commands must run during checking | `cstl-check` |
30
30
  | Agent must not modify certain directories | The corresponding agent's write boundary instructions |
31
31
  | Agent output format must be fixed | The corresponding agent's final/reporting instructions |
32
32
 
@@ -36,7 +36,7 @@ Use the actual paths in the user project as authoritative.
36
36
  2. **Do not hard-code project specs into agents**: long-term specs belong in `.trellis/spec/`; agents are responsible for reading them.
37
37
  3. **Make read order explicit**: selected task -> PRD -> info -> JSONL -> spec/research.
38
38
  4. **Make write boundaries explicit**: which directories may be written and which may not.
39
- 5. **Treat dogfood + published copies consistently**: `.cursor/agents/trellis-*.md` (dogfooded) and `packages/cli/src/templates/cursor/agents/trellis-*.md` (published template) must stay in sync — see `cross-layer-thinking-guide.md.txt` → Cross-Package Template Consistency.
39
+ 5. **Treat dogfood + published copies consistently**: `.cursor/agents/cstl-*.md` (dogfooded) and `packages/cli/src/templates/cursor/agents/cstl-*.md` (published template) must stay in sync — see `cross-layer-thinking-guide.md.txt` → Cross-Package Template Consistency.
40
40
 
41
41
  ## Agent Pull Mode
42
42
 
@@ -1,6 +1,6 @@
1
1
  # Change Local Context Loading
2
2
 
3
- Context loading determines when AI reads workflow, task, spec, research, workspace, and git status. Read this page when the user says "AI does not know the selected task," "the agent did not read specs," or "there is too much/too little context."
3
+ Context loading determines when AI reads workflow, task, spec, research, workspace, and git status. Read this page when the user says "AI does not know the selected task," "the agent did not read specs," or "there is too much/too little context."
4
4
 
5
5
  ## Read These Files First
6
6
 
@@ -10,14 +10,14 @@ Context loading determines when AI reads workflow, task, spec, research, workspa
10
10
  4. `.trellis/scripts/common/task_context.py`
11
11
  5. `.trellis/scripts/common/active_task.py`
12
12
  6. Current platform hooks or agent files
13
- 7. The selected task's `implement.jsonl` / `check.jsonl`
13
+ 7. The selected task's `implement.jsonl` / `check.jsonl`
14
14
 
15
15
  ## Context Sources
16
16
 
17
17
  | Source | Purpose |
18
18
  | --- | --- |
19
19
  | `.trellis/workflow.md` | Workflow and next-action hints. |
20
- | `.trellis/tasks/<task>/prd.md` | Selected task requirements. |
20
+ | `.trellis/tasks/<task>/prd.md` | Selected task requirements. |
21
21
  | `.trellis/tasks/<task>/design.md` | Complex task technical design. |
22
22
  | `.trellis/tasks/<task>/implement.md` | Complex task execution plan. |
23
23
  | `.trellis/tasks/<task>/implement.jsonl` | Spec/research to read before implementation. |
@@ -33,7 +33,7 @@ Context loading determines when AI reads workflow, task, spec, research, workspa
33
33
  | Inject more/less information in new sessions | `session_context.py` or the platform `session-start` hook. |
34
34
  | Change hints on each user input | `[workflow-state:STATUS]` block in `.trellis/workflow.md`. The `inject-workflow-state` hook is parser-only and reads the block verbatim. |
35
35
  | Agent did not read specs | Task JSONL, agent prelude, `inject-subagent-context` hook. |
36
- | Selected task is lost | `active_task.py` and platform session identity propagation. |
36
+ | Selected task is lost | `active_task.py` and platform session identity propagation. |
37
37
  | Change JSONL validation rules | `task_context.py`. |
38
38
 
39
39
  ## JSONL Rules
@@ -61,11 +61,11 @@ Context cannot grow without bound. Prefer injecting indexes and paths so the AI
61
61
  First determine which mode the platform uses:
62
62
 
63
63
  - hook push: edit the `inject-subagent-context` hook.
64
- - agent pull: edit the read steps in the corresponding `trellis-implement` / `trellis-check` agent file.
64
+ - agent pull: edit the read steps in the corresponding `cstl-implement` / `cstl-check` agent file.
65
65
 
66
66
  In both modes, make sure the agent ultimately reads:
67
67
 
68
- 1. selected task
68
+ 1. selected task
69
69
  2. the corresponding JSONL
70
70
  3. spec/research referenced by the JSONL
71
71
  4. `prd.md`
@@ -75,7 +75,7 @@ In both modes, make sure the agent ultimately reads:
75
75
  ## Troubleshooting Order
76
76
 
77
77
  ```bash
78
- python3 ./.trellis/scripts/task.py selected --source
78
+ python3 ./.trellis/scripts/task.py selected --source
79
79
  python3 ./.trellis/scripts/task.py list-context <task>
80
80
  python3 ./.trellis/scripts/task.py validate <task>
81
81
  python3 ./.trellis/scripts/get_context.py --mode packages
@@ -30,7 +30,7 @@ A skill is usually:
30
30
 
31
31
  `SKILL.md` should be short and responsible for triggering/routing. Put long content in `references/` so AI can read it on demand.
32
32
 
33
- For detailed skill authoring and review rules, use `trellis-skill-creator`. This `trellis-meta` page only identifies where local Trellis skill, command, prompt, and workflow changes belong.
33
+ For detailed skill authoring and review rules, use `cstl-skill-creator`. This `cstl-meta` page only identifies where local Trellis skill, command, prompt, and workflow changes belong.
34
34
 
35
35
  The frontmatter description should specify when to use the skill. Example:
36
36
 
@@ -7,7 +7,7 @@ When the user wants to change the engineering conventions AI follows, add new sp
7
7
  1. `.trellis/config.yaml`
8
8
  2. `.trellis/spec/`
9
9
  3. `.trellis/workflow.md` planning artifact guidance and Phase 3.3
10
- 4. Selected task `implement.jsonl` / `check.jsonl`
10
+ 4. Selected task `implement.jsonl` / `check.jsonl`
11
11
 
12
12
  ## Common Needs
13
13
 
@@ -47,7 +47,7 @@ Monorepo example:
47
47
 
48
48
  ## Update Context
49
49
 
50
- Adding a spec does not mean every task automatically reads it. The selected task must reference it in JSONL:
50
+ Adding a spec does not mean every task automatically reads it. The selected task must reference it in JSONL:
51
51
 
52
52
  ```bash
53
53
  python3 ./.trellis/scripts/task.py add-context <task> implement ".trellis/spec/webapp/security/index.md" "Security conventions"
@@ -1,6 +1,6 @@
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 `.trellis/tasks/`, `.trellis/config.yaml`, and `.trellis/scripts/`.
3
+ Task lifecycle includes creation, selection, execution start, context configuration, archive, parent/child tasks, and lifecycle hooks. The default customization targets are `.trellis/tasks/`, `.trellis/config.yaml`, and `.trellis/scripts/`.
4
4
 
5
5
  ## Read These Files First
6
6
 
@@ -9,18 +9,18 @@ Task lifecycle includes creation, selection, execution start, context configurat
9
9
  3. `.trellis/scripts/task.py`
10
10
  4. `.trellis/scripts/common/task_store.py`
11
11
  5. `.trellis/scripts/common/task_utils.py`
12
- 6. The selected task's `.trellis/tasks/<task>/task.json`
12
+ 6. The selected task's `.trellis/tasks/<task>/task.json`
13
13
 
14
14
  ## Common Needs And Edit Points
15
15
 
16
16
  | Need | Edit point |
17
17
  | --- | --- |
18
18
  | Automatically sync an external system after task creation | `hooks.after_create` in `.trellis/config.yaml`. |
19
- | Automatically update status after execution start | `hooks.after_start` in `.trellis/config.yaml`. |
20
- | Clean external resources after archive | `hooks.after_archive` in `.trellis/config.yaml`. |
19
+ | Automatically update status after execution start | `hooks.after_start` in `.trellis/config.yaml`. |
20
+ | Clean external resources after archive | `hooks.after_archive` in `.trellis/config.yaml`. |
21
21
  | Change default task fields | `.trellis/scripts/common/task_store.py`. |
22
22
  | Change task parsing/search | `.trellis/scripts/common/task_utils.py`. |
23
- | Change selected task behavior | `.trellis/scripts/common/active_task.py`. |
23
+ | Change selected task behavior | `.trellis/scripts/common/active_task.py`. |
24
24
 
25
25
  ## lifecycle hooks
26
26
 
@@ -32,11 +32,11 @@ hooks:
32
32
  - "python3 .trellis/scripts/hooks/my_sync.py create"
33
33
  after_start:
34
34
  - "python3 .trellis/scripts/hooks/my_sync.py start"
35
- after_archive:
36
- - "python3 .trellis/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.
35
+ after_archive:
36
+ - "python3 .trellis/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,30 +53,30 @@ 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 `.trellis/.runtime/sessions/`. Do not fall back to a global `.current-task` model. If the user wants to change selected task behavior, edit:
59
-
60
- - `.trellis/scripts/common/active_task.py`
61
- - platform hooks or shell session bridges
62
- - selected task descriptions in `.trellis/workflow.md`
63
-
64
- ### `task.py create` Does Not Select
65
-
66
- `cmd_create` in `.trellis/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 `.trellis/spec/cli/backend/workflow-state-contract.md`.
56
+ ## Change Selected Task
57
+
58
+ Selected task is session-level state stored in `.trellis/.runtime/sessions/`. Do not fall back to a global `.current-task` model. If the user wants to change selected task behavior, edit:
59
+
60
+ - `.trellis/scripts/common/active_task.py`
61
+ - platform hooks or shell session bridges
62
+ - selected task descriptions in `.trellis/workflow.md`
63
+
64
+ ### `task.py create` Does Not Select
65
+
66
+ `cmd_create` in `.trellis/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 `.trellis/spec/cli/backend/workflow-state-contract.md`.
75
75
 
76
76
  ## Modification Steps
77
77
 
78
- 1. Confirm the selected task with `python3 ./.trellis/scripts/task.py selected --source`.
79
- 2. Read the selected task's `task.json` and confirm status and fields.
78
+ 1. Confirm the selected task with `python3 ./.trellis/scripts/task.py selected --source`.
79
+ 2. Read the selected task's `task.json` and confirm status and fields.
80
80
  3. For configuration needs, edit `.trellis/config.yaml` first.
81
81
  4. For script behavior needs, then edit `.trellis/scripts/`.
82
82
  5. If the AI flow changed, synchronize `.trellis/workflow.md`.
@@ -6,7 +6,7 @@ When the user wants to change Trellis phases, next-action hints, whether to crea
6
6
 
7
7
  1. `.trellis/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
 
@@ -41,24 +41,24 @@ 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 `trellis-implement` / `trellis-check` instructions across platforms.
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
- ## `/trellis:continue` Route Table
46
+ ## `cstl-continue` Route Table
47
47
 
48
- `/trellis:continue` 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 command itself; forks that add custom statuses must extend both the workflow.md tag block and this table.
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 `trellis-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 (`trellis-implement`) |
57
- | `in_progress` | implementation done, no `trellis-check` run | Phase 2.2 (`trellis-check`) |
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 `/trellis:finish-work` to archive) |
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 `.trellis/workflow.md` for the per-turn breadcrumb AND extend this route table — usually by editing the `/trellis:continue` command file (`.{platform}/commands/trellis/continue.md` or equivalent) to add a row that decides where to resume from. Without the route entry, `/trellis:continue` will fall through to a default branch and the user will not land on the step you intended.
61
+ When you add a custom status (e.g. `in-review`), add a `[workflow-state:in-review]` block in `.trellis/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
 
@@ -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 `trellis init` has already been run. The AI should modify generated `.trellis/` 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 `trellis init --cursor` only `.cursor/` and `.trellis/` are created.
21
- 2. **Confirm the selected task**: run `python3 ./.trellis/scripts/task.py selected --source`.
22
- 3. **Read the local source of truth**: prefer `.trellis/workflow.md`, `.trellis/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 `.trellis/workflow.md` still agrees.
25
-
26
- ## Local File Priority
27
-
28
- | Layer | Files |
29
- | --- | --- |
30
- | Workflow | `.trellis/workflow.md` |
31
- | Project configuration | `.trellis/config.yaml` |
32
- | Task material | `.trellis/tasks/<task>/` |
33
- | Project specs | `.trellis/spec/` |
34
- | Runtime scripts | `.trellis/scripts/` |
35
- | Platform integration | `.cursor/` plus legacy adapter directories preserved by `trellis 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 `trellis-meta`; project rules belong in `.trellis/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 `trellis init/update`"
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 `.trellis/` 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 `.trellis/` are created.
21
+ 2. **Confirm the selected task**: run `python3 ./.trellis/scripts/task.py selected --source`.
22
+ 3. **Read the local source of truth**: prefer `.trellis/workflow.md`, `.trellis/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 `.trellis/workflow.md` still agrees.
25
+
26
+ ## Local File Priority
27
+
28
+ | Layer | Files |
29
+ | --- | --- |
30
+ | Workflow | `.trellis/workflow.md` |
31
+ | Project configuration | `.trellis/config.yaml` |
32
+ | Task material | `.trellis/tasks/<task>/` |
33
+ | Project specs | `.trellis/spec/` |
34
+ | Runtime scripts | `.trellis/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 `.trellis/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.
@@ -6,10 +6,10 @@ Trellis context injection aims to make AI read the right files at the right time
6
6
 
7
7
  | Type | Source | Purpose |
8
8
  | --- | --- | --- |
9
- | session context | `.trellis/scripts/get_context.py` | Current developer, git status, selected task, Task Dashboard, active tasks, journal, packages. |
9
+ | session context | `.trellis/scripts/get_context.py` | Current developer, git status, selected task, Task Dashboard, active tasks, journal, packages. |
10
10
  | workflow context | `.trellis/workflow.md` | Current Trellis flow and next action. |
11
11
  | spec context | `.trellis/spec/` + task JSONL | Specs that must be followed during implementation/checking. |
12
- | task context | `.trellis/tasks/<task>/prd.md`, `design.md`, `implement.md`, `research/` | Selected task requirements, design, execution plan, and research. |
12
+ | task context | `.trellis/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,16 +17,16 @@ 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 `.trellis/workflow.md`, such as `no_task`, `planning`, `in_progress`, or `completed`.
29
+ workflow-state is a lightweight hint injected around each user turn. Based on selected task status, it selects a block from `.trellis/workflow.md`, such as `no_task`, `planning`, `in_progress`, or `completed`.
30
30
 
31
31
  If the user wants to change "what the AI should do next in a given state," edit the corresponding state block in `.trellis/workflow.md` first.
32
32
 
@@ -35,7 +35,7 @@ If the user wants to change "what the AI should do next in a given state," edit
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
 
@@ -49,11 +49,11 @@ In both modes, JSONL files in the task directory are the manifest for spec/resea
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 `.trellis/.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.
52
+ ## Selected Task And Context Key
53
+
54
+ Selected task state lives in `.trellis/.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
 
@@ -63,6 +63,6 @@ If shell commands cannot see the same context key, `task.py selected --source` m
63
63
  | Change per-turn workflow-state rules | `[workflow-state:STATUS]` block in `.trellis/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
65
  | Change JSONL validation/display | `.trellis/scripts/common/task_context.py`. |
66
- | Change selected task resolution | `.trellis/scripts/common/active_task.py`. |
66
+ | Change selected task resolution | `.trellis/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.