@mindfoldhq/trellis 0.3.10 → 0.4.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -5
- package/dist/cli/index.js +5 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts +4 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +240 -43
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +206 -47
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/codebuddy.d.ts +11 -0
- package/dist/configurators/codebuddy.d.ts.map +1 -0
- package/dist/configurators/codebuddy.js +58 -0
- package/dist/configurators/codebuddy.js.map +1 -0
- package/dist/configurators/codex.d.ts +7 -4
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +40 -10
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/copilot.d.ts +9 -0
- package/dist/configurators/copilot.d.ts.map +1 -0
- package/dist/configurators/copilot.js +34 -0
- package/dist/configurators/copilot.js.map +1 -0
- package/dist/configurators/index.d.ts +11 -1
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +72 -4
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/opencode.d.ts +1 -1
- package/dist/configurators/opencode.js +1 -1
- package/dist/configurators/windsurf.d.ts +8 -0
- package/dist/configurators/windsurf.d.ts.map +1 -0
- package/dist/configurators/windsurf.js +18 -0
- package/dist/configurators/windsurf.js.map +1 -0
- package/dist/configurators/workflow.d.ts +6 -2
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +90 -58
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/migrations/index.d.ts +1 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +2 -0
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/manifests/0.4.0-beta.1.json +228 -0
- package/dist/migrations/manifests/0.4.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.5.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.7.json +9 -0
- package/dist/migrations/manifests/0.4.0-beta.8.json +34 -0
- package/dist/migrations/manifests/0.4.0-beta.9.json +9 -0
- package/dist/templates/claude/agents/dispatch.md +1 -2
- package/dist/templates/claude/agents/implement.md +2 -3
- package/dist/templates/claude/commands/trellis/before-dev.md +29 -0
- package/dist/templates/claude/commands/trellis/check.md +25 -0
- package/dist/templates/claude/commands/trellis/create-command.md +2 -2
- package/dist/templates/claude/commands/trellis/onboard.md +13 -13
- package/dist/templates/claude/commands/trellis/parallel.md +1 -2
- package/dist/templates/claude/commands/trellis/record-session.md +3 -2
- package/dist/templates/claude/commands/trellis/start.md +8 -4
- package/dist/templates/claude/hooks/inject-subagent-context.py +29 -14
- package/dist/templates/claude/hooks/ralph-loop.py +18 -10
- package/dist/templates/claude/hooks/session-start.py +201 -9
- package/dist/templates/claude/hooks/statusline.py +211 -0
- package/dist/templates/claude/settings.json +4 -0
- package/dist/templates/codebuddy/commands/trellis/before-dev.md +29 -0
- package/dist/templates/codebuddy/commands/trellis/brainstorm.md +487 -0
- package/dist/templates/codebuddy/commands/trellis/break-loop.md +107 -0
- package/dist/templates/codebuddy/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/codebuddy/commands/trellis/check.md +25 -0
- package/dist/templates/codebuddy/commands/trellis/create-command.md +154 -0
- package/dist/templates/codebuddy/commands/trellis/finish-work.md +143 -0
- package/dist/templates/codebuddy/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/codebuddy/commands/trellis/onboard.md +358 -0
- package/dist/templates/codebuddy/commands/trellis/record-session.md +61 -0
- package/dist/templates/codebuddy/commands/trellis/start.md +373 -0
- package/dist/templates/codebuddy/commands/trellis/update-spec.md +354 -0
- package/dist/templates/codebuddy/index.d.ts +25 -0
- package/dist/templates/codebuddy/index.d.ts.map +1 -0
- package/dist/templates/codebuddy/index.js +45 -0
- package/dist/templates/codebuddy/index.js.map +1 -0
- package/dist/templates/codex/agents/check.toml +23 -0
- package/dist/templates/codex/agents/implement.toml +19 -0
- package/dist/templates/codex/agents/research.toml +26 -0
- package/dist/templates/codex/codex-skills/parallel/SKILL.md +194 -0
- package/dist/templates/codex/config.toml +5 -0
- package/dist/templates/codex/hooks/session-start.py +228 -0
- package/dist/templates/codex/hooks.json +16 -0
- package/dist/templates/codex/index.d.ts +27 -5
- package/dist/templates/codex/index.d.ts.map +1 -1
- package/dist/templates/codex/index.js +60 -8
- package/dist/templates/codex/index.js.map +1 -1
- package/dist/templates/codex/skills/before-dev/SKILL.md +34 -0
- package/dist/templates/codex/skills/brainstorm/SKILL.md +1 -1
- package/dist/templates/codex/skills/break-loop/SKILL.md +1 -1
- package/dist/templates/codex/skills/check/SKILL.md +30 -0
- package/dist/templates/codex/skills/check-cross-layer/SKILL.md +1 -1
- package/dist/templates/codex/skills/create-command/SKILL.md +3 -3
- package/dist/templates/codex/skills/finish-work/SKILL.md +1 -1
- package/dist/templates/codex/skills/improve-ut/SKILL.md +69 -0
- package/dist/templates/codex/skills/integrate-skill/SKILL.md +1 -1
- package/dist/templates/codex/skills/onboard/SKILL.md +12 -12
- package/dist/templates/codex/skills/record-session/SKILL.md +4 -3
- package/dist/templates/codex/skills/start/SKILL.md +9 -4
- package/dist/templates/codex/skills/update-spec/SKILL.md +1 -1
- package/dist/templates/copilot/hooks/session-start.py +218 -0
- package/dist/templates/copilot/hooks.json +11 -0
- package/dist/templates/copilot/index.d.ts +23 -0
- package/dist/templates/copilot/index.d.ts.map +1 -0
- package/dist/templates/copilot/index.js +54 -0
- package/dist/templates/copilot/index.js.map +1 -0
- package/dist/templates/copilot/prompts/before-dev.prompt.md +33 -0
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +491 -0
- package/dist/templates/copilot/prompts/break-loop.prompt.md +129 -0
- package/dist/templates/copilot/prompts/check-cross-layer.prompt.md +157 -0
- package/dist/templates/copilot/prompts/check.prompt.md +29 -0
- package/dist/templates/copilot/prompts/create-command.prompt.md +116 -0
- package/dist/templates/copilot/prompts/finish-work.prompt.md +157 -0
- package/dist/templates/copilot/prompts/integrate-skill.prompt.md +223 -0
- package/dist/templates/copilot/prompts/onboard.prompt.md +362 -0
- package/dist/templates/copilot/prompts/parallel.prompt.md +196 -0
- package/dist/templates/copilot/prompts/record-session.prompt.md +66 -0
- package/dist/templates/copilot/prompts/start.prompt.md +397 -0
- package/dist/templates/copilot/prompts/update-spec.prompt.md +358 -0
- package/dist/templates/cursor/commands/trellis-before-dev.md +29 -0
- package/dist/templates/cursor/commands/trellis-check.md +25 -0
- package/dist/templates/cursor/commands/trellis-create-command.md +2 -2
- package/dist/templates/cursor/commands/trellis-onboard.md +13 -13
- package/dist/templates/cursor/commands/trellis-record-session.md +3 -2
- package/dist/templates/cursor/commands/trellis-start.md +7 -16
- package/dist/templates/extract.d.ts +36 -0
- package/dist/templates/extract.d.ts.map +1 -1
- package/dist/templates/extract.js +64 -0
- package/dist/templates/extract.js.map +1 -1
- package/dist/templates/gemini/commands/trellis/before-dev.toml +33 -0
- package/dist/templates/gemini/commands/trellis/check.toml +29 -0
- package/dist/templates/gemini/commands/trellis/create-command.toml +2 -2
- package/dist/templates/gemini/commands/trellis/onboard.toml +2 -2
- package/dist/templates/gemini/commands/trellis/record-session.toml +3 -2
- package/dist/templates/gemini/commands/trellis/start.toml +9 -4
- package/dist/templates/iflow/agents/dispatch.md +1 -2
- package/dist/templates/iflow/agents/implement.md +2 -3
- package/dist/templates/iflow/commands/trellis/before-dev.md +29 -0
- package/dist/templates/iflow/commands/trellis/check.md +25 -0
- package/dist/templates/iflow/commands/trellis/create-command.md +2 -2
- package/dist/templates/iflow/commands/trellis/onboard.md +13 -13
- package/dist/templates/iflow/commands/trellis/parallel.md +1 -2
- package/dist/templates/iflow/commands/trellis/record-session.md +3 -2
- package/dist/templates/iflow/commands/trellis/start.md +8 -4
- package/dist/templates/iflow/hooks/inject-subagent-context.py +29 -14
- package/dist/templates/iflow/hooks/ralph-loop.py +8 -1
- package/dist/templates/iflow/hooks/session-start.py +187 -8
- package/dist/templates/kilo/workflows/before-dev.md +29 -0
- package/dist/templates/kilo/workflows/check.md +25 -0
- package/dist/templates/kilo/workflows/create-command.md +2 -2
- package/dist/templates/kilo/workflows/onboard.md +13 -13
- package/dist/templates/kilo/workflows/parallel.md +1 -2
- package/dist/templates/kilo/workflows/record-session.md +3 -2
- package/dist/templates/kilo/workflows/start.md +8 -3
- package/dist/templates/kiro/skills/before-dev/SKILL.md +34 -0
- package/dist/templates/kiro/skills/brainstorm/SKILL.md +1 -1
- package/dist/templates/kiro/skills/break-loop/SKILL.md +1 -1
- package/dist/templates/kiro/skills/check/SKILL.md +30 -0
- package/dist/templates/kiro/skills/check-cross-layer/SKILL.md +1 -1
- package/dist/templates/kiro/skills/create-command/SKILL.md +3 -3
- package/dist/templates/kiro/skills/finish-work/SKILL.md +1 -1
- package/dist/templates/kiro/skills/integrate-skill/SKILL.md +1 -1
- package/dist/templates/kiro/skills/onboard/SKILL.md +12 -12
- package/dist/templates/kiro/skills/record-session/SKILL.md +4 -3
- package/dist/templates/kiro/skills/start/SKILL.md +9 -4
- package/dist/templates/kiro/skills/update-spec/SKILL.md +1 -1
- package/dist/templates/markdown/agents.md +4 -0
- package/dist/templates/markdown/spec/backend/directory-structure.md +1 -1
- package/dist/templates/markdown/spec/backend/script-conventions.md +93 -0
- package/dist/templates/markdown/workspace-index.md +2 -0
- package/dist/templates/opencode/agents/dispatch.md +21 -21
- package/dist/templates/opencode/agents/implement.md +2 -2
- package/dist/templates/opencode/agents/research.md +1 -2
- package/dist/templates/opencode/commands/trellis/before-dev.md +29 -0
- package/dist/templates/opencode/commands/trellis/check.md +25 -0
- package/dist/templates/opencode/commands/trellis/create-command.md +2 -2
- package/dist/templates/opencode/commands/trellis/onboard.md +13 -13
- package/dist/templates/opencode/commands/trellis/parallel.md +1 -2
- package/dist/templates/opencode/commands/trellis/record-session.md +3 -2
- package/dist/templates/opencode/commands/trellis/start.md +8 -3
- package/dist/templates/opencode/lib/trellis-context.js +42 -2
- package/dist/templates/opencode/{plugin → plugins}/inject-subagent-context.js +45 -18
- package/dist/templates/opencode/{plugin → plugins}/session-start.js +156 -28
- package/dist/templates/qoder/skills/before-dev/SKILL.md +34 -0
- package/dist/templates/qoder/skills/brainstorm/SKILL.md +1 -1
- package/dist/templates/qoder/skills/break-loop/SKILL.md +1 -1
- package/dist/templates/qoder/skills/check/SKILL.md +30 -0
- package/dist/templates/qoder/skills/check-cross-layer/SKILL.md +1 -1
- package/dist/templates/qoder/skills/create-command/SKILL.md +3 -3
- package/dist/templates/qoder/skills/finish-work/SKILL.md +1 -1
- package/dist/templates/qoder/skills/integrate-skill/SKILL.md +1 -1
- package/dist/templates/qoder/skills/onboard/SKILL.md +14 -14
- package/dist/templates/qoder/skills/record-session/SKILL.md +4 -3
- package/dist/templates/qoder/skills/start/SKILL.md +9 -4
- package/dist/templates/qoder/skills/update-spec/SKILL.md +1 -1
- package/dist/templates/trellis/config.yaml +20 -0
- package/dist/templates/trellis/index.d.ts +11 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +22 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add_session.py +111 -13
- package/dist/templates/trellis/scripts/common/__init__.py +2 -0
- package/dist/templates/trellis/scripts/common/cli_adapter.py +164 -64
- package/dist/templates/trellis/scripts/common/config.py +192 -0
- package/dist/templates/trellis/scripts/common/developer.py +2 -2
- package/dist/templates/trellis/scripts/common/git.py +31 -0
- package/dist/templates/trellis/scripts/common/git_context.py +23 -586
- package/dist/templates/trellis/scripts/common/io.py +37 -0
- package/dist/templates/trellis/scripts/common/log.py +45 -0
- package/dist/templates/trellis/scripts/common/packages_context.py +238 -0
- package/dist/templates/trellis/scripts/common/paths.py +103 -6
- package/dist/templates/trellis/scripts/common/phase.py +50 -49
- package/dist/templates/trellis/scripts/common/registry.py +41 -72
- package/dist/templates/trellis/scripts/common/session_context.py +562 -0
- package/dist/templates/trellis/scripts/common/task_context.py +410 -0
- package/dist/templates/trellis/scripts/common/task_queue.py +27 -98
- package/dist/templates/trellis/scripts/common/task_store.py +536 -0
- package/dist/templates/trellis/scripts/common/task_utils.py +106 -10
- package/dist/templates/trellis/scripts/common/tasks.py +109 -0
- package/dist/templates/trellis/scripts/common/types.py +112 -0
- package/dist/templates/trellis/scripts/create_bootstrap.py +32 -27
- package/dist/templates/trellis/scripts/hooks/linear_sync.py +243 -0
- package/dist/templates/trellis/scripts/multi_agent/_bootstrap.py +17 -0
- package/dist/templates/trellis/scripts/multi_agent/cleanup.py +43 -48
- package/dist/templates/trellis/scripts/multi_agent/create_pr.py +336 -45
- package/dist/templates/trellis/scripts/multi_agent/plan.py +9 -32
- package/dist/templates/trellis/scripts/multi_agent/start.py +142 -68
- package/dist/templates/trellis/scripts/multi_agent/status.py +12 -753
- package/dist/templates/trellis/scripts/multi_agent/status_display.py +542 -0
- package/dist/templates/trellis/scripts/multi_agent/status_monitor.py +225 -0
- package/dist/templates/trellis/scripts/task.py +51 -976
- package/dist/templates/trellis/scripts-shell-archive/create-bootstrap.sh +1 -1
- package/dist/templates/trellis/workflow.md +38 -38
- package/dist/templates/windsurf/index.d.ts +21 -0
- package/dist/templates/windsurf/index.d.ts.map +1 -0
- package/dist/templates/windsurf/index.js +44 -0
- package/dist/templates/windsurf/index.js.map +1 -0
- package/dist/templates/windsurf/workflows/trellis-before-dev.md +31 -0
- package/dist/templates/windsurf/workflows/trellis-brainstorm.md +491 -0
- package/dist/templates/windsurf/workflows/trellis-break-loop.md +111 -0
- package/dist/templates/windsurf/workflows/trellis-check-cross-layer.md +157 -0
- package/dist/templates/windsurf/workflows/trellis-check.md +27 -0
- package/dist/templates/windsurf/workflows/trellis-create-command.md +154 -0
- package/dist/templates/windsurf/workflows/trellis-finish-work.md +147 -0
- package/dist/templates/windsurf/workflows/trellis-integrate-skill.md +220 -0
- package/dist/templates/windsurf/workflows/trellis-onboard.md +362 -0
- package/dist/templates/windsurf/workflows/trellis-record-session.md +66 -0
- package/dist/templates/windsurf/workflows/trellis-start.md +373 -0
- package/dist/templates/windsurf/workflows/trellis-update-spec.md +358 -0
- package/dist/types/ai-tools.d.ts +15 -3
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +42 -2
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/types/migration.d.ts +3 -1
- package/dist/types/migration.d.ts.map +1 -1
- package/dist/utils/project-detector.d.ts +28 -0
- package/dist/utils/project-detector.d.ts.map +1 -1
- package/dist/utils/project-detector.js +371 -0
- package/dist/utils/project-detector.js.map +1 -1
- package/dist/utils/template-fetcher.d.ts +19 -6
- package/dist/utils/template-fetcher.d.ts.map +1 -1
- package/dist/utils/template-fetcher.js +99 -17
- package/dist/utils/template-fetcher.js.map +1 -1
- package/package.json +1 -1
- package/dist/templates/claude/commands/trellis/before-backend-dev.md +0 -13
- package/dist/templates/claude/commands/trellis/before-frontend-dev.md +0 -13
- package/dist/templates/claude/commands/trellis/check-backend.md +0 -13
- package/dist/templates/claude/commands/trellis/check-frontend.md +0 -13
- package/dist/templates/codex/skills/before-backend-dev/SKILL.md +0 -18
- package/dist/templates/codex/skills/before-frontend-dev/SKILL.md +0 -18
- package/dist/templates/codex/skills/check-backend/SKILL.md +0 -18
- package/dist/templates/codex/skills/check-frontend/SKILL.md +0 -18
- package/dist/templates/cursor/commands/trellis-before-backend-dev.md +0 -13
- package/dist/templates/cursor/commands/trellis-before-frontend-dev.md +0 -13
- package/dist/templates/cursor/commands/trellis-check-backend.md +0 -13
- package/dist/templates/cursor/commands/trellis-check-frontend.md +0 -13
- package/dist/templates/gemini/commands/trellis/before-backend-dev.toml +0 -17
- package/dist/templates/gemini/commands/trellis/before-frontend-dev.toml +0 -17
- package/dist/templates/gemini/commands/trellis/check-backend.toml +0 -17
- package/dist/templates/gemini/commands/trellis/check-frontend.toml +0 -17
- package/dist/templates/iflow/commands/trellis/before-backend-dev.md +0 -13
- package/dist/templates/iflow/commands/trellis/before-frontend-dev.md +0 -13
- package/dist/templates/iflow/commands/trellis/check-backend.md +0 -13
- package/dist/templates/iflow/commands/trellis/check-frontend.md +0 -13
- package/dist/templates/kilo/workflows/before-backend-dev.md +0 -13
- package/dist/templates/kilo/workflows/before-frontend-dev.md +0 -13
- package/dist/templates/kilo/workflows/check-backend.md +0 -13
- package/dist/templates/kilo/workflows/check-frontend.md +0 -13
- package/dist/templates/kiro/skills/before-backend-dev/SKILL.md +0 -18
- package/dist/templates/kiro/skills/before-frontend-dev/SKILL.md +0 -18
- package/dist/templates/kiro/skills/check-backend/SKILL.md +0 -18
- package/dist/templates/kiro/skills/check-frontend/SKILL.md +0 -18
- package/dist/templates/opencode/commands/trellis/before-backend-dev.md +0 -13
- package/dist/templates/opencode/commands/trellis/before-frontend-dev.md +0 -13
- package/dist/templates/opencode/commands/trellis/check-backend.md +0 -13
- package/dist/templates/opencode/commands/trellis/check-frontend.md +0 -13
- package/dist/templates/qoder/skills/before-backend-dev/SKILL.md +0 -18
- package/dist/templates/qoder/skills/before-frontend-dev/SKILL.md +0 -18
- package/dist/templates/qoder/skills/check-backend/SKILL.md +0 -18
- package/dist/templates/qoder/skills/check-frontend/SKILL.md +0 -18
|
@@ -95,6 +95,25 @@ export function getIflowTemplatePath() {
|
|
|
95
95
|
export function getIflowSourcePath() {
|
|
96
96
|
return getIflowTemplatePath();
|
|
97
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Get the path to the Codex templates directory.
|
|
100
|
+
*
|
|
101
|
+
* This reads from src/templates/codex/ (development) or dist/templates/codex/ (production).
|
|
102
|
+
* These are GENERIC templates, not the Trellis project's own .agents/.codex configuration.
|
|
103
|
+
*/
|
|
104
|
+
export function getCodexTemplatePath() {
|
|
105
|
+
const templatePath = path.join(__dirname, "codex");
|
|
106
|
+
if (fs.existsSync(templatePath)) {
|
|
107
|
+
return templatePath;
|
|
108
|
+
}
|
|
109
|
+
throw new Error("Could not find codex templates directory. Expected at templates/codex/");
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated Use getCodexTemplatePath() instead.
|
|
113
|
+
*/
|
|
114
|
+
export function getCodexSourcePath() {
|
|
115
|
+
return getCodexTemplatePath();
|
|
116
|
+
}
|
|
98
117
|
/**
|
|
99
118
|
* Get the path to the kilo templates directory.
|
|
100
119
|
*
|
|
@@ -146,6 +165,25 @@ export function getAntigravityTemplatePath() {
|
|
|
146
165
|
export function getAntigravitySourcePath() {
|
|
147
166
|
return getAntigravityTemplatePath();
|
|
148
167
|
}
|
|
168
|
+
/**
|
|
169
|
+
* Get the path to the windsurf templates directory.
|
|
170
|
+
*
|
|
171
|
+
* This reads from src/templates/windsurf/ (development) or dist/templates/windsurf/ (production).
|
|
172
|
+
* These are GENERIC templates, not the Trellis project's own .windsurf/workflows configuration.
|
|
173
|
+
*/
|
|
174
|
+
export function getWindsurfTemplatePath() {
|
|
175
|
+
const templatePath = path.join(__dirname, "windsurf");
|
|
176
|
+
if (fs.existsSync(templatePath)) {
|
|
177
|
+
return templatePath;
|
|
178
|
+
}
|
|
179
|
+
throw new Error("Could not find windsurf templates directory. Expected at templates/windsurf/");
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* @deprecated Use getWindsurfTemplatePath() instead.
|
|
183
|
+
*/
|
|
184
|
+
export function getWindsurfSourcePath() {
|
|
185
|
+
return getWindsurfTemplatePath();
|
|
186
|
+
}
|
|
149
187
|
/**
|
|
150
188
|
* Get the path to the qoder templates directory.
|
|
151
189
|
*
|
|
@@ -159,6 +197,32 @@ export function getQoderTemplatePath() {
|
|
|
159
197
|
}
|
|
160
198
|
throw new Error("Could not find qoder templates directory. Expected at templates/qoder/");
|
|
161
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* Get the path to the codebuddy templates directory.
|
|
202
|
+
*
|
|
203
|
+
* This reads from src/templates/codebuddy/ (development) or dist/templates/codebuddy/ (production).
|
|
204
|
+
* These are GENERIC templates, not the Trellis project's own .codebuddy/ configuration.
|
|
205
|
+
*/
|
|
206
|
+
export function getCodebuddyTemplatePath() {
|
|
207
|
+
const templatePath = path.join(__dirname, "codebuddy");
|
|
208
|
+
if (fs.existsSync(templatePath)) {
|
|
209
|
+
return templatePath;
|
|
210
|
+
}
|
|
211
|
+
throw new Error("Could not find codebuddy templates directory. Expected at templates/codebuddy/");
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Get the path to the copilot templates directory.
|
|
215
|
+
*
|
|
216
|
+
* This reads from src/templates/copilot/ (development) or dist/templates/copilot/ (production).
|
|
217
|
+
* These are GENERIC templates, not the Trellis project's own .github/copilot/ configuration.
|
|
218
|
+
*/
|
|
219
|
+
export function getCopilotTemplatePath() {
|
|
220
|
+
const templatePath = path.join(__dirname, "copilot");
|
|
221
|
+
if (fs.existsSync(templatePath)) {
|
|
222
|
+
return templatePath;
|
|
223
|
+
}
|
|
224
|
+
throw new Error("Could not find copilot templates directory. Expected at templates/copilot/");
|
|
225
|
+
}
|
|
162
226
|
/**
|
|
163
227
|
* Read a file from the .trellis directory
|
|
164
228
|
* @param relativePath - Path relative to .trellis/ (e.g., 'scripts/task.py')
|
|
@@ -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;AACzC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAE/D,MA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AAC,CAAC;QACxC,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAElC,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACvB,MAAM,gBAAgB,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAClD,MAAM,YAAY,GAChB,OAAO,EAAE,UAAU,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1E,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
description = "Read the relevant development guidelines before starting your task"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
Read the relevant development guidelines before starting your task.
|
|
5
|
+
|
|
6
|
+
Execute these steps:
|
|
7
|
+
|
|
8
|
+
1. **Discover packages and their spec layers**:
|
|
9
|
+
```bash
|
|
10
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. **Identify which specs apply** to your task based on:
|
|
14
|
+
- Which package you're modifying (e.g., `cli/`, `docs-site/`)
|
|
15
|
+
- What type of work (backend, frontend, unit-test, docs, etc.)
|
|
16
|
+
|
|
17
|
+
3. **Read the spec index** for each relevant module:
|
|
18
|
+
```bash
|
|
19
|
+
cat .trellis/spec/<package>/<layer>/index.md
|
|
20
|
+
```
|
|
21
|
+
Follow the **"Pre-Development Checklist"** section in the index.
|
|
22
|
+
|
|
23
|
+
4. **Read the specific guideline files** listed in the Pre-Development Checklist that are relevant to your task. The index is NOT the goal -> it points you to the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`). Read those files to understand the coding standards and patterns.
|
|
24
|
+
|
|
25
|
+
5. **Always read shared guides**:
|
|
26
|
+
```bash
|
|
27
|
+
cat .trellis/spec/guides/index.md
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
6. Understand the coding standards and patterns you need to follow, then proceed with your development plan.
|
|
31
|
+
|
|
32
|
+
This step is **mandatory** before writing any code.
|
|
33
|
+
"""
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
description = "Check if the code you just wrote follows the development guidelines"
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
Check if the code you just wrote follows the development guidelines.
|
|
5
|
+
|
|
6
|
+
Execute these steps:
|
|
7
|
+
|
|
8
|
+
1. **Identify changed files**:
|
|
9
|
+
```bash
|
|
10
|
+
git diff --name-only HEAD
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. **Determine which spec modules apply** based on the changed file paths:
|
|
14
|
+
```bash
|
|
15
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
3. **Read the spec index** for each relevant module:
|
|
19
|
+
```bash
|
|
20
|
+
cat .trellis/spec/<package>/<layer>/index.md
|
|
21
|
+
```
|
|
22
|
+
Follow the **"Quality Check"** section in the index.
|
|
23
|
+
|
|
24
|
+
4. **Read the specific guideline files** referenced in the Quality Check section (e.g., `quality-guidelines.md`, `conventions.md`). The index is NOT the goal -> it points you to the actual guideline files. Read those files and review your code against them.
|
|
25
|
+
|
|
26
|
+
5. **Run lint and typecheck** for the affected package.
|
|
27
|
+
|
|
28
|
+
6. **Report any violations** and fix them if found.
|
|
29
|
+
"""
|
|
@@ -110,8 +110,8 @@ Description:
|
|
|
110
110
|
| Command Type | Prefix | Example |
|
|
111
111
|
|--------------|--------|---------|
|
|
112
112
|
| Session Start | `start` | `start` |
|
|
113
|
-
| Pre-development | `before-` | `before-
|
|
114
|
-
| Check | `check-` | `check
|
|
113
|
+
| Pre-development | `before-` | `before-dev` |
|
|
114
|
+
| Check | `check-` | `check` |
|
|
115
115
|
| Record | `record-` | `record-session` |
|
|
116
116
|
| Generate | `generate-` | `generate-api-doc` |
|
|
117
117
|
| Update | `update-` | `update-changelog` |
|
|
@@ -69,8 +69,8 @@ The `/check-*` commands re-verify code against guidelines AFTER writing, catchin
|
|
|
69
69
|
## COMMAND DEEP DIVE
|
|
70
70
|
|
|
71
71
|
### /trellis:start - Restore AI Memory
|
|
72
|
-
### /trellis:before-
|
|
73
|
-
### /trellis:check
|
|
72
|
+
### /trellis:before-dev - Inject Specialized Knowledge
|
|
73
|
+
### /trellis:check - Combat Context Drift
|
|
74
74
|
### /trellis:check-cross-layer - Multi-Dimension Verification
|
|
75
75
|
### /trellis:finish-work - Holistic Pre-Commit Review
|
|
76
76
|
### /trellis:record-session - Persist Memory for Future
|
|
@@ -34,7 +34,7 @@ python3 ./.trellis/scripts/add_session.py \\
|
|
|
34
34
|
--summary "Brief summary of what was done"
|
|
35
35
|
|
|
36
36
|
# Method 2: Pass detailed content via stdin
|
|
37
|
-
cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
|
|
37
|
+
cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --stdin --title "Title" --commit "hash"
|
|
38
38
|
| Feature | Description |
|
|
39
39
|
|---------|-------------|
|
|
40
40
|
| New API | Added user authentication endpoint |
|
|
@@ -49,6 +49,7 @@ EOF
|
|
|
49
49
|
**Auto-completes**:
|
|
50
50
|
- [OK] Appends session to journal-N.md
|
|
51
51
|
- [OK] Auto-detects line count, creates new file if >2000 lines
|
|
52
|
+
- [OK] Auto-detects Branch context (`--branch` override; otherwise Branch = task.json -> current git branch; missing values are omitted gracefully)
|
|
52
53
|
- [OK] Updates index.md (Total Sessions +1, Last Active, line stats, history)
|
|
53
54
|
- [OK] Auto-commits .trellis/workspace and .trellis/tasks changes
|
|
54
55
|
|
|
@@ -59,7 +60,7 @@ EOF
|
|
|
59
60
|
| Command | Purpose |
|
|
60
61
|
|---------|---------|
|
|
61
62
|
| `python3 ./.trellis/scripts/get_context.py --mode record` | Get context for record-session |
|
|
62
|
-
| `python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."` | **One-click add session (recommended)** |
|
|
63
|
+
| `python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."` | **One-click add session (recommended, branch auto-complete)** |
|
|
63
64
|
| `python3 ./.trellis/scripts/task.py archive <name>` | Archive completed task (auto-commits) |
|
|
64
65
|
| `python3 ./.trellis/scripts/task.py list` | List active tasks |
|
|
65
66
|
"""
|
|
@@ -43,12 +43,17 @@ This shows: developer identity, git status, current task (if any), active tasks.
|
|
|
43
43
|
### Step 3: Read Guidelines Index
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
|
|
47
|
-
cat .trellis/spec/backend/index.md # Backend guidelines
|
|
48
|
-
cat .trellis/spec/guides/index.md # Thinking guides
|
|
46
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
49
47
|
```
|
|
50
48
|
|
|
51
|
-
|
|
49
|
+
This shows available packages and their spec layers. Read the relevant spec indexes:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
cat .trellis/spec/<package>/<layer>/index.md # Package-specific guidelines
|
|
53
|
+
cat .trellis/spec/guides/index.md # Thinking guides (always read)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
> **Important**: The index files are navigation -- they list the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`).
|
|
52
57
|
> At this step, just read the indexes to understand what's available.
|
|
53
58
|
> When you start actual development, you MUST go back and read the specific guideline files relevant to your task, as listed in the index's Pre-Development Checklist.
|
|
54
59
|
|
|
@@ -41,9 +41,8 @@ Before implementing, read:
|
|
|
41
41
|
|
|
42
42
|
Read relevant specs based on task type:
|
|
43
43
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
- Guides: `.trellis/spec/guides/`
|
|
44
|
+
- Spec layers: `.trellis/spec/<package>/<layer>/`
|
|
45
|
+
- Shared guides: `.trellis/spec/guides/`
|
|
47
46
|
|
|
48
47
|
### 2. Understand Requirements
|
|
49
48
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Read the relevant development guidelines before starting your task.
|
|
2
|
+
|
|
3
|
+
Execute these steps:
|
|
4
|
+
|
|
5
|
+
1. **Discover packages and their spec layers**:
|
|
6
|
+
```bash
|
|
7
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
2. **Identify which specs apply** to your task based on:
|
|
11
|
+
- Which package you're modifying (e.g., `cli/`, `docs-site/`)
|
|
12
|
+
- What type of work (backend, frontend, unit-test, docs, etc.)
|
|
13
|
+
|
|
14
|
+
3. **Read the spec index** for each relevant module:
|
|
15
|
+
```bash
|
|
16
|
+
cat .trellis/spec/<package>/<layer>/index.md
|
|
17
|
+
```
|
|
18
|
+
Follow the **"Pre-Development Checklist"** section in the index.
|
|
19
|
+
|
|
20
|
+
4. **Read the specific guideline files** listed in the Pre-Development Checklist that are relevant to your task. The index is NOT the goal — it points you to the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`). Read those files to understand the coding standards and patterns.
|
|
21
|
+
|
|
22
|
+
5. **Always read shared guides**:
|
|
23
|
+
```bash
|
|
24
|
+
cat .trellis/spec/guides/index.md
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
6. Understand the coding standards and patterns you need to follow, then proceed with your development plan.
|
|
28
|
+
|
|
29
|
+
This step is **mandatory** before writing any code.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Check if the code you just wrote follows the development guidelines.
|
|
2
|
+
|
|
3
|
+
Execute these steps:
|
|
4
|
+
|
|
5
|
+
1. **Identify changed files**:
|
|
6
|
+
```bash
|
|
7
|
+
git diff --name-only HEAD
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
2. **Determine which spec modules apply** based on the changed file paths:
|
|
11
|
+
```bash
|
|
12
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
3. **Read the spec index** for each relevant module:
|
|
16
|
+
```bash
|
|
17
|
+
cat .trellis/spec/<package>/<layer>/index.md
|
|
18
|
+
```
|
|
19
|
+
Follow the **"Quality Check"** section in the index.
|
|
20
|
+
|
|
21
|
+
4. **Read the specific guideline files** referenced in the Quality Check section (e.g., `quality-guidelines.md`, `conventions.md`). The index is NOT the goal — it points you to the actual guideline files. Read those files and review your code against them.
|
|
22
|
+
|
|
23
|
+
5. **Run lint and typecheck** for the affected package.
|
|
24
|
+
|
|
25
|
+
6. **Report any violations** and fix them if found.
|
|
@@ -99,8 +99,8 @@ Description:
|
|
|
99
99
|
| Command Type | Prefix | Example |
|
|
100
100
|
|--------------|--------|---------|
|
|
101
101
|
| Session Start | `start` | `start` |
|
|
102
|
-
| Pre-development | `before-` | `before-
|
|
103
|
-
| Check | `check-` | `check
|
|
102
|
+
| Pre-development | `before-` | `before-dev` |
|
|
103
|
+
| Check | `check-` | `check` |
|
|
104
104
|
| Record | `record-` | `record-session` |
|
|
105
105
|
| Generate | `generate-` | `generate-api-doc` |
|
|
106
106
|
| Update | `update-` | `update-changelog` |
|
|
@@ -126,13 +126,13 @@ AI needs the same onboarding - but compressed into seconds at session start.
|
|
|
126
126
|
|
|
127
127
|
---
|
|
128
128
|
|
|
129
|
-
### /trellis:before-
|
|
129
|
+
### /trellis:before-dev - Inject Specialized Knowledge
|
|
130
130
|
|
|
131
131
|
**WHY IT EXISTS**:
|
|
132
132
|
AI models have "pre-trained knowledge" - general patterns from millions of codebases. But YOUR project has specific conventions that differ from generic patterns.
|
|
133
133
|
|
|
134
134
|
**WHAT IT ACTUALLY DOES**:
|
|
135
|
-
1.
|
|
135
|
+
1. Discovers spec layers via `get_context.py --mode packages` and reads relevant guidelines
|
|
136
136
|
2. Loads project-specific patterns into AI's working context:
|
|
137
137
|
- Component naming conventions
|
|
138
138
|
- State management patterns
|
|
@@ -140,12 +140,12 @@ AI models have "pre-trained knowledge" - general patterns from millions of codeb
|
|
|
140
140
|
- Error handling standards
|
|
141
141
|
|
|
142
142
|
**WHY THIS MATTERS**:
|
|
143
|
-
- Without before
|
|
144
|
-
- With before
|
|
143
|
+
- Without before-dev: AI writes generic code that doesn't match project style.
|
|
144
|
+
- With before-dev: AI writes code that looks like the rest of the codebase.
|
|
145
145
|
|
|
146
146
|
---
|
|
147
147
|
|
|
148
|
-
### /trellis:check
|
|
148
|
+
### /trellis:check - Combat Context Drift
|
|
149
149
|
|
|
150
150
|
**WHY IT EXISTS**:
|
|
151
151
|
AI context window has limited capacity. As conversation progresses, guidelines injected at session start become less influential. This causes "context drift."
|
|
@@ -211,9 +211,9 @@ All the context AI built during this session will be lost when session ends. The
|
|
|
211
211
|
|
|
212
212
|
**[1/8] /trellis:start** - AI needs project context before touching code
|
|
213
213
|
**[2/8] python3 ./.trellis/scripts/task.py create "Fix bug" --slug fix-bug** - Track work for future reference
|
|
214
|
-
**[3/8] /trellis:before-
|
|
214
|
+
**[3/8] /trellis:before-dev** - Inject project-specific development guidelines
|
|
215
215
|
**[4/8] Investigate and fix the bug** - Actual development work
|
|
216
|
-
**[5/8] /trellis:check
|
|
216
|
+
**[5/8] /trellis:check** - Re-verify code against guidelines
|
|
217
217
|
**[6/8] /trellis:finish-work** - Holistic cross-layer review
|
|
218
218
|
**[7/8] Human tests and commits** - Human validates before code enters repo
|
|
219
219
|
**[8/8] /trellis:record-session** - Persist memory for future sessions
|
|
@@ -228,9 +228,9 @@ All the context AI built during this session will be lost when session ends. The
|
|
|
228
228
|
### Example 3: Code Review Fixes
|
|
229
229
|
|
|
230
230
|
**[1/6] /trellis:start** - Resume context from previous session
|
|
231
|
-
**[2/6] /trellis:before-
|
|
231
|
+
**[2/6] /trellis:before-dev** - Re-inject guidelines before fixes
|
|
232
232
|
**[3/6] Fix each CR issue** - Address feedback with guidelines in context
|
|
233
|
-
**[4/6] /trellis:check
|
|
233
|
+
**[4/6] /trellis:check** - Verify fixes did not introduce new issues
|
|
234
234
|
**[5/6] /trellis:finish-work** - Document lessons from CR
|
|
235
235
|
**[6/6] Human commits, then /trellis:record-session** - Preserve CR lessons
|
|
236
236
|
|
|
@@ -238,16 +238,16 @@ All the context AI built during this session will be lost when session ends. The
|
|
|
238
238
|
|
|
239
239
|
**[1/5] /trellis:start** - Clear baseline before major changes
|
|
240
240
|
**[2/5] Plan phases** - Break into verifiable chunks
|
|
241
|
-
**[3/5] Execute phase by phase with /check
|
|
241
|
+
**[3/5] Execute phase by phase with /trellis:check after each** - Incremental verification
|
|
242
242
|
**[4/5] /trellis:finish-work** - Check if new patterns should be documented
|
|
243
243
|
**[5/5] Record with multiple commit hashes** - Link all commits to one feature
|
|
244
244
|
|
|
245
245
|
### Example 5: Debug Session
|
|
246
246
|
|
|
247
247
|
**[1/6] /trellis:start** - See if this bug was investigated before
|
|
248
|
-
**[2/6] /trellis:before-
|
|
248
|
+
**[2/6] /trellis:before-dev** - Guidelines might document known gotchas
|
|
249
249
|
**[3/6] Investigation** - Actual debugging work
|
|
250
|
-
**[4/6] /trellis:check
|
|
250
|
+
**[4/6] /trellis:check** - Verify debug changes do not break other things
|
|
251
251
|
**[5/6] /trellis:finish-work** - Debug findings might need documentation
|
|
252
252
|
**[6/6] Human commits, then /trellis:record-session** - Debug knowledge is valuable
|
|
253
253
|
|
|
@@ -256,7 +256,7 @@ All the context AI built during this session will be lost when session ends. The
|
|
|
256
256
|
## KEY RULES TO EMPHASIZE
|
|
257
257
|
|
|
258
258
|
1. **AI NEVER commits** - Human tests and approves. AI prepares, human validates.
|
|
259
|
-
2. **Guidelines before code** - /before
|
|
259
|
+
2. **Guidelines before code** - /before-dev command injects project knowledge.
|
|
260
260
|
3. **Check after code** - /check-* commands catch context drift.
|
|
261
261
|
4. **Record everything** - /trellis:record-session persists memory.
|
|
262
262
|
|
|
@@ -41,8 +41,7 @@ python3 ./.trellis/scripts/get_context.py
|
|
|
41
41
|
### Step 3: Read Project Guidelines `[AI]`
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
|
|
45
|
-
cat .trellis/spec/backend/index.md # Backend guidelines index
|
|
44
|
+
python3 ./.trellis/scripts/get_context.py --mode packages # Discover available spec layers
|
|
46
45
|
cat .trellis/spec/guides/index.md # Thinking guides
|
|
47
46
|
```
|
|
48
47
|
|
|
@@ -31,7 +31,7 @@ python3 ./.trellis/scripts/add_session.py \
|
|
|
31
31
|
--summary "Brief summary of what was done"
|
|
32
32
|
|
|
33
33
|
# Method 2: Pass detailed content via stdin
|
|
34
|
-
cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
|
|
34
|
+
cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --stdin --title "Title" --commit "hash"
|
|
35
35
|
| Feature | Description |
|
|
36
36
|
|---------|-------------|
|
|
37
37
|
| New API | Added user authentication endpoint |
|
|
@@ -46,6 +46,7 @@ EOF
|
|
|
46
46
|
**Auto-completes**:
|
|
47
47
|
- [OK] Appends session to journal-N.md
|
|
48
48
|
- [OK] Auto-detects line count, creates new file if >2000 lines
|
|
49
|
+
- [OK] Auto-detects Branch context (`--branch` override; otherwise Branch = task.json -> current git branch; missing values are omitted gracefully)
|
|
49
50
|
- [OK] Updates index.md (Total Sessions +1, Last Active, line stats, history)
|
|
50
51
|
- [OK] Auto-commits .trellis/workspace and .trellis/tasks changes
|
|
51
52
|
|
|
@@ -56,6 +57,6 @@ EOF
|
|
|
56
57
|
| Command | Purpose |
|
|
57
58
|
|---------|---------|
|
|
58
59
|
| `python3 ./.trellis/scripts/get_context.py --mode record` | Get context for record-session |
|
|
59
|
-
| `python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."` | **One-click add session (recommended)** |
|
|
60
|
+
| `python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."` | **One-click add session (recommended, branch auto-complete)** |
|
|
60
61
|
| `python3 ./.trellis/scripts/task.py archive <name>` | Archive completed task (auto-commits) |
|
|
61
62
|
| `python3 ./.trellis/scripts/task.py list` | List active tasks |
|
|
@@ -40,10 +40,14 @@ This shows: developer identity, git status, current task (if any), active tasks.
|
|
|
40
40
|
### Step 3: Read Guidelines Index
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This shows available packages and their spec layers. Read the relevant spec indexes:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cat .trellis/spec/<package>/<layer>/index.md # Package-specific guidelines
|
|
50
|
+
cat .trellis/spec/guides/index.md # Thinking guides (always read)
|
|
47
51
|
```
|
|
48
52
|
|
|
49
53
|
> **Important**: The index files are navigation — they list the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`).
|
|
@@ -99,7 +99,14 @@ def get_current_task(repo_root: str) -> str | None:
|
|
|
99
99
|
try:
|
|
100
100
|
with open(current_task_file, "r", encoding="utf-8") as f:
|
|
101
101
|
content = f.read().strip()
|
|
102
|
-
|
|
102
|
+
if not content:
|
|
103
|
+
return None
|
|
104
|
+
normalized = content.replace("\\", "/")
|
|
105
|
+
while normalized.startswith("./"):
|
|
106
|
+
normalized = normalized[2:]
|
|
107
|
+
if normalized.startswith("tasks/"):
|
|
108
|
+
normalized = f".trellis/{normalized}"
|
|
109
|
+
return normalized
|
|
103
110
|
except Exception:
|
|
104
111
|
return None
|
|
105
112
|
|
|
@@ -339,8 +346,7 @@ def get_check_context(repo_root: str, task_dir: str) -> str:
|
|
|
339
346
|
check_files = [
|
|
340
347
|
(".iflow/commands/trellis/finish-work.md", "Finish work checklist"),
|
|
341
348
|
(".iflow/commands/trellis/check-cross-layer.md", "Cross-layer check spec"),
|
|
342
|
-
(".iflow/commands/trellis/check
|
|
343
|
-
(".iflow/commands/trellis/check-frontend.md", "Frontend check spec"),
|
|
349
|
+
(".iflow/commands/trellis/check.md", "Code quality check spec"),
|
|
344
350
|
]
|
|
345
351
|
for file_path, description in check_files:
|
|
346
352
|
content = read_file_content(repo_root, file_path)
|
|
@@ -432,8 +438,7 @@ def get_debug_context(repo_root: str, task_dir: str) -> str:
|
|
|
432
438
|
context_parts.append(f"=== {file_path} (Dev spec) ===\n{content}")
|
|
433
439
|
|
|
434
440
|
check_files = [
|
|
435
|
-
(".iflow/commands/trellis/check
|
|
436
|
-
(".iflow/commands/trellis/check-frontend.md", "Frontend check spec"),
|
|
441
|
+
(".iflow/commands/trellis/check.md", "Code quality check spec"),
|
|
437
442
|
(".iflow/commands/trellis/check-cross-layer.md", "Cross-layer check spec"),
|
|
438
443
|
]
|
|
439
444
|
for file_path, description in check_files:
|
|
@@ -603,24 +608,34 @@ def get_research_context(repo_root: str, task_dir: str | None) -> str:
|
|
|
603
608
|
"""
|
|
604
609
|
context_parts = []
|
|
605
610
|
|
|
606
|
-
# 1. Project structure overview (
|
|
611
|
+
# 1. Project structure overview (dynamically discover spec directories)
|
|
607
612
|
spec_path = f"{DIR_WORKFLOW}/{DIR_SPEC}"
|
|
613
|
+
spec_root = Path(repo_root) / DIR_WORKFLOW / DIR_SPEC
|
|
614
|
+
|
|
615
|
+
# Build spec tree dynamically
|
|
616
|
+
tree_lines = [f"{spec_path}/"]
|
|
617
|
+
if spec_root.is_dir():
|
|
618
|
+
pkg_dirs = sorted(d for d in spec_root.iterdir() if d.is_dir())
|
|
619
|
+
for i, pkg_dir in enumerate(pkg_dirs):
|
|
620
|
+
is_last = i == len(pkg_dirs) - 1
|
|
621
|
+
prefix = "└── " if is_last else "├── "
|
|
622
|
+
layers = sorted(d.name for d in pkg_dir.iterdir() if d.is_dir())
|
|
623
|
+
layer_info = f" ({', '.join(layers)})" if layers else ""
|
|
624
|
+
tree_lines.append(f"{prefix}{pkg_dir.name}/{layer_info}")
|
|
625
|
+
|
|
626
|
+
spec_tree = "\n".join(tree_lines)
|
|
627
|
+
|
|
608
628
|
project_structure = f"""## Project Spec Directory Structure
|
|
609
629
|
|
|
610
630
|
```
|
|
611
|
-
{
|
|
612
|
-
├── shared/ # Cross-project common specs (TypeScript, code quality, git)
|
|
613
|
-
├── frontend/ # Frontend standards
|
|
614
|
-
├── backend/ # Backend standards
|
|
615
|
-
└── guides/ # Thinking guides (cross-layer, code reuse, etc.)
|
|
616
|
-
|
|
617
|
-
{DIR_WORKFLOW}/big-question/ # Known issues and pitfalls
|
|
631
|
+
{spec_tree}
|
|
618
632
|
```
|
|
619
633
|
|
|
634
|
+
To get structured package info, run: `python3 ./{DIR_WORKFLOW}/scripts/get_context.py --mode packages`
|
|
635
|
+
|
|
620
636
|
## Search Tips
|
|
621
637
|
|
|
622
638
|
- Spec files: `{spec_path}/**/*.md`
|
|
623
|
-
- Known issues: `{DIR_WORKFLOW}/big-question/`
|
|
624
639
|
- Code search: Use Glob and Grep tools
|
|
625
640
|
- Tech solutions: Use mcp__exa__web_search_exa or mcp__exa__get_code_context_exa"""
|
|
626
641
|
|
|
@@ -72,7 +72,14 @@ def get_current_task(repo_root: str) -> str | None:
|
|
|
72
72
|
try:
|
|
73
73
|
with open(current_task_file, "r", encoding="utf-8") as f:
|
|
74
74
|
content = f.read().strip()
|
|
75
|
-
|
|
75
|
+
if not content:
|
|
76
|
+
return None
|
|
77
|
+
normalized = content.replace("\\", "/")
|
|
78
|
+
while normalized.startswith("./"):
|
|
79
|
+
normalized = normalized[2:]
|
|
80
|
+
if normalized.startswith("tasks/"):
|
|
81
|
+
normalized = f".trellis/{normalized}"
|
|
82
|
+
return normalized
|
|
76
83
|
except Exception:
|
|
77
84
|
return None
|
|
78
85
|
|