{"_id":"@athanatoi94/opsx-review","_rev":"4-9f9c8e8f149accc9027925a9219d00b7","name":"@athanatoi94/opsx-review","dist-tags":{"latest":"0.3.2"},"versions":{"0.1.0":{"name":"@athanatoi94/opsx-review","version":"0.1.0","keywords":["openspec","spec-driven-development","spec-coding","ai-coding","spec-review","codex","claude"],"author":{"name":"athanatoi94"},"license":"UNLICENSED","_id":"@athanatoi94/opsx-review@0.1.0","maintainers":[{"name":"athanatoi94","email":"baldwinwen94@gmail.com"}],"bin":{"opsx-review":"bin/opsx-review.mjs"},"dist":{"shasum":"4d0bd3d689543e1843c42528282d3a27b1d6eec9","tarball":"https://registry.npmjs.org/@athanatoi94/opsx-review/-/opsx-review-0.1.0.tgz","fileCount":24,"integrity":"sha512-uCWDdqkEeyVRr8LVvj1OPzLpyXRXucZypdQCOkiOTKrlqvDR7n4hd4vbVnBloOZhZCye7KLGkoiTCXJ4w6zUXQ==","signatures":[{"sig":"MEUCIQDuFYfzPRRg6asXlkjcjBYAS63sYdbz9QjILlPFY/bu0wIgKjvX4QuXIchg//WSP8ACGEkbrxFpmq1mW4wgOE3VPCM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77213},"type":"module","engines":{"node":">=18"},"gitHead":"5f4c29eea840a7bee76553bae1470f858537e166","scripts":{"check":"node --check bin/opsx-review.mjs && node --check lib/review-core.mjs","pack:dry":"npm pack --dry-run"},"_npmUser":{"name":"athanatoi94","email":"baldwinwen94@gmail.com"},"_npmVersion":"11.7.0","description":"OpenSpec-style AI spec quality review gate for spec coding workflows.","directories":{},"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/opsx-review_0.1.0_1778225791203_0.9335767955714758","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@athanatoi94/opsx-review","version":"0.2.0","keywords":["openspec","spec-driven-development","spec-coding","ai-coding","spec-review","codex","claude"],"author":{"name":"athanatoi94"},"license":"UNLICENSED","_id":"@athanatoi94/opsx-review@0.2.0","maintainers":[{"name":"athanatoi94","email":"baldwinwen94@gmail.com"}],"bin":{"opsx-review":"bin/opsx-review.mjs"},"dist":{"shasum":"0ad1511169aba2cbb6efd14d28f7415104ee6626","tarball":"https://registry.npmjs.org/@athanatoi94/opsx-review/-/opsx-review-0.2.0.tgz","fileCount":29,"integrity":"sha512-9kOgOMaY1TsLk7vNxo/mFQ7esy0hCqAXJXGaSyiLMyM03vVnS8EF451uSYb60AbPZFJdHEt5pn63XpTmpeWSeA==","signatures":[{"sig":"MEYCIQDZcrCwUuaoVzA9F2JQpyKq4s/zZ9mwu7n9fkcTWwrpZQIhAPgGhfzS7OUKS1/KaP+kBB0BRUkwUGePT7VYIUyNLD5W","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90599},"type":"module","engines":{"node":">=18"},"gitHead":"5f4c29eea840a7bee76553bae1470f858537e166","scripts":{"check":"node --check bin/opsx-review.mjs && node --check lib/review-core.mjs","pack:dry":"npm pack --dry-run","openspec:review":"opsx-review","openspec:code-review":"opsx-review code_review","openspec:spec-review":"opsx-review spec_review"},"_npmUser":{"name":"athanatoi94","email":"baldwinwen94@gmail.com"},"_npmVersion":"11.7.0","description":"OpenSpec-style AI spec quality review gate for spec coding workflows.","directories":{},"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@athanatoi94/opsx-review":"^0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/opsx-review_0.2.0_1778231302971_0.8435944786850289","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@athanatoi94/opsx-review","version":"0.3.1","keywords":["openspec","spec-driven-development","spec-coding","ai-coding","spec-review","codex","claude"],"author":{"name":"athanatoi94"},"license":"UNLICENSED","_id":"@athanatoi94/opsx-review@0.3.1","maintainers":[{"name":"athanatoi94","email":"baldwinwen94@gmail.com"}],"bin":{"opsx-review":"bin/opsx-review.mjs"},"dist":{"shasum":"8a9d37633001f103f5aad35551dc604e231bd412","tarball":"https://registry.npmjs.org/@athanatoi94/opsx-review/-/opsx-review-0.3.1.tgz","fileCount":37,"integrity":"sha512-TQHZoMWb/MjVGPJFHccGTN7LV/arNwyBOd6Syogk1oOqVEmKwgSoQsiY41QGzI1BOhxy5X9mQh9e6oD8mgw0HQ==","signatures":[{"sig":"MEYCIQCcP8gYvCfQ+DM4jSkhuaOcGmjeW4cn5iEB31iSafNGmAIhAJet7gs9Qt2BCDQD1OTo+yyx2oECSXbn+/2i6SWnQ8ie","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":98616},"type":"module","engines":{"node":">=18"},"gitHead":"b081a77c3cd0b73090802f6d492cf9b613a12c73","scripts":{"check":"node --check bin/opsx-review.mjs && node --check lib/review-core.mjs","pack:dry":"npm pack --dry-run","openspec:review":"opsx-review","openspec:code-review":"opsx-review code_review","openspec:spec-review":"opsx-review spec_review"},"_npmUser":{"name":"athanatoi94","email":"baldwinwen94@gmail.com"},"_npmVersion":"11.7.0","description":"OpenSpec-style AI spec quality review gate for spec coding workflows.","directories":{},"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@athanatoi94/opsx-review":"^0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/opsx-review_0.3.1_1788177129949_0.14599133213046178","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"_id":"@athanatoi94/opsx-review@0.3.2","bin":{"opsx-review":"bin/opsx-review.mjs"},"dist":{"shasum":"83f5ec8379390c18dec5d3985d18125a4e86e8ad","tarball":"https://registry.npmjs.org/@athanatoi94/opsx-review/-/opsx-review-0.3.2.tgz","fileCount":39,"integrity":"sha512-RXM03vmDy7jyAnmrtufJFEKL7pE1DgNfN6kIiF1xMV0qBaYlSdEZ6oeeI6tgxfGTNig37cjbSXEPa+U/Z71QQA==","signatures":[{"sig":"MEYCIQCkpRVQztczJ0tqfTl54F9HZSva3P82p+KaTJslHfJGZQIhAPKeqPDCxzvJGIvn19H5R3JUlNMCbWKrSosb1HYW+B+z","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDcvlupBPb/COkhpeReddzNDgoaXGvqdw/or/eclkQuPQIgdFcP8XJJOLrfPEsjz56Ra0HLvXJNa+5EKYHsfm/dhW8="}],"unpackedSize":105023},"name":"@athanatoi94/opsx-review","type":"module","author":{"name":"athanatoi94"},"engines":{"node":">=18"},"gitHead":"92fb003788d8cb1321a42176d90becb9465c5383","license":"UNLICENSED","scripts":{"test":"node --test","check":"node --check bin/opsx-review.mjs && node --check lib/review-core.mjs && node --test","pack:dry":"npm pack --dry-run","openspec:ci":"opsx-review ci","openspec:review":"opsx-review","openspec:code-review":"opsx-review code_review","openspec:spec-review":"opsx-review spec_review","openspec:approve-plan":"opsx-review approve_plan"},"version":"0.3.2","_npmUser":{"name":"athanatoi94","email":"baldwinwen94@gmail.com"},"keywords":["openspec","spec-driven-development","spec-coding","ai-coding","spec-review","codex","claude"],"_npmVersion":"11.7.0","description":"OpenSpec-style AI spec quality review gate for spec coding workflows.","directories":{},"maintainers":[{"name":"athanatoi94","email":"baldwinwen94@gmail.com"}],"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opsx-review_0.3.2_1790236886604_0.10560439916489273"}}},"time":{"created":"2026-05-08T07:36:31.104Z","modified":"2026-09-24T08:01:26.824Z","0.1.0":"2026-05-08T07:36:31.370Z","0.2.0":"2026-05-08T09:08:23.094Z","0.3.1":"2026-08-31T11:52:10.088Z","0.3.2":"2026-09-24T08:01:26.683Z"},"author":{"name":"athanatoi94"},"license":"UNLICENSED","keywords":["openspec","spec-driven-development","spec-coding","ai-coding","spec-review","codex","claude"],"description":"OpenSpec-style AI spec quality review gate for spec coding workflows.","maintainers":[{"name":"athanatoi94","email":"baldwinwen94@gmail.com"}],"readme":"# @athanatoi94/opsx-review\n\nOpenSpec-style AI review gates for Spec Coding workflows.\n\nIt provides two focused gates:\n\n- `/prompts:opsx-spec-review`: reviews an OpenSpec design spec before implementation in Codex CLI.\n- `/prompts:opsx-code-review`: reviews code changes against the approved OpenSpec change in Codex CLI.\n- `/prompts:opsx-ci`: runs deterministic CI checks for a change in Codex CLI.\n- `/prompts:opsx-approve-plan`: optional local acknowledgement only; it is not a multi-person approval gate.\n\nBoth gates support Chinese and English output via `--lang zh|en` and produce:\n\n- structured JSON for machines and CI\n- Markdown reports for humans and PR comments\n- quality gates with decision, scores, risks, evidence, owners and close conditions\n\n## Requirements\n\n- Node.js 18+\n- Local `codex` CLI available in `PATH`, or a DeepSeek/OpenAI-compatible endpoint\n- Run `codex login` first if your local Codex CLI is not authenticated\n- An OpenSpec-style project with `openspec/changes/<change-id>/`\n\n## Quick Use\n\nRun spec review without installing. The core review rubric is built in; pass `--skills <dir>` only for repository-specific additions:\n\n```bash\nnpx @athanatoi94/opsx-review spec_review --change add-dark-mode --flow requirement \n```\n\nRun code review against the current working tree (`git diff HEAD` by default):\n\n```bash\nnpx @athanatoi94/opsx-review code_review --change add-dark-mode\n```\n\nRun English reports:\n\n```bash\nnpx @athanatoi94/opsx-review spec_review --change add-dark-mode --flow requirement --lang en\nnpx @athanatoi94/opsx-review code_review --change add-dark-mode --lang en\n```\n\nOne-time global install for local tools:\n\n```bash\nnpm install -g @athanatoi94/opsx-review\nopsx-review install-global\n```\n\nThis installs global command templates for supported tools where possible:\n\n```text\n~/.cursor/commands/opsx-spec-review.md\n~/.cursor/commands/opsx-code-review.md\n~/.codex/prompts/opsx-propose.md\n~/.codex/prompts/opsx-apply.md\n~/.codex/prompts/opsx-spec-review.md\n~/.codex/prompts/opsx-ci.md\n~/.codex/prompts/opsx-code-review.md\n~/.claude/commands/opsx-spec-review.md\n~/.claude/commands/opsx-code-review.md\n~/.opsx-review/commands/deepseek/*.md\n```\n\nProject initialization is optional. Use it only when the project should own local command templates, review skills, and npm scripts:\n\n```bash\nnpm install -D @athanatoi94/opsx-review\nnpx opsx-review init\n```\n\nInstall only the command templates for the tool your team uses:\n\n```bash\nnpx opsx-review init --tools codex\nnpx opsx-review init --tools cursor\nnpx opsx-review init --tools claude\n```\n\nWhen `--tools codex` is selected, the reusable `opsx-minimal-change` Skill is also installed at `.codex/skills/opsx-minimal-change/`.\n\nMultiple tools are comma-separated (`--tools codex,claude`). The review skills and npm scripts are shared and are installed for every selection. When `--tools` is omitted, all supported command templates are installed for backward compatibility.\n\nThen run either the project scripts or the global CLI:\n\n```bash\nnpm run openspec:spec-review -- --change add-dark-mode --flow requirement --strict\nnpm run openspec:code-review -- --change add-dark-mode --base main --strict\n npm run openspec:approve-plan -- --change add-dark-mode --by \"Alice\" --confirm\n npm run openspec:ci -- --change add-dark-mode --profile npm --strict\nopsx-review spec_review --change add-dark-mode --flow requirement --strict\nopsx-review code_review --change add-dark-mode --base main --strict\n```\n\n## Slash Commands\n\nAfter `opsx-review init`, project-level command templates are installed for Codex, Claude, and Cursor.\n\nCodex commands:\n\n```text\n/prompts:opsx-propose <change-id> [description]\n/prompts:opsx-apply <change-id>\n/prompts:opsx-spec-review <change-id> [requirement|technical|testcase]\n/prompts:opsx-ci <change-id>\n/prompts:opsx-code-review <change-id> [--base <ref>|--staged|--diff <path>]\n/prompts:opsx-ci <change-id>\n```\n\nCursor commands use hyphenated names because Cursor command names come from `.cursor/commands/*.md` filenames:\n\n```text\n/opsx-spec-review <change-id> [requirement|technical|testcase]\n/opsx-code-review <change-id> [--base <ref>|--staged|--diff <path>]\n```\n\n`/prompts:opsx-review` remains a compatibility alias for spec review. For English output, add `--lang en`.\n\n## Spec Review\n\nReview an OpenSpec change before implementation:\n\n```bash\nopsx-review spec_review --change <change-id> --flow requirement\nopsx-review spec_review --change <change-id> --flow technical --project-path .\nopsx-review spec_review --change <change-id> --flow testcase\n```\n\nReview standalone files:\n\n```bash\nopsx-review spec_review --file docs/prd.md --flow requirement\n```\n\nDefault outputs for `--change <id>`:\n\n```text\nopenspec/changes/<change-id>/spec-review.json\nopenspec/changes/<change-id>/spec-review.md\n```\n\n## Code Review\n\nReview code changes against an OpenSpec change:\n\n```bash\nopsx-review code_review --change <change-id> --base main\nopsx-review code_review --change <change-id> --base main --head feature/add-dark-mode\nopsx-review code_review --change <change-id> --staged\nopsx-review code_review --change <change-id> --diff /path/to/change.diff\n```\n\nDefault behavior without `--base`, `--staged`, or `--diff` is `git diff HEAD`.\n\nDefault outputs for `--change <id>`:\n\n```text\nopenspec/changes/<change-id>/code-review.json\nopenspec/changes/<change-id>/code-review.md\n```\n\n## DeepSeek and Local Models\n\nUse hosted DeepSeek:\n\n```bash\nexport DEEPSEEK_API_KEY=<your-key>\nopsx-review spec_review --change <change-id> --runner deepseek --model deepseek-chat --strict\nopsx-review code_review --change <change-id> --base main --runner deepseek --model deepseek-chat --strict\n```\n\nUse a local OpenAI-compatible endpoint, such as a local DeepSeek model exposed at `/v1/chat/completions`:\n\n```bash\nopsx-review spec_review --change <change-id> --runner local-deepseek --api-base http://localhost:11434/v1 --model deepseek-r1:7b --strict\nopsx-review code_review --change <change-id> --base main --runner local-deepseek --api-base http://localhost:11434/v1 --model deepseek-r1:7b --strict\n```\n\nYou can also configure defaults with environment variables:\n\n```bash\nexport OPSX_REVIEW_RUNNER=deepseek\nexport DEEPSEEK_API_KEY=<your-key>\nexport DEEPSEEK_MODEL=deepseek-chat\n```\n\n## CI Gates\n\nUse strict mode to fail unless the decision is `准入`:\n\n```bash\nopsx-review spec_review --change \"$CHANGE_ID\" --flow requirement --strict\nopsx-review code_review --change \"$CHANGE_ID\" --base origin/main --strict\n```\n\n## Init\n\n```bash\nopsx-review init\n```\n\nThis writes the following into the target project:\n\n```text\nreview-skills/*.md\nreview-skills-en/*.md\n.codex/prompts/opsx-review.md\n.codex/prompts/opsx-spec-review.md\n.codex/prompts/opsx-code-review.md\n.claude/commands/opsx-review.md\n.claude/commands/opsx-spec-review.md\n.claude/commands/opsx-code-review.md\n.cursor/commands/opsx-review.md\n.cursor/commands/opsx-spec-review.md\n.cursor/commands/opsx-code-review.md\nopenspec/OPSX_REVIEW.md\npackage.json scripts.openspec:review\npackage.json scripts.openspec:spec-review\npackage.json scripts.openspec:code-review\n```\n\n## Options\n\n```text\nspec_review          Review OpenSpec documents before implementation.\ncode_review          Review code changes against an OpenSpec change.\n--change <id>        Review openspec/changes/<id> as one spec bundle.\n--file <path>        Review a single markdown/text file. Can be repeated for spec_review.\n--root <dir>         Target project root. Defaults to current working directory.\n--flow <flow>        requirement, technical, testcase, or Chinese flow name.\n--skills <dir>       Append markdown files in a skills directory.\n--lang <zh|en>       Output language. Defaults to zh.\n--project-path <dir> Add target project context for technical spec review.\n--diff <path>        Read a pre-generated diff file for code_review.\n--base <ref>         Git base ref for code_review. Defaults to HEAD when omitted.\n--head <ref>         Git head ref for code_review. Used with --base.\n--staged             Review staged changes with git diff --cached.\n--out <path>         Write structured JSON result.\n--report <path>      Write markdown report. Defaults beside JSON output.\n--runner <runner>    codex, deepseek, local-deepseek, or openai-compatible. Defaults to codex.\n--api-base <url>     Chat completions API base for openai-compatible runners.\n--api-key <key>      API key. Defaults to DEEPSEEK_API_KEY or OPENAI_API_KEY.\n--model <name>       Model for openai-compatible runners.\n--strict             Exit 1 unless decision_status is pass.\n```\n\n## Decision Status\n\n`review.decision_status` is the stable machine field used by `--strict`:\n\n```text\npass         Gate passed.\nconditional  Gate can pass after listed issues are addressed.\nhold         Gate should not pass yet.\n```\n\n`review.decision` is localized for humans, for example `准入` in Chinese or `Pass` in English.\n\n## One-command delivery loop\n\nAfter `opsx-review init --tools codex` in a project, the developer-facing interface in Codex CLI is only `/prompts:opsx-*`. The npm commands below are implementation details used by those prompts; developers do not need to type them directly.\n\n```bash\n# 1. AI quality review of proposal/design (optional but recommended)\n/prompts:opsx-spec-review <change-id> technical\n\n# 2. AI implementation; for a solo developer, /prompts:opsx-apply is the approval-to-implement action\n/prompts:opsx-apply <change-id>\n\n# 3. AI-orchestrated CI/test gate\n/prompts:opsx-ci <change-id>\n\n# 4. AI first code review\n/prompts:opsx-code-review <change-id>\n\n# 5. Human final code review and merge (manual; no CLI bypass)\n```\n\nThe optional acknowledgement command is not part of the normal developer flow. For multi-person technical review, use the repository's PR/DevOps approval rules. `/prompts:opsx-ci` records reproducible test evidence and `/prompts:opsx-code-review` produces the AI first-review report. Human review remains the final merge gate.\n\n## Version 0.3.1\n\nThis version makes minimal change the default design, implementation, and review policy; loads extra review skills only when requested; and removes the package self-dependency.\n\n## Publishing\n\nBefore publishing:\n\n```bash\nnpm run check\nnpm pack --dry-run\n```\n\nPublish as public scoped package:\n\n```bash\nnpm publish --access public\n```\n","readmeFilename":"README.md"}