@blxzer/cursor-trellis 0.2.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +37 -12
  3. package/README.zh-CN.md +41 -16
  4. package/bin/{trellis.js → cstl.js} +1 -1
  5. package/dist/cli/index.d.ts.map +1 -1
  6. package/dist/cli/index.js +30 -4
  7. package/dist/cli/index.js.map +1 -1
  8. package/dist/commands/capability-smoke.d.ts +24 -0
  9. package/dist/commands/capability-smoke.d.ts.map +1 -0
  10. package/dist/commands/capability-smoke.js +83 -0
  11. package/dist/commands/capability-smoke.js.map +1 -0
  12. package/dist/commands/init.d.ts.map +1 -1
  13. package/dist/commands/init.js +94 -34
  14. package/dist/commands/init.js.map +1 -1
  15. package/dist/commands/uninstall.d.ts +1 -1
  16. package/dist/commands/uninstall.js +2 -2
  17. package/dist/commands/uninstall.js.map +1 -1
  18. package/dist/commands/update.d.ts +1 -1
  19. package/dist/commands/update.d.ts.map +1 -1
  20. package/dist/commands/update.js +79 -34
  21. package/dist/commands/update.js.map +1 -1
  22. package/dist/commands/upgrade.js +2 -2
  23. package/dist/commands/upgrade.js.map +1 -1
  24. package/dist/configurators/cursor.d.ts +2 -2
  25. package/dist/configurators/cursor.js +4 -4
  26. package/dist/configurators/cursor.js.map +1 -1
  27. package/dist/configurators/index.js +3 -3
  28. package/dist/configurators/index.js.map +1 -1
  29. package/dist/configurators/shared.d.ts +10 -10
  30. package/dist/configurators/shared.d.ts.map +1 -1
  31. package/dist/configurators/shared.js +26 -26
  32. package/dist/configurators/shared.js.map +1 -1
  33. package/dist/configurators/workflow.d.ts +2 -2
  34. package/dist/migrations/manifests/0.2.10.json +374 -0
  35. package/dist/migrations/manifests/0.3.0.json +89 -0
  36. package/dist/templates/common/bundled-skills/{trellis-cursor2plus-setup → cstl-cursor2plus-setup}/SKILL.md +5 -4
  37. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/SKILL.md +75 -75
  38. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/add-project-local-conventions.md +8 -8
  39. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-agents.md +6 -6
  40. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-context-loading.md +7 -7
  41. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-skills-or-commands.md +1 -1
  42. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-spec-structure.md +2 -2
  43. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-task-lifecycle.md +31 -31
  44. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-workflow.md +12 -12
  45. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/overview.md +55 -55
  46. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/context-injection.md +13 -13
  47. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/generated-files.md +83 -83
  48. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/overview.md +2 -2
  49. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/spec-system.md +1 -1
  50. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/task-system.md +22 -22
  51. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workflow.md +5 -5
  52. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/local-architecture/workspace-memory.md +3 -3
  53. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/agents.md +11 -11
  54. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/hooks-and-settings.md +1 -1
  55. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/overview.md +4 -4
  56. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/platform-map.md +5 -5
  57. package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/platform-files/skills-and-commands.md +15 -15
  58. package/dist/templates/common/bundled-skills/{trellis-micro-grill → cstl-micro-grill}/SKILL.md +62 -47
  59. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/SKILL.md +44 -44
  60. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/authoring-rules.md +97 -97
  61. package/dist/templates/common/bundled-skills/{trellis-skill-creator/references/trellis-skill-locations.md → cstl-skill-creator/references/cstl-skill-locations.md} +52 -52
  62. package/dist/templates/common/bundled-skills/{trellis-skill-creator → cstl-skill-creator}/references/review-checklist.md +47 -47
  63. package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/SKILL.md +1 -1
  64. package/dist/templates/common/commands/continue.md +20 -20
  65. package/dist/templates/common/commands/start.md +11 -11
  66. package/dist/templates/common/index.d.ts +1 -1
  67. package/dist/templates/common/index.d.ts.map +1 -1
  68. package/dist/templates/common/skills/brainstorm.md +188 -164
  69. package/dist/templates/common/skills/check.md +1 -1
  70. package/dist/templates/cursor/agents/{trellis-check.md → cstl-check.md} +8 -8
  71. package/dist/templates/cursor/agents/{trellis-implement.md → cstl-implement.md} +8 -8
  72. package/dist/templates/cursor/agents/{trellis-research.md → cstl-research.md} +2 -2
  73. package/dist/templates/cursor/commands/cursor2plus-setup.md +5 -5
  74. package/dist/templates/cursor/fixtures/expected-rules.d.ts +1 -1
  75. package/dist/templates/cursor/fixtures/expected-rules.d.ts.map +1 -1
  76. package/dist/templates/cursor/fixtures/expected-rules.js +2 -2
  77. package/dist/templates/cursor/fixtures/expected-rules.js.map +1 -1
  78. package/dist/templates/cursor/rules/{trellis-subagent-dispatch.mdc → cstl-subagent-dispatch.mdc} +2 -2
  79. package/dist/templates/cursor/rules/{trellis-triage.mdc → cstl-triage.mdc} +1 -1
  80. package/dist/templates/markdown/agents.md +4 -4
  81. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +634 -634
  82. package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +4 -4
  83. package/dist/templates/markdown/spec/guides/cursor-semantic-compliance.md.txt +6 -0
  84. package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +393 -391
  85. package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +6 -6
  86. package/dist/templates/markdown/spec/guides/execution-strategy.md.txt +2 -2
  87. package/dist/templates/markdown/spec/guides/index.md.txt +3 -2
  88. package/dist/templates/shared-hooks/index.d.ts +1 -1
  89. package/dist/templates/shared-hooks/index.js +1 -1
  90. package/dist/templates/shared-hooks/inject-subagent-context.py +3 -3
  91. package/dist/templates/shared-hooks/inject-workflow-state.py +27 -27
  92. package/dist/templates/shared-hooks/research-end-retrieval-pack.py +1 -1
  93. package/dist/templates/shared-hooks/session-start.py +3 -3
  94. package/dist/templates/trellis/config/execution-strategy-rules.json +1 -1
  95. package/dist/templates/trellis/config.yaml +4 -4
  96. package/dist/templates/trellis/local/README.md +12 -10
  97. package/dist/templates/trellis/local/patch_wpelc8.py +3 -3
  98. package/dist/templates/trellis/local/subagent-models.json.example +1 -1
  99. package/dist/templates/trellis/local/trellis-task-models.json.example +3 -3
  100. package/dist/templates/trellis/local/trellis-task-models.json5.example +5 -5
  101. package/dist/templates/trellis/local/trellis_task_models_config.py +6 -6
  102. package/dist/templates/trellis/scripts/common/cli_adapter.py +3 -3
  103. package/dist/templates/trellis/scripts/common/execution_strategy.py +1 -1
  104. package/dist/templates/trellis/scripts/common/parent_orchestration.py +702 -702
  105. package/dist/templates/trellis/scripts/common/session_context.py +1159 -1159
  106. package/dist/templates/trellis/scripts/common/subagent_dispatch.py +5 -5
  107. package/dist/templates/trellis/scripts/common/task_gates.py +2056 -2034
  108. package/dist/templates/trellis/scripts/common/task_store.py +1594 -1594
  109. package/dist/templates/trellis/workflow.md +805 -805
  110. package/dist/types/ai-tools.d.ts +1 -1
  111. package/dist/types/ai-tools.d.ts.map +1 -1
  112. package/dist/types/ai-tools.js +1 -1
  113. package/dist/types/ai-tools.js.map +1 -1
  114. package/dist/utils/project-capabilities.d.ts +14 -3
  115. package/dist/utils/project-capabilities.d.ts.map +1 -1
  116. package/dist/utils/project-capabilities.js +122 -12
  117. package/dist/utils/project-capabilities.js.map +1 -1
  118. package/dist/utils/readiness.d.ts +10 -0
  119. package/dist/utils/readiness.d.ts.map +1 -1
  120. package/dist/utils/readiness.js +6 -3
  121. package/dist/utils/readiness.js.map +1 -1
  122. package/package.json +3 -4
  123. /package/dist/templates/common/bundled-skills/{trellis-meta → cstl-meta}/references/customize-local/change-hooks.md +0 -0
  124. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/mcp-setup.md +0 -0
  125. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/repository-analysis.md +0 -0
  126. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-task-planning.md +0 -0
  127. /package/dist/templates/common/bundled-skills/{trellis-spec-bootstrap → cstl-spec-bootstrap}/references/spec-writing.md +0 -0
