@mindfoldhq/trellis 0.6.7 → 0.6.8

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/README.md +1 -1
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +37 -0
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/channel/adapters/codex.d.ts +7 -1
  6. package/dist/commands/channel/adapters/codex.d.ts.map +1 -1
  7. package/dist/commands/channel/adapters/codex.js +19 -2
  8. package/dist/commands/channel/adapters/codex.js.map +1 -1
  9. package/dist/commands/channel/adapters/index.d.ts +3 -1
  10. package/dist/commands/channel/adapters/index.d.ts.map +1 -1
  11. package/dist/commands/channel/adapters/index.js +1 -1
  12. package/dist/commands/channel/adapters/index.js.map +1 -1
  13. package/dist/commands/channel/index.d.ts.map +1 -1
  14. package/dist/commands/channel/index.js +4 -0
  15. package/dist/commands/channel/index.js.map +1 -1
  16. package/dist/commands/channel/spawn.d.ts +3 -0
  17. package/dist/commands/channel/spawn.d.ts.map +1 -1
  18. package/dist/commands/channel/spawn.js +1 -0
  19. package/dist/commands/channel/spawn.js.map +1 -1
  20. package/dist/commands/channel/supervisor.d.ts +3 -0
  21. package/dist/commands/channel/supervisor.d.ts.map +1 -1
  22. package/dist/commands/channel/supervisor.js +1 -0
  23. package/dist/commands/channel/supervisor.js.map +1 -1
  24. package/dist/commands/init.d.ts +2 -0
  25. package/dist/commands/init.d.ts.map +1 -1
  26. package/dist/commands/init.js.map +1 -1
  27. package/dist/commands/mem.d.ts.map +1 -1
  28. package/dist/commands/mem.js +30 -9
  29. package/dist/commands/mem.js.map +1 -1
  30. package/dist/commands/update.d.ts +12 -1
  31. package/dist/commands/update.d.ts.map +1 -1
  32. package/dist/commands/update.js +58 -7
  33. package/dist/commands/update.js.map +1 -1
  34. package/dist/configurators/codex.d.ts.map +1 -1
  35. package/dist/configurators/codex.js +11 -12
  36. package/dist/configurators/codex.js.map +1 -1
  37. package/dist/configurators/grok.d.ts +22 -0
  38. package/dist/configurators/grok.d.ts.map +1 -0
  39. package/dist/configurators/grok.js +58 -0
  40. package/dist/configurators/grok.js.map +1 -0
  41. package/dist/configurators/index.d.ts.map +1 -1
  42. package/dist/configurators/index.js +12 -2
  43. package/dist/configurators/index.js.map +1 -1
  44. package/dist/configurators/kimi.d.ts +29 -0
  45. package/dist/configurators/kimi.d.ts.map +1 -0
  46. package/dist/configurators/kimi.js +81 -0
  47. package/dist/configurators/kimi.js.map +1 -0
  48. package/dist/configurators/pi.js +9 -9
  49. package/dist/configurators/pi.js.map +1 -1
  50. package/dist/configurators/shared.d.ts.map +1 -1
  51. package/dist/configurators/shared.js +11 -4
  52. package/dist/configurators/shared.js.map +1 -1
  53. package/dist/configurators/zcode.d.ts +9 -4
  54. package/dist/configurators/zcode.d.ts.map +1 -1
  55. package/dist/configurators/zcode.js +41 -12
  56. package/dist/configurators/zcode.js.map +1 -1
  57. package/dist/migrations/manifests/0.5.0-beta.0.json +1 -1
  58. package/dist/migrations/manifests/0.6.8.json +17 -0
  59. package/dist/templates/codex/agents/trellis-check.toml +5 -12
  60. package/dist/templates/codex/agents/trellis-implement.toml +5 -12
  61. package/dist/templates/codex/agents/trellis-research.toml +13 -15
  62. package/dist/templates/codex/config.toml +11 -0
  63. package/dist/templates/codex/hooks/session-start.py +9 -3
  64. package/dist/templates/codex/hooks.json +12 -0
  65. package/dist/templates/codex/skills/brainstorm/SKILL.md +40 -13
  66. package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +2 -2
  67. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +1 -1
  68. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +1 -0
  69. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +1 -1
  70. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +1 -1
  71. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +8 -4
  72. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +2 -1
  73. package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
  74. package/dist/templates/common/skills/brainstorm.md +40 -13
  75. package/dist/templates/copilot/prompts/brainstorm.prompt.md +40 -13
  76. package/dist/templates/grok/agents/trellis-check.md +105 -0
  77. package/dist/templates/grok/agents/trellis-implement.md +116 -0
  78. package/dist/templates/grok/agents/trellis-research.md +146 -0
  79. package/dist/templates/grok/index.d.ts +16 -0
  80. package/dist/templates/grok/index.d.ts.map +1 -0
  81. package/dist/templates/grok/index.js +19 -0
  82. package/dist/templates/grok/index.js.map +1 -0
  83. package/dist/templates/kimi/agents/trellis-check.md +103 -0
  84. package/dist/templates/kimi/agents/trellis-implement.md +114 -0
  85. package/dist/templates/kimi/agents/trellis-research.md +140 -0
  86. package/dist/templates/kimi/index.d.ts +19 -0
  87. package/dist/templates/kimi/index.d.ts.map +1 -0
  88. package/dist/templates/kimi/index.js +22 -0
  89. package/dist/templates/kimi/index.js.map +1 -0
  90. package/dist/templates/omp/extensions/trellis/index.ts.txt +19 -5
  91. package/dist/templates/opencode/lib/session-utils.js +8 -2
  92. package/dist/templates/pi/extensions/trellis/index.ts.txt +8 -2
  93. package/dist/templates/pi/settings.json +0 -3
  94. package/dist/templates/shared-hooks/index.d.ts +11 -5
  95. package/dist/templates/shared-hooks/index.d.ts.map +1 -1
  96. package/dist/templates/shared-hooks/index.js +16 -5
  97. package/dist/templates/shared-hooks/index.js.map +1 -1
  98. package/dist/templates/shared-hooks/inject-subagent-context.py +151 -17
  99. package/dist/templates/shared-hooks/inject-workflow-state.py +50 -28
  100. package/dist/templates/shared-hooks/session-start.py +26 -6
  101. package/dist/templates/trellis/config.yaml +9 -7
  102. package/dist/templates/trellis/scripts/common/active_task.py +40 -13
  103. package/dist/templates/trellis/scripts/common/cli_adapter.py +69 -5
  104. package/dist/templates/trellis/scripts/common/config.py +16 -8
  105. package/dist/templates/trellis/scripts/common/git.py +36 -0
  106. package/dist/templates/trellis/scripts/common/io.py +16 -9
  107. package/dist/templates/trellis/scripts/common/task_context.py +19 -1
  108. package/dist/templates/trellis/scripts/common/task_store.py +86 -21
  109. package/dist/templates/trellis/scripts/common/task_utils.py +3 -1
  110. package/dist/templates/trellis/scripts/common/workflow_phase.py +19 -12
  111. package/dist/templates/trellis/scripts/task.py +85 -8
  112. package/dist/templates/trellis/workflow.md +20 -19
  113. package/dist/templates/zcode/agents/trellis-check.md +7 -0
  114. package/dist/templates/zcode/agents/trellis-implement.md +13 -4
  115. package/dist/templates/zcode/config.json +42 -0
  116. package/dist/templates/zcode/index.d.ts +10 -1
  117. package/dist/templates/zcode/index.d.ts.map +1 -1
  118. package/dist/templates/zcode/index.js +12 -2
  119. package/dist/templates/zcode/index.js.map +1 -1
  120. package/dist/types/ai-tools.d.ts +4 -4
  121. package/dist/types/ai-tools.d.ts.map +1 -1
  122. package/dist/types/ai-tools.js +76 -2
  123. package/dist/types/ai-tools.js.map +1 -1
  124. package/dist/utils/template-fetcher.d.ts.map +1 -1
  125. package/dist/utils/template-fetcher.js +0 -3
  126. package/dist/utils/template-fetcher.js.map +1 -1
  127. package/package.json +2 -2
