Title: feat(forge-core,forge-git,forge-cli): derive JsonSchema for IR and add eforge schema command · Issue #58 · elcode-id/elcode-forge · GitHub
Open Graph Title: feat(forge-core,forge-git,forge-cli): derive JsonSchema for IR and add eforge schema command · Issue #58 · elcode-id/elcode-forge
X Title: feat(forge-core,forge-git,forge-cli): derive JsonSchema for IR and add eforge schema command · Issue #58 · elcode-id/elcode-forge
Description: Context & Objective Make Rust types the single source of truth for the dashboard contract by deriving schemars::JsonSchema on every type reachable from ReportBundle, and export it via eforge schema. Branch Name: feat/forge-058-json-schem...
Open Graph Description: Context & Objective Make Rust types the single source of truth for the dashboard contract by deriving schemars::JsonSchema on every type reachable from ReportBundle, and export it via eforge schema...
X Description: Context & Objective Make Rust types the single source of truth for the dashboard contract by deriving schemars::JsonSchema on every type reachable from ReportBundle, and export it via eforge sc...
Opengraph URL: https://github.com/elcode-id/elcode-forge/issues/58
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(forge-core,forge-git,forge-cli): derive JsonSchema for IR and add eforge schema command","articleBody":"## Context & Objective\nMake Rust types the single source of truth for the dashboard contract by deriving `schemars::JsonSchema` on every type reachable from `ReportBundle`, and export it via `eforge schema`.\n\n- **Branch Name:** `feat/forge-058-json-schema-export`\n- **Parent Epic:** EPIC #53 (Phase 3A)\n- **DAG Dependencies:** Requires #57 (Sub-Issue 3.2)\n- **Estimated Size:** \u003c 250 LOC\n\n## Crate & File Target\n- `Cargo.toml` *(MODIFY — workspace dependency `schemars`)*\n- `crates/forge-core/src/{ir.rs,scoring.rs}` *(MODIFY)*\n- `crates/forge-git/src/{diff.rs,hotspot.rs,impact.rs,log.rs}` *(MODIFY)*\n- `crates/forge-cli/src/commands/schema.rs` *(NEW)*, `report.rs`, `cli.rs`, `commands/mod.rs`, `lib.rs` *(MODIFY)*\n\n## Strict Input/Output Rust Type Contract\n```rust\n// #[derive(JsonSchema)] added to: Severity, Confidence, SourceLocation, Finding, FileNode, Module,\n// Dependency, DimensionScore, HealthScore, Repository, RiskLevel, RiskReport, FileChange,\n// HotspotEntry, ChangeImpactReport, GitRevision, ArchitectureSummary, ReportBundle.\n\npub fn render_report_schema() -> Result\u003cString, ForgeError>;\n```\nCLI: `eforge schema [-o \u003cFILE>]`.\n\n## Tests\n- Snapshot test: schema output is stable (deterministic key ordering).\n- Validate the `fixtures/next-app` bundle against the exported schema (`jsonschema` as dev-dependency).\n\n## Definition of Done (Tier 3 Verification Gate)\n```bash\ncargo fmt --all -- --check\ncargo clippy --workspace --all-targets -- -D warnings\ncargo test --workspace --lib --bins\n```\n## Global Invariants (AGENTS.md)\n- GitFlow: branch off `develop`, PR targets `develop`, squash-merge, update `docs/ARCHITECTURE_STATE.md`.\n- Zero-panic in `crates/forge-*` (no `unwrap/expect/panic/todo/unimplemented`); Rust core stays 100% UI-agnostic.\n- Determinism: identical repo state + config => byte-identical output (no wall-clock timestamps).\n- Repository text is hostile input: never rendered via `{@html}`, never executed.\n- Plan reference: Phase 3 Dashboard Plan (approved 2026-10-19).\r\n","author":{"url":"https://github.com/luksluki","@type":"Person","name":"luksluki"},"datePublished":"2026-10-19T07:23:10Z","url":"https://github.com/elcode-id/elcode-forge/issues/58"}
| 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:e10ef980-8554-1324-d86f-c46b408979e5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C7B4:3AEE53:1860B8:214F2F:6B05980C |
| html-safe-nonce | a456bdd05b4fb5999676f261a5f8f5a933b623b2a5a418e0443304928ebb8269 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0I0OjNBRUU1MzoxODYwQjg6MjE0RjJGOjZCMDU5ODBDIiwidmlzaXRvcl9pZCI6IjEyODA3MDA0MDQxMTU4MDYyMjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 21dbb89f5798236bee8e42477325bc1181962514ad1cd5eaa9f975d327a6664b |
| hovercard-subject-tag | issue:5919651737 |
| 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/58/issue_layout |
| twitter:image | https://opengraph.githubassets.com/96b7e1f93d0528029cfe2a6fc955d808f5ce9b182060906c808ff76494c95ae5/elcode-id/elcode-forge/issues/58 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/96b7e1f93d0528029cfe2a6fc955d808f5ce9b182060906c808ff76494c95ae5/elcode-id/elcode-forge/issues/58 |
| og:image:alt | Context & Objective Make Rust types the single source of truth for the dashboard contract by deriving schemars::JsonSchema on every type reachable from ReportBundle, and export it via eforge schema... |
| 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