Case study / Contract-bound repository maintenance
RepoDiet.
Repository maintenance for JS/TS codebases: evidence-gated triage, a signed change contract, bounded changes on an isolated branch, and a signed verification receipt.
- Role
- Full-stack engineer
- Type
- Repository maintenance automation
- Stack
- Next.js 15 · GitHub App · Vercel Sandbox
- Core idea
- Signed contract, separate verifier role
- Origin
- OKX.AI Genesis Hackathon

Product interface from the working public build.
- 1Classified findings
Each finding is labelled safe, review-first, or protected before anything changes.
- 2Five-stage pipeline
Analyze, contract, execute, verify, deliver — every stage is visible.
- 3Locked contract
Scope, change budget, and protected paths such as auth and migrations are fixed up front.
- 4Bounded execution
Changes happen on an isolated branch and are checked against the budget before delivery.
Problem and constraints
RepoDiet was built for the OKX.AI Genesis Hackathon (Software Utility track). AI-assisted codebases accumulate dead code, duplication, and unclear boundaries; RepoDiet is designed around the maintenance workflow — evidence, scope, verification, and review — rather than patch generation.
The product needed to make a technically dense workflow understandable without hiding the states a user must evaluate. The public build and source repository are linked above; no private client metrics are claimed.
Role and scope
Muhammad Abdullah worked on RepoDiet as a full-stack engineer. Origin: OKX.AI Genesis Hackathon — Software Utility track.
- ProductMaintenance workflow and review experience
- InterfaceFindings, pipeline, and contract views
- EngineeringGitHub App, sandbox, and verifier flow
- ReleaseDeployed public build and repository
What was built
Triage runs Knip, jscpd, and Madge behind an evidence gate with a counter-evidence search, classifying each finding as safe_candidate, review_first, or protected. A repodiet.contract/v1 pins the source commit and lists finding IDs, allowed and protected paths, seven allowed operations, change budgets, and a verification policy, identified by a canonical JSON digest. Changes run in a sandbox with a secret firewall on an isolated branch — never a direct push to main, never an auto-merge. A separate verifier role compares baseline and patched runs with the required GitHub checks, then issues an RSA-SHA256 receipt as an in-toto Statement in a DSSE envelope, signed with its own attestation key against a pinned public trust root.
- Evidence-gated triage (Knip, jscpd, Madge)
- Signed, commit-pinned change contracts
- Separate verifier role and signing key
- in-toto / DSSE signed receipts
Architecture and workflow
Next.js 15 and React 19 with Tailwind, Radix UI, and Zod; a GitHub App through Octokit and simple-git; Vercel Sandbox and Vercel Workflow for execution; Upstash Redis for state; an A2A task state machine; and an x402 Quick Triage endpoint on X Layer (OKX x402, OpenClaw). Workers run on Express and Docker via Fly.io and GitHub Actions, with Sentry and Playwright.
- 01AnalyzeEvidence-gated, commit-pinned triage
- 02ContractPaths, 7 operations, budgets
- Isolated branch03ExecuteBounded changes only
- 04VerifySeparate verifier role and key✕ fails: to 07 Out of contract
- 05DeliverReview-ready pull request
- 06Signed receiptin-toto / DSSE, RSA-SHA256
- 07Out of contractStopped, not merged
- Maintenance path
- Stopped change
- Isolated branch
Implementation and verification are separate steps; the reviewer receives evidence, not just a diff.
Selected technical decisions
- 01Lock scope in a signed, commit-pinned contract before any change.
Allowed paths, protected paths, operations, and budgets are fixed against a pinned commit, and path traversal or null bytes are rejected.
- 02Give verification its own role and signing boundary.
The verifier compares baseline and patched runs and signs with its own attestation key — a separate role with its own verification and signing boundary, inside the same service rather than on independent infrastructure.
- 03Never push to main or merge automatically.
A human reviewer decides. The tool delivers a pull request and evidence, never a merge.
Environment and limitations
What this build does not claim, stated plainly.
- 01Supported repositories
Public JavaScript/TypeScript repositories only. Private repositories and other languages are not supported.
- 02Verifier boundary
The verifier is a separate role with its own verification and signing boundary, but it runs inside the same service — it is not independent infrastructure.
- 03No usage claims
Demo runs and demo test counts are demonstrations, not customer usage. No customers, paid usage, revenue, accuracy rates, or security audit are claimed.
Testing and public evidence
Everything here can be checked without taking my word for it.
- Live product walkthrough
- Public source repository
- Receipts checkable against a pinned trust root
PROJECT INQUIRY
Discuss the workflow you want to automate.
Share the goal, current state, constraints, and useful links. I’ll help identify the most useful path forward.