@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qoder.js","sourceRoot":"","sources":["../../src/configurators/qoder.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"qoder.js","sourceRo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AAM,WAAW,CACf,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,EAC/B,6BAA6B,CAAC,YAAY,EAAE,CAAC,CAC9C,CAAC;IACF,MAAM,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;IAEhE,MAAM,QAAQ,GAAG,mBAAmB,EAAE,CAAC;IACvC,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,EAC1C,mBAAmB,CAAC,QAAQ,CAAC,OAAO,CAAC,CACtC,CAAC;AACJ,CAAC"}
|
|
@@ -5,17 +5,30 @@
|
|
|
5
5
|
* configurators cannot import from index.ts).
|
|
6
6
|
*/
|
|
7
7
|
import type { TemplateContext } from "../types/ai-tools.js";
|
|
8
|
+
/**
|
|
9
|
+
* Get the Python command based on platform.
|
|
10
|
+
* Windows uses 'python', macOS/Linux use 'python3'.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getPythonCommandForPlatform(platform?: NodeJS.Platform): "python" | "python3";
|
|
8
13
|
export declare function resolvePlaceholders(content: string, context?: TemplateContext): string;
|
|
9
14
|
/**
|
|
10
15
|
* Wrap resolved template content with YAML frontmatter for skill format.
|
|
11
16
|
* Used by platforms that use SKILL.md (Codex, Kiro, Qoder, etc.).
|
|
12
17
|
*/
|
|
13
18
|
export declare function wrapWithSkillFrontmatter(name: string, content: string): string;
|
|
19
|
+
/** Wrap resolved command content with YAML frontmatter (name + description). */
|
|
20
|
+
export declare function wrapWithCommandFrontmatter(name: string, content: string): string;
|
|
14
21
|
/** A resolved template ready to be written to disk. */
|
|
15
22
|
export interface ResolvedTemplate {
|
|
16
23
|
name: string;
|
|
17
24
|
content: string;
|
|
18
25
|
}
|
|
26
|
+
/** A resolved file inside a multi-file skill directory. */
|
|
27
|
+
export interface ResolvedSkillFile {
|
|
28
|
+
/** POSIX path relative to the skills root, e.g. "trellis-meta/SKILL.md" */
|
|
29
|
+
relativePath: string;
|
|
30
|
+
content: string;
|
|
31
|
+
}
|
|
19
32
|
/**
|
|
20
33
|
* Resolve ALL templates as skills with trellis- prefix.
|
|
21
34
|
* Used by skill-only platforms (Kiro, Qoder, Codex) where everything is a skill.
|
|
@@ -36,20 +49,31 @@ export declare function resolveCommands(ctx: TemplateContext): ResolvedTemplate[
|
|
|
36
49
|
* Used by "both" platforms for the auto-triggered skills.
|
|
37
50
|
*/
|
|
38
51
|
export declare function resolveSkills(ctx: TemplateContext): ResolvedTemplate[];
|
|
39
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Resolve multi-file built-in skills.
|
|
54
|
+
*
|
|
55
|
+
* Unlike workflow skills, bundled skills already contain their own SKILL.md
|
|
56
|
+
* frontmatter and may include references/assets. They are still rendered
|
|
57
|
+
* through placeholder resolution so init and update get byte-identical output.
|
|
58
|
+
*/
|
|
59
|
+
export declare function resolveBundledSkills(ctx: TemplateContext): ResolvedSkillFile[];
|
|
60
|
+
/** Collect skill files under a target root for update hash tracking. */
|
|
61
|
+
export declare function collectSkillTemplates(skillsRoot: string, skills: readonly {
|
|
62
|
+
name: string;
|
|
63
|
+
content: string;
|
|
64
|
+
}[], bundledSkills?: readonly ResolvedSkillFile[]): Map<string, string>;
|
|
65
|
+
/** Write skill directories from resolved templates and bundled skill files. */
|
|
40
66
|
export declare function writeSkills(skillsRoot: string, skills: {
|
|
41
67
|
name: string;
|
|
42
68
|
content: string;
|
|
43
|
-
}[]): Promise<void>;
|
|
69
|
+
}[], bundledSkills?: readonly ResolvedSkillFile[]): Promise<void>;
|
|
44
70
|
/** Write agent/droid definition files */
|
|
45
71
|
export declare function writeAgents(agentsDir: string, agents: {
|
|
46
72
|
name: string;
|
|
47
73
|
content: string;
|
|
48
74
|
}[], ext?: string): Promise<void>;
|
|
49
|
-
/** Write shared hook scripts
|
|
50
|
-
export declare function writeSharedHooks(hooksDir: string,
|
|
51
|
-
exclude?: readonly string[];
|
|
52
|
-
}): Promise<void>;
|
|
75
|
+
/** Write the shared hook scripts that `platform` actually registers. */
|
|
76
|
+
export declare function writeSharedHooks(hooksDir: string, platform: import("../templates/shared-hooks/index.js").SharedHookPlatform): Promise<void>;
|
|
53
77
|
export type SubAgentType = "implement" | "check";
|
|
54
78
|
/** Build the standard "load Trellis context first" prelude block. */
|
|
55
79
|
export declare function buildPullBasedPrelude(agentType: SubAgentType): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/configurators/shared.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/configurators/shared.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAC3C,QAAQ,GAAG,SAAS,CAEtB;AA2CD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,eAAe,GACxB,MAAM,CAkCR;AA0BD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,MAAM,CAUR;AAaD,gFAAgF;AAChF,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,MAAM,CASR;AAeD,uDAAuD;AACvD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IAChC,2EAA2E;IAC3E,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;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AAC;AAEjD,qEAAqE;AACrE,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,CAsBrE;AAED,gFAAgF;AAChF,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,YAAY,GACtB,MAAM,CAuBR;AAED,yEAAyE;AACzE,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,YAAY,GACtB,MAAM,CAQR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAMpE;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,YAAY,EAAE,CAShB;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,YAAY,EAAE,CAShB"}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* Get the Python command based on platform.
|
|
9
9
|
* Windows uses 'python', macOS/Linux use 'python3'.
|
|
10
10
|
*/
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
export function getPythonCommandForPlatform(platform = process.platform) {
|
|
12
|
+
return platform === "win32" ? "python" : "python3";
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Resolve platform-specific placeholders in template content.
|
|
@@ -21,6 +21,7 @@ function getPythonCommand() {
|
|
|
21
21
|
* - {{CMD_REF:name}} → platform-specific command reference
|
|
22
22
|
* - {{EXECUTOR_AI}} → AI executor description
|
|
23
23
|
* - {{USER_ACTION_LABEL}} → user action label
|
|
24
|
+
* - {{CLI_FLAG}} → platform cli flag (e.g. "claude", "codex")
|
|
24
25
|
* - {{#FLAG}}...{{/FLAG}} → conditional include (when FLAG is true)
|
|
25
26
|
* - {{^FLAG}}...{{/FLAG}} → negated conditional (when FLAG is false)
|
|
26
27
|
*
|
|
@@ -31,6 +32,7 @@ const RE_PYTHON_CMD = /\{\{PYTHON_CMD\}\}/g;
|
|
|
31
32
|
const RE_CMD_REF = /\{\{CMD_REF:([\w][\w-]*)\}\}/g;
|
|
32
33
|
const RE_EXECUTOR_AI = /\{\{EXECUTOR_AI\}\}/g;
|
|
33
34
|
const RE_USER_ACTION_LABEL = /\{\{USER_ACTION_LABEL\}\}/g;
|
|
35
|
+
const RE_CLI_FLAG = /\{\{CLI_FLAG\}\}/g;
|
|
34
36
|
const RE_BLANK_LINES = /\n{3,}/g;
|
|
35
37
|
const CONDITIONAL_FLAGS = ["AGENT_CAPABLE", "HAS_HOOKS"];
|
|
36
38
|
const CONDITIONAL_REGEXES = Object.fromEntries(CONDITIONAL_FLAGS.map((flag) => [
|
|
@@ -41,13 +43,14 @@ const CONDITIONAL_REGEXES = Object.fromEntries(CONDITIONAL_FLAGS.map((flag) => [
|
|
|
41
43
|
},
|
|
42
44
|
]));
|
|
43
45
|
export function resolvePlaceholders(content, context) {
|
|
44
|
-
let result = content.replace(RE_PYTHON_CMD,
|
|
46
|
+
let result = content.replace(RE_PYTHON_CMD, getPythonCommandForPlatform());
|
|
45
47
|
if (!context)
|
|
46
48
|
return result;
|
|
47
49
|
// Simple substitutions
|
|
48
50
|
result = result.replace(RE_CMD_REF, (_match, name) => `${context.cmdRefPrefix}${name}`);
|
|
49
51
|
result = result.replace(RE_EXECUTOR_AI, context.executorAI);
|
|
50
52
|
result = result.replace(RE_USER_ACTION_LABEL, context.userActionLabel);
|
|
53
|
+
result = result.replace(RE_CLI_FLAG, context.cliFlag);
|
|
51
54
|
// Conditional blocks
|
|
52
55
|
const flagValues = {
|
|
53
56
|
AGENT_CAPABLE: context.agentCapable,
|
|
@@ -93,12 +96,30 @@ export function wrapWithSkillFrontmatter(name, content) {
|
|
|
93
96
|
}
|
|
94
97
|
return `---\nname: ${name}\ndescription: "${description}"\n---\n\n${content}`;
|
|
95
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* One-line blurbs shown in a `/` command palette — kept separate from
|
|
101
|
+
* SKILL_DESCRIPTIONS, which is long prose aimed at the skill matcher.
|
|
102
|
+
*/
|
|
103
|
+
const COMMAND_DESCRIPTIONS = {
|
|
104
|
+
start: "Initialize a Trellis development session.",
|
|
105
|
+
continue: "Resume work on the current task at the correct phase.",
|
|
106
|
+
"finish-work": "Wrap up the current session: quality gate, commit reminder, archive, journal.",
|
|
107
|
+
};
|
|
108
|
+
/** Wrap resolved command content with YAML frontmatter (name + description). */
|
|
109
|
+
export function wrapWithCommandFrontmatter(name, content) {
|
|
110
|
+
const baseName = name.replace(/^trellis-/, "");
|
|
111
|
+
const description = COMMAND_DESCRIPTIONS[baseName];
|
|
112
|
+
if (!description) {
|
|
113
|
+
throw new Error(`Missing command description for "${baseName}". Add it to COMMAND_DESCRIPTIONS in shared.ts.`);
|
|
114
|
+
}
|
|
115
|
+
return `---\nname: ${name}\ndescription: ${description}\n---\n\n${content}`;
|
|
116
|
+
}
|
|
96
117
|
// ---------------------------------------------------------------------------
|
|
97
118
|
// Shared configurator helpers
|
|
98
119
|
// ---------------------------------------------------------------------------
|
|
99
120
|
import path from "node:path";
|
|
100
121
|
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
101
|
-
import { getCommandTemplates, getSkillTemplates, } from "../templates/common/index.js";
|
|
122
|
+
import { getBundledSkillTemplates, getCommandTemplates, getSkillTemplates, } from "../templates/common/index.js";
|
|
102
123
|
/**
|
|
103
124
|
* Filter command templates based on platform capabilities.
|
|
104
125
|
*
|
|
@@ -152,17 +173,46 @@ export function resolveSkills(ctx) {
|
|
|
152
173
|
content: wrapWithSkillFrontmatter(`trellis-${tmpl.name}`, resolvePlaceholders(tmpl.content, ctx)),
|
|
153
174
|
}));
|
|
154
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Resolve multi-file built-in skills.
|
|
178
|
+
*
|
|
179
|
+
* Unlike workflow skills, bundled skills already contain their own SKILL.md
|
|
180
|
+
* frontmatter and may include references/assets. They are still rendered
|
|
181
|
+
* through placeholder resolution so init and update get byte-identical output.
|
|
182
|
+
*/
|
|
183
|
+
export function resolveBundledSkills(ctx) {
|
|
184
|
+
return getBundledSkillTemplates().flatMap((skill) => skill.files.map((file) => ({
|
|
185
|
+
relativePath: `${skill.name}/${file.relativePath}`,
|
|
186
|
+
content: resolvePlaceholders(file.content, ctx),
|
|
187
|
+
})));
|
|
188
|
+
}
|
|
155
189
|
// ---------------------------------------------------------------------------
|
|
156
190
|
// Shared configurator write helpers
|
|
157
191
|
// ---------------------------------------------------------------------------
|
|
158
|
-
/**
|
|
159
|
-
export
|
|
192
|
+
/** Collect skill files under a target root for update hash tracking. */
|
|
193
|
+
export function collectSkillTemplates(skillsRoot, skills, bundledSkills = []) {
|
|
194
|
+
const files = new Map();
|
|
195
|
+
for (const skill of skills) {
|
|
196
|
+
files.set(`${skillsRoot}/${skill.name}/SKILL.md`, skill.content);
|
|
197
|
+
}
|
|
198
|
+
for (const skillFile of bundledSkills) {
|
|
199
|
+
files.set(`${skillsRoot}/${skillFile.relativePath}`, skillFile.content);
|
|
200
|
+
}
|
|
201
|
+
return files;
|
|
202
|
+
}
|
|
203
|
+
/** Write skill directories from resolved templates and bundled skill files. */
|
|
204
|
+
export async function writeSkills(skillsRoot, skills, bundledSkills = []) {
|
|
160
205
|
ensureDir(skillsRoot);
|
|
161
206
|
for (const skill of skills) {
|
|
162
207
|
const skillDir = path.join(skillsRoot, skill.name);
|
|
163
208
|
ensureDir(skillDir);
|
|
164
209
|
await writeFile(path.join(skillDir, "SKILL.md"), skill.content);
|
|
165
210
|
}
|
|
211
|
+
for (const skillFile of bundledSkills) {
|
|
212
|
+
const targetPath = path.join(skillsRoot, skillFile.relativePath);
|
|
213
|
+
ensureDir(path.dirname(targetPath));
|
|
214
|
+
await writeFile(targetPath, skillFile.content);
|
|
215
|
+
}
|
|
166
216
|
}
|
|
167
217
|
/** Write agent/droid definition files */
|
|
168
218
|
export async function writeAgents(agentsDir, agents, ext = ".md") {
|
|
@@ -171,14 +221,11 @@ export async function writeAgents(agentsDir, agents, ext = ".md") {
|
|
|
171
221
|
await writeFile(path.join(agentsDir, `${agent.name}${ext}`), agent.content);
|
|
172
222
|
}
|
|
173
223
|
}
|
|
174
|
-
/** Write shared hook scripts
|
|
175
|
-
export async function writeSharedHooks(hooksDir,
|
|
176
|
-
const {
|
|
177
|
-
const exclude = new Set(options.exclude ?? []);
|
|
224
|
+
/** Write the shared hook scripts that `platform` actually registers. */
|
|
225
|
+
export async function writeSharedHooks(hooksDir, platform) {
|
|
226
|
+
const { getSharedHookScriptsForPlatform } = await import("../templates/shared-hooks/index.js");
|
|
178
227
|
ensureDir(hooksDir);
|
|
179
|
-
for (const hook of
|
|
180
|
-
if (exclude.has(hook.name))
|
|
181
|
-
continue;
|
|
228
|
+
for (const hook of getSharedHookScriptsForPlatform(platform)) {
|
|
182
229
|
await writeFile(path.join(hooksDir, hook.name), hook.content);
|
|
183
230
|
}
|
|
184
231
|
}
|
|
@@ -191,12 +238,15 @@ export function buildPullBasedPrelude(agentType) {
|
|
|
191
238
|
|
|
192
239
|
This platform does NOT auto-inject task context via hook. Before doing anything else, you MUST load context yourself:
|
|
193
240
|
|
|
194
|
-
1.
|
|
241
|
+
1. Run \`python3 ./.trellis/scripts/task.py current --source\` to find the active task path and source (e.g. \`Current task: .trellis/tasks/04-17-foo\`).
|
|
195
242
|
2. Read the task's \`prd.md\` (requirements) and \`info.md\` if it exists (technical design).
|
|
196
243
|
3. Read \`<task-path>/${jsonl}\` — JSONL list of dev spec files relevant to this agent.
|
|
197
244
|
4. For each entry in the JSONL, Read its \`file\` path — these are the dev specs you must follow.
|
|
245
|
+
**Skip rows without a \`"file"\` field** (e.g. \`{"_example": "..."}\` seed rows left over from \`task.py create\` before the curator ran).
|
|
246
|
+
|
|
247
|
+
If \`${jsonl}\` has no curated entries (only a seed row, or the file is missing), fall back to: read \`prd.md\`, list available specs with \`python3 ./.trellis/scripts/get_context.py --mode packages\`, and pick the specs that match the task domain yourself. Do NOT block on the missing jsonl — proceed with prd-only context plus your spec judgment.
|
|
198
248
|
|
|
199
|
-
If
|
|
249
|
+
If there is no active task or the task has no \`prd.md\`, ask the user what to work on; do NOT proceed without context.
|
|
200
250
|
|
|
201
251
|
---
|
|
202
252
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/configurators/shared.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/configurators/shared.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CACzC,WAA4B,OAAO,CAAC,QAAQ;IAE5C,OAAO,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;AACrD,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,kDAAkD;AAClD,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAC5C,MAAM,UAAU,GAAG,+BAA+B,CAAC;AACnD,MAAM,cAAc,GAAG,sBAAsB,CAAC;AAC9C,MAAM,oBAAoB,GAAG,4BAA4B,CAAC;AAC1D,MAAM,WAAW,GAAG,mBAAmB,CAAC;AACxC,MAAM,cAAc,GAAG,SAAS,CAAC;AAEjC,MAAM,iBAAiB,GAAG,CAAC,eAAe,EAAE,WAAW,CAAU,CAAC;AAClE,MAAM,mBAAmB,GAAG,MAAM,CAAC,WAAW,CAC5C,iBAAiB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;IAC9B,IAAI;IACJ;QACE,GAAG,EAAE,IAAI,MAAM,CACb,UAAU,IAAI,4BAA4B,IAAI,QAAQ,EACtD,GAAG,CACJ;QACD,GAAG,EAAE,IAAI,MAAM,CACb,YAAY,IAAI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,CAAC;QAC7D,OAAO,IAAI,KAAK,mBAAmB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC;IAC9D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAYD,MAAM,UAAU,6BAA6B,CAC3C,MAA+B;IAE/B,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACtB,MAAM,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,CAAC;YAAE,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO;YACL,GAAG,CAAC;YACJ,OAAO,EAAE,8BAA8B,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACtD,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,MAA+B;IAE/B,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACtB,MAAM,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,CAAC;YAAE,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO;YACL,GAAG,CAAC;YACJ,OAAO,EAAE,0BAA0B,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SAClD,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windsurf.d.ts","sourceRoot":"","sources":["../../src/configurators/windsurf.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"windsurf.d.ts","sourceRoot":"","sources":["../../src/configurators/windsurf.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBlE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { AI_TOOLS } from "../types/ai-tools.js";
|
|
3
3
|
import { ensureDir, writeFile } from "../utils/file-writer.js";
|
|
4
|
-
import { resolveCommands, resolveSkills } from "./shared.js";
|
|
4
|
+
import { resolveBundledSkills, resolveCommands, resolveSkills, writeSkills, } from "./shared.js";
|
|
5
5
|
/**
|
|
6
6
|
* Configure Windsurf:
|
|
7
7
|
* - workflows/ — start + finish-work as slash commands
|
|
@@ -14,12 +14,6 @@ export async function configureWindsurf(cwd) {
|
|
|
14
14
|
for (const cmd of resolveCommands(ctx)) {
|
|
15
15
|
await writeFile(path.join(workflowsDir, `trellis-${cmd.name}.md`), cmd.content);
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
ensureDir(skillsDir);
|
|
19
|
-
for (const skill of resolveSkills(ctx)) {
|
|
20
|
-
const skillDir = path.join(skillsDir, skill.name);
|
|
21
|
-
ensureDir(skillDir);
|
|
22
|
-
await writeFile(path.join(skillDir, "SKILL.md"), skill.content);
|
|
23
|
-
}
|
|
17
|
+
await writeSkills(path.join(cwd, ".windsurf", "skills"), resolveSkills(ctx), resolveBundledSkills(ctx));
|
|
24
18
|
}
|
|
25
19
|
//# sourceMappingURL=windsurf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"windsurf.js","sourceRoot":"","sources":["../../src/configurators/windsurf.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"windsurf.js","sourceRoot":"","sources":["../../src/configurators/windsurf.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AAErB;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,GAAW;IACjD,MAAM,GAAG,GAAG,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC;IAE9C,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAC9D,SAAS,CAAC,YAAY,CAAC,CAAC;IACxB,KAAK,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,MAAM,SAAS,CACb,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,CAAC,IAAI,KAAK,CAAC,EACjD,GAAG,CAAC,OAAO,CACZ,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,CACf,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,QAAQ,CAAC,EACrC,aAAa,CAAC,GAAG,CAAC,EAClB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -19,6 +19,8 @@ export declare const DIR_NAMES: {
|
|
|
19
19
|
readonly SCRIPTS: "scripts";
|
|
20
20
|
};
|
|
21
21
|
export declare const FILE_NAMES: {
|
|
22
|
+
/** Root agent instructions file */
|
|
23
|
+
readonly AGENTS: "AGENTS.md";
|
|
22
24
|
/** Developer identity file */
|
|
23
25
|
readonly DEVELOPER: ".developer";
|
|
24
26
|
/** Current task pointer */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/constants/paths.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,eAAO,MAAM,SAAS;IACpB,8BAA8B;;IAE9B,mEAAmE;;IAEnE,+DAA+D;;IAE/D,u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3B,OAAO,GAAG,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;AAC/C,CAAC"}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"breaking": true,
|
|
5
5
|
"recommendMigrate": true,
|
|
6
6
|
"changelog": "**Skill-first template architecture.** Commands and skills now live under `packages/cli/src/templates/common/` as a single source of truth (3 commands + 5 skills). All 13 platforms resolve from common/ + per-platform adapters. Eliminates the prior N-copies-of-same-content drift that caused stale commands to linger on some platforms but not others.\n\n## Hooks + agents for 7 new platforms\n\nQoder, CodeBuddy, Factory Droid, Cursor, Gemini CLI, Kiro, and GitHub Copilot go from commands-only to fully agent-capable. Each ships:\n- Sub-agent definitions (implement / check / research) in the platform's native format (Claude-like Markdown, Kiro JSON, Gemini settings.json, Copilot agent.md, Droid droids/, CodeBuddy nested commands)\n- Hook configuration wired via `shared-hooks/` Python scripts (session-start, inject-subagent-context, statusline) — single implementation, cross-platform output adapters\n- Claude Code hooks migrated from its own 1,435-line set to the shared-hooks implementation (dead fallback code removed — `AGENT_DEBUG`, `spec.jsonl`/`research.jsonl` reads, hardcoded `check-cross-layer.md` reference)\n\n## Sub-agent context injection: class-1 hook vs class-2 pull-based\n\nCodex, Copilot, Gemini, and Qoder (class-2) can't reliably receive hook-modified sub-agent prompts (platform bugs or architectural limits: Codex PreToolUse only fires for Bash; Copilot #2392/#2540; Gemini #18128; Qoder has no Task tool). These 4 platforms now use a **pull-based prelude**: sub-agent definitions include an up-front instruction block that makes the sub-agent Read `.current-task` + `prd.md` + `implement.jsonl`/`check.jsonl` themselves on first turn. Class-1 platforms (Claude / Cursor / OpenCode / Kiro / CodeBuddy / Droid) continue with hook-based push injection. Both paths implemented in shared infrastructure so future platforms only pick one.\n\n## Workflow enforcement v2: per-turn breadcrumb hook\n\nNew `inject-workflow-state.py` shared hook fires on every user prompt (UserPromptSubmit equivalent on 8 platforms; `chat.message` on OpenCode Bun plugin). Injects a <200-byte `<workflow-state>` block nudging AI toward the next workflow step based on current `task.json.status`. Tag-block content is pulled from `workflow.md` `[workflow-state:STATUS]` blocks — users who fork the workflow edit one markdown file, not Python. Covers four states: `no_task` / `planning` / `in_progress` / `completed`; recognizes hyphenated custom statuses (`in-review`, etc.). Three-tier fallback (workflow.md missing → partial tag → unknown status) so the hook never breaks a conversation. Kiro downgraded — no per-turn main-session hook available upstream.\n\n## SessionStart payload restructure\n\nThe SessionStart `<workflow>` block grew from 2.7 KB (TOC + Phase Index) to 9.5 KB by inlining Phase 1/2/3 step bodies — AI now has step-level how-to up front instead of lazy-loading via `get_context.py --mode phase --step X.Y`. Funded by shrinking `<guidelines>` from 10.9 KB to 4.6 KB: the cross-package `guides/index.md` stays inlined, but other `spec/<pkg>/<layer>/index.md` files are listed as paths only (sub-agents get their specific specs via jsonl injection, main agent doesn't need index content in context). Total session-start payload: 16.7 KB (under Claude Code's ~20 KB truncate threshold). `workflow.md` itself slimmed 17 KB → 14 KB: English-only (was bilingual), removed `What is Trellis` intro + File Structure tree + redundant Best Practices section, task.py command table expanded from 5 → 16 subcommands per PR #169's structure.\n\n## Legacy cleanup (126-entry safe-file-delete migration)\n\nThis release removes four categories of primitives whose replacement is now the default:\n\n- **iFlow platform** — CLI unmaintained; entire `.iflow/` tree + template source removed\n- **Multi-agent pipeline** (`.trellis/scripts/multi_agent/` + `worktree.yaml`) — all major CLIs now ship their own worktree support; Trellis doesn't need to reimplement\n- **Ralph Loop hook** (`ralph-loop.py`) — SubagentStop + exit-code-2 enforcement not portable across platforms; check agent's self-fix loop is sufficient\n- **Six commands + three sub-agents** — `parallel` (superseded by native worktrees), `onboard`/`create-command`/`integrate-skill` (low usage), `check-cross-layer` (merged into `check`), `record-session` (subsumed by `/finish-work`); `dispatch`/`debug`/`plan` agents (replaced by skill routing)\n\nAll cleanup is hash-verified: if you modified any of these files locally they stay put with a warning; only pristine Trellis-written copies get removed. 126 safe-file-delete entries cover the full surface across all 13 platforms.\n\n## Other improvements\n\n- `task.py create` stops writing legacy `current_phase` / `next_action` fields (FP-analysis outcome: workflow.md's Phase N.M is documentation layering, not runtime state; `task.json.status` is the sole task-level state)\n- `inject-subagent-context.py` `update_current_phase()` function deleted (was re-writing legacy `current_phase` on every Task spawn, undoing the deprecation)\n- Codex hooks integration: `configureCodex` now auto-writes shared-hooks (was skipping them); stderr warning on `trellis init --codex` about `features.codex_hooks = true` requirement in user's `~/.codex/config.toml`\n- `get_context.py --mode phase` (no `--step`) returns Phase Index + Phase 1/2/3 bodies (was Phase Index only) — agent-less platforms running `/start` manually get the same content as hook-based platforms\n- Workflow.md `[workflow-state:STATUS]` tag convention: supports hyphens in custom statuses (`in-review`, `blocked-by-team`); unknown statuses emit a generic fallback instead of silent-exit\n- Hook-path CWD robustness (partial): `inject-workflow-state.py` walks up from CWD to find `.trellis/` — fixes subdirectory / submodule CWD drift for this hook. Full coverage across all hooks is a post-beta task.\n\n## Deferred to post-beta\n\n- Kiro `agentSpawn` hook output-format validation in real environment\n- Cursor / CodeBuddy / Droid sub-agent hook injection real-env testing\n- Full hook-path CWD-robustness across all platforms (Windows cmd/PowerShell)\n- Parent-child Trellis config (issue #172 — submodule inheriting root spec)\n\n## Spec docs updated\n\n- `platform-integration.md` — new sections: Workflow State Injection (per-turn breadcrumb), Subagent Context Injection: Hook-based vs Pull-based, Guidelines: Paths-only vs Inline, Per-Turn Hook design principle (no silent-exit on \"nothing to say\")\n- `quality-guidelines.md` — new section: Schema Deprecation: Audit ALL Writers, Not Just the Creator (based on a Codex cross-review finding where `cmd_create` dropped a field but a hook kept re-writing it)\n- `workflow.md` — full English translation; slim structure; task.py 16-subcommand reference table\n- `directory-structure.md` + `script-conventions.md` — multi-agent references removed",
|
|
7
|
+
"migrationGuide": "## 0.4.x → 0.5.x: What This Release Actually Changes\n\n0.5.0-beta.0 is a **breaking** release. Pre-existing 0.4.x projects need `trellis update --migrate` to sync. The update runs **206 migration entries** (renames + hash-verified safe-file-deletes); the patch is non-destructive but large, so expect a handful of confirm prompts.\n\n### 1. Skills got renamed: `skills/<name>/` → `skills/trellis-<name>/`\n\nAll Trellis skill directories gained a `trellis-` prefix. 60+ rename migrations cover every platform (`.claude/`, `.cursor/`, `.agents/`, `.kiro/`, `.qoder/`, etc.).\n\n- **Unmodified skills**: renamed silently.\n- **Skills you customized**: confirm prompt. Pressing Enter (default = backup-rename) is always safe — your edits land at the new `trellis-<name>/` path intact.\n\n### 2. Six commands + three sub-agents retired\n\n| Old (removed) | Replacement |\n|---|---|\n| `/record-session` | merged into `/trellis:finish-work` Step 3 |\n| `/check-cross-layer` | merged into `/trellis:check` |\n| `/parallel` | use your CLI's native worktree/parallel support |\n| `/onboard` | superseded by auto-generated onboarding tasks |\n| `/create-command` | low-usage, unshipped |\n| `/integrate-skill` | low-usage, unshipped |\n| `dispatch` / `debug` / `plan` sub-agents | replaced by skill routing (`trellis-brainstorm`, `trellis-check`, `trellis-break-loop`) |\n\nIf any of these you relied on: replace the invocation with the right column. `/record-session` → `/trellis:finish-work` is the most common fix.\n\n### 3. Multi-Agent Pipeline gone\n\n`.trellis/scripts/multi_agent/`, `worktree.yaml`, and the Ralph Loop hook have been removed (138-entry safe-file-delete). Native worktree support in Claude / Cursor / etc. covers this space now. If you built automation around these, you'll need to port it to the platform's native primitives.\n\n### 4. iFlow dropped\n\nThe `.iflow/` platform adapter was unmaintained upstream and has been removed. Existing `.iflow/` installs keep working on 0.4.x; switch to a supported platform (`--claude` / `--cursor` / `--codex` / etc.) to stay on 0.5.x.\n\n### 5. task.py schema cleanup\n\n`task.py create` stops writing legacy `current_phase` / `next_action` fields. Existing task.json files keep working (Python readers treat missing fields as null). New tasks from 0.5.x produce the canonical 24-field shape.\n\n### 6. New runtime: per-turn workflow breadcrumb + sub-agent context injection\n\nNo user action needed — these are internal flow improvements. But if you hand-edit `.claude/settings.json` / `.codex/hooks.json` / etc., `trellis update` will want to overwrite the hooks block; your custom hooks land on the `Modified by you` prompt so you can review the merge.\n\n## How to upgrade\n\n```bash\ntrellis update --migrate\n```\n\n- `--migrate` is REQUIRED for breaking releases — without it, `trellis update` exits 1 telling you to add it.\n- Hash-verified migrations mean your local customizations stay; unmodified Trellis templates get updated silently.\n- The confirm prompts inline a `reason` explaining each prompt; Enter (default) is safe.\n- Codex users: enable `features.codex_hooks = true` in `~/.codex/config.toml` to activate SessionStart + UserPromptSubmit hook injection (feature-flagged by Codex itself).",
|
|
8
|
+
"aiInstructions": "When helping a user migrate from 0.4.x to 0.5.x:\n\n1. **Check for retired commands first**. Grep the user's codebase / shell history / aliases for `/record-session`, `/check-cross-layer`, `/parallel`, `/onboard`, `/create-command`, `/integrate-skill`. For each match, help them replace per the table in the guide — most common case is `/record-session` → `/trellis:finish-work`.\n\n2. **Run `trellis update --migrate`**. Walk them through the prompts if any fire — 0.4 didn't hash-track certain SKILL.md files, so pristine copies may show as modified. The per-prompt `reason` explains this; pressing Enter (backup-rename) is always safe.\n\n3. **Don't try to preserve Multi-Agent Pipeline state**. If the user has `.trellis/scripts/multi_agent/`, `worktree.yaml`, or Ralph Loop hooks in local edits, explicitly tell them the feature has no replacement in 0.5 beyond the platform's native worktree support. Help them identify which of their automation still needs porting.\n\n4. **If they're on `.iflow/`**: the platform is gone. Help them pick a supported platform (`--claude` / `--cursor` / `--codex` / etc.) and run `trellis init --<platform>` on the project to add it. `.iflow/` can be manually deleted after.\n\n5. **After migrate**, run `trellis update` a second time and confirm it says \"Already up to date!\" — any remaining diff indicates an incomplete migration (usually a skill that the user customized and that needs a manual decision).\n\n6. **Skill paths in existing task jsonl files**: if the user has active tasks with `implement.jsonl` / `check.jsonl` referencing old paths (e.g. `.kiro/skills/check/SKILL.md` without `trellis-`), those paths now 404. Re-run `task.py init-context <task-dir> <type> --platform <platform>` to regenerate with correct paths.\n\n7. **Codex feature flag**: remind them to set `features.codex_hooks = true` in `~/.codex/config.toml`, otherwise SessionStart injection is silently skipped and they'll wonder why workflow breadcrumbs don't show up.",
|
|
7
9
|
"notes": "**Breaking release — run `trellis update` to sync.**\n\nExisting projects on 0.4.x:\n1. Run `trellis update --migrate` (the `--migrate` flag is REQUIRED — 68 rename entries don't auto-execute without it, and the new breaking-change gate will exit 1 telling you to add it)\n2. The 138-entry safe-file-delete runs next (hash-verified — locally modified files are preserved with a warning, only pristine Trellis-written files are removed)\n3. New templates are written for the 7 newly-agent-capable platforms and the shared-hooks set\n4. iFlow users: the .iflow/ directory will be removed. Copy it out first if you want to keep it.\n\n**A few confirmation prompts are expected** and safe to accept. Trellis 0.4.0 failed to track certain skill-only `finish-work` and `update-spec` SKILL.md hashes in `.template-hashes.json`, so pristine copies show as modified. The prompt's per-entry `reason` field explains this inline; pressing Enter (default = backup-rename) is always safe.\n\nIf you had customized the removed commands (parallel / onboard / check-cross-layer / record-session / create-command / integrate-skill) or the dispatch/debug/plan sub-agents, the safe-file-delete hash check will skip them and log a warning. Remove manually after reviewing whether the new skill routing (trellis-brainstorm / before-dev / check / break-loop / update-spec) covers your use case.\n\n`/trellis:record-session` is gone — its one job (writing the session journal via add_session.py) is now Step 3 of `/trellis:finish-work`. Replace any aliases / scripts that call `record-session` with `finish-work`.\n\nCodex users: enable `features.codex_hooks = true` in `~/.codex/config.toml` to get SessionStart + UserPromptSubmit breadcrumb injection (the feature-flag is gated by Codex; without it hooks.json is silently ignored).\n\nInstall: `npm install -g @mindfoldhq/trellis@beta`",
|
|
8
10
|
"migrations": [
|
|
9
11
|
{
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.10",
|
|
3
|
+
"description": "Hotfix: three bugs in `trellis update --migrate` / `init-context` (codex/kiro skill `trellis-` prefix, `.agents/` detection, `--platform` threading) + migrationGuide back-fill on 0.5.0-beta.0 / 0.5.0-beta.5 + docs-site changelog pre-release gate.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug fixes (no --migrate required):**\n- fix(cli_adapter): codex/kiro branches of `get_trellis_command_path` now emit the `trellis-` prefix introduced by 0.5.0-beta.0 — previously `init-context` wrote `check.jsonl` paths that 404'd on codex/kiro projects.\n- fix(detect_platform): removed `.agents/` from the config-dir enumeration (it's a shared cross-platform skills layer consumed by Codex / Amp / Cline / Kimi / Warp, not a platform directory). Added a guarded codex fallback so repos whose only signal is `.agents/skills/trellis-*` still identify as codex.\n- feat(init-context): `task.py init-context` accepts `--platform`; skill/command templates thread it end-to-end via `{{CLI_FLAG}}` instead of re-detecting from the filesystem at runtime.\n- fix(migrations): back-filled `migrationGuide` + `aiInstructions` on 0.5.0-beta.0 (0.4→0.5 narrative: skill renames, retired commands, multi-agent-pipeline removal, iFlow drop, task.json schema cleanup) and 0.5.0-beta.5 (sub-agent rename). Both breaking releases previously shipped with no guide, so `update --migrate` PRDs fell back to 0.3/0.4 historical content.\n- feat(release): `create-manifest.js` now rejects `breaking && recommendMigrate && !migrationGuide`; `release:beta` / `release:rc` / `release:promote` pre-flight `check-docs-changelog.js` to catch missing docs-site changelog pages before tagging.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Pure runtime/tooling bug fix; no user file operations. Upgrading from beta.9: if you ran `trellis update --migrate` before beta.10 on a codex/kiro project, the `check.jsonl` generated then points at pre-prefix skill paths — re-run `task.py init-context <task-dir> <type> --platform <platform>` or recreate the task. If on 0.4.x, the migration task PRD now contains the real 0.4→0.5 guide."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.11",
|
|
3
|
+
"description": "Hotfix: SessionStart hook crashed on PEP 604 annotations when the AI CLI spawned python3 as system 3.9 even though the user's shell had 3.11. Also relaxes declared Python floor from 3.10 to 3.9. Not breaking; no --migrate required.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- fix(hooks): `shared-hooks/session-start.py` and `shared-hooks/inject-subagent-context.py` now declare `from __future__ import annotations`. Without it, PEP 604 union annotations (`str | None`, `dict | None`) were evaluated at function-def time and crashed on `python3` < 3.10 with `TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'`. Observed in the field on macOS where the user's shell `python3` was 3.11 (homebrew) but the AI CLI host resolved the hook subprocess `python3` via a minimal PATH, falling back to `/usr/bin/python3` → system 3.9. `statusline.py` and the copilot/codex copies of session-start already had the future import; the two canonical `shared-hooks/*.py` files were the outliers.\n\n**Improvements:**\n- feat(cli): Python version floor relaxed from 3.10 to 3.9. `packages/cli/src/commands/init.ts` now sets `MIN_MINOR = 9` — matches macOS Ventura/Sonoma/Sequoia system `python3` (3.9.6). Trellis-distributed Python templates were verified via full package-import matrix on CPython 3.8–3.13 (30/30 pass). Python 3.8 is not supported (EOL 2024-10; declaring support would incur CVE backport obligations).\n- docs: `README.md`, `docs-site/quickstart.mdx` (+ zh), `docs-site/start/install-and-first-task.mdx` (+ zh), `docs-site/advanced/multi-platform.mdx` (+ zh), and `docs-site/advanced/appendix-f.mdx` (+ zh) all updated to `Python 3.9+`. New Prerequisites table on the Quickstart page lists Node / Python / git floors up front (previously undocumented on the docs site).",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Existing projects: run `trellis update` to pick up the two patched hook files. Hashes match pristine installs; locally-modified copies land on the standard confirm prompt. If you're on Python 3.9 and saw the `Python ≥ 3.10` warning during past `trellis init` runs, the warning is gone — no action needed."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.12",
|
|
3
|
+
"description": "Phase 1.3 is now agent-curated. `task.py init-context` removed; `task.py create` seeds `implement.jsonl` / `check.jsonl` with a self-describing `_example` line on sub-agent-capable platforms, and the AI fills real spec + research entries per workflow.md Phase 1.3. Session-start READY gate across 4 implementations now requires at least one curated entry, not just file existence. Skill Routing tables split per-platform — sub-agent platforms no longer see `trellis-before-dev`. Fixes `trellis update` backup-phase stack-overflow on repos with nested `.backup-*/.opencode/node_modules`. Release pipeline hardened with manifest-continuity guard + guards against overwriting published manifests. Restored the missing `0.5.0-beta.10.json` manifest. Not breaking; existing tasks keep working.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Behavioral changes:**\n- feat(workflow): Phase 1.3 rewritten from \"run `task.py init-context`\" to \"AI curates jsonl directly\". New rule — `implement.jsonl` / `check.jsonl` hold spec + research paths only, never code paths. `task.py create` seeds each jsonl with one self-describing `{\"_example\": \"...\"}` line on sub-agent-capable platforms (Claude / Cursor / Codex / Kiro / Gemini / OpenCode / Qoder / CodeBuddy / Droid / Copilot). Agent-less platforms (Kilo / Antigravity / Windsurf) skip seeding and load specs via the `trellis-before-dev` skill as before.\n- fix(task.py): `init-context` subcommand removed. Invoking it exits 2 with a deprecation message pointing at workflow.md Phase 1.3 and `task.py add-context` for ergonomic editing. `cmd_init_context`, `get_implement_backend`, `get_implement_frontend`, `get_check_context` deleted from `common/task_context.py`.\n- fix(session-start): READY detection requires at least one jsonl row with a `file` key. Seed-only jsonl now surfaces as `Status: PLANNING (Phase 1.3)` with Next-Action pointing at the curate step. Applied across all four implementations: `shared-hooks/session-start.py` (Claude / Cursor / Kiro / CodeBuddy / Droid / Gemini / Qoder), `codex/hooks/session-start.py`, `copilot/hooks/session-start.py`, `opencode/plugins/session-start.js`.\n- feat(workflow.md): Skill Routing and DO-NOT-skip tables split into `[Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]` and `[Kilo, Antigravity, Windsurf]` variants. Sub-agent platforms no longer surface `trellis-before-dev` in the routing table — the main-thread job on those platforms is to dispatch `trellis-implement`, not load spec skills.\n- feat(shared-hooks): `inject-subagent-context.py:read_jsonl_entries` emits a single stderr warning when the jsonl is missing or contains only seed rows, so Class-1 platforms have a clear debug signal instead of silent empty injection.\n- feat(configurators/shared.ts): Class-2 pull-based prelude (Codex / Copilot / Gemini / Qoder) now teaches sub-agents to skip rows without a `file` field and fall back to prd.md + self-discovered specs when the jsonl has only a seed row.\n\n**Bug fixes:**\n- fix(update): `trellis update` no longer crashes with `Maximum call stack size exceeded` during the backup phase. Root cause: `createFullBackup` descended into old `.trellis/.backup-*/` directories (which could contain nested `.opencode/node_modules` — tens of thousands of files), and `collectAllFiles` combined recursion with `files.push(...largeArray)` spread. Rewritten as iterative stack traversal. Exclude dirs (`node_modules`, `.backup-*`, etc.) are now skipped at scan time instead of copy time. Symlinks and Windows NTFS junctions are skipped to avoid cyclic scans. `BACKUP_EXCLUDE_PATTERNS` matching normalizes backslashes to forward slashes so Windows paths like `.claude\\worktrees\\...` match. `DEBUG=1` / `TRELLIS_DEBUG=1` env now prints full stack traces for easier triage. See `update.ts:683-790`, `cli/index.ts:130`.\n\n**Release tooling:**\n- feat(release): new `packages/cli/scripts/check-manifest-continuity.js` — pre-release gate that queries npm for published versions and fails non-zero if any lacks a local manifest. Hooked into `release` / `release:minor` / `release:major` / `release:beta` / `release:rc` / `release:promote` before `pnpm test`. Historical gaps (0.1.x pre-manifest era, 0.2.1–0.2.11 old monolith, 0.3.10-beta.0 first public prerelease) whitelisted in `KNOWN_GAPS`; the list documents that it should not be extended.\n- feat(create-manifest): `create-manifest.js` now refuses to (re)write a manifest whose version is already on npm — even with `force: true`. Interactive mode also checks npm before the existing local-file overwrite prompt.\n- fix(migrations): restored `packages/cli/src/migrations/manifests/0.5.0-beta.10.json`. Reconstructed from the actual tarball content (three bug fixes + migrationGuide back-fills + docs-site changelog pre-release gate), not the earlier Qoder-split draft that was consolidated into beta.9 before publish. `KNOWN_GAPS` shrinks from 22 to 21.\n\n**Test fixes:**\n- fix(test): `update.integration.test.ts` and `init-joiner.integration.test.ts` `vi.mock(\"node:child_process\")` now conditionally returns `\"Python 3.11.12\"` on `python3 --version` calls instead of blanket `\"\"`. Resolves 36 pre-existing failures caused by `requireSupportedPython` throwing `Python command not found` in vitest child processes. Full suite now 664/664 green.\n- test(update): regression coverage for the backup-phase crash added in `test/commands/update-internals.test.ts` and `test/commands/update.integration.test.ts`.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "**Existing tasks**: keep working. Consumers (hook, prelude, validate, list-context) all skip rows without a `file` key, so old `_example` seed rows are naturally ignored. If your existing `implement.jsonl` / `check.jsonl` were generated by 0.5.0-beta.11-and-earlier `init-context` and point at paths that don't exist in your monorepo spec layout (typical when `package = backend | frontend` instead of `package = business-domain`), re-curate per workflow.md Phase 1.3 — or leave them alone and the sub-agent falls back to prd.md + stderr warning.\n\n**AI instructions (for an agent helping a user through this change)**:\n\n1. Do NOT run `task.py init-context` — it's gone. If you see the deprecation error (exit 2), read `.trellis/workflow.md` Phase 1.3 and curate jsonl directly.\n2. When creating a new task, `task.py create` already seeds empty-but-valid jsonl on sub-agent platforms. Your Phase 1.3 job: open `implement.jsonl` / `check.jsonl`, replace the `_example` line with real `{\"file\": ..., \"reason\": ...}` entries pointing at `.trellis/spec/**/*.md` and `{TASK_DIR}/research/**/*.md` that apply to the task. Never list code files — those are read during Phase 2 implement, not pre-registered.\n3. Run `python3 ./.trellis/scripts/get_context.py --mode packages` to discover which spec layers are available in the current project.\n4. If the session-start breadcrumb shows `Status: PLANNING (Phase 1.3)` right after task.py create, that is correct — it means curation hasn't happened yet. Proceed with Phase 1.3 per workflow.md. The READY status only appears after at least one curated entry is written.\n5. If a user's old task was created under 0.5.0-beta.11 with `init-context` output pointing at `.trellis/spec/<pkg>/backend/index.md` and those paths don't exist on their monorepo, don't try to 'fix' the old script — re-curate the jsonl to the paths that actually exist. Use the `add-context` command or edit the file directly.\n\n**Workaround for users still on a pre-beta.12 published CLI who hit the `Maximum call stack size exceeded` crash during `trellis update`**: `rm -rf .trellis/.backup-*` drops the nested-node_modules source of the overflow, then re-run `trellis update` (still on the old CLI) to complete the upgrade, OR upgrade to beta.12 first via `npm i -g @mindfoldhq/trellis@0.5.0-beta.12` and run update from there."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.13",
|
|
3
|
+
"description": "Patch follow-up to beta.12: `task.py start` now transitions `task.json` status planning → in_progress (previously stuck at planning even after the user explicitly started work). Codex sub-agent instructions for seed-row handling — written into the dogfood root during beta.11's init-context-removal but never backported into `packages/cli/src/templates/codex/agents/` — are now in the packaged templates, so fresh `trellis init` / `trellis update` finally ship Phase 1.3 fallback guidance to Codex users. `.codex/config.toml` documents the `features.codex_hooks` user-level opt-in. No src/ changes; `trellis update` is a straight content refresh.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Bug Fixes:**\n- fix(task.py): `task.py start <task>` transitions `task.json` status `planning` → `in_progress`. Previously `cmd_start` only wrote `.current-task` and ran `after_start` hooks — user explicitly started work but status stayed at `planning`. Non-`planning` statuses (`in_progress`, `review`, `completed`) are preserved on resume so replays don't clobber progress. See `packages/cli/src/templates/trellis/scripts/task.py:cmd_start`.\n- fix(templates/codex): backport the \"Required: Load Trellis Context First\" preamble into packaged `codex/agents/trellis-check.toml` and `codex/agents/trellis-implement.toml`. The block teaches Codex sub-agents to (1) skip `{\"_example\": ...}` seed rows and (2) fall back to prd-only context plus self-discovered specs via `get_context.py --mode packages` when the jsonl has no curated entries. It was edited into the dogfood root during beta.11 init-context-removal but never propagated into `packages/cli/src/templates/codex/agents/`, so up through beta.12 Codex users on fresh `trellis init` / `trellis update` got agent prompts missing the Phase 1.3 fallback path and the agents blocked on seed-only jsonl instead of proceeding with prd.md + spec judgment.\n\n**Docs:**\n- docs(codex): `.codex/config.toml` documents the `[features] codex_hooks = true` user-level opt-in. Project-scoped config cannot enable `features.*`; without the flag, `hooks.json` is silently ignored and Trellis context injection never runs — previously this looked like a bug. The old `shell_environment_policy` stub (dead config unrelated to Trellis) is removed in favor of the opt-in hint.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Pure content refresh. Existing tasks and jsonl files keep working untouched. After `trellis update`, `task.py start <existing-task-in-planning>` will now write `in_progress` on the first invocation — no action needed from you. Codex users who manually edited their `.codex/agents/trellis-*.toml` will see the Required-Context preamble added on update; `trellis update` prompts per-file when hashes drift."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.0-beta.14",
|
|
3
|
+
"description": "Patch follow-up to beta.13: SessionStart hooks now emit a one-shot `<first-reply-notice>` block so the first visible assistant reply announces that Trellis context has been injected (proof-of-load for noisy or summarized hosts). READY-state breadcrumbs across shared/opencode/codex/copilot hooks + `trellis/workflow.md` replace the soft \"Continue with implement or check\" wording with an explicit \"Next required action: dispatch `trellis-implement` … do NOT edit code in the main session\" directive, closing a loophole where agent-capable sessions would still hand-edit code in the main thread. Windows statusline no longer crashes on typed stdout/stderr streams: `sys.stdout.detach() + TextIOWrapper(...)` is replaced with `reconfigure(encoding='utf-8', errors='replace')`. No src/ runtime-code changes outside templates; `trellis update` is a straight content refresh.",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "**Enhancements:**\n- feat(hooks): SessionStart emits a one-shot `<first-reply-notice>` block instructing the model to open its first visible reply with one short Chinese sentence confirming Trellis context has been injected (workflow, task status, developer identity, git status, active tasks, spec index). Applied to `shared-hooks/session-start.py`, `codex/hooks/session-start.py`, `opencode/plugins/session-start.js`. Notice is explicitly one-shot — not repeated on later turns in the same session. Closes the visibility gap on hosts that collapse or summarize hook output.\n- feat(hooks): READY-state breadcrumbs now say \"Next required action: dispatch `trellis-implement` per Phase 2.1. For agent-capable platforms, do NOT edit code in the main session. After implementation, dispatch `trellis-check` per Phase 2.2 before reporting completion.\" Replaces the old \"Next: Continue with implement or check\" wording that let the main thread silently hand-edit code. Applied uniformly across `shared-hooks/session-start.py` + `inject-workflow-state.py`, `opencode/plugins/session-start.js` + `inject-workflow-state.js`, `codex/hooks/session-start.py`, `copilot/hooks/session-start.py`, and the `[workflow-state:in_progress]` block in `trellis/workflow.md`. `<ready>` directive also drops the \"ask whether to continue\" prompt in favor of \"execute its Next required action\".\n\n**Bug Fixes:**\n- fix(statusline): Windows UTF-8 setup replaces `sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding='utf-8')` with `stream.reconfigure(encoding='utf-8', errors='replace')`. The old pattern crashed on hosts that wrap stdout/stderr with typed streams (Copilot / certain Codex environments) because `detach()` is not available on typed wrappers. `reconfigure` is the supported API on Python 3.7+ text streams and is a no-op when unavailable. Fix applied to `shared-hooks/statusline.py`.\n- fix(hooks): Codex and Copilot SessionStart hooks now invoke a shared `configure_project_encoding(project_dir)` helper before emitting JSON, loading `.trellis/scripts/common.configure_encoding()` when present. Prevents stray mojibake in hook stdout on Windows Codex/Copilot runs that haven't already wrapped stdout.\n- docs(copilot): `copilot/hooks/session-start.py` docstring + `systemMessage` text now state plainly that GitHub Copilot currently ignores `sessionStart` hook output. The JSON shape is kept for protocol parity and future host support, but users should rely on `UserPromptSubmit` breadcrumbs and hook logs for Copilot today.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "Pure content refresh. Existing tasks, jsonl files, and `.current-task` are preserved. After `trellis update`, fresh sessions across Claude Code / Codex / Copilot / OpenCode will prepend a one-line Chinese confirmation of SessionStart context on the first assistant reply, and the main thread will no longer be nudged to hand-edit code when a task is READY. Windows statusline stops crashing on Copilot/Codex typed stdout. No action needed beyond `trellis update`."
|
|
9
|
+
}
|