@mindfoldhq/trellis 0.5.0-beta.15 → 0.5.0-beta.17

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.
Files changed (99) hide show
  1. package/dist/commands/init.d.ts.map +1 -1
  2. package/dist/commands/init.js +0 -28
  3. package/dist/commands/init.js.map +1 -1
  4. package/dist/commands/update.d.ts.map +1 -1
  5. package/dist/commands/update.js +29 -1
  6. package/dist/commands/update.js.map +1 -1
  7. package/dist/configurators/antigravity.d.ts.map +1 -1
  8. package/dist/configurators/antigravity.js +2 -8
  9. package/dist/configurators/antigravity.js.map +1 -1
  10. package/dist/configurators/claude.d.ts.map +1 -1
  11. package/dist/configurators/claude.js +3 -9
  12. package/dist/configurators/claude.js.map +1 -1
  13. package/dist/configurators/codebuddy.d.ts.map +1 -1
  14. package/dist/configurators/codebuddy.js +2 -2
  15. package/dist/configurators/codebuddy.js.map +1 -1
  16. package/dist/configurators/codex.d.ts.map +1 -1
  17. package/dist/configurators/codex.js +2 -7
  18. package/dist/configurators/codex.js.map +1 -1
  19. package/dist/configurators/copilot.d.ts.map +1 -1
  20. package/dist/configurators/copilot.js +2 -9
  21. package/dist/configurators/copilot.js.map +1 -1
  22. package/dist/configurators/cursor.d.ts.map +1 -1
  23. package/dist/configurators/cursor.js +2 -2
  24. package/dist/configurators/cursor.js.map +1 -1
  25. package/dist/configurators/droid.d.ts.map +1 -1
  26. package/dist/configurators/droid.js +2 -2
  27. package/dist/configurators/droid.js.map +1 -1
  28. package/dist/configurators/gemini.d.ts.map +1 -1
  29. package/dist/configurators/gemini.js +2 -2
  30. package/dist/configurators/gemini.js.map +1 -1
  31. package/dist/configurators/index.d.ts.map +1 -1
  32. package/dist/configurators/index.js +13 -11
  33. package/dist/configurators/index.js.map +1 -1
  34. package/dist/configurators/kilo.d.ts.map +1 -1
  35. package/dist/configurators/kilo.js +2 -8
  36. package/dist/configurators/kilo.js.map +1 -1
  37. package/dist/configurators/kiro.d.ts.map +1 -1
  38. package/dist/configurators/kiro.js +2 -2
  39. package/dist/configurators/kiro.js.map +1 -1
  40. package/dist/configurators/opencode.d.ts.map +1 -1
  41. package/dist/configurators/opencode.js +7 -4
  42. package/dist/configurators/opencode.js.map +1 -1
  43. package/dist/configurators/pi.d.ts.map +1 -1
  44. package/dist/configurators/pi.js +9 -4
  45. package/dist/configurators/pi.js.map +1 -1
  46. package/dist/configurators/qoder.d.ts.map +1 -1
  47. package/dist/configurators/qoder.js +2 -2
  48. package/dist/configurators/qoder.js.map +1 -1
  49. package/dist/configurators/shared.d.ts +21 -2
  50. package/dist/configurators/shared.d.ts.map +1 -1
  51. package/dist/configurators/shared.js +32 -3
  52. package/dist/configurators/shared.js.map +1 -1
  53. package/dist/configurators/windsurf.d.ts.map +1 -1
  54. package/dist/configurators/windsurf.js +2 -8
  55. package/dist/configurators/windsurf.js.map +1 -1
  56. package/dist/migrations/manifests/0.5.0-beta.15.json +3 -13
  57. package/dist/migrations/manifests/0.5.0-beta.16.json +9 -0
  58. package/dist/migrations/manifests/0.5.0-beta.17.json +9 -0
  59. package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +73 -0
  60. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/add-project-local-conventions.md +83 -0
  61. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +54 -0
  62. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +81 -0
  63. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-hooks.md +57 -0
  64. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +78 -0
  65. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +83 -0
  66. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +79 -0
  67. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +48 -0
  68. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +55 -0
  69. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/context-injection.md +68 -0
  70. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +80 -0
  71. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md +51 -0
  72. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +102 -0
  73. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +101 -0
  74. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +75 -0
  75. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workspace-memory.md +71 -0
  76. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +79 -0
  77. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +69 -0
  78. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +59 -0
  79. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +74 -0
  80. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +83 -0
  81. package/dist/templates/common/index.d.ts +22 -2
  82. package/dist/templates/common/index.d.ts.map +1 -1
  83. package/dist/templates/common/index.js +53 -4
  84. package/dist/templates/common/index.js.map +1 -1
  85. package/dist/templates/common/skills/brainstorm.md +3 -0
  86. package/dist/templates/markdown/agents.md +8 -0
  87. package/dist/templates/pi/extensions/trellis/index.ts.txt +499 -51
  88. package/dist/templates/trellis/scripts/common/task_store.py +2 -2
  89. package/dist/templates/trellis/scripts/task.py +3 -3
  90. package/dist/templates/trellis/workflow.md +3 -0
  91. package/dist/utils/posix.d.ts +13 -0
  92. package/dist/utils/posix.d.ts.map +1 -0
  93. package/dist/utils/posix.js +15 -0
  94. package/dist/utils/posix.js.map +1 -0
  95. package/dist/utils/template-hash.d.ts +22 -3
  96. package/dist/utils/template-hash.d.ts.map +1 -1
  97. package/dist/utils/template-hash.js +78 -17
  98. package/dist/utils/template-hash.js.map +1 -1
  99. package/package.json +1 -1
