tdd-workflow
Use when writing new features, fixing bugs, or refactoring tracker code. Enforces test-driven development with our Vitest + in-memory SQLite setup.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when writing new features, fixing bugs, or refactoring tracker code. Enforces test-driven development with our Vitest + in-memory SQLite setup.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
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.
Research-before-coding workflow. Search for existing patterns, helpers, and implementations in the tracker codebase before writing new code.
Use when adding authentication, handling user input, working with secrets, creating API endpoints, or modifying security-sensitive code. General security checklist.
| name | tdd-workflow |
| description | Use when writing new features, fixing bugs, or refactoring tracker code. Enforces test-driven development with our Vitest + in-memory SQLite setup. |
| origin | ECC-adapted |
All tests use Vitest with in-memory SQLite:
import { describe, it, expect, beforeEach } from 'vitest';
import { _initTestTrackerDatabase } from './db';
describe('Feature Name', () => {
let db: ReturnType<typeof _initTestTrackerDatabase>;
beforeEach(() => {
db = _initTestTrackerDatabase();
});
it('should do the expected thing', () => {
// Arrange → Act → Assert
});
});
src/**/*.test.tsnpm test — verify it fails for the right reasonnpm test — verify nothing else brokenpm run build — verify TypeScript compiles| Source file | Test file |
|---|---|
src/db.ts | src/db.test.ts |
src/orchestrator.ts | src/orchestrator.test.ts |
src/spaces/travel.ts | src/spaces/travel.test.ts |
src/spaces/new-space.ts | src/spaces/new-space.test.ts |