@blxzer/cursor-trellis 0.1.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/CHANGELOG.md +45 -0
- package/LICENSE +235 -0
- package/README.md +9 -0
- package/bin/smart-search.js +79 -0
- package/bin/trellis.js +3 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +258 -0
- package/dist/cli/index.js.map +1 -0
- 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 +62 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +1656 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mem.d.ts +30 -0
- package/dist/commands/mem.d.ts.map +1 -0
- package/dist/commands/mem.js +424 -0
- package/dist/commands/mem.js.map +1 -0
- package/dist/commands/rollout.d.ts +34 -0
- package/dist/commands/rollout.d.ts.map +1 -0
- package/dist/commands/rollout.js +102 -0
- package/dist/commands/rollout.js.map +1 -0
- package/dist/commands/uninstall.d.ts +27 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +339 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +80 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +2185 -0
- package/dist/commands/update.js.map +1 -0
- 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/antigravity.d.ts +7 -0
- package/dist/configurators/antigravity.d.ts.map +1 -0
- package/dist/configurators/antigravity.js +19 -0
- package/dist/configurators/antigravity.js.map +1 -0
- package/dist/configurators/claude.d.ts +9 -0
- package/dist/configurators/claude.d.ts.map +1 -0
- package/dist/configurators/claude.js +72 -0
- package/dist/configurators/claude.js.map +1 -0
- package/dist/configurators/codebuddy.d.ts +10 -0
- package/dist/configurators/codebuddy.d.ts.map +1 -0
- package/dist/configurators/codebuddy.js +30 -0
- package/dist/configurators/codebuddy.js.map +1 -0
- package/dist/configurators/codex.d.ts +8 -0
- package/dist/configurators/codex.d.ts.map +1 -0
- package/dist/configurators/codex.js +87 -0
- package/dist/configurators/codex.js.map +1 -0
- package/dist/configurators/copilot.d.ts +10 -0
- package/dist/configurators/copilot.d.ts.map +1 -0
- package/dist/configurators/copilot.js +51 -0
- package/dist/configurators/copilot.js.map +1 -0
- package/dist/configurators/cursor.d.ts +20 -0
- package/dist/configurators/cursor.d.ts.map +1 -0
- package/dist/configurators/cursor.js +49 -0
- package/dist/configurators/cursor.js.map +1 -0
- package/dist/configurators/cursor2plus-local.d.ts +6 -0
- package/dist/configurators/cursor2plus-local.d.ts.map +1 -0
- package/dist/configurators/cursor2plus-local.js +20 -0
- package/dist/configurators/cursor2plus-local.js.map +1 -0
- package/dist/configurators/droid.d.ts +10 -0
- package/dist/configurators/droid.d.ts.map +1 -0
- package/dist/configurators/droid.js +30 -0
- package/dist/configurators/droid.js.map +1 -0
- package/dist/configurators/gemini.d.ts +16 -0
- package/dist/configurators/gemini.d.ts.map +1 -0
- package/dist/configurators/gemini.js +38 -0
- package/dist/configurators/gemini.js.map +1 -0
- package/dist/configurators/index.d.ts +69 -0
- package/dist/configurators/index.d.ts.map +1 -0
- package/dist/configurators/index.js +395 -0
- package/dist/configurators/index.js.map +1 -0
- package/dist/configurators/kilo.d.ts +7 -0
- package/dist/configurators/kilo.d.ts.map +1 -0
- package/dist/configurators/kilo.js +19 -0
- package/dist/configurators/kilo.js.map +1 -0
- package/dist/configurators/kiro.d.ts +8 -0
- package/dist/configurators/kiro.d.ts.map +1 -0
- package/dist/configurators/kiro.js +24 -0
- package/dist/configurators/kiro.js.map +1 -0
- package/dist/configurators/opencode.d.ts +14 -0
- package/dist/configurators/opencode.d.ts.map +1 -0
- package/dist/configurators/opencode.js +96 -0
- package/dist/configurators/opencode.js.map +1 -0
- package/dist/configurators/pi.d.ts +3 -0
- package/dist/configurators/pi.d.ts.map +1 -0
- package/dist/configurators/pi.js +45 -0
- package/dist/configurators/pi.js.map +1 -0
- package/dist/configurators/qoder.d.ts +11 -0
- package/dist/configurators/qoder.d.ts.map +1 -0
- package/dist/configurators/qoder.js +31 -0
- package/dist/configurators/qoder.js.map +1 -0
- package/dist/configurators/shared.d.ts +183 -0
- package/dist/configurators/shared.d.ts.map +1 -0
- package/dist/configurators/shared.js +557 -0
- package/dist/configurators/shared.js.map +1 -0
- package/dist/configurators/windsurf.d.ts +7 -0
- package/dist/configurators/windsurf.d.ts.map +1 -0
- package/dist/configurators/windsurf.js +19 -0
- package/dist/configurators/windsurf.js.map +1 -0
- package/dist/configurators/workflow.d.ts +46 -0
- package/dist/configurators/workflow.d.ts.map +1 -0
- package/dist/configurators/workflow.js +180 -0
- package/dist/configurators/workflow.js.map +1 -0
- package/dist/constants/paths.d.ts +70 -0
- package/dist/constants/paths.d.ts.map +1 -0
- package/dist/constants/paths.js +79 -0
- package/dist/constants/paths.js.map +1 -0
- package/dist/constants/version.d.ts +9 -0
- package/dist/constants/version.d.ts.map +1 -0
- package/dist/constants/version.js +15 -0
- package/dist/constants/version.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/index.d.ts +62 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +187 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/manifests/0.1.0.json +9 -0
- package/dist/templates/claude/agents/trellis-check.md +124 -0
- package/dist/templates/claude/agents/trellis-implement.md +110 -0
- package/dist/templates/claude/agents/trellis-research.md +137 -0
- package/dist/templates/claude/index.d.ts +22 -0
- package/dist/templates/claude/index.d.ts.map +1 -0
- package/dist/templates/claude/index.js +46 -0
- package/dist/templates/claude/index.js.map +1 -0
- package/dist/templates/claude/settings.json +84 -0
- package/dist/templates/codebuddy/agents/trellis-check.md +115 -0
- package/dist/templates/codebuddy/agents/trellis-implement.md +110 -0
- package/dist/templates/codebuddy/agents/trellis-research.md +137 -0
- package/dist/templates/codebuddy/index.d.ts +15 -0
- package/dist/templates/codebuddy/index.d.ts.map +1 -0
- package/dist/templates/codebuddy/index.js +15 -0
- package/dist/templates/codebuddy/index.js.map +1 -0
- package/dist/templates/codebuddy/settings.json +70 -0
- package/dist/templates/codex/agents/trellis-check.toml +67 -0
- package/dist/templates/codex/agents/trellis-implement.toml +40 -0
- package/dist/templates/codex/agents/trellis-research.toml +73 -0
- package/dist/templates/codex/config.toml +28 -0
- package/dist/templates/codex/hooks/session-start.py +575 -0
- package/dist/templates/codex/hooks.json +15 -0
- package/dist/templates/codex/index.d.ts +39 -0
- package/dist/templates/codex/index.d.ts.map +1 -0
- package/dist/templates/codex/index.js +85 -0
- package/dist/templates/codex/index.js.map +1 -0
- package/dist/templates/codex/skills/before-dev/SKILL.md +40 -0
- package/dist/templates/codex/skills/brainstorm/SKILL.md +112 -0
- package/dist/templates/codex/skills/break-loop/SKILL.md +130 -0
- package/dist/templates/codex/skills/check/SKILL.md +98 -0
- package/dist/templates/codex/skills/check-cross-layer/SKILL.md +158 -0
- package/dist/templates/codex/skills/create-command/SKILL.md +101 -0
- package/dist/templates/codex/skills/finish-work/SKILL.md +90 -0
- package/dist/templates/codex/skills/improve-ut/SKILL.md +69 -0
- package/dist/templates/codex/skills/integrate-skill/SKILL.md +221 -0
- package/dist/templates/codex/skills/onboard/SKILL.md +363 -0
- package/dist/templates/codex/skills/record-session/SKILL.md +67 -0
- package/dist/templates/codex/skills/start/SKILL.md +66 -0
- package/dist/templates/codex/skills/update-spec/SKILL.md +335 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/SKILL.md +388 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/agents/openai.yaml +3 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/examples/batch-search.md +98 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/examples/evidence-gathering.md +89 -0
- package/dist/templates/common/bundled-skills/smart-search-cli/references/cli-contract.md +337 -0
- package/dist/templates/common/bundled-skills/trellis-cursor2plus-setup/SKILL.md +62 -0
- package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +73 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/add-project-local-conventions.md +83 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +54 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +84 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-hooks.md +57 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +80 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +83 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +88 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +65 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +55 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/context-injection.md +68 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +80 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/overview.md +51 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +102 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +133 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +75 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workspace-memory.md +71 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +80 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/hooks-and-settings.md +69 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/overview.md +61 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/platform-map.md +76 -0
- package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +128 -0
- package/dist/templates/common/bundled-skills/trellis-micro-grill/SKILL.md +47 -0
- package/dist/templates/common/bundled-skills/trellis-skill-creator/SKILL.md +44 -0
- package/dist/templates/common/bundled-skills/trellis-skill-creator/references/authoring-rules.md +97 -0
- package/dist/templates/common/bundled-skills/trellis-skill-creator/references/review-checklist.md +47 -0
- package/dist/templates/common/bundled-skills/trellis-skill-creator/references/trellis-skill-locations.md +52 -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/common/commands/continue.md +63 -0
- package/dist/templates/common/commands/finish-work.md +68 -0
- package/dist/templates/common/commands/start.md +69 -0
- package/dist/templates/common/index.d.ts +48 -0
- package/dist/templates/common/index.d.ts.map +1 -0
- package/dist/templates/common/index.js +104 -0
- package/dist/templates/common/index.js.map +1 -0
- package/dist/templates/common/skills/before-dev.md +35 -0
- package/dist/templates/common/skills/brainstorm.md +164 -0
- package/dist/templates/common/skills/break-loop.md +125 -0
- package/dist/templates/common/skills/check.md +106 -0
- package/dist/templates/common/skills/update-spec.md +364 -0
- package/dist/templates/copilot/hooks/session-start.py +557 -0
- package/dist/templates/copilot/hooks.json +19 -0
- package/dist/templates/copilot/index.d.ts +23 -0
- package/dist/templates/copilot/index.d.ts.map +1 -0
- package/dist/templates/copilot/index.js +54 -0
- package/dist/templates/copilot/index.js.map +1 -0
- package/dist/templates/copilot/prompts/before-dev.prompt.md +39 -0
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +111 -0
- package/dist/templates/copilot/prompts/break-loop.prompt.md +129 -0
- package/dist/templates/copilot/prompts/check-cross-layer.prompt.md +157 -0
- package/dist/templates/copilot/prompts/check.prompt.md +97 -0
- package/dist/templates/copilot/prompts/create-command.prompt.md +116 -0
- package/dist/templates/copilot/prompts/finish-work.prompt.md +99 -0
- package/dist/templates/copilot/prompts/integrate-skill.prompt.md +223 -0
- package/dist/templates/copilot/prompts/onboard.prompt.md +362 -0
- package/dist/templates/copilot/prompts/parallel.prompt.md +204 -0
- package/dist/templates/copilot/prompts/record-session.prompt.md +66 -0
- package/dist/templates/copilot/prompts/start.prompt.md +63 -0
- package/dist/templates/copilot/prompts/update-spec.prompt.md +358 -0
- package/dist/templates/cursor/agents/trellis-check.md +139 -0
- package/dist/templates/cursor/agents/trellis-implement.md +119 -0
- package/dist/templates/cursor/agents/trellis-research.md +147 -0
- package/dist/templates/cursor/commands/cursor2plus-setup.md +82 -0
- package/dist/templates/cursor/hooks.json +30 -0
- package/dist/templates/cursor/index.d.ts +19 -0
- package/dist/templates/cursor/index.d.ts.map +1 -0
- package/dist/templates/cursor/index.js +19 -0
- package/dist/templates/cursor/index.js.map +1 -0
- package/dist/templates/cursor/rules/trellis-triage.mdc +38 -0
- package/dist/templates/cursor/worktrees.json +11 -0
- package/dist/templates/droid/droids/trellis-check.md +107 -0
- package/dist/templates/droid/droids/trellis-implement.md +102 -0
- package/dist/templates/droid/droids/trellis-research.md +137 -0
- package/dist/templates/droid/index.d.ts +15 -0
- package/dist/templates/droid/index.d.ts.map +1 -0
- package/dist/templates/droid/index.js +15 -0
- package/dist/templates/droid/index.js.map +1 -0
- package/dist/templates/droid/settings.json +70 -0
- package/dist/templates/extract.d.ts +40 -0
- package/dist/templates/extract.d.ts.map +1 -0
- package/dist/templates/extract.js +106 -0
- package/dist/templates/extract.js.map +1 -0
- package/dist/templates/gemini/agents/trellis-check.md +107 -0
- package/dist/templates/gemini/agents/trellis-implement.md +102 -0
- package/dist/templates/gemini/agents/trellis-research.md +136 -0
- package/dist/templates/gemini/index.d.ts +13 -0
- package/dist/templates/gemini/index.d.ts.map +1 -0
- package/dist/templates/gemini/index.js +13 -0
- package/dist/templates/gemini/index.js.map +1 -0
- package/dist/templates/gemini/settings.json +28 -0
- package/dist/templates/kiro/agents/trellis-check.json +26 -0
- package/dist/templates/kiro/agents/trellis-implement.json +26 -0
- package/dist/templates/kiro/agents/trellis-research.json +30 -0
- package/dist/templates/kiro/index.d.ts +18 -0
- package/dist/templates/kiro/index.d.ts.map +1 -0
- package/dist/templates/kiro/index.js +18 -0
- package/dist/templates/kiro/index.js.map +1 -0
- package/dist/templates/markdown/agents.md +32 -0
- package/dist/templates/markdown/gitignore.txt +15 -0
- package/dist/templates/markdown/index.d.ts +30 -0
- package/dist/templates/markdown/index.d.ts.map +1 -0
- package/dist/templates/markdown/index.js +55 -0
- package/dist/templates/markdown/index.js.map +1 -0
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/index.md.txt +38 -0
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +59 -0
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/index.md.txt +39 -0
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +51 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +223 -0
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +259 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +633 -0
- package/dist/templates/markdown/spec/guides/cursor-context-injection-guide.md.txt +65 -0
- package/dist/templates/markdown/spec/guides/cursor-subagent-policy.md.txt +382 -0
- package/dist/templates/markdown/spec/guides/durable-learning-decision-guide.md.txt +76 -0
- package/dist/templates/markdown/spec/guides/index.md.txt +101 -0
- package/dist/templates/markdown/spec/guides/retrieval-daily-guide.md.txt +92 -0
- package/dist/templates/markdown/workspace-index.md +125 -0
- package/dist/templates/markdown/worktree.yaml.txt +58 -0
- package/dist/templates/opencode/agents/trellis-check.md +122 -0
- package/dist/templates/opencode/agents/trellis-implement.md +118 -0
- package/dist/templates/opencode/agents/trellis-research.md +145 -0
- package/dist/templates/opencode/lib/session-utils.js +667 -0
- package/dist/templates/opencode/lib/trellis-context.js +336 -0
- package/dist/templates/opencode/package.json +5 -0
- package/dist/templates/opencode/plugins/inject-subagent-context.js +495 -0
- package/dist/templates/opencode/plugins/inject-workflow-state.js +159 -0
- package/dist/templates/opencode/plugins/session-start.js +101 -0
- package/dist/templates/pi/agents/trellis-check.md +37 -0
- package/dist/templates/pi/agents/trellis-implement.md +42 -0
- package/dist/templates/pi/agents/trellis-research.md +25 -0
- package/dist/templates/pi/extensions/trellis/index.ts.txt +1600 -0
- package/dist/templates/pi/index.d.ts +5 -0
- package/dist/templates/pi/index.d.ts.map +1 -0
- package/dist/templates/pi/index.js +12 -0
- package/dist/templates/pi/index.js.map +1 -0
- package/dist/templates/pi/settings.json +12 -0
- package/dist/templates/qoder/agents/trellis-check.md +108 -0
- package/dist/templates/qoder/agents/trellis-implement.md +103 -0
- package/dist/templates/qoder/agents/trellis-research.md +137 -0
- package/dist/templates/qoder/index.d.ts +15 -0
- package/dist/templates/qoder/index.d.ts.map +1 -0
- package/dist/templates/qoder/index.js +15 -0
- package/dist/templates/qoder/index.js.map +1 -0
- package/dist/templates/qoder/settings.json +47 -0
- package/dist/templates/shared-hooks/index.d.ts +50 -0
- package/dist/templates/shared-hooks/index.d.ts.map +1 -0
- package/dist/templates/shared-hooks/index.js +92 -0
- package/dist/templates/shared-hooks/index.js.map +1 -0
- package/dist/templates/shared-hooks/inject-shell-session-context.py +183 -0
- package/dist/templates/shared-hooks/inject-subagent-context.py +774 -0
- package/dist/templates/shared-hooks/inject-workflow-state.py +366 -0
- package/dist/templates/shared-hooks/research-end-retrieval-pack.py +220 -0
- package/dist/templates/shared-hooks/session-start.py +873 -0
- package/dist/templates/template-utils.d.ts +28 -0
- package/dist/templates/template-utils.d.ts.map +1 -0
- package/dist/templates/template-utils.js +83 -0
- package/dist/templates/template-utils.js.map +1 -0
- package/dist/templates/trellis/config.yaml +132 -0
- package/dist/templates/trellis/gitignore.txt +39 -0
- package/dist/templates/trellis/index.d.ts +80 -0
- package/dist/templates/trellis/index.d.ts.map +1 -0
- package/dist/templates/trellis/index.js +171 -0
- package/dist/templates/trellis/index.js.map +1 -0
- package/dist/templates/trellis/local/README.md +59 -0
- package/dist/templates/trellis/local/config.local.json.example +6 -0
- package/dist/templates/trellis/local/index.d.ts +7 -0
- package/dist/templates/trellis/local/index.d.ts.map +1 -0
- package/dist/templates/trellis/local/index.js +14 -0
- package/dist/templates/trellis/local/index.js.map +1 -0
- package/dist/templates/trellis/local/patch_wpelc8.py +297 -0
- package/dist/templates/trellis/local/subagent-models.json.example +4 -0
- package/dist/templates/trellis/local/trellis-task-models.json.example +10 -0
- package/dist/templates/trellis/local/trellis-task-models.json5.example +45 -0
- package/dist/templates/trellis/local/trellis_task_models_config.py +200 -0
- package/dist/templates/trellis/scripts/__init__.py +5 -0
- package/dist/templates/trellis/scripts/add_session.py +547 -0
- package/dist/templates/trellis/scripts/build_context_pack.py +12 -0
- package/dist/templates/trellis/scripts/build_retrieval_pack.py +12 -0
- package/dist/templates/trellis/scripts/common/__init__.py +103 -0
- package/dist/templates/trellis/scripts/common/active_task.py +607 -0
- package/dist/templates/trellis/scripts/common/artifact_search.py +587 -0
- package/dist/templates/trellis/scripts/common/cli_adapter.py +811 -0
- package/dist/templates/trellis/scripts/common/cli_environment.py +155 -0
- package/dist/templates/trellis/scripts/common/codebase_retrieval_router.py +902 -0
- package/dist/templates/trellis/scripts/common/config.py +458 -0
- package/dist/templates/trellis/scripts/common/context_pack.py +371 -0
- package/dist/templates/trellis/scripts/common/developer.py +190 -0
- package/dist/templates/trellis/scripts/common/git.py +31 -0
- package/dist/templates/trellis/scripts/common/git_context.py +149 -0
- package/dist/templates/trellis/scripts/common/io.py +37 -0
- package/dist/templates/trellis/scripts/common/log.py +45 -0
- package/dist/templates/trellis/scripts/common/packages_context.py +239 -0
- package/dist/templates/trellis/scripts/common/parent_orchestration.py +691 -0
- package/dist/templates/trellis/scripts/common/paths.py +457 -0
- package/dist/templates/trellis/scripts/common/retrieval_adapter_metadata.py +889 -0
- package/dist/templates/trellis/scripts/common/retrieval_evidence.py +917 -0
- package/dist/templates/trellis/scripts/common/retrieval_pack.py +425 -0
- package/dist/templates/trellis/scripts/common/retrieval_pack_context.py +126 -0
- package/dist/templates/trellis/scripts/common/safe_commit.py +285 -0
- package/dist/templates/trellis/scripts/common/session_context.py +1159 -0
- package/dist/templates/trellis/scripts/common/session_memory.py +360 -0
- package/dist/templates/trellis/scripts/common/smart_search_evidence.py +479 -0
- package/dist/templates/trellis/scripts/common/smart_search_resolve.py +125 -0
- package/dist/templates/trellis/scripts/common/task_context.py +223 -0
- package/dist/templates/trellis/scripts/common/task_dashboard.py +140 -0
- package/dist/templates/trellis/scripts/common/task_gates.py +1735 -0
- package/dist/templates/trellis/scripts/common/task_map.py +586 -0
- package/dist/templates/trellis/scripts/common/task_queue.py +188 -0
- package/dist/templates/trellis/scripts/common/task_store.py +1533 -0
- package/dist/templates/trellis/scripts/common/task_utils.py +274 -0
- package/dist/templates/trellis/scripts/common/tasks.py +231 -0
- package/dist/templates/trellis/scripts/common/test_retrieval_arbitration.py +333 -0
- package/dist/templates/trellis/scripts/common/trellis_config.py +131 -0
- package/dist/templates/trellis/scripts/common/types.py +110 -0
- package/dist/templates/trellis/scripts/common/workflow_phase.py +212 -0
- package/dist/templates/trellis/scripts/get_context.py +17 -0
- package/dist/templates/trellis/scripts/get_developer.py +26 -0
- package/dist/templates/trellis/scripts/hooks/linear_sync.py +243 -0
- package/dist/templates/trellis/scripts/init_developer.py +51 -0
- package/dist/templates/trellis/scripts/route_codebase_retrieval.py +77 -0
- package/dist/templates/trellis/scripts/run_smart_search.py +12 -0
- package/dist/templates/trellis/scripts/search_artifacts.py +13 -0
- package/dist/templates/trellis/scripts/search_memory.py +12 -0
- package/dist/templates/trellis/scripts/task.py +851 -0
- package/dist/templates/trellis/tasks/.gitkeep +0 -0
- package/dist/templates/trellis/tasks/templates/release-execution/design.md +61 -0
- package/dist/templates/trellis/tasks/templates/release-execution/handoff-template.md +29 -0
- package/dist/templates/trellis/tasks/templates/release-execution/implement.md +29 -0
- package/dist/templates/trellis/tasks/templates/release-execution/prd.md +31 -0
- package/dist/templates/trellis/tasks/templates/release-readiness/design.md +50 -0
- package/dist/templates/trellis/tasks/templates/release-readiness/handoff-template.md +39 -0
- package/dist/templates/trellis/tasks/templates/release-readiness/implement.md +29 -0
- package/dist/templates/trellis/tasks/templates/release-readiness/prd.md +31 -0
- package/dist/templates/trellis/workflow.md +960 -0
- package/dist/types/ai-tools.d.ts +106 -0
- package/dist/types/ai-tools.d.ts.map +1 -0
- package/dist/types/ai-tools.js +294 -0
- package/dist/types/ai-tools.js.map +1 -0
- package/dist/types/migration.d.ts +125 -0
- package/dist/types/migration.d.ts.map +1 -0
- package/dist/types/migration.js +8 -0
- package/dist/types/migration.js.map +1 -0
- package/dist/utils/codebase-retrieval-router.d.ts +77 -0
- package/dist/utils/codebase-retrieval-router.d.ts.map +1 -0
- package/dist/utils/codebase-retrieval-router.js +767 -0
- package/dist/utils/codebase-retrieval-router.js.map +1 -0
- package/dist/utils/compare-versions.d.ts +12 -0
- package/dist/utils/compare-versions.d.ts.map +1 -0
- package/dist/utils/compare-versions.js +86 -0
- package/dist/utils/compare-versions.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 +36 -0
- package/dist/utils/file-writer.d.ts.map +1 -0
- package/dist/utils/file-writer.js +203 -0
- package/dist/utils/file-writer.js.map +1 -0
- 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/posix.d.ts +13 -0
- package/dist/utils/posix.d.ts.map +1 -0
- package/dist/utils/posix.js +15 -0
- package/dist/utils/posix.js.map +1 -0
- package/dist/utils/post-update-smoke.d.ts +7 -0
- package/dist/utils/post-update-smoke.d.ts.map +1 -0
- package/dist/utils/post-update-smoke.js +40 -0
- package/dist/utils/post-update-smoke.js.map +1 -0
- package/dist/utils/project-capabilities.d.ts +54 -0
- package/dist/utils/project-capabilities.d.ts.map +1 -0
- package/dist/utils/project-capabilities.js +515 -0
- package/dist/utils/project-capabilities.js.map +1 -0
- package/dist/utils/project-detector.d.ts +46 -0
- package/dist/utils/project-detector.d.ts.map +1 -0
- package/dist/utils/project-detector.js +666 -0
- package/dist/utils/project-detector.js.map +1 -0
- package/dist/utils/proxy.d.ts +25 -0
- package/dist/utils/proxy.d.ts.map +1 -0
- package/dist/utils/proxy.js +60 -0
- package/dist/utils/proxy.js.map +1 -0
- package/dist/utils/readiness.d.ts +20 -0
- package/dist/utils/readiness.d.ts.map +1 -0
- package/dist/utils/readiness.js +430 -0
- package/dist/utils/readiness.js.map +1 -0
- package/dist/utils/retrieval-execution-telemetry.d.ts +162 -0
- package/dist/utils/retrieval-execution-telemetry.d.ts.map +1 -0
- package/dist/utils/retrieval-execution-telemetry.js +288 -0
- package/dist/utils/retrieval-execution-telemetry.js.map +1 -0
- package/dist/utils/retrieval-result-ranking.d.ts +40 -0
- package/dist/utils/retrieval-result-ranking.d.ts.map +1 -0
- package/dist/utils/retrieval-result-ranking.js +162 -0
- package/dist/utils/retrieval-result-ranking.js.map +1 -0
- package/dist/utils/task-json.d.ts +13 -0
- package/dist/utils/task-json.d.ts.map +1 -0
- package/dist/utils/task-json.js +12 -0
- package/dist/utils/task-json.js.map +1 -0
- package/dist/utils/template-fetcher.d.ts +150 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -0
- package/dist/utils/template-fetcher.js +907 -0
- package/dist/utils/template-fetcher.js.map +1 -0
- package/dist/utils/template-hash.d.ts +123 -0
- package/dist/utils/template-hash.d.ts.map +1 -0
- package/dist/utils/template-hash.js +334 -0
- package/dist/utils/template-hash.js.map +1 -0
- package/dist/utils/uninstall-scrubbers.d.ts +66 -0
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -0
- package/dist/utils/uninstall-scrubbers.js +342 -0
- package/dist/utils/uninstall-scrubbers.js.map +1 -0
- package/dist/utils/update-rollout-report.d.ts +137 -0
- package/dist/utils/update-rollout-report.d.ts.map +1 -0
- package/dist/utils/update-rollout-report.js +108 -0
- package/dist/utils/update-rollout-report.js.map +1 -0
- 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 +137 -0
- package/scripts/postinstall.js +45 -0
- package/vendor/smart-search/LICENSE +21 -0
- package/vendor/smart-search/README.md +412 -0
- package/vendor/smart-search/README.zh-CN.md +430 -0
- package/vendor/smart-search/npm/bin/smart-search.js +63 -0
- package/vendor/smart-search/npm/scripts/postinstall.js +87 -0
- package/vendor/smart-search/npm/scripts/resolve-prerelease-version.js +108 -0
- package/vendor/smart-search/npm/scripts/set-package-version.js +35 -0
- package/vendor/smart-search/npm/scripts/sync-python-version.js +22 -0
- package/vendor/smart-search/npm/scripts/test-wrapper-repair.js +99 -0
- package/vendor/smart-search/npm/scripts/test.js +85 -0
- package/vendor/smart-search/package.json +42 -0
- package/vendor/smart-search/pyproject.toml +37 -0
- package/vendor/smart-search/skills/smart-search-cli/SKILL.md +387 -0
- package/vendor/smart-search/skills/smart-search-cli/agents/openai.yaml +3 -0
- package/vendor/smart-search/skills/smart-search-cli/examples/batch-search.md +98 -0
- package/vendor/smart-search/skills/smart-search-cli/examples/evidence-gathering.md +89 -0
- package/vendor/smart-search/skills/smart-search-cli/references/cli-contract.md +337 -0
- package/vendor/smart-search/src/smart_search/__init__.py +1 -0
- package/vendor/smart-search/src/smart_search/assets/skills/smart-search-cli/SKILL.md +387 -0
- package/vendor/smart-search/src/smart_search/assets/skills/smart-search-cli/agents/openai.yaml +3 -0
- package/vendor/smart-search/src/smart_search/assets/skills/smart-search-cli/examples/batch-search.md +98 -0
- package/vendor/smart-search/src/smart_search/assets/skills/smart-search-cli/examples/evidence-gathering.md +89 -0
- package/vendor/smart-search/src/smart_search/assets/skills/smart-search-cli/references/cli-contract.md +337 -0
- package/vendor/smart-search/src/smart_search/cli.py +2003 -0
- package/vendor/smart-search/src/smart_search/config.py +580 -0
- package/vendor/smart-search/src/smart_search/logger.py +43 -0
- package/vendor/smart-search/src/smart_search/providers/__init__.py +16 -0
- package/vendor/smart-search/src/smart_search/providers/base.py +41 -0
- package/vendor/smart-search/src/smart_search/providers/context7.py +141 -0
- package/vendor/smart-search/src/smart_search/providers/exa.py +206 -0
- package/vendor/smart-search/src/smart_search/providers/jina.py +136 -0
- package/vendor/smart-search/src/smart_search/providers/openai_compatible.py +370 -0
- package/vendor/smart-search/src/smart_search/providers/zhipu.py +143 -0
- package/vendor/smart-search/src/smart_search/service.py +2865 -0
- package/vendor/smart-search/src/smart_search/sources.py +429 -0
- package/vendor/smart-search/src/smart_search/utils.py +220 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
# Cursor subagent dispatch policy
|
|
2
|
+
|
|
3
|
+
> **Purpose:** Cursor-first guidance for when to spawn Trellis custom agents, which mode to use, and how model choice stays on the Cursor side.
|
|
4
|
+
|
|
5
|
+
**Abstract policy:** `model_policy: cursor-configured` — Trellis workflow, agents, skills, and hooks **must not** hardcode vendor model IDs in **committed** defaults (`gpt-*`, `claude-*`, etc.).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Quick reference: which entry point am I using?
|
|
10
|
+
|
|
11
|
+
The same `trellis-*` name can be reached via three entry points with **different model routing**. Identify yours before touching model config:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
How did I reach trellis-research / trellis-implement / trellis-check?
|
|
15
|
+
│
|
|
16
|
+
├─ Opened a Cursor chat and @mentioned or /slash-invoked it
|
|
17
|
+
│ → Agent session. Top-bar model decides. Cursor Settings for trellis-* are
|
|
18
|
+
│ largely ineffective under BYOK. Do NOT expect json5 + Method 2.5 here.
|
|
19
|
+
│
|
|
20
|
+
├─ Main session dispatched Task(subagent_type=trellis-*)
|
|
21
|
+
│ → Task dispatch. ONLY path where BYOK json5 + Method 2.5 applies.
|
|
22
|
+
│ Hook injects task context (<!-- trellis-hook-injected --> marker).
|
|
23
|
+
│
|
|
24
|
+
└─ Used the trellis-check SKILL in main session (no subagent spawn)
|
|
25
|
+
→ Skill form. Main-session model. Only trellis-check has both
|
|
26
|
+
Agent + Skill forms; research/implement are NOT skills.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If unsure: Task dispatch is the path Trellis workflow routes through; Agent session and Skill are manual/edge entry points.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Scene matrix
|
|
34
|
+
|
|
35
|
+
| Scene | Mechanism | Mode | Output / notes |
|
|
36
|
+
| --------------------------------------------------- | -------------------------------------------------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
37
|
+
| Code, history, or external research | `ttrellis-research` | Cursor **Agent** (writable) | `{TASK}/research/*.md`; smart-search-cli first, Cursor web fallback per skill |
|
|
38
|
+
| Implementation (after `start-execution --approved`) | `ttrellis-implement` | Agent | Code edits; no `git commit` in subagent |
|
|
39
|
+
| Post-implementation verification | `ttrellis-check` | Agent | Fixes + `verify.md` / gate hints; main session records gates when required |
|
|
40
|
+
| Parent/Child child worker | `generate-child-prompt --mode subagent` | **Parent Task** `trellis-implement` (default) | Child delivers `verify.md` + `handoff.md`; rare per-child model → **new writable Agent** session when user names that child |
|
|
41
|
+
| Architecture / deep review | `ttrellis-check` or documented inline deep review | Agent or main session | Model via dispatch strategy (Methods 1–2.5, 3–4 below) |
|
|
42
|
+
| PRD Grill (planning) | `trellis-micro-grill` contract **inside** `trellis-brainstorm` | **Not** a subagent | Single-question business follow-ups only |
|
|
43
|
+
| Small unclear ask (no task) | `trellis-micro-grill` skill | Main session | No task artifacts by default |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Model dispatch strategy (BYOK-aware)
|
|
48
|
+
|
|
49
|
+
> **Full technical analysis:** .trellis/spec/guides/cursor-subagent-reverse-engineering-report.md
|
|
50
|
+
|
|
51
|
+
### Environment detection
|
|
52
|
+
|
|
53
|
+
| Environment | Custom Task subagent model control | Explore subagent model control |
|
|
54
|
+
| --------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
|
|
55
|
+
| **Native Cursor API** | Frontmatter `model:` works (server-side routing) | Native model picker |
|
|
56
|
+
| **Cursor++ BYOK** | ❌ Frontmatter / Cursor Settings per-agent: not wired for `trellis-*`; **✅ Method 2.5** if applied | ✅ Independent model via Cursor++ panel (v0.0.11+) |
|
|
57
|
+
|
|
58
|
+
Under Cursor++ BYOK, **committed** agent frontmatter `model:` and **Cursor Settings** UI for `trellis-research` / `trellis-implement` / `trellis-check` do **not** populate `subagentModelOverrides` for those types (verified). Without **Method 2.5**, custom Task subagents **inherit** the parent session BYOK model. See `.trellis/spec/guides/cursor-subagent-reverse-engineering-report.md`.
|
|
59
|
+
|
|
60
|
+
### Dispatch strategy matrix
|
|
61
|
+
|
|
62
|
+
| Subagent type | Independent model? (BYOK) | Method | Fallback |
|
|
63
|
+
| ----------------------------------- | ------------------------------------ | ----------------------------------------------------------------------- | -------------------- |
|
|
64
|
+
| **Explore** (built-in) | ✅ Yes | Cursor++ panel (built-in override row) | Inherit parent model |
|
|
65
|
+
| **trellis-research** (custom Task) | ✅ Yes if **Method 2.5** map applied | **Method 2.5** (machine-local); else Method 1 or **Method 3** (manual) | Inherit parent model |
|
|
66
|
+
| **trellis-implement** (custom Task) | ✅ Yes if **Method 2.5** map applied | **Method 2.5**; else Method 1 or **Method 3** | Inherit parent model |
|
|
67
|
+
| **trellis-check** (custom Task) | ✅ Yes if **Method 2.5** map applied | **Method 2.5**; else Method 1 or **Method 3** | Inherit parent model |
|
|
68
|
+
| **generalPurpose** / **shell** / **best-of-n-runner** | ✅ Yes if map includes keys | **Method 2.5 / 2.6** JSON map | Inherit parent model |
|
|
69
|
+
|
|
70
|
+
### When to ask (and when not)
|
|
71
|
+
|
|
72
|
+
**Ask** when a subagent dispatch is imminent AND the dispatch method depends on user choice.
|
|
73
|
+
|
|
74
|
+
**Do not ask** for: planning-only turns, PRD Grill / micro-grill, inline edits in the main session, trellis-check **skill** without spawning the check agent, or any turn where no Trellis subagent will run this round.
|
|
75
|
+
|
|
76
|
+
Task mode (Lite / Full / Parent) does **not** by itself trigger the question — only **impending subagent dispatch** does.
|
|
77
|
+
|
|
78
|
+
### Method 1: Inherit (default, zero-friction)
|
|
79
|
+
|
|
80
|
+
- Custom Task subagents inherit the parent session model.
|
|
81
|
+
- No model question asked. No frontmatter edit.
|
|
82
|
+
- **Use when:** The parent model is appropriate for the subagent's work, or the user has said "用当前模型派发" / "inherit" / "跟上次一样" in this turn.
|
|
83
|
+
|
|
84
|
+
### Method 2: Explore subagent with custom model (read-only research)
|
|
85
|
+
|
|
86
|
+
When research is purely **codebase exploration** (no external web search, no file writing outside exploration scope), dispatch an **Explore subagent** instead of trellis-research. The Explore type gets independent model selection via the Cursor++ panel.
|
|
87
|
+
|
|
88
|
+
**Constraints:**
|
|
89
|
+
|
|
90
|
+
- Explore subagent is **read-only** — it cannot Write or Edit files.
|
|
91
|
+
- Cannot persist to {TASK}/research/\*.md directly — must return findings in chat, then main session persists.
|
|
92
|
+
- Cannot use smart-search-cli or external tools — limited to Glob, Grep, Read, and terminal.
|
|
93
|
+
|
|
94
|
+
**Use when:** Pure codebase search/understanding tasks where a different model adds value. Main session receives findings and writes the research files.
|
|
95
|
+
|
|
96
|
+
### Method 2.5: Cursor++ BYOK proxy map (publishable bundle)
|
|
97
|
+
|
|
98
|
+
**What it is:** A reversible patch to Cursor++ `extension.js` resolver `WPeLc8` that maps `subagentType` → BYOK catalog **slug** (`model-xxxxx`), evaluated **before** the inherit-parent branch. Verified 2026-06-18 (Cursor++ v0.0.11).
|
|
99
|
+
|
|
100
|
+
**Trellis ships (every `trellis init` / `trellis update`, strategy C):** `.trellis/local/cursor2plus/` — `patch_wpelc8.py`, `README.md`, `config.local.json.example`. Native Cursor API users can ignore this directory.
|
|
101
|
+
|
|
102
|
+
**Operator workflow (Cursor++ BYOK only):**
|
|
103
|
+
|
|
104
|
+
1. Fill **`~/.ccursor/trellis-task-models.json`** (user-wide) with `subagent_type` → slug from **`~/.ccursor/providers.json`** `id` fields.
|
|
105
|
+
2. Optionally override per repo: **`.trellis/local/subagent-models.json`** (project wins on same key).
|
|
106
|
+
3. If paths are not auto-detected: copy `config.local.json.example` → `config.local.json`, or run `python patch_wpelc8.py --bootstrap`, or set `TRELLIS_CCURSOR_HOME` / `TRELLIS_CURSOR2PLUS_EXTENSION`.
|
|
107
|
+
4. From `.trellis/local/cursor2plus/`: `python patch_wpelc8.py --print-map` → `python patch_wpelc8.py` → **Developer: Reload Window**.
|
|
108
|
+
5. **Verify:** `taskToolCall dispatching` → `resolvedModelId` matches slug.
|
|
109
|
+
|
|
110
|
+
**Revert:** `python patch_wpelc8.py --revert`; Reload Window. Re-run patch after Cursor / Cursor++ upgrades.
|
|
111
|
+
|
|
112
|
+
**Cursor++ sidebar / Cursor Settings:** Do **not** wire `trellis-*` BYOK routing; use JSON + patch.
|
|
113
|
+
|
|
114
|
+
### Method 2.6: Temporary Task types (advanced, BYOK)
|
|
115
|
+
|
|
116
|
+
For rare per-dispatch models on the Task channel without changing global slots:
|
|
117
|
+
|
|
118
|
+
1. Add `.cursor/agents/trellis-worker-<id>.md` (role prompt only; no committed `model:`).
|
|
119
|
+
2. Add `"trellis-worker-<id>": "model-xxxxx"` to **project** `.trellis/local/subagent-models.json`.
|
|
120
|
+
3. Re-run `patch_wpelc8.py`; dispatch `Task(subagent_type=trellis-worker-<id>)`.
|
|
121
|
+
4. Remove agent file and JSON key when done.
|
|
122
|
+
|
|
123
|
+
Parent/Child **default** does not use 2.6 — it uses `trellis-implement` from the user map. Per-child manual model → **new writable Agent** session (user-named exception).
|
|
124
|
+
|
|
125
|
+
### Method 3: Manual dispatch (different model for Task subagent)
|
|
126
|
+
|
|
127
|
+
When a custom Task subagent (`trellis-research`, `trellis-implement`, `trellis-check`) needs a **different model** than the parent under BYOK **and Method 2.5 is not available**:
|
|
128
|
+
|
|
129
|
+
1. **Main session prepares the dispatch prompt** — full text with:
|
|
130
|
+
- First line: Selected task: <path> (e.g. .trellis/tasks/06-17-my-task)
|
|
131
|
+
- Task context from inject-subagent-context.py content (PRD, design, implement docs)
|
|
132
|
+
- Agent role instructions (from the corresponding .cursor/agents/trellis-<role>.md)
|
|
133
|
+
- Specific work assignment
|
|
134
|
+
2. **Main session presents the prompt** to the user in a clearly marked block:
|
|
135
|
+
`── Manual Dispatch Prompt ──
|
|
136
|
+
Target model: <recommended model>
|
|
137
|
+
Agent role: trellis-<role>
|
|
138
|
+
── Prompt Start ──
|
|
139
|
+
<full prompt text>
|
|
140
|
+
── Prompt End ──`
|
|
141
|
+
3. **User actions:**
|
|
142
|
+
a. Open a new Cursor chat tab
|
|
143
|
+
b. Select the desired model in the model picker
|
|
144
|
+
c. Paste the prompt and send
|
|
145
|
+
d. Wait for completion
|
|
146
|
+
e. Copy relevant results back to the main session
|
|
147
|
+
|
|
148
|
+
4. **Main session** receives results from user and integrates them (persists research, reviews implementation, etc.)
|
|
149
|
+
|
|
150
|
+
**Use when:** The subagent work benefits significantly from a different model's strengths, and the manual overhead is justified.
|
|
151
|
+
|
|
152
|
+
### Method 4: Ephemeral model overlay (native API only)
|
|
153
|
+
|
|
154
|
+
Under **native Cursor API** (non-BYOK), frontmatter model: on agent files works for model routing. The original ephemeral overlay mechanism applies:
|
|
155
|
+
|
|
156
|
+
1. Before dispatch: edit .cursor/agents/trellis-<role>.md frontmatter — add model: <id>.
|
|
157
|
+
2. Dispatch the subagent.
|
|
158
|
+
3. After dispatch: restore frontmatter — remove model: line.
|
|
159
|
+
|
|
160
|
+
**Under BYOK: this method does NOT work.** Do not attempt ephemeral overlay in BYOK environments.
|
|
161
|
+
|
|
162
|
+
### Decision flow
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
Subagent dispatch needed
|
|
166
|
+
├─ Cursor++ BYOK + trellis-* needs fixed per-role models?
|
|
167
|
+
│ └─ Method 2.5 applied on this machine? → dispatch Task normally (map handles routing)
|
|
168
|
+
├─ Parent model appropriate for trellis-*? → Method 1 (inherit)
|
|
169
|
+
├─ Read-only codebase exploration only? → Method 2 (Explore + Cursor++ panel)
|
|
170
|
+
├─ Native Cursor API (non-BYOK)? → Method 4 (ephemeral frontmatter overlay)
|
|
171
|
+
└─ BYOK, no Method 2.5, different model required? → Method 3 (manual dispatch)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Main-session contract
|
|
175
|
+
|
|
176
|
+
When a dispatch is imminent:
|
|
177
|
+
|
|
178
|
+
1. Assess which method applies based on the decision flow.
|
|
179
|
+
2. If **Method 2.5** is active on this machine: dispatch `trellis-research` / `trellis-implement` / `trellis-check` via Task tool as usual — **do not** ask model each time; **do not** edit agent frontmatter.
|
|
180
|
+
3. If Method 1 (inherit): dispatch directly, no model question.
|
|
181
|
+
4. If Method 2 (Explore): set Explore model in Cursor++ panel if needed, dispatch `explore`.
|
|
182
|
+
5. If Method 3 (manual): prepare the full dispatch prompt, present to user.
|
|
183
|
+
6. If Method 4 (overlay, native API): ask model preference, apply overlay, dispatch, restore.
|
|
184
|
+
|
|
185
|
+
### Rules
|
|
186
|
+
|
|
187
|
+
- **Never** commit long-lived model: in shared Trellis templates or team repo defaults.
|
|
188
|
+
- **Never** inject model IDs via hooks (inject-subagent-context.py stays task-only).
|
|
189
|
+
- **Do not** attempt ephemeral model overlay under BYOK — it silently fails for routing (Method 4).
|
|
190
|
+
- **Do not** rely on Cursor Settings per `trellis-*` agent for BYOK routing — use Method 2.5 map or Method 3.
|
|
191
|
+
- Method 2.5 map lives **outside** committed Trellis templates (machine-local); never commit patched `extension.js` into the Trellis repo.
|
|
192
|
+
- **Do not** assume Explore subagent can replace trellis-research for all scenarios — it is read-only and cannot persist files.
|
|
193
|
+
- Workflow and skills **must not** hardcode vendor model IDs.
|
|
194
|
+
|
|
195
|
+
### Child worker
|
|
196
|
+
|
|
197
|
+
- **Default (BYOK + map):** Parent session dispatches **Task** `trellis-implement` with prompt from `generate-child-prompt --mode subagent`; model from user/project JSON map.
|
|
198
|
+
- **Exception:** User or `child-prompts.md` names a child for **separate writable Agent** → new chat, manual model, paste prompt (Method 3).
|
|
199
|
+
- **Native API:** ephemeral overlay on `trellis-implement` (Method 4) still valid.
|
|
200
|
+
|
|
201
|
+
### Technical note
|
|
202
|
+
|
|
203
|
+
Client layer still only builds override rows for built-in types such as `explore`. Cursor Settings entries for custom agent **names** do not reach the BYOK proxy override list for `trellis-*`. **Method 2.5** patches Cursor++ `WPeLc8` so `taskToolCall` sets `resolvedModelId` from a local `subagentType → slug` table before inherit-parent. **Method 3** bypasses Task routing (user picks model in a new chat).
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
## Trellis workflow: using per-agent models (BYOK + Method 2.5)
|
|
209
|
+
|
|
210
|
+
Operational contract between the Trellis task ladder and Cursor++ BYOK.
|
|
211
|
+
|
|
212
|
+
### Roles and who picks the model
|
|
213
|
+
|
|
214
|
+
| Layer | Picks model for… | Mechanism |
|
|
215
|
+
| ----- | ---------------- | --------- |
|
|
216
|
+
| **You (operator)** | Main orchestration chat | Cursor model picker (parent BYOK route) |
|
|
217
|
+
| **You (operator)** | `trellis-research` / `trellis-implement` / `trellis-check` (+ optional built-in Task types) | **Method 2.5 / 2.6** JSON maps + `.trellis/local/cursor2plus/patch_wpelc8.py` — **not** repo agent files |
|
|
218
|
+
| **You (operator)** | `explore` | Cursor++ panel |
|
|
219
|
+
| **Main Agent session** | When to spawn which agent | `workflow.md`, skills, scene matrix |
|
|
220
|
+
| **Hooks** | Never | `inject-subagent-context.py` — task context only |
|
|
221
|
+
|
|
222
|
+
### Normal Full / Lite task flow
|
|
223
|
+
|
|
224
|
+
1. **Select task** — `task.py select`; dispatch prompts include `Selected task: .trellis/tasks/<id>` when hooks need it.
|
|
225
|
+
2. **Main session model** — your choice for planning and orchestration.
|
|
226
|
+
3. **Research** — Task `subagent_type=trellis-research` → mapped research slug (Method 2.5).
|
|
227
|
+
4. **Implement** — after `start-execution --approved`, Task `trellis-implement` → mapped implement slug.
|
|
228
|
+
5. **Check** — Task `trellis-check` → mapped check slug.
|
|
229
|
+
6. **Gates / finish** — main session `record-gate`, `trellis-finish-work`.
|
|
230
|
+
|
|
231
|
+
No model field in dispatch prompt under Method 2.5. Task `model: fast` does **not** override custom types under BYOK.
|
|
232
|
+
|
|
233
|
+
### When to use which method
|
|
234
|
+
|
|
235
|
+
| Setup | Research | Implement | Check |
|
|
236
|
+
| ----- | -------- | --------- | ----- |
|
|
237
|
+
| Method 2.5 configured | `trellis-research` Task | `trellis-implement` Task | `trellis-check` Task |
|
|
238
|
+
| No map; one parent model | Task (inherit) | Task (inherit) | Task (inherit) |
|
|
239
|
+
| No map; different models | Method 3 | Method 3 | Method 3 |
|
|
240
|
+
| Repo read-only only | Method 2 Explore | — | — |
|
|
241
|
+
|
|
242
|
+
### Parent/Child
|
|
243
|
+
|
|
244
|
+
- **Default:** Parent dispatches **Task** `trellis-implement` (BYOK map applies to `subagentType`).
|
|
245
|
+
- **Rare per-child model:** new writable Agent session when user names that child — not a separate Trellis subagent type by default.
|
|
246
|
+
- Parent retains `review-child` / `integrate-child`; serial integration and worktree rules unchanged.
|
|
247
|
+
|
|
248
|
+
### Maintainer checklist (BYOK)
|
|
249
|
+
|
|
250
|
+
1. Resolve slugs in `~/.ccursor/providers.json` (or path in `config.local.json`).
|
|
251
|
+
2. Edit user and/or project JSON maps; include `generalPurpose`, `shell`, `best-of-n-runner` if you use those Task types.
|
|
252
|
+
3. Run `patch_wpelc8.py` from `.trellis/local/cursor2plus/` → Reload Window.
|
|
253
|
+
4. Re-apply after Cursor / Cursor++ upgrades.
|
|
254
|
+
|
|
255
|
+
### What stays in the Trellis repo
|
|
256
|
+
|
|
257
|
+
- `.cursor/agents/trellis-*.md` — no committed `model:`; link to this policy.
|
|
258
|
+
- Skills/workflow — **which** agent to spawn, not BYOK slugs.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Model and reuse (baseline)
|
|
263
|
+
|
|
264
|
+
- **Baseline:** `.cursor/agents/trellis-*.md` in repo have **no** `model:` → **inherit** parent Agent session model when no overlay is applied.
|
|
265
|
+
- **`preToolUse` (Task/Subagent):** injects task context only (`inject-subagent-context.py`). Never inject model IDs.
|
|
266
|
+
|
|
267
|
+
Optional team paste (comments only — not Cursor product settings):
|
|
268
|
+
|
|
269
|
+
```yaml
|
|
270
|
+
model_policy: cursor-configured
|
|
271
|
+
dispatch_model: inherit_or_method25_or_manual
|
|
272
|
+
child_worker:
|
|
273
|
+
mode: separate_writable_agent_session
|
|
274
|
+
explore_subagent:
|
|
275
|
+
model: independent # Cursor++ panel
|
|
276
|
+
trellis_task_subagents:
|
|
277
|
+
model: method_2_5_proxy_map # machine-local; not in git
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Hooks (Cursor)
|
|
283
|
+
|
|
284
|
+
| Event | Role |
|
|
285
|
+
| -------------------------- | ----------------------------------------------------------------------- |
|
|
286
|
+
| `sessionStart` | Task dashboard, phase index, next-action |
|
|
287
|
+
| `preToolUse` Task/Subagent | PRD/jsonl + `<!-- trellis-hook-injected -->` |
|
|
288
|
+
| `beforeShellExecution` | Short-lived ticket for `task.py select` / `selected` / `exit` in shells |
|
|
289
|
+
| `stop` | Optional `retrieval-pack-latest.json` when task has `research/` |
|
|
290
|
+
|
|
291
|
+
**Per-turn workflow-state on Cursor:** deferred — use `sessionStart` + `/trellis-continue` / `get_context.py --mode phase` instead of Claude `UserPromptSubmit` injection.
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Parent/Child alignment
|
|
296
|
+
|
|
297
|
+
- `generate-child-prompt --mode subagent` → Parent **Task** `trellis-implement` by default; inline mode remains the portable default for non-Cursor platforms.
|
|
298
|
+
- Child workers call `task.py set-child-state <parent> <child> <open|working|blocked|review> --evidence <ref>` — **no** session identity required for this command.
|
|
299
|
+
- Integration states (`accepted`, `integrating`, `integrated`, …) are **Parent-only** via `integrate-child` / `review-child`.
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Anti-patterns
|
|
304
|
+
|
|
305
|
+
- Do not use generic `generalPurpose` / default agents for Trellis research, implement, or check.
|
|
306
|
+
- Do not spawn `ttrellis-implement` from inside `ttrellis-implement` (recursion guard in agent defs).
|
|
307
|
+
- Do not spawn a subagent for PRD Grill — use brainstorm Phase B + micro-grill contract.
|
|
308
|
+
- Do not leave `model:` on agent files after dispatch (always restore).
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## Hook fallback (no selected-task pointer)
|
|
313
|
+
|
|
314
|
+
When `preToolUse` cannot resolve a selected task, the subagent should read **`Selected task:`** from the first line of its dispatch prompt, then load `implement.jsonl` / `check.jsonl`, `prd.md`, `design.md`, and `implement.md` manually. Trellis does **not** document or depend on Cursor `/multitask` for workflow orchestration.
|
|
315
|
+
|
|
316
|
+
## Cursor++ (BYOK) compatibility
|
|
317
|
+
|
|
318
|
+
[Cursor++](https://ccursor.cometix.dev) (ccursor by cometix) is a third-party Patch that intercepts Cursor API traffic via a local server (`127.0.0.1:39831`). It does **not** modify `.cursor/` files — it intercepts at the API/gRPC layer (`AgentService/RunSSE`, `AvailableModels`, etc.) and routes requests to BYOK providers.
|
|
319
|
+
|
|
320
|
+
### Confirmed compatibility (v0.0.11+, Cursor 3.7.27)
|
|
321
|
+
|
|
322
|
+
Verified by local testing on `D:\MyHarness` workspace:
|
|
323
|
+
|
|
324
|
+
| Trellis component | Status under Cursor++ | Evidence |
|
|
325
|
+
| --------------------- | --------------------- | ----------------------------------------------------------------------------------- |
|
|
326
|
+
| `.cursor/agents/` | Normal | Agent files not intercepted; `model:` frontmatter read by Cursor at spawn |
|
|
327
|
+
| `.cursor/hooks/` | Normal | Agent log `requestContextKeys` contains `hooksConfig` |
|
|
328
|
+
| `.cursor/skills/` | Normal | Agent log `requestContextKeys` contains `agentSkills` |
|
|
329
|
+
| `.cursor/mcp.json` | Normal | 4+ MCP servers, 300+ tools load normally |
|
|
330
|
+
| SubAgent write access | **Fixed in v0.0.11** | Prior versions defaulted SubAgent to readonly; `ttrellis-implement` now writes files |
|
|
331
|
+
|
|
332
|
+
**Minimum version: v0.0.11.** Earlier versions break `ttrellis-implement` due to SubAgent readonly bug.
|
|
333
|
+
|
|
334
|
+
### Model routing under BYOK (verified 2026-06-18)
|
|
335
|
+
|
|
336
|
+
- **Explore subagent:** Independent model selection works via Cursor++ panel (v0.0.11+). Cursor++ intercepts and routes the selected BYOK model for Explore-type requests.
|
|
337
|
+
- **Custom Task subagents:** Frontmatter `model:` and Cursor Settings per-agent names are **not** applied for `trellis-*` BYOK routing. Use **Method 2.5** or **Method 3**. **Explore** uses Cursor++ panel.
|
|
338
|
+
- The `model:` ID **must match** a model configured in Cursor++ provider settings (`~/.ccursor/providers.json`). If it doesn't match, the request will fail with a provider error.
|
|
339
|
+
- Cursor++ intercepts `AvailableModels`/`GetDefaultModel` - the model picker and model list are determined by BYOK provider config, not Cursor's official model catalog.
|
|
340
|
+
- Under Cursor++, "inherit" means the parent session's BYOK-routed model, which may differ from what the Cursor UI label suggests.
|
|
341
|
+
- **Full technical analysis:** `.trellis/spec/guides/cursor-subagent-reverse-engineering-report.md`
|
|
342
|
+
|
|
343
|
+
### Safety boundary
|
|
344
|
+
|
|
345
|
+
- Cursor++ patches Cursor internal modules at runtime. Strongest recovery: reinstall Cursor.
|
|
346
|
+
- API keys are stored in **plaintext** in `~/.ccursor/providers.json` — restrict file permissions (`chmod 600` / Windows ACL).
|
|
347
|
+
- Cursor++ stores rules in `~/.ccursor/knowledge-base.json`, independent of `.cursor/rules/` and Trellis rules.
|
|
348
|
+
- Version updates lag behind Cursor releases — after a Cursor update, BYOK routing may break until Cursor++ catches up. Trellis hooks/agents/skills survive the window (they don't depend on API routing).
|
|
349
|
+
- Do not mix Cursor++ BYOK sessions with Cursor official sessions — they cannot be continued across each other.
|
|
350
|
+
- Cursor++ may violate Cursor ToS; use at own risk. Not recommended for enterprise/compliance environments.
|
|
351
|
+
|
|
352
|
+
### Anti-patterns for Cursor++
|
|
353
|
+
|
|
354
|
+
- Do not use Cursor++ older than v0.0.11 with Trellis (SubAgent readonly bug).
|
|
355
|
+
- Do not assume Cursor official model IDs work under BYOK — use model IDs from your provider config.
|
|
356
|
+
- Do not mix Cursor++ and Cursor official sessions for the same conversation.
|
|
357
|
+
|
|
358
|
+
## Worktree template
|
|
359
|
+
|
|
360
|
+
When Parent/Child children use `isolation: git-worktree`, configure `.cursor/worktrees.json` and `task.py prepare-child-worktree` so each child edits in an isolated Git checkout:
|
|
361
|
+
|
|
362
|
+
```json
|
|
363
|
+
{
|
|
364
|
+
"setup-worktree": ["<install-command>"],
|
|
365
|
+
"setup-worktree-unix": ["<install-command>"],
|
|
366
|
+
"setup-worktree-windows": ["<install-command>"]
|
|
367
|
+
}
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
Replace `<install-command>` with the project's dependency install command (e.g. `pnpm install --frozen-lockfile`, `npm ci`, `pip install -e .`). Platform-specific keys (`setup-worktree-unix`, `setup-worktree-windows`) are optional; `setup-worktree` is the cross-platform fallback.
|
|
371
|
+
|
|
372
|
+
For multi-package workspaces, list all install commands needed after a fresh checkout.
|
|
373
|
+
|
|
374
|
+
## References
|
|
375
|
+
|
|
376
|
+
- `.cursor/agents/ttrellis-research.md`, `ttrellis-implement.md`, `ttrellis-check.md`
|
|
377
|
+
- `.cursor/agents/.trellis-model-overlay.local.md` — optional overlay audit stub (native API)
|
|
378
|
+
- Reference `patch_wpelc8.py` in task `06-18-byok-manual-dispatch-automation/research/` — copy locally; not a runtime git dependency
|
|
379
|
+
- `.trellis/workflow.md` — Task Ladder + Parent orchestration
|
|
380
|
+
- [Cursor Subagents](https://cursor.com/docs/subagents) — `model: inherit | <id>`
|
|
381
|
+
- [Cursor Multitask changelog](https://cursor.com/changelog/04-24-26) — `/multitask`, Worktrees, Multi-root Workspaces
|
|
382
|
+
- `.cursor/worktrees.json` — Cursor native worktree setup configuration
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Durable Learning Decision Guide
|
|
2
|
+
|
|
3
|
+
> **Purpose**: Decide whether a completed task should update `.trellis/spec/` or can archive with an explicit **no durable learning** line.
|
|
4
|
+
|
|
5
|
+
This guide is a **thinking checklist**. It does not replace code-spec files under `.trellis/spec/<layer>/`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Valid outcomes (archive `verify.md`)
|
|
10
|
+
|
|
11
|
+
Pick **one** grep-friendly line before `archive --check`:
|
|
12
|
+
|
|
13
|
+
| Outcome | Example line in `verify.md` |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| No reusable insight | `Durable learning decision: no durable learning` (or any line containing `no durable learning`) |
|
|
16
|
+
| Spec was updated | `Spec update evidence: .trellis/spec/Trellis/framework/index.md` |
|
|
17
|
+
| Insight already documented | `Learning artifact: .trellis/tasks/<task>/handoff.md` |
|
|
18
|
+
| Retrospective captured | `Learning artifact: .trellis/workspace/...` or `retrospective.md: <path>` |
|
|
19
|
+
|
|
20
|
+
Optional planning note (not sufficient alone): `Spec update needed: <reason>` — still record **spec update evidence** after `/trellis:update-spec`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## When to choose each outcome
|
|
25
|
+
|
|
26
|
+
### `no durable learning`
|
|
27
|
+
|
|
28
|
+
- Routine bugfix with no new contract or convention
|
|
29
|
+
- One-off config or content change
|
|
30
|
+
- Parent/child task where handoff adds no reusable workflow rule
|
|
31
|
+
|
|
32
|
+
### Spec update (`Spec update evidence: ...`)
|
|
33
|
+
|
|
34
|
+
- New or changed CLI/API signature or gate behavior
|
|
35
|
+
- Repeated parent review **changes** on the same class of mistake
|
|
36
|
+
- Workflow bug that should not recur (after `/trellis:break-loop` analysis)
|
|
37
|
+
- Cross-layer contract clarification
|
|
38
|
+
|
|
39
|
+
### Learning artifact
|
|
40
|
+
|
|
41
|
+
- `handoff.md` or a retrospective already contains the full insight
|
|
42
|
+
- Parent review notes in `verify.md` are enough for audit (link the path)
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Low-friction helpers
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Draft missing archive sections (append-only)
|
|
50
|
+
python ./.trellis/scripts/task.py prepare-archive-evidence .trellis/tasks/<task>
|
|
51
|
+
|
|
52
|
+
# Print spec-capture checklist (stdout only; does not edit specs)
|
|
53
|
+
python ./.trellis/scripts/task.py prepare-learning-scaffold .trellis/tasks/<task> --trigger "parent review changes"
|
|
54
|
+
|
|
55
|
+
# Parent review surfaces missing child learning lines
|
|
56
|
+
python ./.trellis/scripts/task.py review-child <parent> <child> --check
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Skills
|
|
62
|
+
|
|
63
|
+
- **`/trellis:update-spec`** — edit code-spec after reviewer confirmation
|
|
64
|
+
- **`/trellis:break-loop`** — deep bug analysis; often leads to spec updates
|
|
65
|
+
- **`/trellis:finish-work`** — archive after learning line is present in `verify.md`
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Parent reviewer triggers
|
|
70
|
+
|
|
71
|
+
When `review-child` reports **changes** or documents a workflow defect, the child should either:
|
|
72
|
+
|
|
73
|
+
1. Update spec and add `Spec update evidence: ...`, or
|
|
74
|
+
2. Document why the fix is one-off (`no durable learning`) with a short reason in `verify.md`.
|
|
75
|
+
|
|
76
|
+
Do **not** auto-write specs from scaffolding output — scaffolding only suggests existing index paths from task `package` / `scope`.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Thinking Guides
|
|
2
|
+
|
|
3
|
+
> **Purpose**: Expand your thinking to catch things you might not have considered.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Why Thinking Guides?
|
|
8
|
+
|
|
9
|
+
**Most bugs and tech debt come from "didn't think of that"**, not from lack of skill:
|
|
10
|
+
|
|
11
|
+
- Didn't think about what happens at layer boundaries → cross-layer bugs
|
|
12
|
+
- Didn't think about code patterns repeating → duplicated code everywhere
|
|
13
|
+
- Didn't think about edge cases → runtime errors
|
|
14
|
+
- Didn't think about future maintainers → unreadable code
|
|
15
|
+
|
|
16
|
+
These guides help you **ask the right questions before coding**.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Available Guides
|
|
21
|
+
|
|
22
|
+
| Guide | Purpose | When to Use |
|
|
23
|
+
|-------|---------|-------------|
|
|
24
|
+
| [Durable Learning Decision Guide](./durable-learning-decision-guide.md) | Choose no-learning vs spec update vs learning artifact before archive | Finishing a task, parent review, or after `/trellis:break-loop` |
|
|
25
|
+
| [Code Reuse Thinking Guide](./code-reuse-thinking-guide.md) | Identify patterns and reduce duplication | When you notice repeated patterns |
|
|
26
|
+
| [Cross-Layer Thinking Guide](./cross-layer-thinking-guide.md) | Think through data flow across layers | Features spanning multiple layers |
|
|
27
|
+
| [Retrieval daily guide](./retrieval-daily-guide.md) | rg / codegraph / fast-context / smart-search / pack / router | Planning, research, finish verification |
|
|
28
|
+
| [Cursor subagent policy](./cursor-subagent-policy.md) | Task tool scenes, Agent mode, `model_policy: cursor-configured`, Cursor++ | Parent/Child dispatch, research/implement/check, parallel execution |
|
|
29
|
+
| [Cursor context injection guide](./cursor-context-injection-guide.md) | Which Cursor channels reach the model (sessionStart bug, .cursor/rules, AGENTS.md) | "Agent ignored instructions" on Cursor, adding always-visible rules |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Quick Reference: Thinking Triggers
|
|
34
|
+
|
|
35
|
+
### When to Think About Cross-Layer Issues
|
|
36
|
+
|
|
37
|
+
- [ ] Feature touches 3+ layers (API, Service, Component, Database)
|
|
38
|
+
- [ ] Data format changes between layers
|
|
39
|
+
- [ ] Multiple consumers need the same data
|
|
40
|
+
- [ ] You're not sure where to put some logic
|
|
41
|
+
- [ ] You are adding an event kind, JSONL record, RPC payload, or config field
|
|
42
|
+
- [ ] UI / command code starts casting raw payload fields directly
|
|
43
|
+
|
|
44
|
+
→ Read [Cross-Layer Thinking Guide](./cross-layer-thinking-guide.md)
|
|
45
|
+
|
|
46
|
+
### When to Think About Code Reuse
|
|
47
|
+
|
|
48
|
+
- [ ] You're writing similar code to something that exists
|
|
49
|
+
- [ ] You see the same pattern repeated 3+ times
|
|
50
|
+
- [ ] You're adding a new field to multiple places
|
|
51
|
+
- [ ] **You're modifying any constant or config**
|
|
52
|
+
- [ ] **You're creating a new utility/helper function** ← Search first!
|
|
53
|
+
- [ ] Two files read the same untyped payload field with local casts
|
|
54
|
+
- [ ] Multiple branches update the same derived state from `kind` / `action`
|
|
55
|
+
|
|
56
|
+
→ Read [Code Reuse Thinking Guide](./code-reuse-thinking-guide.md)
|
|
57
|
+
|
|
58
|
+
### When Verifying AI Cross-Review Results
|
|
59
|
+
|
|
60
|
+
- [ ] Reviewer claims "user input can be malicious" → Check the actual data source (internal manifest? user config? external API?)
|
|
61
|
+
- [ ] Reviewer flags "missing validation" → Is the data from a trusted internal source?
|
|
62
|
+
- [ ] Reviewer says "behavior change" → Read the code comments — is it intentional design?
|
|
63
|
+
- [ ] Reviewer identifies a "bug" in test → Mentally delete the feature being tested — does the test still pass? If yes → tautological test
|
|
64
|
+
|
|
65
|
+
**Common AI reviewer false-positive patterns**:
|
|
66
|
+
1. **Trust boundary confusion**: Treating internal data (bundled JSON manifests) as untrusted external input
|
|
67
|
+
2. **Ignoring design comments**: Flagging intentional behavior documented in code comments as bugs
|
|
68
|
+
3. **Variable misreading**: Not tracing a variable to its actual definition (e.g., Map keyed by path vs name)
|
|
69
|
+
|
|
70
|
+
**Verification rule**: Every CRITICAL/WARNING finding must be verified against the actual code before prioritizing. Budget ~35% false-positive rate for AI reviews.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Pre-Modification Rule (CRITICAL)
|
|
75
|
+
|
|
76
|
+
> **Before changing ANY value, ALWAYS search first!**
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Search for the value you're about to change
|
|
80
|
+
grep -r "value_to_change" .
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
This single habit prevents most "forgot to update X" bugs.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## How to Use This Directory
|
|
88
|
+
|
|
89
|
+
1. **Before coding**: Skim the relevant thinking guide
|
|
90
|
+
2. **During coding**: If something feels repetitive or complex, check the guides
|
|
91
|
+
3. **After bugs**: Add new insights to the relevant guide (learn from mistakes)
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Contributing
|
|
96
|
+
|
|
97
|
+
Found a new "didn't think of that" moment? Add it to the relevant guide.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
**Core Principle**: 30 minutes of thinking saves 3 hours of debugging.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Retrieval daily guide (Cursor-first)
|
|
2
|
+
|
|
3
|
+
> **Purpose:** Choose the right tool; do not confuse **search** with **retrieval-pack scoring**.
|
|
4
|
+
|
|
5
|
+
## Web research rule (smart-search is mandatory first)
|
|
6
|
+
|
|
7
|
+
For **external / current / web facts**, **smart-search** (`run_smart_search.py`) is the **mandatory first choice**. Platform built-in web tools (Cursor `WebSearch` / `WebFetch`) are **downgrade-only**: use them solely when smart-search is unavailable (`doctor` not ok, `not_configured` / `failed`, or timeout). Never reach for built-in web search while smart-search is healthy. This rule overrides any general "use available tools" instinct — web retrieval strength is routed inside Trellis, not left to the platform default.
|
|
8
|
+
|
|
9
|
+
## Quick matrix
|
|
10
|
+
|
|
11
|
+
| Need | Tool | Notes |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| Exact string / path / log line | **rg** (Grep) | Fast literal match in repo |
|
|
14
|
+
| Symbol, callers, edit blast radius | **codegraph** MCP | Structure-first for caller/trap/extension intents |
|
|
15
|
+
| Unknown keywords, semantic discovery | **@codebase** (Cursor) or **fast-context** (other platforms) | Cursor: platform-native semantics; others: fast-context MCP |
|
|
16
|
+
| External / current facts | **smart-search-cli** | **Mandatory first** — built-in web tools are downgrade-only (see rule above) |
|
|
17
|
+
| Trellis durable docs | **artifact-search** | `search_artifacts.py` |
|
|
18
|
+
| Past sessions | **session-memory** | Historical; verify against tasks/spec |
|
|
19
|
+
| Intent hint for code questions | **router** | `route_codebase_retrieval.py --platform <name>` — suggests only |
|
|
20
|
+
| Score collected evidence | **retrieval-pack** | `get_context.py --mode retrieval-pack` — does **not** search |
|
|
21
|
+
|
|
22
|
+
## Platform differences
|
|
23
|
+
|
|
24
|
+
The router is platform-adaptive since v2. Different platforms have different built-in capabilities, and the router adjusts its route suggestions accordingly.
|
|
25
|
+
|
|
26
|
+
| Capability | Cursor | Claude Code / Codex | Generic |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| Semantic search | Platform-native (`@codebase`) | **fast-context** MCP | **fast-context** MCP |
|
|
29
|
+
| Exact search | Platform-native Grep | rg | rg |
|
|
30
|
+
| Structural search | **codegraph** MCP | **codegraph** MCP | **codegraph** MCP |
|
|
31
|
+
| LSP | Platform-native | N/A | N/A |
|
|
32
|
+
|
|
33
|
+
**Key implication on Cursor**: Do NOT use `fast-context` for semantic search — Cursor's own `@codebase` and built-in search are higher quality (custom embedding model trained on agent sessions). The router outputs `platform-semantic` routes with `platformNative: true` instead of `semantic-fast-context` on cursor.
|
|
34
|
+
|
|
35
|
+
## Token economy signals
|
|
36
|
+
|
|
37
|
+
Each route in the router output includes a `tokenEconomy` label:
|
|
38
|
+
|
|
39
|
+
| Label | Meaning | Typical tools |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| `high` | Low token cost per correct answer (~80-200 tokens) | codegraph callers/search, platform-semantic |
|
|
42
|
+
| `medium` | Moderate token cost (~200-700 tokens) | codegraph explore, smart rg, fast-context |
|
|
43
|
+
| `low` | High token cost per answer (~3000+ tokens) | naive rg (unconstrained output) |
|
|
44
|
+
|
|
45
|
+
When `projectFileCount > 2000`, the router promotes structural (codegraph) routes ahead of rg routes for better token efficiency on large codebases.
|
|
46
|
+
|
|
47
|
+
## Commands
|
|
48
|
+
|
|
49
|
+
```powershell
|
|
50
|
+
python ./.trellis/scripts/search_artifacts.py --query "<topic>" --json
|
|
51
|
+
python ./.trellis/scripts/search_memory.py --query "<topic>" --json
|
|
52
|
+
python ./.trellis/scripts/run_smart_search.py "<question>" --intent deep-research --json
|
|
53
|
+
python ./.trellis/scripts/route_codebase_retrieval.py "<question>" --json --platform cursor
|
|
54
|
+
python ./.trellis/scripts/get_context.py --mode retrieval-pack --json --input evidence.json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## smart-search fallback
|
|
58
|
+
|
|
59
|
+
When `smart-search doctor` is not ok or `run_smart_search.py` status is `not_configured` / `failed` (including **search timeout**), use **Cursor WebSearch/WebFetch**, then persist to `{TASK}/research/` with `source: cursor-web-fallback` in frontmatter. See `smart-search-cli` skill §4b.
|
|
60
|
+
|
|
61
|
+
**CLI discovery (Cursor):** optional env/config override → PATH → `node_modules/.bin` / package script → optional harness wrappers (`Trellis/packages/cli/bin/smart-search.js`). No `.trellis/.runtime/` cache.
|
|
62
|
+
|
|
63
|
+
## Router vs execution
|
|
64
|
+
|
|
65
|
+
`route_codebase_retrieval.py` returns **intent + route suggestions** only. **codebase-evidence** is **candidate** until confirmed by Read/Git/tests.
|
|
66
|
+
|
|
67
|
+
### Structural-first routing (v2)
|
|
68
|
+
|
|
69
|
+
For structural intents (caller-chain, trap-package-disambiguation, extension-shared-symbol), the router now suggests **codegraph before rg**. This reflects codegraph's superior token economy for structural queries (~80-150 tokens/answer vs rg's ~3557 for naive grep). The agent should still use rg to fill gaps codegraph misses (dynamic dispatch, string-based callsites).
|
|
70
|
+
|
|
71
|
+
### Semantic routing by platform
|
|
72
|
+
|
|
73
|
+
On **Cursor**: the router outputs `platform-semantic` routes (with `platformNative: true`) instead of `semantic-fast-context`. The agent should use `@codebase` or Cursor's built-in agent search — these are higher quality than fast-context's Devstral model.
|
|
74
|
+
|
|
75
|
+
On **other platforms**: the router outputs `semantic-fast-context` routes as before. When the envelope fallback mentions no corroborated candidates, invoke `fast_context_search` after exact rg fails.
|
|
76
|
+
|
|
77
|
+
### Semantic dual metrics (openclaw / eval)
|
|
78
|
+
|
|
79
|
+
| Metric | Meaning |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `semantic_plan_rate` | Share of queries whose routing envelope lists a semantic route |
|
|
82
|
+
| `semantic_exec_rate` | Share of queries with ≥1 semantic search tool call |
|
|
83
|
+
|
|
84
|
+
Plan-level presence does not imply execution-level use (see parent research `06-19` OQ-1 双轨).
|
|
85
|
+
|
|
86
|
+
## retrieval-pack
|
|
87
|
+
|
|
88
|
+
Default `get_context.py --json` returns **retrievalGuide** only. Run `--mode retrieval-pack` after you have collected evidence JSON / smart-search manifests under `{TASK}/research/smart-search/`.
|
|
89
|
+
|
|
90
|
+
## Adapters (optimization #9)
|
|
91
|
+
|
|
92
|
+
Core: rg, task-artifacts, artifact-search, source-git-tests. Enhance: codegraph (structural-first), platform-semantic (Cursor) / fast-context (other), smart-search, session-memory. Placeholders: mcp/browser/network envelope only.
|