@mindfoldhq/trellis 0.6.7 → 0.6.9
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.map +1 -1
- package/dist/cli/index.js +38 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/channel/adapters/codex.d.ts +7 -1
- package/dist/commands/channel/adapters/codex.d.ts.map +1 -1
- package/dist/commands/channel/adapters/codex.js +19 -2
- package/dist/commands/channel/adapters/codex.js.map +1 -1
- package/dist/commands/channel/adapters/index.d.ts +3 -1
- package/dist/commands/channel/adapters/index.d.ts.map +1 -1
- package/dist/commands/channel/adapters/index.js +1 -1
- package/dist/commands/channel/adapters/index.js.map +1 -1
- package/dist/commands/channel/agent-loader.d.ts +2 -2
- package/dist/commands/channel/agent-loader.d.ts.map +1 -1
- package/dist/commands/channel/agent-loader.js +9 -5
- package/dist/commands/channel/agent-loader.js.map +1 -1
- package/dist/commands/channel/context-loader.d.ts +1 -1
- package/dist/commands/channel/context-loader.d.ts.map +1 -1
- package/dist/commands/channel/context-loader.js +36 -15
- package/dist/commands/channel/context-loader.js.map +1 -1
- package/dist/commands/channel/context-trust.d.ts +31 -0
- package/dist/commands/channel/context-trust.d.ts.map +1 -0
- package/dist/commands/channel/context-trust.js +139 -0
- package/dist/commands/channel/context-trust.js.map +1 -0
- package/dist/commands/channel/index.d.ts.map +1 -1
- package/dist/commands/channel/index.js +4 -0
- package/dist/commands/channel/index.js.map +1 -1
- package/dist/commands/channel/spawn.d.ts +3 -0
- package/dist/commands/channel/spawn.d.ts.map +1 -1
- package/dist/commands/channel/spawn.js +5 -2
- package/dist/commands/channel/spawn.js.map +1 -1
- package/dist/commands/channel/supervisor.d.ts +3 -0
- package/dist/commands/channel/supervisor.d.ts.map +1 -1
- package/dist/commands/channel/supervisor.js +1 -0
- package/dist/commands/channel/supervisor.js.map +1 -1
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mem.d.ts.map +1 -1
- package/dist/commands/mem.js +30 -9
- package/dist/commands/mem.js.map +1 -1
- package/dist/commands/update.d.ts +12 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +75 -7
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/codex.d.ts +36 -0
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +111 -13
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/grok.d.ts +22 -0
- package/dist/configurators/grok.d.ts.map +1 -0
- package/dist/configurators/grok.js +58 -0
- package/dist/configurators/grok.js.map +1 -0
- package/dist/configurators/index.d.ts.map +1 -1
- package/dist/configurators/index.js +17 -2
- package/dist/configurators/index.js.map +1 -1
- package/dist/configurators/kimi.d.ts +29 -0
- package/dist/configurators/kimi.d.ts.map +1 -0
- package/dist/configurators/kimi.js +81 -0
- package/dist/configurators/kimi.js.map +1 -0
- package/dist/configurators/pi.js +9 -9
- package/dist/configurators/pi.js.map +1 -1
- package/dist/configurators/shared.d.ts.map +1 -1
- package/dist/configurators/shared.js +12 -4
- package/dist/configurators/shared.js.map +1 -1
- package/dist/configurators/snow.d.ts +31 -0
- package/dist/configurators/snow.d.ts.map +1 -0
- package/dist/configurators/snow.js +95 -0
- package/dist/configurators/snow.js.map +1 -0
- package/dist/configurators/workflow.d.ts +14 -0
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +37 -1
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/configurators/zcode.d.ts +9 -4
- package/dist/configurators/zcode.d.ts.map +1 -1
- package/dist/configurators/zcode.js +41 -12
- package/dist/configurators/zcode.js.map +1 -1
- package/dist/migrations/manifests/0.5.0-beta.0.json +1 -1
- package/dist/migrations/manifests/0.6.8.json +17 -0
- package/dist/migrations/manifests/0.6.9.json +9 -0
- package/dist/templates/codex/agents/trellis-check.toml +7 -12
- package/dist/templates/codex/agents/trellis-implement.toml +7 -12
- package/dist/templates/codex/agents/trellis-research.toml +15 -15
- package/dist/templates/codex/config.toml +11 -0
- package/dist/templates/codex/hooks/session-start.py +9 -3
- package/dist/templates/codex/hooks.json +12 -0
- package/dist/templates/codex/skills/brainstorm/SKILL.md +40 -13
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +2 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +1 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +10 -4
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +2 -1
- package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
- package/dist/templates/common/skills/brainstorm.md +40 -13
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +40 -13
- package/dist/templates/grok/agents/trellis-check.md +105 -0
- package/dist/templates/grok/agents/trellis-implement.md +116 -0
- package/dist/templates/grok/agents/trellis-research.md +146 -0
- package/dist/templates/grok/index.d.ts +16 -0
- package/dist/templates/grok/index.d.ts.map +1 -0
- package/dist/templates/grok/index.js +19 -0
- package/dist/templates/grok/index.js.map +1 -0
- package/dist/templates/kimi/agents/trellis-check.md +103 -0
- package/dist/templates/kimi/agents/trellis-implement.md +114 -0
- package/dist/templates/kimi/agents/trellis-research.md +144 -0
- package/dist/templates/kimi/index.d.ts +19 -0
- package/dist/templates/kimi/index.d.ts.map +1 -0
- package/dist/templates/kimi/index.js +22 -0
- package/dist/templates/kimi/index.js.map +1 -0
- package/dist/templates/omp/extensions/trellis/index.ts.txt +133 -9
- package/dist/templates/opencode/lib/session-utils.js +8 -2
- package/dist/templates/opencode/lib/trellis-context.js +263 -43
- package/dist/templates/opencode/plugins/inject-subagent-context.js +89 -35
- package/dist/templates/opencode/plugins/inject-workflow-state.js +90 -5
- package/dist/templates/pi/extensions/trellis/index.ts.txt +278 -24
- package/dist/templates/pi/settings.json +0 -3
- package/dist/templates/shared-hooks/index.d.ts +11 -5
- package/dist/templates/shared-hooks/index.d.ts.map +1 -1
- package/dist/templates/shared-hooks/index.js +16 -5
- package/dist/templates/shared-hooks/index.js.map +1 -1
- package/dist/templates/shared-hooks/inject-subagent-context.py +466 -104
- package/dist/templates/shared-hooks/inject-workflow-state.py +86 -29
- package/dist/templates/shared-hooks/session-start.py +26 -6
- package/dist/templates/snow/SNOW.md +86 -0
- package/dist/templates/snow/agents/trellis-check.md +135 -0
- package/dist/templates/snow/agents/trellis-implement.md +153 -0
- package/dist/templates/snow/agents/trellis-research.md +114 -0
- package/dist/templates/snow/hooks/beforeSubAgentStart.json +15 -0
- package/dist/templates/snow/hooks/onSessionStart.json +15 -0
- package/dist/templates/snow/hooks/onUserMessage.json +15 -0
- package/dist/templates/snow/hooks/write-trellis-context.py +644 -0
- package/dist/templates/snow/index.d.ts +26 -0
- package/dist/templates/snow/index.d.ts.map +1 -0
- package/dist/templates/snow/index.js +36 -0
- package/dist/templates/snow/index.js.map +1 -0
- package/dist/templates/template-utils.d.ts.map +1 -1
- package/dist/templates/template-utils.js +5 -1
- package/dist/templates/template-utils.js.map +1 -1
- package/dist/templates/trellis/config.yaml +55 -7
- package/dist/templates/trellis/gitattributes.txt +9 -0
- package/dist/templates/trellis/index.d.ts +3 -1
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +3 -1
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add_session.py +94 -28
- package/dist/templates/trellis/scripts/common/active_task.py +44 -13
- package/dist/templates/trellis/scripts/common/cli_adapter.py +69 -5
- package/dist/templates/trellis/scripts/common/config.py +105 -10
- package/dist/templates/trellis/scripts/common/git.py +36 -0
- package/dist/templates/trellis/scripts/common/io.py +16 -9
- package/dist/templates/trellis/scripts/common/task_context.py +101 -7
- package/dist/templates/trellis/scripts/common/task_store.py +149 -22
- package/dist/templates/trellis/scripts/common/task_utils.py +3 -1
- package/dist/templates/trellis/scripts/common/trellis_config.py +2 -1
- package/dist/templates/trellis/scripts/common/workflow_phase.py +19 -12
- package/dist/templates/trellis/scripts/task.py +106 -10
- package/dist/templates/trellis/workflow.md +20 -19
- package/dist/templates/zcode/agents/trellis-check.md +7 -0
- package/dist/templates/zcode/agents/trellis-implement.md +13 -4
- package/dist/templates/zcode/config.json +42 -0
- package/dist/templates/zcode/index.d.ts +10 -1
- package/dist/templates/zcode/index.d.ts.map +1 -1
- package/dist/templates/zcode/index.js +12 -2
- package/dist/templates/zcode/index.js.map +1 -1
- 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 +114 -2
- package/dist/types/ai-tools.js.map +1 -1
- package/dist/utils/template-fetcher.d.ts.map +1 -1
- package/dist/utils/template-fetcher.js +0 -3
- package/dist/utils/template-fetcher.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trellis-research
|
|
3
|
+
id: trellis-research
|
|
4
|
+
description: |
|
|
5
|
+
Code and tech search expert for Trellis. Finds files, patterns, and tech
|
|
6
|
+
solutions, and PERSISTS every finding to the current task's research/
|
|
7
|
+
directory. No code modifications outside that directory. On Snow CLI,
|
|
8
|
+
auto-loaded from `.snow/agents/`; prefer Active task path in the prompt.
|
|
9
|
+
tools:
|
|
10
|
+
- filesystem-read
|
|
11
|
+
- filesystem-create
|
|
12
|
+
- filesystem-replaceedit
|
|
13
|
+
- terminal-execute
|
|
14
|
+
- ace-search
|
|
15
|
+
- codebase-search
|
|
16
|
+
- websearch-search
|
|
17
|
+
- websearch-fetch
|
|
18
|
+
- notebook-manage
|
|
19
|
+
- skill-execute
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Research Agent
|
|
23
|
+
|
|
24
|
+
You are the Research Agent in the Trellis workflow on **Snow CLI**.
|
|
25
|
+
|
|
26
|
+
## Core Principle
|
|
27
|
+
|
|
28
|
+
**You do one thing: find, explain, and PERSIST information.**
|
|
29
|
+
|
|
30
|
+
Conversations get compacted; files don't. Every research output MUST end up as a file under `{TASK_DIR}/research/`. Returning findings only through the chat reply is a failure — the caller cannot read them next session.
|
|
31
|
+
|
|
32
|
+
## Snow tool map
|
|
33
|
+
|
|
34
|
+
| Need | Tool |
|
|
35
|
+
| -------------------- | -------------------------------------------------------------------------------- |
|
|
36
|
+
| Internal code search | `ace-search`, `codebase-search`, `filesystem-read` |
|
|
37
|
+
| External docs | `websearch-search`, `websearch-fetch` |
|
|
38
|
+
| Persist notes | `filesystem-create` / `filesystem-replaceedit` under `{TASK_DIR}/research/` only |
|
|
39
|
+
| Shell helpers | `terminal-execute` (read-only preferred) |
|
|
40
|
+
|
|
41
|
+
## Dispatch note (main session)
|
|
42
|
+
|
|
43
|
+
On Snow CLI (class-1), project agents under `.snow/agents/` are auto-discovered. Prefer starting the prompt with:
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
Active task: <path from task.py current>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
- Session/user hooks inject Trellis context into the main session.
|
|
50
|
+
- `beforeSubAgentStart` injects Trellis breadcrumb into this sub-agent prompt.
|
|
51
|
+
- Still re-read the Active task path and write under `{TASK_DIR}/research/` (hook inject is a breadcrumb, not a substitute for task resolution).
|
|
52
|
+
- Optionally Read `.snow/log/trellis-context.txt` if present.
|
|
53
|
+
|
|
54
|
+
Prefer `#trellis-research` / picker dispatch with Active task path in the prompt.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Core Responsibilities
|
|
59
|
+
|
|
60
|
+
1. **Internal Search** — locate files/components, understand code logic, discover patterns
|
|
61
|
+
2. **External Search** — library docs, API references, best practices (web search)
|
|
62
|
+
3. **Persist** — write each research topic to `{TASK_DIR}/research/<topic>.md`
|
|
63
|
+
4. **Report** — return file paths + one-line summaries to the main agent (not full content)
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Workflow
|
|
68
|
+
|
|
69
|
+
### Step 1: Resolve Current Task
|
|
70
|
+
|
|
71
|
+
Run `python3 ./.trellis/scripts/task.py current --source` via `terminal-execute` → active task path. If no active task is set, ask the user where to write output; do NOT guess.
|
|
72
|
+
|
|
73
|
+
Ensure `{TASK_DIR}/research/` exists.
|
|
74
|
+
|
|
75
|
+
### Step 2: Understand Search Request
|
|
76
|
+
|
|
77
|
+
Classify: internal / external / mixed. Determine scope and expected shape.
|
|
78
|
+
|
|
79
|
+
### Step 3: Execute Search
|
|
80
|
+
|
|
81
|
+
Run independent searches in parallel for efficiency.
|
|
82
|
+
|
|
83
|
+
### Step 4: Persist Each Topic
|
|
84
|
+
|
|
85
|
+
For each distinct research topic, write a markdown file at `{TASK_DIR}/research/<topic-slug>.md`.
|
|
86
|
+
|
|
87
|
+
### Step 5: Report to Main Agent
|
|
88
|
+
|
|
89
|
+
Reply with ONLY:
|
|
90
|
+
|
|
91
|
+
- List of files written (paths relative to repo root)
|
|
92
|
+
- One-line summary per file
|
|
93
|
+
- Any critical caveats
|
|
94
|
+
|
|
95
|
+
Do NOT paste full research content into the reply. The files are the contract.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Scope Limits (Strict)
|
|
100
|
+
|
|
101
|
+
### Write ALLOWED
|
|
102
|
+
|
|
103
|
+
- `{TASK_DIR}/research/*.md` — your own output
|
|
104
|
+
- Creating `{TASK_DIR}/research/` if it doesn't exist
|
|
105
|
+
|
|
106
|
+
### Write FORBIDDEN
|
|
107
|
+
|
|
108
|
+
- Code files (`src/`, `lib/`, …)
|
|
109
|
+
- Spec files (`.trellis/spec/`) — main agent should use `update-spec` skill instead
|
|
110
|
+
- `.trellis/scripts/`, `.trellis/workflow.md`, platform config (`.snow/`, `.claude/`, etc.)
|
|
111
|
+
- Other task directories
|
|
112
|
+
- Any git operation (commit / push / branch / merge)
|
|
113
|
+
|
|
114
|
+
If the user asks you to edit code, decline and suggest spawning implement instead.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"beforeSubAgentStart": [
|
|
3
|
+
{
|
|
4
|
+
"description": "Inject Trellis active-task context before sub-agent buildInitialMessages",
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "python -X utf8 .snow/hooks/write-trellis-context.py subagent",
|
|
9
|
+
"timeout": 15000,
|
|
10
|
+
"enabled": true
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"onSessionStart": [
|
|
3
|
+
{
|
|
4
|
+
"description": "Inject Trellis session context on Snow session start (additionalContext + .snow/log breadcrumb)",
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "python -X utf8 .snow/hooks/write-trellis-context.py session",
|
|
9
|
+
"timeout": 20000,
|
|
10
|
+
"enabled": true
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"onUserMessage": [
|
|
3
|
+
{
|
|
4
|
+
"description": "Prepend Trellis breadcrumb on each user message (UI keeps original typed text)",
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "python -X utf8 .snow/hooks/write-trellis-context.py user",
|
|
9
|
+
"timeout": 15000,
|
|
10
|
+
"enabled": true
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|