@jahanxu/trellis 0.5.0 → 0.5.5
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/dist/cli/index.js +1 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +98 -5
- package/dist/commands/init.js.map +1 -1
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +8 -58
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +0 -17
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +0 -19
- package/dist/constants/paths.js.map +1 -1
- package/dist/templates/claude/commands/trellis/handoff.md +56 -122
- package/dist/templates/claude/hooks/enforce-output-dir.py +115 -0
- package/dist/templates/claude/hooks/session-start.py +87 -166
- package/dist/templates/claude/settings.json +10 -0
- package/dist/templates/iflow/hooks/session-start.py +0 -171
- package/dist/templates/markdown/index.d.ts +0 -9
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +0 -10
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/trellis/index.d.ts +9 -1
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +17 -2
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/common/__init__.py +11 -0
- package/dist/templates/trellis/scripts/common/paths.py +1 -49
- package/dist/templates/trellis/scripts/common/roles.py +252 -0
- package/dist/templates/trellis/spec/roles/designer/index.md +49 -0
- package/dist/templates/trellis/spec/roles/frontend-impl/index.md +52 -0
- package/dist/templates/trellis/spec/roles/pm/index.md +44 -0
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +2 -0
- package/dist/utils/template-hash.js.map +1 -1
- package/package.json +2 -2
- package/dist/templates/claude/commands/trellis/pick-task.md +0 -145
- package/dist/templates/iflow/commands/trellis/handoff.md +0 -148
- package/dist/templates/iflow/commands/trellis/pick-task.md +0 -145
- package/dist/templates/markdown/spec/roles/designer/index.md.txt +0 -57
- package/dist/templates/markdown/spec/roles/designer/mock-data-standards.md.txt +0 -63
- package/dist/templates/markdown/spec/roles/designer/prototype-guidelines.md.txt +0 -49
- package/dist/templates/markdown/spec/roles/frontend-impl/api-integration.md.txt +0 -63
- package/dist/templates/markdown/spec/roles/frontend-impl/index.md.txt +0 -57
- package/dist/templates/markdown/spec/roles/frontend-impl/prototype-to-production.md.txt +0 -57
- package/dist/templates/markdown/spec/roles/pm/index.md.txt +0 -45
- package/dist/templates/markdown/spec/roles/pm/prd-template.md.txt +0 -64
- package/dist/templates/markdown/spec/roles/pm/requirement-checklist.md.txt +0 -43
- package/dist/templates/trellis/scripts/pool.py +0 -322
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Session Start Hook - Inject structured context
|
|
5
5
|
"""
|
|
6
|
-
from __future__ import annotations
|
|
7
6
|
|
|
8
7
|
# IMPORTANT: Suppress all warnings FIRST
|
|
9
8
|
import warnings
|
|
@@ -66,166 +65,6 @@ def run_script(script_path: Path) -> str:
|
|
|
66
65
|
return "No context available"
|
|
67
66
|
|
|
68
67
|
|
|
69
|
-
def detect_role(trellis_dir: Path) -> str | None:
|
|
70
|
-
"""Detect role from developer name ({role}-{name} convention)."""
|
|
71
|
-
dev_file = trellis_dir / ".developer"
|
|
72
|
-
if not dev_file.is_file():
|
|
73
|
-
return None
|
|
74
|
-
try:
|
|
75
|
-
content = dev_file.read_text(encoding="utf-8")
|
|
76
|
-
for line in content.splitlines():
|
|
77
|
-
if line.startswith("name="):
|
|
78
|
-
name = line.split("=", 1)[1].strip()
|
|
79
|
-
if "-" in name:
|
|
80
|
-
role = name.split("-", 1)[0]
|
|
81
|
-
if role in ("pm", "designer", "frontend", "frontend-impl"):
|
|
82
|
-
return role
|
|
83
|
-
except (OSError, IOError):
|
|
84
|
-
pass
|
|
85
|
-
return None
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
def inject_upstream_context(trellis_dir: Path, project_dir: Path, output: StringIO) -> None:
|
|
89
|
-
"""Inject upstream context when source.json exists in current task."""
|
|
90
|
-
current_task_file = trellis_dir / ".current-task"
|
|
91
|
-
if not current_task_file.is_file():
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
try:
|
|
95
|
-
task_rel = current_task_file.read_text(encoding="utf-8").strip()
|
|
96
|
-
except (OSError, IOError):
|
|
97
|
-
return
|
|
98
|
-
|
|
99
|
-
if not task_rel:
|
|
100
|
-
return
|
|
101
|
-
|
|
102
|
-
task_dir = project_dir / task_rel
|
|
103
|
-
source_file = task_dir / "source.json"
|
|
104
|
-
if not source_file.is_file():
|
|
105
|
-
return
|
|
106
|
-
|
|
107
|
-
try:
|
|
108
|
-
source = json.loads(source_file.read_text(encoding="utf-8"))
|
|
109
|
-
except (json.JSONDecodeError, OSError):
|
|
110
|
-
return
|
|
111
|
-
|
|
112
|
-
based_on = source.get("based_on")
|
|
113
|
-
if not based_on:
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
output.write("<upstream-context>\n")
|
|
117
|
-
output.write("## Based on Upstream Deliverable\n")
|
|
118
|
-
output.write(f"- Type: {based_on.get('type', '?')}\n")
|
|
119
|
-
output.write(f"- ID: {based_on.get('id', '?')}\n")
|
|
120
|
-
output.write(f"- Path: {based_on.get('path', '?')}\n\n")
|
|
121
|
-
|
|
122
|
-
handoff_path = project_dir / based_on.get("handoff_doc", "")
|
|
123
|
-
if handoff_path.is_file():
|
|
124
|
-
output.write("### Handoff Document\n")
|
|
125
|
-
handoff_content = read_file(handoff_path)
|
|
126
|
-
if len(handoff_content) > 3000:
|
|
127
|
-
handoff_content = handoff_content[:3000] + "\n... (truncated)"
|
|
128
|
-
output.write(handoff_content)
|
|
129
|
-
output.write("\n\n")
|
|
130
|
-
|
|
131
|
-
source_path = project_dir / based_on.get("path", "")
|
|
132
|
-
if source_path.is_dir():
|
|
133
|
-
output.write("### Upstream Deliverable Files\n")
|
|
134
|
-
total_size = 0
|
|
135
|
-
text_exts = {".md", ".txt", ".tsx", ".ts", ".jsx", ".js", ".vue", ".css", ".json", ".yaml", ".yml", ".html"}
|
|
136
|
-
for fpath in sorted(source_path.rglob("*")):
|
|
137
|
-
if not fpath.is_file():
|
|
138
|
-
continue
|
|
139
|
-
if fpath.name == "HANDOFF.md":
|
|
140
|
-
continue
|
|
141
|
-
if fpath.suffix not in text_exts:
|
|
142
|
-
continue
|
|
143
|
-
if total_size >= 50000:
|
|
144
|
-
output.write("\n(total size cap reached, remaining files omitted)\n")
|
|
145
|
-
break
|
|
146
|
-
try:
|
|
147
|
-
content = fpath.read_text(encoding="utf-8")
|
|
148
|
-
except (OSError, UnicodeDecodeError):
|
|
149
|
-
continue
|
|
150
|
-
rel = fpath.relative_to(source_path)
|
|
151
|
-
output.write(f"\n#### {rel}\n")
|
|
152
|
-
ext = fpath.suffix[1:] if fpath.suffix else ""
|
|
153
|
-
if len(content) > 3000:
|
|
154
|
-
content = content[:3000] + "\n... (truncated)"
|
|
155
|
-
output.write(f"```{ext}\n{content}\n```\n")
|
|
156
|
-
total_size += len(content)
|
|
157
|
-
|
|
158
|
-
output.write("</upstream-context>\n\n")
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
def inject_pool_summary(trellis_dir: Path, output: StringIO) -> None:
|
|
162
|
-
"""Inject available tasks summary from pool files."""
|
|
163
|
-
pool_dir = trellis_dir / "pool"
|
|
164
|
-
if not pool_dir.is_dir():
|
|
165
|
-
return
|
|
166
|
-
|
|
167
|
-
pool_files = sorted(pool_dir.glob("*.json"))
|
|
168
|
-
if not pool_files:
|
|
169
|
-
return
|
|
170
|
-
|
|
171
|
-
has_available = False
|
|
172
|
-
pool_output = StringIO()
|
|
173
|
-
|
|
174
|
-
for pool_file in pool_files:
|
|
175
|
-
try:
|
|
176
|
-
data = json.loads(pool_file.read_text(encoding="utf-8"))
|
|
177
|
-
except (json.JSONDecodeError, OSError):
|
|
178
|
-
continue
|
|
179
|
-
|
|
180
|
-
available = [
|
|
181
|
-
i for i in data.get("available", [])
|
|
182
|
-
if i.get("status") == "available"
|
|
183
|
-
]
|
|
184
|
-
if not available:
|
|
185
|
-
continue
|
|
186
|
-
|
|
187
|
-
has_available = True
|
|
188
|
-
pool_name = pool_file.stem
|
|
189
|
-
pool_output.write(f"## Available in {pool_name} ({len(available)})\n")
|
|
190
|
-
for item in available:
|
|
191
|
-
completed_by = item.get("completed_by", "?")
|
|
192
|
-
completed_at = item.get("completed_at", "?")
|
|
193
|
-
pool_output.write(
|
|
194
|
-
f"- {item.get('id', '?')}: {item.get('title', '?')} "
|
|
195
|
-
f"(by {completed_by}, {completed_at})\n"
|
|
196
|
-
)
|
|
197
|
-
pool_output.write("\n")
|
|
198
|
-
|
|
199
|
-
if has_available:
|
|
200
|
-
output.write("<available-tasks>\n")
|
|
201
|
-
output.write(pool_output.getvalue())
|
|
202
|
-
output.write("Use `/trellis:pick-task <pool> <id>` to start working on an available item.\n")
|
|
203
|
-
output.write("</available-tasks>\n\n")
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
def inject_role_guidelines(trellis_dir: Path, role: str | None, output: StringIO) -> None:
|
|
207
|
-
"""Inject role-specific guidelines if role is detected."""
|
|
208
|
-
if not role:
|
|
209
|
-
return
|
|
210
|
-
|
|
211
|
-
role_dir_map = {
|
|
212
|
-
"pm": "pm",
|
|
213
|
-
"designer": "designer",
|
|
214
|
-
"frontend": "frontend-impl",
|
|
215
|
-
"frontend-impl": "frontend-impl",
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
role_dir = role_dir_map.get(role)
|
|
219
|
-
if not role_dir:
|
|
220
|
-
return
|
|
221
|
-
|
|
222
|
-
role_index = trellis_dir / "spec" / "roles" / role_dir / "index.md"
|
|
223
|
-
if role_index.is_file():
|
|
224
|
-
output.write(f"## Role: {role}\n")
|
|
225
|
-
output.write(read_file(role_index))
|
|
226
|
-
output.write("\n\n")
|
|
227
|
-
|
|
228
|
-
|
|
229
68
|
def main():
|
|
230
69
|
if should_skip_injection():
|
|
231
70
|
sys.exit(0)
|
|
@@ -256,10 +95,6 @@ Read and follow all instructions below carefully.
|
|
|
256
95
|
|
|
257
96
|
output.write("<guidelines>\n")
|
|
258
97
|
|
|
259
|
-
# Detect role and inject role-specific guidelines
|
|
260
|
-
role = detect_role(trellis_dir)
|
|
261
|
-
inject_role_guidelines(trellis_dir, role, output)
|
|
262
|
-
|
|
263
98
|
output.write("## Frontend\n")
|
|
264
99
|
frontend_index = read_file(
|
|
265
100
|
trellis_dir / "spec" / "frontend" / "index.md", "Not configured"
|
|
@@ -282,12 +117,6 @@ Read and follow all instructions below carefully.
|
|
|
282
117
|
|
|
283
118
|
output.write("\n</guidelines>\n\n")
|
|
284
119
|
|
|
285
|
-
# Inject upstream context (from source.json in current task)
|
|
286
|
-
inject_upstream_context(trellis_dir, project_dir, output)
|
|
287
|
-
|
|
288
|
-
# Inject pool summary (available tasks)
|
|
289
|
-
inject_pool_summary(trellis_dir, output)
|
|
290
|
-
|
|
291
120
|
output.write("<instructions>\n")
|
|
292
121
|
start_md = read_file(
|
|
293
122
|
iflow_dir / "commands" / "trellis" / "start.md", "No start.md found"
|
|
@@ -24,13 +24,4 @@ export declare const frontendStateManagementContent: string;
|
|
|
24
24
|
export declare const guidesIndexContent: string;
|
|
25
25
|
export declare const guidesCrossLayerThinkingGuideContent: string;
|
|
26
26
|
export declare const guidesCodeReuseThinkingGuideContent: string;
|
|
27
|
-
export declare const rolePmIndexContent: string;
|
|
28
|
-
export declare const rolePmPrdTemplateContent: string;
|
|
29
|
-
export declare const rolePmRequirementChecklistContent: string;
|
|
30
|
-
export declare const roleDesignerIndexContent: string;
|
|
31
|
-
export declare const roleDesignerPrototypeGuidelinesContent: string;
|
|
32
|
-
export declare const roleDesignerMockDataStandardsContent: string;
|
|
33
|
-
export declare const roleFrontendImplIndexContent: string;
|
|
34
|
-
export declare const roleFrontendImplApiIntegrationContent: string;
|
|
35
|
-
export declare const roleFrontendImplPrototypeToProductionContent: string;
|
|
36
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/markdown/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqBH,eAAO,MAAM,eAAe,EAAE,MAAuC,CAAC;AAGtE,eAAO,MAAM,qBAAqB,EAAE,MACK,CAAC;AAG1C,eAAO,MAAM,yBAAyB,QAAwB,CAAC;AAG/D,eAAO,MAAM,wBAAwB,EAAE,MACH,CAAC;AAQrC,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,EAAE,MAElC,CAAC;AACF,eAAO,MAAM,iCAAiC,EAAE,MAE/C,CAAC;AACF,eAAO,MAAM,yBAAyB,EAAE,MAEvC,CAAC;AACF,eAAO,MAAM,6BAA6B,EAAE,MAE3C,CAAC;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
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/markdown/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqBH,eAAO,MAAM,eAAe,EAAE,MAAuC,CAAC;AAGtE,eAAO,MAAM,qBAAqB,EAAE,MACK,CAAC;AAG1C,eAAO,MAAM,yBAAyB,QAAwB,CAAC;AAG/D,eAAO,MAAM,wBAAwB,EAAE,MACH,CAAC;AAQrC,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,EAAE,MAElC,CAAC;AACF,eAAO,MAAM,iCAAiC,EAAE,MAE/C,CAAC;AACF,eAAO,MAAM,yBAAyB,EAAE,MAEvC,CAAC;AACF,eAAO,MAAM,6BAA6B,EAAE,MAE3C,CAAC;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"}
|
|
@@ -49,14 +49,4 @@ export const frontendStateManagementContent = readLocalTemplate("spec/frontend/s
|
|
|
49
49
|
export const guidesIndexContent = readLocalTemplate("spec/guides/index.md.txt");
|
|
50
50
|
export const guidesCrossLayerThinkingGuideContent = readLocalTemplate("spec/guides/cross-layer-thinking-guide.md.txt");
|
|
51
51
|
export const guidesCodeReuseThinkingGuideContent = readLocalTemplate("spec/guides/code-reuse-thinking-guide.md.txt");
|
|
52
|
-
// Role spec templates (three-role collaboration pipeline)
|
|
53
|
-
export const rolePmIndexContent = readLocalTemplate("spec/roles/pm/index.md.txt");
|
|
54
|
-
export const rolePmPrdTemplateContent = readLocalTemplate("spec/roles/pm/prd-template.md.txt");
|
|
55
|
-
export const rolePmRequirementChecklistContent = readLocalTemplate("spec/roles/pm/requirement-checklist.md.txt");
|
|
56
|
-
export const roleDesignerIndexContent = readLocalTemplate("spec/roles/designer/index.md.txt");
|
|
57
|
-
export const roleDesignerPrototypeGuidelinesContent = readLocalTemplate("spec/roles/designer/prototype-guidelines.md.txt");
|
|
58
|
-
export const roleDesignerMockDataStandardsContent = readLocalTemplate("spec/roles/designer/mock-data-standards.md.txt");
|
|
59
|
-
export const roleFrontendImplIndexContent = readLocalTemplate("spec/roles/frontend-impl/index.md.txt");
|
|
60
|
-
export const roleFrontendImplApiIntegrationContent = readLocalTemplate("spec/roles/frontend-impl/api-integration.md.txt");
|
|
61
|
-
export const roleFrontendImplPrototypeToProductionContent = readLocalTemplate("spec/roles/frontend-impl/prototype-to-production.md.txt");
|
|
62
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/markdown/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC3C,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AAED,gFAAgF;AAChF,8BAA8B;AAC9B,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W,iBAAiB,CAC3E,+CAA+C,CAChD,CAAC;AACF,MAAM,CAAC,MAAM,mCAAmC,GAAW,iBAAiB,CAC1E,8CAA8C,CAC/C,CAAC"}
|
|
@@ -27,6 +27,7 @@ export declare const commonTaskUtils: string;
|
|
|
27
27
|
export declare const commonPhase: string;
|
|
28
28
|
export declare const commonRegistry: string;
|
|
29
29
|
export declare const commonCliAdapter: string;
|
|
30
|
+
export declare const commonRoles: string;
|
|
30
31
|
export declare const multiAgentInit: string;
|
|
31
32
|
export declare const multiAgentStart: string;
|
|
32
33
|
export declare const multiAgentCleanup: string;
|
|
@@ -39,7 +40,9 @@ export declare const taskScript: string;
|
|
|
39
40
|
export declare const getContextScript: string;
|
|
40
41
|
export declare const addSessionScript: string;
|
|
41
42
|
export declare const createBootstrapScript: string;
|
|
42
|
-
export declare const
|
|
43
|
+
export declare const specRolesPm: string;
|
|
44
|
+
export declare const specRolesDesigner: string;
|
|
45
|
+
export declare const specRolesFrontendImpl: string;
|
|
43
46
|
export declare const workflowMdTemplate: string;
|
|
44
47
|
export declare const worktreeYamlTemplate: string;
|
|
45
48
|
export declare const gitignoreTemplate: string;
|
|
@@ -47,4 +50,9 @@ export declare const gitignoreTemplate: string;
|
|
|
47
50
|
* Get all script templates as a map of relative path to content
|
|
48
51
|
*/
|
|
49
52
|
export declare function getAllScripts(): Map<string, string>;
|
|
53
|
+
/**
|
|
54
|
+
* Get all role spec templates as a map of relative path to content.
|
|
55
|
+
* Paths are relative to spec/roles/ (e.g., "pm/index.md").
|
|
56
|
+
*/
|
|
57
|
+
export declare function getAllRoleSpecs(): Map<string, string>;
|
|
50
58
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAcH,eAAO,MAAM,WAAW,QAAsC,CAAC;AAG/D,eAAO,MAAM,UA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,mBAAmB,QAA4C,CAAC;AAC7E,eAAO,MAAM,UAAU,QAAkC,CAAC;AAC1D,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AACvE,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AACvE,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AAGF,eAAO,MAAM,WAAW,QAAyC,CAAC;AAClE,eAAO,MAAM,iBAAiB,QAA+C,CAAC;AAC9E,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AAGF,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,oBAAoB,QAAgC,CAAC;AAClE,eAAO,MAAM,iBAAiB,QAAgC,CAAC;AAE/D;;GAEG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAoCnD;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAQrD"}
|
|
@@ -37,6 +37,7 @@ export const commonTaskUtils = readTemplate("scripts/common/task_utils.py");
|
|
|
37
37
|
export const commonPhase = readTemplate("scripts/common/phase.py");
|
|
38
38
|
export const commonRegistry = readTemplate("scripts/common/registry.py");
|
|
39
39
|
export const commonCliAdapter = readTemplate("scripts/common/cli_adapter.py");
|
|
40
|
+
export const commonRoles = readTemplate("scripts/common/roles.py");
|
|
40
41
|
// Python scripts - multi_agent
|
|
41
42
|
export const multiAgentInit = readTemplate("scripts/multi_agent/__init__.py");
|
|
42
43
|
export const multiAgentStart = readTemplate("scripts/multi_agent/start.py");
|
|
@@ -51,7 +52,10 @@ export const taskScript = readTemplate("scripts/task.py");
|
|
|
51
52
|
export const getContextScript = readTemplate("scripts/get_context.py");
|
|
52
53
|
export const addSessionScript = readTemplate("scripts/add_session.py");
|
|
53
54
|
export const createBootstrapScript = readTemplate("scripts/create_bootstrap.py");
|
|
54
|
-
|
|
55
|
+
// Role spec templates
|
|
56
|
+
export const specRolesPm = readTemplate("spec/roles/pm/index.md");
|
|
57
|
+
export const specRolesDesigner = readTemplate("spec/roles/designer/index.md");
|
|
58
|
+
export const specRolesFrontendImpl = readTemplate("spec/roles/frontend-impl/index.md");
|
|
55
59
|
// Configuration files
|
|
56
60
|
export const workflowMdTemplate = readTemplate("workflow.md");
|
|
57
61
|
export const worktreeYamlTemplate = readTemplate("worktree.yaml");
|
|
@@ -74,6 +78,7 @@ export function getAllScripts() {
|
|
|
74
78
|
scripts.set("common/phase.py", commonPhase);
|
|
75
79
|
scripts.set("common/registry.py", commonRegistry);
|
|
76
80
|
scripts.set("common/cli_adapter.py", commonCliAdapter);
|
|
81
|
+
scripts.set("common/roles.py", commonRoles);
|
|
77
82
|
// Multi-agent
|
|
78
83
|
scripts.set("multi_agent/__init__.py", multiAgentInit);
|
|
79
84
|
scripts.set("multi_agent/start.py", multiAgentStart);
|
|
@@ -88,7 +93,17 @@ export function getAllScripts() {
|
|
|
88
93
|
scripts.set("get_context.py", getContextScript);
|
|
89
94
|
scripts.set("add_session.py", addSessionScript);
|
|
90
95
|
scripts.set("create_bootstrap.py", createBootstrapScript);
|
|
91
|
-
scripts.set("pool.py", poolScript);
|
|
92
96
|
return scripts;
|
|
93
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Get all role spec templates as a map of relative path to content.
|
|
100
|
+
* Paths are relative to spec/roles/ (e.g., "pm/index.md").
|
|
101
|
+
*/
|
|
102
|
+
export function getAllRoleSpecs() {
|
|
103
|
+
const specs = new Map();
|
|
104
|
+
specs.set("pm/index.md", specRolesPm);
|
|
105
|
+
specs.set("designer/index.md", specRolesDesigner);
|
|
106
|
+
specs.set("frontend-impl/index.md", specRolesFrontendImpl);
|
|
107
|
+
return specs;
|
|
108
|
+
}
|
|
94
109
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH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|
check_developer,
|
|
@@ -78,3 +79,13 @@ from .paths import (
|
|
|
78
79
|
has_current_task,
|
|
79
80
|
generate_task_date_prefix,
|
|
80
81
|
)
|
|
82
|
+
|
|
83
|
+
from .roles import (
|
|
84
|
+
KNOWN_ROLES,
|
|
85
|
+
parse_role_from_username,
|
|
86
|
+
load_roles_json,
|
|
87
|
+
save_roles_json,
|
|
88
|
+
get_upstream_dirs,
|
|
89
|
+
upsert_developer_role,
|
|
90
|
+
resolve_role_constraint,
|
|
91
|
+
)
|
|
@@ -28,16 +28,13 @@ DIR_TASKS = "tasks"
|
|
|
28
28
|
DIR_ARCHIVE = "archive"
|
|
29
29
|
DIR_SPEC = "spec"
|
|
30
30
|
DIR_SCRIPTS = "scripts"
|
|
31
|
-
DIR_POOL = "pool"
|
|
32
|
-
DIR_DELIVERABLES = "deliverables"
|
|
33
31
|
|
|
34
32
|
# File names
|
|
35
33
|
FILE_DEVELOPER = ".developer"
|
|
36
34
|
FILE_CURRENT_TASK = ".current-task"
|
|
37
35
|
FILE_TASK_JSON = "task.json"
|
|
38
36
|
FILE_JOURNAL_PREFIX = "journal-"
|
|
39
|
-
|
|
40
|
-
FILE_HANDOFF_MD = "HANDOFF.md"
|
|
37
|
+
FILE_ROLES_JSON = "roles.json"
|
|
41
38
|
|
|
42
39
|
|
|
43
40
|
# =============================================================================
|
|
@@ -324,51 +321,6 @@ def has_current_task(repo_root: Path | None = None) -> bool:
|
|
|
324
321
|
return get_current_task(repo_root) is not None
|
|
325
322
|
|
|
326
323
|
|
|
327
|
-
# =============================================================================
|
|
328
|
-
# Pool Directory
|
|
329
|
-
# =============================================================================
|
|
330
|
-
|
|
331
|
-
def get_pool_dir(repo_root: Path | None = None) -> Path:
|
|
332
|
-
"""Get pool directory path.
|
|
333
|
-
|
|
334
|
-
Args:
|
|
335
|
-
repo_root: Repository root path. Defaults to auto-detected.
|
|
336
|
-
|
|
337
|
-
Returns:
|
|
338
|
-
Path to pool directory.
|
|
339
|
-
"""
|
|
340
|
-
if repo_root is None:
|
|
341
|
-
repo_root = get_repo_root()
|
|
342
|
-
return repo_root / DIR_WORKFLOW / DIR_POOL
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
def get_pool_file(pool_name: str, repo_root: Path | None = None) -> Path:
|
|
346
|
-
"""Get pool JSON file path.
|
|
347
|
-
|
|
348
|
-
Args:
|
|
349
|
-
pool_name: Pool name (e.g., 'requirements').
|
|
350
|
-
repo_root: Repository root path. Defaults to auto-detected.
|
|
351
|
-
|
|
352
|
-
Returns:
|
|
353
|
-
Path to pool JSON file.
|
|
354
|
-
"""
|
|
355
|
-
return get_pool_dir(repo_root) / f"{pool_name}.json"
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
def get_deliverables_dir(repo_root: Path | None = None) -> Path:
|
|
359
|
-
"""Get deliverables directory path (at project root).
|
|
360
|
-
|
|
361
|
-
Args:
|
|
362
|
-
repo_root: Repository root path. Defaults to auto-detected.
|
|
363
|
-
|
|
364
|
-
Returns:
|
|
365
|
-
Path to deliverables directory.
|
|
366
|
-
"""
|
|
367
|
-
if repo_root is None:
|
|
368
|
-
repo_root = get_repo_root()
|
|
369
|
-
return repo_root / DIR_DELIVERABLES
|
|
370
|
-
|
|
371
|
-
|
|
372
324
|
# =============================================================================
|
|
373
325
|
# Task ID Generation
|
|
374
326
|
# =============================================================================
|