@mindfoldhq/trellis 0.5.0-beta.9 → 0.5.0-rc.0
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 +60 -95
- package/dist/cli/index.js +7 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +117 -117
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +289 -33
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/antigravity.d.ts.map +1 -1
- package/dist/configurators/antigravity.js +2 -8
- package/dist/configurators/antigravity.js.map +1 -1
- package/dist/configurators/claude.d.ts.map +1 -1
- package/dist/configurators/claude.js +4 -10
- package/dist/configurators/claude.js.map +1 -1
- package/dist/configurators/codebuddy.d.ts.map +1 -1
- package/dist/configurators/codebuddy.js +3 -3
- package/dist/configurators/codebuddy.js.map +1 -1
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +5 -13
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/copilot.d.ts.map +1 -1
- package/dist/configurators/copilot.js +5 -19
- package/dist/configurators/copilot.js.map +1 -1
- package/dist/configurators/cursor.d.ts.map +1 -1
- package/dist/configurators/cursor.js +3 -3
- package/dist/configurators/cursor.js.map +1 -1
- package/dist/configurators/droid.d.ts.map +1 -1
- package/dist/configurators/droid.js +3 -3
- package/dist/configurators/droid.js.map +1 -1
- package/dist/configurators/gemini.d.ts.map +1 -1
- package/dist/configurators/gemini.js +3 -5
- package/dist/configurators/gemini.js.map +1 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +37 -49
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/kilo.d.ts.map +1 -1
- package/dist/configurators/kilo.js +2 -8
- package/dist/configurators/kilo.js.map +1 -1
- package/dist/configurators/kiro.d.ts.map +1 -1
- package/dist/configurators/kiro.js +3 -3
- package/dist/configurators/kiro.js.map +1 -1
- package/dist/configurators/opencode.d.ts.map +1 -1
- package/dist/configurators/opencode.js +7 -4
- package/dist/configurators/opencode.js.map +1 -1
- package/dist/configurators/pi.d.ts +3 -0
- package/dist/configurators/pi.d.ts.map +1 -0
- package/dist/configurators/pi.js +44 -0
- package/dist/configurators/pi.js.map +1 -0
- package/dist/configurators/qoder.d.ts.map +1 -1
- package/dist/configurators/qoder.js +3 -5
- package/dist/configurators/qoder.js.map +1 -1
- package/dist/configurators/shared.d.ts +28 -6
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +47 -15
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/windsurf.d.ts.map +1 -1
- package/dist/configurators/windsurf.js +2 -8
- package/dist/configurators/windsurf.js.map +1 -1
- package/dist/constants/paths.d.ts +2 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +2 -0
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.5.0-beta.0.json +2 -0
- 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/migrations/manifests/0.5.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.15.json +116 -0
- package/dist/migrations/manifests/0.5.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.17.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.18.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.19.json +9 -0
- package/dist/migrations/manifests/0.5.0-beta.5.json +2 -0
- package/dist/migrations/manifests/0.5.0-rc.0.json +9 -0
- package/dist/templates/claude/agents/trellis-research.md +1 -1
- package/dist/templates/claude/settings.json +0 -4
- package/dist/templates/codebuddy/agents/trellis-research.md +1 -1
- package/dist/templates/codex/agents/trellis-research.toml +3 -2
- package/dist/templates/codex/hooks/session-start.py +126 -26
- package/dist/templates/codex/skills/finish-work/SKILL.md +41 -109
- package/dist/templates/codex/skills/start/SKILL.md +12 -9
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +73 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/add-project-local-conventions.md +83 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +54 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +81 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-hooks.md +57 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +78 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +83 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +90 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +64 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +55 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/context-injection.md +68 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +80 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md +51 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +102 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +101 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +75 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workspace-memory.md +71 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +79 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +69 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +59 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +74 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +83 -0
- package/dist/templates/common/commands/continue.md +9 -5
- package/dist/templates/common/commands/finish-work.md +34 -10
- package/dist/templates/common/index.d.ts +22 -2
- package/dist/templates/common/index.d.ts.map +1 -1
- package/dist/templates/common/index.js +53 -4
- package/dist/templates/common/index.js.map +1 -1
- package/dist/templates/common/skills/brainstorm.md +3 -0
- package/dist/templates/copilot/hooks/session-start.py +127 -30
- package/dist/templates/copilot/prompts/finish-work.prompt.md +44 -112
- package/dist/templates/copilot/prompts/start.prompt.md +12 -9
- package/dist/templates/cursor/agents/trellis-check.md +1 -1
- package/dist/templates/cursor/agents/trellis-implement.md +1 -1
- package/dist/templates/cursor/agents/trellis-research.md +2 -2
- package/dist/templates/cursor/hooks.json +7 -1
- package/dist/templates/droid/droids/trellis-research.md +1 -1
- package/dist/templates/extract.d.ts +6 -0
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +14 -0
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/gemini/agents/trellis-research.md +1 -1
- package/dist/templates/kiro/agents/trellis-research.json +1 -1
- package/dist/templates/markdown/agents.md +19 -12
- package/dist/templates/markdown/gitignore.txt +3 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +24 -0
- package/dist/templates/opencode/agents/trellis-check.md +1 -1
- package/dist/templates/opencode/agents/trellis-implement.md +7 -4
- package/dist/templates/opencode/agents/trellis-research.md +2 -2
- package/dist/templates/opencode/lib/trellis-context.js +100 -13
- package/dist/templates/opencode/plugins/inject-subagent-context.js +70 -5
- package/dist/templates/opencode/plugins/inject-workflow-state.js +38 -58
- package/dist/templates/opencode/plugins/session-start.js +76 -31
- package/dist/templates/pi/agents/trellis-check.md +28 -0
- package/dist/templates/pi/agents/trellis-implement.md +33 -0
- package/dist/templates/pi/agents/trellis-research.md +25 -0
- package/dist/templates/pi/extensions/trellis/index.ts.txt +997 -0
- package/dist/templates/pi/index.d.ts +5 -0
- package/dist/templates/pi/index.d.ts.map +1 -0
- package/dist/templates/pi/index.js +12 -0
- package/dist/templates/pi/index.js.map +1 -0
- package/dist/templates/pi/settings.json +12 -0
- package/dist/templates/qoder/agents/trellis-research.md +1 -1
- package/dist/templates/shared-hooks/index.d.ts +31 -0
- package/dist/templates/shared-hooks/index.d.ts.map +1 -1
- package/dist/templates/shared-hooks/index.js +59 -0
- package/dist/templates/shared-hooks/index.js.map +1 -1
- package/dist/templates/shared-hooks/inject-shell-session-context.py +180 -0
- package/dist/templates/shared-hooks/inject-subagent-context.py +156 -27
- package/dist/templates/shared-hooks/inject-workflow-state.py +85 -105
- package/dist/templates/shared-hooks/session-start.py +222 -36
- package/dist/templates/trellis/gitignore.txt +3 -0
- 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/__init__.py +8 -0
- package/dist/templates/trellis/scripts/common/active_task.py +593 -0
- package/dist/templates/trellis/scripts/common/cli_adapter.py +72 -14
- package/dist/templates/trellis/scripts/common/paths.py +61 -58
- package/dist/templates/trellis/scripts/common/session_context.py +12 -0
- package/dist/templates/trellis/scripts/common/task_context.py +27 -194
- package/dist/templates/trellis/scripts/common/task_store.py +102 -26
- package/dist/templates/trellis/scripts/common/tasks.py +4 -1
- package/dist/templates/trellis/scripts/common/workflow_phase.py +15 -3
- package/dist/templates/trellis/scripts/task.py +99 -34
- package/dist/templates/trellis/workflow.md +332 -69
- package/dist/types/ai-tools.d.ts +12 -3
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +29 -0
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/file-writer.d.ts.map +1 -1
- package/dist/utils/file-writer.js +7 -2
- package/dist/utils/file-writer.js.map +1 -1
- package/dist/utils/posix.d.ts +13 -0
- package/dist/utils/posix.d.ts.map +1 -0
- package/dist/utils/posix.js +15 -0
- package/dist/utils/posix.js.map +1 -0
- package/dist/utils/template-fetcher.d.ts +22 -6
- package/dist/utils/template-fetcher.d.ts.map +1 -1
- package/dist/utils/template-fetcher.js +405 -27
- package/dist/utils/template-fetcher.js.map +1 -1
- package/dist/utils/template-hash.d.ts +22 -3
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +99 -19
- package/dist/utils/template-hash.js.map +1 -1
- package/package.json +7 -7
- package/dist/templates/shared-hooks/statusline.py +0 -218
|
@@ -5,16 +5,16 @@ 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
|
|
12
|
-
python3 task.py start <dir> # Set
|
|
13
|
-
python3 task.py
|
|
11
|
+
python3 task.py start <dir> # Set active task
|
|
12
|
+
python3 task.py current [--source] # Show active task
|
|
13
|
+
python3 task.py finish # Clear active task
|
|
14
14
|
python3 task.py set-branch <dir> <branch> # Set git branch
|
|
15
15
|
python3 task.py set-base-branch <dir> <branch> # Set PR target branch
|
|
16
16
|
python3 task.py set-scope <dir> <scope> # Set scope for PR title
|
|
17
|
-
python3 task.py archive <task-
|
|
17
|
+
python3 task.py archive <task-dir> # Archive completed task
|
|
18
18
|
python3 task.py list # List active tasks
|
|
19
19
|
python3 task.py list-archive [month] # List archived tasks
|
|
20
20
|
python3 task.py add-subtask <parent-dir> <child-dir> # Link child to parent
|
|
@@ -25,7 +25,6 @@ from __future__ import annotations
|
|
|
25
25
|
|
|
26
26
|
import argparse
|
|
27
27
|
import sys
|
|
28
|
-
from pathlib import Path
|
|
29
28
|
|
|
30
29
|
from common.log import Colors, colored
|
|
31
30
|
from common.paths import (
|
|
@@ -36,9 +35,14 @@ from common.paths import (
|
|
|
36
35
|
get_developer,
|
|
37
36
|
get_tasks_dir,
|
|
38
37
|
get_current_task,
|
|
39
|
-
set_current_task,
|
|
40
|
-
clear_current_task,
|
|
41
38
|
)
|
|
39
|
+
from common.active_task import (
|
|
40
|
+
clear_active_task,
|
|
41
|
+
resolve_active_task,
|
|
42
|
+
resolve_context_key,
|
|
43
|
+
set_active_task,
|
|
44
|
+
)
|
|
45
|
+
from common.io import read_json, write_json
|
|
42
46
|
from common.task_utils import resolve_task_dir, run_task_hooks
|
|
43
47
|
from common.tasks import iter_active_tasks, children_progress
|
|
44
48
|
|
|
@@ -53,7 +57,6 @@ from common.task_store import (
|
|
|
53
57
|
cmd_remove_subtask,
|
|
54
58
|
)
|
|
55
59
|
from common.task_context import (
|
|
56
|
-
cmd_init_context,
|
|
57
60
|
cmd_add_context,
|
|
58
61
|
cmd_validate,
|
|
59
62
|
cmd_list_context,
|
|
@@ -65,7 +68,7 @@ from common.task_context import (
|
|
|
65
68
|
# =============================================================================
|
|
66
69
|
|
|
67
70
|
def cmd_start(args: argparse.Namespace) -> int:
|
|
68
|
-
"""Set
|
|
71
|
+
"""Set active task."""
|
|
69
72
|
repo_root = get_repo_root()
|
|
70
73
|
task_input = args.dir
|
|
71
74
|
|
|
@@ -87,12 +90,30 @@ def cmd_start(args: argparse.Namespace) -> int:
|
|
|
87
90
|
except ValueError:
|
|
88
91
|
task_dir = str(full_path)
|
|
89
92
|
|
|
90
|
-
if
|
|
93
|
+
if not resolve_context_key():
|
|
94
|
+
print(colored("Error: Cannot set active task without a session identity.", Colors.RED))
|
|
95
|
+
print(
|
|
96
|
+
"Hint: run inside an AI IDE/session that exposes session identity, "
|
|
97
|
+
"or set TRELLIS_CONTEXT_ID before running task.py start."
|
|
98
|
+
)
|
|
99
|
+
return 1
|
|
100
|
+
|
|
101
|
+
active = set_active_task(task_dir, repo_root)
|
|
102
|
+
if active:
|
|
91
103
|
print(colored(f"✓ Current task set to: {task_dir}", Colors.GREEN))
|
|
104
|
+
print(f"Source: {active.source}")
|
|
105
|
+
|
|
106
|
+
task_json_path = full_path / FILE_TASK_JSON
|
|
107
|
+
if task_json_path.is_file():
|
|
108
|
+
data = read_json(task_json_path)
|
|
109
|
+
if data and data.get("status") == "planning":
|
|
110
|
+
data["status"] = "in_progress"
|
|
111
|
+
if write_json(task_json_path, data):
|
|
112
|
+
print(colored("✓ Status: planning → in_progress", Colors.GREEN))
|
|
113
|
+
|
|
92
114
|
print()
|
|
93
115
|
print(colored("The hook will now inject context from this task's jsonl files.", Colors.BLUE))
|
|
94
116
|
|
|
95
|
-
task_json_path = full_path / FILE_TASK_JSON
|
|
96
117
|
run_task_hooks("after_start", task_json_path, repo_root)
|
|
97
118
|
return 0
|
|
98
119
|
else:
|
|
@@ -101,9 +122,10 @@ def cmd_start(args: argparse.Namespace) -> int:
|
|
|
101
122
|
|
|
102
123
|
|
|
103
124
|
def cmd_finish(args: argparse.Namespace) -> int:
|
|
104
|
-
"""Clear
|
|
125
|
+
"""Clear active task."""
|
|
105
126
|
repo_root = get_repo_root()
|
|
106
|
-
|
|
127
|
+
active = clear_active_task(repo_root)
|
|
128
|
+
current = active.task_path
|
|
107
129
|
|
|
108
130
|
if not current:
|
|
109
131
|
print(colored("No current task set", Colors.YELLOW))
|
|
@@ -112,14 +134,33 @@ def cmd_finish(args: argparse.Namespace) -> int:
|
|
|
112
134
|
# Resolve task.json path before clearing
|
|
113
135
|
task_json_path = repo_root / current / FILE_TASK_JSON
|
|
114
136
|
|
|
115
|
-
clear_current_task(repo_root)
|
|
116
137
|
print(colored(f"✓ Cleared current task (was: {current})", Colors.GREEN))
|
|
138
|
+
print(f"Source: {active.source}")
|
|
117
139
|
|
|
118
140
|
if task_json_path.is_file():
|
|
119
141
|
run_task_hooks("after_finish", task_json_path, repo_root)
|
|
120
142
|
return 0
|
|
121
143
|
|
|
122
144
|
|
|
145
|
+
def cmd_current(args: argparse.Namespace) -> int:
|
|
146
|
+
"""Show active task."""
|
|
147
|
+
repo_root = get_repo_root()
|
|
148
|
+
active = resolve_active_task(repo_root)
|
|
149
|
+
|
|
150
|
+
if args.source:
|
|
151
|
+
print(f"Current task: {active.task_path or '(none)'}")
|
|
152
|
+
print(f"Source: {active.source}")
|
|
153
|
+
if active.stale:
|
|
154
|
+
print("State: stale")
|
|
155
|
+
return 0 if active.task_path else 1
|
|
156
|
+
|
|
157
|
+
if active.task_path:
|
|
158
|
+
print(active.task_path)
|
|
159
|
+
return 0
|
|
160
|
+
|
|
161
|
+
return 1
|
|
162
|
+
|
|
163
|
+
|
|
123
164
|
# =============================================================================
|
|
124
165
|
# Command: list
|
|
125
166
|
# =============================================================================
|
|
@@ -247,25 +288,21 @@ Usage:
|
|
|
247
288
|
python3 task.py create <title> Create new task directory
|
|
248
289
|
python3 task.py create <title> --package <pkg> Create task for a specific package
|
|
249
290
|
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
291
|
python3 task.py add-context <dir> <jsonl> <path> [reason] Add entry to jsonl
|
|
253
292
|
python3 task.py validate <dir> Validate jsonl files
|
|
254
293
|
python3 task.py list-context <dir> List jsonl entries
|
|
255
|
-
python3 task.py start <dir> Set
|
|
256
|
-
python3 task.py
|
|
294
|
+
python3 task.py start <dir> Set active task
|
|
295
|
+
python3 task.py current [--source] Show active task
|
|
296
|
+
python3 task.py finish Clear active task
|
|
257
297
|
python3 task.py set-branch <dir> <branch> Set git branch
|
|
258
298
|
python3 task.py set-base-branch <dir> <branch> Set PR target branch
|
|
259
299
|
python3 task.py set-scope <dir> <scope> Set scope for PR title
|
|
260
|
-
python3 task.py archive <task-
|
|
300
|
+
python3 task.py archive <task-dir> Archive completed task
|
|
261
301
|
python3 task.py add-subtask <parent> <child> Link child task to parent
|
|
262
302
|
python3 task.py remove-subtask <parent> <child> Unlink child from parent
|
|
263
303
|
python3 task.py list [--mine] [--status <status>] List tasks
|
|
264
304
|
python3 task.py list-archive [YYYY-MM] List archived tasks
|
|
265
305
|
|
|
266
|
-
Arguments:
|
|
267
|
-
dev_type: backend | frontend | fullstack | test | docs
|
|
268
|
-
|
|
269
306
|
Monorepo options:
|
|
270
307
|
--package <pkg> Package name (validated against config.yaml packages)
|
|
271
308
|
|
|
@@ -277,11 +314,10 @@ Examples:
|
|
|
277
314
|
python3 task.py create "Add login feature" --slug add-login
|
|
278
315
|
python3 task.py create "Add login feature" --slug add-login --package cli
|
|
279
316
|
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
317
|
python3 task.py add-context <dir> implement .trellis/spec/cli/backend/auth.md "Auth guidelines"
|
|
283
318
|
python3 task.py set-branch <dir> task/add-login
|
|
284
319
|
python3 task.py start .trellis/tasks/01-21-add-login
|
|
320
|
+
python3 task.py current --source
|
|
285
321
|
python3 task.py finish
|
|
286
322
|
python3 task.py archive add-login
|
|
287
323
|
python3 task.py add-subtask parent-task child-task # Link existing tasks
|
|
@@ -298,6 +334,36 @@ Examples:
|
|
|
298
334
|
|
|
299
335
|
def main() -> int:
|
|
300
336
|
"""CLI entry point."""
|
|
337
|
+
# Deprecation guard: `init-context` was removed in v0.5.0-beta.12.
|
|
338
|
+
# Detect early so argparse doesn't mask the real reason with a generic
|
|
339
|
+
# "invalid choice" error.
|
|
340
|
+
if len(sys.argv) >= 2 and sys.argv[1] == "init-context":
|
|
341
|
+
print(
|
|
342
|
+
colored(
|
|
343
|
+
"Error: `task.py init-context` was removed in v0.5.0-beta.12.",
|
|
344
|
+
Colors.RED,
|
|
345
|
+
),
|
|
346
|
+
file=sys.stderr,
|
|
347
|
+
)
|
|
348
|
+
print(
|
|
349
|
+
"implement.jsonl / check.jsonl are now seeded on `task.py create` for",
|
|
350
|
+
file=sys.stderr,
|
|
351
|
+
)
|
|
352
|
+
print(
|
|
353
|
+
"sub-agent-capable platforms and curated by the AI during Phase 1.3.",
|
|
354
|
+
file=sys.stderr,
|
|
355
|
+
)
|
|
356
|
+
print("See .trellis/workflow.md Phase 1.3 or run:", file=sys.stderr)
|
|
357
|
+
print(
|
|
358
|
+
" python3 ./.trellis/scripts/get_context.py --mode phase --step 1.3",
|
|
359
|
+
file=sys.stderr,
|
|
360
|
+
)
|
|
361
|
+
print(
|
|
362
|
+
"Use `task.py add-context <dir> implement|check <path> <reason>` to append entries.",
|
|
363
|
+
file=sys.stderr,
|
|
364
|
+
)
|
|
365
|
+
return 2
|
|
366
|
+
|
|
301
367
|
parser = argparse.ArgumentParser(
|
|
302
368
|
description="Task Management Script",
|
|
303
369
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
@@ -314,12 +380,6 @@ def main() -> int:
|
|
|
314
380
|
p_create.add_argument("--parent", help="Parent task directory (establishes subtask link)")
|
|
315
381
|
p_create.add_argument("--package", help="Package name for monorepo projects")
|
|
316
382
|
|
|
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
|
-
|
|
323
383
|
# add-context
|
|
324
384
|
p_add = subparsers.add_parser("add-context", help="Add context entry")
|
|
325
385
|
p_add.add_argument("dir", help="Task directory")
|
|
@@ -336,11 +396,16 @@ def main() -> int:
|
|
|
336
396
|
p_listctx.add_argument("dir", help="Task directory")
|
|
337
397
|
|
|
338
398
|
# start
|
|
339
|
-
p_start = subparsers.add_parser("start", help="Set
|
|
399
|
+
p_start = subparsers.add_parser("start", help="Set active task")
|
|
340
400
|
p_start.add_argument("dir", help="Task directory")
|
|
341
401
|
|
|
402
|
+
# current
|
|
403
|
+
p_current = subparsers.add_parser("current", help="Show active task")
|
|
404
|
+
p_current.add_argument("--source", action="store_true",
|
|
405
|
+
help="Show active task source")
|
|
406
|
+
|
|
342
407
|
# finish
|
|
343
|
-
subparsers.add_parser("finish", help="Clear
|
|
408
|
+
subparsers.add_parser("finish", help="Clear active task")
|
|
344
409
|
|
|
345
410
|
# set-branch
|
|
346
411
|
p_branch = subparsers.add_parser("set-branch", help="Set git branch")
|
|
@@ -359,7 +424,7 @@ def main() -> int:
|
|
|
359
424
|
|
|
360
425
|
# archive
|
|
361
426
|
p_archive = subparsers.add_parser("archive", help="Archive task")
|
|
362
|
-
p_archive.add_argument("name", help="Task name")
|
|
427
|
+
p_archive.add_argument("name", help="Task directory or name")
|
|
363
428
|
p_archive.add_argument("--no-commit", action="store_true", help="Skip auto git commit after archive")
|
|
364
429
|
|
|
365
430
|
# list
|
|
@@ -389,11 +454,11 @@ def main() -> int:
|
|
|
389
454
|
|
|
390
455
|
commands = {
|
|
391
456
|
"create": cmd_create,
|
|
392
|
-
"init-context": cmd_init_context,
|
|
393
457
|
"add-context": cmd_add_context,
|
|
394
458
|
"validate": cmd_validate,
|
|
395
459
|
"list-context": cmd_list_context,
|
|
396
460
|
"start": cmd_start,
|
|
461
|
+
"current": cmd_current,
|
|
397
462
|
"finish": cmd_finish,
|
|
398
463
|
"set-branch": cmd_set_branch,
|
|
399
464
|
"set-base-branch": cmd_set_base_branch,
|