@mindfoldhq/trellis 0.1.1 → 0.1.3

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 (132) hide show
  1. package/dist/{templates/agents/bodies → .claude/agents}/check.md +7 -0
  2. package/dist/{templates/agents/bodies → .claude/agents}/debug.md +7 -0
  3. package/dist/{templates/agents/bodies → .claude/agents}/dispatch.md +11 -8
  4. package/dist/{templates/agents/bodies → .claude/agents}/implement.md +7 -0
  5. package/dist/.claude/agents/plan.md +396 -0
  6. package/dist/{templates/agents/bodies → .claude/agents}/research.md +7 -0
  7. package/dist/{templates/commands/common/check-cross-layer.txt → .claude/commands/check-cross-layer.md} +29 -29
  8. package/dist/{templates → .claude}/hooks/inject-subagent-context.py +63 -0
  9. package/dist/.cursor/commands/before-backend-dev.md +13 -0
  10. package/dist/.cursor/commands/before-frontend-dev.md +13 -0
  11. package/dist/.cursor/commands/break-loop.md +107 -0
  12. package/dist/.cursor/commands/check-backend.md +13 -0
  13. package/dist/.cursor/commands/check-cross-layer.md +153 -0
  14. package/dist/.cursor/commands/check-frontend.md +13 -0
  15. package/dist/.cursor/commands/create-command.md +154 -0
  16. package/dist/.cursor/commands/finish-work.md +129 -0
  17. package/dist/.cursor/commands/integrate-skill.md +219 -0
  18. package/dist/.cursor/commands/onboard-developer.md +355 -0
  19. package/dist/.cursor/commands/record-agent-flow.md +62 -0
  20. package/dist/.trellis/scripts/common/phase.sh +150 -0
  21. package/dist/{templates/scripts/feature.sh.txt → .trellis/scripts/feature.sh} +8 -3
  22. package/dist/{templates/scripts/multi-agent/cleanup.sh.txt → .trellis/scripts/multi-agent/cleanup.sh} +107 -18
  23. package/dist/.trellis/scripts/multi-agent/create-pr.sh +241 -0
  24. package/dist/.trellis/scripts/multi-agent/plan.sh +232 -0
  25. package/dist/{templates/scripts/multi-agent/start.sh.txt → .trellis/scripts/multi-agent/start.sh} +21 -0
  26. package/dist/{templates/scripts/multi-agent/status.sh.txt → .trellis/scripts/multi-agent/status.sh} +282 -10
  27. package/dist/.trellis/structure/backend/database-guidelines.md +51 -0
  28. package/dist/.trellis/structure/backend/directory-structure.md +209 -0
  29. package/dist/.trellis/structure/backend/error-handling.md +278 -0
  30. package/dist/.trellis/structure/backend/index.md +38 -0
  31. package/dist/.trellis/structure/backend/logging-guidelines.md +266 -0
  32. package/dist/.trellis/structure/backend/quality-guidelines.md +313 -0
  33. package/dist/.trellis/structure/frontend/component-guidelines.md +59 -0
  34. package/dist/.trellis/structure/frontend/directory-structure.md +54 -0
  35. package/dist/.trellis/structure/frontend/hook-guidelines.md +51 -0
  36. package/dist/.trellis/structure/frontend/index.md +39 -0
  37. package/dist/.trellis/structure/frontend/quality-guidelines.md +51 -0
  38. package/dist/.trellis/structure/frontend/state-management.md +51 -0
  39. package/dist/.trellis/structure/frontend/type-safety.md +51 -0
  40. package/dist/.trellis/structure/guides/code-reuse-thinking-guide.md +92 -0
  41. package/dist/.trellis/structure/guides/cross-layer-thinking-guide.md +94 -0
  42. package/dist/.trellis/structure/guides/index.md +79 -0
  43. package/dist/{templates/scripts/worktree.yaml.txt → .trellis/worktree.yaml} +1 -1
  44. package/dist/commands/init.d.ts.map +1 -1
  45. package/dist/commands/init.js +5 -16
  46. package/dist/commands/init.js.map +1 -1
  47. package/dist/configurators/claude.d.ts +17 -17
  48. package/dist/configurators/claude.d.ts.map +1 -1
  49. package/dist/configurators/claude.js +29 -59
  50. package/dist/configurators/claude.js.map +1 -1
  51. package/dist/configurators/cursor.d.ts +3 -3
  52. package/dist/configurators/cursor.d.ts.map +1 -1
  53. package/dist/configurators/cursor.js +11 -15
  54. package/dist/configurators/cursor.js.map +1 -1
  55. package/dist/configurators/opencode.d.ts +11 -10
  56. package/dist/configurators/opencode.d.ts.map +1 -1
  57. package/dist/configurators/opencode.js +14 -33
  58. package/dist/configurators/opencode.js.map +1 -1
  59. package/dist/configurators/workflow.d.ts +7 -0
  60. package/dist/configurators/workflow.d.ts.map +1 -1
  61. package/dist/configurators/workflow.js +30 -99
  62. package/dist/configurators/workflow.js.map +1 -1
  63. package/dist/templates/extract.d.ts +73 -8
  64. package/dist/templates/extract.d.ts.map +1 -1
  65. package/dist/templates/extract.js +149 -10
  66. package/dist/templates/extract.js.map +1 -1
  67. package/dist/templates/markdown/gitignore.txt +6 -1
  68. package/dist/templates/markdown/index.d.ts +5 -1
  69. package/dist/templates/markdown/index.d.ts.map +1 -1
  70. package/dist/templates/markdown/index.js +54 -26
  71. package/dist/templates/markdown/index.js.map +1 -1
  72. package/dist/templates/markdown/structure/backend/directory-structure.md.txt +6 -6
  73. package/dist/templates/markdown/structure/backend/error-handling.md.txt +8 -8
  74. package/dist/templates/markdown/structure/backend/index.md.txt +5 -5
  75. package/dist/templates/markdown/structure/backend/logging-guidelines.md.txt +8 -8
  76. package/dist/templates/markdown/structure/frontend/index.md.txt +6 -6
  77. package/dist/templates/markdown/structure/guides/cross-layer-thinking-guide.md.txt +5 -5
  78. package/dist/templates/markdown/structure/guides/index.md.txt +7 -7
  79. package/dist/templates/markdown/worktree.yaml.txt +58 -0
  80. package/package.json +1 -1
  81. package/dist/configurators/templates.d.ts +0 -40
  82. package/dist/configurators/templates.d.ts.map +0 -1
  83. package/dist/configurators/templates.js +0 -67
  84. package/dist/configurators/templates.js.map +0 -1
  85. package/dist/templates/agents/index.d.ts +0 -42
  86. package/dist/templates/agents/index.d.ts.map +0 -1
  87. package/dist/templates/agents/index.js +0 -148
  88. package/dist/templates/agents/index.js.map +0 -1
  89. package/dist/templates/agents/metadata.d.ts +0 -48
  90. package/dist/templates/agents/metadata.d.ts.map +0 -1
  91. package/dist/templates/agents/metadata.js +0 -101
  92. package/dist/templates/agents/metadata.js.map +0 -1
  93. package/dist/templates/commands/index.d.ts +0 -48
  94. package/dist/templates/commands/index.d.ts.map +0 -1
  95. package/dist/templates/commands/index.js +0 -167
  96. package/dist/templates/commands/index.js.map +0 -1
  97. package/dist/templates/commands/opencode/start.md.txt +0 -127
  98. package/dist/templates/hooks/index.d.ts +0 -33
  99. package/dist/templates/hooks/index.d.ts.map +0 -1
  100. package/dist/templates/hooks/index.js +0 -53
  101. package/dist/templates/hooks/index.js.map +0 -1
  102. package/dist/templates/scripts/index.d.ts +0 -36
  103. package/dist/templates/scripts/index.d.ts.map +0 -1
  104. package/dist/templates/scripts/index.js +0 -41
  105. package/dist/templates/scripts/index.js.map +0 -1
  106. /package/dist/{templates/commands/common/before-backend-dev.txt → .claude/commands/before-backend-dev.md} +0 -0
  107. /package/dist/{templates/commands/common/before-frontend-dev.txt → .claude/commands/before-frontend-dev.md} +0 -0
  108. /package/dist/{templates/commands/common/break-loop.txt → .claude/commands/break-loop.md} +0 -0
  109. /package/dist/{templates/commands/common/check-backend.txt → .claude/commands/check-backend.md} +0 -0
  110. /package/dist/{templates/commands/common/check-frontend.txt → .claude/commands/check-frontend.md} +0 -0
  111. /package/dist/{templates/commands/common/create-command.txt → .claude/commands/create-command.md} +0 -0
  112. /package/dist/{templates/commands/common/finish-work.txt → .claude/commands/finish-work.md} +0 -0
  113. /package/dist/{templates/commands/common/integrate-skill.txt → .claude/commands/integrate-skill.md} +0 -0
  114. /package/dist/{templates/commands/common/onboard-developer.txt → .claude/commands/onboard-developer.md} +0 -0
  115. /package/dist/{templates/commands/claude/parallel.md.txt → .claude/commands/parallel.md} +0 -0
  116. /package/dist/{templates/commands/common/record-agent-flow.txt → .claude/commands/record-agent-flow.md} +0 -0
  117. /package/dist/{templates/commands/claude/start.md.txt → .claude/commands/start.md} +0 -0
  118. /package/dist/{templates/hooks → .claude}/settings.json +0 -0
  119. /package/dist/{templates/commands/cursor/start.md.txt → .cursor/commands/start.md} +0 -0
  120. /package/dist/{templates/markdown/agent-traces-index.md.txt → .trellis/agent-traces/index.md} +0 -0
  121. /package/dist/{templates/scripts/add-session.sh.txt → .trellis/scripts/add-session.sh} +0 -0
  122. /package/dist/{templates/scripts/common/developer.sh.txt → .trellis/scripts/common/developer.sh} +0 -0
  123. /package/dist/{templates/scripts/common/git-context.sh.txt → .trellis/scripts/common/git-context.sh} +0 -0
  124. /package/dist/{templates/scripts/common/paths.sh.txt → .trellis/scripts/common/paths.sh} +0 -0
  125. /package/dist/{templates/scripts/common/worktree.sh.txt → .trellis/scripts/common/worktree.sh} +0 -0
  126. /package/dist/{templates/scripts/create-bootstrap.sh.txt → .trellis/scripts/create-bootstrap.sh} +0 -0
  127. /package/dist/{templates/scripts/get-context.sh.txt → .trellis/scripts/get-context.sh} +0 -0
  128. /package/dist/{templates/scripts/get-developer.sh.txt → .trellis/scripts/get-developer.sh} +0 -0
  129. /package/dist/{templates/scripts/init-developer.sh.txt → .trellis/scripts/init-developer.sh} +0 -0
  130. /package/dist/{templates/markdown/workflow.md.txt → .trellis/workflow.md} +0 -0
  131. /package/dist/templates/markdown/{agents.md.txt → agents.md} +0 -0
  132. /package/dist/templates/markdown/{init-agent.md.txt → init-agent.md} +0 -0
