Title: feat(forge-cli): eforge ai-review with confirmed/probable/suggestion classification and deterministic guard · Issue #92 · elcode-id/elcode-forge · GitHub
Open Graph Title: feat(forge-cli): eforge ai-review with confirmed/probable/suggestion classification and deterministic guard · Issue #92 · elcode-id/elcode-forge
X Title: feat(forge-cli): eforge ai-review with confirmed/probable/suggestion classification and deterministic guard · Issue #92 · elcode-id/elcode-forge
Description: 1. Context & Objective Implement the eforge ai-review command in crates/forge-cli that runs deterministic diff/PR review first, then optionally augments it with AI review items classified as Confirmed | Probable | Suggestion enforced by ...
Open Graph Description: 1. Context & Objective Implement the eforge ai-review command in crates/forge-cli that runs deterministic diff/PR review first, then optionally augments it with AI review items classified as Confir...
X Description: 1. Context & Objective Implement the eforge ai-review command in crates/forge-cli that runs deterministic diff/PR review first, then optionally augments it with AI review items classified as Co...
Opengraph URL: https://github.com/elcode-id/elcode-forge/issues/92
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(forge-cli): eforge ai-review with confirmed/probable/suggestion classification and deterministic guard","articleBody":"## 1. Context & Objective\nImplement the `eforge ai-review` command in `crates/forge-cli` that runs deterministic diff/PR review first, then optionally augments it with AI review items classified as `Confirmed | Probable | Suggestion` enforced by `apply_deterministic_guard` so AI never overrides deterministic security findings or `--fail-on` exit codes (PRD §21, §78).\n\n- **Parent Epic:** #84\n- **GitFlow Branch:** `feat/forge-092-cmd-ai-review`\n- **Execution Wave:** `wave-12`\n- **DAG Dependencies:** Depends on #91\n- **Estimated Size:** ~360 LOC (`\u003c 400 LOC`)\n\n## 2. Target Files\n- `crates/forge-cli/src/commands/ai_review.rs` *(NEW: `AiClassification`, `AiReviewItem`, `AiReviewReport`, `apply_deterministic_guard`, `run_ai_review`)*\n- `crates/forge-cli/src/cli.rs` *(MODIFY: add `AiReview` subcommand)*\n- `crates/forge-cli/src/lib.rs` *(MODIFY: wire `AiReview` dispatch and formatters)*\n- `crates/forge-cli/src/formatters/markdown.rs` *(MODIFY: render `AiReviewReport` for PR comments / GitHub format)*\n\n## 3. Public Contract\n```rust\npub enum AiClassification {\n Confirmed,\n Probable,\n Suggestion,\n}\n\npub struct AiReviewItem {\n pub classification: AiClassification,\n pub title: String,\n pub rationale: String,\n pub file: Option\u003cString>,\n pub line: Option\u003cu32>,\n pub related_finding_id: Option\u003cString>,\n}\n\npub struct AiReviewReport {\n pub deterministic: ReviewReport,\n pub ai_items: Vec\u003cAiReviewItem>,\n pub model: String,\n pub usage: TokenUsage,\n pub cached: bool,\n}\n\npub fn apply_deterministic_guard(\n det: &ReviewReport,\n known_files: &BTreeSet\u003cString>,\n items: Vec\u003cAiReviewItem>,\n) -> Vec\u003cAiReviewItem>;\n```\n- CLI: `eforge ai-review [--path \u003cdir>] [--base \u003cref>] [--head \u003cref>] [--fast] [--fail-on \u003csev>] [--provider \u003ckind>] [--model \u003cid>] [--dry-run] [--no-cache] [--format terminal|json|markdown|github]`\n\n## 4. Security & Privacy Invariants (PRD §21 Grounding Guard)\n- Deterministic findings in `det` are rendered verbatim first and CANNOT be deleted, suppressed, or downgraded by AI output.\n- An `AiReviewItem` with `AiClassification::Confirmed` is valid ONLY if `related_finding_id` matches a real finding ID in `det`; otherwise `apply_deterministic_guard` automatically downgrades it to `AiClassification::Probable`.\n- Any `AiReviewItem` referencing a `file` not present in the repository/diff `known_files` is discarded.\n- Process exit code for `--fail-on` is computed strictly from `det` (deterministic findings only).\n\n## 5. Definition of Done & Verification (Tier 2)\n- Unit and integration tests for `apply_deterministic_guard` (unlinked `Confirmed` -> `Probable` downgrade, hallucinated file rejection, deterministic security findings preserved), `terminal|json|markdown|github` format outputs, `--dry-run`, and `--fail-on` exit code invariance.\n- **Selective Verification Gate (Tier 2):**\n 1. `cargo fmt --package forge-cli -- --check`\n 2. `cargo clippy --package forge-cli --all-targets -- -D warnings`\n 3. `cargo test --package forge-cli`\n 4. Smoke run: `cargo run --bin eforge -- doctor --format json`","author":{"url":"https://github.com/luksluki","@type":"Person","name":"luksluki"},"datePublished":"2026-10-19T14:22:31Z","url":"https://github.com/elcode-id/elcode-forge/issues/92"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f06de830-54da-2142-9d23-6d1f9bdcc8eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B9A0:2B3C9F:15CC61:1D854A:6B059796 |
| html-safe-nonce | 60acc2a3c1b77becac0a84020e8a1611e3bf2c5ea60fd97bf42a373dd9eb71d9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUEwOjJCM0M5RjoxNUNDNjE6MUQ4NTRBOjZCMDU5Nzk2IiwidmlzaXRvcl9pZCI6IjQ4MjE5MzQzMjg3NDM1NjUyMDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d2911b0378d873435a52698640001c25ed77857cf20d659d909b83b1c6ac3da4 |
| hovercard-subject-tag | issue:5925667110 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/elcode-id/elcode-forge/92/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ccf81d2583850216d0a7cb8ff2bd952c475740b5cdd8dbc3a9a2327e6ad1d092/elcode-id/elcode-forge/issues/92 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ccf81d2583850216d0a7cb8ff2bd952c475740b5cdd8dbc3a9a2327e6ad1d092/elcode-id/elcode-forge/issues/92 |
| og:image:alt | 1. Context & Objective Implement the eforge ai-review command in crates/forge-cli that runs deterministic diff/PR review first, then optionally augments it with AI review items classified as Confir... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | luksluki |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3b72fd2385d76a50ce0fe937d50bb4a81434432c4fd47866074a26f6cd03623f |
| turbo-cache-control | no-preview |
| go-import | github.com/elcode-id/elcode-forge git https://github.com/elcode-id/elcode-forge.git |
| octolytics-dimension-user_id | 337957755 |
| octolytics-dimension-user_login | elcode-id |
| octolytics-dimension-repository_id | 1423983661 |
| octolytics-dimension-repository_nwo | elcode-id/elcode-forge |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1423983661 |
| octolytics-dimension-repository_network_root_nwo | elcode-id/elcode-forge |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 58e2bd32336f3dcee343ec627a4d09c7c444e214 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width