Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .agents/skills/deploy/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ broken or over-budget deploy.
```bash
pnpm typecheck
pnpm lint
# Unused files, exports, dependencies, or configuration and tag hints fail these checks.
pnpm knip
pnpm knip:production
```

## 2. Build
Expand Down
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<!-- Commands you ran and their results; screenshots for visual claims. Name skipped checks and why. -->

- [ ] `pnpm lint` (vp check) and `pnpm typecheck`
- [ ] Run `pnpm knip` and `pnpm knip:production`. Unused files, exports, dependencies, or configuration and tag hints fail CI.
- [ ] `pnpm duplicates` (fails on any reported clone, while `pnpm duplicates:audit` only reports findings)
- [ ] `pnpm test` — unit tests
- [ ] `pnpm --filter @blog/web build` + size gate (`wrangler deploy --dry-run`, < 3 MiB gzip)
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
- name: Lint (vp check)
run: pnpm lint

- name: Check for unused files, exports, and dependencies
run: pnpm knip

- name: Check production code with Knip
run: pnpm knip:production

- name: Check for duplicate code
run: pnpm duplicates

Expand Down
3 changes: 3 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ pnpm deploy
```bash
pnpm typecheck
pnpm lint # = vp check(Oxfmt 格式检查 + Oxlint lint,含 shadcn token 规则,与 CI lint job 一致)
# 两项 Knip 检查发现未使用的文件、导出、依赖或配置、标签提示时,CI 失败。
pnpm knip
pnpm knip:production # 单独检查生产代码
pnpm duplicates # 检出任何一处重复即失败。`pnpm duplicates:audit` 只生成报告。
pnpm --filter @blog/web build
pnpm --filter @blog/web exec wrangler deploy -c dist/server/wrangler.json --dry-run # 守 3 MiB
Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ Specs and Plans in the delivery PR.
```bash
pnpm lint # vp check — Oxfmt format check + Oxlint across the repo
pnpm typecheck # tsc (TypeScript 7 native)
# Both Knip checks fail CI on unused files, exports, dependencies, or configuration and tag hints.
pnpm knip
pnpm knip:production # Check production code separately.
pnpm duplicates # Fails on any reported clone. `pnpm duplicates:audit` only reports findings.
pnpm test # vp test (Vitest 5) — unit tests
pnpm --filter @blog/web build
Expand Down
1 change: 1 addition & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ pnpm --filter @blog/web dev # vp dev(Vite+)
- **改表结构**:加 `apps/web/migrations/000N_*.sql`;deploy 时自动应用到远端、本地用 `--local`。
- **改可见性逻辑**:`packages/shared/src/access.ts`(`canAccessVisibility`)+ 在数据层 fn 里强制。
- **提交前最低验证**:`pnpm typecheck`;`pnpm lint`(`vp check`:Oxfmt 格式检查 + Oxlint);
`pnpm knip` 和 `pnpm knip:production`(分别检查全项目和生产代码,检出未使用的文件、导出、依赖或配置、标签提示即失败);
`pnpm duplicates` 检出任何一处重复即失败(`pnpm duplicates:audit` 只生成报告);
`pnpm --filter @blog/web build`;`pnpm --filter @blog/web exec wrangler deploy -c
apps/web/dist/server/wrangler.json --dry-run`(体积守门)。
Expand Down
Loading