@mindfoldhq/trellis 0.5.0-beta.10 → 0.5.0-beta.12
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 +4 -1
- package/dist/cli/index.js +6 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +68 -66
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +35 -12
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/shared.d.ts +5 -0
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +6 -3
- package/dist/configurators/shared.js.map +1 -1
- package/dist/migrations/manifests/0.5.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.12.json +9 -0
- package/dist/templates/codex/hooks/session-start.py +26 -3
- package/dist/templates/codex/skills/start/SKILL.md +11 -8
- package/dist/templates/common/commands/continue.md +1 -1
- package/dist/templates/copilot/hooks/session-start.py +26 -3
- package/dist/templates/copilot/prompts/start.prompt.md +11 -8
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +24 -0
- package/dist/templates/opencode/agents/trellis-implement.md +6 -3
- package/dist/templates/opencode/plugins/session-start.js +32 -12
- package/dist/templates/shared-hooks/inject-subagent-context.py +28 -1
- package/dist/templates/shared-hooks/session-start.py +42 -4
- package/dist/templates/trellis/scripts/common/task_context.py +27 -209
- package/dist/templates/trellis/scripts/common/task_store.py +76 -2
- package/dist/templates/trellis/scripts/task.py +31 -24
- package/dist/templates/trellis/workflow.md +100 -22
- package/dist/types/ai-tools.d.ts +2 -2
- package/package.json +7 -7
|
@@ -16,6 +16,7 @@ Provides:
|
|
|
16
16
|
from __future__ import annotations
|
|
17
17
|
|
|
18
18
|
import argparse
|
|
19
|
+
import json
|
|
19
20
|
import re
|
|
20
21
|
import sys
|
|
21
22
|
from datetime import datetime
|
|
@@ -78,6 +79,60 @@ def ensure_tasks_dir(repo_root: Path) -> Path:
|
|
|
78
79
|
return tasks_dir
|
|
79
80
|
|
|
80
81
|
|
|
82
|
+
# =============================================================================
|
|
83
|
+
# Sub-agent platform detection + JSONL seeding
|
|
84
|
+
# =============================================================================
|
|
85
|
+
|
|
86
|
+
# Config directories of platforms that consume implement.jsonl / check.jsonl.
|
|
87
|
+
# Keep in sync with src/types/ai-tools.ts AI_TOOLS entries — these are the
|
|
88
|
+
# platforms listed in workflow.md's "agent-capable" Skill Routing block
|
|
89
|
+
# (Class-1 hook-inject + Class-2 pull-based preludes). Kilo / Antigravity /
|
|
90
|
+
# Windsurf are NOT in this list: they do not consume JSONL.
|
|
91
|
+
_SUBAGENT_CONFIG_DIRS: tuple[str, ...] = (
|
|
92
|
+
".claude",
|
|
93
|
+
".cursor",
|
|
94
|
+
".codex",
|
|
95
|
+
".kiro",
|
|
96
|
+
".gemini",
|
|
97
|
+
".opencode",
|
|
98
|
+
".qoder",
|
|
99
|
+
".codebuddy",
|
|
100
|
+
".factory", # Factory Droid
|
|
101
|
+
".github/copilot",
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
_SEED_EXAMPLE = (
|
|
105
|
+
"Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. "
|
|
106
|
+
"Put spec/research files only — no code paths. "
|
|
107
|
+
"Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. "
|
|
108
|
+
"Delete this line once real entries are added."
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def _has_subagent_platform(repo_root: Path) -> bool:
|
|
113
|
+
"""Return True if any sub-agent-capable platform is configured.
|
|
114
|
+
|
|
115
|
+
Detected by probing well-known config directories at the repo root. Used
|
|
116
|
+
only to decide whether ``task.py create`` should seed empty
|
|
117
|
+
``implement.jsonl`` / ``check.jsonl`` files.
|
|
118
|
+
"""
|
|
119
|
+
for config_dir in _SUBAGENT_CONFIG_DIRS:
|
|
120
|
+
if (repo_root / config_dir).is_dir():
|
|
121
|
+
return True
|
|
122
|
+
return False
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def _write_seed_jsonl(path: Path) -> None:
|
|
126
|
+
"""Write a one-line seed JSONL file with a self-describing ``_example``.
|
|
127
|
+
|
|
128
|
+
The seed row has no ``file`` field, so downstream consumers (hooks +
|
|
129
|
+
preludes) that iterate entries via ``item.get("file")`` naturally skip
|
|
130
|
+
it. The row exists purely as an in-file prompt for the AI curator.
|
|
131
|
+
"""
|
|
132
|
+
seed = {"_example": _SEED_EXAMPLE}
|
|
133
|
+
path.write_text(json.dumps(seed, ensure_ascii=False) + "\n", encoding="utf-8")
|
|
134
|
+
|
|
135
|
+
|
|
81
136
|
# =============================================================================
|
|
82
137
|
# Command: create
|
|
83
138
|
# =============================================================================
|
|
@@ -173,6 +228,18 @@ def cmd_create(args: argparse.Namespace) -> int:
|
|
|
173
228
|
|
|
174
229
|
write_json(task_json_path, task_data)
|
|
175
230
|
|
|
231
|
+
# Seed implement.jsonl / check.jsonl for sub-agent-capable platforms.
|
|
232
|
+
# Agent curates real entries in Phase 1.3 (see .trellis/workflow.md).
|
|
233
|
+
# Agent-less platforms (Kilo / Antigravity / Windsurf) skip this — they
|
|
234
|
+
# load specs via the trellis-before-dev skill instead of JSONL.
|
|
235
|
+
seeded_jsonl = False
|
|
236
|
+
if _has_subagent_platform(repo_root):
|
|
237
|
+
for jsonl_name in ("implement.jsonl", "check.jsonl"):
|
|
238
|
+
jsonl_path = task_dir / jsonl_name
|
|
239
|
+
if not jsonl_path.exists():
|
|
240
|
+
_write_seed_jsonl(jsonl_path)
|
|
241
|
+
seeded_jsonl = True
|
|
242
|
+
|
|
176
243
|
# Handle --parent: establish bidirectional link
|
|
177
244
|
if args.parent:
|
|
178
245
|
parent_dir = resolve_task_dir(args.parent, repo_root)
|
|
@@ -199,8 +266,15 @@ def cmd_create(args: argparse.Namespace) -> int:
|
|
|
199
266
|
print("", file=sys.stderr)
|
|
200
267
|
print(colored("Next steps:", Colors.BLUE), file=sys.stderr)
|
|
201
268
|
print(" 1. Create prd.md with requirements", file=sys.stderr)
|
|
202
|
-
|
|
203
|
-
|
|
269
|
+
if seeded_jsonl:
|
|
270
|
+
print(
|
|
271
|
+
" 2. Curate implement.jsonl / check.jsonl (spec + research files only — "
|
|
272
|
+
"see .trellis/workflow.md Phase 1.3)",
|
|
273
|
+
file=sys.stderr,
|
|
274
|
+
)
|
|
275
|
+
print(" 3. Run: python3 task.py start <dir>", file=sys.stderr)
|
|
276
|
+
else:
|
|
277
|
+
print(" 2. Run: python3 task.py start <dir>", file=sys.stderr)
|
|
204
278
|
print("", file=sys.stderr)
|
|
205
279
|
|
|
206
280
|
# Output relative path for script chaining
|
|
@@ -5,7 +5,6 @@ Task Management Script.
|
|
|
5
5
|
|
|
6
6
|
Usage:
|
|
7
7
|
python3 task.py create "<title>" [--slug <name>] [--assignee <dev>] [--priority P0|P1|P2|P3] [--parent <dir>] [--package <pkg>]
|
|
8
|
-
python3 task.py init-context <dir> <type> [--package <pkg>] # Initialize jsonl files
|
|
9
8
|
python3 task.py add-context <dir> <file> <path> [reason] # Add jsonl entry
|
|
10
9
|
python3 task.py validate <dir> # Validate jsonl files
|
|
11
10
|
python3 task.py list-context <dir> # List jsonl entries
|
|
@@ -25,7 +24,6 @@ from __future__ import annotations
|
|
|
25
24
|
|
|
26
25
|
import argparse
|
|
27
26
|
import sys
|
|
28
|
-
from pathlib import Path
|
|
29
27
|
|
|
30
28
|
from common.log import Colors, colored
|
|
31
29
|
from common.paths import (
|
|
@@ -53,7 +51,6 @@ from common.task_store import (
|
|
|
53
51
|
cmd_remove_subtask,
|
|
54
52
|
)
|
|
55
53
|
from common.task_context import (
|
|
56
|
-
cmd_init_context,
|
|
57
54
|
cmd_add_context,
|
|
58
55
|
cmd_validate,
|
|
59
56
|
cmd_list_context,
|
|
@@ -102,6 +99,7 @@ def cmd_start(args: argparse.Namespace) -> int:
|
|
|
102
99
|
|
|
103
100
|
def cmd_finish(args: argparse.Namespace) -> int:
|
|
104
101
|
"""Clear current task."""
|
|
102
|
+
_ = args # signature required by argparse dispatcher
|
|
105
103
|
repo_root = get_repo_root()
|
|
106
104
|
current = get_current_task(repo_root)
|
|
107
105
|
|
|
@@ -247,8 +245,6 @@ Usage:
|
|
|
247
245
|
python3 task.py create <title> Create new task directory
|
|
248
246
|
python3 task.py create <title> --package <pkg> Create task for a specific package
|
|
249
247
|
python3 task.py create <title> --parent <dir> Create task as child of parent
|
|
250
|
-
python3 task.py init-context <dir> <dev_type> Initialize jsonl files
|
|
251
|
-
python3 task.py init-context <dir> <type> --package <pkg> With explicit package
|
|
252
248
|
python3 task.py add-context <dir> <jsonl> <path> [reason] Add entry to jsonl
|
|
253
249
|
python3 task.py validate <dir> Validate jsonl files
|
|
254
250
|
python3 task.py list-context <dir> List jsonl entries
|
|
@@ -263,9 +259,6 @@ Usage:
|
|
|
263
259
|
python3 task.py list [--mine] [--status <status>] List tasks
|
|
264
260
|
python3 task.py list-archive [YYYY-MM] List archived tasks
|
|
265
261
|
|
|
266
|
-
Arguments:
|
|
267
|
-
dev_type: backend | frontend | fullstack | test | docs
|
|
268
|
-
|
|
269
262
|
Monorepo options:
|
|
270
263
|
--package <pkg> Package name (validated against config.yaml packages)
|
|
271
264
|
|
|
@@ -277,8 +270,6 @@ Examples:
|
|
|
277
270
|
python3 task.py create "Add login feature" --slug add-login
|
|
278
271
|
python3 task.py create "Add login feature" --slug add-login --package cli
|
|
279
272
|
python3 task.py create "Child task" --slug child --parent .trellis/tasks/01-21-parent
|
|
280
|
-
python3 task.py init-context .trellis/tasks/01-21-add-login backend
|
|
281
|
-
python3 task.py init-context .trellis/tasks/01-21-add-login backend --package cli
|
|
282
273
|
python3 task.py add-context <dir> implement .trellis/spec/cli/backend/auth.md "Auth guidelines"
|
|
283
274
|
python3 task.py set-branch <dir> task/add-login
|
|
284
275
|
python3 task.py start .trellis/tasks/01-21-add-login
|
|
@@ -298,6 +289,36 @@ Examples:
|
|
|
298
289
|
|
|
299
290
|
def main() -> int:
|
|
300
291
|
"""CLI entry point."""
|
|
292
|
+
# Deprecation guard: `init-context` was removed in v0.5.0-beta.12.
|
|
293
|
+
# Detect early so argparse doesn't mask the real reason with a generic
|
|
294
|
+
# "invalid choice" error.
|
|
295
|
+
if len(sys.argv) >= 2 and sys.argv[1] == "init-context":
|
|
296
|
+
print(
|
|
297
|
+
colored(
|
|
298
|
+
"Error: `task.py init-context` was removed in v0.5.0-beta.12.",
|
|
299
|
+
Colors.RED,
|
|
300
|
+
),
|
|
301
|
+
file=sys.stderr,
|
|
302
|
+
)
|
|
303
|
+
print(
|
|
304
|
+
"implement.jsonl / check.jsonl are now seeded on `task.py create` for",
|
|
305
|
+
file=sys.stderr,
|
|
306
|
+
)
|
|
307
|
+
print(
|
|
308
|
+
"sub-agent-capable platforms and curated by the AI during Phase 1.3.",
|
|
309
|
+
file=sys.stderr,
|
|
310
|
+
)
|
|
311
|
+
print("See .trellis/workflow.md Phase 1.3 or run:", file=sys.stderr)
|
|
312
|
+
print(
|
|
313
|
+
" python3 ./.trellis/scripts/get_context.py --mode phase --step 1.3",
|
|
314
|
+
file=sys.stderr,
|
|
315
|
+
)
|
|
316
|
+
print(
|
|
317
|
+
"Use `task.py add-context <dir> implement|check <path> <reason>` to append entries.",
|
|
318
|
+
file=sys.stderr,
|
|
319
|
+
)
|
|
320
|
+
return 2
|
|
321
|
+
|
|
301
322
|
parser = argparse.ArgumentParser(
|
|
302
323
|
description="Task Management Script",
|
|
303
324
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
@@ -314,19 +335,6 @@ def main() -> int:
|
|
|
314
335
|
p_create.add_argument("--parent", help="Parent task directory (establishes subtask link)")
|
|
315
336
|
p_create.add_argument("--package", help="Package name for monorepo projects")
|
|
316
337
|
|
|
317
|
-
# init-context
|
|
318
|
-
p_init = subparsers.add_parser("init-context", help="Initialize context files")
|
|
319
|
-
p_init.add_argument("dir", help="Task directory")
|
|
320
|
-
p_init.add_argument("type", help="Dev type: backend|frontend|fullstack|test|docs")
|
|
321
|
-
p_init.add_argument("--package", help="Package name for monorepo projects")
|
|
322
|
-
p_init.add_argument(
|
|
323
|
-
"--platform",
|
|
324
|
-
help="Explicit platform (claude|codex|kiro|cursor|...). "
|
|
325
|
-
"Overrides auto-detection. Skills/commands pass this via "
|
|
326
|
-
"{{CLI_FLAG}} substitution so jsonl paths match the invoking "
|
|
327
|
-
"platform instead of filesystem guesswork.",
|
|
328
|
-
)
|
|
329
|
-
|
|
330
338
|
# add-context
|
|
331
339
|
p_add = subparsers.add_parser("add-context", help="Add context entry")
|
|
332
340
|
p_add.add_argument("dir", help="Task directory")
|
|
@@ -396,7 +404,6 @@ def main() -> int:
|
|
|
396
404
|
|
|
397
405
|
commands = {
|
|
398
406
|
"create": cmd_create,
|
|
399
|
-
"init-context": cmd_init_context,
|
|
400
407
|
"add-context": cmd_add_context,
|
|
401
408
|
"validate": cmd_validate,
|
|
402
409
|
"list-context": cmd_list_context,
|
|
@@ -50,8 +50,9 @@ python3 ./.trellis/scripts/task.py archive <name> # move to archive/{year
|
|
|
50
50
|
python3 ./.trellis/scripts/task.py list [--mine] [--status <s>]
|
|
51
51
|
python3 ./.trellis/scripts/task.py list-archive
|
|
52
52
|
|
|
53
|
-
# Code-spec context (injected into implement/check agents via JSONL)
|
|
54
|
-
|
|
53
|
+
# Code-spec context (injected into implement/check agents via JSONL).
|
|
54
|
+
# `implement.jsonl` / `check.jsonl` are seeded on `task create` for sub-agent-capable
|
|
55
|
+
# platforms; the AI curates real spec + research entries during Phase 1.3.
|
|
55
56
|
python3 ./.trellis/scripts/task.py add-context <name> <action> <file> <reason>
|
|
56
57
|
python3 ./.trellis/scripts/task.py list-context <name> [action]
|
|
57
58
|
python3 ./.trellis/scripts/task.py validate <name>
|
|
@@ -129,24 +130,57 @@ Phase 3: Finish → distill lessons + wrap-up
|
|
|
129
130
|
|
|
130
131
|
### Skill Routing
|
|
131
132
|
|
|
132
|
-
When a user request matches one of these intents, load the corresponding skill first — do not skip skills.
|
|
133
|
+
When a user request matches one of these intents, load the corresponding skill (or dispatch the corresponding sub-agent) first — do not skip skills.
|
|
134
|
+
|
|
135
|
+
[Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
136
|
+
|
|
137
|
+
| User intent | Route |
|
|
138
|
+
|---|---|
|
|
139
|
+
| Wants a new feature / requirement unclear | `trellis-brainstorm` |
|
|
140
|
+
| About to write code / start implementing | Dispatch the `trellis-implement` sub-agent per Phase 2.1 |
|
|
141
|
+
| Finished writing / want to verify | Dispatch the `trellis-check` sub-agent per Phase 2.2 |
|
|
142
|
+
| Stuck / fixed same bug several times | `trellis-break-loop` |
|
|
143
|
+
| Spec needs update | `trellis-update-spec` |
|
|
144
|
+
|
|
145
|
+
**Why `trellis-before-dev` is NOT in this table:** you are not the one writing code — the `trellis-implement` sub-agent is. Sub-agent platforms get spec context via `implement.jsonl` injection / prelude, not via the main thread loading `trellis-before-dev`.
|
|
146
|
+
|
|
147
|
+
[/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
148
|
+
|
|
149
|
+
[Kilo, Antigravity, Windsurf]
|
|
133
150
|
|
|
134
151
|
| User intent | Skill |
|
|
135
152
|
|---|---|
|
|
136
|
-
| Wants a new feature / requirement unclear | trellis-brainstorm |
|
|
137
|
-
| About to write code / start implementing | trellis-before-dev |
|
|
138
|
-
| Finished writing / want to verify | trellis-check |
|
|
139
|
-
| Stuck / fixed same bug several times | trellis-break-loop |
|
|
140
|
-
| Spec needs update | trellis-update-spec |
|
|
153
|
+
| Wants a new feature / requirement unclear | `trellis-brainstorm` |
|
|
154
|
+
| About to write code / start implementing | `trellis-before-dev` (then implement directly in the main session) |
|
|
155
|
+
| Finished writing / want to verify | `trellis-check` |
|
|
156
|
+
| Stuck / fixed same bug several times | `trellis-break-loop` |
|
|
157
|
+
| Spec needs update | `trellis-update-spec` |
|
|
158
|
+
|
|
159
|
+
[/Kilo, Antigravity, Windsurf]
|
|
141
160
|
|
|
142
161
|
### DO NOT skip skills
|
|
143
162
|
|
|
163
|
+
[Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
164
|
+
|
|
144
165
|
| What you're thinking | Why it's wrong |
|
|
145
166
|
|---|---|
|
|
146
|
-
| "This is simple, just code it" |
|
|
167
|
+
| "This is simple, I'll just code it in the main thread" | Dispatching `trellis-implement` is the cheap path; skipping it tempts you to write code in the main thread and lose spec context — sub-agents get `implement.jsonl` injected, you don't |
|
|
147
168
|
| "I already thought it through in plan mode" | Plan-mode output lives in memory — sub-agents can't see it; must be persisted to prd.md |
|
|
169
|
+
| "I already know the spec" | The spec may have been updated since you last read it; the sub-agent gets the fresh copy, you may not |
|
|
170
|
+
| "Code first, check later" | `trellis-check` surfaces issues you won't notice yourself; earlier is cheaper |
|
|
171
|
+
|
|
172
|
+
[/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
173
|
+
|
|
174
|
+
[Kilo, Antigravity, Windsurf]
|
|
175
|
+
|
|
176
|
+
| What you're thinking | Why it's wrong |
|
|
177
|
+
|---|---|
|
|
178
|
+
| "This is simple, just code it" | Simple tasks often grow complex; `trellis-before-dev` takes under a minute and loads the spec context you'll need |
|
|
179
|
+
| "I already thought it through in plan mode" | Plan-mode output lives in memory — must be persisted to prd.md before code |
|
|
148
180
|
| "I already know the spec" | The spec may have been updated since you last read it; read again |
|
|
149
|
-
| "Code first, check later" | `check` surfaces issues you won't notice yourself; earlier is cheaper |
|
|
181
|
+
| "Code first, check later" | `trellis-check` surfaces issues you won't notice yourself; earlier is cheaper |
|
|
182
|
+
|
|
183
|
+
[/Kilo, Antigravity, Windsurf]
|
|
150
184
|
|
|
151
185
|
### Loading Step Detail
|
|
152
186
|
|
|
@@ -219,26 +253,44 @@ Brainstorm and research can interleave freely — pause to research a technical
|
|
|
219
253
|
|
|
220
254
|
[Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
221
255
|
|
|
222
|
-
|
|
256
|
+
Curate `implement.jsonl` and `check.jsonl` so the Phase 2 sub-agents get the right spec context. These files were seeded on `task create` with a single self-describing `_example` line; your job here is to fill in real entries.
|
|
257
|
+
|
|
258
|
+
**Location**: `{TASK_DIR}/implement.jsonl` and `{TASK_DIR}/check.jsonl` (already exist).
|
|
259
|
+
|
|
260
|
+
**Format**: one JSON object per line — `{"file": "<path>", "reason": "<why>"}`. Paths are repo-root relative.
|
|
261
|
+
|
|
262
|
+
**What to put in**:
|
|
263
|
+
- **Spec files** — `.trellis/spec/<package>/<layer>/index.md` and any specific guideline files (`error-handling.md`, `conventions.md`, etc.) relevant to this task
|
|
264
|
+
- **Research files** — `{TASK_DIR}/research/*.md` that the sub-agent will need to consult
|
|
265
|
+
|
|
266
|
+
**What NOT to put in**:
|
|
267
|
+
- Code files (`src/**`, `packages/**/*.ts`, etc.) — those are read by the sub-agent during implementation, not pre-registered here
|
|
268
|
+
- Files you're about to modify — same reason
|
|
269
|
+
|
|
270
|
+
**Split between the two files**:
|
|
271
|
+
- `implement.jsonl` → specs + research the implement sub-agent needs to write code correctly
|
|
272
|
+
- `check.jsonl` → specs for the check sub-agent (quality guidelines, check conventions, same research if needed)
|
|
273
|
+
|
|
274
|
+
**How to discover relevant specs**:
|
|
223
275
|
|
|
224
276
|
```bash
|
|
225
|
-
python3 ./.trellis/scripts/
|
|
226
|
-
# type: backend | frontend | fullstack
|
|
227
|
-
# platform: claude | codex | cursor | kiro | gemini | opencode | qoder | codebuddy | copilot | droid
|
|
277
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
228
278
|
```
|
|
229
279
|
|
|
230
|
-
|
|
280
|
+
Lists every package + its spec layers with paths. Pick the entries that match this task's domain.
|
|
231
281
|
|
|
232
|
-
|
|
282
|
+
**How to append entries**:
|
|
233
283
|
|
|
234
|
-
|
|
284
|
+
Either edit the jsonl file directly in your editor, or use:
|
|
235
285
|
|
|
236
286
|
```bash
|
|
237
287
|
python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" implement "<path>" "<reason>"
|
|
238
288
|
python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" check "<path>" "<reason>"
|
|
239
289
|
```
|
|
240
290
|
|
|
241
|
-
|
|
291
|
+
Delete the seed `_example` line once real entries exist (optional — it's skipped automatically by consumers).
|
|
292
|
+
|
|
293
|
+
Skip when: `implement.jsonl` has agent-curated entries (the seed row alone doesn't count).
|
|
242
294
|
|
|
243
295
|
[/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
244
296
|
|
|
@@ -259,7 +311,7 @@ Skip this step. Context is loaded directly by the `trellis-before-dev` skill in
|
|
|
259
311
|
|
|
260
312
|
[Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
261
313
|
|
|
262
|
-
| `implement.jsonl`
|
|
314
|
+
| `implement.jsonl` has agent-curated entries (not just the seed row) | ✅ |
|
|
263
315
|
|
|
264
316
|
[/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
265
317
|
|
|
@@ -271,18 +323,44 @@ Goal: turn the prd into code that passes quality checks.
|
|
|
271
323
|
|
|
272
324
|
#### 2.1 Implement `[required · repeatable]`
|
|
273
325
|
|
|
274
|
-
[Claude Code, Cursor, OpenCode,
|
|
326
|
+
[Claude Code, Cursor, OpenCode, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
275
327
|
|
|
276
328
|
Spawn the implement sub-agent:
|
|
277
329
|
|
|
278
330
|
- **Agent type**: `trellis-implement`
|
|
279
331
|
- **Task description**: Implement the requirements per prd.md, consulting materials under `{TASK_DIR}/research/`; finish by running project lint and type-check
|
|
280
332
|
|
|
281
|
-
The platform hook auto-handles:
|
|
333
|
+
The platform hook/plugin auto-handles:
|
|
282
334
|
- Reads `implement.jsonl` and injects the referenced spec files into the agent prompt
|
|
283
335
|
- Injects prd.md content
|
|
284
336
|
|
|
285
|
-
[/Claude Code, Cursor, OpenCode,
|
|
337
|
+
[/Claude Code, Cursor, OpenCode, Gemini, Qoder, CodeBuddy, Copilot, Droid]
|
|
338
|
+
|
|
339
|
+
[Codex]
|
|
340
|
+
|
|
341
|
+
Spawn the implement sub-agent:
|
|
342
|
+
|
|
343
|
+
- **Agent type**: `trellis-implement`
|
|
344
|
+
- **Task description**: Implement the requirements per prd.md, consulting materials under `{TASK_DIR}/research/`; finish by running project lint and type-check
|
|
345
|
+
|
|
346
|
+
The Codex sub-agent definition auto-handles the context load requirement:
|
|
347
|
+
- Reads `.trellis/.current-task`, `prd.md`, and `info.md` if present
|
|
348
|
+
- Reads `implement.jsonl` and requires the agent to load each referenced spec file before coding
|
|
349
|
+
|
|
350
|
+
[/Codex]
|
|
351
|
+
|
|
352
|
+
[Kiro]
|
|
353
|
+
|
|
354
|
+
Spawn the implement sub-agent:
|
|
355
|
+
|
|
356
|
+
- **Agent type**: `trellis-implement`
|
|
357
|
+
- **Task description**: Implement the requirements per prd.md, consulting materials under `{TASK_DIR}/research/`; finish by running project lint and type-check
|
|
358
|
+
|
|
359
|
+
The platform prelude auto-handles the context load requirement:
|
|
360
|
+
- Reads `implement.jsonl` and injects the referenced spec files into the agent prompt
|
|
361
|
+
- Injects prd.md content
|
|
362
|
+
|
|
363
|
+
[/Kiro]
|
|
286
364
|
|
|
287
365
|
[Kilo, Antigravity, Windsurf]
|
|
288
366
|
|
package/dist/types/ai-tools.d.ts
CHANGED
|
@@ -34,8 +34,8 @@ export interface TemplateContext {
|
|
|
34
34
|
/**
|
|
35
35
|
* CLI flag value for this platform (e.g. "claude", "codex", "kiro").
|
|
36
36
|
* Substituted into template commands via {{CLI_FLAG}} so rendered skill /
|
|
37
|
-
* command files pass `--platform <flag>` to scripts
|
|
38
|
-
*
|
|
37
|
+
* command files can pass `--platform <flag>` to scripts that need to know
|
|
38
|
+
* the invoking platform, removing the need to re-detect at runtime.
|
|
39
39
|
* Duplicates the top-level `AIToolConfig.cliFlag` for convenience — the
|
|
40
40
|
* invariant is maintained in `AI_TOOLS` config blocks.
|
|
41
41
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindfoldhq/trellis",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.12",
|
|
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",
|
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
"typecheck": "tsc --noEmit",
|
|
77
77
|
"lint:py": "basedpyright",
|
|
78
78
|
"lint:all": "pnpm lint && pnpm lint:py",
|
|
79
|
-
"release": "pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version patch && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin main --tags",
|
|
80
|
-
"release:minor": "pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version minor && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin main --tags",
|
|
81
|
-
"release:major": "pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version major && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin main --tags",
|
|
82
|
-
"release:beta": "pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version prerelease --preid beta && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin HEAD --tags",
|
|
83
|
-
"release:rc": "pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version prerelease --preid rc && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin HEAD --tags",
|
|
84
|
-
"release:promote": "pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version \"$(node -p \"require('./package.json').version.replace(/-.*/, '')\")\" && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin main --tags",
|
|
79
|
+
"release": "node scripts/check-manifest-continuity.js && pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version patch && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin main --tags",
|
|
80
|
+
"release:minor": "node scripts/check-manifest-continuity.js && pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version minor && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin main --tags",
|
|
81
|
+
"release:major": "node scripts/check-manifest-continuity.js && pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version major && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin main --tags",
|
|
82
|
+
"release:beta": "node scripts/check-manifest-continuity.js && node scripts/check-docs-changelog.js --type beta && pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version prerelease --preid beta && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin HEAD --tags",
|
|
83
|
+
"release:rc": "node scripts/check-manifest-continuity.js && node scripts/check-docs-changelog.js --type rc && pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version prerelease --preid rc && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin HEAD --tags",
|
|
84
|
+
"release:promote": "node scripts/check-manifest-continuity.js && node scripts/check-docs-changelog.js --type promote && pnpm test && git add -A -- ':!docs-site' && (git diff-index --quiet HEAD || git commit -m 'chore: pre-release updates') && pnpm version --no-git-tag-version \"$(node -p \"require('./package.json').version.replace(/-.*/, '')\")\" && V=$(node -p \"require('./package.json').version\") && git add package.json && git commit -m \"$V\" && git tag \"v$V\" && git push origin main --tags",
|
|
85
85
|
"manifest": "node scripts/create-manifest.js"
|
|
86
86
|
}
|
|
87
87
|
}
|