@@ -14,6 +14,11 @@ CRITICAL — Recursion guard (read first):
14
14
 
15
15
  You are the Trellis reviewer agent.
16
16
 
17
+ Trellis Context Loading Protocol:
18
+ - Look for the `<!-- trellis-hook-injected -->` marker in your input above.
19
+ - If the marker is present, the native `SubagentStart` hook has already loaded the role-specific task artifacts and spec context. Proceed directly with the check work.
20
+ - If the marker is absent, find `Active task: <path>` in your dispatch prompt. Read `<path>/check.jsonl`, each file listed there, `<path>/prd.md`, `<path>/design.md` if present, and `<path>/implement.md` if present before checking. If the dispatch prompt has no active-task path, ask the main session; do not guess or use another session's task.
21
+
17
22
  Your job is to review code changes against specs AND fix issues directly — not just report them. You have write access; use it.
18
23
 
19
24
  Review checklist:
@@ -45,15 +50,3 @@ Only list issues you could not self-fix (e.g. missing product decision, out-of-s
45
50
 
46
51
  If no issues are found, say so explicitly after verifying lint/type-check pass.
47
52
  """
48
-
49
- # Disable Codex collab tools entirely for this sub-agent. With both
50
- # multi_agent and multi_agent_v2 off, `spawn_agent` / `wait_agent` /
51
- # `list_agents` / `close_agent` are not registered in the sub-agent's tool
52
- # list at all — the model literally cannot call them. This is the structural
53
- # fix for the wait_agent self-deadlock when the parent inherits its
54
- # transcript via Codex's default `fork_turns="all"` (#240 follow-up, #241).
55
- [features]
56
- multi_agent = false
57
-
58
- [features.multi_agent_v2]
59
- enabled = false
@@ -14,6 +14,11 @@ CRITICAL — Recursion guard (read first):
14
14
 
15
15
  You are the Trellis implementer agent.
16
16
 
17
+ Trellis Context Loading Protocol:
18
+ - Look for the `<!-- trellis-hook-injected -->` marker in your input above.
19
+ - If the marker is present, the native `SubagentStart` hook has already loaded the role-specific task artifacts and spec context. Proceed directly with the implementation work.
20
+ - If the marker is absent, find `Active task: <path>` in your dispatch prompt. Read `<path>/implement.jsonl`, each file listed there, `<path>/prd.md`, `<path>/design.md` if present, and `<path>/implement.md` if present before doing the work. If the dispatch prompt has no active-task path, ask the main session; do not guess or use another session's task.
21
+
17
22
  Rules:
18
23
  - Read before write. Follow `.trellis/spec/` guidance relevant to the task.
19
24
  - Keep changes focused on the requested scope.
@@ -26,15 +31,3 @@ Before finishing, summarize:
26
31
  - Tests/checks run
27
32
  - Remaining risks or follow-ups
28
33
  """
29
-
30
- # Disable Codex collab tools entirely for this sub-agent. With both
31
- # multi_agent and multi_agent_v2 off, `spawn_agent` / `wait_agent` /
32
- # `list_agents` / `close_agent` are not registered in the sub-agent's tool
33
- # list at all — the model literally cannot call them. This is the structural
34
- # fix for the wait_agent self-deadlock when the parent inherits its
35
- # transcript via Codex's default `fork_turns="all"` (#240 follow-up, #241).
36
- [features]
37
- multi_agent = false
38
-
39
- [features.multi_agent_v2]
40
- enabled = false
@@ -11,11 +11,21 @@ Conversations get compacted; files don't. Every research topic MUST be
11
11
  persisted to `{TASK_DIR}/research/<topic>.md`. Returning findings only
12
12
  through the chat reply is a failure.
13
13
 
14
+ ## Trellis Context Loading Protocol
15
+
16
+ Look for the `<!-- trellis-hook-injected -->` marker in your input above.
17
+
18
+ - If the marker is present, the native `SubagentStart` hook has supplied the
19
+ `Active task: <path>` header and research-only context. Use that task path.
20
+ - If the marker is absent, find `Active task: <path>` in your dispatch prompt.
21
+ If it is absent too, ask the main session for the path; do not run
22
+ `task.py current`, guess, or use another session's task.
23
+ - Do not load `implement.jsonl` or `check.jsonl`; research is role-isolated.
24
+
14
25
  ## Workflow
15
26
 
16
- 1. Run `python3 ./.trellis/scripts/task.py current --source` to get the
17
- active task path and source. If no active task is set, ask the user
18
- where to write output; do not guess.
27
+ 1. Use the active task path supplied by the context-loading protocol. If no
28
+ path is supplied, ask the user where to write output; do not guess.
19
29
  2. Run `mkdir -p <TASK_DIR>/research` to ensure the directory exists.
20
30
  3. Read `.trellis/workflow.md`, relevant `.trellis/spec/` files, and
21
31
  target code before forming an opinion.
@@ -59,15 +69,3 @@ If the user asks you to edit code, decline and tell them to spawn the
59
69
  ...
60
70
  ```
61
71
  """
62
-
63
- # Disable Codex collab tools entirely for this sub-agent. With both
64
- # multi_agent and multi_agent_v2 off, `spawn_agent` / `wait_agent` /
65
- # `list_agents` / `close_agent` are not registered in the sub-agent's tool
66
- # list at all — the model literally cannot call them. This is the structural
67
- # fix for the wait_agent self-deadlock when the parent inherits its
68
- # transcript via Codex's default `fork_turns="all"` (#240 follow-up, #241).
69
- [features]
70
- multi_agent = false
71
-
72
- [features.multi_agent_v2]
73
- enabled = false
@@ -26,3 +26,14 @@ project_doc_fallback_filenames = ["AGENTS.md"]
26
26
  # aborts the entire config load and blocks Codex from starting. Codex's own
27
27
  # default for multi_agent_v2 is used instead; tune it in your user-level
28
28
  # config if needed.
29
+
30
+ # Pin the subagent recursion depth explicitly instead of relying on Codex's
31
+ # default. #445 removed the per-agent `[features] multi_agent = false` guard
32
+ # (the #240/#241 wait_agent-deadlock structural fix) because native subagent
33
+ # dispatch already caps recursion via `agents.max_depth` — but that key is
34
+ # global/user-level, not settable inside an individual agent's .toml. Pinning
35
+ # it here means an upstream default change, or a user's own global override,
36
+ # can't silently reopen the recursion the #240/#241 fix closed. Project config
37
+ # (this file) takes precedence over user-level `~/.codex/config.toml`.
38
+ [agents]
39
+ max_depth = 1
@@ -92,11 +92,17 @@ def _normalize_windows_shell_path(path_str: str) -> str:
92
92
  warnings.filterwarnings("ignore")
93
93
 
94
94
  FIRST_REPLY_NOTICE = """<first-reply-notice>
95
- On the first visible assistant reply in this session, begin with exactly one short Chinese sentence:
96
- Trellis SessionStart 已注入:workflow、当前任务状态、开发者身份、git 状态、active tasks、spec 索引已加载。
97
- Then continue directly with the user's request. This notice is one-shot: do not repeat it after the first assistant reply in the same session.
95
+ On the first visible assistant reply in this session, briefly acknowledge that Trellis SessionStart context loaded.
96
+ Choose the acknowledgment language in this order:
97
+ 1. Use the language of the user's current request (the user message that triggered this reply).
98
+ 2. If that request has no clear natural language, use an explicitly established project communication language.
99
+ 3. If neither provides a language, output the language-neutral fallback exactly: `Trellis SessionStart ✓`.
100
+ Continue directly with the user's request after the acknowledgment.
101
+ The acknowledgment must not alter the language used for the remainder of the response.
102
+ This notice is one-shot: do not repeat it after the first visible assistant reply in this session.
98
103
  </first-reply-notice>"""
99
104
 
105
+
100
106
  def should_skip_injection() -> bool:
101
107
  if os.environ.get("TRELLIS_HOOKS") == "0":
102
108
  return True
@@ -10,6 +10,18 @@
10
10
  }
11
11
  ]
12
12
  }
13
+ ],
14
+ "SubagentStart": [
15
+ {
16
+ "matcher": "^(?:trellis-implement|trellis-check|trellis-research)$",
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "{{PYTHON_CMD}} -X utf8 .codex/hooks/inject-subagent-context.py",
21
+ "timeout": 15
22
+ }
23
+ ]
24
+ }
13
25
  ]
14
26
  }
15
27
  }
@@ -5,11 +5,13 @@ description: "Guide requirements discovery for a Trellis task after task-creatio
5
5
 
6
6
  # Trellis Brainstorm
7
7
 
8
- ## Non-Negotiable Interview Contract
8
+ ## Non-Negotiable Planning Contract
9
9
 
10
- 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.
10
+ A request to build, implement, fix, refactor, or "go ahead" is not approval to leave planning. Task-creation consent is also not implementation approval.
11
11
 
12
- Ask the questions one at a time.
12
+ For every non-trivial task, the user must respond at least once after the initial request before implementation begins. If no clarification is needed, that response must approve the final planning summary described below.
13
+
14
+ While any user-owned product, scope, UX, compatibility, risk, or acceptance decision remains unresolved, end the turn with exactly one highest-value question. Do not edit product code, dispatch implementation, or run `task.py start`.
13
15
 
14
16
  ## Non-Negotiable Evidence Rule
15
17
 
@@ -17,7 +19,9 @@ If a question can be answered by exploring the codebase, explore the codebase in
17
19
 
18
20
  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.
19
21
 
20
- 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.
22
+ Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, acceptance behavior, or decisions that remain ambiguous after inspection.
23
+
24
+ Repository evidence establishes current behavior and technical constraints. The user's intended behavior, feature scope boundaries, and UX preferences are never answerable by repository evidence alone, even when an existing pattern exists; existing patterns are options and recommendation evidence, not decisions.
21
25
 
22
26
  ---
23
27
 
@@ -49,11 +53,12 @@ Use a concise title from the user's request. Use a slug without a date prefix. `
49
53
  - product intent still needed from the user
50
54
  - scope or risk decisions still needed from the user
51
55
  - likely out-of-scope items
52
- 4. Ask the single highest-value remaining question.
53
- 5. Include your recommended answer with the question.
54
- 6. After each user answer, update `prd.md` before continuing.
55
- 7. For complex tasks, create or update `design.md` and `implement.md` before implementation starts.
56
- 8. Before final review or `task.py start`, run the PRD convergence pass below.
56
+ 4. If a user-owned decision remains, ask the single highest-value question, include your recommendation and trade-off, then stop. Do not perform implementation work in the same turn.
57
+ 5. After each user answer, update `prd.md`, recompute the decision inventory, and repeat from step 2.
58
+ 6. When no user-owned decision remains, create or update `design.md` and `implement.md` for complex tasks.
59
+ 7. Run the requirement convergence gate, then the PRD convergence pass.
60
+ 8. Present the final planning summary and stop. Do not run `task.py start` or edit product code in the same turn.
61
+ 9. Only a subsequent user message that explicitly approves the latest planning summary authorizes `task.py start` and implementation. If the artifacts change materially after approval, repeat the final review.
57
62
 
58
63
  Do not invent a project-specific product/spec hierarchy. If the repository already has product, domain, or spec docs, use them. If it does not, proceed with the evidence that exists.
59
64
 
@@ -70,6 +75,27 @@ Each question must include:
70
75
 
71
76
  Do not ask process questions such as whether to search, inspect files, or continue brainstorming. Do the evidence work directly. Ask the user only when the remaining issue is a product decision, preference, scope boundary, or risk tolerance choice.
72
77
 
78
+ Recommendations are not default selections. Never choose a recommended product decision on the user's behalf merely because the user asked for implementation.
79
+
80
+ Do not manufacture clarification questions when the request and repository evidence already resolve every decision. In that case, proceed directly to the final planning summary, which still requires a subsequent explicit approval.
81
+
82
+ The final review is a required phase-transition gate, not a prohibited process question. Task-creation consent, the initial implementation request, and approval given before the latest final summary do not satisfy this gate.
83
+
84
+ ## Requirement Convergence Gate
85
+
86
+ Before final review, verify all of the following:
87
+
88
+ - the user outcome and product value are explicit
89
+ - in-scope and out-of-scope behavior are explicit
90
+ - acceptance criteria describe observable outcomes
91
+ - user-owned product, scope, UX, compatibility, and risk decisions are resolved
92
+ - blocking open questions are empty
93
+ - technical unknowns are researched or explicitly deferred without changing MVP behavior
94
+
95
+ Lightweight tasks may omit `design.md` and `implement.md`; they may not skip evidence inspection, requirement convergence, final review, or fresh implementation approval.
96
+
97
+ The final planning summary must show Goal, In Scope, Out of Scope, Acceptance Criteria, Key Decisions, relevant Risks or Deferred Items, and artifact status.
98
+
73
99
  ## Artifact Rules
74
100
 
75
101
  `prd.md` records requirements and acceptance:
@@ -111,7 +137,7 @@ The pass must be lossless:
111
137
  - Remove resolved open questions instead of leaving empty or already-answered sections.
112
138
  - Merge parallel bug and requirement lists when they describe the same work; keep each defect's severity, evidence, and file:line anchors on the owning requirement.
113
139
  - Preserve every file:line anchor, decision, constraint, requirement ID, and acceptance-criteria mapping.
114
- - Keep only genuinely blocking open questions.
140
+ - Do not proceed to final review while any blocking open question remains.
115
141
 
116
142
  After the pass, read `prd.md` top to bottom and verify that no fact is repeated across sections unless the repetition adds new information.
117
143
 
@@ -122,9 +148,10 @@ Before declaring planning ready:
122
148
  - `prd.md` contains testable acceptance criteria.
123
149
  - `prd.md` has passed the PRD convergence pass: no unresolved temporary brainstorm sections, no duplicate facts across sections, and no lost anchors, decisions, or acceptance mappings.
124
150
  - Repository-answerable questions have already been answered through inspection.
125
- - Remaining open questions are genuinely about user intent or scope.
151
+ - Blocking open questions are empty.
126
152
  - Complex tasks have `design.md` and `implement.md`.
127
153
  - Sub-agent-dispatch tasks have real curated entries in both `implement.jsonl` and `check.jsonl`; seed-only manifests are not ready.
128
- - The user has reviewed the final planning artifacts or explicitly approved proceeding.
154
+ - The latest final planning summary has been presented to the user.
155
+ - In a subsequent message, the user explicitly approved that summary for implementation.
129
156
 
130
- Do not start implementation until the user approves or asks for implementation.
157
+ Do not start implementation merely because the user originally asked for implementation.
@@ -12,7 +12,7 @@ Trellis v0.6 adds three architectural surfaces on top of the pre-v0.6 workflow /
12
12
  The default operating scope is local files in the user project:
13
13
 
14
14
  - `.trellis/`: workflow, config, tasks, spec, workspace, scripts, bundled runtime agents, and runtime state.
15
- - Platform directories: `.claude/`, `.codex/`, `.cursor/`, `.opencode/`, `.kiro/`, `.gemini/`, `.qoder/`, `.codebuddy/`, `.github/`, `.factory/`, `.pi/`, `.reasonix/`, `.kilocode/`, `.agent/`, `.devin/`, and similar directories. Pi additionally exposes a native `trellis_subagent` tool with `single` / `parallel` / `chain` dispatch modes, throttled progress cards, and `isTrellisAgent()` validation on top of the file layout. Reasonix stores both workflow skills and subagent skills as `.reasonix/skills/<name>/SKILL.md`; subagent skills carry `runAs: subagent` frontmatter.
15
+ - Platform directories: `.claude/`, `.codex/`, `.cursor/`, `.opencode/`, `.kiro/`, `.gemini/`, `.qoder/`, `.codebuddy/`, `.github/`, `.factory/`, `.pi/`, `.reasonix/`, `.kilocode/`, `.agent/`, `.devin/`, `.kimi-code/`, and similar directories. Pi additionally exposes a native `trellis_subagent` tool with `single` / `parallel` / `chain` dispatch modes, throttled progress cards, and `isTrellisAgent()` validation on top of the file layout. Reasonix stores both workflow skills and subagent skills as `.reasonix/skills/<name>/SKILL.md`; subagent skills carry `runAs: subagent` frontmatter. Kimi Code keeps workflow skills in the shared `.agents/skills/` layer and delivers commands plus agent prompts as `.kimi-code/skills/<name>/SKILL.md`.
16
16
  - Shared skill layer: `.agents/skills/`.
17
17
  - User-owned channel store outside the project tree: `~/.trellis/channels/<project>/<channel>/events.jsonl`.
18
18
  - Raw platform conversation logs queryable via `trellis mem`: `~/.claude/projects/`, `~/.codex/sessions/`, and `~/.pi/agent/sessions/` (OpenCode adapter degraded for the v0.6 line).
@@ -44,7 +44,7 @@ Do not assume the user has the Trellis source repository. Do not default to modi
44
44
  ### Platform Files
45
45
 
46
46
  - `references/platform-files/overview.md`: How shared `.trellis/` files relate to platform directories and the four platform integration modes (hook-driven, agent prelude, main-session workflow, channel runtime).
47
- - `references/platform-files/platform-map.md`: Platform directories and paths for skills, agents, hooks, and extensions across all 15 supported platforms including Reasonix and Pi's native `trellis_subagent` extension.
47
+ - `references/platform-files/platform-map.md`: Platform directories and paths for skills, agents, hooks, and extensions across all supported platforms including Reasonix and Pi's native `trellis_subagent` extension.
48
48
  - `references/platform-files/hooks-and-settings.md`: How settings/config files, hooks, plugins, and extensions connect to Trellis; covers `channel.worker_guard.*` and `codex.dispatch_mode`.
49
49
  - `references/platform-files/agents.md`: Per-platform `trellis-research` / `trellis-implement` / `trellis-check` sub-agent files plus bundled `.trellis/agents/{check,implement}.md` for the channel runtime.
50
50
  - `references/platform-files/skills-and-commands.md`: Differences between skills, commands, prompts, and workflows, plus how to change them.
@@ -87,7 +87,7 @@ If a command only repeats workflow rules, prefer making it reference/read `.trel
87
87
  | CodeBuddy | `.codebuddy/skills/`, `.codebuddy/commands/` |
88
88
  | GitHub Copilot | `.github/skills/`, `.github/prompts/` |
89
89
  | Factory Droid | `.factory/skills/`, `.factory/commands/` |
90
- | Pi Agent | `.pi/skills/` |
90
+ | Pi Agent | `.agents/skills/` |
91
91
  | Reasonix | `.reasonix/skills/` (no separate commands dir; slash commands built into the platform) |
92
92
  | ZCode | `.zcode/skills/`, `.zcode/commands/` |
93
93
  | Kilo / Antigravity / Devin | workflows + skills |
@@ -34,6 +34,7 @@ Agent files should not become generic chat prompts. They should define input sou
34
34
  | Pi Agent | `.pi/agents/trellis-*.md` |
35
35
  | Reasonix | `.reasonix/skills/trellis-*/SKILL.md` (subagent frontmatter) |
36
36
  | ZCode | `.zcode/agents/trellis-*.md` |
37
+ | Kimi Code | `.kimi-code/skills/trellis-*/SKILL.md` (agent prompts as skills, dispatched to the built-in coder/explore/plan sub-agents) |
37
38
 
38
39
  GitHub Copilot agent/prompt support is provided by a combination of directories such as `.github/agents/`, `.github/prompts/`, and `.github/skills/`; inspect the files actually generated in the user project.
39
40
 
@@ -29,7 +29,7 @@ Common files:
29
29
  | Pi Agent | `.pi/settings.json`, `.pi/extensions/trellis/` |
30
30
  | Trae IDE | `.trae/hooks.json` |
31
31
 
32
- Reasonix and ZCode are pull-based platforms that do not use hooks or settings files; their agent files contain prelude instructions to read context after startup.
32
+ Reasonix is a pull-based platform whose agent files contain prelude instructions to read context after startup. ZCode uses `.zcode/config.json` with shared hooks, including PreToolUse for sub-agent prompt injection. Kimi Code is likewise pull-based and has no project-level settings/hooks file Trellis writes (hooks live only in the user-level `~/.kimi-code/config.toml`), so its agent prompts ship as skills with the same prelude.
33
33
 
34
34
  Whether these files exist in a project depends on which `trellis init --<platform>` flags the user ran.
35
35
 
@@ -5,7 +5,7 @@ Trellis connects the same local architecture to different AI tools. `.trellis/`
5
5
  When a local AI modifies Trellis, it should distinguish two file categories first:
6
6
 
7
7
  - **Shared files**: `.trellis/workflow.md`, `.trellis/tasks/`, `.trellis/spec/`, `.trellis/scripts/`.
8
- - **Platform files**: `.claude/`, `.codex/`, `.cursor/`, `.opencode/`, `.kiro/`, `.gemini/`, `.qoder/`, `.codebuddy/`, `.github/`, `.factory/`, `.pi/`, `.trae/`, `.kilocode/`, `.agent/`, `.devin/`, `.reasonix/`, `.zcode/`, and similar directories.
8
+ - **Platform files**: `.claude/`, `.codex/`, `.cursor/`, `.opencode/`, `.kiro/`, `.gemini/`, `.qoder/`, `.codebuddy/`, `.github/`, `.factory/`, `.pi/`, `.trae/`, `.kilocode/`, `.agent/`, `.devin/`, `.reasonix/`, `.zcode/`, `.kimi-code/`, and similar directories.
9
9
 
10
10
  Platform files do not store business state. They let the corresponding AI tool read Trellis state, call Trellis scripts, and load Trellis skills/agents/hooks.
11
11
 
@@ -19,10 +19,12 @@ This page lists common Trellis file locations in a user project by platform. Whe
19
19
  | CodeBuddy | `--codebuddy` | `.codebuddy/` | `.codebuddy/skills/` | `.codebuddy/agents/` | `.codebuddy/hooks/` + `.codebuddy/settings.json` |
20
20
  | GitHub Copilot | `--copilot` | `.github/` | `.github/skills/` | `.github/agents/` | `.github/copilot/hooks/` + prompts |
21
21
  | Factory Droid | `--droid` | `.factory/` | `.factory/skills/` | `.factory/droids/` | `.factory/hooks/` + settings |
22
- | Pi Agent | `--pi` | `.pi/` | `.pi/skills/` | `.pi/agents/` | `.pi/extensions/trellis/` (native `trellis_subagent` tool) + `.pi/settings.json` |
22
+ | Pi Agent | `--pi` | `.pi/` | `.agents/skills/` | `.pi/agents/` | `.pi/extensions/trellis/` (native `trellis_subagent` tool) + `.pi/settings.json` |
23
23
  | Trae IDE | `--trae` | `.trae/` | `.trae/skills/` | `.trae/agents/` | `.trae/hooks/` + `.trae/hooks.json` |
24
24
  | Reasonix | `--reasonix` | `.reasonix/` | `.reasonix/skills/` | None — sub-agents are skills with `runAs: subagent` frontmatter | None |
25
- | ZCode | `--zcode` | `.zcode/` | `.zcode/skills/` | `.zcode/agents/` | pull-based prelude (no hooks) |
25
+ | ZCode | `--zcode` | `.zcode/` | `.zcode/skills/` | `.zcode/agents/` | `.zcode/hooks/` + `.zcode/config.json` (SessionStart + UserPromptSubmit + PreToolUse Agent/Task); sub-agents use hook-injected context |
26
+ | Grok Build | `--grok` | `.grok/` | `.grok/skills/` | `.grok/agents/` | pull-based prelude (no hooks; flat `.grok/commands/trellis-*.md`) |
27
+ | Kimi Code | `--kimi` | `.kimi-code/` | `.agents/skills/` (shared) + `.kimi-code/skills/` | None — agent prompts are skills under `.kimi-code/skills/` (built-in coder/explore/plan sub-agents only) | None (pull-based prelude; no project hooks/settings) |
26
28
 
27
29
  ## Capability Groups
28
30
 
@@ -44,6 +46,8 @@ These platforms usually have `trellis-research`, `trellis-implement`, and `trell
44
46
  - Trae IDE
45
47
  - Reasonix (delivered as skills with `runAs: subagent` under `.reasonix/skills/`, not as a separate `agents/` directory)
46
48
  - ZCode
49
+ - Grok Build (`.grok/agents/`; dispatch via `spawn_subagent` with `subagent_type`)
50
+ - Kimi Code (delivered as skills under `.kimi-code/skills/`; dispatched to the built-in coder/explore/plan sub-agents)
47
51
 
48
52
  When changing implementation/check/research behavior, look for the corresponding platform agent files first.
49
53
 
@@ -67,7 +71,7 @@ When changing behavior, inspect workflows and skills first. Do not assume Trelli
67
71
 
68
72
  ### Shared `.agents/skills/`
69
73
 
70
- Codex and Gemini CLI write the shared `.agents/skills/` layer. Some tools that support agentskills.io can also read this directory. If the user wants multiple compatible tools to share one skill, consider `.agents/skills/` first, but do not assume every platform reads it. ZCode keeps Trellis-managed skills under `.zcode/skills/`.
74
+ Codex, Gemini CLI, Pi Agent, and Kimi Code write the shared `.agents/skills/` layer. Some tools that support agentskills.io can also read this directory. If the user wants multiple compatible tools to share one skill, consider `.agents/skills/` first, but do not assume every platform reads it. ZCode keeps Trellis-managed skills under `.zcode/skills/`.
71
75
 
72
76
  ## Decision Rules When Modifying Platform Files
73
77
 
@@ -91,7 +95,7 @@ Do not delete a custom file just because it is not listed in this path table.
91
95
 
92
96
  Extension-backed platform. OMP native provider auto-discovers all subdirectories.
93
97
 
94
- ```
98
+ ```text
95
99
  .omp/
96
100
  ├── commands/ # Slash commands (flat .md)
97
101
  ├── skills/ # Auto-triggered skills (SKILL.md per dir)
@@ -30,9 +30,10 @@ Trellis workflow skills usually share one semantic set: brainstorm, before-dev,
30
30
  | CodeBuddy | `.codebuddy/skills/`, `.codebuddy/commands/` |
31
31
  | GitHub Copilot | `.github/skills/`, `.github/prompts/` |
32
32
  | Factory Droid | `.factory/skills/`, `.factory/commands/` |
33
- | Pi Agent | `.pi/skills/` |
33
+ | Pi Agent | `.agents/skills/` |
34
34
  | Reasonix | `.reasonix/skills/` |
35
35
  | ZCode | `.zcode/skills/`, `.zcode/commands/` |
36
+ | Kimi Code | `.agents/skills/`, `.kimi-code/skills/` (commands delivered as `/skill:trellis-*` skills) |
36
37
 
37
38
  In a user project, use the files actually generated by init as authoritative.
38
39
 
@@ -11,7 +11,7 @@ It is intentionally a **capability skill, not a workflow**. There is no fixed ou
11
11
 
12
12
  ## What `trellis mem` is
13
13
 
14
- A local CLI that indexes the user's past Claude Code, Codex, and Pi Agent conversation logs and lets you list, search, slice by Trellis task boundaries, and dump cleaned dialogue from them. Claude and Codex use `~/.claude/projects/` and `~/.codex/sessions/`. Pi uses its default or environment-configured session root, global `~/.pi/agent/settings.json`, and the scoped project's `.pi/settings.json`; relative `sessionDir` values resolve from the settings file directory. Project-local Pi settings require project-scoped lookup through the current cwd or `--cwd`. OpenCode logs are not yet indexable (provider adapter pending) — when an OpenCode session is the obvious target, surface that limitation rather than guessing.
14
+ A local CLI that indexes the user's past Claude Code, Codex, Pi Agent, and ZCode conversation logs and lets you list, search, slice by Trellis task boundaries, and dump cleaned dialogue from them. Claude and Codex use `~/.claude/projects/` and `~/.codex/sessions/`. Pi uses its default or environment-configured session root, global `~/.pi/agent/settings.json`, and the scoped project's `.pi/settings.json`; relative `sessionDir` values resolve from the settings file directory. Project-local Pi settings require project-scoped lookup through the current cwd or `--cwd`. ZCode uses `~/.zcode/cli/db/db.sqlite`. OpenCode logs are not yet indexable (provider adapter pending) — when an OpenCode session is the obvious target, surface that limitation rather than guessing.
15
15
 
16
16
  Nothing in `mem` is uploaded. All reads are local.
17
17
 
@@ -1,10 +1,12 @@
1
1
  # Trellis Brainstorm
2
2
 
3
- ## Non-Negotiable Interview Contract
3
+ ## Non-Negotiable Planning Contract
4
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.
5
+ A request to build, implement, fix, refactor, or "go ahead" is not approval to leave planning. Task-creation consent is also not implementation approval.
6
6
 
7
- Ask the questions one at a time.
7
+ For every non-trivial task, the user must respond at least once after the initial request before implementation begins. If no clarification is needed, that response must approve the final planning summary described below.
8
+
9
+ While any user-owned product, scope, UX, compatibility, risk, or acceptance decision remains unresolved, end the turn with exactly one highest-value question. Do not edit product code, dispatch implementation, or run `task.py start`.
8
10
 
9
11
  ## Non-Negotiable Evidence Rule
10
12
 
@@ -12,7 +14,9 @@ If a question can be answered by exploring the codebase, explore the codebase in
12
14
 
13
15
  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
16
 
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.
17
+ Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, acceptance behavior, or decisions that remain ambiguous after inspection.
18
+
19
+ Repository evidence establishes current behavior and technical constraints. The user's intended behavior, feature scope boundaries, and UX preferences are never answerable by repository evidence alone, even when an existing pattern exists; existing patterns are options and recommendation evidence, not decisions.
16
20
 
17
21
  ---
18
22
 
@@ -44,11 +48,12 @@ Use a concise title from the user's request. Use a slug without a date prefix. `
44
48
  - product intent still needed from the user
45
49
  - scope or risk decisions still needed from the user
46
50
  - likely out-of-scope items
47
- 4. Ask the single highest-value remaining question.
48
- 5. Include your recommended answer with the question.
49
- 6. After each user answer, update `prd.md` before continuing.
50
- 7. For complex tasks, create or update `design.md` and `implement.md` before implementation starts.
51
- 8. Before final review or `task.py start`, run the PRD convergence pass below.
51
+ 4. If a user-owned decision remains, ask the single highest-value question, include your recommendation and trade-off, then stop. Do not perform implementation work in the same turn.
52
+ 5. After each user answer, update `prd.md`, recompute the decision inventory, and repeat from step 2.
53
+ 6. When no user-owned decision remains, create or update `design.md` and `implement.md` for complex tasks.
54
+ 7. Run the requirement convergence gate, then the PRD convergence pass.
55
+ 8. Present the final planning summary and stop. Do not run `task.py start` or edit product code in the same turn.
56
+ 9. Only a subsequent user message that explicitly approves the latest planning summary authorizes `task.py start` and implementation. If the artifacts change materially after approval, repeat the final review.
52
57
 
53
58
  Do not invent a project-specific product/spec hierarchy. If the repository already has product, domain, or spec docs, use them. If it does not, proceed with the evidence that exists.
54
59
 
@@ -65,6 +70,12 @@ Each question must include:
65
70
 
66
71
  Do not ask process questions such as whether to search, inspect files, or continue brainstorming. Do the evidence work directly. Ask the user only when the remaining issue is a product decision, preference, scope boundary, or risk tolerance choice.
67
72
 
73
+ Recommendations are not default selections. Never choose a recommended product decision on the user's behalf merely because the user asked for implementation.
74
+
75
+ Do not manufacture clarification questions when the request and repository evidence already resolve every decision. In that case, proceed directly to the final planning summary, which still requires a subsequent explicit approval.
76
+
77
+ The final review is a required phase-transition gate, not a prohibited process question. Task-creation consent, the initial implementation request, and approval given before the latest final summary do not satisfy this gate.
78
+
68
79
  ## Thinking Framework: First Principles Analysis
69
80
 
70
81
  When requirements are vague, solutions feel over-engineered, or you're about to add complexity "because everyone does" — decompose to fundamental truths before reasoning upward.
@@ -108,6 +119,21 @@ For each component of the current plan:
108
119
  - What assumptions need verification?
109
120
  - What's the simplest experiment to test this?
110
121
 
122
+ ## Requirement Convergence Gate
123
+
124
+ Before final review, verify all of the following:
125
+
126
+ - the user outcome and product value are explicit
127
+ - in-scope and out-of-scope behavior are explicit
128
+ - acceptance criteria describe observable outcomes
129
+ - user-owned product, scope, UX, compatibility, and risk decisions are resolved
130
+ - blocking open questions are empty
131
+ - technical unknowns are researched or explicitly deferred without changing MVP behavior
132
+
133
+ Lightweight tasks may omit `design.md` and `implement.md`; they may not skip evidence inspection, requirement convergence, final review, or fresh implementation approval.
134
+
135
+ The final planning summary must show Goal, In Scope, Out of Scope, Acceptance Criteria, Key Decisions, relevant Risks or Deferred Items, and artifact status.
136
+
111
137
  ## Artifact Rules
112
138
 
113
139
  `prd.md` records requirements and acceptance:
@@ -149,7 +175,7 @@ The pass must be lossless:
149
175
  - Remove resolved open questions instead of leaving empty or already-answered sections.
150
176
  - Merge parallel bug and requirement lists when they describe the same work; keep each defect's severity, evidence, and file:line anchors on the owning requirement.
151
177
  - Preserve every file:line anchor, decision, constraint, requirement ID, and acceptance-criteria mapping.
152
- - Keep only genuinely blocking open questions.
178
+ - Do not proceed to final review while any blocking open question remains.
153
179
 
154
180
  After the pass, read `prd.md` top to bottom and verify that no fact is repeated across sections unless the repetition adds new information.
155
181
 
@@ -160,9 +186,10 @@ Before declaring planning ready:
160
186
  - `prd.md` contains testable acceptance criteria.
161
187
  - `prd.md` has passed the PRD convergence pass: no unresolved temporary brainstorm sections, no duplicate facts across sections, and no lost anchors, decisions, or acceptance mappings.
162
188
  - Repository-answerable questions have already been answered through inspection.
163
- - Remaining open questions are genuinely about user intent or scope.
189
+ - Blocking open questions are empty.
164
190
  - Complex tasks have `design.md` and `implement.md`.
165
191
  - Sub-agent-dispatch tasks have real curated entries in both `implement.jsonl` and `check.jsonl`; seed-only manifests are not ready.
166
- - The user has reviewed the final planning artifacts or explicitly approved proceeding.
192
+ - The latest final planning summary has been presented to the user.
193
+ - In a subsequent message, the user explicitly approved that summary for implementation.
167
194
 
168
- Do not start implementation until the user approves or asks for implementation.
195
+ Do not start implementation merely because the user originally asked for implementation.
@@ -4,11 +4,13 @@ description: "Guide requirements discovery for a Trellis task after task-creatio
4
4
 
5
5
  # Trellis Brainstorm
6
6
 
7
- ## Non-Negotiable Interview Contract
7
+ ## Non-Negotiable Planning Contract
8
8
 
9
- 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.
9
+ A request to build, implement, fix, refactor, or "go ahead" is not approval to leave planning. Task-creation consent is also not implementation approval.
10
10
 
11
- Ask the questions one at a time.
11
+ For every non-trivial task, the user must respond at least once after the initial request before implementation begins. If no clarification is needed, that response must approve the final planning summary described below.
12
+
13
+ While any user-owned product, scope, UX, compatibility, risk, or acceptance decision remains unresolved, end the turn with exactly one highest-value question. Do not edit product code, dispatch implementation, or run `task.py start`.
12
14
 
13
15
  ## Non-Negotiable Evidence Rule
14
16
 
@@ -16,7 +18,9 @@ If a question can be answered by exploring the codebase, explore the codebase in
16
18
 
17
19
  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.
18
20
 
19
- 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.
21
+ Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, acceptance behavior, or decisions that remain ambiguous after inspection.
22
+
23
+ Repository evidence establishes current behavior and technical constraints. The user's intended behavior, feature scope boundaries, and UX preferences are never answerable by repository evidence alone, even when an existing pattern exists; existing patterns are options and recommendation evidence, not decisions.
20
24
 
21
25
  ---
22
26
 
@@ -48,11 +52,12 @@ Use a concise title from the user's request. Use a slug without a date prefix. `
48
52
  - product intent still needed from the user
49
53
  - scope or risk decisions still needed from the user
50
54
  - likely out-of-scope items
51
- 4. Ask the single highest-value remaining question.
52
- 5. Include your recommended answer with the question.
53
- 6. After each user answer, update `prd.md` before continuing.
54
- 7. For complex tasks, create or update `design.md` and `implement.md` before implementation starts.
55
- 8. Before final review or `task.py start`, run the PRD convergence pass below.
55
+ 4. If a user-owned decision remains, ask the single highest-value question, include your recommendation and trade-off, then stop. Do not perform implementation work in the same turn.
56
+ 5. After each user answer, update `prd.md`, recompute the decision inventory, and repeat from step 2.
57
+ 6. When no user-owned decision remains, create or update `design.md` and `implement.md` for complex tasks.
58
+ 7. Run the requirement convergence gate, then the PRD convergence pass.
59
+ 8. Present the final planning summary and stop. Do not run `task.py start` or edit product code in the same turn.
60
+ 9. Only a subsequent user message that explicitly approves the latest planning summary authorizes `task.py start` and implementation. If the artifacts change materially after approval, repeat the final review.
56
61
 
57
62
  Do not invent a project-specific product/spec hierarchy. If the repository already has product, domain, or spec docs, use them. If it does not, proceed with the evidence that exists.
58
63
 
@@ -69,6 +74,27 @@ Each question must include:
69
74
 
70
75
  Do not ask process questions such as whether to search, inspect files, or continue brainstorming. Do the evidence work directly. Ask the user only when the remaining issue is a product decision, preference, scope boundary, or risk tolerance choice.
71
76
 
77
+ Recommendations are not default selections. Never choose a recommended product decision on the user's behalf merely because the user asked for implementation.
78
+
79
+ Do not manufacture clarification questions when the request and repository evidence already resolve every decision. In that case, proceed directly to the final planning summary, which still requires a subsequent explicit approval.
80
+
81
+ The final review is a required phase-transition gate, not a prohibited process question. Task-creation consent, the initial implementation request, and approval given before the latest final summary do not satisfy this gate.
82
+
83
+ ## Requirement Convergence Gate
84
+
85
+ Before final review, verify all of the following:
86
+
87
+ - the user outcome and product value are explicit
88
+ - in-scope and out-of-scope behavior are explicit
89
+ - acceptance criteria describe observable outcomes
90
+ - user-owned product, scope, UX, compatibility, and risk decisions are resolved
91
+ - blocking open questions are empty
92
+ - technical unknowns are researched or explicitly deferred without changing MVP behavior
93
+
94
+ Lightweight tasks may omit `design.md` and `implement.md`; they may not skip evidence inspection, requirement convergence, final review, or fresh implementation approval.
95
+
96
+ The final planning summary must show Goal, In Scope, Out of Scope, Acceptance Criteria, Key Decisions, relevant Risks or Deferred Items, and artifact status.
97
+
72
98
  ## Artifact Rules
73
99
 
74
100
  `prd.md` records requirements and acceptance:
@@ -110,7 +136,7 @@ The pass must be lossless:
110
136
  - Remove resolved open questions instead of leaving empty or already-answered sections.
111
137
  - Merge parallel bug and requirement lists when they describe the same work; keep each defect's severity, evidence, and file:line anchors on the owning requirement.
112
138
  - Preserve every file:line anchor, decision, constraint, requirement ID, and acceptance-criteria mapping.
113
- - Keep only genuinely blocking open questions.
139
+ - Do not proceed to final review while any blocking open question remains.
114
140
 
115
141
  After the pass, read `prd.md` top to bottom and verify that no fact is repeated across sections unless the repetition adds new information.
116
142
 
@@ -121,9 +147,10 @@ Before declaring planning ready:
121
147
  - `prd.md` contains testable acceptance criteria.
122
148
  - `prd.md` has passed the PRD convergence pass: no unresolved temporary brainstorm sections, no duplicate facts across sections, and no lost anchors, decisions, or acceptance mappings.
123
149
  - Repository-answerable questions have already been answered through inspection.
124
- - Remaining open questions are genuinely about user intent or scope.
150
+ - Blocking open questions are empty.
125
151
  - Complex tasks have `design.md` and `implement.md`.
126
152
  - Sub-agent-dispatch tasks have real curated entries in both `implement.jsonl` and `check.jsonl`; seed-only manifests are not ready.
127
- - The user has reviewed the final planning artifacts or explicitly approved proceeding.
153
+ - The latest final planning summary has been presented to the user.
154
+ - In a subsequent message, the user explicitly approved that summary for implementation.
128
155
 
129
- Do not start implementation until the user approves or asks for implementation.
156
+ Do not start implementation merely because the user originally asked for implementation.