@blxzer/cursor-trellis 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/migrations/manifests/0.1.1.json +9 -0
- package/dist/migrations/manifests/0.1.2.json +9 -0
- package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +2 -1
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +16 -3
- package/dist/templates/shared-hooks/inject-subagent-context.py +31 -567
- package/dist/templates/trellis/index.d.ts +1 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +2 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/common/subagent_dispatch.py +527 -0
- package/dist/templates/trellis/scripts/common/task_store.py +32 -0
- package/dist/templates/trellis/scripts/task.py +26 -0
- package/dist/templates/trellis/workflow.md +5 -22
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.1.1",
|
|
3
|
+
"description": "v0.1.1 — Cursor-only platform reduction. Trellis templates, CLI init/update/uninstall, retrieval router, and docs converge on Cursor as the sole managed platform.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Cursor-only product trim.**\n\n- refactor(cli): platform registry, init, uninstall/update, and template dirs reduced to Cursor-only (S1–S11).\n- refactor(retrieval): drop `--platform` / non-Cursor dead branches from codebase retrieval planner (R12).\n- refactor(core): remove mem module export (R13).\n- docs/spec: workflow, AGENTS, README, and guides aligned to cursor-only surface.\n\nRun `trellis update` in each project to sync templates and scripts.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Backfilled manifest for npm 0.1.1 (published without local manifest). No automated migrations; template sync via `trellis update`."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.1.2",
|
|
3
|
+
"description": "v0.1.2 — Agent dispatch context assembly: `generate-dispatch-prompt` CLI (Layer 2) plus shared subagent_dispatch builder and slim preToolUse hook.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Subagent dispatch Layer 2 (Agent-facing).**\n\n- feat(cli): `task.py generate-dispatch-prompt <task-dir> <role>` assembles full Task prompts (marker, Selected task, prd/jsonl/spec embed).\n- refactor(scripts): `common/subagent_dispatch.py` single builder; hook is thin wrapper with marker dedup.\n- docs: workflow Phase 2.1/2.2 orchestrator contract; cursor-context-injection-guide + cursor-subagent-policy Layer 2 rows.\n\nFull/Parent implement/check on Cursor: main session should run dispatch CLI before `Task(trellis-*)`. Hook remains best-effort.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No user README changes. Run `trellis update` in each project to sync `.trellis/scripts` and hooks."
|
|
9
|
+
}
|
|
@@ -15,8 +15,9 @@ Cursor has **four** channels that can put text in front of the model. They are *
|
|
|
15
15
|
| `AGENTS.md` (repo root + nested) | Read automatically, treated as an always-on rule | ✅ **Yes** | smart-search-first rule, command surface, remote policy (the `<!-- TRELLIS:START -->` block) |
|
|
16
16
|
| `sessionStart` hook → `additional_context` | Hook fires, JSON parsed... **but content never reaches the model's system context** | ❌ **No (confirmed bug)** | workflow.md Phase Index + Task Dashboard + first-reply notice |
|
|
17
17
|
| `.trellis/workflow.md` (read on demand) | Only if the agent explicitly runs `get_context.py` or reads the file | ⚠️ Depends on agent taking action | Full Request Triage section, Task Ladder, workflow-state breadcrumbs |
|
|
18
|
+
| **`task.py generate-dispatch-prompt` → Task `prompt`** (CLI Layer 2) | Main session runs Trellis script before `Task(...)` | ✅ **Yes (primary for subagent task context on Cursor)** | Full embed: marker, `Selected task:`, prd/jsonl/spec bodies |
|
|
18
19
|
|
|
19
|
-
**Key takeaway**: anything that must reach the model **every turn without the agent choosing to load it** must live in `.cursor/rules` or `AGENTS.md`. Anything in `workflow.md` that depends on `sessionStart` injection is **invisible to Cursor agents** until the bug is fixed.
|
|
20
|
+
**Key takeaway**: anything that must reach the model **every turn without the agent choosing to load it** must live in `.cursor/rules` or `AGENTS.md`. Subagent task context on Cursor uses **CLI Layer 2** before Task dispatch; `preToolUse` hook injection is best-effort only (see forum reports + 2026-06-22 spike). Anything in `workflow.md` that depends on `sessionStart` injection is **invisible to Cursor agents** until the bug is fixed.
|
|
20
21
|
|
|
21
22
|
---
|
|
22
23
|
|
|
@@ -19,7 +19,8 @@ How did I reach trellis-research / trellis-implement / trellis-check?
|
|
|
19
19
|
│
|
|
20
20
|
├─ Main session dispatched Task(subagent_type=trellis-*)
|
|
21
21
|
│ → Task dispatch. ONLY path where BYOK json5 + Method 2.5 applies.
|
|
22
|
-
│
|
|
22
|
+
│ Context: CLI Layer 2 pre-embed (primary on Cursor); hook is best-effort
|
|
23
|
+
│ (<!-- trellis-hook-injected --> marker; skips if already present).
|
|
23
24
|
│
|
|
24
25
|
└─ Used the trellis-check SKILL in main session (no subagent spawn)
|
|
25
26
|
→ Skill form. Main-session model. Only trellis-check has both
|
|
@@ -35,8 +36,8 @@ If unsure: Task dispatch is the path Trellis workflow routes through; Agent sess
|
|
|
35
36
|
| Scene | Mechanism | Mode | Output / notes |
|
|
36
37
|
| --------------------------------------------------- | -------------------------------------------------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
37
38
|
| Code, history, or external research | `ttrellis-research` | Cursor **Agent** (writable) | `{TASK}/research/*.md`; smart-search-cli first, Cursor web fallback per skill |
|
|
38
|
-
| Implementation (after `start-execution --approved`) | `ttrellis-implement` | Agent | Code edits; no `git commit` in subagent
|
|
39
|
-
| Post-implementation verification | `ttrellis-check` | Agent | Fixes + `verify.md` / gate hints; main session records gates
|
|
39
|
+
| Implementation (after `start-execution --approved`) | `ttrellis-implement` | Agent | Code edits; no `git commit` in subagent; **CLI Layer 2** dispatch prompt on Cursor |
|
|
40
|
+
| Post-implementation verification | `ttrellis-check` | Agent | Fixes + `verify.md` / gate hints; **CLI Layer 2** on Cursor; main session records gates |
|
|
40
41
|
| Parent/Child child worker | `generate-child-prompt --mode subagent` | **Parent Task** `trellis-implement` (default) | Child delivers `verify.md` + `handoff.md`; rare per-child model → **new writable Agent** session when user names that child |
|
|
41
42
|
| Architecture / deep review | `ttrellis-check` or documented inline deep review | Agent or main session | Model via dispatch strategy (Methods 1–2.5, 3–4 below) |
|
|
42
43
|
| PRD Grill (planning) | `trellis-micro-grill` contract **inside** `trellis-brainstorm` | **Not** a subagent | Single-question business follow-ups only |
|
|
@@ -309,6 +310,18 @@ trellis_task_subagents:
|
|
|
309
310
|
|
|
310
311
|
---
|
|
311
312
|
|
|
313
|
+
## Maintainer: subagent missing task context (Cursor)
|
|
314
|
+
|
|
315
|
+
If a dispatched subagent cannot answer from `prd.md` / jsonl (empty or generic replies):
|
|
316
|
+
|
|
317
|
+
1. Confirm the main session used **CLI Layer 2** before `Task(...)` (workflow Phase 2.1 / 2.2).
|
|
318
|
+
2. **Manual fallback (Method 3):** run `python ./.trellis/scripts/task.py generate-dispatch-prompt <task-dir> <role> [--scope "..."]`, paste stdout into `Task(subagent_type=..., prompt=...)`.
|
|
319
|
+
3. Hook-only injection is best-effort on Cursor; do not treat `preToolUse` as the sole source.
|
|
320
|
+
|
|
321
|
+
This command is **Agent-facing** — not listed in user README or slash command surface.
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
312
325
|
## Hook fallback (no selected-task pointer)
|
|
313
326
|
|
|
314
327
|
When `preToolUse` cannot resolve a selected task, the subagent should read **`Selected task:`** from the first line of its dispatch prompt, then load `implement.jsonl` / `check.jsonl`, `prd.md`, `design.md`, and `implement.md` manually. Trellis does **not** document or depend on Cursor `/multitask` for workflow orchestration.
|