open-code-review
CLAUDE.md371 starsChanged 9 months agoApache-2.0View on GitHub
These instructions are for AI assistants working in this project. Always open @/openspec/AGENTS.md when the request: - Mentions planning or proposals (words like proposal, spec, change, plan) - Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work - Sounds ambiguous and you need the authoritative spec before coding Use @/openspec/AGENTS.md to learn: - How to create and apply change proposals - Spec format and conventions - Project structure and guidelines Keep this managed block so 'openspec update' can…
- Reads credentials
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/commands/monitoring/agents.mdAGENTS.md
- openspec/AGENTS.mdAGENTS.md
- AgentDB Advanced FeaturesSkill
- AgentDB Learning PluginsSkill
- AgentDB Memory PatternsSkill
- AgentDB Performance OptimizationSkill
- AgentDB Vector SearchSkill
- browserSkill
- github-code-reviewSkill
- github-multi-repoSkill
- github-project-managementSkill
- github-release-managementSkill
- github-workflow-automationSkill
- Hooks AutomationSkill
- OCR Review-to-Approval LoopSkill
- Pair ProgrammingSkill
- ReasoningBank with AgentDBSkill
- ReasoningBank IntelligenceSkill
- Skill BuilderSkill
- sparc-methodologySkill
- stream-chainSkill
- swarm-advancedSkill
- Swarm OrchestrationSkill
- V3 CLI ModernizationSkill
- V3 Core ImplementationSkill
- V3 DDD ArchitectureSkill
- V3 Deep IntegrationSkill
- V3 MCP OptimizationSkill
- V3 Memory UnificationSkill
- V3 Performance OptimizationSkill
- V3 Security OverhaulSkill
- V3 Swarm CoordinationSkill
- Verification & Quality AssuranceSkill
The file
We split this CLAUDE.md into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 6
Always open @/openspec/AGENTS.md when the request:
- Very specific: line 11
Use @/openspec/AGENTS.md to learn:
- Distinctive: line 16
Keep this managed block so 'openspec update' can refresh the instructions.
- Very specific: line 23
TypeScript only: Do not create raw .js or .mjs files unless they serve a config purpose (e.g., vite.config.mjs, eslint.config.mjs).
- Very specific: line 51
Never npm publish by hand, never tag without going through nx release, and never bypass the verify-install gate — it exists because 2.0.0 …
- Very specific: line 70
Keep this managed block so ocr init can refresh the instructions.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- OPENSPEC:START -->OpenSpec Instructions
These instructions are for AI assistants working in this project.
Always open @/openspec/AGENTS.md when the request:
- Mentions planning or proposals (words like proposal, spec, change, plan)
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
- Sounds ambiguous and you need the authoritative spec before coding
Use @/openspec/AGENTS.md to learn:
- How to create and apply change proposals
- Spec format and conventions
- Project structure and guidelines
Keep this managed block so 'openspec update' can refresh the instructions.
<!-- OPENSPEC:END -->Code Conventions
- TypeScript only: Do not create raw
.jsor.mjsfiles unless they serve a config purpose (e.g.,vite.config.mjs,eslint.config.mjs). All project code, scripts, and utilities must be written in TypeScript. - Nx-native automation: Release process automation must use Nx extension points (e.g.,
VersionActions,preVersionCommand), not npm lifecycle scripts or standalone scripts. - Agent assets — edit source, then sync: Agent docs, skills, commands, references, and other agent-related files have their source of truth in
packages/agents/. ALWAYS edit them there, then runnx run cli:updateto write the changes out to the local project's.ocr/directory. Never hand-edit the generated.ocr/copies directly — they will be overwritten on the next sync and your edits will drift from source. - Shared layers live in
packages/shared/*, apps never depend on apps (CI-enforced):clianddashboardare application packages and MUST NOT depend on one another. This DAG is enforced by@nx/enforce-module-boundaries(rooteslint.config.mjs, keyed off each project'sscope:*tag) and gated in CI vianx run-many -t lint— an accidentaldashboard → cli(orshared → app) import fails the build, not just review. Code both apps need (persistence, domain/state, config, cross-platform utilities) lives in dedicated library packages underpackages/shared/*that each app depends on directly. The current shared packages are@open-code-review/platform(cross-platform/runtime utilities),@open-code-review/persistence(thenode:sqliteadapterdb+ workflowstatelifecycle +test-support+vendor-resume+ thenode:sqliteruntime preconditionruntime-checks— kept in one package becausedbandstatehave a mutually-recursive type cycle (db/types.ts↔state/types.ts); a package boundary between them would form a dependency cycle. The single-module-instance connection-cache singleton is a consequence of that co-location, not its root cause), and@open-code-review/config(runtime-config+team-config+models). - Shared packages are source-only, private, and inlined — never published: each
packages/shared/*package mirrorsplatformexactly —private: true,version 0.0.0, everyexportscondition (types/source/default) points at./src/*.ts(nobuild.mjs, nodist), and it is declared by its consumers as adevDependency: workspace:*(consumer-side rule). A shared package still declares its own runtime third-party deps in itsdependencies— they are inlined into the consumer's bundle, so they must resolve at build time. esbuild inlines the.tssource into each app's published bundle, so these packages are excluded from the release set (!packages/shared/*innx.json) and do not join the fixedcli+agentsrelease group. Do NOT give a shared package abuildtarget or adist— that machinery was removed in the cutover and must not return. - Graduation is by cause, not by count: a slice graduates from an app package into a
packages/shared/*package the moment it is consumed across a package boundary (by the other app, an e2e package, or another shared package) rather than only by its owning app's own code. There is no subpath-count trigger. A genuinely app-internal module stays in its app; the goal is to keep the dependency graph a DAG ofapp → shared → shared, neverapp → app.
Release Process (GitHub + npm)
Releases are cut locally from main with nx release; npm publishing happens only in CI, gated by a cross-platform install verification. Versioning is conventional-commits driven; cli + agents are a fixed release group (always bump together — dashboard, shared/*, and *-e2e are excluded from releasing, see release in nx.json).
- Preconditions: the work is merged to
main; you are onmain, pulled, with a clean tree; and the push-triggered CI run onmainis green. (PR CI runs the e2e matrix on ubuntu only — macOS/Windows e2e run on push tomain, so a green PR does NOT imply a greenmain.) - Preview the bump (no writes):
Conventional commits since the lastpnpm nx release --skip-publish --dry-runv*tag decide the specifier (feat→ minor,fix→ patch,BREAKING CHANGE→ major). Sanity-check the computed version and the changelog preview. - Cut the release:
This single command: bumps every manifest (including the synced copies inGITHUB_TOKEN="$(gh auth token)" pnpm nx release --skip-publishpackages/agents/.claude-plugin/plugin.jsonandpackages/agents/skills/ocr/SKILL.md), updates the lockfile, writesCHANGELOG.md, commitschore(release): {version}, tagsv{version}, pushes the commit + tag, and publishes the GitHub release. Notes: theGITHUB_TOKENenv var is required for the GH-release step;--yesis mutually exclusive with--skip-publish(the latter already auto-answers the only prompt). - npm publish happens in CI, never locally: the
v*tag push triggers.github/workflows/release.yml, which packs the real tarballs and install-verifies them on 3 OS × 2 Node versions (pnpm 10 with scripts blocked + npm;ocr doctor --engine-only --probe-write+ a real on-disk state command) before runningnx release publish. PlainvX.Y.Ztags publish to dist-taglatest;vX.Y.Z-rc*tags publish tonext. The workflow can also be run via manual dispatch (with a dry-run option that skips publishing). npm auth is OIDC trusted publishing — there is noNPM_TOKENsecret. Both packages are configured on npmjs.com with this repo +release.ymlas a GitHub Actions trusted publisher; if publishing ever fails with "not logged in", check that config (and that the publish step runs pnpm ≥ 11 — pnpm 10 ships no OIDC trusted-publishing code at all; that wrong assumption produced exactly this ENEEDAUTH failure on the first v2.2.1 publish attempt) rather than hunting for a token. - Verify: watch the Release run to completion (
gh run watch), then confirm the registry:npm view @open-code-review/cli version && npm view @open-code-review/agents version
Never npm publish by hand, never tag without going through nx release, and never bypass the verify-install gate — it exists because 2.0.0 shipped an install break that only a real published-tarball install could catch.
<!-- OCR:START -->Open Code Review Instructions
These instructions are for AI assistants handling code review in this project.
Always open .ocr/skills/SKILL.md when the request:
- Asks for code review, PR review, or feedback on changes
- Mentions "review my code" or similar phrases
- Wants multi-perspective analysis of code quality
- Asks to map, organize, or navigate a large changeset
Use .ocr/skills/SKILL.md to learn:
- How to run the 8-phase review workflow
- How to generate a Code Review Map for large changesets
- Available reviewer personas and their focus areas
- Session management and output format
Keep this managed block so ocr init can refresh the instructions.
<!-- OCR:END -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

