@mindfoldhq/trellis 0.5.0-beta.12 → 0.5.0-beta.13
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.
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.13",
|
|
3
|
+
"description": "Patch follow-up to beta.12: `task.py start` now transitions `task.json` status planning → in_progress (previously stuck at planning even after the user explicitly started work). Codex sub-agent instructions for seed-row handling — written into the dogfood root during beta.11's init-context-removal but never backported into `packages/cli/src/templates/codex/agents/` — are now in the packaged templates, so fresh `trellis init` / `trellis update` finally ship Phase 1.3 fallback guidance to Codex users. `.codex/config.toml` documents the `features.codex_hooks` user-level opt-in. No src/ changes; `trellis update` is a straight content refresh.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- fix(task.py): `task.py start <task>` transitions `task.json` status `planning` → `in_progress`. Previously `cmd_start` only wrote `.current-task` and ran `after_start` hooks — user explicitly started work but status stayed at `planning`. Non-`planning` statuses (`in_progress`, `review`, `completed`) are preserved on resume so replays don't clobber progress. See `packages/cli/src/templates/trellis/scripts/task.py:cmd_start`.\n- fix(templates/codex): backport the \"Required: Load Trellis Context First\" preamble into packaged `codex/agents/trellis-check.toml` and `codex/agents/trellis-implement.toml`. The block teaches Codex sub-agents to (1) skip `{\"_example\": ...}` seed rows and (2) fall back to prd-only context plus self-discovered specs via `get_context.py --mode packages` when the jsonl has no curated entries. It was edited into the dogfood root during beta.11 init-context-removal but never propagated into `packages/cli/src/templates/codex/agents/`, so up through beta.12 Codex users on fresh `trellis init` / `trellis update` got agent prompts missing the Phase 1.3 fallback path and the agents blocked on seed-only jsonl instead of proceeding with prd.md + spec judgment.\n\n**Docs:**\n- docs(codex): `.codex/config.toml` documents the `[features] codex_hooks = true` user-level opt-in. Project-scoped config cannot enable `features.*`; without the flag, `hooks.json` is silently ignored and Trellis context injection never runs — previously this looked like a bug. The old `shell_environment_policy` stub (dead config unrelated to Trellis) is removed in favor of the opt-in hint.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Pure content refresh. Existing tasks and jsonl files keep working untouched. After `trellis update`, `task.py start <existing-task-in-planning>` will now write `in_progress` on the first invocation — no action needed from you. Codex users who manually edited their `.codex/agents/trellis-*.toml` will see the Required-Context preamble added on update; `trellis update` prompts per-file when hashes drift."
|
|
9
|
+
}
|
|
@@ -3,6 +3,22 @@ description = "Workspace-write Trellis reviewer that self-fixes spec drift, lint
|
|
|
3
3
|
sandbox_mode = "workspace-write"
|
|
4
4
|
|
|
5
5
|
developer_instructions = """
|
|
6
|
+
## Required: Load Trellis Context First
|
|
7
|
+
|
|
8
|
+
This platform does NOT auto-inject task context via hook. Before doing anything else, you MUST load context yourself:
|
|
9
|
+
|
|
10
|
+
1. Read `.trellis/.current-task` to find the current task path (e.g. `.trellis/tasks/04-17-foo/`).
|
|
11
|
+
2. Read the task's `prd.md` (requirements) and `info.md` if it exists (technical design).
|
|
12
|
+
3. Read `<task-path>/check.jsonl` — JSONL list of dev spec files relevant to this agent.
|
|
13
|
+
4. For each entry in the JSONL, Read its `file` path — these are the dev specs you must follow.
|
|
14
|
+
**Skip rows without a `"file"` field** (e.g. `{"_example": "..."}` seed rows left over from `task.py create` before the curator ran).
|
|
15
|
+
|
|
16
|
+
If `check.jsonl` has no curated entries (only a seed row, or the file is missing), fall back to: read `prd.md`, list available specs with `python3 ./.trellis/scripts/get_context.py --mode packages`, and pick the specs that match the task domain yourself. Do NOT block on the missing jsonl — proceed with prd-only context plus your spec judgment.
|
|
17
|
+
|
|
18
|
+
If `.current-task` is missing or the task has no `prd.md`, ask the user what to work on; do NOT proceed without context.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
6
22
|
You are the Trellis reviewer agent.
|
|
7
23
|
|
|
8
24
|
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,22 @@ description = "Workspace-write Trellis implementer that follows specs and keeps
|
|
|
3
3
|
sandbox_mode = "workspace-write"
|
|
4
4
|
|
|
5
5
|
developer_instructions = """
|
|
6
|
+
## Required: Load Trellis Context First
|
|
7
|
+
|
|
8
|
+
This platform does NOT auto-inject task context via hook. Before doing anything else, you MUST load context yourself:
|
|
9
|
+
|
|
10
|
+
1. Read `.trellis/.current-task` to find the current task path (e.g. `.trellis/tasks/04-17-foo/`).
|
|
11
|
+
2. Read the task's `prd.md` (requirements) and `info.md` if it exists (technical design).
|
|
12
|
+
3. Read `<task-path>/implement.jsonl` — JSONL list of dev spec files relevant to this agent.
|
|
13
|
+
4. For each entry in the JSONL, Read its `file` path — these are the dev specs you must follow.
|
|
14
|
+
**Skip rows without a `"file"` field** (e.g. `{"_example": "..."}` seed rows left over from `task.py create` before the curator ran).
|
|
15
|
+
|
|
16
|
+
If `implement.jsonl` has no curated entries (only a seed row, or the file is missing), fall back to: read `prd.md`, list available specs with `python3 ./.trellis/scripts/get_context.py --mode packages`, and pick the specs that match the task domain yourself. Do NOT block on the missing jsonl — proceed with prd-only context plus your spec judgment.
|
|
17
|
+
|
|
18
|
+
If `.current-task` is missing or the task has no `prd.md`, ask the user what to work on; do NOT proceed without context.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
6
22
|
You are the Trellis implementer agent.
|
|
7
23
|
|
|
8
24
|
Rules:
|
|
@@ -37,6 +37,7 @@ from common.paths import (
|
|
|
37
37
|
set_current_task,
|
|
38
38
|
clear_current_task,
|
|
39
39
|
)
|
|
40
|
+
from common.io import read_json, write_json
|
|
40
41
|
from common.task_utils import resolve_task_dir, run_task_hooks
|
|
41
42
|
from common.tasks import iter_active_tasks, children_progress
|
|
42
43
|
|
|
@@ -86,10 +87,18 @@ def cmd_start(args: argparse.Namespace) -> int:
|
|
|
86
87
|
|
|
87
88
|
if set_current_task(task_dir, repo_root):
|
|
88
89
|
print(colored(f"✓ Current task set to: {task_dir}", Colors.GREEN))
|
|
90
|
+
|
|
91
|
+
task_json_path = full_path / FILE_TASK_JSON
|
|
92
|
+
if task_json_path.is_file():
|
|
93
|
+
data = read_json(task_json_path)
|
|
94
|
+
if data and data.get("status") == "planning":
|
|
95
|
+
data["status"] = "in_progress"
|
|
96
|
+
if write_json(task_json_path, data):
|
|
97
|
+
print(colored("✓ Status: planning → in_progress", Colors.GREEN))
|
|
98
|
+
|
|
89
99
|
print()
|
|
90
100
|
print(colored("The hook will now inject context from this task's jsonl files.", Colors.BLUE))
|
|
91
101
|
|
|
92
|
-
task_json_path = full_path / FILE_TASK_JSON
|
|
93
102
|
run_task_hooks("after_start", task_json_path, repo_root)
|
|
94
103
|
return 0
|
|
95
104
|
else:
|
package/package.json
CHANGED