@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
|
@@ -59,7 +59,7 @@ write_prd_header() {
|
|
|
59
59
|
Welcome to Trellis! This is your first task.
|
|
60
60
|
|
|
61
61
|
AI agents use `.trellis/spec/` to understand YOUR project's coding conventions.
|
|
62
|
-
**
|
|
62
|
+
**Starting from scratch = AI writes generic code that doesn't match your project style.**
|
|
63
63
|
|
|
64
64
|
Filling these guidelines is a one-time setup that pays off for every future AI session.
|
|
65
65
|
|
|
@@ -58,35 +58,30 @@ git status && git log --oneline -10 # Git state
|
|
|
58
58
|
**CRITICAL**: Read guidelines before writing any code:
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
#
|
|
62
|
-
|
|
61
|
+
# Discover available packages and spec layers
|
|
62
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
63
63
|
|
|
64
|
-
# Read
|
|
65
|
-
cat .trellis/spec
|
|
64
|
+
# Read the spec index for each relevant module
|
|
65
|
+
cat .trellis/spec/<package>/<layer>/index.md
|
|
66
|
+
|
|
67
|
+
# Always read shared guides
|
|
68
|
+
cat .trellis/spec/guides/index.md
|
|
66
69
|
```
|
|
67
70
|
|
|
68
|
-
**Why
|
|
69
|
-
- Understand
|
|
70
|
-
- Know coding standards for the
|
|
71
|
-
- See how frontend and backend interact
|
|
71
|
+
**Why this matters?**
|
|
72
|
+
- Understand which spec layers apply to your task
|
|
73
|
+
- Know coding standards for the packages you'll modify
|
|
72
74
|
- Learn the overall code quality requirements
|
|
73
75
|
|
|
74
76
|
### Step 3: Before Coding - Read Specific Guidelines (Required)
|
|
75
77
|
|
|
76
|
-
Based on your task, read the **detailed**
|
|
77
|
-
|
|
78
|
-
**Frontend Task**:
|
|
79
|
-
```bash
|
|
80
|
-
cat .trellis/spec/frontend/hook-guidelines.md # For hooks
|
|
81
|
-
cat .trellis/spec/frontend/component-guidelines.md # For components
|
|
82
|
-
cat .trellis/spec/frontend/type-safety.md # For types
|
|
83
|
-
```
|
|
78
|
+
Based on your task, read the **detailed** guideline files listed in each spec index's **Pre-Development Checklist**:
|
|
84
79
|
|
|
85
|
-
**Backend Task**:
|
|
86
80
|
```bash
|
|
87
|
-
|
|
88
|
-
cat .trellis/spec
|
|
89
|
-
cat .trellis/spec
|
|
81
|
+
# The index points to specific files — read those, not just the index
|
|
82
|
+
cat .trellis/spec/<package>/<layer>/error-handling.md
|
|
83
|
+
cat .trellis/spec/<package>/<layer>/conventions.md
|
|
84
|
+
# etc. — based on what the Pre-Development Checklist lists
|
|
90
85
|
```
|
|
91
86
|
|
|
92
87
|
---
|
|
@@ -168,21 +163,14 @@ python3 ./.trellis/scripts/get_context.py --json
|
|
|
168
163
|
|
|
169
164
|
Based on what you'll develop, read the corresponding guidelines:
|
|
170
165
|
|
|
171
|
-
**Frontend Development** (if applicable):
|
|
172
166
|
```bash
|
|
173
|
-
#
|
|
174
|
-
|
|
175
|
-
```
|
|
167
|
+
# Discover available packages and spec layers
|
|
168
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
176
169
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
# Read index first, then specific docs based on task
|
|
180
|
-
cat .trellis/spec/backend/index.md
|
|
181
|
-
```
|
|
170
|
+
# Read spec indexes for relevant modules
|
|
171
|
+
cat .trellis/spec/<package>/<layer>/index.md
|
|
182
172
|
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
# For features spanning multiple layers
|
|
173
|
+
# For cross-layer features
|
|
186
174
|
cat .trellis/spec/guides/cross-layer-thinking-guide.md
|
|
187
175
|
```
|
|
188
176
|
|
|
@@ -208,21 +196,30 @@ python3 ./.trellis/scripts/task.py create "<title>" --slug <task-name>
|
|
|
208
196
|
1. Create or select task
|
|
209
197
|
--> python3 ./.trellis/scripts/task.py create "<title>" --slug <name> or list
|
|
210
198
|
|
|
211
|
-
2.
|
|
199
|
+
2. Start task (mark as current)
|
|
200
|
+
--> python3 ./.trellis/scripts/task.py start <name>
|
|
201
|
+
--> Writes .trellis/.current-task; future sessions see it in <current-state>
|
|
202
|
+
|
|
203
|
+
3. Write code according to guidelines
|
|
212
204
|
--> Read .trellis/spec/ docs relevant to your task
|
|
213
205
|
--> For cross-layer: read .trellis/spec/guides/
|
|
214
206
|
|
|
215
|
-
|
|
207
|
+
4. Self-test
|
|
216
208
|
--> Run project's lint/test commands (see spec docs)
|
|
217
209
|
--> Manual feature testing
|
|
218
210
|
|
|
219
|
-
|
|
211
|
+
5. Commit code
|
|
220
212
|
--> git add <files>
|
|
221
213
|
--> git commit -m "type(scope): description"
|
|
222
214
|
Format: feat/fix/docs/refactor/test/chore
|
|
223
215
|
|
|
224
|
-
|
|
216
|
+
6. Record session (one command)
|
|
225
217
|
--> python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
|
|
218
|
+
|
|
219
|
+
7. Finish task (clear current)
|
|
220
|
+
--> python3 ./.trellis/scripts/task.py finish
|
|
221
|
+
--> Only when the task is fully done; otherwise leave it set so the
|
|
222
|
+
next session resumes where you left off
|
|
226
223
|
```
|
|
227
224
|
|
|
228
225
|
### Code Quality Checklist
|
|
@@ -233,8 +230,7 @@ python3 ./.trellis/scripts/task.py create "<title>" --slug <task-name>
|
|
|
233
230
|
- [OK] Manual feature testing passes
|
|
234
231
|
|
|
235
232
|
**Project-specific checks**:
|
|
236
|
-
- See `.trellis/spec
|
|
237
|
-
- See `.trellis/spec/backend/quality-guidelines.md` for backend
|
|
233
|
+
- See `.trellis/spec/<package>/<layer>/quality-guidelines.md` for package-specific checks
|
|
238
234
|
|
|
239
235
|
---
|
|
240
236
|
|
|
@@ -328,11 +324,15 @@ tasks/
|
|
|
328
324
|
**Commands**:
|
|
329
325
|
```bash
|
|
330
326
|
python3 ./.trellis/scripts/task.py create "<title>" [--slug <name>] # Create task directory
|
|
327
|
+
python3 ./.trellis/scripts/task.py start <name> # Set as current task (writes .current-task, triggers after_start hooks)
|
|
328
|
+
python3 ./.trellis/scripts/task.py finish # Clear current task (triggers after_finish hooks)
|
|
331
329
|
python3 ./.trellis/scripts/task.py archive <name> # Archive to archive/{year-month}/
|
|
332
330
|
python3 ./.trellis/scripts/task.py list # List active tasks
|
|
333
331
|
python3 ./.trellis/scripts/task.py list-archive # List archived tasks
|
|
334
332
|
```
|
|
335
333
|
|
|
334
|
+
**Current task mechanism**: `task.py start <name>` writes the selected task path to `.trellis/.current-task`. The SessionStart hook reads this file to inject `## CURRENT TASK` into every new session's context, so the AI immediately knows what you're working on without being told. Run `task.py finish` when you're done — subsequent sessions will show `(none)` until you start another task.
|
|
335
|
+
|
|
336
336
|
---
|
|
337
337
|
|
|
338
338
|
## Best Practices
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Windsurf workflow templates
|
|
3
|
+
*
|
|
4
|
+
* These are GENERIC templates for user projects.
|
|
5
|
+
* Do NOT use Trellis project's own .windsurf/ directory (which may be customized).
|
|
6
|
+
*
|
|
7
|
+
* Directory structure:
|
|
8
|
+
* windsurf/
|
|
9
|
+
* └── workflows/ # Workflow files
|
|
10
|
+
*/
|
|
11
|
+
export interface WorkflowTemplate {
|
|
12
|
+
name: string;
|
|
13
|
+
content: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get all workflow templates.
|
|
17
|
+
* Workflow names match their filename stem
|
|
18
|
+
* (e.g. trellis-start.md -> /trellis-start).
|
|
19
|
+
*/
|
|
20
|
+
export declare function getAllWorkflows(): WorkflowTemplate[];
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/windsurf/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqBH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,gBAAgB,EAAE,CAcpD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Windsurf workflow templates
|
|
3
|
+
*
|
|
4
|
+
* These are GENERIC templates for user projects.
|
|
5
|
+
* Do NOT use Trellis project's own .windsurf/ directory (which may be customized).
|
|
6
|
+
*
|
|
7
|
+
* Directory structure:
|
|
8
|
+
* windsurf/
|
|
9
|
+
* └── workflows/ # Workflow files
|
|
10
|
+
*/
|
|
11
|
+
import { readdirSync, readFileSync } from "node:fs";
|
|
12
|
+
import { dirname, join } from "node:path";
|
|
13
|
+
import { fileURLToPath } from "node:url";
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
+
const __dirname = dirname(__filename);
|
|
16
|
+
function readTemplate(relativePath) {
|
|
17
|
+
return readFileSync(join(__dirname, relativePath), "utf-8");
|
|
18
|
+
}
|
|
19
|
+
function listFiles(dir) {
|
|
20
|
+
try {
|
|
21
|
+
return readdirSync(join(__dirname, dir));
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get all workflow templates.
|
|
29
|
+
* Workflow names match their filename stem
|
|
30
|
+
* (e.g. trellis-start.md -> /trellis-start).
|
|
31
|
+
*/
|
|
32
|
+
export function getAllWorkflows() {
|
|
33
|
+
const workflows = [];
|
|
34
|
+
for (const file of listFiles("workflows")) {
|
|
35
|
+
if (!file.endsWith(".md")) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const name = file.replace(".md", "");
|
|
39
|
+
const content = readTemplate(`workflows/${file}`);
|
|
40
|
+
workflows.push({ name, content });
|
|
41
|
+
}
|
|
42
|
+
return workflows;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/windsurf/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,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,SAAS,YAAY,CAAC,YAAoB;IACxC,OAAO,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAC5B,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAOD;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,SAAS,GAAuB,EAAE,CAAC;IAEzC,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;QAC1C,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,SAAS;QACX,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACrC,MAAM,OAAO,GAAG,YAAY,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;QAClD,SAAS,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Read the relevant development guidelines before starting your task.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Execute these steps:
|
|
6
|
+
|
|
7
|
+
1. **Discover packages and their spec layers**:
|
|
8
|
+
```bash
|
|
9
|
+
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
2. **Identify which specs apply** to your task based on:
|
|
13
|
+
- Which package you're modifying (e.g., `cli/`, `docs-site/`)
|
|
14
|
+
- What type of work (backend, frontend, unit-test, docs, etc.)
|
|
15
|
+
|
|
16
|
+
3. **Read the spec index** for each relevant module:
|
|
17
|
+
```bash
|
|
18
|
+
cat .trellis/spec/<package>/<layer>/index.md
|
|
19
|
+
```
|
|
20
|
+
Follow the **"Pre-Development Checklist"** section in the index.
|
|
21
|
+
|
|
22
|
+
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.
|
|
23
|
+
|
|
24
|
+
5. **Always read shared guides**:
|
|
25
|
+
```bash
|
|
26
|
+
cat .trellis/spec/guides/index.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
6. Understand the coding standards and patterns you need to follow, then proceed with your development plan.
|
|
30
|
+
|
|
31
|
+
This step is **mandatory** before writing any code.
|