Imported from yodakeisuke/mcp-desicive (
AGENTS.md). Install upstream withnpx skills add yodakeisuke/mcp-desicive. Copyright stays with the author.
Repository Guidelines
Project Structure & Module Organization
src/: TypeScript sourcesmcp/Server.ts: MCP server setup and tool/prompt registrationmcp/tool/<name>/: tools withschema.ts,handler.ts,index.tsmcp/prompt/<name>/: prompts withschema.ts,handler.ts,index.tsdomain/: domain layer (command,read,term)effect/: persistence and side-effects (filesystem-backed store, etc.)common/: shared primitives/utilities
- Tests: colocated under
src/**as*.test.tsand*.integration.test.ts. dist/: build output.bin/: CLI entry (bin/mcp-decisive.js).
Build, Test, and Development Commands
npm run dev: Start in watch mode viatsx(runssrc/index.ts).npm run build: Compile TypeScript todist/(tsc).npm start: Run compiled server (node dist/index.js).npm test: Run Vitest in Node environment.npm run test:uifor UI runner.npm run lint: ESLint oversrc/**/*.ts.npm run typecheck: TS type check only.
Coding Style & Naming Conventions
- Language: TypeScript (ESM, Node >= 18). Strict TS; no implicit
any. - Indentation: 2 spaces; prefer single quotes; keep imports sorted logically.
- Naming: files/dirs kebab-case; types/interfaces PascalCase; vars/functions camelCase.
- Lint rules: no unused vars (prefix with
_to ignore), avoidany(warn). Runnpm run lint && npm run typecheckbefore PRs.
Testing Guidelines
- Framework: Vitest (
vitest.config.ts,environment: 'node'). - Location: colocate tests with code. Use
foo.test.tsfor unit andfoo.integration.test.tsfor integration (examples undersrc/mcp/tool/...). - Run:
npm test(optionallyvitest -t "define issue"to filter). - Keep tests deterministic; mock the
effect/layer where external I/O is involved.
Commit & Pull Request Guidelines
- Commits: prefer Conventional Commits for clarity, e.g.,
feat: add make-tripwire tool,fix: harden current-status schema(history is terse—please improve). - PRs: include description, rationale, linked issues, and sample JSON/CLI output if relevant. Update README/knowledge when behavior changes.
- Checks: ensure build, lint, and tests pass locally before requesting review.
Adding Tools or Prompts
- Tools: create
src/mcp/tool/<name>/{schema.ts,handler.ts,index.ts}and register insrc/mcp/Server.ts. - Prompts: create
src/mcp/prompt/<name>/with schema/handler and register inServer.ts. - See
src/mcp/tool/example/for a minimal reference.
