@blxzer/cursor-trellis 0.3.0 → 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 +30 -0
- package/README.md +51 -10
- package/README.zh-CN.md +21 -7
- package/bin/cstl.js +1 -1
- package/bin/smart-search.js +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +17 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/capability-smoke.js +2 -2
- package/dist/commands/capability-smoke.js.map +1 -1
- 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 +105 -59
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/uninstall.d.ts +3 -3
- package/dist/commands/uninstall.js +10 -10
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts +6 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +83 -28
- package/dist/commands/update.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/index.d.ts.map +1 -1
- package/dist/configurators/index.js +1 -1
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/shared.js +6 -6
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +4 -4
- 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.3.1.json +32 -0
- package/dist/templates/common/bundled-skills/cstl-cursor2plus-setup/SKILL.md +11 -11
- package/dist/templates/common/bundled-skills/cstl-meta/SKILL.md +15 -15
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/add-project-local-conventions.md +12 -12
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-agents.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-context-loading.md +21 -21
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-hooks.md +9 -9
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-skills-or-commands.md +7 -7
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-spec-structure.md +15 -15
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-task-lifecycle.md +27 -27
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-workflow.md +7 -7
- package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/overview.md +11 -11
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/context-injection.md +12 -12
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/generated-files.md +21 -21
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/overview.md +14 -14
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/spec-system.md +12 -12
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/task-system.md +23 -23
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/workflow.md +3 -3
- package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/workspace-memory.md +16 -16
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/agents.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/hooks-and-settings.md +6 -6
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/overview.md +5 -5
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/platform-map.md +3 -3
- package/dist/templates/common/bundled-skills/cstl-meta/references/platform-files/skills-and-commands.md +5 -5
- package/dist/templates/common/bundled-skills/cstl-skill-creator/SKILL.md +2 -2
- package/dist/templates/common/bundled-skills/cstl-skill-creator/references/review-checklist.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/SKILL.md +5 -5
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/references/repository-analysis.md +1 -1
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/references/spec-task-planning.md +3 -3
- package/dist/templates/common/bundled-skills/cstl-spec-bootstrap/references/spec-writing.md +1 -1
- package/dist/templates/common/commands/continue.md +6 -6
- package/dist/templates/common/commands/finish-work.md +5 -5
- package/dist/templates/common/commands/start.md +8 -8
- package/dist/templates/common/skills/before-dev.md +4 -4
- package/dist/templates/common/skills/brainstorm.md +5 -5
- 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/cstl-check.md +6 -6
- package/dist/templates/cursor/agents/cstl-implement.md +7 -7
- package/dist/templates/cursor/agents/cstl-research.md +9 -9
- package/dist/templates/cursor/commands/cursor2plus-setup.md +10 -10
- package/dist/templates/cursor/rules/cstl-subagent-dispatch.mdc +2 -2
- package/dist/templates/cursor/rules/cstl-triage.mdc +2 -2
- 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 +11 -11
- 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 +5 -5
- package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +3 -3
- package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +1 -1
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +11 -11
- package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +8 -8
- package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +3 -3
- 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 +1 -1
- package/dist/templates/shared-hooks/index.js +1 -1
- 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 +1 -1
- package/dist/templates/shared-hooks/inject-workflow-state.py +11 -11
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +1 -1
- package/dist/templates/shared-hooks/session-start.py +13 -13
- package/dist/templates/trellis/config.yaml +2 -22
- package/dist/templates/trellis/index.d.ts +2 -2
- package/dist/templates/trellis/index.js +2 -2
- package/dist/templates/trellis/local/README.md +3 -3
- package/dist/templates/trellis/local/patch_wpelc8.py +4 -4
- 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/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/packages_context.py +23 -23
- package/dist/templates/trellis/scripts/common/parent_orchestration.py +16 -16
- 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_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 +2 -2
- 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 +23 -23
- package/dist/templates/trellis/scripts/common/task_store.py +5 -5
- 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 +64 -64
- 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.js +5 -5
- package/dist/utils/project-capabilities.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 +2 -2
package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-hooks.md
CHANGED
|
@@ -6,9 +6,9 @@ Hooks are the automation layer that connects a platform to Trellis. When the use
|
|
|
6
6
|
|
|
7
7
|
1. Target platform settings/config: `.cursor/hooks.json`
|
|
8
8
|
2. Target platform hooks directory
|
|
9
|
-
3. `.
|
|
10
|
-
4. `.
|
|
11
|
-
5. `.
|
|
9
|
+
3. `.cstl/scripts/common/active_task.py`
|
|
10
|
+
4. `.cstl/scripts/common/session_context.py`
|
|
11
|
+
5. `.cstl/workflow.md`
|
|
12
12
|
|
|
13
13
|
## Common Hook Types
|
|
14
14
|
|
|
@@ -23,9 +23,9 @@ Hooks are the automation layer that connects a platform to Trellis. When the use
|
|
|
23
23
|
|
|
24
24
|
1. Find the hook registration in settings/config.
|
|
25
25
|
2. Confirm the registered script path exists.
|
|
26
|
-
3. Read the hook script and identify inputs, outputs, and called `.
|
|
26
|
+
3. Read the hook script and identify inputs, outputs, and called `.cstl/scripts/`.
|
|
27
27
|
4. Modify hook behavior.
|
|
28
|
-
5. If the hook depends on workflow content, synchronize `.
|
|
28
|
+
5. If the hook depends on workflow content, synchronize `.cstl/workflow.md`.
|
|
29
29
|
|
|
30
30
|
## Example: Change New-Session Injection Content
|
|
31
31
|
|
|
@@ -36,15 +36,15 @@ First find the session-start hook:
|
|
|
36
36
|
.cursor/hooks/session-start.py
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
If the hook ultimately calls `.
|
|
39
|
+
If the hook ultimately calls `.cstl/scripts/get_context.py` or `session_context.py`, editing the local script is usually more robust than hard-coding content in the hook.
|
|
40
40
|
|
|
41
41
|
## Example: Agent Did Not Read JSONL
|
|
42
42
|
|
|
43
43
|
First confirm:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
python3 ./.
|
|
47
|
-
python3 ./.
|
|
46
|
+
python3 ./.cstl/scripts/task.py selected --source
|
|
47
|
+
python3 ./.cstl/scripts/task.py validate <task>
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
If the task and JSONL are correct, determine whether the platform uses hook push or agent pull. For hook push, edit `inject-subagent-context`; for agent pull, edit the agent file.
|
|
@@ -53,5 +53,5 @@ If the task and JSONL are correct, determine whether the platform uses hook push
|
|
|
53
53
|
|
|
54
54
|
- Settings handle registration, hook scripts handle behavior; inspect both together.
|
|
55
55
|
- Cursor's hook event surface has changed between releases; confirm against the current Cursor build before wiring a new event.
|
|
56
|
-
- Hooks should read project-local `.
|
|
56
|
+
- Hooks should read project-local `.cstl/`; they should not depend on Trellis upstream source paths.
|
|
57
57
|
- Hook failures should produce visible errors so AI does not silently lose context.
|
|
@@ -4,10 +4,10 @@ When the user wants to change AI entry points, auto-trigger rules, or explicit c
|
|
|
4
4
|
|
|
5
5
|
## Read These Files First
|
|
6
6
|
|
|
7
|
-
1. `.
|
|
7
|
+
1. `.cstl/workflow.md`
|
|
8
8
|
2. Target platform skill/command/prompt/workflow directory
|
|
9
9
|
3. Related agent or hook files
|
|
10
|
-
4. Whether project rules already exist in `.
|
|
10
|
+
4. Whether project rules already exist in `.cstl/spec/`
|
|
11
11
|
|
|
12
12
|
## Which Entry Type To Choose
|
|
13
13
|
|
|
@@ -15,8 +15,8 @@ When the user wants to change AI entry points, auto-trigger rules, or explicit c
|
|
|
15
15
|
| --- | --- |
|
|
16
16
|
| AI should automatically know a capability | Add or modify a skill. |
|
|
17
17
|
| User wants to trigger manually with a command | Add or modify a command/prompt/workflow. |
|
|
18
|
-
| Team project conventions | Prefer `.
|
|
19
|
-
| Change Trellis flow semantics | Synchronize `.
|
|
18
|
+
| Team project conventions | Prefer `.cstl/spec/` or a project-local skill. |
|
|
19
|
+
| Change Trellis flow semantics | Synchronize `.cstl/workflow.md`. |
|
|
20
20
|
|
|
21
21
|
## Modify A Skill
|
|
22
22
|
|
|
@@ -45,11 +45,11 @@ Do not write vague descriptions such as "helpful project skill"; they can trigge
|
|
|
45
45
|
Explicit entry points should state:
|
|
46
46
|
|
|
47
47
|
- How the user triggers it.
|
|
48
|
-
- Which `.
|
|
48
|
+
- Which `.cstl/` files to read.
|
|
49
49
|
- Which scripts to run.
|
|
50
50
|
- How to report after completion.
|
|
51
51
|
|
|
52
|
-
If a command only repeats workflow rules, prefer making it reference/read `.
|
|
52
|
+
If a command only repeats workflow rules, prefer making it reference/read `.cstl/workflow.md` instead of maintaining a second copy of the flow.
|
|
53
53
|
|
|
54
54
|
## Common Paths
|
|
55
55
|
|
|
@@ -74,4 +74,4 @@ For shared skill layers across tools, consider `.agents/skills/` on platforms th
|
|
|
74
74
|
|
|
75
75
|
- Do not mix platform-specific syntax from removed adapters into the Cursor skill files.
|
|
76
76
|
- Do not change only the dogfooded `.cursor/skills/` copy while forgetting to mirror the published template `packages/cli/src/templates/cursor/skills/` (and vice versa); see `cross-layer-thinking-guide.md.txt` → Cross-Package Template Consistency.
|
|
77
|
-
- Do not hide long-term engineering conventions inside a command; write them to `.
|
|
77
|
+
- Do not hide long-term engineering conventions inside a command; write them to `.cstl/spec/`.
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
# Change Local Spec Structure
|
|
2
2
|
|
|
3
|
-
When the user wants to change the engineering conventions AI follows, add new spec layers, or adjust monorepo package mapping, edit `.
|
|
3
|
+
When the user wants to change the engineering conventions AI follows, add new spec layers, or adjust monorepo package mapping, edit `.cstl/spec/` and `.cstl/config.yaml`.
|
|
4
4
|
|
|
5
5
|
## Read These Files First
|
|
6
6
|
|
|
7
|
-
1. `.
|
|
8
|
-
2. `.
|
|
9
|
-
3. `.
|
|
7
|
+
1. `.cstl/config.yaml`
|
|
8
|
+
2. `.cstl/spec/`
|
|
9
|
+
3. `.cstl/workflow.md` planning artifact guidance and Phase 3.3
|
|
10
10
|
4. Selected task `implement.jsonl` / `check.jsonl`
|
|
11
11
|
|
|
12
12
|
## Common Needs
|
|
13
13
|
|
|
14
14
|
| Need | Edit location |
|
|
15
15
|
| --- | --- |
|
|
16
|
-
| Add backend/frontend/docs/test spec layer | `.
|
|
17
|
-
| Add shared thinking guides | `.
|
|
18
|
-
| Adjust monorepo packages | `packages` in `.
|
|
19
|
-
| Change default package | `default_package` in `.
|
|
20
|
-
| Control spec scanning scope | `spec_scope` in `.
|
|
16
|
+
| Add backend/frontend/docs/test spec layer | `.cstl/spec/<layer>/` or `.cstl/spec/<package>/<layer>/` |
|
|
17
|
+
| Add shared thinking guides | `.cstl/spec/guides/` |
|
|
18
|
+
| Adjust monorepo packages | `packages` in `.cstl/config.yaml` |
|
|
19
|
+
| Change default package | `default_package` in `.cstl/config.yaml` |
|
|
20
|
+
| Control spec scanning scope | `spec_scope` in `.cstl/config.yaml` |
|
|
21
21
|
| Make a task read a new spec | Task `implement.jsonl` / `check.jsonl` |
|
|
22
22
|
|
|
23
23
|
## Add A Spec Layer
|
|
@@ -25,7 +25,7 @@ When the user wants to change the engineering conventions AI follows, add new sp
|
|
|
25
25
|
Single-repository example:
|
|
26
26
|
|
|
27
27
|
```text
|
|
28
|
-
.
|
|
28
|
+
.cstl/spec/security/
|
|
29
29
|
├── index.md
|
|
30
30
|
└── auth.md
|
|
31
31
|
```
|
|
@@ -33,7 +33,7 @@ Single-repository example:
|
|
|
33
33
|
Monorepo example:
|
|
34
34
|
|
|
35
35
|
```text
|
|
36
|
-
.
|
|
36
|
+
.cstl/spec/webapp/security/
|
|
37
37
|
├── index.md
|
|
38
38
|
└── auth.md
|
|
39
39
|
```
|
|
@@ -50,13 +50,13 @@ Monorepo example:
|
|
|
50
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
|
-
python3 ./.
|
|
54
|
-
python3 ./.
|
|
53
|
+
python3 ./.cstl/scripts/task.py add-context <task> implement ".cstl/spec/webapp/security/index.md" "Security conventions"
|
|
54
|
+
python3 ./.cstl/scripts/task.py add-context <task> check ".cstl/spec/webapp/security/index.md" "Security review rules"
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
## Change Monorepo Packages
|
|
58
58
|
|
|
59
|
-
Example `.
|
|
59
|
+
Example `.cstl/config.yaml`:
|
|
60
60
|
|
|
61
61
|
```yaml
|
|
62
62
|
packages:
|
|
@@ -70,7 +70,7 @@ default_package: webapp
|
|
|
70
70
|
After editing, run:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
python3 ./.
|
|
73
|
+
python3 ./.cstl/scripts/get_context.py --mode packages
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
Use this output to confirm AI can see the correct packages and spec layers.
|
|
@@ -1,39 +1,39 @@
|
|
|
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 .
|
|
34
|
+
- "python3 .cstl/scripts/hooks/my_sync.py start"
|
|
35
35
|
after_archive:
|
|
36
|
-
- "python3 .
|
|
36
|
+
- "python3 .cstl/scripts/hooks/my_sync.py archive"
|
|
37
37
|
```
|
|
38
38
|
|
|
39
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.
|
|
@@ -55,15 +55,15 @@ If standard fields really need to change, inspect every local script that reads
|
|
|
55
55
|
|
|
56
56
|
## Change Selected Task
|
|
57
57
|
|
|
58
|
-
Selected task is session-level state stored in `.
|
|
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
59
|
|
|
60
|
-
- `.
|
|
60
|
+
- `.cstl/scripts/common/active_task.py`
|
|
61
61
|
- platform hooks or shell session bridges
|
|
62
|
-
- selected task descriptions in `.
|
|
62
|
+
- selected task descriptions in `.cstl/workflow.md`
|
|
63
63
|
|
|
64
64
|
### `task.py create` Does Not Select
|
|
65
65
|
|
|
66
|
-
`cmd_create` in `.
|
|
66
|
+
`cmd_create` in `.cstl/scripts/common/task_store.py` writes the task directory and planning artifacts only. The behavior:
|
|
67
67
|
|
|
68
68
|
- The task's `status=planning` is written.
|
|
69
69
|
- No selected-task pointer is written, even when session identity exists.
|
|
@@ -71,18 +71,18 @@ Selected task is session-level state stored in `.trellis/.runtime/sessions/`. Do
|
|
|
71
71
|
|
|
72
72
|
This keeps new sessions and bare task creation at `Selected task: none` until a live-session choice is made.
|
|
73
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 `.
|
|
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 ./.
|
|
78
|
+
1. Confirm the selected task with `python3 ./.cstl/scripts/task.py selected --source`.
|
|
79
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 `.
|
|
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.
|
package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/change-workflow.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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
9
|
3. The selected task's `task.json` and `prd.md`
|
|
10
10
|
|
|
@@ -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
|
|
|
@@ -58,8 +58,8 @@ If the user wants only one platform to avoid sub-agents, first confirm whether t
|
|
|
58
58
|
| `in_progress` | check passed | Phase 3.1 (verify quality + spec update) |
|
|
59
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.
|
package/dist/templates/common/bundled-skills/cstl-meta/references/customize-local/overview.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Local Customization Overview
|
|
2
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 `.
|
|
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
4
|
|
|
5
5
|
## First Determine What The User Actually Wants To Change
|
|
6
6
|
|
|
@@ -17,21 +17,21 @@ This directory is for local AI working in a user project where Trellis was insta
|
|
|
17
17
|
|
|
18
18
|
## General Operation Order
|
|
19
19
|
|
|
20
|
-
1. **Confirm platform and directories**: inspect which directories exist; on a fresh `cstl init --cursor` only `.cursor/` and `.
|
|
21
|
-
2. **Confirm the selected task**: run `python3 ./.
|
|
22
|
-
3. **Read the local source of truth**: prefer `.
|
|
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
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 `.
|
|
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
25
|
|
|
26
26
|
## Local File Priority
|
|
27
27
|
|
|
28
28
|
| Layer | Files |
|
|
29
29
|
| --- | --- |
|
|
30
|
-
| Workflow | `.
|
|
31
|
-
| Project configuration | `.
|
|
32
|
-
| Task material | `.
|
|
33
|
-
| Project specs | `.
|
|
34
|
-
| Runtime scripts | `.
|
|
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
35
|
| Platform integration | `.cursor/` plus legacy adapter directories preserved by `cstl update` |
|
|
36
36
|
| Shared skill | `.agents/skills/` |
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ This directory is for local AI working in a user project where Trellis was insta
|
|
|
41
41
|
- Do not edit `node_modules/@blxzer/cursor-trellis`.
|
|
42
42
|
- Do not assume the user has the Trellis GitHub repository.
|
|
43
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 `.
|
|
44
|
+
- Do not put team project rules into public `cstl-meta`; project rules belong in `.cstl/spec/` or a local skill.
|
|
45
45
|
|
|
46
46
|
## When To Inspect Upstream Source
|
|
47
47
|
|
|
@@ -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
|
|
@@ -26,9 +26,9 @@ If the user feels the AI does not know the selected task in a new session, first
|
|
|
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
|
|
|
@@ -44,14 +44,14 @@ 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
52
|
## Selected Task And Context Key
|
|
53
53
|
|
|
54
|
-
Selected task state lives in `.
|
|
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
55
|
|
|
56
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
|
|
|
@@ -60,9 +60,9 @@ If shell commands cannot see the same context key, `task.py selected --source` m
|
|
|
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.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Local Files Generated After Init
|
|
2
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 `.
|
|
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
4
|
|
|
5
5
|
This page only describes files that are visible and editable inside the user project.
|
|
6
6
|
|
|
7
|
-
## `.
|
|
7
|
+
## `.cstl/`
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
.
|
|
10
|
+
.cstl/
|
|
11
11
|
├── workflow.md
|
|
12
12
|
├── config.yaml
|
|
13
13
|
├── .developer
|
|
@@ -22,16 +22,16 @@ This page only describes files that are visible and editable inside the user pro
|
|
|
22
22
|
|
|
23
23
|
| Path | Usually editable? | Notes |
|
|
24
24
|
| --- | --- | --- |
|
|
25
|
-
| `.
|
|
26
|
-
| `.
|
|
27
|
-
| `.
|
|
28
|
-
| `.
|
|
29
|
-
| `.
|
|
30
|
-
| `.
|
|
31
|
-
| `.
|
|
32
|
-
| `.
|
|
33
|
-
| `.
|
|
34
|
-
| `.
|
|
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
35
|
|
|
36
36
|
## Platform Directories
|
|
37
37
|
|
|
@@ -48,11 +48,11 @@ Common categories inside `.cursor/`:
|
|
|
48
48
|
| skills | `.cursor/skills/` | Skills that auto-trigger or can be read by AI. |
|
|
49
49
|
| commands | `.cursor/commands/` | Legacy compatibility-only user-invoked entry points. |
|
|
50
50
|
|
|
51
|
-
When modifying a platform directory, also confirm whether `.
|
|
51
|
+
When modifying a platform directory, also confirm whether `.cstl/workflow.md` still describes the same flow.
|
|
52
52
|
|
|
53
53
|
## Meaning Of Template Hashes
|
|
54
54
|
|
|
55
|
-
`.
|
|
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
56
|
|
|
57
57
|
| Case | Update behavior |
|
|
58
58
|
| --- | --- |
|
|
@@ -66,10 +66,10 @@ When an AI customizes local Trellis files, it does not need to maintain hashes m
|
|
|
66
66
|
|
|
67
67
|
Editable by default:
|
|
68
68
|
|
|
69
|
-
- `.
|
|
70
|
-
- `.
|
|
71
|
-
- `.
|
|
72
|
-
- `.
|
|
69
|
+
- `.cstl/workflow.md`
|
|
70
|
+
- `.cstl/config.yaml`
|
|
71
|
+
- `.cstl/spec/**`
|
|
72
|
+
- `.cstl/scripts/**`
|
|
73
73
|
- Platform hooks, settings, agents, skills, commands, prompts, and workflows
|
|
74
74
|
|
|
75
75
|
Do not edit by default:
|
|
@@ -77,7 +77,7 @@ Do not edit by default:
|
|
|
77
77
|
- Global npm install directory
|
|
78
78
|
- `node_modules/@blxzer/cursor-trellis`
|
|
79
79
|
- Trellis GitHub repository source code
|
|
80
|
-
- Concrete state files under `.
|
|
81
|
-
- Hash contents inside `.
|
|
80
|
+
- Concrete state files under `.cstl/.runtime/**`
|
|
81
|
+
- Hash contents inside `.cstl/.template-hashes.json`
|
|
82
82
|
|
|
83
83
|
Switch to the Trellis CLI source-code perspective only when the user explicitly wants to contribute upstream.
|
package/dist/templates/common/bundled-skills/cstl-meta/references/local-architecture/overview.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
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
|