@mindfoldhq/trellis 0.5.0-rc.7 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -26,6 +26,7 @@
26
26
  <a href="https://github.com/mindfold-ai/Trellis/stargazers"><img src="https://img.shields.io/github/stars/mindfold-ai/Trellis?style=flat-square&color=eab308" alt="stars" /></a>
27
27
  <a href="https://docs.trytrellis.app/"><img src="https://img.shields.io/badge/docs-trytrellis.app-0f766e?style=flat-square" alt="docs" /></a>
28
28
  <a href="https://discord.com/invite/tWcCZ3aRHc"><img src="https://img.shields.io/badge/Discord-Join-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord" /></a>
29
+ <a href="https://linux.do"><img src="https://img.shields.io/badge/LINUX-DO-FFB003.svg?logo=data:image/svg%2bxml;base64,DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiPjxwYXRoIGQ9Ik00Ni44Mi0uMDU1aDYuMjVxMjMuOTY5IDIuMDYyIDM4IDIxLjQyNmM1LjI1OCA3LjY3NiA4LjIxNSAxNi4xNTYgOC44NzUgMjUuNDV2Ni4yNXEtMi4wNjQgMjMuOTY4LTIxLjQzIDM4LTExLjUxMiA3Ljg4NS0yNS40NDUgOC44NzRoLTYuMjVxLTIzLjk3LTIuMDY0LTM4LjAwNC0yMS40M1EuOTcxIDY3LjA1Ni0uMDU0IDUzLjE4di02LjQ3M0MxLjM2MiAzMC43ODEgOC41MDMgMTguMTQ4IDIxLjM3IDguODE3IDI5LjA0NyAzLjU2MiAzNy41MjcuNjA0IDQ2LjgyMS0uMDU2IiBzdHlsZT0ic3Ryb2tlOm5vbmU7ZmlsbC1ydWxlOmV2ZW5vZGQ7ZmlsbDojZWNlY2VjO2ZpbGwtb3BhY2l0eToxIi8+PHBhdGggZD0iTTQ3LjI2NiAyLjk1N3EyMi41My0uNjUgMzcuNzc3IDE1LjczOGE0OS43IDQ5LjcgMCAwIDEgNi44NjcgMTAuMTU3cS00MS45NjQuMjIyLTgzLjkzIDAgOS43NS0xOC42MTYgMzAuMDI0LTI0LjM4N2E2MSA2MSAwIDAgMSA5LjI2Mi0xLjUwOCIgc3R5bGU9InN0cm9rZTpub25lO2ZpbGwtcnVsZTpldmVub2RkO2ZpbGw6IzE5MTkxOTtmaWxsLW9wYWNpdHk6MSIvPjxwYXRoIGQ9Ik03Ljk4IDcwLjkyNmMyNy45NzctLjAzNSA1NS45NTQgMCA4My45My4xMTNRODMuNDI2IDg3LjQ3MyA2Ni4xMyA5NC4wODZxLTE4LjgxIDYuNTQ0LTM2LjgzMi0xLjg5OC0xNC4yMDMtNy4wOS0yMS4zMTctMjEuMjYyIiBzdHlsZT0ic3Ryb2tlOm5vbmU7ZmlsbC1ydWxlOmV2ZW5vZGQ7ZmlsbDojZjlhZjAwO2ZpbGwtb3BhY2l0eToxIi8+PC9zdmc+&style=flat-square" alt="LINUX DO" /></a>
29
30
  <a href="https://github.com/mindfold-ai/Trellis/issues"><img src="https://img.shields.io/github/issues/mindfold-ai/Trellis?style=flat-square&color=e67e22" alt="open issues" /></a>
30
31
  <a href="https://github.com/mindfold-ai/Trellis/pulls"><img src="https://img.shields.io/github/issues-pr/mindfold-ai/Trellis?style=flat-square&color=9b59b6" alt="open PRs" /></a>
