{"slug": "show-hn-review-to-rule-turn-accepted-review-feedback-into-durable-repo-rules", "title": "Show HN: Review-to-rule – Turn accepted review feedback into durable repo rules", "summary": "Vamgan released review-to-rule, an open-source plugin and skill that converts accepted code-review feedback into durable, scoped repository rules for coding agents like Claude Code and Codex. The tool supports GitHub, GitLab, Bitbucket, Gerrit, and Azure Repos, requires Node.js 24+ and Git, and writes rules to a .review-to-rule directory with optional AGENTS.md or CLAUDE.md pointers. It validates evidence, hashes, and write transactions locally, refusing ambiguous or overly broad feedback.", "body_md": "**A reviewer catches it once. Every future review remembers.**\n\n`review-to-rule`\n\nturns accepted code-review feedback into durable, scoped\nrepository memory—whether the review came from GitHub, GitLab, Bitbucket,\nGerrit, Azure Repos, or a private system your coding agent can access.\n\nRun these commands inside Claude Code:\n\n```\n/plugin marketplace add vamgan/review-to-rule\n/plugin install review-to-rule@review-to-rule\n/reload-plugins\n```\n\nThen invoke it directly:\n\n```\n/review-to-rule:review-to-rule-write Turn this accepted review into a rule: <PR, MR, change, or comment URL>\nnpx skills add vamgan/review-to-rule \\\n  --skill review-to-rule-write \\\n  --agent codex \\\n  --yes\n```\n\nThen ask:\n\nTurn this accepted review into a rule:\n\n`<PR, MR, change, or comment URL>`\n\nThat is the whole agent installation. No separate `review-to-rule`\n\nCLI, npm\npackage install, `gh auth login`\n\n, model API key, or provider configuration is\nneeded. The plugin and portable skill both include the deterministic helper\nused for previews, writes, and validation. Runtime requirements are Node.js 24+\nand Git.\n\nThe skill retrieves the accepted review and its before/after revisions, creates\na temporary provider-neutral bundle, and shows a complete dry run. Nothing is\nsaved until you choose `AGENTS.md`\n\n, `CLAUDE.md`\n\n, both, or neither—and approve\nthe exact write plan.\n\n```\nreview\n  “Use the injected Clock here so retry tests stay deterministic.”\n\naccepted fix\n  return clock.now() + retryDelay\n\nstored rule\n  scope: src/jobs/*.ts\n  flag: direct wall-clock reads when Clock is available\n  prefer: clock.now()\n\nfuture agent review\n  “Use clock.now() here.”\nphp\nflowchart LR\n  A[Any review system] -->|host agent tools| B[Accepted before + after]\n  B --> C[Scoped review rule]\n  C --> D[Provenance + integrity checks]\n  D --> E[Human-approved write]\n  E --> F[.review-to-rule]\n  F -->|AGENTS.md / CLAUDE.md pointer| G[Future coding agents]\n```\n\nThe agent understands the review. The core verifies bounded evidence, accepted before/after examples, scope coverage, credentials, collisions, hashes, index consistency, and the complete write transaction.\n\nRules can capture correctness, security, architecture, behavior, testing, performance, style, maintainability, and product constraints. Ambiguous, one-off, unsupported, or dangerously broad feedback is refused.\n\nThe repository owns its future review memory:\n\n```\n.review-to-rule/\n├── INDEX.md      # scope-aware directory for agents\n├── rules/        # readable Markdown review rules\n├── evidence/     # bounded accepted review provenance\n└── manifests/    # structured rules, hashes, and approval metadata\n```\n\n`.review-to-rule/`\n\nis canonical. Optional managed blocks in `AGENTS.md`\n\nand\n`CLAUDE.md`\n\ntell agents to read the index and load only rules matching the files\nthey are reviewing. Rule logic is never duplicated there.\n\nIntegrity validation is local and deterministic. During an agent run, the installed skill uses its bundled helper to validate the complete write and replay its manifest; it does not download or look up another executable.\n\nYou do not need this section for Claude Code or Codex. Install or invoke the npm CLI only for terminal automation, CI, or the standalone GitHub adapter:\n\n```\nnpx review-to-rule@latest validate-all .review-to-rule --repo-dir .\nnpx review-to-rule@latest replay .review-to-rule/manifests/<rule>.json\n```\n\nIf you intentionally run without a capable host agent, the standalone adapter can retrieve one GitHub review and call OpenAI or Anthropic itself:\n\n```\ngh auth login\nexport OPENAI_API_KEY=...\n\nnpx review-to-rule@latest doctor\nnpx review-to-rule@latest generate \\\n  'https://github.com/owner/repo/pull/123#discussion_r456'\n```\n\n`gh`\n\nauthentication and a model credential are required only for this adapter.\nThey are not required for `apply`\n\n, `validate`\n\n, `validate-all`\n\n, or `replay`\n\n.\n\nFor custom integrations, emit a versioned\n[review-memory bundle](/vamgan/review-to-rule/blob/main/docs/REVIEW_BUNDLE.md) and run:\n\n```\nnpx review-to-rule@latest apply review-bundle.json --repo-dir .\n```\n\n- Dry run by default; writes require a reviewed preview and explicit approval.\n- Credential-free, bounded bundles; embedded URL credentials are rejected.\n- Exactly one scoped, agent-readable rule anchored to the accepted correction.\n- Structural, provenance, credential, hash, index, and pointer validation.\n- No target builds, tests, hooks, package scripts, or generated commands run.\n- Contained, symlink-aware, journaled writes with rollback and replay hashes.\n- Change-request publication is a separate opt-in and never auto-merges.\n\nThere is no account, daemon, telemetry, or background learner. See the full\n[architecture](/vamgan/review-to-rule/blob/main/docs/ARCHITECTURE.md) and [security model](/vamgan/review-to-rule/blob/main/docs/SECURITY.md).\n\n```\nnpm ci\nnpm run release:check\n```\n\nContributions are welcome—start with [CONTRIBUTING.md](/vamgan/review-to-rule/blob/main/CONTRIBUTING.md).\n\nMIT licensed.", "url": "https://wpnews.pro/news/show-hn-review-to-rule-turn-accepted-review-feedback-into-durable-repo-rules", "canonical_source": "https://github.com/vamgan/review-to-rule", "published_at": "2026-09-03 03:46:08+00:00", "updated_at": "2026-09-03 04:22:16.580090+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-agents", "mlops"], "entities": ["Vamgan", "Claude Code", "Codex", "GitHub", "GitLab", "Bitbucket", "Gerrit", "Azure Repos"], "alternates": {"html": "https://wpnews.pro/news/show-hn-review-to-rule-turn-accepted-review-feedback-into-durable-repo-rules", "markdown": "https://wpnews.pro/news/show-hn-review-to-rule-turn-accepted-review-feedback-into-durable-repo-rules.md", "text": "https://wpnews.pro/news/show-hn-review-to-rule-turn-accepted-review-feedback-into-durable-repo-rules.txt", "jsonld": "https://wpnews.pro/news/show-hn-review-to-rule-turn-accepted-review-feedback-into-durable-repo-rules.jsonld"}}