@mindfoldhq/trellis 0.6.0-beta.9 → 0.6.0
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 +49 -49
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +36 -0
- 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 +3 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +162 -43
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mem.d.ts +13 -217
- package/dist/commands/mem.d.ts.map +1 -1
- package/dist/commands/mem.js +142 -1587
- 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 +102 -5
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts +35 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +232 -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/index.d.ts.map +1 -1
- package/dist/configurators/index.js +5 -0
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/reasonix.d.ts +23 -0
- package/dist/configurators/reasonix.d.ts.map +1 -0
- package/dist/configurators/reasonix.js +60 -0
- package/dist/configurators/reasonix.js.map +1 -0
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +8 -0
- 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 +14 -3
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +4 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +4 -0
- package/dist/constants/paths.js.map +1 -1
- 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.5.19.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.22.json +9 -0
- package/dist/migrations/manifests/0.6.0-beta.23.json +88 -0
- package/dist/migrations/manifests/0.6.0-rc.0.json +9 -0
- package/dist/migrations/manifests/0.6.0.json +1 -0
- package/dist/templates/claude/agents/trellis-check.md +12 -6
- package/dist/templates/claude/agents/trellis-implement.md +1 -1
- package/dist/templates/claude/agents/trellis-research.md +1 -1
- package/dist/templates/codebuddy/agents/trellis-check.md +12 -6
- package/dist/templates/codebuddy/agents/trellis-implement.md +1 -1
- package/dist/templates/codebuddy/agents/trellis-research.md +1 -1
- package/dist/templates/codex/agents/trellis-check.toml +0 -25
- package/dist/templates/codex/agents/trellis-implement.toml +0 -25
- package/dist/templates/codex/config.toml +9 -16
- package/dist/templates/codex/hooks/session-start.py +22 -0
- package/dist/templates/codex/hooks.json +1 -1
- package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +67 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +480 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +233 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +226 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +276 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +128 -0
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +46 -34
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +47 -3
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/bundled-skills.md +146 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-channel.md +69 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +27 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +11 -1
- package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +81 -0
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +66 -0
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/triggering-patterns.md +93 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/SKILL.md +41 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/mcp-setup.md +90 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/repository-analysis.md +59 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-task-planning.md +61 -0
- package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-writing.md +70 -0
- package/dist/templates/copilot/hooks/session-start.py +24 -0
- package/dist/templates/cursor/agents/trellis-check.md +12 -6
- package/dist/templates/cursor/agents/trellis-implement.md +1 -1
- package/dist/templates/cursor/agents/trellis-research.md +1 -1
- package/dist/templates/cursor/hooks.json +0 -6
- package/dist/templates/droid/droids/trellis-check.md +12 -6
- package/dist/templates/droid/droids/trellis-implement.md +1 -1
- package/dist/templates/droid/droids/trellis-research.md +1 -1
- package/dist/templates/gemini/agents/trellis-check.md +11 -5
- package/dist/templates/kiro/agents/trellis-check.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 +130 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +38 -0
- package/dist/templates/markdown/spec/guides/index.md.txt +18 -0
- package/dist/templates/opencode/agents/trellis-check.md +11 -5
- 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 +1339 -913
- package/dist/templates/pi/settings.json +0 -9
- package/dist/templates/qoder/agents/trellis-check.md +12 -6
- package/dist/templates/qoder/agents/trellis-implement.md +1 -1
- package/dist/templates/qoder/agents/trellis-research.md +1 -1
- package/dist/templates/reasonix/agents/trellis-check.md +36 -0
- package/dist/templates/reasonix/agents/trellis-implement.md +41 -0
- package/dist/templates/reasonix/index.d.ts +13 -0
- package/dist/templates/reasonix/index.d.ts.map +1 -0
- package/dist/templates/reasonix/index.js +16 -0
- package/dist/templates/reasonix/index.js.map +1 -0
- 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-workflow-state.py +22 -0
- package/dist/templates/shared-hooks/session-start.py +25 -8
- package/dist/templates/trellis/agents/check.md +70 -0
- package/dist/templates/trellis/agents/implement.md +71 -0
- package/dist/templates/trellis/config.yaml +20 -0
- package/dist/templates/trellis/index.d.ts +13 -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/common/safe_commit.py +49 -19
- package/dist/templates/trellis/scripts/common/task_store.py +94 -16
- package/dist/templates/trellis/workflow.md +21 -0
- package/dist/types/ai-tools.d.ts +4 -4
- package/dist/types/ai-tools.d.ts.map +1 -1
- package/dist/types/ai-tools.js +16 -0
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/agent-refs.d.ts +31 -0
- package/dist/utils/agent-refs.d.ts.map +1 -0
- package/dist/utils/agent-refs.js +63 -0
- package/dist/utils/agent-refs.js.map +1 -0
- 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/registry-config.d.ts +7 -0
- package/dist/utils/registry-config.d.ts.map +1 -0
- package/dist/utils/registry-config.js +171 -0
- package/dist/utils/registry-config.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-fetcher.d.ts +11 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -1
- package/dist/utils/template-fetcher.js +51 -2
- package/dist/utils/template-fetcher.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/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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: trellis-check
|
|
3
3
|
description: |
|
|
4
4
|
Code quality check expert. Reviews code changes against specs and self-fixes issues.
|
|
5
|
-
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
6
6
|
---
|
|
7
7
|
# Check Agent
|
|
8
8
|
|
|
@@ -20,14 +20,18 @@ You are already the `trellis-check` sub-agent that the main session dispatched.
|
|
|
20
20
|
|
|
21
21
|
Before checking, read:
|
|
22
22
|
- `.trellis/spec/` - Development guidelines
|
|
23
|
+
- Task `prd.md` - Requirements document
|
|
24
|
+
- Task `design.md` - Technical design (if exists)
|
|
25
|
+
- Task `implement.md` - Execution plan (if exists)
|
|
23
26
|
- Pre-commit checklist for quality standards
|
|
24
27
|
|
|
25
28
|
## Core Responsibilities
|
|
26
29
|
|
|
27
30
|
1. **Get code changes** - Use git diff to get uncommitted code
|
|
28
|
-
2. **
|
|
29
|
-
3. **
|
|
30
|
-
4. **
|
|
31
|
+
2. **Review task artifacts** - Check changes against prd.md, design.md if present, and implement.md if present
|
|
32
|
+
3. **Check against specs** - Verify code follows guidelines
|
|
33
|
+
4. **Self-fix** - Fix issues yourself, not just report them
|
|
34
|
+
5. **Run verification** - typecheck and lint
|
|
31
35
|
|
|
32
36
|
## Important
|
|
33
37
|
|
|
@@ -46,10 +50,12 @@ git diff --name-only # List changed files
|
|
|
46
50
|
git diff # View specific changes
|
|
47
51
|
```
|
|
48
52
|
|
|
49
|
-
### Step 2: Check Against Specs
|
|
53
|
+
### Step 2: Check Against Specs and Task Artifacts
|
|
50
54
|
|
|
51
|
-
Read relevant specs in `.trellis/spec/` to check code:
|
|
55
|
+
Read the task's prd.md, design.md if present, and implement.md if present, then read relevant specs in `.trellis/spec/` to check code:
|
|
52
56
|
|
|
57
|
+
- Does it satisfy the task requirements
|
|
58
|
+
- Does it follow the technical design and implementation plan when present
|
|
53
59
|
- Does it follow directory structure conventions
|
|
54
60
|
- Does it follow naming conventions
|
|
55
61
|
- Does it follow code patterns
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: trellis-implement
|
|
3
3
|
description: |
|
|
4
4
|
Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.
|
|
5
|
-
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
6
6
|
---
|
|
7
7
|
# Implement Agent
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: trellis-research
|
|
3
3
|
description: |
|
|
4
4
|
Code and tech search expert. Finds files, patterns, and tech solutions, and PERSISTS every finding to the current task's research/ directory. No code modifications outside that directory.
|
|
5
|
-
tools: Read, Write, Glob, Grep, Bash,
|
|
5
|
+
tools: Read, Write, Glob, Grep, Bash, Skill, mcp__*
|
|
6
6
|
---
|
|
7
7
|
# Research Agent
|
|
8
8
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trellis-check
|
|
3
|
+
description: Code quality check expert. Reviews changes against Trellis specs, fixes issues directly, and verifies quality gates.
|
|
4
|
+
runAs: subagent
|
|
5
|
+
allowed-tools: read_file,write_file,edit_file,search_content,search_files,glob,run_command,list_directory,directory_tree
|
|
6
|
+
---
|
|
7
|
+
# Check Agent
|
|
8
|
+
|
|
9
|
+
You are the Check Agent in the Trellis workflow.
|
|
10
|
+
|
|
11
|
+
## Recursion Guard
|
|
12
|
+
|
|
13
|
+
You are already the `trellis-check` sub-agent that the main session dispatched. Do the review and fixes directly.
|
|
14
|
+
|
|
15
|
+
- Do NOT spawn another `trellis-check` or `trellis-implement` sub-agent.
|
|
16
|
+
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `trellis-implement` / `trellis-check`, treat that as a main-session instruction that is already satisfied by your current role.
|
|
17
|
+
- Only the main session may dispatch Trellis implement/check agents. If more implementation work is needed, report that recommendation instead of spawning.
|
|
18
|
+
|
|
19
|
+
## Core Responsibilities
|
|
20
|
+
|
|
21
|
+
1. Inspect the current git diff.
|
|
22
|
+
2. Read and follow the spec and research files listed in the task's `check.jsonl`.
|
|
23
|
+
3. Review all changed code against the task PRD and project specs.
|
|
24
|
+
4. Fix issues directly when they are within scope.
|
|
25
|
+
5. Run the relevant lint, typecheck, and focused tests available for the touched code.
|
|
26
|
+
|
|
27
|
+
## Review Priorities
|
|
28
|
+
|
|
29
|
+
- Behavioral regressions and missing requirements.
|
|
30
|
+
- Spec or platform contract violations.
|
|
31
|
+
- Missing or weak tests for logic changes.
|
|
32
|
+
- Cross-platform path, command, and encoding assumptions.
|
|
33
|
+
|
|
34
|
+
## Output
|
|
35
|
+
|
|
36
|
+
Report findings fixed, files changed, and verification results. If no issues remain, say that clearly.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trellis-implement
|
|
3
|
+
description: Code implementation expert. Understands Trellis specs and requirements, then implements features. No git commit allowed.
|
|
4
|
+
runAs: subagent
|
|
5
|
+
allowed-tools: read_file,write_file,edit_file,multi_edit,search_content,search_files,glob,run_command,list_directory,directory_tree,create_directory,delete_file,move_file
|
|
6
|
+
---
|
|
7
|
+
# Implement Agent
|
|
8
|
+
|
|
9
|
+
You are the Implement Agent in the Trellis workflow.
|
|
10
|
+
|
|
11
|
+
## Recursion Guard
|
|
12
|
+
|
|
13
|
+
You are already the `trellis-implement` sub-agent that the main session dispatched. Do the implementation work directly.
|
|
14
|
+
|
|
15
|
+
- Do NOT spawn another `trellis-implement` or `trellis-check` sub-agent.
|
|
16
|
+
- If SessionStart context, workflow-state breadcrumbs, or workflow.md say to dispatch `trellis-implement` / `trellis-check`, treat that as a main-session instruction that is already satisfied by your current role.
|
|
17
|
+
- Only the main session may dispatch Trellis implement/check agents. If more parallel work is needed, report that recommendation instead of spawning.
|
|
18
|
+
|
|
19
|
+
## Core Responsibilities
|
|
20
|
+
|
|
21
|
+
1. Understand the active task requirements.
|
|
22
|
+
2. Read and follow the spec and research files listed in the task's `implement.jsonl`.
|
|
23
|
+
3. Implement the requested change using existing project patterns.
|
|
24
|
+
4. Run the relevant lint, typecheck, and focused tests available for the touched code.
|
|
25
|
+
5. Report files changed and verification results.
|
|
26
|
+
|
|
27
|
+
## Forbidden Operations
|
|
28
|
+
|
|
29
|
+
Do not run:
|
|
30
|
+
|
|
31
|
+
- `git commit`
|
|
32
|
+
- `git push`
|
|
33
|
+
- `git merge`
|
|
34
|
+
|
|
35
|
+
## Working Rules
|
|
36
|
+
|
|
37
|
+
- Read adjacent code and tests before editing.
|
|
38
|
+
- Keep changes scoped to the task.
|
|
39
|
+
- Do not revert unrelated user or concurrent changes.
|
|
40
|
+
- Fix root causes rather than masking symptoms.
|
|
41
|
+
- Prefer existing local helpers and platform patterns over new abstractions.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasonix template module.
|
|
3
|
+
*
|
|
4
|
+
* Reasonix (DeepSeek-Reasonix) is a DeepSeek-native AI coding agent.
|
|
5
|
+
* It stores skills as `.reasonix/skills/<name>/SKILL.md` (Markdown + frontmatter).
|
|
6
|
+
*
|
|
7
|
+
* Subagent skills (trellis-implement, trellis-check) use `runAs: subagent`
|
|
8
|
+
* frontmatter so Reasonix spawns them as isolated subagent loops.
|
|
9
|
+
*/
|
|
10
|
+
import { type AgentTemplate } from "../template-utils.js";
|
|
11
|
+
/** Subagent skill definitions (trellis-implement, trellis-check). */
|
|
12
|
+
export declare function getAllAgents(): AgentTemplate[];
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/reasonix/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAIhF,qEAAqE;AACrE,wBAAgB,YAAY,IAAI,aAAa,EAAE,CAE9C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reasonix template module.
|
|
3
|
+
*
|
|
4
|
+
* Reasonix (DeepSeek-Reasonix) is a DeepSeek-native AI coding agent.
|
|
5
|
+
* It stores skills as `.reasonix/skills/<name>/SKILL.md` (Markdown + frontmatter).
|
|
6
|
+
*
|
|
7
|
+
* Subagent skills (trellis-implement, trellis-check) use `runAs: subagent`
|
|
8
|
+
* frontmatter so Reasonix spawns them as isolated subagent loops.
|
|
9
|
+
*/
|
|
10
|
+
import { createTemplateReader } from "../template-utils.js";
|
|
11
|
+
const { listMdAgents } = createTemplateReader(import.meta.url);
|
|
12
|
+
/** Subagent skill definitions (trellis-implement, trellis-check). */
|
|
13
|
+
export function getAllAgents() {
|
|
14
|
+
return listMdAgents();
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/reasonix/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,oBAAoB,EAAsB,MAAM,sBAAsB,CAAC;AAEhF,MAAM,EAAE,YAAY,EAAE,GAAG,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/D,qEAAqE;AACrE,MAAM,UAAU,YAAY;IAC1B,OAAO,YAAY,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/shared-hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GACtB,kBAAkB,GAClB,iCAAiC,GACjC,0BAA0B,GAC1B,4BAA4B,CAAC;AAEjC,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAC3C,kBAAkB,EAClB,SAAS,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/shared-hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GACtB,kBAAkB,GAClB,iCAAiC,GACjC,0BAA0B,GAC1B,4BAA4B,CAAC;AAEjC,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAC3C,kBAAkB,EAClB,SAAS,cAAc,EAAE,CA2B1B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,UAAU,EAAE,CAWnD;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,kBAAkB,GAC3B,UAAU,EAAE,CAGd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/shared-hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;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,IA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BAA0B;QAC1B,4BAA4B;KAC7B;IACD,KAAK,EAAE;QACL,kBAAkB;QAClB,0BAA0B;QAC1B,4BAA4B;KAC7B;IACD,IAAI,EAAE,CAAC,4BAA4B,CAAC;CACrC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,OAAO,GAAiB,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC;SACjC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SAChC,IAAI,EAAE,CAAC;IAEV,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAC7C,QAA4B;IAE5B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAS,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpE,OAAO,oBAAoB,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -33,6 +33,28 @@ import os
|
|
|
33
33
|
import re
|
|
34
34
|
import sys
|
|
35
35
|
from pathlib import Path
|
|
36
|
+
|
|
37
|
+
# Force UTF-8 on stdin/stdout/stderr on Windows. Default codepage there is
|
|
38
|
+
# cp936 / cp1252 / etc. — non-ASCII content (Chinese task names, prd snippets)
|
|
39
|
+
# both in stdin (hook payload from host CLI) and stdout (our emitted blocks)
|
|
40
|
+
# raises UnicodeDecodeError / UnicodeEncodeError. Equivalent to `python -X utf8`
|
|
41
|
+
# but applied per-stream so we don't depend on host CLI's command wiring.
|
|
42
|
+
if sys.platform.startswith("win"):
|
|
43
|
+
import io as _io
|
|
44
|
+
for _stream_name in ("stdin", "stdout", "stderr"):
|
|
45
|
+
_stream = getattr(sys, _stream_name, None)
|
|
46
|
+
if _stream is None:
|
|
47
|
+
continue
|
|
48
|
+
if hasattr(_stream, "reconfigure"):
|
|
49
|
+
try:
|
|
50
|
+
_stream.reconfigure(encoding="utf-8", errors="replace") # type: ignore[union-attr]
|
|
51
|
+
except Exception:
|
|
52
|
+
pass
|
|
53
|
+
elif hasattr(_stream, "detach"):
|
|
54
|
+
try:
|
|
55
|
+
setattr(sys, _stream_name, _io.TextIOWrapper(_stream.detach(), encoding="utf-8", errors="replace"))
|
|
56
|
+
except Exception:
|
|
57
|
+
pass
|
|
36
58
|
from typing import Optional
|
|
37
59
|
|
|
38
60
|
|
|
@@ -72,14 +72,27 @@ First visible reply: say once in Chinese that Trellis SessionStart context is lo
|
|
|
72
72
|
This notice is one-shot: do not repeat it after the first assistant reply in the same session.
|
|
73
73
|
</first-reply-notice>"""
|
|
74
74
|
|
|
75
|
-
#
|
|
76
|
-
#
|
|
75
|
+
# Force UTF-8 on stdin/stdout/stderr on Windows. Default codepage there is
|
|
76
|
+
# cp936 / cp1252 / etc. — non-ASCII content (Chinese task names, prd snippets)
|
|
77
|
+
# both in stdin (hook payload from host CLI) and stdout (our emitted blocks)
|
|
78
|
+
# raises UnicodeDecodeError / UnicodeEncodeError. Equivalent to `python -X utf8`
|
|
79
|
+
# but applied per-stream so we don't depend on host CLI's command wiring.
|
|
77
80
|
if sys.platform.startswith("win"):
|
|
78
81
|
import io as _io
|
|
79
|
-
|
|
80
|
-
sys
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
for _stream_name in ("stdin", "stdout", "stderr"):
|
|
83
|
+
_stream = getattr(sys, _stream_name, None)
|
|
84
|
+
if _stream is None:
|
|
85
|
+
continue
|
|
86
|
+
if hasattr(_stream, "reconfigure"):
|
|
87
|
+
try:
|
|
88
|
+
_stream.reconfigure(encoding="utf-8", errors="replace") # type: ignore[union-attr]
|
|
89
|
+
except Exception:
|
|
90
|
+
pass
|
|
91
|
+
elif hasattr(_stream, "detach"):
|
|
92
|
+
try:
|
|
93
|
+
setattr(sys, _stream_name, _io.TextIOWrapper(_stream.detach(), encoding="utf-8", errors="replace"))
|
|
94
|
+
except Exception:
|
|
95
|
+
pass
|
|
83
96
|
|
|
84
97
|
|
|
85
98
|
|
|
@@ -799,11 +812,15 @@ Trellis compact SessionStart context. Use it to orient the session; load details
|
|
|
799
812
|
Context loaded. Follow <task-status>. Load workflow/spec/task details only when needed.
|
|
800
813
|
</ready>""")
|
|
801
814
|
|
|
815
|
+
context_text = output.getvalue()
|
|
802
816
|
result = {
|
|
817
|
+
# Claude Code / Qoder / CodeBuddy / Droid / Gemini / Copilot format
|
|
803
818
|
"hookSpecificOutput": {
|
|
804
819
|
"hookEventName": "SessionStart",
|
|
805
|
-
"additionalContext":
|
|
806
|
-
}
|
|
820
|
+
"additionalContext": context_text,
|
|
821
|
+
},
|
|
822
|
+
# Cursor sessionStart format (top-level snake_case per Cursor docs)
|
|
823
|
+
"additional_context": context_text,
|
|
807
824
|
}
|
|
808
825
|
|
|
809
826
|
# Output JSON - stdout is already configured for UTF-8
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check
|
|
3
|
+
description: |
|
|
4
|
+
Code quality auditor for the Trellis channel runtime. Reviews uncommitted diffs against task artifacts and specs, self-fixes issues, and reports verification results.
|
|
5
|
+
provider: claude
|
|
6
|
+
labels: [trellis, check]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Check Agent (channel runtime)
|
|
10
|
+
|
|
11
|
+
You are the Check Agent spawned by `trellis channel spawn --agent check` inside the Trellis channel runtime. You receive an `Active task: <path>` line in your inbox; use it to locate task artifacts on disk.
|
|
12
|
+
|
|
13
|
+
## Context
|
|
14
|
+
|
|
15
|
+
Before reviewing, read in this order:
|
|
16
|
+
|
|
17
|
+
1. `<task-path>/check.jsonl` if present — spec manifest curated for this turn; read every listed file
|
|
18
|
+
2. `<task-path>/prd.md` — requirements
|
|
19
|
+
3. `<task-path>/design.md` if present — technical design
|
|
20
|
+
4. `<task-path>/implement.md` if present — execution plan
|
|
21
|
+
5. `.trellis/spec/` — project-wide guidelines (load only what is relevant to the diff under review)
|
|
22
|
+
|
|
23
|
+
## Core Responsibilities
|
|
24
|
+
|
|
25
|
+
1. **Get the diff** — `git diff` / `git diff --staged` for uncommitted changes
|
|
26
|
+
2. **Review against task artifacts** — does the diff satisfy `prd.md` (and `design.md` / `implement.md` if present)?
|
|
27
|
+
3. **Review against specs** — naming, structure, type safety, error handling, conventions in `.trellis/spec/`
|
|
28
|
+
4. **Self-fix** — when an issue is mechanical and small, fix it directly with the editing tools you have
|
|
29
|
+
5. **Run verification** — project lint and typecheck on the changed scope
|
|
30
|
+
6. **Report** — concrete findings with `file:line` citations and what was fixed vs. what is open
|
|
31
|
+
|
|
32
|
+
## Forbidden Operations
|
|
33
|
+
|
|
34
|
+
- `git commit`
|
|
35
|
+
- `git push`
|
|
36
|
+
- `git merge`
|
|
37
|
+
|
|
38
|
+
The supervising main session owns commits. Report the post-fix state; do not commit on its behalf.
|
|
39
|
+
|
|
40
|
+
## Workflow
|
|
41
|
+
|
|
42
|
+
1. Run `git diff --name-only` and `git diff` to scope the changes
|
|
43
|
+
2. Read the task artifacts and relevant spec files
|
|
44
|
+
3. For each issue:
|
|
45
|
+
- If mechanical (lint nit, missing type, wrong import, dead branch) → fix in-place
|
|
46
|
+
- If a design/judgment issue → record and report, do not silently rewrite
|
|
47
|
+
4. Run the project's lint and typecheck on the changed scope after self-fixes
|
|
48
|
+
5. Report
|
|
49
|
+
|
|
50
|
+
## Report Format
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
## Self-Check Complete
|
|
54
|
+
|
|
55
|
+
### Files Checked
|
|
56
|
+
- <path>
|
|
57
|
+
|
|
58
|
+
### Issues Found and Fixed
|
|
59
|
+
1. `<file>:<line>` — <what was wrong> → <what you changed>
|
|
60
|
+
|
|
61
|
+
### Issues Not Fixed
|
|
62
|
+
- `<file>:<line>` — <issue> — <why deferred to the main session>
|
|
63
|
+
|
|
64
|
+
### Verification Results
|
|
65
|
+
- TypeCheck: <pass|fail|skipped + reason>
|
|
66
|
+
- Lint: <pass|fail|skipped + reason>
|
|
67
|
+
|
|
68
|
+
### Summary
|
|
69
|
+
Checked <N> files, found <X> issues, fixed <Y>, <X-Y> open.
|
|
70
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implement
|
|
3
|
+
description: |
|
|
4
|
+
Code implementation expert for the Trellis channel runtime. Understands specs and task artifacts, then implements features. No git commit allowed.
|
|
5
|
+
provider: claude
|
|
6
|
+
labels: [trellis, implement]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Implement Agent (channel runtime)
|
|
10
|
+
|
|
11
|
+
You are the Implement Agent spawned by `trellis channel spawn --agent implement` inside the Trellis channel runtime. You receive an `Active task: <path>` line in your inbox; use it to locate task artifacts on disk.
|
|
12
|
+
|
|
13
|
+
## Context
|
|
14
|
+
|
|
15
|
+
Before implementing, read in this order:
|
|
16
|
+
|
|
17
|
+
1. `<task-path>/implement.jsonl` if present — spec manifest curated for this turn; read every listed file
|
|
18
|
+
2. `<task-path>/prd.md` — requirements
|
|
19
|
+
3. `<task-path>/design.md` if present — technical design
|
|
20
|
+
4. `<task-path>/implement.md` if present — execution plan
|
|
21
|
+
5. `.trellis/spec/` — project-wide guidelines (load only what is relevant to the diff you are about to write)
|
|
22
|
+
|
|
23
|
+
## Core Responsibilities
|
|
24
|
+
|
|
25
|
+
1. **Understand specs** — read relevant spec files in `.trellis/spec/`
|
|
26
|
+
2. **Understand task artifacts** — read the artifacts listed above
|
|
27
|
+
3. **Implement features** — write code that follows specs and existing patterns
|
|
28
|
+
4. **Self-check** — run lint and typecheck on the changed scope before reporting
|
|
29
|
+
|
|
30
|
+
## Forbidden Operations
|
|
31
|
+
|
|
32
|
+
- `git commit`
|
|
33
|
+
- `git push`
|
|
34
|
+
- `git merge`
|
|
35
|
+
|
|
36
|
+
The supervising main session owns commits. Report what changed; do not commit on its behalf.
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
1. Read relevant specs based on task type and the files in `implement.jsonl` if present
|
|
41
|
+
2. Read the task's `prd.md`, `design.md` if present, and `implement.md` if present
|
|
42
|
+
3. Implement features following specs and existing patterns
|
|
43
|
+
4. Run the project's lint and typecheck commands on the changed scope
|
|
44
|
+
5. Report files touched, key decisions, and verification results back to the channel
|
|
45
|
+
|
|
46
|
+
## Code Standards
|
|
47
|
+
|
|
48
|
+
- Follow existing code patterns
|
|
49
|
+
- Don't add unnecessary abstractions
|
|
50
|
+
- Only do what the PRD asks for; no speculative scope expansion
|
|
51
|
+
- Surface uncertainty back to the channel rather than guessing
|
|
52
|
+
|
|
53
|
+
## Report Format
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
## Implementation Complete
|
|
57
|
+
|
|
58
|
+
### Files Modified
|
|
59
|
+
- <path> — <one-line description>
|
|
60
|
+
|
|
61
|
+
### Implementation Summary
|
|
62
|
+
1. <step>
|
|
63
|
+
2. <step>
|
|
64
|
+
|
|
65
|
+
### Verification Results
|
|
66
|
+
- Lint: <pass|fail|skipped + reason>
|
|
67
|
+
- TypeCheck: <pass|fail|skipped + reason>
|
|
68
|
+
|
|
69
|
+
### Open Questions
|
|
70
|
+
- <if any, otherwise omit>
|
|
71
|
+
```
|
|
@@ -76,6 +76,26 @@ max_journal_lines: 2000
|
|
|
76
76
|
# Default package used when --package is not specified.
|
|
77
77
|
# default_package: frontend
|
|
78
78
|
|
|
79
|
+
#-------------------------------------------------------------------------------
|
|
80
|
+
# Channel worker OOM guard
|
|
81
|
+
#-------------------------------------------------------------------------------
|
|
82
|
+
# Default safeguards for `trellis channel spawn` workers. The guard runs
|
|
83
|
+
# at spawn time (cleans expired idle workers, then enforces the live-worker
|
|
84
|
+
# budget) and inside each supervisor (self-terminates a worker that stays
|
|
85
|
+
# continuously idle past `idle_timeout`).
|
|
86
|
+
#
|
|
87
|
+
# Precedence: CLI flag > env var (TRELLIS_CHANNEL_WORKER_IDLE_TIMEOUT /
|
|
88
|
+
# TRELLIS_CHANNEL_MAX_LIVE_WORKERS) > this config > built-in default.
|
|
89
|
+
#
|
|
90
|
+
# `idle_timeout: 0` disables idle cleanup (workers can sit idle forever
|
|
91
|
+
# unless explicitly killed or given `--timeout`).
|
|
92
|
+
# `max_live_workers: 0` disables the spawn-time budget check.
|
|
93
|
+
#
|
|
94
|
+
channel:
|
|
95
|
+
worker_guard:
|
|
96
|
+
idle_timeout: 5m
|
|
97
|
+
max_live_workers: 6
|
|
98
|
+
|
|
79
99
|
#-------------------------------------------------------------------------------
|
|
80
100
|
# Codex (dispatch behavior)
|
|
81
101
|
#-------------------------------------------------------------------------------
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* │ ├── __init__.py
|
|
11
11
|
* │ ├── common/ # Shared utilities (Python)
|
|
12
12
|
* │ └── *.py # Main scripts (Python)
|
|
13
|
+
* ├── agents/ # Channel runtime agent definitions
|
|
14
|
+
* │ └── *.md # Loaded by `trellis channel spawn --agent <name>`
|
|
13
15
|
* ├── scripts-shell-archive/ # Archived shell scripts (for reference)
|
|
14
16
|
* ├── workflow.md # Workflow guide
|
|
15
17
|
* ├── config.yaml # Trellis configuration
|
|
@@ -45,8 +47,19 @@ export declare const addSessionScript: string;
|
|
|
45
47
|
export declare const workflowMdTemplate: string;
|
|
46
48
|
export declare const configYamlTemplate: string;
|
|
47
49
|
export declare const gitignoreTemplate: string;
|
|
50
|
+
export declare const implementAgentTemplate: string;
|
|
51
|
+
export declare const checkAgentTemplate: string;
|
|
48
52
|
/**
|
|
49
53
|
* Get all script templates as a map of relative path to content
|
|
50
54
|
*/
|
|
51
55
|
export declare function getAllScripts(): Map<string, string>;
|
|
56
|
+
/**
|
|
57
|
+
* Get all channel runtime agent definitions as a map of relative path
|
|
58
|
+
* (under `.trellis/agents/`) to content.
|
|
59
|
+
*
|
|
60
|
+
* Consumed by `trellis init` (to dispatch on first install) and by
|
|
61
|
+
* `trellis update` (to backfill missing files and surface conflicts on edited
|
|
62
|
+
* ones via the standard hash machinery).
|
|
63
|
+
*/
|
|
64
|
+
export declare function getAllAgents(): Map<string, string>;
|
|
52
65
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAcH,eAAO,MAAM,WAAW,QAAsC,CAAC;AAG/D,eAAO,MAAM,UAAU,QAA6C,CAAC;AACrE,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,eAAe,QAA8C,CAAC;AAC3E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,YAAY,QAA2C,CAAC;AACrE,eAAO,MAAM,QAAQ,QAAuC,CAAC;AAC7D,eAAO,MAAM,SAAS,QAAwC,CAAC;AAC/D,eAAO,MAAM,SAAS,QAAwC,CAAC;AAC/D,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,iBAAiB,QAAiD,CAAC;AAChF,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,oBAAoB,QAEhC,CAAC;AACF,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,mBAAmB,QAE/B,CAAC;AACF,eAAO,MAAM,mBAAmB,QAE/B,CAAC;AACF,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAG9E,eAAO,MAAM,kBAAkB,QAA2C,CAAC;AAC3E,eAAO,MAAM,mBAAmB,QAA4C,CAAC;AAC7E,eAAO,MAAM,UAAU,QAAkC,CAAC;AAC1D,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AACvE,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AAGvE,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,QAAgC,CAAC;AAM/D,eAAO,MAAM,sBAAsB,QAAsC,CAAC;AAC1E,eAAO,MAAM,kBAAkB,QAAkC,CAAC;AAElE;;GAEG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAqCnD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAKlD"}
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* │ ├── __init__.py
|
|
11
11
|
* │ ├── common/ # Shared utilities (Python)
|
|
12
12
|
* │ └── *.py # Main scripts (Python)
|
|
13
|
+
* ├── agents/ # Channel runtime agent definitions
|
|
14
|
+
* │ └── *.md # Loaded by `trellis channel spawn --agent <name>`
|
|
13
15
|
* ├── scripts-shell-archive/ # Archived shell scripts (for reference)
|
|
14
16
|
* ├── workflow.md # Workflow guide
|
|
15
17
|
* ├── config.yaml # Trellis configuration
|
|
@@ -57,6 +59,12 @@ export const addSessionScript = readTemplate("scripts/add_session.py");
|
|
|
57
59
|
export const workflowMdTemplate = readTemplate("workflow.md");
|
|
58
60
|
export const configYamlTemplate = readTemplate("config.yaml");
|
|
59
61
|
export const gitignoreTemplate = readTemplate("gitignore.txt");
|
|
62
|
+
// Channel runtime agent definitions (loaded by
|
|
63
|
+
// `packages/cli/src/commands/channel/agent-loader.ts` from `.trellis/agents/`).
|
|
64
|
+
// These are platform-agnostic Trellis runtime files dispatched at `trellis init`
|
|
65
|
+
// and refreshed by `trellis update`.
|
|
66
|
+
export const implementAgentTemplate = readTemplate("agents/implement.md");
|
|
67
|
+
export const checkAgentTemplate = readTemplate("agents/check.md");
|
|
60
68
|
/**
|
|
61
69
|
* Get all script templates as a map of relative path to content
|
|
62
70
|
*/
|
|
@@ -94,4 +102,18 @@ export function getAllScripts() {
|
|
|
94
102
|
scripts.set("add_session.py", addSessionScript);
|
|
95
103
|
return scripts;
|
|
96
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Get all channel runtime agent definitions as a map of relative path
|
|
107
|
+
* (under `.trellis/agents/`) to content.
|
|
108
|
+
*
|
|
109
|
+
* Consumed by `trellis init` (to dispatch on first install) and by
|
|
110
|
+
* `trellis update` (to backfill missing files and surface conflicts on edited
|
|
111
|
+
* ones via the standard hash machinery).
|
|
112
|
+
*/
|
|
113
|
+
export function getAllAgents() {
|
|
114
|
+
const agents = new Map();
|
|
115
|
+
agents.set("implement.md", implementAgentTemplate);
|
|
116
|
+
agents.set("check.md", checkAgentTemplate);
|
|
117
|
+
return agents;
|
|
118
|
+
}
|
|
97
119
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;A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