@@ -1,23 +1,23 @@
1
- # Continue Selected Task
2
-
3
- Resume work only when this live session already has a `selected_task`. If no task is selected, show the Task Dashboard and ask for an explicit route.
1
+ # Continue Selected Task
2
+
3
+ Resume work only when this live session already has a `selected_task`. If no task is selected, show the Task Dashboard and ask for an explicit route.
4
4
 
5
5
  ---
6
6
 
7
- ## Step 1: Load Framework Context
8
-
9
- ```bash
10
- {{PYTHON_CMD}} ./.trellis/scripts/get_context.py
11
- ```
12
-
13
- Confirms: selected task, Task Dashboard, git state, recent commits.
14
-
15
- If the output says `Selected task: none`, do not auto-resume a previous or unique task. Show the dashboard and ask the user to choose one route:
16
-
17
- - select a task with `{{PYTHON_CMD}} ./.trellis/scripts/task.py select <task>`
18
- - create a task
19
- - inspect details
20
- - continue without a task for No Task / Micro-Grill work
7
+ ## Step 1: Load Framework Context
8
+
9
+ ```bash
10
+ {{PYTHON_CMD}} ./.trellis/scripts/get_context.py
11
+ ```
12
+
13
+ Confirms: selected task, Task Dashboard, git state, recent commits.
14
+
15
+ If the output says `Selected task: none`, do not auto-resume a previous or unique task. Show the dashboard and ask the user to choose one route:
16
+
17
+ - select a task with `{{PYTHON_CMD}} ./.trellis/scripts/task.py select <task>`
18
+ - create a task
19
+ - inspect details
20
+ - continue without a task for No Task / Micro-Grill work
21
21
 
