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
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

- [ ] Repository checks: `gh repo-checks repository`
- [ ] PR title and description: `gh repo-checks pr-title "<title>"`, `gh repo-checks pr-body <body-file>`
- [ ] `pnpm knip` passes with no unused files, exports, dependencies, or configuration or tag hints.
- [ ] Format, lint, test, build:

## Risks
Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This repository is a local TypeScript CLI plus portable Codex skills. Treat ever
- Do not commit `.env`, `.state/`, build output, local logs, tokens, temporary workspaces, or machine-specific paths.
- Do not add private tokens, internal hostnames, private repository names, or personal filesystem paths.
- Use `rg` for searches when available.
- Run `pnpm verify` before claiming a change is ready (`test:layout` + `vp check` + duplicates + tests + `tsc` build + package check). Prefer `vp` for lint/fmt/test when Vite+ is installed (`pnpm exec vp …`).
- Run `pnpm verify` before claiming a change is ready (`test:layout` + `vp check` + duplicates + knip + tests + `tsc` build + package check). Prefer `vp` for lint/fmt/test when Vite+ is installed (`pnpm exec vp …`).
- Do not claim implementation work is complete until the relevant commands pass, or until skipped commands are explained with concrete blockers.
- Update tests and documentation when behavior changes.
- `feeds.json` is the repository-maintained RSS subscription list. Update it through `rss-summary feeds ...` when possible and include intentional feed changes in the pull request.
Expand All @@ -37,6 +37,7 @@ pnpm lint

pnpm duplicates # Fails on any reported duplicate.
pnpm duplicates:audit # Reports duplicates without failing on findings.
pnpm knip # Fails CI on unused files, exports, or dependencies and on configuration or tag hints.

# Full local gate:
pnpm verify
Expand Down
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pnpm test
pnpm typecheck
pnpm duplicates # Fails on any reported duplicate.
pnpm duplicates:audit # Reports duplicates without failing on findings.
pnpm knip # Fails CI on unused files, exports, or dependencies and on configuration or tag hints.
pnpm build
```

Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ pnpm lint

pnpm duplicates # Fails on any reported duplicate.
pnpm duplicates:audit # Reports duplicates without failing on findings.
pnpm knip # Fails CI on unused files, exports, or dependencies and on configuration or tag hints.

# Full local gate (test layout + vp check + duplicates + tests + build + package check):
# Full local gate (test layout + vp check + duplicates + knip + tests + build + package check):
pnpm verify

# Coverage:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ rss-summary runs show <run-label>
## Development

```bash
pnpm verify # test:layout + check + duplicates + test + build + package:check
pnpm verify # test:layout + check + duplicates + knip + test + build + package:check
pnpm duplicates # 检出任何一处重复都会失败。
pnpm duplicates:audit # 只生成报告,发现重复也不会拦截。
pnpm knip # 检出未使用的文件、导出、依赖,或出现配置、标签提示时,CI 失败。
```

`main` 受保护。在功能分支上改,开 PR,等 `Verify` + `Coverage` 通过后再合并。
Expand Down
3 changes: 2 additions & 1 deletion docs/architecture/technology-decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ Alternatives considered and rejected:
- Import direction is enforced by the architecture test (`scripts/architecture/boundaries.ts` + `tests/repo/architecture.test.ts`, zero violations), not by lint rules.
- `pnpm verify` runs `pnpm check` (`vp check`) after `test:layout`.
- The next step, `pnpm duplicates`, fails on any reported duplicate. Run `pnpm duplicates:audit` separately for a report without failing on findings.
- `pnpm knip` then checks for unused files, exports, and dependencies. Findings and configuration or tag hints fail the Verify job.

## CI Gates

`ci.yml` runs two jobs on every PR to `main`:

| Job | Command | Fails when |
| --- | --- | --- |
| `Verify` | `pnpm verify` | layout mismatch, check (fmt/lint/type) failure, any reported duplicate, test failure, build failure, or packed-package check failure |
| `Verify` | `pnpm verify` | layout mismatch, check (fmt/lint/type) failure, any reported duplicate, Knip finding or hint, test failure, build failure, or packed-package check failure |
| `Coverage` | `pnpm test:layout && pnpm test:coverage` | missing sibling tests or coverage below the thresholds in `vite.config.ts` |

Both jobs are intended to be required checks in the branch protection rule for `main` (configure in GitHub → Settings → Branches → Branch protection rules; this cannot be expressed in the workflow file itself).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"test:coverage": "vp test run --coverage",
"test:layout": "node scripts/check-test-layout.mjs",
"typecheck": "tsc --noEmit",
"verify": "pnpm test:layout && pnpm check && pnpm duplicates && pnpm test && pnpm build && pnpm package:check"
"verify": "pnpm test:layout && pnpm check && pnpm duplicates && pnpm knip && pnpm test && pnpm build && pnpm package:check"
},
"devDependencies": {
"@rivus/agent": "0.18.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/repo/ci-harness.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("CI harness", () => {
};

expect(pkg.scripts?.verify).toBe(
"pnpm test:layout && pnpm check && pnpm duplicates && pnpm test && pnpm build && pnpm package:check"
"pnpm test:layout && pnpm check && pnpm duplicates && pnpm knip && pnpm test && pnpm build && pnpm package:check"
);
expect(pkg.scripts?.check).toBe("vp check");
expect(pkg.scripts?.lint).toBe("vp lint");
Expand Down
2 changes: 1 addition & 1 deletion tests/repo/package-bin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe("package CLI metadata", () => {
expect(pkg.scripts?.build).toBe("tsc -p tsconfig.build.json");
expect(pkg.scripts?.["package:check"]).toBe("node scripts/check-package.mjs");
expect(pkg.scripts?.verify).toBe(
"pnpm test:layout && pnpm check && pnpm duplicates && pnpm test && pnpm build && pnpm package:check"
"pnpm test:layout && pnpm check && pnpm duplicates && pnpm knip && pnpm test && pnpm build && pnpm package:check"
);
expect(buildConfig.compilerOptions?.declaration).toBe(true);
});
Expand Down
Loading