search-first
Research-before-coding workflow. Search for existing patterns, helpers, and implementations in the tracker codebase before writing new code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Research-before-coding workflow. Search for existing patterns, helpers, and implementations in the tracker codebase before writing new code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools.
Guide for developing new MCP tools. Use when adding tools to mcp-server.ts or via space plugin mcpTools arrays. Covers Zod validation, actor handling, and test patterns.
Database patterns for better-sqlite3 with WAL mode. Query optimization, schema design, and migration patterns for the tracker's SQLite layer.
Safety guidelines for modifying orchestrator code. Use when touching state transitions, SSE handling, session lifecycle, circuit breaker, safe restart, or dispatch logic in orchestrator.ts.
Use when adding authentication, handling user input, working with secrets, creating API endpoints, or modifying security-sensitive code. General security checklist.
Guide for developing new space plugins. Use when creating a new space type or extending an existing one. Covers the SpacePlugin interface, parsers, API routes, MCP tools, and UI renderers.
| name | search-first |
| description | Research-before-coding workflow. Search for existing patterns, helpers, and implementations in the tracker codebase before writing new code. |
| origin | ECC-adapted |
clarification state Need to implement something
│
▼
Search codebase for existing patterns
│
┌────┴────┐
▼ ▼
Found it Not found
│ │
▼ ▼
Reuse/ Search for
extend similar patterns
│ │
▼ ▼
Done Implement new
(following existing conventions)
Shared helpers — Check the "Shared Helpers" section in core.html (~line 6941):
esc(), agentStatusHtml(), renderMarkdown(), descriptionPreview(), sortItems(), refreshCurrentView(), renderSearchResultItem(), executeSearch()
Shared constants — Check near top of JS (~line 6657):
PRIORITY_ORDER, SESSION_STATUS_MAP
Existing space plugins — Check src/spaces/*.ts for similar patterns:
src/ui/spaces/*.jsDatabase patterns — Check src/db.ts for:
API patterns — Check src/api.ts for:
| Situation | Action |
|---|---|
| Helper exists | Use it directly |
| Similar pattern exists | Follow the pattern, extend if needed |
| Nothing similar | Implement new, following project conventions |
| Complex/unclear | Move item to clarification, add research comment |
escapeHtml() when esc() existssortItems() handles itrenderMarkdown() is available