22
22
  ## Step 2: Load the Phase Index
23
23
 
@@ -29,12 +29,12 @@ Shows the Phase Index (Plan / Execute / Finish) with routing + skill mapping.
29
29
 
30
30
  ## Step 3: Decide Where You Are
31
31
 
32
- When a task is selected, `get_context.py` shows the selected task's `status` field. Route by `status` + artifact presence. This command replaces the user needing to remember the Trellis flow; it does not itself approve implementation.
32
+ When a task is selected, `get_context.py` shows the selected task's `status` field. Route by `status` + artifact presence. This command replaces the user needing to remember the Trellis flow; it does not itself approve implementation.
33
33
 
34
- - `status=planning` + no `prd.md` → **1.1** (load `trellis-brainstorm`)
34
+ - `status=planning` + no `prd.md` → **1.1** (load `cstl-brainstorm`)
35
35
  - `status=planning` + `prd.md` only → decide whether the task is lightweight or complex. Lightweight can move to **1.4** review; complex returns to **1.1** to add `design.md` + `implement.md`.
36
36
  - `status=planning` + complex artifacts complete + sub-agent jsonl not curated (only the seed `_example` row) → **1.3**
37
- - `status=planning` + required artifacts complete + required jsonl curated or inline mode → execution gate (run `task.py start-execution <task> --check`, report PASS, ask for explicit execution approval, then run `task.py start-execution <task> --approved`)
37
+ - `status=planning` + required artifacts complete + required jsonl curated or inline mode → execution gate (run `task.py start-execution <task> --check`, report PASS, ask for explicit execution approval, then run `task.py start-execution <task> --approved`)
38
38
  - `status=in_progress` + implementation not started → **2.1**
39
39
  - `status=in_progress` + implementation done, not yet checked → **2.2**
40
40
  - `status=in_progress` + check passed → **3.1**
@@ -36,14 +36,14 @@ Index files list the specific guideline docs to read when you actually start cod
36
36
  ## Step 4: Decide next action
37
37
  From Step 1 you know whether a task is selected.
38
38
 
39
- - If `Selected task: none` → show the Task Dashboard; do **not** load `trellis-continue`. For a **small** request without a task, use `trellis-micro-grill` first.
40
- - If a task **is** selected and you need the next workflow step → use `trellis-continue` instead of repeating Steps 1–3 here.
39
+ - If `Selected task: none` → show the Task Dashboard; do **not** load `cstl-continue`. For a **small** request without a task, use `cstl-micro-grill` first.
40
+ - If a task **is** selected and you need the next workflow step → use `cstl-continue` instead of repeating Steps 1–3 here.
41
41
 
