How davyjones7321/jev-state-engine works
Jev State Engine takes a task ticket, investigates the target repository, plans scoped subgoals, implements them, and gates each change before committing or retrying. After the plan is exhausted, it performs final verification and either completes or escalates. The CLI wires the engine to a workspace, an LLM, and the Jev Gatekeeper; the engine persists resumable state and strike counters in SQLite. The README documents the workflow and limitations; sampled excerpts confirm workspace checks and Gatekeeper API behavior, while some engine orchestration details are unsampled.
Main entry points: engine.py Jev engine · workspace.py Workspace operations · main.py CLI entry · gatekeeper.py Jev Gatekeeper
Components 16
Task workflow
- Investigation
src/jev/engine.py - Subgoal planning
src/jev/engine.py - Subgoal implementation
src/jev/engine.py
Engine runtime
- CLI entry
src/main.py - Jev engine
src/jev/engine.py - State models
src/jev/models.py
Repository changes
- Workspace operations
src/jev/workspace.py
Validation services
- Subgoal gate
src/jev/engine.py - Final verification
src/jev/engine.py - Jev Gatekeeper
src/jev/gatekeeper.py
Other components
- Ticket requester
- Gemini LLM
- Jev System One API
- Target Git repository
- SQLite checkpoints
- Escalation log
Connections 26
- Ticket requester → CLI entry: submits ticket
- CLI entry → Jev engine: executes run
- CLI entry → Workspace operations: configures workspace
- CLI entry → Jev Gatekeeper: configures gate
- CLI entry → Gemini LLM: configures LLM
- Jev engine → Investigation: dispatches phase
- Jev engine → Subgoal planning: dispatches phase
- Jev engine → Subgoal implementation: dispatches phase
- Jev engine → Subgoal gate: dispatches gate
- Jev engine → Final verification: dispatches verification
- Investigation → Gemini LLM: requests exploration
- Investigation → Workspace operations: reads repository
- Subgoal planning → Gemini LLM: requests plan
- Subgoal implementation → Gemini LLM: requests code
- Subgoal implementation → Workspace operations: writes scoped changes
- Subgoal gate → Workspace operations: runs mechanical checks
- Subgoal gate → Jev Gatekeeper: requests semantic verdict
- Jev Gatekeeper → Jev System One API: posts validation
- Final verification → Workspace operations: collects final diff
- Final verification → Jev Gatekeeper: requests ticket verification
- Workspace operations → Target Git repository: reads and changes
- Workspace operations → Target Git repository: commits or rolls back
- Jev engine → SQLite checkpoints: persists run state
- Jev engine → Escalation log: records escalation
- Jev engine → State models: uses typed state
- Jev Gatekeeper → State models: uses verdict models