How norhan1995/impactgate works
ImpactGate turns a proposed destructive workspace action into a reviewable, guarded transaction: a human inspects a simulation, may adjust scope or reject it, and approved actions are checked against live state before execution. The backend persists simulations, outcomes, snapshots, and audit entries; the engine supplies the simulation, preflight, delete, and rollback logic. The UI excerpt is partial, so specific client wiring beyond its state refresh and the documented workflow is not inferred.
Main entry points: local-server.mjs HTTP API · App.tsx ImpactGate UI · engine.mjs Blast-radius simulation
Components 16
Review workflow
- ImpactGate UI
src/App.tsx - Action intent
src/App.tsx - Effects and diff
src/App.tsx - Approve, tweak, reject
src/App.tsx - Commit or block
src/App.tsx
API and persistence
- HTTP API
backend/local-server.mjs - Persisted demo state
backend/local-server.mjs - Audit trail
backend/local-server.mjs
Safety engine
- Blast-radius simulation
core/engine.mjs - State fingerprint
core/engine.mjs - Authoritative preflight
core/engine.mjs - Workspace deletion
core/engine.mjs - Rollback snapshot
core/engine.mjs - Rollback restore
core/engine.mjs
Other components
- Agent
- Human reviewer
Connections 26
- Agent → Action intent: proposes
- Action intent → ImpactGate UI: enters intent
- ImpactGate UI → HTTP API: requests state
- HTTP API → Persisted demo state: reads state
- Persisted demo state → HTTP API: returns state
- ImpactGate UI → HTTP API: requests simulation
- HTTP API → Blast-radius simulation: calls simulate
- Blast-radius simulation → State fingerprint: computes fingerprint
- HTTP API → Persisted demo state: saves simulation
- Blast-radius simulation → Effects and diff: returns effects
- Effects and diff → Human reviewer: presents diff
- Human reviewer → Approve, tweak, reject: decides scope
- Approve, tweak, reject → HTTP API: rejects or approves
- HTTP API → Persisted demo state: loads simulation
- HTTP API → Workspace deletion: calls execute
- Workspace deletion → Authoritative preflight: checks live state
- Authoritative preflight → State fingerprint: recomputes fingerprint
- Workspace deletion → Rollback snapshot: captures before delete
- HTTP API → Persisted demo state: saves outcome
- HTTP API → Audit trail: records decision
- HTTP API → Commit or block: returns result
- Commit or block → Human reviewer: shows result
- ImpactGate UI → HTTP API: requests rollback
- HTTP API → Rollback restore: calls restore
- Rollback restore → Rollback snapshot: reads snapshot
- HTTP API → Persisted demo state: saves restored state