42
42
  If `Selected task: none`, ask the user to choose: select a task, create a task, inspect details, or continue without a task.
43
43
 
44
44
  If a task is selected, check the task directory:
45
45
 
46
- - **Selected task status `planning` + no `prd.md`** → Phase 1.1. Load the `trellis-brainstorm` skill.
46
+ - **Selected task status `planning` + no `prd.md`** → Phase 1.1. Load the `cstl-brainstorm` skill.
47
47
  - **Selected task status `planning` + `prd.md` exists** → stay in Planning / Execution Gate. Lightweight tasks can be PRD-only; complex tasks need `design.md` + `implement.md`. Run `task.py start-execution <task> --check` and request explicit execution approval before execution.
48
48
  - **Selected task status `in_progress`** → Phase 2 step 2.1. Load the step detail:
49
49
  ```bash
@@ -57,13 +57,13 @@ If a task is selected, check the task directory:
57
57
 
58
58
  | User intent | Skill |
59
59
  |---|---|
60
- | Resume **selected** in-progress task | `trellis-continue` |
61
- | New feature / unclear requirements | `trellis-brainstorm` |
62
- | Small request, no task yet | `trellis-micro-grill` |
63
- | About to write code | `trellis-before-dev` |
64
- | Done coding / quality check | `trellis-check` |
65
- | Session wrap-up after Phase 3.4 commit | `trellis-finish-work` |
66
- | Stuck / fixed same bug multiple times | `trellis-break-loop` |
67
- | Learned something worth capturing | `trellis-update-spec` |
60
+ | Resume **selected** in-progress task | `cstl-continue` |
61
+ | New feature / unclear requirements | `cstl-brainstorm` |
62
+ | Small request, no task yet | `cstl-micro-grill` |
63
+ | About to write code | `cstl-before-dev` |
64
+ | Done coding / quality check | `cstl-check` |
65
+ | Session wrap-up after Phase 3.4 commit | `cstl-finish-work` |
66
+ | Stuck / fixed same bug multiple times | `cstl-break-loop` |
67
+ | Learned something worth capturing | `cstl-update-spec` |
68
68
 
69
69
  Full rules + anti-rationalization table in `.trellis/workflow.md`.
@@ -23,7 +23,7 @@ export interface CommonBundledSkillFile {
23
23
  content: string;
24
24
  }
25
25
  export interface CommonBundledSkill {
26
- /** Skill directory name, e.g. "trellis-meta" */
26
+ /** Skill directory name, e.g. "cstl-meta" */
27
27
  name: string;
28
28
  /** Files that must be written under the skill directory */
29
29
  files: CommonBundledSkillFile[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAuBH,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,KAAK,EAAE,sBAAsB,EAAE,CAAC;CACjC;AAOD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,cAAc,EAAE,CAMtD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,EAAE,CAMpD;AAuCD;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,kBAAkB,EAAE,CAM/D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/common/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAuBH,MAAM,WAAW,cAAc;IAC7B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,4EAA4E;IAC5E,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,kBAAkB;IACjC,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,KAAK,EAAE,sBAAsB,EAAE,CAAC;CACjC;AAOD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,cAAc,EAAE,CAMtD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,EAAE,CAMpD;AAuCD;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,kBAAkB,EAAE,CAM/D"}
@@ -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
- Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
20
-
21
- **Agent-capable platforms:** Do **not** use legacy Claude-only grill subagents as a hard gate. Complete **PRD Grill** (below) and **`trellis-micro-grill`** for blocking open questions before treating planning as ready for `design.md` / `implement.md` / `start-execution --check`.
22
-
23
- ## Preconditions
24
-
25
- Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
26
-
27
- If no task exists yet, create one:
28
-
29
- ```bash
30
- TASK_DIR=$(python ./.trellis/scripts/task.py create "<short task title>" --slug <slug>)
31
- ```
32
-
33
- 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.
34
-
35
- `task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
36
-
37
- ## Two-phase planning overview
38
-
39
- | Phase | Name | User questions |
40
- | --- | --- | --- |
41
- | **A** | Discovery Before Questions + PRD draft | None until repo evidence is exhausted |
42
- | **B** | PRD Grill pass + Micro-grill unresolved | Only blocking business / risk / preference |
43
-
44
- 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`.
45
-
46
- ---
47
-
48
- ## Phase A — Discovery Before Questions
49
-
50
- Run **before** any user interview questions.
51
-
52
- Inspect and record in `prd.md` (sections: **Confirmed facts**, initial **Out of scope**, draft **Goal**):
53
-
54
- 1. **Code & tests** — relevant modules, fixtures, configs, error paths.
55
- 2. **Specs** `.trellis/spec/` indexes and layer guides for touched packages.
56
- 3. **History** — archived tasks, active task research, developer journal when useful.
57
- 4. **Platform** — project platform hooks, agents, and skills (see `.trellis/spec/guides/cursor-subagent-policy.md` when using Cursor); shared `.agents/skills/` when behavior spans platforms.
58
- 5. **Parent/Child** — if multiple independent deliverables, note child split early in `prd.md`.
59
-
60
- Use retrieval per `.trellis/spec/guides/retrieval-daily-guide.md` (rg for literals, codegraph for structure, fast-context for semantic sweep).
61
-
62
- Dispatch **`trellis-research`** (writable Agent) when a topic needs a dedicated `{TASK}/research/<topic>.md` file; do **not** use a subagent for PRD Grill itself.
63
-
64
- ## Phase A PRD draft
65
-
66
- After Discovery, flesh out `prd.md`:
67
-
68
- - goal and user value
69
- - confirmed facts (not restated as unverified requirements)
70
- - requirements
71
- - draft acceptance criteria
72
- - out of scope
73
- - open questions (tag **blocking** vs **nice-to-have**)
74
-
75
- For complex tasks, start `design.md` / `implement.md` skeletons only when boundaries are already clear from Discovery; otherwise wait until Phase B.
76
-
77
- ## Phase B PRD Grill pass
78
-
79
- Treat `prd.md` (+ existing `design.md` fragments) as the **only document surface**. Run this checklist; fix the PRD in place (no new subagent):
80
-
81
- | # | Check |
82
- | --- | --- |
83
- | 1 | **Goal & user value** — single clear statement |
84
- | 2 | **Confirmed facts vs assumptions** repo facts not listed as assumptions |
85
- | 3 | **Testable acceptance criteria** |
86
- | 4 | **Out of scope** explicit |
87
- | 5 | **Dependencies & sequencing** |
88
- | 6 | **Parent/Child & deliverables** when applicable |
89
- | 7 | **Research & external facts** smart-search or documented fallback |
90
- | 8 | **Execution gate & artifacts** — `design.md` / `implement.md` / `verify.md` expectations |
91
- | 9 | **Durable Learning** — Phase 3.3 will need `update-spec` \| `no-update` \| `unsure` |
92
- | 10 | **Platform** — Cursor-first; PRD Grill in-session (no legacy grill-me / grill-with-docs subagent gate) |
93
- | 11 | **Risk & rollback** for complex tasks |
94
- | 12 | **Open questions** — only **blocking** strategic/preference items remain |
95
-
96
- ## Phase B — Micro-grill unresolved
97
-
98
- For each **blocking** open question after the checklist, embed the **`trellis-micro-grill` contract**:
99
-
100
- - exactly **one** question per message
101
- - **Simplified Chinese** for user-facing text
102
- - recommended answer + trade-off
103
- - **update `prd.md` after every answer** before the next question
104
-
105
- Stop micro-grill when no blocking open questions remain.
106
-
107
- Do not ask process questions ("should I search?"). Do not re-ask facts Discovery already confirmed.
108
-
109
- ## Question Rules (Phase B only)
110
-
111
- Each question must include:
112
-
113
- - the decision needed
114
- - why the answer matters
115
- - your recommended answer
116
- - the trade-off if the user chooses differently
117
-
118
- ## Artifact Rules
119
-
120
- `prd.md` records requirements and acceptance:
121
-
122
- - goal and user value
123
- - confirmed facts
124
- - requirements
125
- - acceptance criteria
126
- - out of scope
127
- - open questions that still block planning
128
-
129
- `design.md` records technical design for complex tasks:
130
-
131
- - architecture and boundaries
132
- - data flow and contracts
133
- - compatibility and migration notes
134
- - important trade-offs
135
- - operational or rollback considerations
136
-
137
- `implement.md` records execution planning for complex tasks:
138
-
139
- - ordered implementation checklist
140
- - validation commands
141
- - risky files or rollback points
142
- - **Development Strategy Contract** (`execution_mode`, `isolation`, …): before finalizing, run `python3 ./.trellis/scripts/task.py suggest-execution-strategy <task-dir>` (or `--json`); reconcile suggestion with scope, then paste the approved YAML block into `implement.md`
143
- - follow-up checks before `task.py start-execution --check`
144
-
145
- Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start-execution --check`.
146
-
147
- `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.
148
-
149
- ## Completion criteria — PRD Grill done
150
-
151
- Planning is ready for execution gate when **all** hold:
152
-
153
- - PRD Grill checklist (12 items) satisfied or explicitly N/A with rationale in `prd.md`
154
- - **No blocking** open questions in `prd.md`
155
- - Acceptance criteria are testable; out of scope is explicit
156
- - Complex tasks: `design.md` and `implement.md` present
157
- - User reviewed artifacts or explicitly approved proceeding
158
-
159
- Then proceed to Phase 1.2 Research (if needed), Phase 1.4 `task.py start-execution --check`, and implementation only after user approval.
160
-
161
- Do not start implementation until the user approves or asks for implementation.
162
-
163
- ## Legacy planning flow (summary)
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 ./.trellis/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** `.trellis/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 `.trellis/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 `.trellis/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 APRD 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 ./.trellis/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.
@@ -61,7 +61,7 @@ Run the project's lint, type-check, and test commands. Fix any failures before p
61
61
 