@@ -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 { resolvePlaceholders, resolveCommands, resolveSkills, wrapWithCommandFrontmatter, writeSkills, writeAgents, writeSharedHooks, applyPullBasedPreludeMarkdown, } from "./shared.js";
4
+ import { resolvePlaceholders, resolveCommands, resolveSkills, resolveBundledSkills, wrapWithCommandFrontmatter, writeSkills, writeAgents, writeSharedHooks, applyPullBasedPreludeMarkdown, } from "./shared.js";
5
5
  import { getAllAgents, getSettingsTemplate } from "../templates/qoder/index.js";
6
6
  /**
7
7
  * Configure Qoder (pull-based class-2 platform).
@@ -22,7 +22,7 @@ export async function configureQoder(cwd) {
22
22
  const name = `trellis-${cmd.name}`;
23
23
  await writeFile(path.join(commandsDir, `${name}.md`), wrapWithCommandFrontmatter(name, cmd.content));
24
24
  }
25
- await writeSkills(path.join(configRoot, "skills"), resolveSkills(ctx));
25
+ await writeSkills(path.join(configRoot, "skills"), resolveSkills(ctx), resolveBundledSkills(ctx));
26
26
  await writeAgents(path.join(configRoot, "agents"), applyPullBasedPreludeMarkdown(getAllAgents()));
27
27
  await writeSharedHooks(path.join(configRoot, "hooks"), "qoder");
28
28
  const settings = getSettingsTemplate();
@@ -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,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,0BAA0B,EAC1B,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,EAA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C,EAClB,oBAAoB,CAAC,GAAG,CAAC,CAC1B,CAAC;IACF,MAAM,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"}
@@ -23,6 +23,12 @@ export interface ResolvedTemplate {
23
23
  name: string;
24
24
  content: string;
25
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
+ }
26
32
  /**
27
33
  * Resolve ALL templates as skills with trellis- prefix.
28
34
  * Used by skill-only platforms (Kiro, Qoder, Codex) where everything is a skill.
@@ -43,11 +49,24 @@ export declare function resolveCommands(ctx: TemplateContext): ResolvedTemplate[
43
49
  * Used by "both" platforms for the auto-triggered skills.
44
50
  */
45
51
  export declare function resolveSkills(ctx: TemplateContext): ResolvedTemplate[];
