@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,387 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: smart-search-cli
|
|
3
|
+
description: CLI-first web research and source retrieval through the local smart-search command. Use when Codex needs current web search, source-backed fact checking, URL fetching, site mapping, official/API/documentation search, or reproducible search evidence via Skill + CLI instead of MCP tools.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Smart Search CLI
|
|
7
|
+
|
|
8
|
+
Use the local `smart-search` command as the default execution layer for web research. The skill decides routing; the CLI performs the work; JSON or saved files provide evidence.
|
|
9
|
+
|
|
10
|
+
## Default workflow
|
|
11
|
+
|
|
12
|
+
1. Run `smart-search doctor --format json` when configuration or availability is uncertain.
|
|
13
|
+
2. If `doctor` reports missing configuration, use `smart-search setup` or `smart-search config set KEY VALUE` when the user provides keys. Do not ask users to edit global environment variables by default.
|
|
14
|
+
3. If OpenAI-compatible `search` hangs or times out after `doctor` succeeds, run `smart-search diagnose openai-compatible --format markdown` and use its summary/recommendation. This one command tests quick chat plus real search-shape `stream=false` and `stream=true`.
|
|
15
|
+
4. If `doctor` returns `ok: true`, use only `smart-search` CLI subcommands for web research. Do not call Codex native web search in the same task.
|
|
16
|
+
5. For every research question, run a bilingual `smart-search search` pair: one Chinese-source query and one English-source query. Save both JSON outputs.
|
|
17
|
+
6. Use `smart-search search` as the first hop for realtime, broad exploration, community signals, multi-source summaries, and routing metadata. The default broad pass is bilingual, not Zhipu-backed.
|
|
18
|
+
7. Do not use `smart-search zhipu-search` in normal workflows. Zhipu is deprecated and not used by default routing because quota may be unavailable; the command remains only for manual legacy compatibility when the user explicitly asks for it.
|
|
19
|
+
8. Use `smart-search context7-library` / `context7-docs` first for library, SDK, API, framework, or documentation intent.
|
|
20
|
+
9. Use `smart-search exa-search` for official domains, papers, product pages, trusted sites, and low-noise discovery. Do not treat Exa as the universal second hop for every high-risk or verification task.
|
|
21
|
+
10. Use `smart-search search --extra-sources N` for Tavily/Firecrawl horizontal candidates, and `smart-search fetch` for page text that can support final claims.
|
|
22
|
+
11. Use `smart-search exa-similar` when the user gives a representative URL and wants related pages or neighboring sources.
|
|
23
|
+
12. Use `smart-search fetch` when the user gives a URL or a claim depends on page content.
|
|
24
|
+
13. Use `smart-search map` when a documentation site or domain structure matters.
|
|
25
|
+
14. To change the main-search model, use `smart-search config set OPENAI_COMPATIBLE_MODEL ...`.
|
|
26
|
+
15. For current-news, policy, finance, health, or other high-risk facts, do not answer from broad `search.content` alone. Use the bilingual search pair plus intent-specific sources: Context7 for docs/API, Exa for official/trusted domains or papers, then `fetch` key pages and summarize only what fetched text supports.
|
|
27
|
+
16. Use `smart-search research "question" --format json` when the user wants the CLI to run live Deep Research end to end instead of only planning. It executes plan -> discover -> fetch/read -> gap check -> evidence-only synthesis.
|
|
28
|
+
17. Preserve command lines and source URLs in your answer. Prefer citing fetched pages or `primary_sources`; treat `extra_sources` as follow-up candidates, not verified evidence for generated claims.
|
|
29
|
+
|
|
30
|
+
## Deep Research Mode
|
|
31
|
+
|
|
32
|
+
Use Deep Research Mode when the user asks for `深度搜索`, `深度调研`, `深入搜索`, `deep search`, `deep research`, multi-source verification, cross-checking, serious review, or selection/comparison research. This is a capability-based orchestration workflow. The live executor route calls `smart-search research "question" --format json` and lets the CLI execute plan -> discover -> fetch/read -> gap check -> evidence-only synthesis. `smart-search research` builds the `research_plan` internally before discovery; there is no separate offline planner command. This does not change default `smart-search search`, and it does not depend on an MCP session.
|
|
33
|
+
|
|
34
|
+
Do not select a fixed topic recipe. Market, product, technical docs, news, policy, claim-checking, and URL-first prompts are examples of user language, not schema modes. Decide from intent dimensions and capability needs.
|
|
35
|
+
|
|
36
|
+
When `smart-search research` runs, it builds an internal `research_plan` as its planning artifact before discovery. The plan uses this shape:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mode": "deep_research",
|
|
41
|
+
"query_mode": "research",
|
|
42
|
+
"question": "user question",
|
|
43
|
+
"trigger_source": "explicit_cli",
|
|
44
|
+
"difficulty": "standard|high",
|
|
45
|
+
"intent_signals": {
|
|
46
|
+
"recency_requirement": "none|recent|current",
|
|
47
|
+
"docs_api_intent": false,
|
|
48
|
+
"locale_domain_scope": "global|china|known_domains|mixed",
|
|
49
|
+
"known_url": false,
|
|
50
|
+
"source_authority_need": "normal|high",
|
|
51
|
+
"claim_risk": "low|medium|high",
|
|
52
|
+
"cross_validation_need": "normal|high",
|
|
53
|
+
"breadth_depth_budget": "quick|standard|deep"
|
|
54
|
+
},
|
|
55
|
+
"decomposition": [
|
|
56
|
+
{
|
|
57
|
+
"id": "sq1",
|
|
58
|
+
"question": "subquestion",
|
|
59
|
+
"reason": "why this subquestion is needed",
|
|
60
|
+
"required_capabilities": ["broad_discovery"]
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"capability_plan": [
|
|
64
|
+
{
|
|
65
|
+
"capability": "broad_discovery",
|
|
66
|
+
"tools": ["search"],
|
|
67
|
+
"reason": "Find the initial answer shape and candidate sources."
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"preflight": {
|
|
71
|
+
"tool": "doctor",
|
|
72
|
+
"command": "smart-search doctor --format json",
|
|
73
|
+
"when": "configuration or availability is uncertain",
|
|
74
|
+
"executed_during_planning": false
|
|
75
|
+
},
|
|
76
|
+
"evidence_policy": "fetch_before_claim",
|
|
77
|
+
"steps": [
|
|
78
|
+
{
|
|
79
|
+
"id": "s1",
|
|
80
|
+
"subquestion_id": "sq1",
|
|
81
|
+
"tool": "search",
|
|
82
|
+
"purpose": "broad discovery",
|
|
83
|
+
"command": "smart-search search \"query\" --validation balanced --extra-sources 1 --format json --output <resolved_evidence_dir>\\YYYYMMDD-HHMM-topic\\01-search.json",
|
|
84
|
+
"output_path": "<resolved_evidence_dir>\\YYYYMMDD-HHMM-topic\\01-search.json"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"gap_check": {
|
|
88
|
+
"required": true,
|
|
89
|
+
"rule": "fetch missing evidence for key claims or downgrade them to unverified candidates"
|
|
90
|
+
},
|
|
91
|
+
"final_answer_policy": "cite fetched evidence, list unverified candidates, and include key commands",
|
|
92
|
+
"usage_boundary": {
|
|
93
|
+
"search": "smart-search search runs live fast/broad search immediately.",
|
|
94
|
+
"execution": "smart-search research executes the listed steps with existing CLI building blocks, then performs gap_check."
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Allowed `steps[].tool` values are `search`, `exa-search`, `exa-similar`, `context7-library`, `context7-docs`, `fetch`, and `map`. Each step must include `id`, `subquestion_id`, `purpose`, `command`, and `output_path`. `doctor` is preflight and must not appear in `steps[]`. Simple plans may have one subquestion; complex plans should use 2-6 subquestions unless the user explicitly asks for exhaustive coverage.
|
|
100
|
+
|
|
101
|
+
Capability boundaries:
|
|
102
|
+
|
|
103
|
+
- `search`: broad bilingual discovery and synthesis through `main_search`; inspect `routing_decision`, `provider_attempts`, `fallback_used`, and `source_warning`. Do not treat broad answers as proof for high-risk claims.
|
|
104
|
+
- `zhipu-search`: deprecated manual compatibility command. Do not include it in default plans or workflows unless the user explicitly requests Zhipu.
|
|
105
|
+
- `context7-library` / `context7-docs`: library, SDK, API, framework, and documentation intent. Prefer Context7 before Exa for docs/API questions.
|
|
106
|
+
- `exa-search`: low-noise discovery for official domains, papers, product pages, known domains, and trusted pages. Use it when that boundary fits; it is not the default second hop for every verification task.
|
|
107
|
+
- `exa-similar`: adjacent-source discovery when a known reliable URL is available.
|
|
108
|
+
- `search --extra-sources N`: Tavily/Firecrawl horizontal candidate collection for breadth. Treat those candidates as discovery until fetched.
|
|
109
|
+
- `fetch`: page-content evidence. Use it before claim-level conclusions.
|
|
110
|
+
- `map`: site structure exploration before many fetches from one site; not claim evidence by itself.
|
|
111
|
+
|
|
112
|
+
Default Deep Research orchestration:
|
|
113
|
+
|
|
114
|
+
1. Run `smart-search doctor --format json` as preflight when configuration is uncertain.
|
|
115
|
+
2. `smart-search research` builds an internal `research_plan` with `intent_signals`, `decomposition`, and `capability_plan`; do not choose fixed topic recipe ids.
|
|
116
|
+
3. Execute planned bilingual `search --validation balanced --extra-sources 1..3` steps for Chinese-source and English-source broad discovery, then read routing metadata.
|
|
117
|
+
4. Execute planned `exa-search`, `exa-similar`, `context7-library`, `context7-docs`, or `map` only when their capability boundary matches the intent.
|
|
118
|
+
5. Use `fetch` on key URLs before making claim-level statements.
|
|
119
|
+
6. Run `gap_check`: if an important claim lacks fetched evidence, fetch another source or mark the claim/source as unverified.
|
|
120
|
+
|
|
121
|
+
Default evidence policy is `fetch_before_claim`: key claims in the final answer must be supported by fetched page text. Treat `primary_sources` and `extra_sources` as discovery candidates until the relevant URL has been fetched. The final answer should include fetched evidence, unverified candidate sources, and key commands used.
|
|
122
|
+
|
|
123
|
+
Live Deep Research executor:
|
|
124
|
+
|
|
125
|
+
- `smart-search research QUERY [--budget quick|standard|deep] [--evidence-dir PATH] [--fallback auto|off] [--format json|markdown|content] [--output PATH]` runs the staged workflow directly.
|
|
126
|
+
- Default `--fallback auto` permits same-capability fallback inside selected routes. Use `--fallback off` only for debugging or deterministic provider checks.
|
|
127
|
+
- Research output includes `final_answer`, `citations`, `evidence_items`, `gap_check`, `provider_attempts`, `fallback_used`, `degraded`, `route_policy_version`, and `evidence_dir`.
|
|
128
|
+
- The synthesis is evidence-only. It may cite fetched/read evidence, but it must not cite unfetched discovery candidates as proof.
|
|
129
|
+
- If providers are exhausted or evidence cannot close, return the degraded gaps rather than inventing missing claims.
|
|
130
|
+
|
|
131
|
+
Research provider advantage routing:
|
|
132
|
+
|
|
133
|
+
- Context7: library/API/framework docs resolution and docs retrieval.
|
|
134
|
+
- Exa: official domains, papers, product/company pages, date/domain-filtered low-noise discovery, and adjacent-source discovery.
|
|
135
|
+
- Tavily: broad bilingual source discovery and site map.
|
|
136
|
+
- Jina: known public URL, PDF, and arXiv clean extraction; ReaderLM-v2 requires `JINA_API_KEY`.
|
|
137
|
+
- Firecrawl: robust fetch fallback, JS-heavy/dynamic pages, browser-like extraction, OCR/PDF/structured extraction.
|
|
138
|
+
|
|
139
|
+
Safe research overrides are `SMART_SEARCH_RESEARCH_PREFERRED_PROVIDERS` and `SMART_SEARCH_RESEARCH_DISABLED_PROVIDERS`. They may reorder or disable providers only within capabilities the provider already supports; they must not move a provider across capability boundaries.
|
|
140
|
+
|
|
141
|
+
Deep Research test coverage for workflow maintenance should verify trigger phrases, normal search requests that should not trigger Deep Research, required `research_plan` fields, allowed tool whitelist, bilingual search steps, `fetch_before_claim`, evidence output paths, capability boundaries, `intent_signals`, `capability_plan`, `gap_check`, simple current prompts such as `深度搜索一下最近的比特币行情`, docs/API prompts, claim-verification prompts, user-provided URL fetch-first flows, missing-provider failure guidance, and the rule that fixed topic recipe ids are not required schema. When real keys are available and the user expects live checks, a small live pass can run `doctor`, two broad `search` commands (Chinese and English), one `exa-search`, and one `fetch`.
|
|
142
|
+
|
|
143
|
+
Standard user-facing Deep Research tests:
|
|
144
|
+
|
|
145
|
+
```powershell
|
|
146
|
+
smart-search research "深度搜索一下最近的比特币行情" --format json
|
|
147
|
+
smart-search research "OpenAI Responses API web_search 和 Chat Completions 联网搜索怎么选" --budget deep --format json
|
|
148
|
+
smart-search research "帮我核验这个说法是真是假:某某工具已经完全替代 Tavily 做 AI 搜索了" --format json
|
|
149
|
+
smart-search research "https://example.com/source" --format json
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Provider Routing
|
|
153
|
+
|
|
154
|
+
- `search` builds `main_search` from `OPENAI_COMPATIBLE_API_URL` + `OPENAI_COMPATIBLE_API_KEY`, which registers OpenAI-compatible Chat Completions.
|
|
155
|
+
- `search` is the default first hop for broad exploration, current synthesis, and routing metadata.
|
|
156
|
+
- OpenAI-compatible relays/gateways use Chat Completions `/chat/completions` through `OPENAI_COMPATIBLE_*`.
|
|
157
|
+
- `OPENAI_COMPATIBLE_STREAM=true` or `search --stream` sets `stream=true` only for OpenAI-compatible `search` and provider-side `fetch`; it is a relay compatibility switch and does not affect URL description or source ranking.
|
|
158
|
+
- Legacy `SMART_SEARCH_API_URL`, `SMART_SEARCH_API_KEY`, `SMART_SEARCH_API_MODE`, and `SMART_SEARCH_MODEL` are unsupported config keys.
|
|
159
|
+
- The standard minimum profile requires one configured provider in each of `main_search`, `docs_search`, and fetch capability. Missing required capabilities should be treated as a hard configuration failure.
|
|
160
|
+
- Jina Reader is `web_fetch` only, not a general search provider. `JINA_API_KEY` is required before Jina satisfies the standard minimum profile; anonymous `r.jina.ai` is explicit/experimental fetch behavior.
|
|
161
|
+
- `search` exposes `--validation fast|balanced|strict`, `--fallback auto|off`, and `--providers auto|CSV`. Default validation is `balanced`; fallback only happens within the same capability.
|
|
162
|
+
- `search --validation strict` uses the same bilingual web_search policy as balanced mode when source discovery providers are configured. Strict queries without primary, docs, fetch, or explicit source evidence can still fail with `evidence_error`; use `--extra-sources N`, source-first commands such as `exa-search`, or `fetch` when citable evidence is required.
|
|
163
|
+
- `search` runs bilingual web_search source discovery through Tavily / Firecrawl when configured. Zhipu is deprecated from default routing and is not the first hop for Chinese/current/domestic searches.
|
|
164
|
+
- Docs/API/library routing stays explicit keyword intent-based and should prefer Context7 first. Exa is for official-domain or low-noise supplemental discovery, not the default docs answer route.
|
|
165
|
+
- `search` calls Tavily and/or Firecrawl for `extra_sources` only when `--extra-sources N` is greater than 0.
|
|
166
|
+
- With both Tavily and Firecrawl configured, `search --extra-sources N` splits extra sources between them, with Tavily receiving about 60% and Firecrawl the rest.
|
|
167
|
+
- Search JSON separates `primary_sources`, `extra_sources`, and backward-compatible merged `sources`.
|
|
168
|
+
- `primary_sources` are extracted from the primary model answer. `extra_sources` are parallel Tavily / Firecrawl candidates and are not automatically used to verify `content`.
|
|
169
|
+
- `fetch` tries Tavily first, then Jina with `JINA_API_KEY`, then Firecrawl.
|
|
170
|
+
- `map` currently uses Tavily only.
|
|
171
|
+
- `exa-search` and `exa-similar` use Exa only.
|
|
172
|
+
- `context7-library` and `context7-docs` use Context7 only.
|
|
173
|
+
- `zhipu-search` uses Zhipu only and is retained as a deprecated manual compatibility command.
|
|
174
|
+
- `zhipu-search` corresponds to the official Zhipu Web Search API route, using `ZHIPU_API_URL` plus `ZHIPU_SEARCH_ENGINE`; it is not Zhipu Chat Completions `tools=[web_search]`, not Search Agent, and not the MCP Server.
|
|
175
|
+
- `ZHIPU_SEARCH_ENGINE` defaults to `search_std`. Official Web Search API service values include `search_std`, `search_pro`, `search_pro_sogou`, and `search_pro_quark`; keep custom values possible because official services may change.
|
|
176
|
+
- `TAVILY_API_URL` only affects Tavily REST calls and does not proxy Zhipu. Zhipu defaults to `https://open.bigmodel.cn/api` unless `ZHIPU_API_URL` is set.
|
|
177
|
+
- `doctor` tests configured main-search providers, Exa, Tavily, Jina, Zhipu Web Search API, and Context7 connectivity. Firecrawl status currently means the key is configured, not that a live Firecrawl request succeeded.
|
|
178
|
+
|
|
179
|
+
## Evidence Files
|
|
180
|
+
|
|
181
|
+
For multi-source research, use `smart-search config path --format json` and save evidence under `resolved_evidence_dir` with a descriptive timestamped filename. Stdout should still contain the full JSON result unless markdown or content output was explicitly chosen for human reading.
|
|
182
|
+
|
|
183
|
+
For claim-level evidence, prefer this order:
|
|
184
|
+
|
|
185
|
+
1. Discover candidate URLs with a bilingual source-focused `search` pair, Context7 for docs/API/library topics, or `exa-search` for official/trusted domains and papers.
|
|
186
|
+
2. Fetch the exact pages that matter.
|
|
187
|
+
3. Use broad `search` only as synthesis or discovery, and mark claims as unverified when only `extra_sources` are available.
|
|
188
|
+
|
|
189
|
+
Prefer shorter, source-directed commands:
|
|
190
|
+
|
|
191
|
+
```powershell
|
|
192
|
+
$Config = smart-search config path --format json | ConvertFrom-Json
|
|
193
|
+
$EvidenceDir = Join-Path $Config.resolved_evidence_dir "YYYYMMDD-HHMM-topic"
|
|
194
|
+
New-Item -ItemType Directory -Force -Path $EvidenceDir | Out-Null
|
|
195
|
+
smart-search exa-search "Reuters Iran Hormuz latest" --num-results 5 --include-highlights --format json --output (Join-Path $EvidenceDir "01-iran-hormuz-exa.json")
|
|
196
|
+
smart-search exa-search "OpenAI Responses API documentation" --include-domains platform.openai.com developers.openai.com --num-results 5 --include-text --format json
|
|
197
|
+
smart-search exa-similar "https://example.com/source" --num-results 5 --format json
|
|
198
|
+
smart-search fetch "https://example.com/source" --format json --output (Join-Path $EvidenceDir "02-source-fetch.json")
|
|
199
|
+
smart-search search "Iran Hormuz latest military talks" --extra-sources 3 --timeout 90 --format json --output (Join-Path $EvidenceDir "03-iran-hormuz-search.json")
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Workflows
|
|
203
|
+
|
|
204
|
+
Use these recipes when the user asks for evidence, citations, repeated searches, or an archiveable research trail. Keep `--output` paths under one timestamped evidence directory so later answers can cite saved files and rerun commands.
|
|
205
|
+
|
|
206
|
+
### Lightweight Evidence Gathering
|
|
207
|
+
|
|
208
|
+
Use this when the user needs a source-backed answer but not full Deep Research.
|
|
209
|
+
|
|
210
|
+
1. Create an evidence directory under the system-aware Smart Search evidence root reported by `smart-search config path --format json`.
|
|
211
|
+
2. Discover candidate sources by intent:
|
|
212
|
+
- Always run the bilingual broad pair:
|
|
213
|
+
- `smart-search search "中文搜索,优先检索中文来源,并回答原问题:query" --validation balanced --extra-sources 1 --format json --output "$EvidenceDir\01-search-zh.json"`
|
|
214
|
+
- `smart-search search "Search English-language sources and answer the original question: query" --validation balanced --extra-sources 1 --format json --output "$EvidenceDir\02-search-en.json"`
|
|
215
|
+
- Docs/API/library/framework intent: `smart-search context7-library "library" "topic" --format json --output "$EvidenceDir\01-context7-library.json"`
|
|
216
|
+
- Official domains, papers, product pages, or trusted sites: `smart-search exa-search "query" --num-results 5 --include-text --include-highlights --format json --output "$EvidenceDir\01-exa.json"`
|
|
217
|
+
3. Fetch the one or two URLs that support the answer: `smart-search fetch "https://example.com/source" --format markdown --output "$EvidenceDir\02-fetch-source.md"`.
|
|
218
|
+
4. Write the final answer only from fetched page text or clearly label unfetched items as candidates.
|
|
219
|
+
|
|
220
|
+
See `examples/evidence-gathering.md` for a complete command sequence.
|
|
221
|
+
|
|
222
|
+
### Deep Research With Citations
|
|
223
|
+
|
|
224
|
+
Use this when the user asks for deep research, cross-checking, serious comparison, or a multi-source investigation.
|
|
225
|
+
|
|
226
|
+
1. Run the live executor: `smart-search research "question" --budget standard --format json --output "$EvidenceDir\research.json"`.
|
|
227
|
+
2. Read `research_plan`, `evidence_items`, `gap_check`, `citations`, and `final_answer`.
|
|
228
|
+
3. If `degraded` is true or `gap_check` lists open gaps, either fetch more sources or report the remaining gaps instead of filling them from memory.
|
|
229
|
+
|
|
230
|
+
Keep the detailed Deep Research rules in `## Deep Research Mode`; this workflow is only the quick selection recipe.
|
|
231
|
+
|
|
232
|
+
### Batch Search And Fetch
|
|
233
|
+
|
|
234
|
+
Use this when the user gives multiple queries, companies, tools, documents, URLs, or comparison targets.
|
|
235
|
+
|
|
236
|
+
1. Create one evidence directory for the batch.
|
|
237
|
+
2. Run one CLI command per query or URL, using numbered outputs such as `01-search-react.json`, `02-search-vue.json`, or `03-fetch-docs.md`.
|
|
238
|
+
3. Keep each command narrow:
|
|
239
|
+
- Use the bilingual `search --extra-sources 1` pair for quick broad discovery.
|
|
240
|
+
- Use `context7-library` / `context7-docs` for docs/API/library items.
|
|
241
|
+
- Use `exa-search` for official/trusted-domain discovery.
|
|
242
|
+
- Use `fetch` for each URL that will support a claim.
|
|
243
|
+
4. After the loop, summarize across saved files. Cite fetched files or fetched URLs for claims; list unfetched discovery results only as candidates.
|
|
244
|
+
|
|
245
|
+
See `examples/batch-search.md` for PowerShell loop patterns and output naming.
|
|
246
|
+
|
|
247
|
+
### Evidence Archiving
|
|
248
|
+
|
|
249
|
+
Use this when the user wants work that can be inspected, resumed, or audited.
|
|
250
|
+
|
|
251
|
+
1. Save every non-trivial command with `--output`.
|
|
252
|
+
2. Use stable numbered filenames: `01-search.json`, `02-exa-official.json`, `03-fetch-source.md`, `04-summary.json`.
|
|
253
|
+
3. Keep command lines in the final answer or notes.
|
|
254
|
+
4. Prefer JSON for machine-readable discovery and Markdown for fetched page text intended for reading.
|
|
255
|
+
5. Do not treat `primary_sources` or `extra_sources` as claim proof until the relevant URL has been fetched.
|
|
256
|
+
|
|
257
|
+
## Local wrapper contract
|
|
258
|
+
|
|
259
|
+
- Expect `smart-search` to resolve from the user's PATH.
|
|
260
|
+
- This bundled skill is maintained with the `smartsearch` repository.
|
|
261
|
+
- Prefer the CLI's local config file managed by `smart-search setup` / `smart-search config`.
|
|
262
|
+
- Environment variables remain supported for CI and advanced users, and override the local config file.
|
|
263
|
+
- Do not ask users to set Windows global API-key environment variables by default.
|
|
264
|
+
- If keys are changed with `smart-search config set`, rerun the CLI; no Codex restart is needed.
|
|
265
|
+
- If PATH is changed, a new terminal or Codex restart may be needed.
|
|
266
|
+
- On Windows, the default local config file is `%LOCALAPPDATA%\smart-search\config.json`. Linux/macOS default to `~/.config/smart-search/config.json`.
|
|
267
|
+
- In sandboxed runtimes (Codex CLI, containers, CI) where the default config directory is not writable or must be pinned, set `SMART_SEARCH_CONFIG_DIR` to an absolute writable path. The CLI uses it for both config and relative logs and skips default-directory selection.
|
|
268
|
+
- The default research evidence root is `evidence` under the active config directory. Set `SMART_SEARCH_EVIDENCE_DIR` only when evidence needs a separate absolute location; `config path` and `doctor` report both the configured and resolved evidence paths.
|
|
269
|
+
- Earlier Windows source defaults used `~\.config\smart-search\config.json`, while some installs were already pinned to `%LOCALAPPDATA%\smart-search` through `SMART_SEARCH_CONFIG_DIR`. If the new default file is missing but the old file exists, `doctor` reports `legacy_windows_home` as the active source so upgrades do not silently lose configuration. It also reports the override value and whether it matches the current default.
|
|
270
|
+
- Use `smart-search doctor --format json` for agent/script parsing and `smart-search doctor --format markdown` when a human wants a detailed diagnostic report.
|
|
271
|
+
- If `smart-search doctor --format json` returns `ok: false`, follow the `error` field's guidance (`smart-search setup` or `smart-search config set KEY VALUE`); do not silently fall back to native web search.
|
|
272
|
+
- Use `smart-search diagnose openai-compatible --format markdown` when `doctor` succeeds but OpenAI-compatible `search` appears to hang, returns a timeout, or differs between `--stream` and `--no-stream`. It is the beginner-facing one-command report for upstream/relay compatibility.
|
|
273
|
+
- Interactive `smart-search setup` is a language-selecting grouped wizard with arrow-key / Space / Enter provider selection. It guides users through required `main_search`, `docs_search`, and fetch capability. Zhipu is no longer recommended or prompted in the default setup flow.
|
|
274
|
+
- The setup wizard prints beginner filling examples for official-service and relay/pooled-endpoint minimum profiles. Keep that guidance on stderr so stdout remains parseable JSON/Markdown/content output.
|
|
275
|
+
- Use `smart-search setup --lang en` for an English wizard and `smart-search setup --advanced` only when low-level config keys must be shown one by one.
|
|
276
|
+
- Use `smart-search config set ZHIPU_API_KEY ...` only for explicit legacy Zhipu compatibility. Do not set it up for default workflows.
|
|
277
|
+
- Use `smart-search setup --non-interactive --jina-key "key"` to let Jina satisfy `web_fetch`; `JINA_RESPOND_WITH=readerlm-v2` also requires `JINA_API_KEY`.
|
|
278
|
+
- Use `smart-search setup --non-interactive --openai-compatible-stream true` only when an OpenAI-compatible relay benefits from SSE streaming for long requests. Default is true.
|
|
279
|
+
- Interactive setup does not ask for Zhipu by default.
|
|
280
|
+
- Use `TAVILY_API_URL=https://<host>/api/tavily` for Tavily Hikari / pooled endpoints. Root host and `/mcp` inputs are normalized by setup; `/mcp` itself is not the REST base Smart Search should call.
|
|
281
|
+
- `TAVILY_TIMEOUT_SECONDS` controls the Tavily `doctor` connectivity timeout and defaults to `30`. Raise it for slower pooled/community Tavily endpoints before judging the provider unhealthy.
|
|
282
|
+
- Use `FIRECRAWL_API_URL` only for a Firecrawl-compatible REST base. Official default is `https://api.firecrawl.dev/v2`.
|
|
283
|
+
|
|
284
|
+
## Command Patterns
|
|
285
|
+
|
|
286
|
+
```powershell
|
|
287
|
+
smart-search search "query" --extra-sources 5 --timeout 90 --format json --output result.json
|
|
288
|
+
smart-search search "query" --stream --format json
|
|
289
|
+
smart-search diagnose openai-compatible --format markdown
|
|
290
|
+
smart-search search "query" --platform "Reuters" --model "model-id" --extra-sources 3 --timeout 90 --format json
|
|
291
|
+
smart-search search "nba战报" --format content
|
|
292
|
+
smart-search search "query" --validation strict --fallback auto --providers auto --format json
|
|
293
|
+
smart-search exa-search "query" --num-results 5 --search-type neural --include-text --include-highlights --include-domains docs.example.com developer.mozilla.org --format json
|
|
294
|
+
smart-search exa-similar "https://example.com/article" --num-results 5 --format json
|
|
295
|
+
smart-search context7-library "react" "hooks" --format json
|
|
296
|
+
smart-search context7-docs "/facebook/react" "useEffect cleanup" --format json
|
|
297
|
+
smart-search fetch "https://example.com" --format markdown --output page.md
|
|
298
|
+
smart-search map "https://docs.example.com" --instructions "Find API reference pages" --max-depth 1 --max-breadth 20 --limit 50 --format json
|
|
299
|
+
smart-search research "OpenAI Responses API web_search vs Chat Completions search" --budget deep --fallback auto --format json
|
|
300
|
+
smart-search rs "https://example.com/source" --fallback off --format markdown
|
|
301
|
+
smart-search setup
|
|
302
|
+
smart-search setup --lang en
|
|
303
|
+
smart-search setup --advanced
|
|
304
|
+
smart-search setup --non-interactive --openai-compatible-stream true
|
|
305
|
+
smart-search setup --non-interactive --tavily-api-url "https://api.tavily.com" --tavily-key "key"
|
|
306
|
+
smart-search --version
|
|
307
|
+
smart-search config path --format json
|
|
308
|
+
smart-search config list --format json
|
|
309
|
+
smart-search config list --format markdown
|
|
310
|
+
smart-search config set OPENAI_COMPATIBLE_API_URL "https://api.openai.com/v1" --format json
|
|
311
|
+
smart-search config set OPENAI_COMPATIBLE_API_KEY "key" --format json
|
|
312
|
+
smart-search config set OPENAI_COMPATIBLE_MODEL "model-id" --format json
|
|
313
|
+
smart-search config set OPENAI_COMPATIBLE_STREAM "true" --format json
|
|
314
|
+
smart-search config set EXA_API_KEY "key" --format json
|
|
315
|
+
smart-search config set CONTEXT7_API_KEY "key" --format json
|
|
316
|
+
smart-search config set ZHIPU_API_KEY "key" --format json
|
|
317
|
+
smart-search config set ZHIPU_API_URL "https://open.bigmodel.cn/api" --format json
|
|
318
|
+
smart-search config set ZHIPU_SEARCH_ENGINE "search_pro" --format json
|
|
319
|
+
smart-search config set TAVILY_API_URL "https://api.tavily.com" --format json
|
|
320
|
+
smart-search config set TAVILY_TIMEOUT_SECONDS "45" --format json
|
|
321
|
+
smart-search config set FIRECRAWL_API_URL "https://api.firecrawl.dev/v2" --format json
|
|
322
|
+
smart-search doctor --format json
|
|
323
|
+
smart-search doctor --format markdown
|
|
324
|
+
smart-search diagnose openai-compatible --format markdown
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Short aliases are supported for interactive use:
|
|
328
|
+
|
|
329
|
+
```powershell
|
|
330
|
+
smart-search --v
|
|
331
|
+
smart-search s "query" --format json
|
|
332
|
+
smart-search s "nba战报" --format content
|
|
333
|
+
smart-search rs "query" --format json
|
|
334
|
+
smart-search f "https://example.com" --format markdown
|
|
335
|
+
smart-search exa "OpenAI Responses API documentation" --format json
|
|
336
|
+
smart-search z "today China AI news" --format json
|
|
337
|
+
smart-search c7 "react" "hooks" --format json
|
|
338
|
+
smart-search c7docs "/facebook/react" "useEffect cleanup" --format json
|
|
339
|
+
smart-search cfg ls --format json
|
|
340
|
+
smart-search d --format markdown
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
## Timeout Retry Policy
|
|
344
|
+
|
|
345
|
+
When `smart-search search` returns `ok: false` with `error_type: "network_error"` and an error message containing `timed out`, treat it as a retryable CLI-level timeout, not as a terminal research failure.
|
|
346
|
+
|
|
347
|
+
1. Retry up to 3 total attempts with `--timeout 180`, waiting about 5 seconds between attempts.
|
|
348
|
+
2. Use `--format json` and `--output PATH` for each attempt; after each attempt, inspect the saved JSON and stop on the first `"ok": true`.
|
|
349
|
+
3. Use `--extra-sources 1` during retry attempts to keep Tavily/Firecrawl overhead small.
|
|
350
|
+
4. Always use the CLI's `--timeout` option. Do not wrap `smart-search` in a shell-level `timeout` command because shell termination can prevent the CLI from writing structured failure JSON.
|
|
351
|
+
5. Do not rely on `SMART_SEARCH_RETRY_*` settings for this path; search command timeouts are surfaced by the CLI result contract and should be handled by the agent workflow.
|
|
352
|
+
6. If all attempts time out, fall back to source-first evidence:
|
|
353
|
+
- Run `exa-search` with the original query for broad source discovery.
|
|
354
|
+
- Run `exa-search --include-domains` when likely official domains are known.
|
|
355
|
+
- `fetch` the top 1-2 relevant URLs before making claim-level statements.
|
|
356
|
+
- Mark the final answer as `source_mode: "fallback"` or clearly state that the answer was assembled from fetched sources rather than generated by `search`.
|
|
357
|
+
|
|
358
|
+
Example retry flow:
|
|
359
|
+
|
|
360
|
+
```powershell
|
|
361
|
+
smart-search search "query" --validation balanced --extra-sources 1 --timeout 180 --format json --output result-attempt-1.json
|
|
362
|
+
smart-search search "query" --validation balanced --extra-sources 1 --timeout 180 --format json --output result-attempt-2.json
|
|
363
|
+
smart-search search "query" --validation balanced --extra-sources 1 --timeout 180 --format json --output result-attempt-3.json
|
|
364
|
+
smart-search exa-search "query" --num-results 5 --include-text --format json --output exa.json
|
|
365
|
+
smart-search exa-search "query" --include-domains platform.openai.com developers.openai.com --num-results 3 --include-text --format json --output exa-official.json
|
|
366
|
+
smart-search fetch "https://example.com/source" --format markdown --output fetch.md
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
## Guardrails
|
|
370
|
+
|
|
371
|
+
- Prefer JSON for agent parsing and markdown for fetched page text intended for reading.
|
|
372
|
+
- Use `--output` for multi-source work, long pages, or anything the answer may need to cite later.
|
|
373
|
+
- Keep `--extra-sources` small (`1` to `3`) unless the user asks for broad coverage. Large values are slower and can add noise.
|
|
374
|
+
- Do not cite `extra_sources` as proof for a sentence in `content`; fetch the URL first or cite it only as a candidate source.
|
|
375
|
+
- Prefer `exa-search --include-domains` for official documentation when likely domains are known.
|
|
376
|
+
- Do not expose API keys. Treat `doctor` output as safe only because it is expected to mask secrets.
|
|
377
|
+
- In this CLI-first workflow, native `web_search` is disabled unless the user explicitly configures another approved route.
|
|
378
|
+
- If `doctor` or a command fails, report the failure and recovery steps; do not silently fall back to another web-search route.
|
|
379
|
+
- If the user explicitly asks to bypass smart-search, state that another approved web-search route must be configured first.
|
|
380
|
+
- Do not use legacy MCP tool names in prompts, notes, or generated instructions for this workflow.
|
|
381
|
+
- Treat key rotation as a hard safety gate when previous key values were pasted into chat or logs.
|
|
382
|
+
- For provider architecture maintenance, verify the distributable contract rather than the current developer machine's wrappers or local config. Keep fallback same-capability only.
|
|
383
|
+
- `main_search` is OpenAI-compatible Chat Completions configured through `OPENAI_COMPATIBLE_*`. Do not fabricate a second `main_search` provider or reuse another capability's URL/key as a `main_search` fallback.
|
|
384
|
+
|
|
385
|
+
## Supporting Reference
|
|
386
|
+
|
|
387
|
+
Read `references/cli-contract.md` when you need command details, output fields, exit codes, or contract expectations.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Batch Search Workflow
|
|
2
|
+
|
|
3
|
+
Use this workflow when the user gives multiple queries, tools, companies, documents, URLs, or comparison targets. The model should run repeated narrow CLI commands, save each output, and summarize only after reading the saved files.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Keep batch work reproducible:
|
|
8
|
+
|
|
9
|
+
- one evidence directory
|
|
10
|
+
- one numbered output per query or URL
|
|
11
|
+
- narrow commands selected by intent
|
|
12
|
+
- fetched evidence before claim-level conclusions
|
|
13
|
+
|
|
14
|
+
## Batch Query Discovery
|
|
15
|
+
|
|
16
|
+
Use a PowerShell loop when several independent queries need the same source-discovery treatment.
|
|
17
|
+
|
|
18
|
+
```powershell
|
|
19
|
+
$Config = smart-search config path --format json | ConvertFrom-Json
|
|
20
|
+
$EvidenceDir = Join-Path $Config.resolved_evidence_dir "YYYYMMDD-HHMM-batch"
|
|
21
|
+
New-Item -ItemType Directory -Force -Path $EvidenceDir | Out-Null
|
|
22
|
+
|
|
23
|
+
$Queries = @(
|
|
24
|
+
@{ Name = "openai"; Query = "OpenAI Responses API web_search documentation" },
|
|
25
|
+
@{ Name = "anthropic"; Query = "Anthropic tool use web search documentation" },
|
|
26
|
+
@{ Name = "google"; Query = "Google Gemini grounding search documentation" }
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
$Index = 1
|
|
30
|
+
foreach ($Item in $Queries) {
|
|
31
|
+
$OutputPath = Join-Path $EvidenceDir ("{0:D2}-exa-{1}.json" -f $Index, $Item["Name"])
|
|
32
|
+
smart-search exa-search ($Item["Query"]) --num-results 5 --include-text --include-highlights --format json --output $OutputPath
|
|
33
|
+
$Index += 1
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
After the loop:
|
|
38
|
+
|
|
39
|
+
1. Read each saved JSON.
|
|
40
|
+
2. Select the top URL or official result for each item.
|
|
41
|
+
3. Fetch pages that will support final claims.
|
|
42
|
+
4. Compare only what fetched text supports.
|
|
43
|
+
|
|
44
|
+
## Batch Fetch Known URLs
|
|
45
|
+
|
|
46
|
+
Use this when the user already provided URLs or when discovery produced a short URL list.
|
|
47
|
+
|
|
48
|
+
```powershell
|
|
49
|
+
$Config = smart-search config path --format json | ConvertFrom-Json
|
|
50
|
+
$EvidenceDir = Join-Path $Config.resolved_evidence_dir "YYYYMMDD-HHMM-url-batch"
|
|
51
|
+
New-Item -ItemType Directory -Force -Path $EvidenceDir | Out-Null
|
|
52
|
+
|
|
53
|
+
$Urls = @(
|
|
54
|
+
"https://example.com/source-a",
|
|
55
|
+
"https://example.com/source-b",
|
|
56
|
+
"https://example.com/source-c"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
$Index = 1
|
|
60
|
+
foreach ($Url in $Urls) {
|
|
61
|
+
$OutputPath = Join-Path $EvidenceDir ("{0:D2}-fetch.md" -f $Index)
|
|
62
|
+
smart-search fetch $Url --format markdown --output $OutputPath
|
|
63
|
+
$Index += 1
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Mixed Intent Batches
|
|
68
|
+
|
|
69
|
+
Pick the command per item instead of forcing every item through one provider:
|
|
70
|
+
|
|
71
|
+
- Broad/current/domestic item: run the bilingual `smart-search search` pair and save separate `*-zh.json` / `*-en.json` outputs.
|
|
72
|
+
- Docs/API/library item: `smart-search context7-library "library" "topic" --format json --output PATH`, then `context7-docs` for the selected library id.
|
|
73
|
+
- Official/trusted-domain item: `smart-search exa-search "query" --num-results 5 --include-text --include-highlights --format json --output PATH`
|
|
74
|
+
- Broad first pass: `smart-search search "中文搜索,优先检索中文来源,并回答原问题:query" --validation balanced --extra-sources 1 --format json --output PATH`, then `smart-search search "Search English-language sources and answer the original question: query" --validation balanced --extra-sources 1 --format json --output PATH`
|
|
75
|
+
- Known URL: `smart-search fetch "https://example.com/source" --format markdown --output PATH`
|
|
76
|
+
|
|
77
|
+
## Summarize The Batch
|
|
78
|
+
|
|
79
|
+
Before answering:
|
|
80
|
+
|
|
81
|
+
1. Confirm every claim maps to a fetched file or fetched URL.
|
|
82
|
+
2. Separate fetched evidence from unfetched candidates.
|
|
83
|
+
3. Keep per-item gaps visible instead of smoothing them over.
|
|
84
|
+
4. Include the evidence directory and important command lines when useful.
|
|
85
|
+
|
|
86
|
+
Use a compact summary table:
|
|
87
|
+
|
|
88
|
+
| Item | Evidence file | Supported conclusion | Gaps |
|
|
89
|
+
| --- | --- | --- | --- |
|
|
90
|
+
| item-a | `03-fetch-a.md` | supported claim | none |
|
|
91
|
+
| item-b | `04-fetch-b.md` | partial claim | missing official source |
|
|
92
|
+
|
|
93
|
+
## Guardrails
|
|
94
|
+
|
|
95
|
+
- Keep `--extra-sources` small, usually `1` to `3`.
|
|
96
|
+
- Do not use broad `search.content` as proof for a comparison row.
|
|
97
|
+
- Do not cite `extra_sources` as verified evidence until fetched.
|
|
98
|
+
- Do not silently switch to native web search if a command fails; report the failure and recovery path.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Evidence Gathering Workflow
|
|
2
|
+
|
|
3
|
+
Use this workflow when the user wants a source-backed answer, citation trail, or audit-friendly notes, but does not need full `smart-search research`.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Answer from fetched evidence, not from broad generated `search.content` alone.
|
|
8
|
+
|
|
9
|
+
## When To Use
|
|
10
|
+
|
|
11
|
+
- The user asks for sources, citations, verification, or a defensible short answer.
|
|
12
|
+
- The task can be answered with a small number of discovery and fetch commands.
|
|
13
|
+
- Full Deep Research would be more work than the user asked for.
|
|
14
|
+
|
|
15
|
+
Use `smart-search research` instead when the user asks for deep research, cross-checking, serious comparison, or a multi-stage investigation.
|
|
16
|
+
|
|
17
|
+
## Evidence Directory
|
|
18
|
+
|
|
19
|
+
Create one directory per user question. Keep command outputs numbered so the trail is easy to inspect.
|
|
20
|
+
|
|
21
|
+
```powershell
|
|
22
|
+
$Config = smart-search config path --format json | ConvertFrom-Json
|
|
23
|
+
$EvidenceDir = Join-Path $Config.resolved_evidence_dir "YYYYMMDD-HHMM-topic"
|
|
24
|
+
New-Item -ItemType Directory -Force -Path $EvidenceDir | Out-Null
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Step 1: Discover Candidate Sources
|
|
28
|
+
|
|
29
|
+
Run the bilingual broad-search pair first, then add intent-specific discovery only when needed.
|
|
30
|
+
|
|
31
|
+
Chinese-source broad pass:
|
|
32
|
+
|
|
33
|
+
```powershell
|
|
34
|
+
smart-search search "中文搜索,优先检索中文来源,并回答原问题:query" --validation balanced --extra-sources 1 --format json --output "$EvidenceDir\01-search-zh.json"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
English-source broad pass:
|
|
38
|
+
|
|
39
|
+
```powershell
|
|
40
|
+
smart-search search "Search English-language sources and answer the original question: query" --validation balanced --extra-sources 1 --format json --output "$EvidenceDir\02-search-en.json"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Official domains, papers, product pages, or trusted sites:
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
smart-search exa-search "query" --num-results 5 --include-text --include-highlights --format json --output "$EvidenceDir\01-exa.json"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Docs/API/library/framework intent:
|
|
50
|
+
|
|
51
|
+
```powershell
|
|
52
|
+
smart-search context7-library "react" "useEffect cleanup" --format json --output "$EvidenceDir\01-context7-library.json"
|
|
53
|
+
smart-search context7-docs "/facebook/react" "useEffect cleanup" --format json --output "$EvidenceDir\02-context7-docs.json"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Step 2: Fetch The Pages That Matter
|
|
57
|
+
|
|
58
|
+
Pick the one or two URLs that directly support the answer. Fetch exact pages before making claim-level statements.
|
|
59
|
+
|
|
60
|
+
```powershell
|
|
61
|
+
smart-search fetch "https://example.com/source" --format markdown --output "$EvidenceDir\03-fetch-source.md"
|
|
62
|
+
smart-search fetch "https://example.com/second-source" --format markdown --output "$EvidenceDir\04-fetch-second-source.md"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Step 3: Write The Answer
|
|
66
|
+
|
|
67
|
+
Use this evidence policy:
|
|
68
|
+
|
|
69
|
+
- Cite fetched page text or fetched URLs for claims.
|
|
70
|
+
- Treat `primary_sources` and `extra_sources` as discovery candidates until fetched.
|
|
71
|
+
- If a useful candidate was not fetched, label it as an unfetched candidate.
|
|
72
|
+
- Include the key command lines or the evidence directory path when the user may need to audit the work.
|
|
73
|
+
|
|
74
|
+
## Minimal Final-Answer Shape
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
Evidence used:
|
|
78
|
+
- 03-fetch-source.md: <what it supports>
|
|
79
|
+
- 04-fetch-second-source.md: <what it supports>
|
|
80
|
+
|
|
81
|
+
Answer:
|
|
82
|
+
<short answer grounded in fetched text>
|
|
83
|
+
|
|
84
|
+
Unverified candidates:
|
|
85
|
+
- <candidate URL or source from search/exa output, if relevant>
|
|
86
|
+
|
|
87
|
+
Commands:
|
|
88
|
+
- smart-search ...
|
|
89
|
+
```
|