62
62
  ### Spec Sync
63
63
 
64
- - [ ] Does `.trellis/spec/` need updates? (route through semi-automatic flow: proposal → confirm → `trellis-update-spec`)
64
+ - [ ] Does `.trellis/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
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: trellis-check
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
  ---
@@ -11,7 +11,7 @@ tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__
11
11
 
12
12
  ## Context source
13
13
 
14
- - **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(trellis-check)`.
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
@@ -25,15 +25,15 @@ You are the Check Agent in the Trellis workflow.
25
25
 
26
26
  ## Recursion Guard
27
27
 
28
- You are already the `trellis-check` sub-agent that the main session dispatched. Do the review and fixes directly.
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 `trellis-check` or `trellis-implement` sub-agent.
31
- - If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `trellis-implement` / `trellis-check`, treat that as a main-session instruction that is already satisfied by your current role.
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 `<!-- trellis-hook-injected -->` marker in your input above.
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,8 +41,8 @@ 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 `trellis-check` **skill** instead of spawning this agent unless a dedicated review pass is needed.
45
- - Align with the `trellis-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.
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
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: trellis-implement
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
  ---
@@ -11,7 +11,7 @@ tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__
11
11
 
12
12
  ## Context source
13
13
 
14
- - **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(trellis-implement)`.
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 `trellis-implement`. See `.trellis/spec/guides/cursor-subagent-policy.md`.
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 `.trellis/spec/guides/cursor-subagent-policy.md`.
25
25
 