@@ -1,22 +1,87 @@
1
1
  type TemplateCategory = "scripts" | "markdown" | "commands";
2
2
  /**
3
- * Read template content from a .txt file
4
- * @param category - Template category ('scripts' | 'markdown' | 'commands')
5
- * @param filename - Template filename (e.g., 'init-developer.sh.txt')
3
+ * Get the path to the .trellis directory.
4
+ *
5
+ * This works in both:
6
+ * - Development: reads from project root .trellis/
7
+ * - Installed package: reads from dist/.trellis/
8
+ *
9
+ * The directory structure is:
10
+ * - Development: src/templates/extract.ts -> ../../.trellis
11
+ * - Built: dist/templates/extract.js -> ../.trellis
12
+ */
13
+ export declare function getTrellisSourcePath(): string;
14
+ /**
15
+ * Get the path to the .cursor directory.
16
+ *
17
+ * This works in both:
18
+ * - Development: reads from project root .cursor/
19
+ * - Installed package: reads from dist/.cursor/
20
+ *
21
+ * The directory structure is:
22
+ * - Development: src/templates/extract.ts -> ../../.cursor
23
+ * - Built: dist/templates/extract.js -> ../.cursor
24
+ */
25
+ export declare function getCursorSourcePath(): string;
26
+ /**
27
+ * Get the path to the .claude directory.
28
+ *
29
+ * This works in both:
30
+ * - Development: reads from project root .claude/
31
+ * - Installed package: reads from dist/.claude/
32
+ *
33
+ * The directory structure is:
34
+ * - Development: src/templates/extract.ts -> ../../.claude
35
+ * - Built: dist/templates/extract.js -> ../.claude
36
+ */
37
+ export declare function getClaudeSourcePath(): string;
38
+ /**
39
+ * Read a file from the .trellis directory
40
+ * @param relativePath - Path relative to .trellis/ (e.g., 'scripts/feature.sh')
41
+ * @returns File content as string
42
+ */
43
+ export declare function readTrellisFile(relativePath: string): string;
44
+ /**
45
+ * Read template content from a .txt file in commands directory
46
+ * @param category - Template category (only 'commands' uses .txt files now)
47
+ * @param filename - Template filename (e.g., 'common/finish-work.txt')
6
48
  * @returns File content as string
7
49
  */
