@mindfoldhq/trellis 0.6.0-beta.2 → 0.6.0-beta.21
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 +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +58 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/channel/adapters/claude.d.ts +29 -0
- package/dist/commands/channel/adapters/claude.d.ts.map +1 -0
- package/dist/commands/channel/adapters/claude.js +203 -0
- package/dist/commands/channel/adapters/claude.js.map +1 -0
- package/dist/commands/channel/adapters/codex.d.ts +85 -0
- package/dist/commands/channel/adapters/codex.d.ts.map +1 -0
- package/dist/commands/channel/adapters/codex.js +505 -0
- package/dist/commands/channel/adapters/codex.js.map +1 -0
- package/dist/commands/channel/adapters/index.d.ts +84 -0
- package/dist/commands/channel/adapters/index.d.ts.map +1 -0
- package/dist/commands/channel/adapters/index.js +115 -0
- package/dist/commands/channel/adapters/index.js.map +1 -0
- package/dist/commands/channel/adapters/types.d.ts +33 -0
- package/dist/commands/channel/adapters/types.d.ts.map +1 -0
- package/dist/commands/channel/adapters/types.js +2 -0
- package/dist/commands/channel/adapters/types.js.map +1 -0
- package/dist/commands/channel/agent-loader.d.ts +32 -0
- package/dist/commands/channel/agent-loader.d.ts.map +1 -0
- package/dist/commands/channel/agent-loader.js +154 -0
- package/dist/commands/channel/agent-loader.js.map +1 -0
- package/dist/commands/channel/context-loader.d.ts +26 -0
- package/dist/commands/channel/context-loader.d.ts.map +1 -0
- package/dist/commands/channel/context-loader.js +290 -0
- package/dist/commands/channel/context-loader.js.map +1 -0
- package/dist/commands/channel/context.d.ts +16 -0
- package/dist/commands/channel/context.d.ts.map +1 -0
- package/dist/commands/channel/context.js +83 -0
- package/dist/commands/channel/context.js.map +1 -0
- package/dist/commands/channel/create.d.ts +27 -0
- package/dist/commands/channel/create.d.ts.map +1 -0
- package/dist/commands/channel/create.js +39 -0
- package/dist/commands/channel/create.js.map +1 -0
- package/dist/commands/channel/dev-parse-trace.d.ts +14 -0
- package/dist/commands/channel/dev-parse-trace.d.ts.map +1 -0
- package/dist/commands/channel/dev-parse-trace.js +70 -0
- package/dist/commands/channel/dev-parse-trace.js.map +1 -0
- package/dist/commands/channel/guard.d.ts +150 -0
- package/dist/commands/channel/guard.d.ts.map +1 -0
- package/dist/commands/channel/guard.js +474 -0
- package/dist/commands/channel/guard.js.map +1 -0
- package/dist/commands/channel/index.d.ts +3 -0
- package/dist/commands/channel/index.d.ts.map +1 -0
- package/dist/commands/channel/index.js +531 -0
- package/dist/commands/channel/index.js.map +1 -0
- package/dist/commands/channel/interrupt.d.ts +10 -0
- package/dist/commands/channel/interrupt.d.ts.map +1 -0
- package/dist/commands/channel/interrupt.js +22 -0
- package/dist/commands/channel/interrupt.js.map +1 -0
- package/dist/commands/channel/kill.d.ts +7 -0
- package/dist/commands/channel/kill.d.ts.map +1 -0
- package/dist/commands/channel/kill.js +121 -0
- package/dist/commands/channel/kill.js.map +1 -0
- package/dist/commands/channel/list.d.ts +17 -0
- package/dist/commands/channel/list.d.ts.map +1 -0
- package/dist/commands/channel/list.js +233 -0
- package/dist/commands/channel/list.js.map +1 -0
- package/dist/commands/channel/messages.d.ts +15 -0
- package/dist/commands/channel/messages.d.ts.map +1 -0
- package/dist/commands/channel/messages.js +245 -0
- package/dist/commands/channel/messages.js.map +1 -0
- package/dist/commands/channel/rm.d.ts +27 -0
- package/dist/commands/channel/rm.d.ts.map +1 -0
- package/dist/commands/channel/rm.js +216 -0
- package/dist/commands/channel/rm.js.map +1 -0
- package/dist/commands/channel/run.d.ts +30 -0
- package/dist/commands/channel/run.d.ts.map +1 -0
- package/dist/commands/channel/run.js +130 -0
- package/dist/commands/channel/run.js.map +1 -0
- package/dist/commands/channel/send.d.ts +11 -0
- package/dist/commands/channel/send.d.ts.map +1 -0
- package/dist/commands/channel/send.js +24 -0
- package/dist/commands/channel/send.js.map +1 -0
- package/dist/commands/channel/spawn.d.ts +40 -0
- package/dist/commands/channel/spawn.d.ts.map +1 -0
- package/dist/commands/channel/spawn.js +244 -0
- package/dist/commands/channel/spawn.js.map +1 -0
- package/dist/commands/channel/store/events.d.ts +39 -0
- package/dist/commands/channel/store/events.d.ts.map +1 -0
- package/dist/commands/channel/store/events.js +87 -0
- package/dist/commands/channel/store/events.js.map +1 -0
- package/dist/commands/channel/store/filter.d.ts +3 -0
- package/dist/commands/channel/store/filter.d.ts.map +1 -0
- package/dist/commands/channel/store/filter.js +2 -0
- package/dist/commands/channel/store/filter.js.map +1 -0
- package/dist/commands/channel/store/lock.d.ts +23 -0
- package/dist/commands/channel/store/lock.d.ts.map +1 -0
- package/dist/commands/channel/store/lock.js +99 -0
- package/dist/commands/channel/store/lock.js.map +1 -0
- package/dist/commands/channel/store/paths.d.ts +63 -0
- package/dist/commands/channel/store/paths.d.ts.map +1 -0
- package/dist/commands/channel/store/paths.js +246 -0
- package/dist/commands/channel/store/paths.js.map +1 -0
- package/dist/commands/channel/store/schema.d.ts +27 -0
- package/dist/commands/channel/store/schema.d.ts.map +1 -0
- package/dist/commands/channel/store/schema.js +34 -0
- package/dist/commands/channel/store/schema.js.map +1 -0
- package/dist/commands/channel/store/thread-state.d.ts +5 -0
- package/dist/commands/channel/store/thread-state.d.ts.map +1 -0
- package/dist/commands/channel/store/thread-state.js +16 -0
- package/dist/commands/channel/store/thread-state.js.map +1 -0
- package/dist/commands/channel/store/watch.d.ts +19 -0
- package/dist/commands/channel/store/watch.d.ts.map +1 -0
- package/dist/commands/channel/store/watch.js +146 -0
- package/dist/commands/channel/store/watch.js.map +1 -0
- package/dist/commands/channel/supervisor/idle.d.ts +46 -0
- package/dist/commands/channel/supervisor/idle.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/idle.js +72 -0
- package/dist/commands/channel/supervisor/idle.js.map +1 -0
- package/dist/commands/channel/supervisor/inbox.d.ts +30 -0
- package/dist/commands/channel/supervisor/inbox.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/inbox.js +160 -0
- package/dist/commands/channel/supervisor/inbox.js.map +1 -0
- package/dist/commands/channel/supervisor/shutdown.d.ts +68 -0
- package/dist/commands/channel/supervisor/shutdown.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/shutdown.js +146 -0
- package/dist/commands/channel/supervisor/shutdown.js.map +1 -0
- package/dist/commands/channel/supervisor/stdout.d.ts +51 -0
- package/dist/commands/channel/supervisor/stdout.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/stdout.js +121 -0
- package/dist/commands/channel/supervisor/stdout.js.map +1 -0
- package/dist/commands/channel/supervisor/turns.d.ts +31 -0
- package/dist/commands/channel/supervisor/turns.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/turns.js +45 -0
- package/dist/commands/channel/supervisor/turns.js.map +1 -0
- package/dist/commands/channel/supervisor/warning.d.ts +48 -0
- package/dist/commands/channel/supervisor/warning.d.ts.map +1 -0
- package/dist/commands/channel/supervisor/warning.js +77 -0
- package/dist/commands/channel/supervisor/warning.js.map +1 -0
- package/dist/commands/channel/supervisor.d.ts +59 -0
- package/dist/commands/channel/supervisor.d.ts.map +1 -0
- package/dist/commands/channel/supervisor.js +344 -0
- package/dist/commands/channel/supervisor.js.map +1 -0
- package/dist/commands/channel/text-body.d.ts +13 -0
- package/dist/commands/channel/text-body.d.ts.map +1 -0
- package/dist/commands/channel/text-body.js +47 -0
- package/dist/commands/channel/text-body.js.map +1 -0
- package/dist/commands/channel/threads.d.ts +39 -0
- package/dist/commands/channel/threads.d.ts.map +1 -0
- package/dist/commands/channel/threads.js +106 -0
- package/dist/commands/channel/threads.js.map +1 -0
- package/dist/commands/channel/title.d.ts +12 -0
- package/dist/commands/channel/title.d.ts.map +1 -0
- package/dist/commands/channel/title.js +24 -0
- package/dist/commands/channel/title.js.map +1 -0
- package/dist/commands/channel/wait.d.ts +17 -0
- package/dist/commands/channel/wait.d.ts.map +1 -0
- package/dist/commands/channel/wait.js +75 -0
- package/dist/commands/channel/wait.js.map +1 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +97 -42
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mem.d.ts +13 -117
- package/dist/commands/mem.d.ts.map +1 -1
- package/dist/commands/mem.js +168 -1074
- package/dist/commands/mem.js.map +1 -1
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +28 -2
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +31 -111
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/upgrade.d.ts +28 -0
- package/dist/commands/upgrade.d.ts.map +1 -0
- package/dist/commands/upgrade.js +84 -0
- package/dist/commands/upgrade.js.map +1 -0
- package/dist/commands/workflow.d.ts +35 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +219 -0
- package/dist/commands/workflow.js.map +1 -0
- package/dist/configurators/claude.d.ts.map +1 -1
- package/dist/configurators/claude.js +1 -0
- package/dist/configurators/claude.js.map +1 -1
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +5 -3
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/shared.js +4 -4
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/workflow.d.ts +8 -0
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +3 -2
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/migrations/manifests/0.5.10.json +9 -0
- package/dist/migrations/manifests/0.5.11.json +16 -0
- package/dist/migrations/manifests/0.5.12.json +9 -0
- package/dist/migrations/manifests/0.5.13.json +9 -0
- package/dist/migrations/manifests/0.5.14.json +9 -0
- package/dist/migrations/manifests/0.5.15.json +9 -0
- package/dist/migrations/manifests/0.5.16.json +9 -0
- package/dist/migrations/manifests/0.5.17.json +9 -0
- package/dist/migrations/manifests/0.5.18.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.12.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.15.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.17.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.18.json +16 -0
- package/dist/migrations/manifests/0.6.0-beta.19.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.20.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.21.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.5.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.6.json +16 -0
- package/dist/migrations/manifests/0.6.0-beta.7.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.9.json +9 -0
- package/dist/templates/claude/agents/trellis-check.md +13 -7
- package/dist/templates/claude/agents/trellis-implement.md +8 -7
- package/dist/templates/claude/settings.json +4 -4
- package/dist/templates/codebuddy/agents/trellis-check.md +13 -7
- package/dist/templates/codebuddy/agents/trellis-implement.md +8 -7
- package/dist/templates/codebuddy/settings.json +4 -4
- package/dist/templates/codex/agents/trellis-check.toml +4 -4
- package/dist/templates/codex/agents/trellis-implement.toml +4 -4
- package/dist/templates/codex/config.toml +9 -16
- package/dist/templates/codex/hooks/session-start.py +205 -119
- package/dist/templates/codex/hooks.json +2 -2
- package/dist/templates/codex/skills/before-dev/SKILL.md +12 -6
- package/dist/templates/codex/skills/brainstorm/SKILL.md +69 -457
- package/dist/templates/codex/skills/check/SKILL.md +86 -18
- package/dist/templates/codex/skills/start/SKILL.md +33 -323
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +7 -4
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +3 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/context-injection.md +5 -5
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +35 -6
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +5 -4
- package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/SKILL.md +41 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/mcp-setup.md +90 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/repository-analysis.md +59 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/spec-task-planning.md +61 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/spec-writing.md +70 -0
- package/dist/templates/common/commands/continue.md +6 -5
- package/dist/templates/common/commands/start.md +9 -6
- package/dist/templates/common/skills/before-dev.md +12 -6
- package/dist/templates/common/skills/brainstorm.md +68 -504
- package/dist/templates/common/skills/check.md +7 -1
- package/dist/templates/copilot/hooks/session-start.py +219 -101
- package/dist/templates/copilot/hooks.json +2 -2
- package/dist/templates/copilot/prompts/before-dev.prompt.md +12 -6
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +69 -457
- package/dist/templates/copilot/prompts/check.prompt.md +86 -18
- package/dist/templates/copilot/prompts/parallel.prompt.md +16 -8
- package/dist/templates/copilot/prompts/start.prompt.md +33 -367
- package/dist/templates/cursor/agents/trellis-check.md +13 -7
- package/dist/templates/cursor/agents/trellis-implement.md +8 -7
- package/dist/templates/cursor/hooks.json +1 -7
- package/dist/templates/droid/droids/trellis-check.md +13 -7
- package/dist/templates/droid/droids/trellis-implement.md +8 -7
- package/dist/templates/droid/settings.json +4 -4
- package/dist/templates/gemini/agents/trellis-check.md +11 -5
- package/dist/templates/gemini/agents/trellis-implement.md +7 -6
- package/dist/templates/gemini/settings.json +2 -2
- package/dist/templates/kiro/agents/trellis-check.json +1 -1
- package/dist/templates/kiro/agents/trellis-implement.json +1 -1
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +127 -9
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +171 -6
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +333 -43
- package/dist/templates/markdown/spec/guides/index.md.txt +18 -0
- package/dist/templates/opencode/agents/trellis-check.md +13 -7
- package/dist/templates/opencode/agents/trellis-implement.md +9 -8
- package/dist/templates/opencode/lib/session-utils.js +212 -123
- package/dist/templates/opencode/lib/trellis-context.js +73 -11
- package/dist/templates/opencode/plugins/inject-subagent-context.js +131 -29
- package/dist/templates/opencode/plugins/inject-workflow-state.js +9 -5
- package/dist/templates/opencode/plugins/session-start.js +9 -1
- package/dist/templates/pi/agents/trellis-check.md +5 -4
- package/dist/templates/pi/agents/trellis-implement.md +5 -4
- package/dist/templates/pi/extensions/trellis/index.ts.txt +1357 -754
- package/dist/templates/qoder/agents/trellis-check.md +11 -5
- package/dist/templates/qoder/agents/trellis-implement.md +7 -6
- package/dist/templates/qoder/settings.json +4 -4
- package/dist/templates/shared-hooks/index.d.ts.map +1 -1
- package/dist/templates/shared-hooks/index.js +0 -1
- package/dist/templates/shared-hooks/index.js.map +1 -1
- package/dist/templates/shared-hooks/inject-subagent-context.py +36 -14
- package/dist/templates/shared-hooks/inject-workflow-state.py +40 -42
- package/dist/templates/shared-hooks/session-start.py +222 -171
- package/dist/templates/trellis/config.yaml +38 -0
- package/dist/templates/trellis/index.d.ts +1 -0
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +2 -0
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add_session.py +50 -24
- package/dist/templates/trellis/scripts/common/config.py +57 -1
- package/dist/templates/trellis/scripts/common/safe_commit.py +285 -0
- package/dist/templates/trellis/scripts/common/session_context.py +384 -137
- package/dist/templates/trellis/scripts/common/task_context.py +3 -3
- package/dist/templates/trellis/scripts/common/task_store.py +161 -15
- package/dist/templates/trellis/scripts/common/workflow_phase.py +7 -10
- package/dist/templates/trellis/scripts/task.py +3 -3
- package/dist/templates/trellis/workflow.md +119 -98
- package/dist/utils/cwd-guard.d.ts +38 -0
- package/dist/utils/cwd-guard.d.ts.map +1 -0
- package/dist/utils/cwd-guard.js +62 -0
- package/dist/utils/cwd-guard.js.map +1 -0
- package/dist/utils/file-writer.d.ts +13 -0
- package/dist/utils/file-writer.d.ts.map +1 -1
- package/dist/utils/file-writer.js +59 -1
- package/dist/utils/file-writer.js.map +1 -1
- package/dist/utils/manifest-prune.d.ts +61 -0
- package/dist/utils/manifest-prune.d.ts.map +1 -0
- package/dist/utils/manifest-prune.js +136 -0
- package/dist/utils/manifest-prune.js.map +1 -0
- package/dist/utils/task-json.d.ts +9 -42
- package/dist/utils/task-json.d.ts.map +1 -1
- package/dist/utils/task-json.js +8 -45
- package/dist/utils/task-json.js.map +1 -1
- package/dist/utils/template-hash.d.ts +32 -6
- package/dist/utils/template-hash.d.ts.map +1 -1
- package/dist/utils/template-hash.js +53 -31
- package/dist/utils/template-hash.js.map +1 -1
- package/dist/utils/uninstall-scrubbers.d.ts +1 -0
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +21 -0
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/dist/utils/workflow-resolver.d.ts +86 -0
- package/dist/utils/workflow-resolver.d.ts.map +1 -0
- package/dist/utils/workflow-resolver.js +265 -0
- package/dist/utils/workflow-resolver.js.map +1 -0
- package/package.json +9 -8
|
@@ -5,350 +5,60 @@ description: "Initializes an AI development session by reading workflow guides,
|
|
|
5
5
|
|
|
6
6
|
# Start Session
|
|
7
7
|
|
|
8
|
-
Initialize
|
|
8
|
+
Initialize a Trellis-managed development session. This platform has no active session-start hook, so manually load the equivalent compact context by following these steps.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
| Marker | Meaning | Executor |
|
|
15
|
-
|--------|---------|----------|
|
|
16
|
-
| `[AI]` | Bash scripts or tool calls executed by AI | You (AI) |
|
|
17
|
-
| `[USER]` | Skills executed by user | User |
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Initialization `[AI]`
|
|
22
|
-
|
|
23
|
-
### Step 1: Understand Development Workflow
|
|
24
|
-
|
|
25
|
-
First, read the workflow guide to understand the development process:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
cat .trellis/workflow.md
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**Follow the instructions in workflow.md** - it contains:
|
|
32
|
-
- Core principles (Read Before Write, Follow Standards, etc.)
|
|
33
|
-
- File system structure
|
|
34
|
-
- Development process
|
|
35
|
-
- Best practices
|
|
36
|
-
|
|
37
|
-
### Step 2: Get Current Context
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
python3 ./.trellis/scripts/get_context.py
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
This shows: developer identity, git status, current task (if any), active tasks.
|
|
44
|
-
|
|
45
|
-
### Step 3: Read Guidelines Index
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
This shows available packages and their spec layers. Read the relevant spec indexes:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
cat .trellis/spec/<package>/<layer>/index.md # Package-specific guidelines
|
|
55
|
-
cat .trellis/spec/guides/index.md # Thinking guides (always read)
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
> **Important**: The index files are navigation — they list the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`).
|
|
59
|
-
> At this step, just read the indexes to understand what's available.
|
|
60
|
-
> 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.
|
|
61
|
-
|
|
62
|
-
### Step 4: Report and Ask
|
|
63
|
-
|
|
64
|
-
Report what you learned and ask: "What would you like to work on?"
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Task Classification
|
|
69
|
-
|
|
70
|
-
When user describes a task, classify it:
|
|
71
|
-
|
|
72
|
-
| Type | Criteria | Workflow |
|
|
73
|
-
|------|----------|----------|
|
|
74
|
-
| **Question** | User asks about code, architecture, or how something works | Answer directly |
|
|
75
|
-
| **Trivial Fix** | Typo fix, comment update, single-line change, < 5 minutes | Direct Edit |
|
|
76
|
-
| **Simple Task** | Clear goal, 1-2 files, well-defined scope | Quick confirm → Task Workflow |
|
|
77
|
-
| **Complex Task** | Vague goal, multiple files, architectural decisions | **Brainstorm → Task Workflow** |
|
|
78
|
-
|
|
79
|
-
### Decision Rule
|
|
80
|
-
|
|
81
|
-
> **If in doubt, use Brainstorm + Task Workflow.**
|
|
82
|
-
>
|
|
83
|
-
> Task Workflow ensures code-specs are injected to the right context, resulting in higher quality code.
|
|
84
|
-
> The overhead is minimal, but the benefit is significant.
|
|
85
|
-
|
|
86
|
-
> **Subtask Decomposition**: If brainstorm reveals multiple independent work items,
|
|
87
|
-
> consider creating subtasks using `--parent` flag or `add-subtask` command.
|
|
88
|
-
> See the brainstorm skill's Step 8 for details.
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Question / Trivial Fix
|
|
93
|
-
|
|
94
|
-
For questions or trivial fixes, work directly:
|
|
95
|
-
|
|
96
|
-
1. Answer question or make the fix
|
|
97
|
-
2. If code was changed, remind user to run `$finish-work`
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## Simple Task
|
|
102
|
-
|
|
103
|
-
For simple, well-defined tasks:
|
|
104
|
-
|
|
105
|
-
1. Quick confirm: "I understand you want to [goal]. Shall I proceed?"
|
|
106
|
-
2. If no, clarify and confirm again
|
|
107
|
-
3. **If yes: execute ALL steps below without stopping. Do NOT ask for additional confirmation between steps.**
|
|
108
|
-
- Create task directory (Phase 1 Path B, Step 2)
|
|
109
|
-
- Write PRD (Step 3)
|
|
110
|
-
- Research codebase (Phase 2, Step 5)
|
|
111
|
-
- Configure context (Step 6)
|
|
112
|
-
- Activate task (Step 7)
|
|
113
|
-
- Implement (Phase 3, Step 8)
|
|
114
|
-
- Check quality (Step 9)
|
|
115
|
-
- Complete (Step 10)
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Complex Task - Brainstorm First
|
|
120
|
-
|
|
121
|
-
For complex or vague tasks, **automatically start the brainstorm process** — do NOT skip directly to implementation.
|
|
122
|
-
|
|
123
|
-
See `$brainstorm` for the full process. Summary:
|
|
124
|
-
|
|
125
|
-
1. **Acknowledge and classify** - State your understanding
|
|
126
|
-
2. **Create task directory** - Track evolving requirements in `prd.md`
|
|
127
|
-
3. **Ask questions one at a time** - Update PRD after each answer
|
|
128
|
-
4. **Propose approaches** - For architectural decisions
|
|
129
|
-
5. **Confirm final requirements** - Get explicit approval
|
|
130
|
-
6. **Proceed to Task Workflow** - With clear requirements in PRD
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## Task Workflow (Development Tasks)
|
|
135
|
-
|
|
136
|
-
**Why this workflow?**
|
|
137
|
-
- Run a dedicated research pass before coding
|
|
138
|
-
- Configure specs in jsonl context files
|
|
139
|
-
- Implement using injected context
|
|
140
|
-
- Verify with a separate check pass
|
|
141
|
-
- Result: Code that follows project conventions automatically
|
|
142
|
-
|
|
143
|
-
### Overview: Two Entry Points
|
|
144
|
-
|
|
145
|
-
```
|
|
146
|
-
From Brainstorm (Complex Task):
|
|
147
|
-
PRD confirmed → Research → Configure Context → Activate → Implement → Check → Complete
|
|
148
|
-
|
|
149
|
-
From Simple Task:
|
|
150
|
-
Confirm → Create Task → Write PRD → Research → Configure Context → Activate → Implement → Check → Complete
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
**Key principle: Research happens AFTER requirements are clear (PRD exists).**
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
### Phase 1: Establish Requirements
|
|
158
|
-
|
|
159
|
-
#### Path A: From Brainstorm (skip to Phase 2)
|
|
160
|
-
|
|
161
|
-
PRD and task directory already exist from brainstorm. Skip directly to Phase 2.
|
|
162
|
-
|
|
163
|
-
#### Path B: From Simple Task
|
|
164
|
-
|
|
165
|
-
**Step 1: Confirm Understanding** `[AI]`
|
|
166
|
-
|
|
167
|
-
Quick confirm:
|
|
168
|
-
- What is the goal?
|
|
169
|
-
- What type of development? (frontend / backend / fullstack)
|
|
170
|
-
- Any specific requirements or constraints?
|
|
171
|
-
|
|
172
|
-
If unclear, ask clarifying questions.
|
|
173
|
-
|
|
174
|
-
**Step 2: Create Task Directory** `[AI]`
|
|
12
|
+
## Step 1: Current state
|
|
13
|
+
Identity, git status, current task, active tasks, journal location.
|
|
175
14
|
|
|
176
15
|
```bash
|
|
177
|
-
|
|
16
|
+
{{PYTHON_CMD}} ./.trellis/scripts/get_context.py
|
|
178
17
|
```
|
|
179
18
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
Create `prd.md` in the task directory with:
|
|
183
|
-
|
|
184
|
-
```markdown
|
|
185
|
-
# <Task Title>
|
|
186
|
-
|
|
187
|
-
## Goal
|
|
188
|
-
<What we're trying to achieve>
|
|
189
|
-
|
|
190
|
-
## Requirements
|
|
191
|
-
- <Requirement 1>
|
|
192
|
-
- <Requirement 2>
|
|
193
|
-
|
|
194
|
-
## Acceptance Criteria
|
|
195
|
-
- [ ] <Criterion 1>
|
|
196
|
-
- [ ] <Criterion 2>
|
|
197
|
-
|
|
198
|
-
## Technical Notes
|
|
199
|
-
<Any technical decisions or constraints>
|
|
200
|
-
```
|
|
19
|
+
If this output includes a line beginning `Trellis update available:`, copy the full line verbatim when summarizing session context. Do not shorten operational command hints.
|
|
201
20
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
### Phase 2: Prepare for Implementation (shared)
|
|
205
|
-
|
|
206
|
-
> Both paths converge here. PRD and task directory must exist before proceeding.
|
|
207
|
-
|
|
208
|
-
**Step 4: Code-Spec Depth Check** `[AI]`
|
|
209
|
-
|
|
210
|
-
If the task touches infra or cross-layer contracts, do not start implementation until code-spec depth is defined.
|
|
211
|
-
|
|
212
|
-
Trigger this requirement when the change includes any of:
|
|
213
|
-
- New or changed command/API signatures
|
|
214
|
-
- Database schema or migration changes
|
|
215
|
-
- Infra integrations (storage, queue, cache, secrets, env contracts)
|
|
216
|
-
- Cross-layer payload transformations
|
|
217
|
-
|
|
218
|
-
Must-have before proceeding:
|
|
219
|
-
- [ ] Target code-spec files to update are identified
|
|
220
|
-
- [ ] Concrete contract is defined (signature, fields, env keys)
|
|
221
|
-
- [ ] Validation and error matrix is defined
|
|
222
|
-
- [ ] At least one Good/Base/Bad case is defined
|
|
223
|
-
|
|
224
|
-
**Step 5: Research the Codebase** `[AI]`
|
|
225
|
-
|
|
226
|
-
Based on the confirmed PRD, run a focused research pass and produce:
|
|
227
|
-
|
|
228
|
-
1. Relevant spec files in `.trellis/spec/`
|
|
229
|
-
2. Existing code patterns to follow (2-3 examples)
|
|
230
|
-
3. Files that will likely need modification
|
|
231
|
-
|
|
232
|
-
Use this output format:
|
|
233
|
-
|
|
234
|
-
```markdown
|
|
235
|
-
## Relevant Specs
|
|
236
|
-
- <path>: <why it's relevant>
|
|
237
|
-
|
|
238
|
-
## Code Patterns Found
|
|
239
|
-
- <pattern>: <example file path>
|
|
240
|
-
|
|
241
|
-
## Files to Modify
|
|
242
|
-
- <path>: <what change>
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
**Step 6: Configure Context** `[AI]`
|
|
246
|
-
|
|
247
|
-
`implement.jsonl` and `check.jsonl` were seeded on `task.py create` with a single self-describing `_example` line. Curate real entries now (see workflow.md Phase 1.3 for the full rule):
|
|
248
|
-
|
|
249
|
-
- Put **spec files** (`.trellis/spec/<package>/<layer>/*.md`) and **research files** (`{TASK_DIR}/research/*.md`) only.
|
|
250
|
-
- Do NOT put code files (`src/**`, `packages/**`) — those are read during implementation, not pre-registered here.
|
|
251
|
-
- Split: `implement.jsonl` = specs the implement sub-agent needs; `check.jsonl` = specs the check sub-agent needs.
|
|
252
|
-
|
|
253
|
-
Discover available specs:
|
|
21
|
+
## Step 2: Workflow overview
|
|
22
|
+
Compact Phase Index, request triage rules, planning artifact contract, and the step-detail command.
|
|
254
23
|
|
|
255
24
|
```bash
|
|
256
|
-
|
|
25
|
+
{{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode phase
|
|
257
26
|
```
|
|
258
27
|
|
|
259
|
-
|
|
28
|
+
Full guide in `.trellis/workflow.md` (read on demand).
|
|
260
29
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" check "<path>" "<reason>"
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
**Step 7: Activate Task** `[AI]`
|
|
30
|
+
## Step 3: Guideline indexes
|
|
31
|
+
Discover packages + spec layers, then read each relevant index file.
|
|
267
32
|
|
|
268
33
|
```bash
|
|
269
|
-
|
|
34
|
+
{{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode packages
|
|
35
|
+
cat .trellis/spec/guides/index.md
|
|
36
|
+
cat .trellis/spec/<package>/<layer>/index.md # for each relevant layer
|
|
270
37
|
```
|
|
271
38
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
### Phase 3: Execute (shared)
|
|
277
|
-
|
|
278
|
-
**Step 8: Implement** `[AI]`
|
|
279
|
-
|
|
280
|
-
Implement the task described in `prd.md`.
|
|
281
|
-
|
|
282
|
-
- Follow all specs injected into implement context
|
|
283
|
-
- Keep changes scoped to requirements
|
|
284
|
-
- Run lint and typecheck before finishing
|
|
285
|
-
|
|
286
|
-
**Step 9: Check Quality** `[AI]`
|
|
287
|
-
|
|
288
|
-
Run a quality pass against check context:
|
|
39
|
+
Index files list the specific guideline docs to read when you actually start coding.
|
|
289
40
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
- Ensure lint and typecheck pass
|
|
41
|
+
## Step 4: Decide next action
|
|
42
|
+
From Step 1 you know the current task and status. Check the task directory:
|
|
293
43
|
|
|
294
|
-
**
|
|
295
|
-
|
|
296
|
-
1.
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
- Run `$record-session` to record this session
|
|
302
|
-
|
|
303
|
-
---
|
|
304
|
-
|
|
305
|
-
## Continuing Existing Task
|
|
306
|
-
|
|
307
|
-
If `get_context.py` shows a current task:
|
|
308
|
-
|
|
309
|
-
1. Read the task's `prd.md` to understand the goal
|
|
310
|
-
2. Check `task.json` for current status and phase
|
|
311
|
-
3. Ask user: "Continue working on <task-name>?"
|
|
312
|
-
|
|
313
|
-
If yes, resume from the appropriate step (usually Step 7 or 8).
|
|
44
|
+
- **Active task status `planning` + no `prd.md`** → Phase 1.1. Load the `trellis-brainstorm` skill.
|
|
45
|
+
- **Active task status `planning` + `prd.md` exists** → stay in Phase 1. Lightweight tasks can be PRD-only; complex tasks need `design.md` + `implement.md`. Load the relevant Phase 1 step detail before `task.py start`.
|
|
46
|
+
- **Active task status `in_progress`** → Phase 2 step 2.1. Load the step detail:
|
|
47
|
+
```bash
|
|
48
|
+
{{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode phase --step 2.1 --platform {{CLI_FLAG}}
|
|
49
|
+
```
|
|
50
|
+
- **No active task** → classify first. For simple conversation / small task, ask only whether this turn should create a Trellis task. For complex work, ask whether you may create a Trellis task and enter planning. If the user says no, skip Trellis for this session.
|
|
314
51
|
|
|
315
52
|
---
|
|
316
53
|
|
|
317
|
-
##
|
|
318
|
-
|
|
319
|
-
### User Skills `[USER]`
|
|
320
|
-
|
|
321
|
-
| Skill | When to Use |
|
|
322
|
-
|---------|-------------|
|
|
323
|
-
| `$start` | Begin a session (this skill) |
|
|
324
|
-
| `$finish-work` | Before committing changes |
|
|
325
|
-
| `$record-session` | After completing a task |
|
|
326
|
-
|
|
327
|
-
### AI Scripts `[AI]`
|
|
328
|
-
|
|
329
|
-
| Script | Purpose |
|
|
330
|
-
|--------|---------|
|
|
331
|
-
| `python3 ./.trellis/scripts/get_context.py` | Get session context |
|
|
332
|
-
| `python3 ./.trellis/scripts/task.py create` | Create task directory (seeds jsonl on sub-agent platforms) |
|
|
333
|
-
| `python3 ./.trellis/scripts/task.py add-context` | Append spec/research entry to jsonl |
|
|
334
|
-
| `python3 ./.trellis/scripts/task.py start` | Set current task |
|
|
335
|
-
| `python3 ./.trellis/scripts/task.py finish` | Clear current task |
|
|
336
|
-
| `python3 ./.trellis/scripts/task.py archive` | Archive completed task |
|
|
337
|
-
|
|
338
|
-
### Workflow Phases `[AI]`
|
|
339
|
-
|
|
340
|
-
| Phase | Purpose | Context Source |
|
|
341
|
-
|-------|---------|----------------|
|
|
342
|
-
| research | Analyze codebase | direct repo inspection |
|
|
343
|
-
| implement | Write code | `implement.jsonl` |
|
|
344
|
-
| check | Review & fix | `check.jsonl` |
|
|
345
|
-
| debug | Fix specific issues | `debug.jsonl` |
|
|
346
|
-
|
|
347
|
-
---
|
|
54
|
+
## Skill routing (quick reference)
|
|
348
55
|
|
|
349
|
-
|
|
56
|
+
| User intent | Skill |
|
|
57
|
+
|---|---|
|
|
58
|
+
| New feature / unclear requirements | `trellis-brainstorm` |
|
|
59
|
+
| About to write code | `trellis-before-dev` |
|
|
60
|
+
| Done coding / quality check | `trellis-check` |
|
|
61
|
+
| Stuck / fixed same bug multiple times | `trellis-break-loop` |
|
|
62
|
+
| Learned something worth capturing | `trellis-update-spec` |
|
|
350
63
|
|
|
351
|
-
|
|
352
|
-
>
|
|
353
|
-
> The Task Workflow ensures agents receive relevant code-spec context automatically.
|
|
354
|
-
> This is more reliable than hoping the AI "remembers" conventions.
|
|
64
|
+
Full rules + anti-rationalization table in `.trellis/workflow.md`.
|
|
@@ -18,6 +18,8 @@ Context loading determines when AI reads workflow, task, spec, research, workspa
|
|
|
18
18
|
| --- | --- |
|
|
19
19
|
| `.trellis/workflow.md` | Workflow and next-action hints. |
|
|
20
20
|
| `.trellis/tasks/<task>/prd.md` | Current task requirements. |
|
|
21
|
+
| `.trellis/tasks/<task>/design.md` | Complex task technical design. |
|
|
22
|
+
| `.trellis/tasks/<task>/implement.md` | Complex task execution plan. |
|
|
21
23
|
| `.trellis/tasks/<task>/implement.jsonl` | Spec/research to read before implementation. |
|
|
22
24
|
| `.trellis/tasks/<task>/check.jsonl` | Spec/research to read during checking. |
|
|
23
25
|
| `.trellis/spec/` | Project specs. |
|
|
@@ -64,10 +66,11 @@ First determine which mode the platform uses:
|
|
|
64
66
|
In both modes, make sure the agent ultimately reads:
|
|
65
67
|
|
|
66
68
|
1. active task
|
|
67
|
-
2.
|
|
68
|
-
3.
|
|
69
|
-
4.
|
|
70
|
-
5.
|
|
69
|
+
2. the corresponding JSONL
|
|
70
|
+
3. spec/research referenced by the JSONL
|
|
71
|
+
4. `prd.md`
|
|
72
|
+
5. `design.md` if present
|
|
73
|
+
6. `implement.md` if present
|
|
71
74
|
|
|
72
75
|
## Troubleshooting Order
|
|
73
76
|
|
|
@@ -6,7 +6,7 @@ When the user wants to change the engineering conventions AI follows, add new sp
|
|
|
6
6
|
|
|
7
7
|
1. `.trellis/config.yaml`
|
|
8
8
|
2. `.trellis/spec/`
|
|
9
|
-
3. `.trellis/workflow.md`
|
|
9
|
+
3. `.trellis/workflow.md` planning artifact guidance and Phase 3.3
|
|
10
10
|
4. Current task `implement.jsonl` / `check.jsonl`
|
|
11
11
|
|
|
12
12
|
## Common Needs
|
|
@@ -50,8 +50,9 @@ If the user wants only one platform to avoid sub-agents, first confirm whether t
|
|
|
50
50
|
| `status` | Artifact state | Resume at |
|
|
51
51
|
| --- | --- | --- |
|
|
52
52
|
| `planning` | `prd.md` missing | Phase 1.1 (load `trellis-brainstorm`) |
|
|
53
|
-
| `planning` | `prd.md`
|
|
54
|
-
| `planning` | `
|
|
53
|
+
| `planning` | lightweight task with `prd.md` complete | ask for start review, then run `task.py start` |
|
|
54
|
+
| `planning` | complex task missing `design.md` or `implement.md` | complete missing planning artifacts |
|
|
55
|
+
| `planning` | complex task has `prd.md`, `design.md`, and `implement.md` | ask for start review, then run `task.py start` |
|
|
55
56
|
| `in_progress` | no implementation in conversation history | Phase 2.1 (`trellis-implement`) |
|
|
56
57
|
| `in_progress` | implementation done, no `trellis-check` run | Phase 2.2 (`trellis-check`) |
|
|
57
58
|
| `in_progress` | check passed | Phase 3.1 (verify quality + spec update) |
|
|
@@ -9,7 +9,7 @@ Trellis context injection aims to make AI read the right files at the right time
|
|
|
9
9
|
| session context | `.trellis/scripts/get_context.py` | Current developer, git status, active task, active tasks, journal, packages. |
|
|
10
10
|
| workflow context | `.trellis/workflow.md` | Current Trellis flow and next action. |
|
|
11
11
|
| spec context | `.trellis/spec/` + task JSONL | Specs that must be followed during implementation/checking. |
|
|
12
|
-
| task context | `.trellis/tasks/<task>/prd.md`, `
|
|
12
|
+
| task context | `.trellis/tasks/<task>/prd.md`, `design.md`, `implement.md`, `research/` | Current task requirements, design, execution plan, and research. |
|
|
13
13
|
| platform context | Platform hooks/settings/agents | Lets different AI tools read the files above through their own mechanisms. |
|
|
14
14
|
|
|
15
15
|
## session-start
|
|
@@ -34,10 +34,10 @@ If the user wants to change "what the AI should do next in a given state," edit
|
|
|
34
34
|
|
|
35
35
|
Implement and check agents need task context. Trellis has two loading modes:
|
|
36
36
|
|
|
37
|
-
1. **hook push**: a platform hook injects `prd.md`
|
|
38
|
-
2. **agent pull**: the agent definition instructs the agent to read the active task,
|
|
37
|
+
1. **hook push**: a platform hook injects jsonl-referenced files plus `prd.md`, `design.md` if present, and `implement.md` if present before the agent starts.
|
|
38
|
+
2. **agent pull**: the agent definition instructs the agent to read the active task, jsonl context, and task artifacts after startup.
|
|
39
39
|
|
|
40
|
-
In both modes, JSONL files in the task directory are the
|
|
40
|
+
In both modes, JSONL files in the task directory are the manifest for spec/research context. Task artifacts are read separately in this order: `prd.md` -> `design.md if present` -> `implement.md if present`.
|
|
41
41
|
|
|
42
42
|
## JSONL Reading Rules
|
|
43
43
|
|
|
@@ -65,4 +65,4 @@ If shell commands cannot see the same context key, `task.py current --source` ma
|
|
|
65
65
|
| Change JSONL validation/display | `.trellis/scripts/common/task_context.py`. |
|
|
66
66
|
| Change active task resolution | `.trellis/scripts/common/active_task.py`. |
|
|
67
67
|
|
|
68
|
-
When modifying context injection, verify two things: new sessions can see the correct task, and sub-agents can see the correct
|
|
68
|
+
When modifying context injection, verify two things: new sessions can see the correct task, and sub-agents can see the correct task artifacts/spec/research.
|
|
@@ -65,7 +65,7 @@ This command lists packages and spec layers for the current project. Use this ou
|
|
|
65
65
|
|
|
66
66
|
## How Specs Enter Tasks
|
|
67
67
|
|
|
68
|
-
Before a task enters implementation,
|
|
68
|
+
Before a task enters implementation, planning may write relevant specs into `implement.jsonl` / `check.jsonl` when the task needs spec or research context beyond the task artifacts:
|
|
69
69
|
|
|
70
70
|
```jsonl
|
|
71
71
|
{"file": ".trellis/spec/cli/backend/index.md", "reason": "CLI backend conventions"}
|
|
@@ -9,7 +9,8 @@ The Trellis task system is stored entirely under `.trellis/tasks/` in the user p
|
|
|
9
9
|
├── 04-28-example-task/
|
|
10
10
|
│ ├── task.json
|
|
11
11
|
│ ├── prd.md
|
|
12
|
-
│ ├──
|
|
12
|
+
│ ├── design.md
|
|
13
|
+
│ ├── implement.md
|
|
13
14
|
│ ├── implement.jsonl
|
|
14
15
|
│ ├── check.jsonl
|
|
15
16
|
│ └── research/
|
|
@@ -20,8 +21,9 @@ The Trellis task system is stored entirely under `.trellis/tasks/` in the user p
|
|
|
20
21
|
| File | Purpose |
|
|
21
22
|
| --- | --- |
|
|
22
23
|
| `task.json` | Task metadata: status, assignee, priority, branch, parent/child tasks, and similar fields. |
|
|
23
|
-
| `prd.md` | Requirements
|
|
24
|
-
| `
|
|
24
|
+
| `prd.md` | Requirements, constraints, and acceptance criteria. Lightweight tasks may be PRD-only. |
|
|
25
|
+
| `design.md` | Technical design for complex tasks: boundaries, contracts, data flow, compatibility, tradeoffs. |
|
|
26
|
+
| `implement.md` | Execution plan for complex tasks: ordered checklist, validation commands, review gates, rollback points. |
|
|
25
27
|
| `implement.jsonl` | List of spec/research files the implement agent must read first. |
|
|
26
28
|
| `check.jsonl` | List of spec/research files the check agent must read first. |
|
|
27
29
|
| `research/` | Research artifacts. Complex findings should not live only in chat. |
|
|
@@ -42,7 +44,34 @@ The Trellis task system is stored entirely under `.trellis/tasks/` in the user p
|
|
|
42
44
|
| `commit` / `pr_url` | Commit and PR information after completion. |
|
|
43
45
|
| `meta` | Extension fields. |
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
## Parent / Child Task Trees
|
|
48
|
+
|
|
49
|
+
Parent/child task relationships are for work structure. A parent task groups related deliverables under one source requirement set; it is not a dependency scheduler and does not replace the child task's own planning artifacts.
|
|
50
|
+
|
|
51
|
+
Use a parent task when a request has multiple independently verifiable deliverables. The parent owns:
|
|
52
|
+
|
|
53
|
+
- Source requirements and user-facing scope.
|
|
54
|
+
- The map of child tasks and their responsibility boundaries.
|
|
55
|
+
- Cross-child acceptance criteria and final integration review.
|
|
56
|
+
|
|
57
|
+
Use child tasks for deliverables that can move through planning, implementation, check, and archive independently. If one child depends on another, write that dependency in the child `prd.md` / `implement.md`; do not rely on tree position to imply ordering.
|
|
58
|
+
|
|
59
|
+
Create new children with:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
python3 ./.trellis/scripts/task.py create "<child title>" --slug <child-slug> --parent <parent-dir>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Link or unlink existing tasks with:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
python3 ./.trellis/scripts/task.py add-subtask <parent-dir> <child-dir>
|
|
69
|
+
python3 ./.trellis/scripts/task.py remove-subtask <parent-dir> <child-dir>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`children` on the parent is a historical list. When a child is archived, Trellis keeps that child name in the parent so progress like `[2/3 done]` remains meaningful after completed children move to `archive/`.
|
|
73
|
+
|
|
74
|
+
The AI should not treat phase numbers as task status. Task progress is mainly determined by `status`, artifact presence (`prd.md`, optional `design.md` / `implement.md`), whether JSONL context is configured for sub-agent mode, and the phase descriptions in `workflow.md`.
|
|
46
75
|
|
|
47
76
|
## Active Task
|
|
48
77
|
|
|
@@ -58,7 +87,7 @@ If the platform or shell environment has no stable session identity, `task.py st
|
|
|
58
87
|
|
|
59
88
|
## JSONL Context
|
|
60
89
|
|
|
61
|
-
`implement.jsonl` and `check.jsonl` are context manifests for sub-agents to read first.
|
|
90
|
+
`implement.jsonl` and `check.jsonl` are context manifests for sub-agents to read first. They do not replace `implement.md`; `implement.md` is the human-readable execution plan.
|
|
62
91
|
|
|
63
92
|
Format:
|
|
64
93
|
|
|
@@ -95,7 +124,7 @@ When modifying the task system, the AI should prefer script commands to maintain
|
|
|
95
124
|
| Change the default task template | `.trellis/scripts/common/task_store.py` and task creation instructions. |
|
|
96
125
|
| Change status semantics | `.trellis/workflow.md`, workflow-state hook logic, and task usage conventions. |
|
|
97
126
|
| Add task lifecycle actions | `hooks.after_*` in `.trellis/config.yaml`. |
|
|
98
|
-
| Change context rules |
|
|
127
|
+
| Change context rules | Planning artifact guidance in `.trellis/workflow.md` and related platform agent/hook instructions. |
|
|
99
128
|
| Change archive policy | `.trellis/scripts/common/task_store.py` / `task_utils.py`. |
|
|
100
129
|
|
|
101
130
|
These are local files in the user project. Do not default to editing Trellis CLI source code unless the user wants to contribute upstream.
|
package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md
CHANGED
|
@@ -13,7 +13,7 @@ File locations and formats differ by platform, but responsibility boundaries sho
|
|
|
13
13
|
| Agent | Responsibility |
|
|
14
14
|
| --- | --- |
|
|
15
15
|
| `trellis-research` | Investigate the question and write findings into the current task's `research/`. |
|
|
16
|
-
| `trellis-implement` | Implement against `prd.md`, `
|
|
16
|
+
| `trellis-implement` | Implement against `prd.md`, optional `design.md` / `implement.md`, `implement.jsonl`, and related spec/research. |
|
|
17
17
|
| `trellis-check` | Review changes, fix discovered issues, and run necessary checks. |
|
|
18
18
|
|
|
19
19
|
Agent files should not become generic chat prompts. They should define input sources, write boundaries, whether code may be changed, and how results are reported.
|
|
@@ -50,10 +50,11 @@ Common on platforms that support agent hooks.
|
|
|
50
50
|
The agent file instructs the agent to read after startup:
|
|
51
51
|
|
|
52
52
|
- `python3 ./.trellis/scripts/task.py current --source`
|
|
53
|
-
- current task `prd.md`
|
|
54
|
-
- `info.md`
|
|
55
53
|
- `implement.jsonl` or `check.jsonl`
|
|
56
54
|
- spec/research files referenced by JSONL
|
|
55
|
+
- current task `prd.md`
|
|
56
|
+
- `design.md` if present
|
|
57
|
+
- `implement.md` if present
|
|
57
58
|
|
|
58
59
|
This mode fits platforms whose hooks cannot reliably rewrite sub-agent prompts.
|
|
59
60
|
|
|
@@ -70,7 +71,7 @@ This mode fits platforms whose hooks cannot reliably rewrite sub-agent prompts.
|
|
|
70
71
|
## Modification Principles
|
|
71
72
|
|
|
72
73
|
1. **Keep responsibilities single-purpose**. Do not mix research, implement, and check responsibilities into one agent.
|
|
73
|
-
2. **Specify the read order**. Agents must know to start from the active task
|
|
74
|
+
2. **Specify the read order**. Agents must know to start from the active task, read jsonl/spec context, then read `prd.md`, `design.md` if present, and `implement.md` if present.
|
|
74
75
|
3. **Specify write boundaries**. Research usually only writes `research/`; implement can write code; check can fix issues.
|
|
75
76
|
4. **Keep semantics synchronized in multi-platform projects**. If the user configured Claude, Codex, and Cursor together, decide whether changes to one platform's agent also need to be applied to others.
|
|
76
77
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trellis-spec-bootstarp
|
|
3
|
+
description: "Bootstrap project-specific Trellis coding specs with a platform-neutral single-agent workflow. Use when creating or refreshing .trellis/spec guidelines, analyzing a codebase with GitNexus, ABCoder, or source inspection, decomposing package/layer spec work, and writing real codebase-backed spec docs without placeholder text."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Trellis Spec Bootstarp
|
|
7
|
+
|
|
8
|
+
Use this skill to create or refresh `.trellis/spec/` guidelines from the real codebase. One capable agent owns the full loop: analyze the repository, choose the spec boundaries, write the docs, and verify the result. The workflow does not depend on a specific host, CLI, or agent brand.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Confirm Trellis is initialized and inspect the current `.trellis/spec/` tree.
|
|
13
|
+
2. Analyze the repository architecture with the best available tools: GitNexus, ABCoder, language tooling, and direct source reads.
|
|
14
|
+
3. Decompose the spec work by package and layer only when that reflects the actual codebase.
|
|
15
|
+
4. Fill or reshape the spec files with concrete patterns, file paths, examples, and anti-patterns from the project.
|
|
16
|
+
5. Verify that the final specs are internally consistent and contain no template placeholders.
|
|
17
|
+
|
|
18
|
+
## Reference Routing
|
|
19
|
+
|
|
20
|
+
| Need | Read |
|
|
21
|
+
|------|------|
|
|
22
|
+
| Repository architecture analysis | [references/repository-analysis.md](references/repository-analysis.md) |
|
|
23
|
+
| Spec work decomposition and task planning | [references/spec-task-planning.md](references/spec-task-planning.md) |
|
|
24
|
+
| Writing high-signal Trellis spec files | [references/spec-writing.md](references/spec-writing.md) |
|
|
25
|
+
| GitNexus and ABCoder MCP setup | [references/mcp-setup.md](references/mcp-setup.md) |
|
|
26
|
+
|
|
27
|
+
## Operating Rules
|
|
28
|
+
|
|
29
|
+
- Treat templates as starting points, not contracts. Delete, rename, split, or add spec files when the repository calls for it.
|
|
30
|
+
- Prefer source-backed rules over generic advice. Every important recommendation should point at a real file or repeated local pattern.
|
|
31
|
+
- Keep execution single-owner by default. Optional helper agents are an implementation detail, not a requirement or user-visible dependency.
|
|
32
|
+
- Do not write platform-specific instructions unless the target project already standardizes on that platform.
|
|
33
|
+
- Do not leave placeholder text, empty headings, or copied boilerplate in `.trellis/spec/`.
|
|
34
|
+
|
|
35
|
+
## Done Criteria
|
|
36
|
+
|
|
37
|
+
- `.trellis/spec/` describes the project as it exists now.
|
|
38
|
+
- Each relevant package or layer has practical coding guidance with real examples.
|
|
39
|
+
- Non-applicable template sections are removed.
|
|
40
|
+
- `index.md` files match the final spec file set.
|
|
41
|
+
- Any required setup or analysis assumptions are documented in the relevant spec or task notes.
|