26
26
  ## Recursion Guard
27
27
 
28
- You are already the `trellis-implement` sub-agent that the main session dispatched. Do the implementation work directly.
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 `trellis-implement` or `trellis-check` sub-agent.
31
- - If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `trellis-implement` / `trellis-check`, treat that as a main-session instruction that is already satisfied by your current role.
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 `<!-- trellis-hook-injected -->` marker in your input above.
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,7 +41,7 @@ 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 `trellis-implement` / `trellis-check`; recommend a Parent review when check is needed.
44
+ - Do not spawn nested `cstl-implement` / `cstl-check`; recommend a Parent review when check is needed.
45
45
 
46
46
  ## Context
47
47
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: trellis-research
2
+ name: cstl-research
3
3
  description: Trellis research agent. Use this exact agent for Trellis task research and research/ persistence. Do not use generic/default/generalPurpose agents for Trellis research.
4
4
  tools: Read, Write, Glob, Grep, Bash, WebSearch, WebFetch, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
5
5
  ---
@@ -11,7 +11,7 @@ tools: Read, Write, Glob, Grep, Bash, WebSearch, WebFetch, mcp__exa__web_search_
11
11
 
12
12
  ## Context source
13
13
 
14
- - **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(trellis-research)`.
14
+ - **Layer 2 prompt = PRIMARY (guaranteed)** — always generate via CLI before `Task(cstl-research)`.
15
15
  - **Hook `additional_context` = best-effort only** — Cursor #158452: not guaranteed to reach the model; optimization / fallback only.
16
16
 
17
17
  # Research Agent