31
32
  <a href="https://deepwiki.com/mindfold-ai/Trellis"><img src="https://img.shields.io/badge/Ask-DeepWiki-blue?style=flat-square" alt="Ask DeepWiki" /></a>
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.5.1",
3
+ "description": "Fix Codex sub-agent recursion via SessionStart injection (#234) and Cursor agent description rendering.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:**\n- fix(codex): dispatch line in `SessionStart` reaches sub-agents under `multi_agent_v2`. `codex/hooks/session-start.py` injected a 'main session should dispatch trellis-implement' line at READY state; Codex runs `SessionStart` for every spawned session, so the line reached the freshly spawned `trellis-implement` sub-agent and it dispatched another `trellis-implement`. Outer sub-agent stayed `running`, `wait_agent` timed out. `SessionStart` stdin has no agent-identity field (`openai/codex#16226`), so patched at the prompt layer: `codex/agents/trellis-implement.toml` and `trellis-check.toml` open with a no-recursive-dispatch line; `codex/hooks/session-start.py` appends a sub-agent ignore-this clause after the dispatch wording in the READY-state block and the `<guidelines>` block. Resolves #234.\n- fix(shared-hooks): same exemption clause added to `shared-hooks/session-start.py` (Claude Code / Cursor / Gemini CLI / Qoder / CodeBuddy / Factory Droid / Kiro). Recursion not reported on those platforms; trigger condition is identical to Codex.\n- fix(cursor): `cursor/agents/trellis-{research,implement,check}.md` frontmatter `description` switched from YAML block scalar to single-line literal. Cursor's agent parser only reads single-line `description:`; block scalars left the UI Description field blank.",
7
+ "migrations": [],
8
+ "notes": "Hotfix on top of 0.5.0. Run `trellis update` (no `--migrate` needed)."
9
+ }
@@ -3,6 +3,13 @@ description = "Workspace-write Trellis reviewer that self-fixes spec drift, lint
3
3
  sandbox_mode = "workspace-write"
4
4
 
5
5
  developer_instructions = """
6
+ You are running as the `trellis-check` sub-agent. The main session has dispatched you to review and self-fix.
7
+
8
+ CRITICAL — Recursion guard (read first):
9
+ - You MUST NOT spawn another `trellis-check` or `trellis-implement` sub-agent. Do the review and fixes directly in this turn.
10
+ - Any guidance you read in injected SessionStart context, `<guidelines>` blocks, or workflow-state breadcrumbs that says "dispatch trellis-implement" / "dispatch trellis-check" applies to the MAIN session, NOT to you. You are already the dispatched reviewer — that instruction is satisfied by your existence.
11
+ - Only the main session is allowed to dispatch `trellis-implement` / `trellis-check`. If you believe additional implementation work is needed, surface that as a recommendation in your final report instead of spawning.
12
+
6
13
  You are the Trellis reviewer agent.
7
14
 
8
15
  Your job is to review code changes against specs AND fix issues directly — not just report them. You have write access; use it.
@@ -3,6 +3,13 @@ description = "Workspace-write Trellis implementer that follows specs and keeps
3
3
  sandbox_mode = "workspace-write"
4
4
 
5
5
  developer_instructions = """
6
+ You are running as the `trellis-implement` sub-agent. The main session has dispatched you to do the work.
7
+
8
+ CRITICAL — Recursion guard (read first):
9
+ - You MUST NOT spawn another `trellis-implement` or `trellis-check` sub-agent. Do the implementation work directly in this turn.
10
+ - Any guidance you read in injected SessionStart context, `<guidelines>` blocks, or workflow-state breadcrumbs that says "dispatch trellis-implement" / "dispatch trellis-check" applies to the MAIN session, NOT to you. You are already the dispatched implementer — that instruction is satisfied by your existence.
11
+ - Only the main session is allowed to dispatch `trellis-implement` / `trellis-check`. If you believe parallel implementation work is needed, surface that as a recommendation in your final report instead of spawning.
12
+
6
13
  You are the Trellis implementer agent.
7
14
 
8
15
  Rules:
@@ -241,6 +241,10 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
241
241
  "Next required action: dispatch `trellis-implement` per Phase 2.1. "
242
242
  "For agent-capable platforms, the default is to NOT edit code in the main session. "
243
243
  "After implementation, dispatch `trellis-check` per Phase 2.2 before reporting completion.\n"