46
- /** Write skill directories from resolved templates */
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. */
47
66
  export declare function writeSkills(skillsRoot: string, skills: {
48
67
  name: string;
49
68
  content: string;
50
- }[]): Promise<void>;
69
+ }[], bundledSkills?: readonly ResolvedSkillFile[]): Promise<void>;
51
70
  /** Write agent/droid definition files */
52
71
  export declare function writeAgents(agentsDir: string, agents: {
53
72
  name: 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;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;AAcD,uDAAuD;AACvD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAoBD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,eAAe,GAAG,gBAAgB,EAAE,CAY3E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,eAAe,GAAG,gBAAgB,EAAE,CAKxE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,eAAe,GAAG,gBAAgB,EAAE,CAQtE;AAMD,sDAAsD;AACtD,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AE,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"}
@@ -119,7 +119,7 @@ export function wrapWithCommandFrontmatter(name, content) {
119
119
  // ---------------------------------------------------------------------------
120
120
  import path from "node:path";
121
121
  import { ensureDir, writeFile } from "../utils/file-writer.js";
122
- import { getCommandTemplates, getSkillTemplates, } from "../templates/common/index.js";
122
+ import { getBundledSkillTemplates, getCommandTemplates, getSkillTemplates, } from "../templates/common/index.js";
123
123
  /**
124
124
  * Filter command templates based on platform capabilities.
125
125
  *
@@ -173,17 +173,46 @@ export function resolveSkills(ctx) {
173
173
  content: wrapWithSkillFrontmatter(`trellis-${tmpl.name}`, resolvePlaceholders(tmpl.content, ctx)),
174
174
  }));
175
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
+ }
176
189
  // ---------------------------------------------------------------------------
177
190
  // Shared configurator write helpers
178
191
  // ---------------------------------------------------------------------------
179
- /** Write skill directories from resolved templates */
180
- export async function writeSkills(skillsRoot, skills) {
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 = []) {
181
205
  ensureDir(skillsRoot);
182
206
  for (const skill of skills) {
183
207
  const skillDir = path.join(skillsRoot, skill.name);
184
208
  ensureDir(skillDir);
185
209
  await writeFile(path.join(skillDir, "SKILL.md"), skill.content);
186
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
+ }
187
216
  }
188
217
  /** Write agent/droid definition files */
189
218
  export async function writeAgents(agentsDir, agents, ext = ".md") {
@@ -1 +1 @@
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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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":"AAKA;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBlE"}
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
- const skillsDir = path.join(cwd, ".windsurf", "skills");
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,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE7D;;;;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,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IACxD,SAAS,CAAC,SAAS,CAAC,CAAC;IACrB,KAAK,MAAM,KAAK,IAAI,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;QACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAClD,SAAS,CAAC,QAAQ,CAAC,CAAC;QACpB,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;AACH,CAAC"}
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"}
@@ -1,20 +1,10 @@
1
1
  {
2
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. The manifest also includes 11 hash-verified `safe-file-delete` entries for orphan or disabled shared hooks.",
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
4
  "breaking": true,
5
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. New installs do not write `.claude/hooks/statusline.py` or configure `statusLine` in `.claude/settings.json`; beta.15 removes pristine generated copies through a hash-verified `safe-file-delete` entry while preserving locally modified files.\n- fix(cli): `writeSharedHooks` and `collectSharedHooks` use `SHARED_HOOKS_BY_PLATFORM`. The manifest removes 11 orphan or disabled 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, and the current `continue` / `finish-work` command flow.",
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
7
  "migrations": [
8
- {
9
- "type": "safe-file-delete",
10
- "from": ".claude/hooks/statusline.py",
11
- "description": "Removed: Claude Code statusLine is no longer installed by default; users can keep a locally customized statusline file.",
12
- "allowed_hashes": [
13
- "87c01ee786ca9e1f25b591f0ed67564cd430586d57516d5b6fc57c34b6e7a3ec",
14
- "c92c0020a0c60308437b66f024a244303e708519c97089cf654ceddc144f7435",
15
- "b9b0a39a486643f2b78ecb3c757459182a6326ea070ba34a49887e23adc40bbb"
16
- ]
17
- },
18
8
  {
19
9
  "type": "safe-file-delete",
20
10
  "from": ".cursor/hooks/statusline.py",
@@ -122,5 +112,5 @@
122
112
  ]
123
113
  }
124
114
  ],
125
- "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 11 shared-hook cleanup migrations are hash-verified; locally modified hook files are preserved with a warning. Claude Code statusLine is not installed by default after update."
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."
126
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,73 @@
1
+ ---
2
+ name: trellis-meta
3
+ description: "Understand and customize the local Trellis architecture inside a user project. Use when modifying .trellis plus platform hooks, settings, agents, skills, commands, prompts, or workflows generated by trellis init."
4
+ ---
5
+
6
+ # Trellis Meta
7
+
8
+ This skill is for local Trellis users who have already run `trellis init` in a project. After reading it, an AI should understand the Trellis architecture, operating model, and customization entry points inside that user project, then modify the generated `.trellis/` and platform directory files according to the user's request.
9
+
10
+ The default operating scope is local files in the user project:
11
+
12
+ - `.trellis/`: workflow, config, tasks, spec, workspace, scripts, and runtime state.
13
+ - Platform directories: `.claude/`, `.codex/`, `.cursor/`, `.opencode/`, `.kiro/`, `.gemini/`, `.qoder/`, `.codebuddy/`, `.github/`, `.factory/`, `.pi/`, `.kilocode/`, `.agent/`, `.windsurf/`, and similar directories.
14
+ - Shared skill layer: `.agents/skills/`.
15
+
16
+ Do not assume the user has the Trellis source repository. Do not default to modifying the global npm install directory or `node_modules`.
17
+
18
+ ## How To Use
19
+
20
+ 1. Read `references/local-architecture/overview.md` first to establish the local Trellis system model.
21
+ 2. If the request involves a specific AI tool, read `references/platform-files/platform-map.md` and the relevant platform file notes.
22
+ 3. If the user wants to change behavior, read `references/customize-local/overview.md`, then open the specific customization topic.
23
+ 4. Before editing, read the actual files in the user project and treat local content as authoritative.
24
+
25
+ ## References
26
+
27
+ ### Local Architecture
28
+
29
+ - `references/local-architecture/overview.md`: The three-layer local Trellis architecture and customization principles.
30
+ - `references/local-architecture/generated-files.md`: Files generated by `trellis init` and their customization boundaries.
31
+ - `references/local-architecture/workflow.md`: Phases, routing, and workflow-state blocks in `.trellis/workflow.md`.
32
+ - `references/local-architecture/task-system.md`: Task directories, active tasks, JSONL context, and task runtime.
33
+ - `references/local-architecture/spec-system.md`: How `.trellis/spec/` is organized and injected.
34
+ - `references/local-architecture/workspace-memory.md`: `.trellis/workspace/`, journals, and cross-session memory.
35
+ - `references/local-architecture/context-injection.md`: Hooks, sub-agent preludes, and context injection paths.
36
+
37
+ ### Platform Files
38
+
39
+ - `references/platform-files/overview.md`: How shared `.trellis/` files relate to platform directories.
40
+ - `references/platform-files/platform-map.md`: Platform directories and paths for skills, agents, hooks, and extensions.
41
+ - `references/platform-files/hooks-and-settings.md`: How settings/config files, hooks, plugins, and extensions connect to Trellis.
42
+ - `references/platform-files/agents.md`: Local file responsibilities for `trellis-research`, `trellis-implement`, and `trellis-check`.
43
+ - `references/platform-files/skills-and-commands.md`: Differences between skills, commands, prompts, and workflows, plus how to change them.
44
+
45
+ ### Local Customization
46
+
47
+ - `references/customize-local/overview.md`: Choose the right local customization entry point for the user's request.
48
+ - `references/customize-local/change-workflow.md`: Change phases, routing, next actions, and workflow-state.
49
+ - `references/customize-local/change-task-lifecycle.md`: Change task creation, status, archive behavior, and hooks.
50
+ - `references/customize-local/change-context-loading.md`: Change how tasks, specs, journals, and hook context are loaded.
51
+ - `references/customize-local/change-hooks.md`: Change platform hooks, settings, and shell session bridges.
52
+ - `references/customize-local/change-agents.md`: Change research, implement, and check agent behavior.
53
+ - `references/customize-local/change-skills-or-commands.md`: Add or modify local skills, commands, prompts, and workflows.
54
+ - `references/customize-local/change-spec-structure.md`: Adjust the project spec structure under `.trellis/spec/`.
55
+ - `references/customize-local/add-project-local-conventions.md`: Put team rules into project-local specs or local skills.
56
+
57
+ ## Current Rules
58
+
59
+ - `.trellis/workflow.md` is the local workflow source of truth.
60
+ - `.trellis/config.yaml` is the project-level Trellis configuration and task hook configuration entry point.
61
+ - `.trellis/spec/` stores the user's project-specific coding conventions and design constraints.
62
+ - `.trellis/tasks/` stores task PRDs, technical notes, research files, and JSONL context.
63
+ - `.trellis/workspace/` stores developer journals and cross-session memory.
64
+ - Platform settings/config files decide which hooks, agents, skills, commands, prompts, and workflows actually run.
65
+ - `.trellis/.template-hashes.json` and `.trellis/.runtime/` are management/runtime state files. Confirm necessity before editing them.
66
+
67
+ ## Do Not
68
+
69
+ - Do not treat Trellis upstream source code as the default target for local customization.
70
+ - Do not modify the global npm install directory or `node_modules/@mindfoldhq/trellis` to implement project needs.
71
+ - Do not overwrite user-modified local files with default templates.
72
+ - Do not put team-private project rules into the public `trellis-meta`; put project rules in `.trellis/spec/` or a project-local skill.
73
+ - Do not describe removed historical mechanisms as current Trellis behavior.
@@ -0,0 +1,83 @@
1
+ # Add Project-Local Conventions
2
+
3
+ Often the user does not need to change Trellis mechanics; they need local AI to understand their team's conventions. In that case, prefer `.trellis/spec/` or a project-local skill instead of editing `trellis-meta`.
4
+
5
+ ## Where To Put Things
6
+
7
+ | Content type | Location |
8
+ | --- | --- |
9
+ | Rules code must follow | `.trellis/spec/<layer>/` |
10
+ | Cross-layer thinking methods | `.trellis/spec/guides/` |
11
+ | AI capability for a project-specific flow | Platform-local skill |
12
+ | One-off task material | `.trellis/tasks/<task>/` |
13
+ | Session summary | `.trellis/workspace/<developer>/journal-N.md` |
14
+
15
+ ## Create A Project-Local Skill
16
+
17
+ If the user wants AI to know "how this project customizes Trellis," create a local skill:
18
+
19
+ ```text
20
+ .claude/skills/trellis-local/
21
+ └── SKILL.md
22
+ ```
23
+
24
+ Example:
25
+
26
+ ```md
27
+ ---
28
+ name: trellis-local
29
+ description: "Project-local Trellis customizations for this repository. Use when changing this project's Trellis workflow, hooks, local agents, or team-specific conventions."
30
+ ---
31
+
32
+ # Trellis Local
33
+
34
+ ## Local Scope
35
+
36
+ This skill documents this repository's Trellis customizations only.
37
+
38
+ ## Custom Workflow Rules
39
+
40
+ - ...
41
+
42
+ ## Local Hook Changes
43
+
44
+ - ...
45
+
46
+ ## Local Agent Changes
47
+
48
+ - ...
49
+ ```
50
+
51
+ For multi-platform projects, place equivalent versions in other platform skill directories, or use `.agents/skills/` for platforms that support the shared layer.
52
+
53
+ ## Write To `.trellis/spec/`
54
+
55
+ If the content is a coding convention, write it to spec. Examples:
56
+
57
+ ```text
58
+ .trellis/spec/backend/error-handling.md
59
+ .trellis/spec/frontend/components.md
60
+ .trellis/spec/guides/cross-platform-thinking-guide.md
61
+ ```
62
+
63
+ After writing it, update the corresponding `index.md` so AI can find the new rule from the entry point.
64
+
65
+ ## Make The Current Task Use New Conventions
66
+
67
+ After writing a spec, add it to the current task context:
68
+
69
+ ```bash
70
+ python3 ./.trellis/scripts/task.py add-context <task> implement ".trellis/spec/backend/error-handling.md" "Error handling conventions"
71
+ python3 ./.trellis/scripts/task.py add-context <task> check ".trellis/spec/backend/error-handling.md" "Review error handling"
72
+ ```
73
+
74
+ ## Do Not Store Project-Private Rules In `trellis-meta`
75
+
76
+ `trellis-meta` is a public skill for understanding Trellis architecture and local customization entry points. Put project-private content in:
77
+
78
+ - `.trellis/spec/`
79
+ - a project-local skill
80
+ - the current task
81
+ - workspace journal
82
+
83
+ This prevents future updates to Trellis's built-in `trellis-meta` from overwriting the team's own conventions.
@@ -0,0 +1,54 @@
1
+ # Change Local Agents
2
+
3
+ When the user wants to change `trellis-research`, `trellis-implement`, or `trellis-check` behavior, edit platform agent files in the user project.
4
+
5
+ ## Read These Files First
6
+
7
+ 1. Target platform agent directory
8
+ 2. `.trellis/workflow.md` Phase 2 / research routing
9
+ 3. Current task `prd.md`
10
+ 4. Current task `implement.jsonl` / `check.jsonl`
11
+ 5. Relevant hook or agent prelude
12
+
13
+ ## Common Paths
14
+
15
+ | Platform | Path |
16
+ | --- | --- |
17
+ | Claude Code | `.claude/agents/trellis-*.md` |
18
+ | Cursor | `.cursor/agents/trellis-*.md` |
19
+ | OpenCode | `.opencode/agents/trellis-*.md` |
20
+ | Codex | `.codex/agents/trellis-*.toml` |
21
+ | Kiro | `.kiro/agents/trellis-*.json` |
22
+ | Gemini CLI | `.gemini/agents/trellis-*.md` |
23
+ | Qoder | `.qoder/agents/trellis-*.md` |
24
+ | CodeBuddy | `.codebuddy/agents/trellis-*.md` |
25
+ | Factory Droid | `.factory/droids/trellis-*.md` |
26
+ | Pi Agent | `.pi/agents/trellis-*.md` |
27
+
28
+ Use the actual paths in the user project as authoritative.
29
+
30
+ ## Common Needs
31
+
32
+ | Need | Which agent to edit |
33
+ | --- | --- |
34
+ | Research must write files, not only reply in chat | `trellis-research` |
35
+ | Certain local specs must be read before implementation | `trellis-implement` + `implement.jsonl` configuration rules |
36
+ | Specific commands must run during checking | `trellis-check` |
37
+ | Agent must not modify certain directories | The corresponding agent's write boundary instructions |
38
+ | Agent output format must be fixed | The corresponding agent's final/reporting instructions |
39
+
40
+ ## Modification Principles
41
+
42
+ 1. **Preserve role boundaries**: research investigates and persists; implement writes implementation; check reviews and fixes.
43
+ 2. **Do not hard-code project specs into agents**: long-term specs belong in `.trellis/spec/`; agents are responsible for reading them.
44
+ 3. **Make read order explicit**: active task -> PRD -> info -> JSONL -> spec/research.
45
+ 4. **Make write boundaries explicit**: which directories may be written and which may not.
46
+ 5. **Synchronize across platforms**: when the user configured multiple platforms, decide whether to change only the current platform or all platform agents.
47
+
48
+ ## Agent Pull Platforms
49
+
50
+ If an agent file contains a prelude for "read task/context after startup," do not remove those steps when editing. Otherwise the agent will work only from chat context and bypass Trellis's core mechanism.
51
+
52
+ ## Hook Push Platforms
53
+
54
+ If context is injected by a hook, the agent file should still retain responsibility boundaries. Do not remove PRD/spec requirements from the agent just because a hook injects context.
@@ -0,0 +1,81 @@
1
+ # Change Local Context Loading
2
+
3
+ Context loading determines when AI reads workflow, task, spec, research, workspace, and git status. Read this page when the user says "AI does not know the current task," "the agent did not read specs," or "there is too much/too little context."
4
+
5
+ ## Read These Files First
6
+
7
+ 1. `.trellis/workflow.md`
8
+ 2. `.trellis/scripts/get_context.py`
9
+ 3. `.trellis/scripts/common/session_context.py`
10
+ 4. `.trellis/scripts/common/task_context.py`
11
+ 5. `.trellis/scripts/common/active_task.py`
12
+ 6. Current platform hooks or agent files
13
+ 7. The current task's `implement.jsonl` / `check.jsonl`
14
+
15
+ ## Context Sources
16
+
17
+ | Source | Purpose |
18
+ | --- | --- |
19
+ | `.trellis/workflow.md` | Workflow and next-action hints. |
20
+ | `.trellis/tasks/<task>/prd.md` | Current task requirements. |
21
+ | `.trellis/tasks/<task>/implement.jsonl` | Spec/research to read before implementation. |
22
+ | `.trellis/tasks/<task>/check.jsonl` | Spec/research to read during checking. |
23
+ | `.trellis/spec/` | Project specs. |
24
+ | `.trellis/workspace/` | Session records. |
25
+ | git status | Current working tree changes. |
26
+
27
+ ## Common Needs And Edit Points
28
+
29
+ | Need | Edit point |
30
+ | --- | --- |
31
+ | Inject more/less information in new sessions | `session_context.py` or the platform `session-start` hook. |
32
+ | Change hints on each user input | State blocks in `.trellis/workflow.md` and `inject-workflow-state` hook. |
33
+ | Agent did not read specs | Task JSONL, agent prelude, `inject-subagent-context` hook. |
34
+ | Active task is lost | `active_task.py` and platform session identity propagation. |
35
+ | Change JSONL validation rules | `task_context.py`. |
36
+
37
+ ## JSONL Rules
38
+
39
+ `implement.jsonl` / `check.jsonl` are the key context loading interface:
40
+
41
+ ```jsonl
42
+ {"file": ".trellis/spec/backend/index.md", "reason": "Backend conventions"}
43
+ {"file": ".trellis/tasks/04-28-x/research/api.md", "reason": "API research"}
44
+ ```
45
+
46
+ Include only spec/research files. Do not put code files that will be modified into these manifests; agents read code files themselves during implementation.
47
+
48
+ ## Change Session Context
49
+
50
+ If the user wants every new session to see more project state, edit:
51
+
52
+ - `.trellis/scripts/common/session_context.py`
53
+ - the corresponding platform `session-start` hook
54
+
55
+ Context cannot grow without bound. Prefer injecting indexes and paths so the AI can read detailed files on demand.
56
+
57
+ ## Change Sub-Agent Context
58
+
59
+ First determine which mode the platform uses:
60
+
61
+ - hook push: edit the `inject-subagent-context` hook.
62
+ - agent pull: edit the read steps in the corresponding `trellis-implement` / `trellis-check` agent file.
63
+
64
+ In both modes, make sure the agent ultimately reads:
65
+
66
+ 1. active task
67
+ 2. `prd.md`
68
+ 3. `info.md` if present
69
+ 4. the corresponding JSONL
70
+ 5. spec/research referenced by the JSONL
71
+
72
+ ## Troubleshooting Order
73
+
74
+ ```bash
75
+ python3 ./.trellis/scripts/task.py current --source
76
+ python3 ./.trellis/scripts/task.py list-context <task>
77
+ python3 ./.trellis/scripts/task.py validate <task>
78
+ python3 ./.trellis/scripts/get_context.py --mode packages
79
+ ```
80
+
81
+ Confirm the task and JSONL are correct before editing hooks/agents.