@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
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# MCP Setup
|
|
2
|
+
|
|
3
|
+
GitNexus and ABCoder are recommended when bootstrapping Trellis specs because they expose architecture and AST context to the agent. They are tool choices, not platform requirements. Configure them through whatever MCP mechanism your agent host provides.
|
|
4
|
+
|
|
5
|
+
## GitNexus
|
|
6
|
+
|
|
7
|
+
GitNexus builds a code knowledge graph from the repository. Use it for module boundaries, execution flows, dependency relationships, blast radius, and graph queries.
|
|
8
|
+
|
|
9
|
+
### Install and Index
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Run from the repository root.
|
|
13
|
+
npx gitnexus analyze
|
|
14
|
+
|
|
15
|
+
# Check index status.
|
|
16
|
+
npx gitnexus status
|
|
17
|
+
|
|
18
|
+
# Re-index after code changes when the analysis is stale.
|
|
19
|
+
npx gitnexus analyze
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The index is written to `.gitnexus/`. Keep embeddings only if the project already uses them; otherwise a normal index is enough for spec bootstrapping.
|
|
23
|
+
|
|
24
|
+
### MCP Server Command
|
|
25
|
+
|
|
26
|
+
Use this server command in the host's MCP configuration:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx -y gitnexus mcp
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Useful Tools
|
|
33
|
+
|
|
34
|
+
| Tool | Purpose |
|
|
35
|
+
|------|---------|
|
|
36
|
+
| `gitnexus_query` | Find execution flows and functional areas by concept |
|
|
37
|
+
| `gitnexus_context` | Inspect callers, callees, references, and process participation for a symbol |
|
|
38
|
+
| `gitnexus_impact` | Understand blast radius before changing a symbol |
|
|
39
|
+
| `gitnexus_detect_changes` | Check changed symbols and affected flows before finishing |
|
|
40
|
+
| `gitnexus_cypher` | Run direct graph queries |
|
|
41
|
+
| `gitnexus_list_repos` | List indexed repositories |
|
|
42
|
+
|
|
43
|
+
## ABCoder
|
|
44
|
+
|
|
45
|
+
ABCoder parses code into UniAST and gives precise package, file, and node-level structure. Use it for signatures, type shapes, implementations, dependencies, and reverse references.
|
|
46
|
+
|
|
47
|
+
### Install
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
go install github.com/cloudwego/abcoder@latest
|
|
51
|
+
abcoder --help
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Parse Repositories
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
abcoder parse /absolute/path/to/package \
|
|
58
|
+
--lang typescript \
|
|
59
|
+
--name package-name \
|
|
60
|
+
--output ~/abcoder-asts
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
For monorepos, parse each package with a stable `--name` so task notes can reference the same repository names.
|
|
64
|
+
|
|
65
|
+
### MCP Server Command
|
|
66
|
+
|
|
67
|
+
Use this server command in the host's MCP configuration:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
abcoder mcp ~/abcoder-asts
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Useful Tools
|
|
74
|
+
|
|
75
|
+
| Tool | Layer | Purpose |
|
|
76
|
+
|------|-------|---------|
|
|
77
|
+
| `list_repos` | 1 | List parsed repositories |
|
|
78
|
+
| `get_repo_structure` | 2 | Inspect packages and files |
|
|
79
|
+
| `get_package_structure` | 3 | Inspect nodes within a package |
|
|
80
|
+
| `get_file_structure` | 3 | Inspect functions, classes, types, and signatures in a file |
|
|
81
|
+
| `get_ast_node` | 4 | Retrieve code, dependencies, references, and implementations |
|
|
82
|
+
|
|
83
|
+
## Verification
|
|
84
|
+
|
|
85
|
+
After configuration, verify from the agent host that both MCP servers are visible. Then run one simple query against each server before starting the spec writing pass.
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
ls .gitnexus/meta.json
|
|
89
|
+
ls ~/abcoder-asts/*.json
|
|
90
|
+
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Repository Analysis
|
|
2
|
+
|
|
3
|
+
The goal is to discover the project's real architecture before writing rules. Do not start from generic spec templates and fill blanks. Start from the code, then let the spec structure follow.
|
|
4
|
+
|
|
5
|
+
## Analysis Order
|
|
6
|
+
|
|
7
|
+
1. Read the existing `.trellis/spec/` tree and note which files are templates, outdated, or already project-specific.
|
|
8
|
+
2. Inspect package manifests, build scripts, workspace config, and top-level documentation to identify packages and runtime layers.
|
|
9
|
+
3. Use GitNexus for execution flows, module clusters, dependency hubs, and impact-sensitive areas.
|
|
10
|
+
4. Use ABCoder or language-native tooling for exact signatures, types, class boundaries, and implementation examples.
|
|
11
|
+
5. Read representative source and test files directly before turning any finding into a spec rule.
|
|
12
|
+
|
|
13
|
+
## What To Capture
|
|
14
|
+
|
|
15
|
+
| Area | Questions |
|
|
16
|
+
|------|-----------|
|
|
17
|
+
| Package boundaries | What does each package own? What imports cross boundaries? |
|
|
18
|
+
| Runtime layers | Which code is CLI, backend, frontend, worker, shared library, test-only, or tooling? |
|
|
19
|
+
| Core abstractions | Which types, services, stores, commands, routes, or adapters define the system shape? |
|
|
20
|
+
| Data flow | Where does user input enter, how is it validated, and where does state persist? |
|
|
21
|
+
| Error handling | How are failures represented, logged, surfaced, and tested? |
|
|
22
|
+
| Configuration | Where do defaults, environment config, generated files, and templates live? |
|
|
23
|
+
| Tests | Which test styles are trusted examples for new work? |
|
|
24
|
+
|
|
25
|
+
## GitNexus Usage
|
|
26
|
+
|
|
27
|
+
Start broad, then inspect specific symbols:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
gitnexus_query({query: "CLI command execution flow"})
|
|
31
|
+
gitnexus_query({query: "template generation and migration"})
|
|
32
|
+
gitnexus_context({name: "SymbolName"})
|
|
33
|
+
gitnexus_cypher({query: "MATCH (n)-[r]->(m) RETURN n.name, type(r), m.name LIMIT 30"})
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Use GitNexus results to find important files and flows. Do not quote graph output as the final authority until you have checked the relevant source files.
|
|
37
|
+
|
|
38
|
+
## ABCoder Usage
|
|
39
|
+
|
|
40
|
+
Use ABCoder when the spec needs exact code shapes:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
list_repos()
|
|
44
|
+
get_repo_structure({repo_name: "package-name"})
|
|
45
|
+
get_file_structure({repo_name: "package-name", file_path: "src/example.ts"})
|
|
46
|
+
get_ast_node({repo_name: "package-name", node_ids: [{mod_path: "...", pkg_path: "...", name: "SymbolName"}]})
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
ABCoder is most valuable for documenting constructor patterns, function signatures, type contracts, and reference chains.
|
|
50
|
+
|
|
51
|
+
## Analysis Notes
|
|
52
|
+
|
|
53
|
+
Keep short notes while analyzing. The notes should include:
|
|
54
|
+
|
|
55
|
+
- Package or layer name.
|
|
56
|
+
- Files that define the local pattern.
|
|
57
|
+
- Rules the spec should teach.
|
|
58
|
+
- Anti-patterns found in old code, comments, tests, or migration paths.
|
|
59
|
+
- Spec files that should be created, deleted, renamed, or merged.
|
package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/spec-task-planning.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Spec Task Planning
|
|
2
|
+
|
|
3
|
+
Use a single agent as the default execution model. The agent may create Trellis tasks for traceability, but the skill should not require a specific platform, CLI, or parallel worker model.
|
|
4
|
+
|
|
5
|
+
## Decomposition
|
|
6
|
+
|
|
7
|
+
Create spec work units around real ownership boundaries:
|
|
8
|
+
|
|
9
|
+
- One package when a package has its own conventions.
|
|
10
|
+
- One layer when the same package has distinct frontend, backend, CLI, worker, or shared-library rules.
|
|
11
|
+
- One cross-cutting guide when a pattern spans packages and is not owned by one layer.
|
|
12
|
+
|
|
13
|
+
Avoid artificial decomposition. A small library usually needs one focused spec pass, not several tasks.
|
|
14
|
+
|
|
15
|
+
## Task Shape
|
|
16
|
+
|
|
17
|
+
When a Trellis task is useful, write a concise PRD with these sections:
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
# Fill <package-or-layer> Trellis Specs
|
|
21
|
+
|
|
22
|
+
## Goal
|
|
23
|
+
Write project-specific `.trellis/spec/` guidance for <scope>.
|
|
24
|
+
|
|
25
|
+
## Scope
|
|
26
|
+
- Spec directory:
|
|
27
|
+
- Source directories to inspect:
|
|
28
|
+
- Tests to inspect:
|
|
29
|
+
- Out of scope:
|
|
30
|
+
|
|
31
|
+
## Architecture Context
|
|
32
|
+
Summarize the concrete findings from repository analysis.
|
|
33
|
+
|
|
34
|
+
## Files To Create Or Update
|
|
35
|
+
- `.trellis/spec/.../index.md`
|
|
36
|
+
- `.trellis/spec/.../<topic>.md`
|
|
37
|
+
|
|
38
|
+
## Rules
|
|
39
|
+
- Adapt the spec file set to the real codebase.
|
|
40
|
+
- Use real source examples with file paths.
|
|
41
|
+
- Remove template-only sections that do not apply.
|
|
42
|
+
- Do not modify product source code unless the task explicitly asks for it.
|
|
43
|
+
|
|
44
|
+
## Acceptance Criteria
|
|
45
|
+
- [ ] Specs contain concrete examples and anti-patterns from the repository.
|
|
46
|
+
- [ ] No placeholder text remains.
|
|
47
|
+
- [ ] Index files match the final spec files.
|
|
48
|
+
- [ ] Claims are backed by source files, tests, or project docs.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Optional Helper Agents
|
|
52
|
+
|
|
53
|
+
If the host supports subagents, helpers can inspect independent packages or run verification. They are optional. The main agent still owns integration and final quality.
|
|
54
|
+
|
|
55
|
+
Helper tasks must have clear ownership:
|
|
56
|
+
|
|
57
|
+
- Read-only research tasks may inspect any source needed for the assigned scope.
|
|
58
|
+
- Write tasks should own disjoint spec directories.
|
|
59
|
+
- Verification tasks should check placeholder removal, broken links, and consistency.
|
|
60
|
+
|
|
61
|
+
Do not encode helper-agent names, vendor-specific commands, or platform-specific routing in the skill. Put only the required work and acceptance criteria in the task.
|
package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/spec-writing.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Spec Writing
|
|
2
|
+
|
|
3
|
+
Trellis specs are coding guidance for future agents. They should explain how to work in this repository, not how a generic project might be organized.
|
|
4
|
+
|
|
5
|
+
## Write From Evidence
|
|
6
|
+
|
|
7
|
+
Each important rule should be backed by one of these:
|
|
8
|
+
|
|
9
|
+
- A source file that demonstrates the preferred pattern.
|
|
10
|
+
- A test file that shows expected behavior.
|
|
11
|
+
- A project document that defines the convention.
|
|
12
|
+
- A repeated pattern across multiple files.
|
|
13
|
+
|
|
14
|
+
Use short snippets only when they make the rule clearer. Prefer linking to the file path and naming the symbol or behavior.
|
|
15
|
+
|
|
16
|
+
## File Structure
|
|
17
|
+
|
|
18
|
+
Keep the spec tree aligned with the project:
|
|
19
|
+
|
|
20
|
+
- Keep `index.md` as the navigation file for the spec directory.
|
|
21
|
+
- Split topics when developers would look for them independently.
|
|
22
|
+
- Merge topics when separate files would repeat the same rule.
|
|
23
|
+
- Delete template files that do not apply.
|
|
24
|
+
- Add new files for important local patterns the template missed.
|
|
25
|
+
|
|
26
|
+
## Content Standards
|
|
27
|
+
|
|
28
|
+
Good spec sections include:
|
|
29
|
+
|
|
30
|
+
- When the rule applies.
|
|
31
|
+
- The local pattern to follow.
|
|
32
|
+
- The source or test files that prove the pattern.
|
|
33
|
+
- Common mistakes or anti-patterns.
|
|
34
|
+
- Verification commands or checks when they are specific and reliable.
|
|
35
|
+
|
|
36
|
+
Avoid:
|
|
37
|
+
|
|
38
|
+
- Placeholder prose.
|
|
39
|
+
- Generic framework advice.
|
|
40
|
+
- Tool instructions that only work in one agent host.
|
|
41
|
+
- Long copied code blocks.
|
|
42
|
+
- Rules based on a single accidental implementation detail.
|
|
43
|
+
|
|
44
|
+
## Example Shape
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
## Command Handlers
|
|
48
|
+
|
|
49
|
+
Command handlers should keep argument parsing, validation, and side effects separate. The local pattern is:
|
|
50
|
+
|
|
51
|
+
- Parse CLI flags at the command boundary.
|
|
52
|
+
- Convert raw inputs into typed task options before invoking core logic.
|
|
53
|
+
- Keep filesystem writes in the command or service layer, not in template helpers.
|
|
54
|
+
|
|
55
|
+
Reference files:
|
|
56
|
+
- `packages/cli/src/commands/example.ts`
|
|
57
|
+
- `packages/cli/test/commands/example.test.ts`
|
|
58
|
+
|
|
59
|
+
Avoid passing raw `process.argv` or unvalidated config objects into shared helpers.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Final Pass
|
|
63
|
+
|
|
64
|
+
Before finishing:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
grep -R "To be filled\\|TODO: fill\\|placeholder" .trellis/spec
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Also check links, index files, and whether any spec still describes a template rather than this repository.
|
|
@@ -22,11 +22,12 @@ Shows the Phase Index (Plan / Execute / Finish) with routing + skill mapping.
|
|
|
22
22
|
|
|
23
23
|
## Step 3: Decide Where You Are
|
|
24
24
|
|
|
25
|
-
`get_context.py` shows the active task's `status` field. Route by `status` + artifact presence
|
|
25
|
+
`get_context.py` shows the active task's `status` field. Route by `status` + artifact presence. This command replaces the user needing to remember the Trellis flow; it does not itself approve implementation.
|
|
26
26
|
|
|
27
27
|
- `status=planning` + no `prd.md` → **1.1** (load `trellis-brainstorm`)
|
|
28
|
-
- `status=planning` + `prd.md`
|
|
29
|
-
- `status=planning` +
|
|
28
|
+
- `status=planning` + `prd.md` only → decide whether the task is lightweight or complex. Lightweight can move to **1.4** review; complex returns to **1.1** to add `design.md` + `implement.md`.
|
|
29
|
+
- `status=planning` + complex artifacts complete + sub-agent jsonl not curated (only the seed `_example` row) → **1.3**
|
|
30
|
+
- `status=planning` + required artifacts complete + required jsonl curated or inline mode → **1.4** (ask for start review; only run `task.py start` after user confirms)
|
|
30
31
|
- `status=in_progress` + implementation not started → **2.1**
|
|
31
32
|
- `status=in_progress` + implementation done, not yet checked → **2.2**
|
|
32
33
|
- `status=in_progress` + check passed → **3.1**
|
|
@@ -35,7 +36,7 @@ Shows the Phase Index (Plan / Execute / Finish) with routing + skill mapping.
|
|
|
35
36
|
Phase rules (full detail in `.trellis/workflow.md`):
|
|
36
37
|
|
|
37
38
|
1. Run steps **in order** within a phase — `[required]` steps must not be skipped
|
|
38
|
-
2. `[once]` steps are already done if the output exists
|
|
39
|
+
2. `[once]` steps are already done if the required output exists. `prd.md` alone can be enough only for lightweight tasks; complex tasks also need `design.md` and `implement.md`.
|
|
39
40
|
3. You may go back to an earlier phase if discoveries require it
|
|
40
41
|
|
|
41
42
|
## Step 4: Load the Specific Step
|
|
@@ -52,4 +53,4 @@ Follow the loaded instructions. After each `[required]` step completes, move to
|
|
|
52
53
|
|
|
53
54
|
## Reference
|
|
54
55
|
|
|
55
|
-
Full workflow
|
|
56
|
+
Full workflow and detailed phase steps live in `.trellis/workflow.md`. This command is only an entry point — the canonical guidance is there.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Start Session
|
|
2
2
|
|
|
3
|
-
Initialize a Trellis-managed development session. This platform has no session-start hook, so manually load the equivalent context by following these steps
|
|
3
|
+
Initialize a Trellis-managed development session. This platform has no session-start hook, so manually load the equivalent compact context by following these steps.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -11,8 +11,10 @@ Identity, git status, current task, active tasks, journal location.
|
|
|
11
11
|
{{PYTHON_CMD}} ./.trellis/scripts/get_context.py
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
+
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.
|
|
15
|
+
|
|
14
16
|
## Step 2: Workflow overview
|
|
15
|
-
Phase Index
|
|
17
|
+
Compact Phase Index, request triage rules, planning artifact contract, and the step-detail command.
|
|
16
18
|
|
|
17
19
|
```bash
|
|
18
20
|
{{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode phase
|
|
@@ -32,14 +34,15 @@ cat .trellis/spec/<package>/<layer>/index.md # for each relevant layer
|
|
|
32
34
|
Index files list the specific guideline docs to read when you actually start coding.
|
|
33
35
|
|
|
34
36
|
## Step 4: Decide next action
|
|
35
|
-
From Step 1 you know the current task. Check the task directory:
|
|
37
|
+
From Step 1 you know the current task and status. Check the task directory:
|
|
36
38
|
|
|
37
|
-
- **Active task + `prd.md
|
|
39
|
+
- **Active task status `planning` + no `prd.md`** → Phase 1.1. Load the `trellis-brainstorm` skill.
|
|
40
|
+
- **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`.
|
|
41
|
+
- **Active task status `in_progress`** → Phase 2 step 2.1. Load the step detail:
|
|
38
42
|
```bash
|
|
39
43
|
{{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode phase --step 2.1 --platform {{CLI_FLAG}}
|
|
40
44
|
```
|
|
41
|
-
- **
|
|
42
|
-
- **No active task** → when the user describes multi-step work, load the `trellis-brainstorm` skill to clarify requirements, then create a task via `task.py create`. For simple one-off questions or trivial edits, skip this and just answer directly — no task needed.
|
|
45
|
+
- **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.
|
|
43
46
|
|
|
44
47
|
---
|
|
45
48
|
|
|
@@ -2,28 +2,34 @@ Read the relevant development guidelines before starting your task.
|
|
|
2
2
|
|
|
3
3
|
Execute these steps:
|
|
4
4
|
|
|
5
|
-
1. **
|
|
5
|
+
1. **Read current task artifacts**:
|
|
6
|
+
- `prd.md` for requirements and acceptance criteria
|
|
7
|
+
- `design.md` if present for technical design
|
|
8
|
+
- `implement.md` if present for execution order and validation plan
|
|
9
|
+
|
|
10
|
+
2. **Discover packages and their spec layers**:
|
|
6
11
|
```bash
|
|
7
12
|
python3 ./.trellis/scripts/get_context.py --mode packages
|
|
8
13
|
```
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
3. **Identify which specs apply** to your task based on:
|
|
11
16
|
- Which package you're modifying (e.g., `cli/`, `docs-site/`)
|
|
12
17
|
- What type of work (backend, frontend, unit-test, docs, etc.)
|
|
18
|
+
- Any spec/research paths referenced by the task artifacts
|
|
13
19
|
|
|
14
|
-
|
|
20
|
+
4. **Read the spec index** for each relevant module:
|
|
15
21
|
```bash
|
|
16
22
|
cat .trellis/spec/<package>/<layer>/index.md
|
|
17
23
|
```
|
|
18
24
|
Follow the **"Pre-Development Checklist"** section in the index.
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
5. **Read the specific guideline files** listed in the Pre-Development Checklist that are relevant to your task. The index is NOT the goal — it points you to the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`). Read those files to understand the coding standards and patterns.
|
|
21
27
|
|
|
22
|
-
|
|
28
|
+
6. **Always read shared guides**:
|
|
23
29
|
```bash
|
|
24
30
|
cat .trellis/spec/guides/index.md
|
|
25
31
|
```
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
7. Understand the coding standards and patterns you need to follow, then proceed with your development plan.
|
|
28
34
|
|
|
29
35
|
This step is **mandatory** before writing any code.
|