Skip to content

Commit 3b39d99

Browse files
oratisclaude
andcommitted
chore(m0): initial M0 skeleton — design docs + monorepo bootstrap
M0 ships: - DEVELOPMENT_PLAN.md v0.5 (1562 lines · 15-week v1 + 4-week v1.1 timeline) - VISUAL_DESIGN.html v0.4 (11 screen mockups, including auto-update banner) - 3 mandatory design docs in docs/design/: sandbox-plan-worktree.md · 4-layer security gate matrix + state machines plugin-security.md · plugin RCE threat model + sandbox subprocess + hash pin effort-levels.md · DeepSeek API spec snapshot + 5-tier mapping (numbers TBD M1) - CONTRIBUTING.md / SECURITY.md / README.md (project front-door) - pnpm workspace monorepo skeleton: packages/core @deepcode/core (UI-agnostic kernel) packages/shared-ui @deepcode/shared-ui (brand tokens shared with CLI+desktop) apps/cli deepcode-cli (npm bin, --version/--help working) apps/desktop @deepcode/desktop (Electron+React placeholder, real impl M6) - TypeScript project references via tsc -b (cross-package type resolution works) - Vitest smoke test suite (4 tests passing in @deepcode/core) - Prettier + EditorConfig + .npmrc + .nvmrc (Node 20) - GitHub Actions CI workflow (typecheck/lint/test/build + docs link check) - PR template enforcing conventional commits + release-notes labels Verified locally: - pnpm install → 50 packages resolved - pnpm typecheck → tsc -b all green - pnpm build → dist/ artifacts in all packages - pnpm test → 4 passed / 1 file - pnpm format:check → all files prettier-conformant - node apps/cli/dist/cli.js --version → 0.0.0 Next: M1 kernel MVP (DeepSeekProvider streaming + 6 P0 tools + sessions + tests). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 47f5339 commit 3b39d99

70 files changed

Lines changed: 7224 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[Makefile]
15+
indent_style = tab

.github/pull_request_template.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!-- PR title 必须遵循 conventional commits: <type>(<scope>): <subject> -->
2+
3+
## Summary
4+
5+
<!-- 3 句话以内说清楚干了什么,为什么 -->
6+
7+
## Test plan
8+
9+
<!-- 跑了哪些测试 / 怎么验证 -->
10+
11+
- [ ] `pnpm typecheck`
12+
- [ ] `pnpm test`
13+
- [ ] `pnpm build`
14+
- [ ] 手工验证:…
15+
16+
## Documentation
17+
18+
<!-- 本 PR 配套的 docs/* 改动 -->
19+
20+
- [ ] N/A(仅内部重构)
21+
- [ ] 更新了 docs/<file>.md
22+
- [ ] 新增了 docs/<file>.md
23+
24+
## Release notes label
25+
26+
<!-- 必选一个 -->
27+
28+
- [ ] `release-notes:feature` — 新功能
29+
- [ ] `release-notes:fix` — bug 修复
30+
- [ ] `release-notes:breaking` — 破坏性变更
31+
- [ ] `release-notes:internal` — 内部(不出现在用户可见 changelog)
32+
33+
## Checklist
34+
35+
- [ ] PR 标题是 conventional commits 格式
36+
- [ ] 所有 commits 都是 conventional commits 格式
37+
- [ ] 添加了对应测试
38+
- [ ] CI 全绿
39+
40+
## Related
41+
42+
<!-- 关联的 issue / discussion / design doc -->
43+
44+
Closes #

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ci-${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
check:
15+
name: Typecheck + Lint + Test
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 15
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: 9
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '20'
32+
cache: 'pnpm'
33+
34+
- name: Install dependencies
35+
run: pnpm install --frozen-lockfile
36+
37+
- name: Typecheck
38+
run: pnpm typecheck
39+
40+
- name: Lint
41+
run: pnpm lint
42+
continue-on-error: true # M0: lint 配置随 M1 完善,先不阻塞
43+
44+
- name: Format check
45+
run: pnpm format:check
46+
47+
- name: Test
48+
run: pnpm test
49+
50+
- name: Build
51+
run: pnpm build
52+
53+
link-check:
54+
name: Docs link check
55+
runs-on: ubuntu-latest
56+
timeout-minutes: 5
57+
steps:
58+
- uses: actions/checkout@v4
59+
- name: Verify required docs exist
60+
run: |
61+
for f in README.md CONTRIBUTING.md SECURITY.md \
62+
docs/DEVELOPMENT_PLAN.md docs/VISUAL_DESIGN.html \
63+
docs/design/sandbox-plan-worktree.md \
64+
docs/design/plugin-security.md \
65+
docs/design/effort-levels.md; do
66+
test -f "$f" || { echo "MISSING: $f"; exit 1; }
67+
done
68+
echo "All M0 docs present"

.gitignore

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Dependencies
2+
node_modules/
3+
.pnpm-store/
4+
5+
# Build artifacts
6+
dist/
7+
build/
8+
out/
9+
*.tsbuildinfo
10+
11+
# Editor
12+
.vscode/
13+
.idea/
14+
*.swp
15+
*.swo
16+
.DS_Store
17+
18+
# Logs
19+
*.log
20+
npm-debug.log*
21+
pnpm-debug.log*
22+
yarn-error.log
23+
24+
# Env / secrets
25+
.env
26+
.env.local
27+
.env.*.local
28+
*.pem
29+
.deepcode/credentials.json
30+
31+
# Test outputs
32+
coverage/
33+
.nyc_output/
34+
35+
# Electron build outputs
36+
apps/desktop/release/
37+
apps/desktop/dist-electron/
38+
39+
# Reference fork (claude-code upstream, read-only)
40+
reference/
41+
42+
# OS
43+
Thumbs.db
44+
45+
# Local sessions / cache (when running deepcode in repo)
46+
.deepcode/sessions/
47+
.deepcode/projects/

.npmrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
auto-install-peers=true
2+
strict-peer-dependencies=false
3+
shamefully-hoist=false
4+
prefer-workspace-packages=true
5+
link-workspace-packages=true

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
dist
3+
build
4+
out
5+
coverage
6+
*.tsbuildinfo
7+
pnpm-lock.yaml
8+
docs/VISUAL_DESIGN.html
9+
reference

.prettierrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"tabWidth": 2,
6+
"printWidth": 100,
7+
"arrowParens": "always",
8+
"endOfLine": "lf"
9+
}

0 commit comments

Comments
 (0)