@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,165 +1,189 @@
|
|
|
1
|
-
# Trellis Brainstorm
|
|
2
|
-
|
|
3
|
-
## Non-Negotiable Interview Contract
|
|
4
|
-
|
|
5
|
-
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
6
|
-
|
|
7
|
-
Ask the questions one at a time.
|
|
8
|
-
|
|
9
|
-
## Non-Negotiable Evidence Rule
|
|
10
|
-
|
|
11
|
-
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
12
|
-
|
|
13
|
-
This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
|
|
14
|
-
|
|
15
|
-
Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, or decisions that remain ambiguous after inspection.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
If no
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
##
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
1
|
+
# Trellis Brainstorm
|
|
2
|
+
|
|
3
|
+
## Non-Negotiable Interview Contract
|
|
4
|
+
|
|
5
|
+
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
6
|
+
|
|
7
|
+
Ask the questions one at a time.
|
|
8
|
+
|
|
9
|
+
## Non-Negotiable Evidence Rule
|
|
10
|
+
|
|
11
|
+
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
12
|
+
|
|
13
|
+
This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
|
|
14
|
+
|
|
15
|
+
Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, or decisions that remain ambiguous after inspection.
|
|
16
|
+
|
|
17
|
+
## Thinking Principles
|
|
18
|
+
|
|
19
|
+
These two principles shape *how* you grill, not just *what* you ask. Apply them throughout Phase A and B.
|
|
20
|
+
|
|
21
|
+
### First Principles
|
|
22
|
+
|
|
23
|
+
Reason from irreducible facts and user value, not from analogy to existing solutions or "how it's always been done".
|
|
24
|
+
|
|
25
|
+
- When you encounter a requirement phrased as "we need X like Y has", separate the **root need** (the user value behind X) from the **inherited assumption** (Y's specific shape).
|
|
26
|
+
- For every "because that's the convention" justification, ask: what problem did that convention solve, and does that problem actually exist here?
|
|
27
|
+
- Trace each requirement back to a user-facing outcome. If no outcome survives, the requirement is inherited, not fundamental — flag it as a candidate for Out of Scope.
|
|
28
|
+
|
|
29
|
+
### Occam's Razor
|
|
30
|
+
|
|
31
|
+
Among competing designs that satisfy the acceptance criteria, prefer the one with the fewest additional assumptions.
|
|
32
|
+
|
|
33
|
+
- Default recommendation = the **minimal sufficient** design. Complexity must be justified by evidence (a contract, an edge case, a verified constraint), not added speculatively "for later".
|
|
34
|
+
- Actively strip scope that exists only to satisfy an assumption you cannot verify from repo evidence.
|
|
35
|
+
- When two paths are equally sufficient, the simpler one wins; the burden of proof is on the more complex path.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
|
|
40
|
+
|
|
41
|
+
**Agent-capable platforms:** Do **not** use legacy Claude-only grill subagents as a hard gate. Complete **PRD Grill** (below) and **`cstl-micro-grill`** for blocking open questions before treating planning as ready for `design.md` / `implement.md` / `start-execution --check`.
|
|
42
|
+
|
|
43
|
+
## Preconditions
|
|
44
|
+
|
|
45
|
+
Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
|
|
46
|
+
|
|
47
|
+
If no task exists yet, create one:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
TASK_DIR=$(python ./.cstl/scripts/task.py create "<short task title>" --slug <slug>)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Use a concise title from the user's request. Use a slug without a date prefix. `task.py create` adds the `MM-DD-` directory prefix automatically.
|
|
54
|
+
|
|
55
|
+
`task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
|
|
56
|
+
|
|
57
|
+
## Two-phase planning overview
|
|
58
|
+
|
|
59
|
+
| Phase | Name | User questions |
|
|
60
|
+
| --- | --- | --- |
|
|
61
|
+
| **A** | Discovery Before Questions + PRD draft | None until repo evidence is exhausted |
|
|
62
|
+
| **B** | PRD Grill pass + Micro-grill unresolved | Only blocking business / risk / preference |
|
|
63
|
+
|
|
64
|
+
External facts during Discovery or Research: load `smart-search-cli`; on CLI/doctor failure use Cursor WebSearch/WebFetch and persist under `{TASK}/research/` with `source: cursor-web-fallback`.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Phase A — Discovery Before Questions
|
|
69
|
+
|
|
70
|
+
Run **before** any user interview questions.
|
|
71
|
+
|
|
72
|
+
Inspect and record in `prd.md` (sections: **Confirmed facts**, initial **Out of scope**, draft **Goal**):
|
|
73
|
+
|
|
74
|
+
1. **Code & tests** — relevant modules, fixtures, configs, error paths.
|
|
75
|
+
2. **Specs** — `.cstl/spec/` indexes and layer guides for touched packages.
|
|
76
|
+
3. **History** — archived tasks, active task research, developer journal when useful.
|
|
77
|
+
4. **Platform** — project platform hooks, agents, and skills (see `.cstl/spec/guides/cursor-subagent-policy.md` when using Cursor); shared `.agents/skills/` when behavior spans platforms.
|
|
78
|
+
5. **Parent/Child** — if multiple independent deliverables, note child split early in `prd.md`.
|
|
79
|
+
|
|
80
|
+
Use retrieval per `.cstl/spec/guides/retrieval-daily-guide.md` (rg for literals, codegraph for structure, fast-context for semantic sweep).
|
|
81
|
+
|
|
82
|
+
Dispatch **`cstl-research`** (writable Agent) when a topic needs a dedicated `{TASK}/research/<topic>.md` file; do **not** use a subagent for PRD Grill itself.
|
|
83
|
+
|
|
84
|
+
## Phase A — PRD draft
|
|
85
|
+
|
|
86
|
+
After Discovery, flesh out `prd.md`:
|
|
87
|
+
|
|
88
|
+
- goal and user value
|
|
89
|
+
- confirmed facts (not restated as unverified requirements)
|
|
90
|
+
- requirements
|
|
91
|
+
- draft acceptance criteria
|
|
92
|
+
- out of scope
|
|
93
|
+
- open questions (tag **blocking** vs **nice-to-have**)
|
|
94
|
+
|
|
95
|
+
For complex tasks, start `design.md` / `implement.md` skeletons only when boundaries are already clear from Discovery; otherwise wait until Phase B.
|
|
96
|
+
|
|
97
|
+
## Phase B — PRD Grill pass
|
|
98
|
+
|
|
99
|
+
Treat `prd.md` (+ existing `design.md` fragments) as the **only document surface**. Run this checklist; fix the PRD in place (no new subagent):
|
|
100
|
+
|
|
101
|
+
| # | Check |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| 1 | **Goal & user value** — single clear statement |
|
|
104
|
+
| 2 | **Confirmed facts vs assumptions** — repo facts not listed as assumptions |
|
|
105
|
+
| 3 | **Testable acceptance criteria** |
|
|
106
|
+
| 4 | **Out of scope** explicit |
|
|
107
|
+
| 5 | **Dependencies & sequencing** |
|
|
108
|
+
| 6 | **Parent/Child & deliverables** when applicable |
|
|
109
|
+
| 7 | **Research & external facts** — smart-search or documented fallback |
|
|
110
|
+
| 8 | **Execution gate & artifacts** — `design.md` / `implement.md` / `verify.md` expectations |
|
|
111
|
+
| 9 | **Durable Learning** — Phase 3.3 will need `update-spec` \| `no-update` \| `unsure` |
|
|
112
|
+
| 10 | **Platform** — Cursor-first; PRD Grill in-session (no legacy grill-me / grill-with-docs subagent gate) |
|
|
113
|
+
| 11 | **Risk & rollback** for complex tasks |
|
|
114
|
+
| 12 | **Open questions** — only **blocking** strategic/preference items remain |
|
|
115
|
+
| 13 | **Root vs inherited assumptions** — every requirement traces to a user-facing root need; inherited assumptions (convention, analogy, "we've always done it") are flagged or removed (First Principles) |
|
|
116
|
+
| 14 | **Minimal sufficient design** — no scope, layer, or mechanism exists to satisfy an unverified assumption; the simplest design that meets acceptance wins (Occam's Razor) |
|
|
117
|
+
|
|
118
|
+
## Phase B — Micro-grill unresolved
|
|
119
|
+
|
|
120
|
+
For each **blocking** open question after the checklist, embed the **`cstl-micro-grill` contract**:
|
|
121
|
+
|
|
122
|
+
- exactly **one** question per message
|
|
123
|
+
- **Simplified Chinese** for user-facing text
|
|
124
|
+
- recommended answer + trade-off
|
|
125
|
+
- **update `prd.md` after every answer** before the next question
|
|
126
|
+
|
|
127
|
+
Stop micro-grill when no blocking open questions remain.
|
|
128
|
+
|
|
129
|
+
Do not ask process questions ("should I search?"). Do not re-ask facts Discovery already confirmed.
|
|
130
|
+
|
|
131
|
+
## Question Rules (Phase B only)
|
|
132
|
+
|
|
133
|
+
Each question must include:
|
|
134
|
+
|
|
135
|
+
- the decision needed
|
|
136
|
+
- why the answer matters
|
|
137
|
+
- your recommended answer
|
|
138
|
+
- the trade-off if the user chooses differently
|
|
139
|
+
|
|
140
|
+
Your recommended answer defaults to Occam's Razor: the **minimal sufficient** option that still satisfies the acceptance criteria. Only recommend a more complex option when you can cite evidence (a contract, a verified edge case, a repo constraint) that the simpler option violates.
|
|
141
|
+
|
|
142
|
+
## Artifact Rules
|
|
143
|
+
|
|
144
|
+
`prd.md` records requirements and acceptance:
|
|
145
|
+
|
|
146
|
+
- goal and user value
|
|
147
|
+
- confirmed facts
|
|
148
|
+
- requirements
|
|
149
|
+
- acceptance criteria
|
|
150
|
+
- out of scope
|
|
151
|
+
- open questions that still block planning
|
|
152
|
+
|
|
153
|
+
`design.md` records technical design for complex tasks:
|
|
154
|
+
|
|
155
|
+
- architecture and boundaries
|
|
156
|
+
- data flow and contracts
|
|
157
|
+
- compatibility and migration notes
|
|
158
|
+
- important trade-offs
|
|
159
|
+
- operational or rollback considerations
|
|
160
|
+
|
|
161
|
+
`implement.md` records execution planning for complex tasks:
|
|
162
|
+
|
|
163
|
+
- ordered implementation checklist
|
|
164
|
+
- validation commands
|
|
165
|
+
- risky files or rollback points
|
|
166
|
+
- **Development Strategy Contract** (`execution_mode`, `isolation`, …): before finalizing, run `python3 ./.cstl/scripts/task.py suggest-execution-strategy <task-dir>` (or `--json`); reconcile suggestion with scope, then paste the approved YAML block into `implement.md`
|
|
167
|
+
- follow-up checks before `task.py start-execution --check`
|
|
168
|
+
|
|
169
|
+
Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start-execution --check`.
|
|
170
|
+
|
|
171
|
+
`implement.md` is not a replacement for `implement.jsonl`. Use JSONL files only for manifest-style spec and research references when the task needs them.
|
|
172
|
+
|
|
173
|
+
## Completion criteria — PRD Grill done
|
|
174
|
+
|
|
175
|
+
Planning is ready for execution gate when **all** hold:
|
|
176
|
+
|
|
177
|
+
- PRD Grill checklist (14 items) satisfied or explicitly N/A with rationale in `prd.md`
|
|
178
|
+
- **No blocking** open questions in `prd.md`
|
|
179
|
+
- Acceptance criteria are testable; out of scope is explicit
|
|
180
|
+
- Complex tasks: `design.md` and `implement.md` present
|
|
181
|
+
- User reviewed artifacts or explicitly approved proceeding
|
|
182
|
+
|
|
183
|
+
Then proceed to Phase 1.2 Research (if needed), Phase 1.4 `task.py start-execution --check`, and implementation only after user approval.
|
|
184
|
+
|
|
185
|
+
Do not start implementation until the user approves or asks for implementation.
|
|
186
|
+
|
|
187
|
+
## Legacy planning flow (summary)
|
|
188
|
+
|
|
165
189
|
The former single "Planning Flow" is now Phase A + B above. Steps 4–6 map to Phase B micro-grill and artifact updates.
|
|
@@ -55,8 +55,8 @@ What broader problems does this bug reveal?
|
|
|
55
55
|
|
|
56
56
|
Solidify insights into the system:
|
|
57
57
|
|
|
58
|
-
- [ ] Update `.
|
|
59
|
-
- [ ] Update relevant `.
|
|
58
|
+
- [ ] Update `.cstl/spec/guides/` thinking guides
|
|
59
|
+
- [ ] Update relevant `.cstl/spec/` docs
|
|
60
60
|
- [ ] Create issue record (if applicable)
|
|
61
61
|
- [ ] Create feature ticket for root fix
|
|
62
62
|
- [ ] Update check guidelines if needed
|
|
@@ -118,7 +118,7 @@ Three levels of insight:
|
|
|
118
118
|
- If it's a code reuse issue → update `code-reuse-thinking-guide.md`
|
|
119
119
|
- If it's domain-specific → update `backend/*.md` or `frontend/*.md`
|
|
120
120
|
|
|
121
|
-
2. **Sync templates** - After updating `.
|
|
121
|
+
2. **Sync templates** - After updating `.cstl/spec/`, sync to `src/templates/markdown/spec/`
|
|
122
122
|
|
|
123
123
|
3. **Commit the spec updates** - This is the primary output, not just the analysis text
|
|
124
124
|
|
|
@@ -20,13 +20,13 @@ Read the selected task artifacts in order:
|
|
|
20
20
|
- `implement.md` if present
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
python ./.
|
|
23
|
+
python ./.cstl/scripts/get_context.py --mode packages
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
For each changed package/layer, read the spec index and follow its **Quality Check** section:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
cat .
|
|
29
|
+
cat .cstl/spec/<package>/<layer>/index.md
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Read the specific guideline files referenced — the index is a pointer, not the goal.
|
|
@@ -56,12 +56,12 @@ Run the project's lint, type-check, and test commands. Fix any failures before p
|
|
|
56
56
|
- [ ] `verify.md` contains exactly one token: `Learning decision: update-spec` | `no-update` | `unsure`
|
|
57
57
|
- [ ] If `update-spec` or `unsure`: `research/learning-proposal.md` exists (or documented `N/A` with reason) and matches the decision
|
|
58
58
|
- [ ] If `no-update`: includes `no durable learning` (or guide-equivalent) plus brief rationale
|
|
59
|
-
- [ ] If `update-spec`: spec was written only after confirmation; `Spec update evidence:` points at `.
|
|
60
|
-
- [ ] No silent edits to `.
|
|
59
|
+
- [ ] If `update-spec`: spec was written only after confirmation; `Spec update evidence:` points at `.cstl/spec/...`
|
|
60
|
+
- [ ] No silent edits to `.cstl/spec/` without confirmation
|
|
61
61
|
|
|
62
62
|
### Spec Sync
|
|
63
63
|
|
|
64
|
-
- [ ] Does `.
|
|
64
|
+
- [ ] Does `.cstl/spec/` need updates? (route through semi-automatic flow: proposal → confirm → `cstl-update-spec`)
|
|
65
65
|
|
|
66
66
|
> "If I fixed a bug or discovered something non-obvious, should I document it so future me won't hit the same issue?" → If YES, update the relevant spec doc.
|
|
67
67
|
|
|
@@ -9,9 +9,9 @@ When you learn something valuable (from debugging, implementing, or discussion),
|
|
|
9
9
|
## Semi-automatic flow (required for durable learning)
|
|
10
10
|
|
|
11
11
|
1. **Detect** — did this task produce reusable code-spec or guide-worthy learning?
|
|
12
|
-
2. **Proposal** — write `{TASK}/research/learning-proposal.md` (target spec paths, draft bullets; **do not** edit `.
|
|
12
|
+
2. **Proposal** — write `{TASK}/research/learning-proposal.md` (target spec paths, draft bullets; **do not** edit `.cstl/spec/` yet).
|
|
13
13
|
3. **Confirm** — user or task owner explicitly approves (`Learning decision: update-spec` in `verify.md`).
|
|
14
|
-
4. **Write** — only then edit spec files; add `Spec update evidence: .
|
|
14
|
+
4. **Write** — only then edit spec files; add `Spec update evidence: .cstl/spec/...` to `verify.md`.
|
|
15
15
|
|
|
16
16
|
**Forbidden:** silent spec edits; writing spec when `Learning decision: no-update` or `unsure` without follow-up; auto-updating spec from hooks or check alone.
|
|
17
17
|
|
|
@@ -68,7 +68,7 @@ For triggered tasks, include all sections below:
|
|
|
68
68
|
## Spec Structure Overview
|
|
69
69
|
|
|
70
70
|
```
|
|
71
|
-
.
|
|
71
|
+
.cstl/spec/
|
|
72
72
|
├── <layer>/ # Per-layer coding standards (e.g., backend/, frontend/, api/)
|
|
73
73
|
│ ├── index.md # Overview and links
|
|
74
74
|
│ └── *.md # Topic-specific guidelines
|
|
@@ -130,7 +130,7 @@ Before editing, read the current code-spec to:
|
|
|
130
130
|
- Find the right section for your update
|
|
131
131
|
|
|
132
132
|
```bash
|
|
133
|
-
cat .
|
|
133
|
+
cat .cstl/spec/<category>/<file>.md
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
### Step 4: Make the Update
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: cstl-check
|
|
3
3
|
description: Trellis quality check agent. Use this exact agent for Trellis task verification, check.jsonl context injection, and self-fixing code review. Do not use generic/default/generalPurpose agents for Trellis checks.
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
5
5
|
---
|
|
@@ -7,11 +7,11 @@ tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__
|
|
|
7
7
|
## Entry points
|
|
8
8
|
|
|
9
9
|
- **Agent session:** Open this agent file manually in a new chat — context from this file + your main-session prompt.
|
|
10
|
-
- **Task dispatch:** Run `python ./.
|
|
10
|
+
- **Task dispatch:** Run `python ./.cstl/scripts/generate_dispatch_prompt.py --agent check` → pass stdout as `Task(..., prompt=...)` — context from the Layer 2 prompt.
|
|
11
11
|
|
|
12
12
|
## Context source
|
|
13
13
|
|
|
14
|
-
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(
|
|
14
|
+
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(cstl-check)`.
|
|
15
15
|
- **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
|
|
16
16
|
|
|
17
17
|
# Check Agent
|
|
@@ -21,19 +21,19 @@ You are the Check Agent in the Trellis workflow.
|
|
|
21
21
|
## Model policy
|
|
22
22
|
|
|
23
23
|
- **Default:** no `model:` → **inherit** parent session.
|
|
24
|
-
- **Per dispatch:** main session asks user → one-shot `model:` overlay → `Task` → restore (architecture review uses the same flow). See `.
|
|
24
|
+
- **Per dispatch:** main session asks user → one-shot `model:` overlay → `Task` → restore (architecture review uses the same flow). See `.cstl/spec/guides/cursor-subagent-policy.md`.
|
|
25
25
|
|
|
26
26
|
## Recursion Guard
|
|
27
27
|
|
|
28
|
-
You are already the `
|
|
28
|
+
You are already the `cstl-check` sub-agent that the main session dispatched. Do the review and fixes directly.
|
|
29
29
|
|
|
30
|
-
- Do NOT spawn another `
|
|
31
|
-
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `
|
|
30
|
+
- Do NOT spawn another `cstl-check` or `cstl-implement` sub-agent.
|
|
31
|
+
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `cstl-implement` / `cstl-check`, treat that as a main-session instruction that is already satisfied by your current role.
|
|
32
32
|
- Only the main session may dispatch Trellis implement/check agents. If more implementation work is needed, report that recommendation instead of spawning.
|
|
33
33
|
|
|
34
34
|
## Trellis Context Loading Protocol
|
|
35
35
|
|
|
36
|
-
Look for the `<!--
|
|
36
|
+
Look for the `<!-- cstl-hook-injected -->` marker in your input above.
|
|
37
37
|
|
|
38
38
|
- **If the marker is present**: task artifacts, spec, and research files have already been auto-loaded for you above. Proceed with the check work directly.
|
|
39
39
|
- **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, etc.). Find the selected task path from your dispatch prompt's first line `Selected task: <path>`, then Read `<task-path>/check.jsonl`, each listed file, `<task-path>/prd.md`, `<task-path>/design.md` if present, and `<task-path>/implement.md` if present before doing the work.
|
|
@@ -41,13 +41,13 @@ Look for the `<!-- trellis-hook-injected -->` marker in your input above.
|
|
|
41
41
|
## Dispatch contract (Parent / inline)
|
|
42
42
|
|
|
43
43
|
- Only the **main session or Parent** dispatches this agent; Child workers must not re-spawn Trellis sub-agents.
|
|
44
|
-
- **Inline** (`in_progress-inline`): main session uses the `
|
|
45
|
-
- Align with the `
|
|
44
|
+
- **Inline** (`in_progress-inline`): main session uses the `cstl-check` **skill** instead of spawning this agent unless a dedicated review pass is needed.
|
|
45
|
+
- Align with the `cstl-check` skill: `get_context.py --mode packages`, spec indexes, cross-layer checks; you may fix issues and record gates — do not redefine Parent `task-map` or gate semantics.
|
|
46
46
|
|
|
47
47
|
## Context
|
|
48
48
|
|
|
49
49
|
Before checking, read:
|
|
50
|
-
- `.
|
|
50
|
+
- `.cstl/spec/` - Development guidelines
|
|
51
51
|
- Task `prd.md` - Requirements document
|
|
52
52
|
- Task `design.md` - Technical design (if exists)
|
|
53
53
|
- Task `implement.md` - Execution plan (if exists)
|
|
@@ -65,7 +65,7 @@ Before checking, read:
|
|
|
65
65
|
|
|
66
66
|
- Reviewer id: `cursor`.
|
|
67
67
|
- When `implement.md` quality_gates requires a reviewer gate for the current transition, write human-readable evidence in `verify.md` before recording the machine-checkable gate result. Parent/Child integration evidence may also belong in Parent `task-map.md`.
|
|
68
|
-
- Record non-baseline gates with `python ./.
|
|
68
|
+
- Record non-baseline gates with `python ./.cstl/scripts/task.py record-gate <task> --transition <transition> --gate <gate> --result PASS --reviewer cursor --evidence verify.md`.
|
|
69
69
|
- For FAIL, add `--root-cause implementation-defect|contract-changing-defect|validation-environment-blocker` and `--issue-fingerprint <short-stable-id>`. Route implementation defects back to Execution, contract-changing defects to Planning, and validation blockers to Verification / Review.
|
|
70
70
|
- For SKIPPED, use only explicit user approval: `--skip-approved-by user --skip-reason <reason>`.
|
|
71
71
|
- Never record `baseline-check`; the CLI owns it. Do not pass review bodies, logs, screenshots, or long issue lists through `record-gate` arguments.
|
|
@@ -89,7 +89,7 @@ git diff # View specific changes
|
|
|
89
89
|
|
|
90
90
|
### Step 2: Check Against Specs and Task Artifacts
|
|
91
91
|
|
|
92
|
-
Read the task's prd.md, design.md if present, and implement.md if present, then read relevant specs in `.
|
|
92
|
+
Read the task's prd.md, design.md if present, and implement.md if present, then read relevant specs in `.cstl/spec/` to check code:
|
|
93
93
|
|
|
94
94
|
- Does it satisfy the task requirements
|
|
95
95
|
- Does it follow the technical design and implementation plan when present
|
|
@@ -124,7 +124,7 @@ When the pack exists:
|
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
126
|
# Optional: confirm path from selected task
|
|
127
|
-
python ./.
|
|
127
|
+
python ./.cstl/scripts/task.py selected --source
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
Read `{TASK}/research/retrieval-pack-latest.json` and use `contextPack.selected` (top items: `title`, `source`, `reference`, `score`). Add or update `verify.md` with:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: cstl-implement
|
|
3
3
|
description: Trellis implementation agent. Use this exact agent for Trellis task implementation, implement.jsonl context injection, and hook-injection tests. Do not use generic/default/generalPurpose agents for Trellis implementation. No git commit allowed.
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
|
|
5
5
|
---
|
|
@@ -7,11 +7,11 @@ tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__
|
|
|
7
7
|
## Entry points
|
|
8
8
|
|
|
9
9
|
- **Agent session:** Open this agent file manually in a new chat — context from this file + your main-session prompt.
|
|
10
|
-
- **Task dispatch:** Run `python ./.
|
|
10
|
+
- **Task dispatch:** Run `python ./.cstl/scripts/generate_dispatch_prompt.py --agent implement` → pass stdout as `Task(..., prompt=...)` — context from the Layer 2 prompt.
|
|
11
11
|
|
|
12
12
|
## Context source
|
|
13
13
|
|
|
14
|
-
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(
|
|
14
|
+
- **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(cstl-implement)`.
|
|
15
15
|
- **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
|
|
16
16
|
|
|
17
17
|
# Implement Agent
|
|
@@ -21,19 +21,19 @@ You are the Implement Agent in the Trellis workflow.
|
|
|
21
21
|
## Model policy
|
|
22
22
|
|
|
23
23
|
- **Default:** no `model:` → **inherit** parent session.
|
|
24
|
-
- **Per dispatch / Child worker:** main session asks user → one-shot `model:` overlay on this file → `Task` → restore. Child session uses the same overlay pattern on `
|
|
24
|
+
- **Per dispatch / Child worker:** main session asks user → one-shot `model:` overlay on this file → `Task` → restore. Child session uses the same overlay pattern on `cstl-implement`. See `.cstl/spec/guides/cursor-subagent-policy.md`.
|
|
25
25
|
|
|
26
26
|
## Recursion Guard
|
|
27
27
|
|
|
28
|
-
You are already the `
|
|
28
|
+
You are already the `cstl-implement` sub-agent that the main session dispatched. Do the implementation work directly.
|
|
29
29
|
|
|
30
|
-
- Do NOT spawn another `
|
|
31
|
-
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `
|
|
30
|
+
- Do NOT spawn another `cstl-implement` or `cstl-check` sub-agent.
|
|
31
|
+
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `cstl-implement` / `cstl-check`, treat that as a main-session instruction that is already satisfied by your current role.
|
|
32
32
|
- Only the main session may dispatch Trellis implement/check agents. If more parallel work is needed, report that recommendation instead of spawning.
|
|
33
33
|
|
|
34
34
|
## Trellis Context Loading Protocol
|
|
35
35
|
|
|
36
|
-
Look for the `<!--
|
|
36
|
+
Look for the `<!-- cstl-hook-injected -->` marker in your input above.
|
|
37
37
|
|
|
38
38
|
- **If the marker is present**: prd / spec / research files have already been auto-loaded for you above. Proceed with the implementation work directly.
|
|
39
39
|
- **If the marker is absent**: hook injection didn't fire (Windows + Claude Code, `--continue` resume, fork distribution, hooks disabled, `/multitask` parallel dispatch, etc.). Find the selected task path from your dispatch prompt's first line `Selected task: <path>`, then Read `<task-path>/implement.jsonl`, each listed file, `<task-path>/prd.md`, `<task-path>/design.md` if present, and `<task-path>/implement.md` if present before doing the work.
|
|
@@ -41,20 +41,20 @@ Look for the `<!-- trellis-hook-injected -->` marker in your input above.
|
|
|
41
41
|
## Dispatch contract (Parent / Child)
|
|
42
42
|
|
|
43
43
|
- Parent or main session dispatches implement work; **Child tasks** deliver `verify.md` + `handoff.md` and must not change shared gate contracts.
|
|
44
|
-
- Do not spawn nested `
|
|
44
|
+
- Do not spawn nested `cstl-implement` / `cstl-check`; recommend a Parent review when check is needed.
|
|
45
45
|
|
|
46
46
|
## Context
|
|
47
47
|
|
|
48
48
|
Before implementing, read:
|
|
49
|
-
- `.
|
|
50
|
-
- `.
|
|
49
|
+
- `.cstl/workflow.md` - Project workflow
|
|
50
|
+
- `.cstl/spec/` - Development guidelines
|
|
51
51
|
- Task `prd.md` - Requirements document
|
|
52
52
|
- Task `design.md` - Technical design (if exists)
|
|
53
53
|
- Task `implement.md` - Execution plan (if exists)
|
|
54
54
|
|
|
55
55
|
## Core Responsibilities
|
|
56
56
|
|
|
57
|
-
1. **Understand specs** - Read relevant spec files in `.
|
|
57
|
+
1. **Understand specs** - Read relevant spec files in `.cstl/spec/`
|
|
58
58
|
2. **Understand task artifacts** - Read prd.md, design.md if present, and implement.md if present
|
|
59
59
|
3. **Implement features** - Write code following specs and task artifacts
|
|
60
60
|
4. **Self-check** - Ensure code quality
|
|
@@ -76,8 +76,8 @@ Before implementing, read:
|
|
|
76
76
|
|
|
77
77
|
Read relevant specs based on task type:
|
|
78
78
|
|
|
79
|
-
- Spec layers: `.
|
|
80
|
-
- Shared guides: `.
|
|
79
|
+
- Spec layers: `.cstl/spec/<package>/<layer>/`
|
|
80
|
+
- Shared guides: `.cstl/spec/guides/`
|
|
81
81
|
|
|
82
82
|
### 2. Understand Requirements
|
|
83
83
|
|