8
50
  export declare function readTemplate(category: TemplateCategory, filename: string): string;
9
51
  /**
10
- * Helper to read script template
52
+ * Helper to read script template from .trellis/scripts/
53
+ * @param relativePath - Path relative to .trellis/scripts/ (e.g., 'feature.sh')
11
54
  */
12
- export declare function readScript(filename: string): string;
55
+ export declare function readScript(relativePath: string): string;
13
56
  /**
14
- * Helper to read markdown template
57
+ * Helper to read markdown template from .trellis/
58
+ * @param relativePath - Path relative to .trellis/ (e.g., 'workflow.md')
15
59
  */
16
- export declare function readMarkdown(filename: string): string;
60
+ export declare function readMarkdown(relativePath: string): string;
17
61
  /**
18
- * Helper to read command template
62
+ * Helper to read command template (these still use .txt files in src/templates/commands/)
19
63
  */
20
64
  export declare function readCommand(filename: string): string;
65
+ /**
66
+ * Read a file from the .cursor directory (dogfooding)
67
+ * @param relativePath - Path relative to .cursor/ (e.g., 'commands/start.md')
68
+ * @returns File content as string
69
+ */
70
+ export declare function readCursorFile(relativePath: string): string;
71
+ /**
72
+ * Read a file from the .claude directory (dogfooding)
73
+ * @param relativePath - Path relative to .claude/ (e.g., 'commands/start.md')
74
+ * @returns File content as string
75
+ */
76
+ export declare function readClaudeFile(relativePath: string): string;
77
+ /**
78
+ * Copy a directory from .trellis/ to target, making scripts executable
79
+ * @param srcRelativePath - Source path relative to .trellis/ (e.g., 'scripts')
80
+ * @param destPath - Absolute destination path
81
+ * @param options - Copy options
82
+ */
83
+ export declare function copyTrellisDir(srcRelativePath: string, destPath: string, options?: {
84
+ executable?: boolean;
85
+ }): void;
21
86
  export {};
22
87
  //# sourceMappingURL=extract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../src/templates/extract.ts"],"names":[],"mappings":"AAOA,KAAK,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,MAAM,GACf,MAAM,CAGR;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEpD"}
