44
55npm workspaces monorepo under ` packages/ ` .
66
7- - ` packages/core/src/ ` — ` session.ts ` (LLM loop, streaming, retry, compaction), ` tools/ ` (10 handlers), ` common/ ` (permissions, OpenAI client, model capabilities, file history), ` mcp/ ` , ` templates/ ` .
8- - ` packages/cli/src/ ` — Ink/React terminal UI (` cli.tsx ` , ` ui/views ` , ` ui/components ` , ` ui/core ` , ` ui/hooks ` ); ` packages/vscode-ide-companion/ ` — VSCode companion.
7+ - ` packages/core/src/ ` — ` session.ts ` (LLM loop, streaming, retry, compaction), ` tools/ ` (10 handlers), ` common/ ` (permissions, OpenAI client, capabilities, file history), ` mcp/ ` , ` templates/ ` .
8+ - ` packages/cli/src/ ` — Ink/React TUI (` cli.tsx ` , ` cli-args.ts ` , ` ui/ ` ); ` packages/vscode-ide-companion/ ` — VSCode companion.
99- ` docs/ ` — user docs; ` scripts/ ` — build/release tooling; ` dist/ ` — bundled output (gitignored).
1010
1111## Build, Test, and Development Commands
1212
13- - ` npm run check ` — typecheck/lint/format check; ` npm test ` — all workspace tests.
14- - ` npm run build ` — full build; ` npm run bundle ` — esbuild bundle + git info; ` npm run start ` — run the built CLI.
15- - Single test: ` node packages/core/src/tests/run-tests.mjs packages/core/src/tests/session.test.ts ` .
13+ - ` npm run check ` — typecheck/lint/format; ` npm test ` — workspace tests.
14+ - ` npm run build ` — full build; ` npm run bundle ` — esbuild bundle; ` npm run start ` — run the CLI.
15+ - Single test: ` node --import tsx --test packages/core/src/tests/session.test.ts ` .
16+ - Release: ` npm run release:version -- <bump> ` , then ` npm run prepare:package ` / ` prepare:vscode ` (` RELEASE.md ` ; ` v0.4.0 ` ).
1617
1718## Coding Style & Naming Conventions
1819
@@ -22,27 +23,26 @@ npm workspaces monorepo under `packages/`.
2223
2324## Testing Guidelines
2425
25- - Node native test runner (` node:test ` ) via ` tsx ` ; assertions with ` node:assert/strict ` .
26- - Tests live in ` packages/*/src/tests/ ` , named after the source module. Run ` npm test ` before PRs.
26+ - Node native test runner (` node:test ` ) via ` tsx ` with ` node:assert/strict ` .
27+ - Tests live in ` packages/*/src/tests/ ` , named after the source module; run ` npm test ` before PRs.
2728
2829## Commit & Pull Request Guidelines
2930
3031- Conventional commits: ` feat: ` , ` fix: ` , ` chore: ` , ` refactor: ` , ` style: ` , ` test: ` , ` docs: ` , ` perf: ` , ` build: ` .
31- - PRs: clear description, linked issues, UI screenshots, passing ` npm run check && npm test ` , no unintended ` dist/ ` /` package-lock.json ` changes.
32+ - PRs: clear description, linked issues, UI screenshots, passing ` npm run check && npm test ` , no unintended ` dist/ ` /lockfile changes.
3233
3334## Architecture Overview
3435
35- - ` @vegamo/deepcode-cli ` (Ink TUI) uses ` SessionManager ` (` @vegamo/deepcode-core ` ) to drive the LLM loop: prompts, streaming preview, tools, retry, compaction.
36- - Connectivity: ` createOpenAIClient() ` (180s keep-alive) with DeepCode Plus fallback; ` describeLlmError() ` normalizes errors.
37- - Tools: 10 built-ins — ` bash ` , ` read ` , ` write ` , ` edit ` , ` skill ` , ` AskUserQuestion ` , ` UpdatePlan ` , ` WebSearch ` , ` ReadImage ` , ` UnderstandImage ` ; ` read ` returns a ` snippet_id ` for ` edit ` .
38- - Images: ` supportsMultimodal() ` + ` multimodal ` choose ` ReadImage ` vs ` UnderstandImage ` ; ` filesApiEnabled ` uploads via the DeepSeek Files API.
39- - Permissions: 12 scopes incl. ` read-in-tmp ` /` write-in-tmp ` ; ` addWorkingDirs ` extends the workspace; ` file-history.ts ` provides undo.
40- - Models: default ` deepseek-flash ` (V4.1 Flash); ` /model ` offers ` deepseek-flash ` , ` deepseek-v4-pro ` , ` deepseek-v4-flash ` , ` deepseek-v4-flash-vision-exp ` with thinking effort ` low ` /` high ` /` max ` .
41- - Slash commands: ` /skills ` , ` /model ` , ` /plan ` , ` /new ` , ` /init ` , ` /resume ` , ` /fork ` , ` /continue ` , ` /undo ` , ` /mcp ` , ` /raw ` , ` /exit ` , plus dynamic ` /skill-name ` . Plan Mode gates writes behind ` <proposed_plan> ` approval.
36+ - ` @vegamo/deepcode-cli ` (Ink TUI) drives the LLM loop via ` SessionManager ` (` @vegamo/deepcode-core ` ) over a 180s keep-alive ` createOpenAIClient() ` with DeepCode Plus fallback.
37+ - Built-in tools: ` bash ` , ` read ` , ` write ` , ` edit ` , ` skill ` , ` AskUserQuestion ` , ` UpdatePlan ` , ` WebSearch ` , ` ReadImage ` , ` UnderstandImage ` ; ` read ` returns a ` snippet_id ` for ` edit ` , and ` supportsMultimodal() ` picks the matching image tool.
38+ - ` bash ` bounds output draining after exit/timeout so a held pipe cannot hang a session, captures native cwd on Windows Git Bash; ` run_in_background ` handles detached work.
39+ - Permissions: 12 scopes including ` read-in-tmp ` /` write-in-tmp ` ; ` addWorkingDirs ` extends the workspace; ` file-history.ts ` provides undo.
40+ - Models: default ` deepseek-flash ` ; ` /model ` offers ` deepseek-v4-pro ` , ` deepseek-v4-flash ` , ` deepseek-v4-flash-vision-exp ` (effort ` low ` /` high ` /` max ` ).
41+ - Commands: ` /skills ` , ` /model ` , ` /plan ` , ` /new ` , ` /init ` , ` /resume ` , ` /fork ` , ` /continue ` , ` /undo ` , ` /mcp ` , ` /raw ` , ` /exit ` ; Plan Mode gates writes behind ` <proposed_plan> ` .
4242- CLI flags: ` -p ` , ` -x ` , ` -r ` , ` -f ` , ` -l ` , ` -v ` , ` -h ` .
4343
4444## Agent-Specific Instructions
4545
46- - AGENTS.md loads from ` ./.deepcode/AGENTS.md ` , ` ./AGENTS.md ` , then ` ~/.deepcode/AGENTS.md ` (first found wins).
47- - Skills load from ` ./.deepcode/skills ` , ` ./.agents/skills ` , or ` ~ ` equivalents; call the ` skill ` tool. Bundled: ` deepcode-self-refer ` , ` image-generator ` , ` video-generator ` , ` skill-digester ` , ` skill-writer ` .
46+ - AGENTS.md loads from ` ./.deepcode/AGENTS.md ` , ` ./AGENTS.md ` , then ` ~/.deepcode/AGENTS.md ` (first wins).
47+ - Skills load from ` ./.deepcode/skills ` , ` ./.agents/skills ` , or ` ~ ` equivalents via the ` skill ` tool. Bundled: ` deepcode-self-refer ` , ` image-generator ` , ` video-generator ` (+ ` references/ ` , ` scripts/ ` ) , ` skill-digester ` , ` skill-writer ` .
4848- File references: ` @path/to/file ` .
0 commit comments