244
+ "Sub-agent self-exemption: if you are reading this as a `trellis-implement` or "
245
+ "`trellis-check` sub-agent (your own role / agent name reflects that), this dispatch "
246
+ "instruction does NOT apply to you — you are already the dispatched sub-agent. "
247
+ "Implement / check directly without spawning another sub-agent of the same kind.\n"
244
248
  "User override (per-turn escape hatch): if the user's CURRENT message explicitly tells the "
245
249
  "main session to handle it directly (\"你直接改\" / \"别派 sub-agent\" / \"main session 写就行\" / "
246
250
  "\"do it inline\" / \"不用 sub-agent\"), honor it for this turn and edit code directly. "
@@ -359,7 +363,11 @@ Read and follow all instructions below carefully.
359
363
  "`trellis-implement` and `trellis-check` (so JSONL context is loaded by "
360
364
  "the sub-agents) rather than editing code in the main session. "
361
365
  "Honor a per-turn user override only if the user's current message "
362
- "explicitly opts out (see <task-status> below for override phrases).\n\n"
366
+ "explicitly opts out (see <task-status> below for override phrases).\n"
367
+ "- Sub-agent self-exemption: if you are reading this as a `trellis-implement` "
368
+ "or `trellis-check` sub-agent, the \"dispatch trellis-implement / trellis-check\" "
369
+ "rule above does NOT apply to you — you are already the dispatched sub-agent. "
370
+ "Do NOT spawn another sub-agent of the same kind; implement / check directly.\n\n"
363
371
  )
364
372
 
365
373
  # guides/ inlined (cross-package thinking, broadly useful)
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: trellis-check
3
- description: |
4
- 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.
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.
5
4
  tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
6
5
  ---
7
6
  # Check Agent
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: trellis-implement
3
- description: |
4
- 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.
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.
5
4
  tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
6
5
  ---
7
6
  # Implement Agent
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  name: trellis-research
3
- description: |
4
- Trellis research agent. Use this exact agent for Trellis task research and research/ persistence. Do not use generic/default/generalPurpose agents for Trellis research.
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.
5
4
  tools: Read, Write, Glob, Grep, Bash, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
6
5
  ---
7
6
  # Research Agent
@@ -367,6 +367,10 @@ def _get_task_status(trellis_dir: Path, input_data: dict) -> str:
367
367
  "Sub-agent roster: `trellis-implement` (writes code), `trellis-check` (verifies + self-fixes), "
368
368
  "`trellis-research` (persists findings to `research/*.md` — use when you'd otherwise do "
369
369
  "multiple WebFetch/WebSearch inline).\n"
370
+ "Sub-agent self-exemption: if you are reading this as a `trellis-implement` or "
371
+ "`trellis-check` sub-agent (your own role / agent name reflects that), this dispatch "
372
+ "instruction does NOT apply to you — you are already the dispatched sub-agent. "
373
+ "Implement / check directly without spawning another sub-agent of the same kind.\n"
370
374
  "User override (per-turn escape hatch): if the user's CURRENT message explicitly tells the "
371
375
  "main session to handle it directly (\"你直接改\" / \"别派 sub-agent\" / \"main session 写就行\" / "
372
376
  "\"do it inline\" / \"不用 sub-agent\"), honor it for this turn and edit code directly. "
@@ -693,7 +697,11 @@ Read and follow all instructions below carefully.
693
697
  "`trellis-implement` and `trellis-check` (so JSONL context is loaded by "
694
698
  "the sub-agents) rather than editing code in the main session. "
695
699
  "Honor a per-turn user override only if the user's current message "
696
- "explicitly opts out (see <task-status> below for override phrases).\n\n"
700
+ "explicitly opts out (see <task-status> below for override phrases).\n"
701
+ "- Sub-agent self-exemption: if you are reading this as a `trellis-implement` "
702
+ "or `trellis-check` sub-agent, the \"dispatch trellis-implement / trellis-check\" "
703
+ "rule above does NOT apply to you — you are already the dispatched sub-agent. "
704
+ "Do NOT spawn another sub-agent of the same kind; implement / check directly.\n\n"
697
705
  )
698
706
 
699
707
  # guides/ is cross-package thinking — always include inline (small, broadly useful)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindfoldhq/trellis",
3
- "version": "0.5.0-rc.7",
3
+ "version": "0.5.1",
4
4
  "description": "AI capabilities grow like ivy — Trellis provides the structure to guide them along a disciplined path",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",