@mindfoldhq/trellis 0.5.0-beta.8 → 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 +13 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +474 -210
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +295 -54
- 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 +44 -55
- 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 +7 -6
- package/dist/configurators/qoder.d.ts.map +1 -1
- package/dist/configurators/qoder.js +18 -12
- package/dist/configurators/qoder.js.map +1 -1
- package/dist/configurators/shared.d.ts +30 -6
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +65 -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-beta.9.json +48 -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 +50 -4
- 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 -44
- 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 -92
- package/dist/templates/shared-hooks/session-start.py +232 -36
- package/dist/templates/trellis/config.yaml +6 -0
- package/dist/templates/trellis/gitignore.txt +3 -0
- package/dist/templates/trellis/index.d.ts +1 -1
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +2 -2
- 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/types.py +0 -2
- 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 -64
- 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/project-detector.d.ts +2 -0
- package/dist/utils/project-detector.d.ts.map +1 -1
- package/dist/utils/project-detector.js +120 -11
- package/dist/utils/project-detector.js.map +1 -1
- package/dist/utils/task-json.d.ts +46 -0
- package/dist/utils/task-json.d.ts.map +1 -0
- package/dist/utils/task-json.js +49 -0
- package/dist/utils/task-json.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/markdown/spec/backend/directory-structure.md +0 -292
- package/dist/templates/markdown/spec/backend/index.md +0 -40
- package/dist/templates/markdown/spec/backend/script-conventions.md +0 -742
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md +0 -118
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md +0 -394
- package/dist/templates/shared-hooks/statusline.py +0 -218
- package/dist/templates/trellis/scripts/create_bootstrap.py +0 -298
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.15",
|
|
3
|
+
"description": "Task runtime and platform compatibility update. `task.py start/current/finish` now use `.trellis/.runtime/sessions/<context-key>.json`; `.trellis/.current-task` is no longer the active-task fallback. `workflow.md` and hook breadcrumbs now allow trivial turns and explicit current-turn overrides to skip Trellis task creation or sub-agent dispatch. Claude Code, Codex, Cursor, OpenCode, and Pi handle shell session identity for `task.py`: Codex uses native `CODEX_SESSION_ID` / `CODEX_THREAD_ID`, while the other hosts propagate `TRELLIS_CONTEXT_ID` through host-specific bridges. Cursor matches `Task|Subagent` and parses native custom-agent payloads. Pi resolves context keys from session manager, environment, transcript path, or process fallback. Template registry downloads support private Git-backed registries through local Git credentials. Claude Code statusLine is no longer installed by default for new projects, while existing Claude Code statusLine files and settings are preserved on update. The manifest also includes 10 hash-verified `safe-file-delete` entries for orphan shared hooks.",
|
|
4
|
+
"breaking": true,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Behavior Changes:**\n- feat(task): `task.py start/current/finish` read and write `.trellis/.runtime/sessions/<context-key>.json`. `.trellis/.current-task` is no longer used as the active-task fallback. `task.py start` exits with a clear error when no session identity is available. `task.py finish` deletes the resolved session file. `task.py archive` deletes session files that still point at the archived task before moving it.\n- feat(init): bootstrap and joiner onboarding tasks no longer write `.trellis/.current-task`; generated PRDs tell the AI to start the task from a session that provides Trellis session identity.\n- feat(workflow): `workflow.md` and hook fallback breadcrumbs now treat no-task trigger words as task-creation signals instead of mandatory creation. Task creation is not required for trivial turns when all three hold: zero file writes, one-reply answer, and no research beyond reading 1-2 repo files. Explicit current-turn phrases such as `skip trellis`, `no task`, `just do it`, `跳过 trellis`, `别走流程`, and `先别建任务` skip task creation for that turn.\n- feat(workflow): `in_progress` breadcrumbs keep `trellis-implement` / `trellis-check` as the default, but explicit current-turn requests such as `do it inline`, `main session 写就行`, and `不用 sub-agent` allow main-session implementation.\n\n**Platform Integration:**\n- feat(hooks): Claude Code writes `TRELLIS_CONTEXT_ID` through `CLAUDE_ENV_FILE`; Codex command environments are supported through `CODEX_SESSION_ID` / Codex Desktop `CODEX_THREAD_ID`; Cursor adds `beforeShellExecution` tickets under `.trellis/.runtime/cursor-shell/`; OpenCode prefixes Bash commands with `TRELLIS_CONTEXT_ID`; Pi injects the same value into Bash and nested `pi --mode json` runs.\n- docs(platforms): GitHub Copilot uses a platform-specific SessionStart hook; Gemini/Qoder/CodeBuddy/Droid/Kiro use shared hook input or platform env; Kilo/Antigravity/Windsurf have no hook integration; `.agents/skills` consumers rely on host-provided prelude/env. All groups share `.trellis/.runtime/sessions/`, while beta.15 adds shell-command handling for Claude Code, Codex, Cursor, OpenCode, and Pi.\n- feat(cursor): Cursor `hooks.json` matches `Task|Subagent`. `inject-subagent-context.py` parses native custom-agent payloads including `{ custom: { name } }` and `{ type: { case: \"custom\", value: { name } } }`.\n- feat(pi): Pi Agent resolves context keys from `TRELLIS_CONTEXT_ID`, `sessionManager.getSessionId()`, `PI_SESSION_ID` / `PI_SESSIONID`, transcript path, or process fallback, then reads active tasks from `.trellis/.runtime/sessions/`.\n- feat(workflow): `workflow-state` breadcrumbs use exact agent names (`trellis-implement`, `trellis-check`, `trellis-research`) and document explicit per-turn override phrases.\n\n**Bug Fixes:**\n- fix(registry): Template registry downloads support private Git-backed registries through local Git credentials. Self-hosted GitLab / GitHub Enterprise and SSH registry sources use Git to read `index.json` and copy template directories, and classify auth, missing-ref, missing-path, invalid-json, and network failures separately instead of falling through to direct-download mode.\n- fix(opencode): OpenCode recognizes `OPENCODE_RUN_ID` and strips the `trellis-` prefix before matching sub-agent names, preserving `implement.jsonl` / `check.jsonl` injection for renamed agents.\n- fix(claude): Claude Code statusLine is no longer installed by default for new projects. Existing `.claude/hooks/statusline.py` files are preserved on update, and an existing `.claude/settings.json` `statusLine` entry is carried forward instead of being forced out.\n- fix(cli): `writeSharedHooks` and `collectSharedHooks` use `SHARED_HOOKS_BY_PLATFORM`. The manifest removes 10 orphan shared-hook files through hash-verified `safe-file-delete` entries; locally modified files are preserved.\n\n**Docs:**\n- docs(beta): docs-site beta pages and `v0.5.0-beta.15` changelog document session-scoped task state, workflow policy relaxation, per-platform session identity behavior, Pi Agent, Cursor hook behavior, native Git worktrees, private Git-backed template registries, Claude Code statusLine defaults, existing statusLine preservation, and the current `continue` / `finish-work` command flow.",
|
|
7
|
+
"migrations": [
|
|
8
|
+
{
|
|
9
|
+
"type": "safe-file-delete",
|
|
10
|
+
"from": ".cursor/hooks/statusline.py",
|
|
11
|
+
"description": "Removed: Cursor has no statusLine event; shared-hooks/statusline.py was never invoked.",
|
|
12
|
+
"allowed_hashes": [
|
|
13
|
+
"87c01ee786ca9e1f25b591f0ed67564cd430586d57516d5b6fc57c34b6e7a3ec",
|
|
14
|
+
"c92c0020a0c60308437b66f024a244303e708519c97089cf654ceddc144f7435",
|
|
15
|
+
"b9b0a39a486643f2b78ecb3c757459182a6326ea070ba34a49887e23adc40bbb"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "safe-file-delete",
|
|
20
|
+
"from": ".codex/hooks/statusline.py",
|
|
21
|
+
"description": "Removed: Codex has no statusLine event; shared-hooks/statusline.py was never invoked.",
|
|
22
|
+
"allowed_hashes": [
|
|
23
|
+
"87c01ee786ca9e1f25b591f0ed67564cd430586d57516d5b6fc57c34b6e7a3ec",
|
|
24
|
+
"c92c0020a0c60308437b66f024a244303e708519c97089cf654ceddc144f7435",
|
|
25
|
+
"b9b0a39a486643f2b78ecb3c757459182a6326ea070ba34a49887e23adc40bbb"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "safe-file-delete",
|
|
30
|
+
"from": ".gemini/hooks/statusline.py",
|
|
31
|
+
"description": "Removed: Gemini CLI has no statusLine event; shared-hooks/statusline.py was never invoked.",
|
|
32
|
+
"allowed_hashes": [
|
|
33
|
+
"87c01ee786ca9e1f25b591f0ed67564cd430586d57516d5b6fc57c34b6e7a3ec",
|
|
34
|
+
"c92c0020a0c60308437b66f024a244303e708519c97089cf654ceddc144f7435",
|
|
35
|
+
"b9b0a39a486643f2b78ecb3c757459182a6326ea070ba34a49887e23adc40bbb"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "safe-file-delete",
|
|
40
|
+
"from": ".qoder/hooks/statusline.py",
|
|
41
|
+
"description": "Removed: Qoder has no statusLine event; shared-hooks/statusline.py was never invoked.",
|
|
42
|
+
"allowed_hashes": [
|
|
43
|
+
"87c01ee786ca9e1f25b591f0ed67564cd430586d57516d5b6fc57c34b6e7a3ec",
|
|
44
|
+
"c92c0020a0c60308437b66f024a244303e708519c97089cf654ceddc144f7435",
|
|
45
|
+
"b9b0a39a486643f2b78ecb3c757459182a6326ea070ba34a49887e23adc40bbb"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"type": "safe-file-delete",
|
|
50
|
+
"from": ".github/copilot/hooks/statusline.py",
|
|
51
|
+
"description": "Removed: GitHub Copilot has no statusLine event; shared-hooks/statusline.py was never invoked.",
|
|
52
|
+
"allowed_hashes": [
|
|
53
|
+
"87c01ee786ca9e1f25b591f0ed67564cd430586d57516d5b6fc57c34b6e7a3ec",
|
|
54
|
+
"c92c0020a0c60308437b66f024a244303e708519c97089cf654ceddc144f7435",
|
|
55
|
+
"b9b0a39a486643f2b78ecb3c757459182a6326ea070ba34a49887e23adc40bbb"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"type": "safe-file-delete",
|
|
60
|
+
"from": ".codebuddy/hooks/statusline.py",
|
|
61
|
+
"description": "Removed: CodeBuddy has no statusLine event; shared-hooks/statusline.py was never invoked.",
|
|
62
|
+
"allowed_hashes": [
|
|
63
|
+
"87c01ee786ca9e1f25b591f0ed67564cd430586d57516d5b6fc57c34b6e7a3ec",
|
|
64
|
+
"c92c0020a0c60308437b66f024a244303e708519c97089cf654ceddc144f7435",
|
|
65
|
+
"b9b0a39a486643f2b78ecb3c757459182a6326ea070ba34a49887e23adc40bbb"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"type": "safe-file-delete",
|
|
70
|
+
"from": ".factory/hooks/statusline.py",
|
|
71
|
+
"description": "Removed: Factory Droid has no statusLine event; shared-hooks/statusline.py was never invoked.",
|
|
72
|
+
"allowed_hashes": [
|
|
73
|
+
"87c01ee786ca9e1f25b591f0ed67564cd430586d57516d5b6fc57c34b6e7a3ec",
|
|
74
|
+
"c92c0020a0c60308437b66f024a244303e708519c97089cf654ceddc144f7435",
|
|
75
|
+
"b9b0a39a486643f2b78ecb3c757459182a6326ea070ba34a49887e23adc40bbb"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "safe-file-delete",
|
|
80
|
+
"from": ".kiro/hooks/statusline.py",
|
|
81
|
+
"description": "Removed: Kiro has no statusLine event; shared-hooks/statusline.py was never invoked.",
|
|
82
|
+
"allowed_hashes": [
|
|
83
|
+
"87c01ee786ca9e1f25b591f0ed67564cd430586d57516d5b6fc57c34b6e7a3ec",
|
|
84
|
+
"c92c0020a0c60308437b66f024a244303e708519c97089cf654ceddc144f7435",
|
|
85
|
+
"b9b0a39a486643f2b78ecb3c757459182a6326ea070ba34a49887e23adc40bbb"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"type": "safe-file-delete",
|
|
90
|
+
"from": ".kiro/hooks/session-start.py",
|
|
91
|
+
"description": "Removed: Kiro supports only `agentSpawn`; there is no SessionStart event to trigger this script.",
|
|
92
|
+
"allowed_hashes": [
|
|
93
|
+
"26b52ad72259316aa5adc8068d0df2a002273d5eda659ac3c71f3f5ecd9ebd08",
|
|
94
|
+
"ddd59c6fc5e6fa8c8535d6ac375ecaad60f15b87abc6dfc279007e610c636dd8",
|
|
95
|
+
"597409062bed8f9977750fa6262bb997facce7d8377d3482d4bcb2054e19c491",
|
|
96
|
+
"6cf36cffba3cf4a3caff99606d9fc9dde07fa4f74b7227aeb08d3de00ced7ca2",
|
|
97
|
+
"373f2f41c5506982cef1049f0203ca9e442c8074f54880aa021f037c0b9300b0",
|
|
98
|
+
"bc2026f6b1c195432e1126e1388d11fccec2df7a72010d0daa9fb6af76f683dd",
|
|
99
|
+
"cf355e44ace5e9b7c7d9a416462d4057a6cff9d5905b8db1839e6e4c892cfd13",
|
|
100
|
+
"a1b0db7c264da8e7abeb378a16ba8132b99b9918c9546627137d69427108f4b6",
|
|
101
|
+
"a0256292a2ade20728d71d2ea9a7ce866f6955efe034934eaecbf820244e9ad8"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "safe-file-delete",
|
|
106
|
+
"from": ".kiro/hooks/inject-workflow-state.py",
|
|
107
|
+
"description": "Removed: Kiro supports only `agentSpawn`; there is no UserPromptSubmit event to trigger this script.",
|
|
108
|
+
"allowed_hashes": [
|
|
109
|
+
"281939a51a62467a5dd73947fdec7143d0e936b4b64b5224ce0484186eb5b018",
|
|
110
|
+
"4231e4e0d52c9b05d66a215c870db30a876201a51350e5191953418ca4ec4637",
|
|
111
|
+
"50bd086d40654b9fe8cb902d2f321ce06e39b6d4020a6e9aa49154cc371bdb16"
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"notes": "Behavior change: `.trellis/.current-task` is preserved but ignored by active-task resolution. Existing task directories and jsonl files remain valid. `task.py start` now requires session identity from the host or `TRELLIS_CONTEXT_ID`. Run `trellis update` to refresh hooks and templates. The 10 shared-hook cleanup migrations are hash-verified; locally modified hook files are preserved with a warning. Claude Code statusLine is not installed by default for new projects, and existing Claude Code statusLine files/settings are preserved on update."
|
|
116
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.16",
|
|
3
|
+
"description": "Compatibility patch for template hash portability, task archive inputs, and Claude Code statusLine upgrades. Template hashes now use POSIX keys and LF-normalized content, `task.py archive` accepts the same task directory inputs as the other task commands, and existing Claude Code statusLine installs are preserved during `trellis update`. No migration actions are required.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- fix(cli): Normalize `.trellis/.template-hashes.json` keys to POSIX paths and compute template hashes from LF-normalized content. The hash file now uses a `{ \"__version\": 2, \"hashes\": { ... } }` envelope; legacy flat-format hash files are discarded and regenerated from installed templates.\n- fix(scripts): Align `task.py archive` with other task-directory subcommands. `archive` now accepts a bare task name, `.trellis/tasks/<slug>` relative path, or absolute task path.\n- fix(claude): Preserve existing Claude Code statusLine installs during update. `trellis update` no longer safe-deletes `.claude/hooks/statusline.py`, and if `.claude/settings.json` already has a top-level `statusLine` entry, the updated settings template carries that entry forward.\n\n**Behavior:**\n- New Trellis installs still do not create `.claude/hooks/statusline.py` and do not add `statusLine` to `.claude/settings.json`.\n- Non-Claude orphan `statusline.py` files remain hash-verified safe-delete cleanup targets because those platforms have no `statusLine` event.\n- No `--migrate` gate is required for this patch; the hash file is derived state and is regenerated by normal init/update hashing.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `trellis update` to receive the compatibility fixes. Legacy `.trellis/.template-hashes.json` files are regenerated under schema v2, `task.py archive` accepts task names or task paths, and existing Claude Code statusLine files/settings are preserved. No manual migration is required."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.17",
|
|
3
|
+
"description": "Beta.17 installs trellis-meta as a bundled built-in skill, hardens Pi subagent launch/configuration, removes promotional init completion output, and improves subagent context wiring. No migration actions are required.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Enhancements:**\n- feat(cli): Install `trellis-meta` as a bundled multi-file built-in skill under every platform skill root. The shared template pipeline now supports `packages/cli/src/templates/common/bundled-skills/<skill>/` through `getBundledSkillTemplates()`, `resolveBundledSkills()`, `collectSkillTemplates()`, and `writeSkills()`.\n- feat(pi): Harden the Trellis Pi `subagent` launcher. The generated extension resolves `@mariozechner/pi-coding-agent/dist/cli.js` when possible, runs child Pi with `--mode text -p --no-session`, sends delegated prompts through stdin, bounds stdout/stderr buffers, forwards `TRELLIS_CONTEXT_ID`, and wires `AbortSignal` cancellation.\n- feat(pi): Add Pi subagent model/thinking configuration. `.pi/agents/*.md` frontmatter may provide `model`, `thinking`, and `fallbackModels`, while the `subagent` tool accepts per-call `model` and `thinking` overrides and maps them to `--model <model[:thinking]>` or `--thinking <level>`.\n- docs(workflow): Clarify that `task.py create --slug <auto>` receives a slug without a date prefix because the script adds the `MM-DD-` directory prefix automatically.\n\n**Behavior Changes:**\n- chore(init): Remove promotional completion output from `trellis init`; completion output now stays focused on generated files and next actions.\n\n**Bug Fixes:**\n- fix(trellis): Improve subagent context wiring across local platform files. Cursor native custom-agent payloads are parsed from `Task`/`Subagent` tool input, workflow-state breadcrumbs require exact `trellis-implement` / `trellis-check` / `trellis-research` agent names, and Claude/Cursor/Codex hook paths preserve session identity for later shell or subagent context loading.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `trellis update` to receive the bundled `trellis-meta` skill, Pi subagent launcher/config updates, init output cleanup, and subagent context wiring fixes. No `--migrate` flag is required."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.18",
|
|
3
|
+
"description": "Beta.18 redesigns the Phase 3 workflow: Phase 3.4 adds an AI-driven batched commit step, and `/trellis:finish-work` becomes a 4-step survey + archive + journal flow that refuses to run on a dirty working tree. Also fixes parent-task progress regression on child archive, hash-tracks AGENTS.md during update, and supports OpenCode PowerShell context injection on Windows. No migration actions are required.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Enhancements:**\n- feat(workflow): Add `Phase 3.4 Commit changes` to `workflow.md`. The AI inspects `git status --porcelain`, learns commit-message style from `git log --oneline -5`, classifies dirty files into AI-edited-this-session vs unrecognized groups, drafts a batched commit plan, and commits per batch only after one-shot user confirmation. Rejecting the plan exits to manual mode without a flag. Wrap-up reminder renumbers from 3.4 to 3.5. The `[workflow-state:completed]` breadcrumb (and the four hook fallbacks in `inject-workflow-state.py`/`.js`) now direct users at `/trellis:finish-work` instead of the legacy `task.py finish` + `task.py archive` sequence.\n- feat(skills): Rewrite `/trellis:finish-work` as a 4-step survey + archive + journal flow. Step 1 runs `get_context.py --mode record` to print active tasks, git status, and recent commits — when other completed-but-unarchived tasks surface, the AI prompts once for one-shot batch cleanup. Step 2 runs `git status --porcelain` (excluding `.trellis/workspace/` and `.trellis/tasks/`) and bails out if anything else is dirty. Step 3 archives the active task plus any cleanup tasks the user confirmed in Step 1. Step 4 records the session journal using hashes from Step 1's recent-commits output. Code commits belong in Phase 3.4, not here. The common skill template uses `{{CMD_REF:finish-work}}` so `cmdRefPrefix` resolves correctly per platform (`/trellis:` for Claude/OpenCode, `$` for Codex, `/trellis-` for Cursor).\n\n**Bug Fixes:**\n- fix(scripts): Stop pruning archived children from a parent task's `children` list. `cmd_archive` previously removed the child name on archive, which made `children_progress` shrink both numerator and denominator (e.g. `[1/6 done]` → `[0/5 done]`, hiding completed work). The list now stays intact; `children_progress` treats children missing from active statuses as completed (cmd_archive sets `status=completed` before moving the dir).\n- fix(update): Hash-track `AGENTS.md` during `trellis update`. Pre-0.5.0-beta.18 projects wrote `AGENTS.md` without recording its template hash, which would surface as a false \"modified by you\" conflict on update. The new `<!-- TRELLIS:START -->` / `<!-- TRELLIS:END -->` managed-block replacement plus a legacy pristine-hash allowlist (`LEGACY_UNTRACKED_AGENTS_MD_BLOCK_HASHES`) lets old untouched projects update cleanly while still preserving any user customizations outside the block.\n- fix(opencode): Support PowerShell context injection in OpenCode on Windows. `inject-subagent-context.js` now emits `$env:TRELLIS_CONTEXT_ID = '...'; ` instead of the POSIX `export` form when the host platform is `win32`, and the explicit-assignment dedup detector matches both POSIX and PowerShell forms.\n\n**Internal:**\n- test: Add `test/setup.ts` registered via `setupFiles` in `vitest.config.ts`. It deletes `process.env.TRELLIS_CONTEXT_ID` and `process.env.OPENCODE_RUN_ID` at vitest process start so the OpenCode resolver tests no longer pick up a Claude/OpenCode host-session env that would hijack the platform-input-derived contextKey.\n- docs(spec): Document the parent-child `children` list invariant in `script-conventions.md` and the host-shell env-leak isolation pattern in `unit-test/conventions.md`.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `trellis update` to receive the Phase 3.4 commit step, the rewritten `/trellis:finish-work` skill, the parent-child progress fix, AGENTS.md hash tracking, and OpenCode PowerShell support. No `--migrate` flag is required."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.19",
|
|
3
|
+
"description": "Beta.19 hot-fixes a regression introduced in beta.18: when an AGENTS.md exists without `<!-- TRELLIS:START -->` / `<!-- TRELLIS:END -->` markers (pre-beta.18 projects, or hand-authored files), `trellis update` was clobbering the user's content with the bare Trellis template. The managed block now appends to the existing file instead of overwriting it. No migration actions are required.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- fix(update): Preserve user content in `AGENTS.md` when the file has no `<!-- TRELLIS:START -->` / `<!-- TRELLIS:END -->` markers. Beta.18's managed-block replacement returned the bare template as a fallback when no markers were found, which silently replaced the user's hand-written `AGENTS.md` content during `trellis update`. The fallback now appends the canonical managed block to the existing content instead, so user-authored sections are preserved verbatim. Existing tests cover the legacy-pristine and modified-managed-block cases; the new `#4d preserves user AGENTS.md without TRELLIS markers by appending the managed block` case covers the hand-authored-without-markers path.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Run `trellis update` to receive the AGENTS.md preservation fix. No `--migrate` flag is required. If beta.18 already overwrote your `AGENTS.md`, restore the file from git history and re-run `trellis update` on beta.19 to merge in the managed block while keeping your content."
|
|
9
|
+
}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"breaking": true,
|
|
5
5
|
"recommendMigrate": true,
|
|
6
6
|
"changelog": "**Breaking Changes:**\n- rename(agents): `implement` / `check` / `research` sub-agents are now `trellis-implement` / `trellis-check` / `trellis-research` across all 10 platforms (claude, cursor, opencode, codex, kiro, gemini, qoder, codebuddy, copilot, droid). Generic names were colliding with user-defined agents and being matched by the main agent's description heuristics on some platforms. Prefixing with `trellis-` makes them unambiguously Trellis sub-agents. `workflow.md`, copilot start prompt, `shared-hooks/inject-subagent-context.py`, and configurator detection all updated to use the new names.\n\n**Bug Fixes:**\n- fix(agents): drop `model: opus` from all 18 markdown agent frontmatters + the example `Task()` calls in `copilot/prompts/start.prompt.md`. On Claude Code this merely hardcoded Opus for all sub-agent runs (ignoring user preference); on Cursor it actively mapped to Claude Opus billing at ~5x Sonnet cost and surprised users; on Gemini/Droid/Codebuddy/Qoder `opus` isn't even a valid model identifier. Agents now inherit whatever model the user configured for their platform.",
|
|
7
|
+
"migrationGuide": "## Sub-Agent Rename: `implement` / `check` / `research` → `trellis-*`\n\nbeta.5 renames the three core sub-agents to add a `trellis-` prefix across all 10 agent-capable platforms (Claude, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid). The generic names (`implement`, `check`, `research`) were colliding with user-defined agents in some setups.\n\n### What changes\n\n| Old name | New name |\n|---|---|\n| `implement` | `trellis-implement` |\n| `check` | `trellis-check` |\n| `research` | `trellis-research` |\n\nPaths per platform:\n\n- **Claude / OpenCode / Cursor / etc.**: `.<platform>/agents/implement.md` → `.<platform>/agents/trellis-implement.md`\n- **Codex**: `.codex/agents/implement.toml` → `.codex/agents/trellis-implement.toml`\n- **Kiro**: `.kiro/agents/implement.json` → `.kiro/agents/trellis-implement.json`\n\n### Side-effect: removed `model: opus` from agent templates\n\nAgent YAML frontmatter no longer hardcodes a model. Falls back to whatever the platform default is. If you pinned opus explicitly for a reason (budget, performance), re-add `model: opus` to your local agent files after migrate.\n\n### How to upgrade\n\n```bash\ntrellis update --migrate\n```\n\n30 rename entries run. Unmodified agent files are renamed silently; customized ones (e.g. you tweaked the agent prompt) land on the standard `Modified by you` confirm prompt — pressing Enter (backup-rename) is safe.\n\n### What to check after migrate\n\n1. **Any code that spawns agents by name** — shell scripts, CI jobs, or other automation calling `Task(subagent_type=\"implement\")` must update to `Task(subagent_type=\"trellis-implement\")`.\n2. **Aliases / hot keys** — if you had a keyboard shortcut or prompt alias that referenced `implement` / `check` / `research`, update it.\n3. **Model pin** — if you customized `model: opus` in agent frontmatter, re-add it. Trellis no longer pins a model by default.",
|
|
8
|
+
"aiInstructions": "When helping a user migrate to 0.5.0-beta.5:\n\n1. **Grep for bare agent names in user code**: look for `Task(subagent_type=\"implement\"|\"check\"|\"research\")` in any .md / .ts / .py / shell files. Rename each to the `trellis-` prefixed version.\n\n2. **Check agent customizations**: diff the user's `.<platform>/agents/{implement,check,research}.*` against the new `trellis-*` templates. If they had custom content, help merge it into the new file.\n\n3. **Model pinning**: if their agent frontmatter had `model: opus` and they still want it pinned, re-add it after migrate. beta.5 removes the default pin in favor of platform-default.\n\n4. **Run migrate**: `trellis update --migrate`. Hash-verified renames — pristine files renamed silently, customized files land on the confirm prompt (Enter = backup-rename is safe).\n\n5. **Verify clean second run**: after migrate, running `trellis update` again should report \"Already up to date!\". Any diff indicates a rename that didn't complete (user chose skip on a modified file).",
|
|
7
9
|
"migrations": [
|
|
8
10
|
{
|
|
9
11
|
"type": "rename",
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.9",
|
|
3
|
+
"description": "Five coordinated improvements accumulated since beta.8: (1) task.json schema unified across all writers + phase.py/create_bootstrap.py orphan cleanup, (2) workflow tightening — task-creation triggers + research sub-agent delegation, (3) Qoder session-boundary commands split out of the skill matcher into native /trellis-{continue,finish-work}, (4) polyrepo layout detection via sibling .git scan, (5) joiner onboarding task auto-generated for new developers on existing Trellis projects + both bootstrap / joiner PRDs rewritten as AI-facing instructions.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Internal cleanup (no user-facing behavior change):**\n- chore(schema): `task.json` shape unified across all three writers. `packages/cli/src/utils/task-json.ts` introduces a shared `TaskJson` type + `emptyTaskJson(overrides)` factory mirroring the 24-field canonical shape produced by `.trellis/scripts/common/task_store.py cmd_create`. `init.ts getBootstrapTaskJson` and `update.ts` migration-task block now route through the factory. Follows the `quality-guidelines.md` spec lesson 'Schema Deprecation: Audit ALL Writers, Not Just the Creator' captured in 0.5.0-beta.0 — `cmd_create` was cleaned up at the time, but the two TS writers were missed.\n- chore(schema): migration tasks no longer write legacy `current_phase: 0` / `next_action: [...]` fields. These reference the removed Multi-Agent Pipeline and no active reader consumes them in 0.5.\n- chore(bootstrap): bootstrap task's project-type checklist moves from structured `subtasks: [{name, status}]` in task.json to markdown `- [ ]` items in prd.md. Task.json `subtasks` is now canonical `string[]` (child task dir names) across all tasks.\n- chore(cleanup): `.trellis/scripts/common/phase.py` removed. Orphan code (no importers in 0.5); was kept around from the Multi-Agent Pipeline era and not captured by 0.5.0-beta.0's 138-entry safe-file-delete (which only targeted `multi_agent/*`). Hash-verified delete — pristine copies auto-removed, locally modified copies preserved with a warning.\n- chore(cleanup): `.trellis/scripts/create_bootstrap.py` removed. Legacy 4th task.json writer with its own 13-field divergent shape; replaced by `init.ts getBootstrapTaskJson` in 0.4 but the Python file was never deleted. Never invoked by any command. Same hash-verified delete mechanism; three historical hashes included to cover 0.3+ users.\n- chore(cleanup): `TaskData` TypedDict (`common/types.py`) no longer declares `current_phase: int` / `next_action: list[dict]` — dead schema fields.\n- docs: spec directory-trees in `script-conventions.md` (template + local) drop `phase.py` / `create_bootstrap.py` / the full `multi_agent/` block (which was actually removed in 0.5.0-beta.0 but kept appearing in shipped spec docs).\n- chore(pkg): remove 5 orphan `.md` files from `packages/cli/src/templates/markdown/spec/` (`spec/backend/{index,directory-structure,script-conventions}.md` + `spec/guides/{code-reuse,cross-platform}-thinking-guide.md`). These were accidentally added in early 0.1.x releases alongside the proper `.md.txt` stub templates but never imported by `markdown/index.ts` — they shipped in dist/ as dead weight (~35 KB) but never landed on user disks, so no migration entry is needed. Fixes a ~2-year-old duplication bug.\n\n**Workflow tightening (all platforms):**\n- feat(workflow): `workflow.md [workflow-state:no_task]` block + `shared-hooks/inject-workflow-state.py` + OpenCode plugin now enumerate explicit trigger words (`重构` / `抽成` / `独立` / `分发` / `拆出来` / `搞一个` / `做成` / `接入` / `集成` / `refactor` / `rewrite` / `extract` / `productize` / `publish` / `build X` / `design Y`) that REQUIRE task creation, plus a strict three-condition exemption rule (zero file writes + one-reply answer + no external research). Default stance: when in doubt, create a task.\n- feat(workflow): `common/skills/brainstorm.md` gains a 'Delegate to trellis-research sub-agent' section with explicit anti-pattern guidance — 10+ inline WebFetch/WebSearch calls in the main conversation burn tokens and leak raw tool output into context. Correct pattern: spawn trellis-research via Task tool; the sub-agent persists findings to `{TASK_DIR}/research/<topic>.md` and returns only path + one-line summary.\n- feat(workflow): `workflow.md [workflow-state:in_progress]` flow names the actual agent types (`trellis-implement → trellis-check → trellis-update-spec → finish`) instead of generic verbs.\n\n**Qoder UX fix:**\n- feat(qoder): deliver session-boundary commands as native Qoder Custom Commands (`.qoder/commands/trellis-{finish-work,continue}.md`) with YAML frontmatter (`name` + `description`), per docs.qoder.com/en/cli/user-guide/command. Previously these were buried in the skill matcher alongside the 5 auto-trigger workflows, so users had no deterministic way to invoke them — they had to hope their chat wording matched the skill's description. Now they type `/trellis-finish-work` or `/trellis-continue` explicitly.\n- chore(qoder): the 5 auto-trigger workflows (brainstorm, before-dev, check, update-spec, break-loop) stay as `.qoder/skills/trellis-{name}/SKILL.md`. `start` is filtered out because Qoder is agent-capable and its SessionStart hook already injects the workflow overview (same rule that applies to every other agent-capable platform).\n- chore(shared): new `wrapWithCommandFrontmatter` + `COMMAND_DESCRIPTIONS` registry in `configurators/shared.ts` — short, human-facing, imperative one-liners for the `/` palette, distinct from the long auto-trigger prose in `SKILL_DESCRIPTIONS` (written for the skill matcher, not a command list).\n- chore(migration): upgraders have their old `.qoder/skills/trellis-{finish-work,continue}/SKILL.md` hash-verified and auto-deleted on `trellis update` (pristine copies removed silently, locally-modified copies land on the standard confirm prompt).\n\n**New features:**\n- feat(cli): polyrepo detection via sibling `.git` scan. `detectMonorepo()` now has a 7th parser that scans up to 2 levels deep for sibling `.git` directories or worktree gitlinks, firing only when all 6 workspace parsers miss and no submodules are declared (workspace configs always win). `DetectedPackage` gains `isGitRepo` (mutually exclusive with `isSubmodule`); `writeMonorepoConfig` emits `git: true` to bridge to the runtime schema already consumed by `get_git_packages()` in `config.py`. `--monorepo` failure now prints a 7-marker checklist and a manual `config.yaml` example. Init confirm prompt labels polyrepo packages with `(git repo)`.\n- feat(cli): joiner onboarding task auto-generated when a new developer runs `trellis init` on an existing Trellis project (fresh clone / new machine). Three-branch dispatch on `.trellis/` × `.trellis/.developer`: no `.trellis/` = creator bootstrap (unchanged), `.trellis/` + no `.developer` = **joiner** (`00-join-<slug>`), both = no-op. The `.developer` file is gitignored, so it's a clean per-checkout signal; `workspace/<name>/` cannot be used because it's committed. Wired in both the main dispatch AND `handleReinit`'s `doAddDeveloper` branch (the latter is the default path for `trellis init --user <name>` on existing checkouts). Failures surface as `console.warn` instead of being silently swallowed.\n- feat(cli): `trellis init` bootstrap + joiner PRDs rewritten as AI-facing instructions. Previously framed as user-facing docs (`Welcome, do X, ask AI Y`); now framed as instructions TO the AI agent that runs the onboarding task (`You (the AI) are running this task; here's how to onboard them`). Includes runtime-mechanics explainer (SessionStart hook, workflow-state tag, implement/check sub-agents, jsonl manifests) and a suggested opening line. Same content reach, much better first-session UX.",
|
|
7
|
+
"migrations": [
|
|
8
|
+
{
|
|
9
|
+
"type": "safe-file-delete",
|
|
10
|
+
"from": ".trellis/scripts/common/phase.py",
|
|
11
|
+
"description": "Remove orphan phase.py — no importers; legacy from Multi-Agent Pipeline",
|
|
12
|
+
"allowed_hashes": [
|
|
13
|
+
"412b7096ef0e48b8a95a79060121a586e0d9d44f1b350d6ed818c6f84330bb01"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "safe-file-delete",
|
|
18
|
+
"from": ".trellis/scripts/create_bootstrap.py",
|
|
19
|
+
"description": "Remove dead create_bootstrap.py — replaced by TS init.ts getBootstrapTaskJson in 0.4; never invoked by any command",
|
|
20
|
+
"allowed_hashes": [
|
|
21
|
+
"33b40df671ba7828fd8d3ba8c019823a8b03e938797b1cae218c55d6c7ebe57a",
|
|
22
|
+
"ce1503c052dadf2470ddb1cade42f331c0fd70d34e895d8d07044ba27548e17e",
|
|
23
|
+
"aa5dd1f39a77b2f4bb827fd14ce7a83fb51870e77f556fe508afce3f8eac0b4e"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "safe-file-delete",
|
|
28
|
+
"from": ".qoder/skills/trellis-finish-work/SKILL.md",
|
|
29
|
+
"description": "Qoder session-boundary skill → moved to .qoder/commands/trellis-finish-work.md",
|
|
30
|
+
"reason": "In 0.5.0-beta.9, Qoder session-boundary commands move out of the skill matcher into native Custom Commands so users can invoke them deterministically as `/trellis-finish-work`.",
|
|
31
|
+
"allowed_hashes": [
|
|
32
|
+
"c0f3ffa74e1e9990f93e5d44d03bd088c8698da1db4750b74d3eee4809a84aea",
|
|
33
|
+
"2027d8ea610e0a929a7ce147b29045406db8a8c9c2a767f98d779e5d53162f0c"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "safe-file-delete",
|
|
38
|
+
"from": ".qoder/skills/trellis-continue/SKILL.md",
|
|
39
|
+
"description": "Qoder session-boundary skill → moved to .qoder/commands/trellis-continue.md",
|
|
40
|
+
"reason": "In 0.5.0-beta.9, Qoder session-boundary commands move out of the skill matcher into native Custom Commands so users can invoke them deterministically as `/trellis-continue`.",
|
|
41
|
+
"allowed_hashes": [
|
|
42
|
+
"914545dab290e508a4c6b84d0a9f8debe68bcf9117cebe0fa85be0ef709d8fc1",
|
|
43
|
+
"3d2c83ad710b3b667851e28a473fb259a1330475e6b7417c769432f4a55a76f9"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"notes": "Code cleanup + additive features; no user task.json mutations. Python readers (`task.py`, `get_context.py`) treat missing canonical fields as null, so legacy tasks keep working. Newly-created bootstrap / migration tasks from this version onward produce the canonical shape. Qoder users who had the two session-boundary skills installed will see them auto-removed (pristine) or prompted for confirm (modified); the new `.qoder/commands/*.md` are written by the standard configure step on `trellis update`."
|
|
48
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-rc.0",
|
|
3
|
+
"description": "First 0.5.0 release candidate. Stabilizes the beta.19 line with non-interactive init recovery fixes, workflow breadcrumbs that read from workflow.md, automatic updates for [workflow-state:*] blocks, and refreshed trellis-meta references. rc.0 adds no new migration actions; projects upgrading from 0.4.x still inherit the 0.5 migration chain from beta.0.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Enhancements:**\n- feat(workflow-state): Per-turn workflow breadcrumbs now read from `.trellis/workflow.md` `[workflow-state:STATUS]` blocks. Python and OpenCode JS fallback dictionaries were removed so workflow forks have one file to edit. The planning breadcrumb now calls out Phase 1.3 `implement.jsonl` / `check.jsonl` curation, and the in-progress breadcrumb includes Phase 3.4 commit before `/trellis:finish-work`.\n- feat(update): `trellis update` now refreshes `.trellis/workflow.md` breadcrumb blocks per status: replace existing `[workflow-state:*]` bodies from the CLI template, append missing blocks, preserve content outside the blocks, and warn when customized prompt text inside the blocks is replaced.\n- feat(task): `task.py create` best-effort sets the session active-task pointer, making the planning breadcrumb reachable immediately after task creation. `trellis continue` routes by `task.json.status` and required artifacts instead of PRD existence alone.\n- docs(meta): Refresh bundled `trellis-meta` references to explain how workflow-state reads `workflow.md`.\n\n**Bug Fixes:**\n- fix(init): `trellis init --yes` is fully non-interactive. `--yes` now maps conflicts to skip mode, and `writeFile()` falls back to skip in non-TTY `ask` mode to avoid prompts or `ERR_USE_AFTER_CLOSE` in scripted runs.\n- fix(init): Recover aborted first init runs where `.trellis/` exists but `tasks/` is empty. The second `trellis init -u <name> --codex --yes` now creates `00-bootstrap-guidelines` instead of mis-routing to joiner onboarding.\n\n**Testing:**\n- test(init): Add integration coverage for empty-`tasks/` recovery with and without `--force`, plus non-TTY file-writer conflict behavior.\n- test(workflow-state): Add regression coverage for workflow.md tag parsing, fallback removal, Phase 1.3 / Phase 3.4 breadcrumb invariants, session-start tag stripping, and workflow.md breadcrumb block updates.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "RC install: `npm install -g @mindfoldhq/trellis@rc`. Projects already on 0.5 beta can run `trellis update`. Projects upgrading from 0.4.x should run `trellis update --migrate` because the 0.5 migration chain begins at 0.5.0-beta.0. rc.0 itself adds no new migration entries."
|
|
9
|
+
}
|
|
@@ -29,7 +29,7 @@ Conversations get compacted; files don't. Every research output MUST end up as a
|
|
|
29
29
|
|
|
30
30
|
### Step 1: Resolve Current Task
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Run `python3 ./.trellis/scripts/task.py current --source` → active task path. If no active task is set, ask the user where to write output; do NOT guess.
|
|
33
33
|
|
|
34
34
|
Ensure `{TASK_DIR}/research/` exists:
|
|
35
35
|
|
|
@@ -29,7 +29,7 @@ Conversations get compacted; files don't. Every research output MUST end up as a
|
|
|
29
29
|
|
|
30
30
|
### Step 1: Resolve Current Task
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Run `python3 ./.trellis/scripts/task.py current --source` → active task path. If no active task is set, ask the user where to write output; do NOT guess.
|
|
33
33
|
|
|
34
34
|
Ensure `{TASK_DIR}/research/` exists:
|
|
35
35
|
|
|
@@ -13,8 +13,9 @@ through the chat reply is a failure.
|
|
|
13
13
|
|
|
14
14
|
## Workflow
|
|
15
15
|
|
|
16
|
-
1.
|
|
17
|
-
|
|
16
|
+
1. Run `python3 ./.trellis/scripts/task.py current --source` to get the
|
|
17
|
+
active task path and source. If no active task is set, ask the user
|
|
18
|
+
where to write output; do not guess.
|
|
18
19
|
2. Run `mkdir -p <TASK_DIR>/research` to ensure the directory exists.
|
|
19
20
|
3. Read `.trellis/workflow.md`, relevant `.trellis/spec/` files, and
|
|
20
21
|
target code before forming an opinion.
|
|
@@ -11,6 +11,7 @@ from __future__ import annotations
|
|
|
11
11
|
|
|
12
12
|
import json
|
|
13
13
|
import os
|
|
14
|
+
import re
|
|
14
15
|
import subprocess
|
|
15
16
|
import sys
|
|
16
17
|
import warnings
|
|
@@ -19,11 +20,54 @@ from pathlib import Path
|
|
|
19
20
|
|
|
20
21
|
warnings.filterwarnings("ignore")
|
|
21
22
|
|
|
23
|
+
FIRST_REPLY_NOTICE = """<first-reply-notice>
|
|
24
|
+
On the first visible assistant reply in this session, begin with exactly one short Chinese sentence:
|
|
25
|
+
Trellis SessionStart 已注入:workflow、当前任务状态、开发者身份、git 状态、active tasks、spec 索引已加载。
|
|
26
|
+
Then continue directly with the user's request. This notice is one-shot: do not repeat it after the first assistant reply in the same session.
|
|
27
|
+
</first-reply-notice>"""
|
|
28
|
+
|
|
22
29
|
|
|
23
30
|
def should_skip_injection() -> bool:
|
|
24
31
|
return os.environ.get("CODEX_NON_INTERACTIVE") == "1"
|
|
25
32
|
|
|
26
33
|
|
|
34
|
+
def configure_project_encoding(project_dir: Path) -> None:
|
|
35
|
+
"""Reuse Trellis' shared Windows stdio encoding helper before JSON output."""
|
|
36
|
+
scripts_dir = project_dir / ".trellis" / "scripts"
|
|
37
|
+
if str(scripts_dir) not in sys.path:
|
|
38
|
+
sys.path.insert(0, str(scripts_dir))
|
|
39
|
+
|
|
40
|
+
try:
|
|
41
|
+
from common import configure_encoding # type: ignore[import-not-found]
|
|
42
|
+
|
|
43
|
+
configure_encoding()
|
|
44
|
+
except Exception:
|
|
45
|
+
pass
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _has_curated_jsonl_entry(jsonl_path: Path) -> bool:
|
|
49
|
+
"""Return True iff jsonl has at least one row with a ``file`` field.
|
|
50
|
+
|
|
51
|
+
A freshly seeded jsonl only contains a ``{"_example": ...}`` row (no
|
|
52
|
+
``file`` key) — that is NOT "ready". Readiness requires at least one
|
|
53
|
+
curated entry. Matches the contract used by ``inject-subagent-context.py``.
|
|
54
|
+
"""
|
|
55
|
+
try:
|
|
56
|
+
for line in jsonl_path.read_text(encoding="utf-8").splitlines():
|
|
57
|
+
line = line.strip()
|
|
58
|
+
if not line:
|
|
59
|
+
continue
|
|
60
|
+
try:
|
|
61
|
+
row = json.loads(line)
|
|
62
|
+
except json.JSONDecodeError:
|
|
63
|
+
continue
|
|
64
|
+
if isinstance(row, dict) and row.get("file"):
|
|
65
|
+
return True
|
|
66
|
+
except (OSError, UnicodeDecodeError):
|
|
67
|
+
return False
|
|
68
|
+
return False
|
|
69
|
+
|
|
70
|
+
|
|
27
71
|
def read_file(path: Path, fallback: str = "") -> str:
|
|
28
72
|
try:
|
|
29
73
|
return path.read_text(encoding="utf-8")
|
|
@@ -31,10 +75,32 @@ def read_file(path: Path, fallback: str = "") -> str:
|
|
|
31
75
|
return fallback
|
|
32
76
|
|
|
33
77
|
|
|
34
|
-
def
|
|
78
|
+
def _resolve_context_key(project_dir: Path, hook_input: dict) -> str | None:
|
|
79
|
+
scripts_dir = project_dir / ".trellis" / "scripts"
|
|
80
|
+
if str(scripts_dir) not in sys.path:
|
|
81
|
+
sys.path.insert(0, str(scripts_dir))
|
|
82
|
+
try:
|
|
83
|
+
from common.active_task import resolve_context_key # type: ignore[import-not-found]
|
|
84
|
+
except Exception:
|
|
85
|
+
return None
|
|
86
|
+
return resolve_context_key(hook_input, platform="codex")
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def _resolve_active_task(trellis_dir: Path, hook_input: dict):
|
|
90
|
+
scripts_dir = trellis_dir / "scripts"
|
|
91
|
+
if str(scripts_dir) not in sys.path:
|
|
92
|
+
sys.path.insert(0, str(scripts_dir))
|
|
93
|
+
from common.active_task import resolve_active_task # type: ignore[import-not-found]
|
|
94
|
+
|
|
95
|
+
return resolve_active_task(trellis_dir.parent, hook_input, platform="codex")
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def run_script(script_path: Path, context_key: str | None = None) -> str:
|
|
35
99
|
try:
|
|
36
100
|
env = os.environ.copy()
|
|
37
101
|
env["PYTHONIOENCODING"] = "utf-8"
|
|
102
|
+
if context_key:
|
|
103
|
+
env["TRELLIS_CONTEXT_ID"] = context_key
|
|
38
104
|
cmd = [sys.executable, "-W", "ignore", str(script_path)]
|
|
39
105
|
result = subprocess.run(
|
|
40
106
|
cmd,
|
|
@@ -80,18 +146,15 @@ def _resolve_task_dir(trellis_dir: Path, task_ref: str) -> Path:
|
|
|
80
146
|
return trellis_dir / "tasks" / path_obj
|
|
81
147
|
|
|
82
148
|
|
|
83
|
-
def _get_task_status(trellis_dir: Path) -> str:
|
|
84
|
-
|
|
85
|
-
if not
|
|
86
|
-
return "Status: NO ACTIVE TASK\nNext: Describe what you want to work on"
|
|
87
|
-
|
|
88
|
-
task_ref = _normalize_task_ref(current_task_file.read_text(encoding="utf-8").strip())
|
|
89
|
-
if not task_ref:
|
|
90
|
-
return "Status: NO ACTIVE TASK\nNext: Describe what you want to work on"
|
|
149
|
+
def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
|
|
150
|
+
active = _resolve_active_task(trellis_dir, hook_input)
|
|
151
|
+
if not active.task_path:
|
|
152
|
+
return f"Status: NO ACTIVE TASK\nSource: {active.source}\nNext: Describe what you want to work on"
|
|
91
153
|
|
|
154
|
+
task_ref = active.task_path
|
|
92
155
|
task_dir = _resolve_task_dir(trellis_dir, task_ref)
|
|
93
|
-
if not task_dir.is_dir():
|
|
94
|
-
return f"Status: STALE POINTER\nTask: {task_ref}\nNext: Task directory not found. Run: python3 ./.trellis/scripts/task.py finish"
|
|
156
|
+
if active.stale or not task_dir.is_dir():
|
|
157
|
+
return f"Status: STALE POINTER\nTask: {task_ref}\nSource: {active.source}\nNext: Task directory not found. Run: python3 ./.trellis/scripts/task.py finish"
|
|
95
158
|
|
|
96
159
|
task_json_path = task_dir / "task.json"
|
|
97
160
|
task_data: dict = {}
|
|
@@ -105,24 +168,34 @@ def _get_task_status(trellis_dir: Path) -> str:
|
|
|
105
168
|
task_status = task_data.get("status", "unknown")
|
|
106
169
|
|
|
107
170
|
if task_status == "completed":
|
|
108
|
-
return f"Status: COMPLETED\nTask: {task_title}\nNext: Archive with `python3 ./.trellis/scripts/task.py archive {task_dir.name}` or start a new task"
|
|
171
|
+
return f"Status: COMPLETED\nTask: {task_title}\nSource: {active.source}\nNext: Archive with `python3 ./.trellis/scripts/task.py archive {task_dir.name}` or start a new task"
|
|
109
172
|
|
|
110
173
|
has_context = False
|
|
111
174
|
for jsonl_name in ("implement.jsonl", "check.jsonl", "spec.jsonl"):
|
|
112
175
|
jsonl_path = task_dir / jsonl_name
|
|
113
|
-
if jsonl_path.is_file() and jsonl_path
|
|
176
|
+
if jsonl_path.is_file() and _has_curated_jsonl_entry(jsonl_path):
|
|
114
177
|
has_context = True
|
|
115
178
|
break
|
|
116
179
|
|
|
117
180
|
has_prd = (task_dir / "prd.md").is_file()
|
|
118
181
|
|
|
119
182
|
if not has_prd:
|
|
120
|
-
return f"Status: NOT READY\nTask: {task_title}\nMissing: prd.md not created\nNext: Write PRD
|
|
183
|
+
return f"Status: NOT READY\nTask: {task_title}\nSource: {active.source}\nMissing: prd.md not created\nNext: Write PRD (see workflow.md Phase 1.1) then curate implement.jsonl per Phase 1.3"
|
|
121
184
|
|
|
122
185
|
if not has_context:
|
|
123
|
-
return f"Status: NOT READY\nTask: {task_title}\nMissing:
|
|
124
|
-
|
|
125
|
-
return
|
|
186
|
+
return f"Status: NOT READY\nTask: {task_title}\nSource: {active.source}\nMissing: implement.jsonl / check.jsonl missing or empty\nNext: Curate entries per workflow.md Phase 1.3 (spec + research files only), then `task.py start`"
|
|
187
|
+
|
|
188
|
+
return (
|
|
189
|
+
f"Status: READY\nTask: {task_title}\n"
|
|
190
|
+
f"Source: {active.source}\n"
|
|
191
|
+
"Next required action: dispatch `trellis-implement` per Phase 2.1. "
|
|
192
|
+
"For agent-capable platforms, the default is to NOT edit code in the main session. "
|
|
193
|
+
"After implementation, dispatch `trellis-check` per Phase 2.2 before reporting completion.\n"
|
|
194
|
+
"User override (per-turn escape hatch): if the user's CURRENT message explicitly tells the "
|
|
195
|
+
"main session to handle it directly (\"你直接改\" / \"别派 sub-agent\" / \"main session 写就行\" / "
|
|
196
|
+
"\"do it inline\" / \"不用 sub-agent\"), honor it for this turn and edit code directly. "
|
|
197
|
+
"Per-turn only; do NOT invent an override the user did not say."
|
|
198
|
+
)
|
|
126
199
|
|
|
127
200
|
|
|
128
201
|
def _extract_range(content: str, start_header: str, end_header: str) -> str:
|
|
@@ -145,8 +218,24 @@ def _extract_range(content: str, start_header: str, end_header: str) -> str:
|
|
|
145
218
|
return "\n".join(lines[start:end]).rstrip()
|
|
146
219
|
|
|
147
220
|
|
|
221
|
+
_BREADCRUMB_TAG_RE = re.compile(
|
|
222
|
+
r"\[workflow-state:([A-Za-z0-9_-]+)\]\s*\n.*?\n\s*\[/workflow-state:\1\]",
|
|
223
|
+
re.DOTALL,
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
def _strip_breadcrumb_tag_blocks(content: str) -> str:
|
|
228
|
+
return _BREADCRUMB_TAG_RE.sub("", content)
|
|
229
|
+
|
|
230
|
+
|
|
148
231
|
def _build_workflow_toc(workflow_path: Path) -> str:
|
|
149
|
-
"""Inject workflow guide: TOC + Phase Index + Phase 1/2/3 step details.
|
|
232
|
+
"""Inject workflow guide: TOC + Phase Index + Phase 1/2/3 step details.
|
|
233
|
+
|
|
234
|
+
Since v0.5.0-rc.0 the [workflow-state:STATUS] breadcrumb tag blocks
|
|
235
|
+
live inside ## Phase Index. They're consumed by inject-workflow-state.py
|
|
236
|
+
on each UserPromptSubmit, so strip them from the session-start payload
|
|
237
|
+
to avoid duplicating context.
|
|
238
|
+
"""
|
|
150
239
|
content = read_file(workflow_path)
|
|
151
240
|
if not content:
|
|
152
241
|
return "No workflow.md found"
|
|
@@ -162,9 +251,9 @@ def _build_workflow_toc(workflow_path: Path) -> str:
|
|
|
162
251
|
out_lines.append(line)
|
|
163
252
|
out_lines += ["", "---", ""]
|
|
164
253
|
|
|
165
|
-
phases = _extract_range(content, "Phase Index", "
|
|
254
|
+
phases = _extract_range(content, "Phase Index", "Customizing Trellis (for forks)")
|
|
166
255
|
if phases:
|
|
167
|
-
out_lines.append(phases)
|
|
256
|
+
out_lines.append(_strip_breadcrumb_tag_blocks(phases).rstrip())
|
|
168
257
|
|
|
169
258
|
return "\n".join(out_lines).rstrip()
|
|
170
259
|
|
|
@@ -176,11 +265,17 @@ def main() -> None:
|
|
|
176
265
|
# Read hook input from stdin
|
|
177
266
|
try:
|
|
178
267
|
hook_input = json.loads(sys.stdin.read())
|
|
268
|
+
if not isinstance(hook_input, dict):
|
|
269
|
+
hook_input = {}
|
|
179
270
|
project_dir = Path(hook_input.get("cwd", ".")).resolve()
|
|
180
271
|
except (json.JSONDecodeError, KeyError):
|
|
272
|
+
hook_input = {}
|
|
181
273
|
project_dir = Path(".").resolve()
|
|
182
274
|
|
|
275
|
+
configure_project_encoding(project_dir)
|
|
276
|
+
|
|
183
277
|
trellis_dir = project_dir / ".trellis"
|
|
278
|
+
context_key = _resolve_context_key(project_dir, hook_input)
|
|
184
279
|
|
|
185
280
|
output = StringIO()
|
|
186
281
|
|
|
@@ -190,10 +285,12 @@ Read and follow all instructions below carefully.
|
|
|
190
285
|
</session-context>
|
|
191
286
|
|
|
192
287
|
""")
|
|
288
|
+
output.write(FIRST_REPLY_NOTICE)
|
|
289
|
+
output.write("\n\n")
|
|
193
290
|
|
|
194
291
|
output.write("<current-state>\n")
|
|
195
292
|
context_script = trellis_dir / "scripts" / "get_context.py"
|
|
196
|
-
output.write(run_script(context_script))
|
|
293
|
+
output.write(run_script(context_script, context_key))
|
|
197
294
|
output.write("\n</current-state>\n\n")
|
|
198
295
|
|
|
199
296
|
output.write("<workflow>\n")
|
|
@@ -208,8 +305,11 @@ Read and follow all instructions below carefully.
|
|
|
208
305
|
"- If you're spawning an implement/check sub-agent, context is injected "
|
|
209
306
|
"automatically via `{task}/implement.jsonl` / `check.jsonl`. You do NOT "
|
|
210
307
|
"need to read these indexes yourself.\n"
|
|
211
|
-
"-
|
|
212
|
-
"
|
|
308
|
+
"- For agent-capable platforms, the default is to dispatch "
|
|
309
|
+
"`trellis-implement` and `trellis-check` (so JSONL context is loaded by "
|
|
310
|
+
"the sub-agents) rather than editing code in the main session. "
|
|
311
|
+
"Honor a per-turn user override only if the user's current message "
|
|
312
|
+
"explicitly opts out (see <task-status> below for override phrases).\n\n"
|
|
213
313
|
)
|
|
214
314
|
|
|
215
315
|
# guides/ inlined (cross-package thinking, broadly useful)
|
|
@@ -253,13 +353,13 @@ Read and follow all instructions below carefully.
|
|
|
253
353
|
)
|
|
254
354
|
output.write("</guidelines>\n\n")
|
|
255
355
|
|
|
256
|
-
task_status = _get_task_status(trellis_dir)
|
|
356
|
+
task_status = _get_task_status(trellis_dir, hook_input)
|
|
257
357
|
output.write(f"<task-status>\n{task_status}\n</task-status>\n\n")
|
|
258
358
|
|
|
259
359
|
output.write("""<ready>
|
|
260
360
|
Context loaded. Workflow index, project state, and guidelines are already injected above — do NOT re-read them.
|
|
261
|
-
|
|
262
|
-
If
|
|
361
|
+
When the user sends the first message, follow <task-status> and the workflow guide.
|
|
362
|
+
If a task is READY, execute its Next required action without asking whether to continue.
|
|
263
363
|
</ready>""")
|
|
264
364
|
|
|
265
365
|
context = output.getvalue()
|