src/contains the TypeScript CLI and server core that power the Debug MCP runtime.packages/hosts workspace modules (@debugmcp/shared,adapter-mock,adapter-python,adapter-javascript,adapter-rust,adapter-go,mcp-debugger) with their ownsrc/trees.tests/is grouped by scope:core/,adapters/*/,e2e/, plus shared utilities intests/test-utils/and fixtures undertests/fixtures/.docs/covers design notes;examples/hosts adapter recipes;scripts/stores CI helpers.- Build artifacts land in
dist/; recorded assets and Docker helpers live inassets/anddocker/.
pnpm installsets up the monorepo (respect the generatedpnpm-lock.yaml).pnpm buildcompiles every package and emits the aggregateddist/index.js.pnpm devlaunches the TypeScript entry point viats-nodefor quick feedback.pnpm testperforms a full build, ensures Docker images are ready, and runs Vitest across all suites.- Targeted runs:
pnpm test:unit,pnpm test:integration,pnpm test:e2e,pnpm test:coverage. pnpm lintapplies the workspace-wide ESLint config; add:fixto auto-format when safe.
- Source files use ES modules, TypeScript strict mode, and two-space indentation; prefer
PascalCasefor classes,camelCasefor functions, andSCREAMING_SNAKE_CASEfor constants. - Align new utilities with the patterns in
src/utils/(pure functions with explicit exports). - ESLint (
eslint.config.js) enforces import order, logger usage, and null checks—run it before opening a PR. - Avoid default exports; monorepo packages rely on named exports for tree shaking and test isolation.
- Vitest drives all automated suites; place new core specs under
tests/core/and adapter-specific cases alongside their adapter folder. - Mirror filename patterns like
*.test.ts; prefer descriptive names (debug-session-manager.integration.test.ts) over numeric suffixes. pnpm test:coverageproduces Istanbul reports and triggersanalyze-coverage.js; keep new code at or above existing coverage thresholds.- Use
pnpm test:no-pythonorpnpm test:no-dockeronly when dependencies are missing, per the fail-loudly policy incommit-message.txt.
- Follow the existing history: short present-tense subject lines (
feat(scope): ...,chore: ...) with details in the body when needed. - Run
scripts/safe-commit.sh(or thepnpm commit:safealias) before pushing — this runs a mandatory personal information check and then commits (use--skip-teststo bypass other pre-commit hooks while keeping the personal info check). - PRs should describe behavior changes, reference GitHub issues or roadmap items, link relevant artifacts (logs, screenshots), and highlight test commands executed.
- Update affected docs or examples alongside code so downstream agents stay in sync.