{"_id":"@agentopssec/agent-review","name":"@agentopssec/agent-review","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@agentopssec/agent-review","version":"1.0.0","description":"Review AI agent behavior, not just code diffs.","type":"module","homepage":"https://AgentOpsSec.com/projects/agent-review","repository":{"type":"git","url":"git+https://github.com/AgentOpsSec/agent-review.git"},"bugs":{"url":"https://github.com/AgentOpsSec/agent-review/issues"},"bin":{"agent-review":"bin/agent-review.js"},"scripts":{"test":"node --test","check":"node --check bin/agent-review.js && node --test"},"keywords":["agent","review","security","diff","cli"],"license":"MIT","engines":{"node":">=20"},"publishConfig":{"access":"public"},"author":{"name":"Aunt Gladys Nephew","url":"https://auntgladysnephew.com"},"gitHead":"bb5047342b0eb9b5c7f35ec6d71ceaa86983bd6c","_id":"@agentopssec/agent-review@1.0.0","_nodeVersion":"25.6.1","_npmVersion":"11.9.0","dist":{"integrity":"sha512-q+SHLKEifCGR62dX6YQRXOC6rfeS4T4Rfdw1/p6BPl2rWLEaQfnV7kfRBZCpyRz0OYJRcLH9xcjmnOmRmzmnlA==","shasum":"5d9abf2483bd47480257981a4048da628326fb4b","tarball":"https://registry.npmjs.org/@agentopssec/agent-review/-/agent-review-1.0.0.tgz","fileCount":12,"unpackedSize":34568,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICPSBtx3rGKPUKc0+NcUdm17WW0cm6AGVlead0yDuuOBAiEAstXqOvTjqZ0t3iYe1mPEz7zKLS4R6W6GX43C4OsbiyU="}]},"_npmUser":{"name":"agentopssec","email":"agentopssecurity@gmail.com"},"directories":{},"maintainers":[{"name":"agentopssec","email":"agentopssecurity@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-review_1.0.0_1777236585234_0.8848751293571253"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-26T20:49:45.156Z","1.0.0":"2026-04-26T20:49:45.362Z","modified":"2026-04-26T20:49:45.542Z"},"maintainers":[{"name":"agentopssec","email":"agentopssecurity@gmail.com"}],"description":"Review AI agent behavior, not just code diffs.","homepage":"https://AgentOpsSec.com/projects/agent-review","keywords":["agent","review","security","diff","cli"],"repository":{"type":"git","url":"git+https://github.com/AgentOpsSec/agent-review.git"},"author":{"name":"Aunt Gladys Nephew","url":"https://auntgladysnephew.com"},"bugs":{"url":"https://github.com/AgentOpsSec/agent-review/issues"},"license":"MIT","readme":"# Agent Review\n\n**Review the agent's behavior, not just the code diff.**\n\nAgent Review evaluates AI agent runs for unsafe, unnecessary, or suspicious\nbehavior. It helps developers understand whether an agent stayed in scope,\nchanged sensitive files, skipped tests, added dependencies, or took risky\nactions on the way to a final diff.\n\nThink of it as:\n\n```txt\nCode review for agent behavior\n```\n\n## Why This Exists\n\nTraditional code review looks at the final diff. Agent-generated work also\nneeds review of the path the agent took.\n\nAgent Review answers questions like:\n\n- Did the agent modify files outside the requested scope?\n- Did it touch auth, security, CI, deployment, or secrets?\n- Did it add dependencies unnecessarily?\n- Did it delete code instead of fixing it?\n- Did it skip tests?\n- Did it change public APIs?\n- Did it create migrations?\n- Did it hide or ignore errors?\n- Did it run risky shell commands?\n- Where should a human reviewer focus first?\n\nAgent Review turns agent behavior into concrete findings.\n\n## Install\n\n```bash\nnpm install -g @agentopssec/agent-review\n```\n\nOr run it without installing:\n\n```bash\nnpx -y @agentopssec/agent-review --from-git-diff\n```\n\n## Update\n\n```bash\nagent-review update          # check the registry, prompt before installing\nagent-review update --yes    # update without prompting\n```\n\n## Primary Workflow\n\nAgent Review starts by reviewing a local diff or recorded agent run:\n\n```bash\nagent-review --from-git-diff\n```\n\nThe workflow should do three things well:\n\n1. Detect risky behavior and sensitive changes.\n2. Compare the requested task to the files changed.\n3. Produce a clear risk score and review summary.\n\n## CLI\n\n```bash\nagent-review latest\nagent-review run_001\nagent-review --from-git-diff\nagent-review --from-agent-flight run_001\nagent-review --from-agent-sandbox run_001\nagent-review --from-mcp-firewall\nagent-review --github-pr 123\nagent-review --ci\nagent-review --ci --fail-on medium\nagent-review --json\nagent-review update [--yes]\n```\n\n## Standalone and Stack Use\n\nAgent Review runs on its own against the current git diff:\n\n```bash\nagent-review --from-git-diff\n```\n\nWhen used with the full AgentOpsSec stack, it can optionally review logs from\nAgent Flight Recorder, Agent Sandbox, and MCP Firewall. These are file-based\ninputs, not package dependencies:\n\n```bash\nagent-review --from-agent-flight latest\nagent-review --from-agent-sandbox latest\nagent-review --from-mcp-firewall\n```\n\n## What Agent Review Checks\n\nAgent Review analyzes agent logs, git diffs, tool calls, and command history for:\n\n- Files changed outside likely scope\n- Sensitive file changes\n- Dependency changes\n- Missing tests\n- Risky shell commands\n- Secret file access\n- CI/CD config changes\n- Auth and permission logic changes\n- Database migrations\n- Public API changes\n- Production config changes\n- Large diffs from narrow prompts\n- Suspicious file deletion\n- Error suppression\n\n## Example Output\n\n```txt\nAgent Review by github.com/AgentOpsSec\n\nPrompt:\nFix the pricing card button alignment.\n\nResult:\nHigh-risk agent behavior detected.\n\nFindings:\n- Modified files outside likely UI scope\n- Changed auth/session.ts\n- Changed middleware.ts\n- Added new dependency\n- No tests detected\n\nRecommendation:\nDo not merge until security-sensitive files are manually reviewed.\n\nScore: D\n```\n\n## Review Result Shape\n\n```json\n{\n  \"tool\": {\n    \"name\": \"Agent Review\",\n    \"by\": \"github.com/AgentOpsSec\",\n    \"repository\": \"github.com/AgentOpsSec/agent-review\"\n  },\n  \"score\": \"D\",\n  \"risk\": \"high\",\n  \"summary\": \"High-risk agent behavior detected.\",\n  \"findings\": [\n    {\n      \"type\": \"scope\",\n      \"severity\": \"high\",\n      \"message\": \"Task appears UI-only, but auth files changed.\",\n      \"files\": [\"auth/session.ts\", \"middleware.ts\"]\n    },\n    {\n      \"type\": \"tests\",\n      \"severity\": \"medium\",\n      \"message\": \"No test execution detected.\"\n    }\n  ],\n  \"recommendation\": \"Review security-sensitive files before accepting the diff.\"\n}\n```\n\n## Input Sources\n\nAgent Review can consume:\n\n- Local git diffs\n- Agent Flight Recorder logs\n- MCP Firewall logs\n- Shell command history\n- Tool-call logs\n- Pull request metadata\n- CI output\n\nIt outputs:\n\n- Risk score\n- Review summary\n- Scope assessment\n- Sensitive file warnings\n- Dependency warnings\n- Test status\n- Recommended reviewer focus\n- JSON for automation\n\nGitHub pull request review uses the GitHub CLI:\n\n```bash\ngh auth login\nagent-review --github-pr 123\n```\n\n## Design Principles\n\n- Local-first\n- Open-source\n- No telemetry by default\n- Rule-based and explainable\n- CI-friendly\n- Focused reviewer guidance\n- Conservative around sensitive changes\n- Useful without hosted infrastructure\n\n## Initial Release Scope\n\nThe initial release includes local diff review, agent log review, sensitive file\ndetection, dependency warnings, test detection, and CI-friendly output.\n\n### 1.0: Local Diff Review\n\n- Read the current git diff\n- Categorize changed files\n- Detect sensitive paths and config files\n- Detect dependency and lockfile changes\n- Detect broad diffs from narrow task descriptions\n- Generate a terminal review summary\n\n### 1.0: Agent Run Review\n\n- Read Agent Flight Recorder logs\n- Compare prompt intent to changed files\n- Detect whether tests ran\n- Detect risky shell commands\n- Detect secret file access when logs include it\n- Produce reviewer focus areas\n\n### 1.0: Automation and Scoring\n\n- Generate a structured risk score\n- Support JSON output\n- Support CI mode\n- Emit pass, warn, or fail decisions\n- Summarize findings by severity\n- Support pull request review inputs\n\n\n## Output\n\nReports use plain-language status words rather than raw exit codes:\n\n- `ok` — the step ran successfully (green).\n- `failed (exit N)` — the step exited non-zero (red); the original code is preserved.\n- `skipped (reason)` — the step was not applicable (dim).\n\nSeverity colors follow the AgentOpsSec palette (safe = green, warning = amber, risk = red). The palette honors `NO_COLOR` and `FORCE_COLOR`, and JSON / CSV output stays plain.\n\n\n- Repo: https://github.com/AgentOpsSec/agent-review\n- npm: https://www.npmjs.com/package/@agentopssec/agent-review\n- AgentOpsSec stack: https://github.com/AgentOpsSec/stack\n- Website: https://AgentOpsSec.com\n\n## Author\n\nCreated and developed by **Aunt Gladys Nephew**.\n\n- Website: https://auntgladysnephew.com\n- GitHub: https://github.com/auntgladysnephew\n- X: https://x.com/AGNonX\n","readmeFilename":"README.md","_rev":"1-fd9b12827d9214e9c282247b8c0c05a2"}