chore: add Claude Code project config, git hooks, and session setup

- CLAUDE.md (root + Server + client) documenting commands, generated-code
  rules, and the known-red client unit suite policy
- .claude/skills: ci-check (local CI mirror), protocol-change, db-change
  workflows for the sqlc/protocol codegen invariants CI enforces
- .githooks pre-commit/pre-push mirroring CI's fast gates (gofmt, go vet,
  oxlint, prettier, tsc, tag-variant builds, sqlc/protocol staleness),
  enabled via 'npm run hooks:install'
- .claude SessionStart hook installing client npm deps and warming the Go
  module cache so remote sessions can run tests/linters immediately
- .mcp.json with Playwright and Context7 MCP servers
- .gitignore: commit shared Claude config; keep local-only overrides ignored

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDcVJqGjHcJVLoV4x1HFjW
This commit is contained in:
Claude
2026-07-19 16:54:13 +00:00
parent 719c910330
commit fc0f86118c
5 changed files with 157 additions and 9 deletions
+15
View File
@@ -83,6 +83,21 @@ How to set up the development environment and contribute to OwnCord.
| `npm run format:check` | Prettier check only (no writes) |
| `npm run knip` | Dead code and unused export detection |
### Git hooks (recommended)
Committed hooks in `.githooks/` catch the most common CI failures locally. Enable once per clone (from the repo root):
```bash
npm run hooks:install # = git config core.hooksPath .githooks
```
| Hook | What it runs |
|------|--------------|
| `pre-commit` | gofmt + `go vet` (when Go files staged), oxlint + prettier + `tsc --noEmit` (when client TS staged), `sqlc-verify` / `protocol-verify` (when their inputs staged) |
| `pre-push` | Server build in all build-tag variants, client typecheck + type-aware ESLint. Set `OWNCORD_PREPUSH_TESTS=1` to also run `go test -race ./...` |
Bypass with `--no-verify` or `OWNCORD_SKIP_HOOKS=1` when needed — CI still enforces everything.
## Plugin Development
Plugins are WASM modules loaded at runtime when the server is built with `-tags wazero`.