1
+ {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../src/templates/extract.ts"],"names":[],"mappings":"AAOA,KAAK,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE5D;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAoB7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAgB5C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAgB5C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAI5D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gBAAgB,EAC1B,QAAQ,EAAE,MAAM,GACf,MAAM,CAGR;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAI3D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAI3D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACjC,IAAI,CAIN"}
@@ -4,9 +4,94 @@ import { fileURLToPath } from "node:url";
4
4
  const __filename = fileURLToPath(import.meta.url);
5
5
  const __dirname = path.dirname(__filename);
6
6
  /**
7
- * Read template content from a .txt file
8
- * @param category - Template category ('scripts' | 'markdown' | 'commands')
9
- * @param filename - Template filename (e.g., 'init-developer.sh.txt')
7
+ * Get the path to the .trellis directory.
8
+ *
9
+ * This works in both:
10
+ * - Development: reads from project root .trellis/
11
+ * - Installed package: reads from dist/.trellis/
12
+ *
13
+ * The directory structure is:
14
+ * - Development: src/templates/extract.ts -> ../../.trellis
15
+ * - Built: dist/templates/extract.js -> ../.trellis
16
+ */
17
+ export function getTrellisSourcePath() {
18
+ // In development: __dirname is src/templates
19
+ // In production: __dirname is dist/templates
20
+ // Either way, go up to find .trellis at the package root
21
+ // First, try the production path (dist/templates -> dist/.trellis)
22
+ const prodPath = path.join(__dirname, "..", ".trellis");
23
+ if (fs.existsSync(prodPath)) {
24
+ return prodPath;
25
+ }
26
+ // Fall back to development path (src/templates -> ../../.trellis)
27
+ const devPath = path.join(__dirname, "..", "..", ".trellis");
28
+ if (fs.existsSync(devPath)) {
29
+ return devPath;
30
+ }
31
+ throw new Error("Could not find .trellis directory. Expected at dist/.trellis or project root.");
32
+ }
33
+ /**
34
+ * Get the path to the .cursor directory.
35
+ *
36
+ * This works in both:
37
+ * - Development: reads from project root .cursor/
38
+ * - Installed package: reads from dist/.cursor/
39
+ *
40
+ * The directory structure is:
41
+ * - Development: src/templates/extract.ts -> ../../.cursor
42
+ * - Built: dist/templates/extract.js -> ../.cursor
43
+ */
44
+ export function getCursorSourcePath() {
45
+ // First, try the production path (dist/templates -> dist/.cursor)
46
+ const prodPath = path.join(__dirname, "..", ".cursor");
47
+ if (fs.existsSync(prodPath)) {
48
+ return prodPath;
49
+ }
50
+ // Fall back to development path (src/templates -> ../../.cursor)
51
+ const devPath = path.join(__dirname, "..", "..", ".cursor");
52
+ if (fs.existsSync(devPath)) {
53
+ return devPath;
54
+ }
55
+ throw new Error("Could not find .cursor directory. Expected at dist/.cursor or project root.");
56
+ }
57
+ /**
58
+ * Get the path to the .claude directory.
59
+ *
60
+ * This works in both:
61
+ * - Development: reads from project root .claude/
62
+ * - Installed package: reads from dist/.claude/
63
+ *
64
+ * The directory structure is:
65
+ * - Development: src/templates/extract.ts -> ../../.claude
66
+ * - Built: dist/templates/extract.js -> ../.claude
67
+ */
68
+ export function getClaudeSourcePath() {
69
+ // First, try the production path (dist/templates -> dist/.claude)
70
+ const prodPath = path.join(__dirname, "..", ".claude");
71
+ if (fs.existsSync(prodPath)) {
72
+ return prodPath;
73
+ }
74
+ // Fall back to development path (src/templates -> ../../.claude)
75
+ const devPath = path.join(__dirname, "..", "..", ".claude");
76
+ if (fs.existsSync(devPath)) {
77
+ return devPath;
78
+ }
79
+ throw new Error("Could not find .claude directory. Expected at dist/.claude or project root.");
80
+ }
81
+ /**
82
+ * Read a file from the .trellis directory
83
+ * @param relativePath - Path relative to .trellis/ (e.g., 'scripts/feature.sh')
84
+ * @returns File content as string
85
+ */
86
+ export function readTrellisFile(relativePath) {
87
+ const trellisPath = getTrellisSourcePath();
88
+ const filePath = path.join(trellisPath, relativePath);
89
+ return fs.readFileSync(filePath, "utf-8");
90
+ }
91
+ /**
92
+ * Read template content from a .txt file in commands directory
93
+ * @param category - Template category (only 'commands' uses .txt files now)
94
+ * @param filename - Template filename (e.g., 'common/finish-work.txt')
10
95
  * @returns File content as string
11
96
  */
12
97
  export function readTemplate(category, filename) {
@@ -14,21 +99,75 @@ export function readTemplate(category, filename) {
14
99
  return fs.readFileSync(templatePath, "utf-8");
15
100
  }
16
101
  /**
17
- * Helper to read script template
102
+ * Helper to read script template from .trellis/scripts/
103
+ * @param relativePath - Path relative to .trellis/scripts/ (e.g., 'feature.sh')
18
104
  */
19
- export function readScript(filename) {
20
- return readTemplate("scripts", filename);
105
+ export function readScript(relativePath) {
106
+ return readTrellisFile(`scripts/${relativePath}`);
21
107
  }
22
108
  /**
23
- * Helper to read markdown template
109
+ * Helper to read markdown template from .trellis/
110
+ * @param relativePath - Path relative to .trellis/ (e.g., 'workflow.md')
24
111
  */
25
- export function readMarkdown(filename) {
26
- return readTemplate("markdown", filename);
112
+ export function readMarkdown(relativePath) {
113
+ return readTrellisFile(relativePath);
27
114
  }
28
115
  /**
29
- * Helper to read command template
116
+ * Helper to read command template (these still use .txt files in src/templates/commands/)
30
117
  */
31
118
  export function readCommand(filename) {
32
119
  return readTemplate("commands", filename);
33
120
  }
121
+ /**
122
+ * Read a file from the .cursor directory (dogfooding)
123
+ * @param relativePath - Path relative to .cursor/ (e.g., 'commands/start.md')
124
+ * @returns File content as string
125
+ */
126
+ export function readCursorFile(relativePath) {
127
+ const cursorPath = getCursorSourcePath();
128
+ const filePath = path.join(cursorPath, relativePath);
129
+ return fs.readFileSync(filePath, "utf-8");
130
+ }
131
+ /**
132
+ * Read a file from the .claude directory (dogfooding)
133
+ * @param relativePath - Path relative to .claude/ (e.g., 'commands/start.md')
134
+ * @returns File content as string
135
+ */
136
+ export function readClaudeFile(relativePath) {
137
+ const claudePath = getClaudeSourcePath();
138
+ const filePath = path.join(claudePath, relativePath);
139
+ return fs.readFileSync(filePath, "utf-8");
140
+ }
141
+ /**
142
+ * Copy a directory from .trellis/ to target, making scripts executable
143
+ * @param srcRelativePath - Source path relative to .trellis/ (e.g., 'scripts')
144
+ * @param destPath - Absolute destination path
145
+ * @param options - Copy options
146
+ */
147
+ export function copyTrellisDir(srcRelativePath, destPath, options) {
148
+ const trellisPath = getTrellisSourcePath();
149
+ const srcPath = path.join(trellisPath, srcRelativePath);
150
+ copyDirRecursive(srcPath, destPath, options);
151
+ }
152
+ /**
153
+ * Recursively copy directory with options
154
+ */
155
+ function copyDirRecursive(src, dest, options) {
156
+ fs.mkdirSync(dest, { recursive: true });
157
+ for (const entry of fs.readdirSync(src)) {
158
+ const srcPath = path.join(src, entry);
159
+ const destPath = path.join(dest, entry);
160
+ const stat = fs.statSync(srcPath);
161
+ if (stat.isDirectory()) {
162
+ copyDirRecursive(srcPath, destPath, options);
163
+ }
164
+ else {
165
+ fs.copyFileSync(srcPath, destPath);
166
+ // Make shell scripts executable
167
+ if (options?.executable && entry.endsWith(".sh")) {
168
+ fs.chmodSync(destPath, 0o755);
169
+ }
170
+ }
171
+ }
172
+ }
34
173
  //# sourceMappingURL=extract.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract.js","sourceRoot":"","sources":["../../src/templates/extract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAI3C;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC1B,QAA0B,EAC1B,QAAgB;IAEhB,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAA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@
1
- # Developer identity (local only)
1
+ # Trellis workflow gitignore
2
+ # Runtime files that should not be committed
3
+
4
+ # Developer identity (local to each developer)
2
5
  .developer
3
6
 
7
+ # Current feature pointer (local state)
8
+ .current-feature
@@ -1,12 +1,16 @@
1
1
  /**
2
2
  * Markdown templates for Trellis workflow
3
- * Each template is stored as a .txt file
3
+ *
4
+ * Some templates are dogfooded from .trellis/ (workflow.md, .gitignore, agent-traces/index.md)
5
+ * Others are standalone templates in src/templates/markdown/ (init-agent.md, agents.md)
6
+ * Structure templates use .md.txt extension as they are generic templates for new projects.
4
7
  */
5
8
  export declare const agentProgressIndexContent: string;
6
9
  export declare const workflowMdContent: string;
7
10
  export declare const workflowGitignoreContent: string;
8
11
  export declare const initAgentContent: string;
9
12
  export declare const agentsMdContent: string;
13
+ export declare const worktreeYamlContent: string;
10
14
  export declare const backendIndexContent: string;
11
15
  export declare const backendDirectoryStructureContent: string;
12
16
  export declare const backendDatabaseGuidelinesContent: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/markdown/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,eAAO,MAAM,yBAAyB,EAAE,MAEvC,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,MAAwC,CAAC;AACzE,eAAO,MAAM,wBAAwB,EAAE,MAAsC,CAAC;AAG9E,eAAO,MAAM,gBAAgB,EAAE,MAA0C,CAAC;AAC1E,eAAO,MAAM,eAAe,EAAE,MAAsC,CAAC;AAGrE,eAAO,MAAM,mBAAmB,EAAE,MAEjC,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,+BAA+B,EAAE,MAE7C,CAAC;AACF,eAAO,MAAM,+BAA+B,EAAE,MAE7C,CAAC;AACF,eAAO,MAAM,2BAA2B,EAAE,MAEzC,CAAC;AAGF,eAAO,MAAM,oBAAoB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AAC;AACF,eAAO,MAAM,kCAAkC,EAAE,MAEhD,CAAC;AACF,eAAO,MAAM,gCAAgC,EAAE,MAE9C,CAAC;AACF,eAAO,MAAM,8BAA8B,EAAE,MAE5C,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,MAEhC,CAAC;AACF,eAAO,MAAM,oCAAoC,EAAE,MAElD,CAAC;AACF,eAAO,MAAM,mCAAmC,EAAE,MAEjD,CAAC"}
@@ -1,33 +1,61 @@
1
1
  /**
2
2
  * Markdown templates for Trellis workflow
3
- * Each template is stored as a .txt file
3
+ *
4
+ * Some templates are dogfooded from .trellis/ (workflow.md, .gitignore, agent-traces/index.md)
5
+ * Others are standalone templates in src/templates/markdown/ (init-agent.md, agents.md)
6
+ * Structure templates use .md.txt extension as they are generic templates for new projects.
4
7
  */
5
- import { readMarkdown } from "../extract.js";
6
- // Agent progress
7
- export const agentProgressIndexContent = readMarkdown("agent-traces-index.md.txt");
8
- // Workflow documentation
9
- export const workflowMdContent = readMarkdown("workflow.md.txt");
10
- export const workflowGitignoreContent = readMarkdown("gitignore.txt");
11
- // Root files
12
- export const initAgentContent = readMarkdown("init-agent.md.txt");
13
- export const agentsMdContent = readMarkdown("agents.md.txt");
8
+ import { readFileSync } from "node:fs";
9
+ import { dirname, join } from "node:path";
10
+ import { fileURLToPath } from "node:url";
11
+ import { readTrellisFile } from "../extract.js";
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = dirname(__filename);
14
+ /**
15
+ * Read a template file from src/templates/markdown/
16
+ */
17
+ function readLocalTemplate(filename) {
18
+ const filePath = join(__dirname, filename);
19
+ return readFileSync(filePath, "utf-8");
20
+ }
21
+ // =============================================================================
22
+ // Dogfooded files (from .trellis/)
23
+ // =============================================================================
24
+ // Agent progress index (from .trellis/agent-traces/index.md)
25
+ export const agentProgressIndexContent = readTrellisFile("agent-traces/index.md");
26
+ // Workflow documentation (from .trellis/workflow.md)
27
+ export const workflowMdContent = readTrellisFile("workflow.md");
28
+ // Gitignore (template file - .gitignore is ignored by npm)
29
+ export const workflowGitignoreContent = readLocalTemplate("gitignore.txt");
30
+ // =============================================================================
31
+ // Standalone templates (not dogfooded)
32
+ // =============================================================================
33
+ // Root files for new projects
34
+ export const initAgentContent = readLocalTemplate("init-agent.md");
35
+ export const agentsMdContent = readLocalTemplate("agents.md");
36
+ // Worktree config template (generic, not dogfooded from Trellis project)
37
+ export const worktreeYamlContent = readLocalTemplate("worktree.yaml.txt");
38
+ // =============================================================================
39
+ // Structure templates (generic templates from .txt files)
40
+ // These are NOT dogfooded - they are generic templates for new projects
41
+ // =============================================================================
14
42
  // Backend structure (multi-doc format)
15
- export const backendIndexContent = readMarkdown("structure/backend/index.md.txt");
16
- export const backendDirectoryStructureContent = readMarkdown("structure/backend/directory-structure.md.txt");
17
- export const backendDatabaseGuidelinesContent = readMarkdown("structure/backend/database-guidelines.md.txt");
18
- export const backendLoggingGuidelinesContent = readMarkdown("structure/backend/logging-guidelines.md.txt");
19
- export const backendQualityGuidelinesContent = readMarkdown("structure/backend/quality-guidelines.md.txt");
20
- export const backendErrorHandlingContent = readMarkdown("structure/backend/error-handling.md.txt");
43
+ export const backendIndexContent = readLocalTemplate("structure/backend/index.md.txt");
44
+ export const backendDirectoryStructureContent = readLocalTemplate("structure/backend/directory-structure.md.txt");
45
+ export const backendDatabaseGuidelinesContent = readLocalTemplate("structure/backend/database-guidelines.md.txt");
46
+ export const backendLoggingGuidelinesContent = readLocalTemplate("structure/backend/logging-guidelines.md.txt");
47
+ export const backendQualityGuidelinesContent = readLocalTemplate("structure/backend/quality-guidelines.md.txt");
48
+ export const backendErrorHandlingContent = readLocalTemplate("structure/backend/error-handling.md.txt");
21
49
  // Frontend structure (multi-doc format)
22
- export const frontendIndexContent = readMarkdown("structure/frontend/index.md.txt");
23
- export const frontendDirectoryStructureContent = readMarkdown("structure/frontend/directory-structure.md.txt");
24
- export const frontendTypeSafetyContent = readMarkdown("structure/frontend/type-safety.md.txt");
25
- export const frontendHookGuidelinesContent = readMarkdown("structure/frontend/hook-guidelines.md.txt");
26
- export const frontendComponentGuidelinesContent = readMarkdown("structure/frontend/component-guidelines.md.txt");
27
- export const frontendQualityGuidelinesContent = readMarkdown("structure/frontend/quality-guidelines.md.txt");
28
- export const frontendStateManagementContent = readMarkdown("structure/frontend/state-management.md.txt");
50
+ export const frontendIndexContent = readLocalTemplate("structure/frontend/index.md.txt");
51
+ export const frontendDirectoryStructureContent = readLocalTemplate("structure/frontend/directory-structure.md.txt");
52
+ export const frontendTypeSafetyContent = readLocalTemplate("structure/frontend/type-safety.md.txt");
53
+ export const frontendHookGuidelinesContent = readLocalTemplate("structure/frontend/hook-guidelines.md.txt");
54
+ export const frontendComponentGuidelinesContent = readLocalTemplate("structure/frontend/component-guidelines.md.txt");
55
+ export const frontendQualityGuidelinesContent = readLocalTemplate("structure/frontend/quality-guidelines.md.txt");
56
+ export const frontendStateManagementContent = readLocalTemplate("structure/frontend/state-management.md.txt");
29
57
  // Guides structure
30
- export const guidesIndexContent = readMarkdown("structure/guides/index.md.txt");
31
- export const guidesCrossLayerThinkingGuideContent = readMarkdown("structure/guides/cross-layer-thinking-guide.md.txt");
32
- export const guidesCodeReuseThinkingGuideContent = readMarkdown("structure/guides/code-reuse-thinking-guide.md.txt");
58
+ export const guidesIndexContent = readLocalTemplate("structure/guides/index.md.txt");
59
+ export const guidesCrossLayerThinkingGuideContent = readLocalTemplate("structure/guides/cross-layer-thinking-guide.md.txt");
60
+ export const guidesCodeReuseThinkingGuideContent = readLocalTemplate("structure/guides/code-reuse-thinking-guide.md.txt");
33
61
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/markdown/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,iBAAiB;AACjB,MAAM,CAAC,MAAM,yBAAyB,GAAW,YAAY,CAC3D,2BAA2B,CAC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8B,GAAW,iBAAiB,CACrE,4CAA4C,CAC7C,CAAC;AAEF,mBAAmB;AACnB,MAAM,CAAC,MAAM,kBAAkB,GAAW,iBAAiB,CACzD,+BAA+B,CAChC,CAAC;AACF,MAAM,CAAC,MAAM,oCAAoC,GAAW,iBAAiB,CAC3E,oDAAoD,CACrD,CAAC;AACF,MAAM,CAAC,MAAM,mCAAmC,GAAW,iBAAiB,CAC1E,mDAAmD,CACpD,CAAC"}
@@ -10,10 +10,10 @@
10
10
  Document your project's backend directory structure here.
11
11
 
12
12
  Questions to answer:
13
- - Where do API routes/handlers live?
14
- - Where does business logic go?
15
- - How are database-related files organized?
16
- - Where are shared utilities?
13
+ - How are modules/packages organized?
14
+ - Where does business logic live?
15
+ - Where are API endpoints defined?
16
+ - How are utilities and helpers organized?
17
17
  -->
18
18
 
19
19
  (To be filled by the team)
@@ -24,7 +24,7 @@ Questions to answer:
24
24
 
25
25
  ```
26
26
  <!-- Replace with your actual structure -->
27
- server/
27
+ src/
28
28
  ├── ...
29
29
  └── ...
30
30
  ```
@@ -33,7 +33,7 @@ server/
33
33
 
34
34
  ## Module Organization
35
35
 
36
- <!-- How should new features be organized? -->
36
+ <!-- How should new features/modules be organized? -->
37
37
 
38
38
  (To be filled by the team)
39
39
 
@@ -1,6 +1,6 @@
1
1
  # Error Handling
2
2
 
3
- > How errors are handled in this project's backend.
3
+ > How errors are handled in this project.
4
4
 
5
5
  ---
6
6
 
@@ -10,10 +10,10 @@
10
10
  Document your project's error handling conventions here.
11
11
 
12
12
  Questions to answer:
13
- - What error types do you use?
13
+ - What error types do you define?
14
+ - How are errors propagated?
14
15
  - How are errors logged?
15
16
  - How are errors returned to clients?
16
- - How do you handle unexpected errors?
17
17
  -->
18
18
 
19
19
  (To be filled by the team)
@@ -22,23 +22,23 @@ Questions to answer:
22
22
 
23
23
  ## Error Types
24
24
 
25
- <!-- Custom error classes, error codes -->
25
+ <!-- Custom error classes/types -->
26
26
 
27
27
  (To be filled by the team)
28
28
 
29
29
  ---
30
30
 
31
- ## Error Response Format
31
+ ## Error Handling Patterns
32
32
 
33
- <!-- How errors are formatted in API responses -->
33
+ <!-- Try-catch patterns, error propagation -->
34
34
 
35
35
  (To be filled by the team)
36
36
 
37
37
  ---
38
38
 
39
- ## Logging Errors
39
+ ## API Error Responses
40
40
 
41
- <!-- How and where errors should be logged -->
41
+ <!-- Standard error response format -->
42
42
 
43
43
  (To be filled by the team)
44
44
 
@@ -14,11 +14,11 @@ This directory contains guidelines for backend development. Fill in each file wi
14
14
 
15
15
  | Guide | Description | Status |
16
16
  |-------|-------------|--------|
17
- | [Directory Structure](./directory-structure.md) | Module organization and file layout | To fill |
18
- | [Database Guidelines](./database-guidelines.md) | ORM patterns, queries, migrations | To fill |
19
- | [Error Handling](./error-handling.md) | Error types, handling strategies | To fill |
20
- | [Quality Guidelines](./quality-guidelines.md) | Code standards, forbidden patterns | To fill |
21
- | [Logging Guidelines](./logging-guidelines.md) | Structured logging, log levels | To fill |
17
+ | [Directory Structure](./directory-structure.md) | Module organization and file layout | To fill |
18
+ | [Database Guidelines](./database-guidelines.md) | ORM patterns, queries, migrations | To fill |
19
+ | [Error Handling](./error-handling.md) | Error types, handling strategies | To fill |
20
+ | [Quality Guidelines](./quality-guidelines.md) | Code standards, forbidden patterns | To fill |
21
+ | [Logging Guidelines](./logging-guidelines.md) | Structured logging, log levels | To fill |
22
22
 
23
23
  ---
24
24
 
@@ -11,9 +11,9 @@ Document your project's logging conventions here.
11
11
 
12
12
  Questions to answer:
13
13
  - What logging library do you use?
14
- - What log levels are available?
15
- - What context should be included in logs?
16
- - Where are logs stored/shipped?
14
+ - What are the log levels and when to use each?
15
+ - What should be logged?
16
+ - What should NOT be logged (PII, secrets)?
17
17
  -->
18
18
 
19
19
  (To be filled by the team)
@@ -22,15 +22,15 @@ Questions to answer:
22
22
 
23
23
  ## Log Levels
24
24
 
25
- <!-- When to use each log level -->
25
+ <!-- When to use each level: debug, info, warn, error -->
26
26
 
27
27
  (To be filled by the team)
28
28
 
29
29
  ---
30
30
 
31
- ## Log Format
31
+ ## Structured Logging
32
32
 
33
- <!-- Structure of log messages -->
33
+ <!-- Log format, required fields -->
34
34
 
35
35
  (To be filled by the team)
36
36
 
@@ -38,7 +38,7 @@ Questions to answer:
38
38
 
39
39
  ## What to Log
40
40
 
41
- <!-- Events that should always be logged -->
41
+ <!-- Important events to log -->
42
42
 
43
43
  (To be filled by the team)
44
44
 
@@ -46,6 +46,6 @@ Questions to answer:
46
46
 
47
47
  ## What NOT to Log
48
48
 
49
- <!-- Sensitive data, PII, etc. -->
49
+ <!-- Sensitive data, PII, secrets -->
50
50
 
51
51
  (To be filled by the team)
@@ -14,12 +14,12 @@ This directory contains guidelines for frontend development. Fill in each file w
14
14
 
15
15
  | Guide | Description | Status |
16
16
  |-------|-------------|--------|
17
- | [Directory Structure](./directory-structure.md) | Module organization and file layout | To fill |
18
- | [Component Guidelines](./component-guidelines.md) | Component patterns, props, composition | To fill |
19
- | [Hook Guidelines](./hook-guidelines.md) | Custom hooks, data fetching patterns | To fill |
20
- | [State Management](./state-management.md) | Local state, global state, server state | To fill |
21
- | [Quality Guidelines](./quality-guidelines.md) | Code standards, forbidden patterns | To fill |
22
- | [Type Safety](./type-safety.md) | Type patterns, validation | To fill |
17
+ | [Directory Structure](./directory-structure.md) | Module organization and file layout | To fill |
18
+ | [Component Guidelines](./component-guidelines.md) | Component patterns, props, composition | To fill |
19
+ | [Hook Guidelines](./hook-guidelines.md) | Custom hooks, data fetching patterns | To fill |
20
+ | [State Management](./state-management.md) | Local state, global state, server state | To fill |
21
+ | [Quality Guidelines](./quality-guidelines.md) | Code standards, forbidden patterns | To fill |
22
+ | [Type Safety](./type-safety.md) | Type patterns, validation | To fill |
23
23
 
24
24
  ---
25
25
 
@@ -22,7 +22,7 @@ Common cross-layer bugs:
22
22
  Draw out how data moves:
23
23
 
24
24
  ```
25
- Source Transform Store Retrieve Transform Display
25
+ Source -> Transform -> Store -> Retrieve -> Transform -> Display
26
26
  ```
27
27
 
28
28
  For each arrow, ask:
@@ -34,10 +34,10 @@ For each arrow, ask:
34
34
 
35
35
  | Boundary | Common Issues |
36
36
  |----------|---------------|
37
- | API Service | Type mismatches, missing fields |
38
- | Service Database | Format conversions, null handling |
39
- | Backend Frontend | Serialization, date formats |
40
- | Component Component | Props shape changes |
37
+ | API <-> Service | Type mismatches, missing fields |
38
+ | Service <-> Database | Format conversions, null handling |
39
+ | Backend <-> Frontend | Serialization, date formats |
40
+ | Component <-> Component | Props shape changes |
41
41
 
42
42
  ### Step 3: Define Contracts
43
43