@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.
@@ -28,6 +28,7 @@ Usage:
28
28
  python task.py set-child-state <parent-dir> <child-dir> <state> --evidence <ref>
29
29
  python task.py integrate-child <parent-dir> <child-dir> <state> --evidence <ref>
30
30
  python task.py generate-child-prompt <parent-dir> <child-dir> [--mode inline|subagent]
31
+ python task.py generate-dispatch-prompt <task-dir> <role> [--scope TEXT] [--finish] [--max-chars N]
31
32
  python task.py parent-status <parent-dir>
32
33
  python task.py review-child <parent-dir> <child-dir> [--check] [--decision accept|changes|cancel|integrate-through]
33
34
  """
@@ -90,6 +91,7 @@ from common.task_store import (
90
91
  cmd_set_child_state,
91
92
  cmd_integrate_child,
92
93
  cmd_generate_child_prompt,
94
+ cmd_generate_dispatch_prompt,
93
95
  cmd_parent_status,
94
96
  cmd_review_child,
95
97
  )
@@ -750,6 +752,29 @@ def main() -> int:
750
752
  p_integrate_child.add_argument("--execute-merge", action="store_true", help="Execute git merge --no-ff --no-commit for an integrated Child")
751
753
  p_integrate_child.add_argument("--check", action="store_true", help="Run non-mutating integration readiness check")
752
754
 
755
+ # generate-dispatch-prompt
756
+ p_dispatch_prompt = subparsers.add_parser(
757
+ "generate-dispatch-prompt",
758
+ help="Build full Task dispatch prompt (Agent-facing)",
759
+ )
760
+ p_dispatch_prompt.add_argument("task_dir", help="Task directory")
761
+ p_dispatch_prompt.add_argument(
762
+ "role",
763
+ choices=["implement", "check", "research"],
764
+ help="Subagent role",
765
+ )
766
+ p_dispatch_prompt.add_argument("--scope", help="One-line task instruction for subagent")
767
+ p_dispatch_prompt.add_argument(
768
+ "--finish",
769
+ action="store_true",
770
+ help="Use finish check context (role=check only)",
771
+ )
772
+ p_dispatch_prompt.add_argument(
773
+ "--max-chars",
774
+ type=int,
775
+ help="Hard truncate embedded context block",
776
+ )
777
+
753
778
  # generate-child-prompt
754
779
  p_gen_prompt = subparsers.add_parser(
755
780
  "generate-child-prompt",
@@ -834,6 +859,7 @@ def main() -> int:
834
859
  "set-child-state": cmd_set_child_state,
835
860
  "integrate-child": cmd_integrate_child,
836
861
  "generate-child-prompt": cmd_generate_child_prompt,
862
+ "generate-dispatch-prompt": cmd_generate_dispatch_prompt,
837
863
  "parent-status": cmd_parent_status,
838
864
  "review-child": cmd_review_child,
839
865
  "list": cmd_list,
@@ -580,38 +580,21 @@ Use retrieval layers before and during implementation when context is incomplete
580
580
  - Record exploratory chains in `{TASK_DIR}/research/` and final source/Git/test proof in `verify.md`.
581
581
 
582
582
 
583
- Spawn the implement sub-agent:
583
+ Spawn the implement sub-agent (Full / Parent — Cursor):
584
584
 
585
585
  - **Agent type**: `trellis-implement`
586
- - **Task description**: Implement the reviewed task artifacts, consulting materials under `{TASK_DIR}/research/`; finish by running project lint and type-check
586
+ - **Orchestrator contract**: After `start-execution --approved`, the main session assembles the full dispatch prompt via Trellis scripts (CLI Layer 2), then calls `Task(subagent_type=trellis-implement, prompt=<assembled>)`. Do **not** rely on the preToolUse hook alone for context on Cursor — see `cursor-context-injection-guide.md`.
587
587
  - **Dispatch prompt guard**: Tell the spawned agent it is already the `trellis-implement` sub-agent and must implement directly, not spawn another `trellis-implement` / `trellis-check`.
588
588
 
589
- The platform hook/plugin auto-handles:
590
- - Reads `implement.jsonl` and injects referenced spec/research files into the agent prompt
591
- - Injects `prd.md`, `design.md` if present, and `implement.md` if present
592
-
593
-
594
-
595
-
596
- Spawn the implement sub-agent:
597
-
598
- - **Agent type**: `trellis-implement`
599
- - **Task description**: Implement the reviewed task artifacts, consulting materials under `{TASK_DIR}/research/`; finish by running project lint and type-check
600
- - **Dispatch prompt guard**: Tell the spawned agent it is already the `trellis-implement` sub-agent and must implement directly, not spawn another `trellis-implement` / `trellis-check`.
601
-
602
- The platform prelude auto-handles the context load requirement:
603
- - Reads `implement.jsonl` and injects referenced spec/research files into the agent prompt
604
- - Injects `prd.md`, `design.md` if present, and `implement.md` if present
605
-
606
-
589
+ Context embedded in the dispatch prompt includes `implement.jsonl` references, `prd.md`, `design.md` if present, and `implement.md` if present.
607
590
 
608
591
  #### 2.2 Quality check `[required · repeatable]`
609
592
 
610
593
 
611
- Spawn the check sub-agent:
594
+ Spawn the check sub-agent (Full / Parent — Cursor):
612
595
 
613
596
  - **Agent type**: `trellis-check`
614
- - **Task description**: Review all code changes against specs and task artifacts; fix implementation defects only inside the approved contract; route contract-changing findings instead of silently expanding scope; ensure lint and type-check pass
597
+ - **Orchestrator contract**: Assemble the full dispatch prompt via Trellis scripts (CLI Layer 2) before `Task(subagent_type=trellis-check, prompt=<assembled>)`. Hook-only injection is best-effort on Cursor.
615
598
  - **Dispatch prompt guard**: Tell the spawned agent it is already the `trellis-check` sub-agent and must review/fix only inside the approved contract, not spawn another `trellis-check` / `trellis-implement`.
616
599
 
617
600
  The check agent's job:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blxzer/cursor-trellis",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
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",
@@ -35,7 +35,7 @@
35
35
  "inquirer": "^9.3.7",
36
36
  "undici": "^6.21.0",
37
37
  "zod": "^4.4.2",
38
- "@blxzer/cursor-trellis-core": "0.1.1"
38
+ "@blxzer/cursor-trellis-core": "0.1.2"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@eslint/js": "^9.18.0",