How sanjayimmanuel24/graphgate works
GraphGate is a research prototype for a security gate in iterative LLM code refinement. In the sampled runtime, a user configures and runs a refinement harness: the driver sends prompts to a code-generation client, updates repository snapshots, and records traces; traces can then be replayed deterministically. Dataset modules prepare and slice vulnerability scenarios, and injection supports placing a regression into a run. The README describes the intended temporal code-graph security gate, but the project status is M1.1 and no gate-analysis implementation is established by the supplied evidence. Relationships below follow excerpts and SOURCE INDEX references; unsampled modules are represented only where their paths are listed.
Main entry points: driver.py Loop driver · cli.py CLI · replay.py Trace replay · anthropic_client.py Anthropic client
Components 20
Run entry
- CLI
src/graphgate/cli.py - Run config
src/graphgate/config.py
Refinement harness
- Loop driver
src/graphgate/harness/driver.py - Repo snapshot
src/graphgate/harness/snapshot.py - Change diff
src/graphgate/harness/diff.py - Trace records
src/graphgate/harness/trace.py - Trace replay
src/graphgate/harness/replay.py
Scenario data
- Event loader
src/graphgate/dataset/events.py - Source scrubber
src/graphgate/dataset/scrub.py - Scenario slicer
src/graphgate/dataset/slicing.py - Advisories
src/graphgate/dataset/advisories.py - Fix pairs
src/graphgate/dataset/fix_pairs.py - Scenario labels
src/graphgate/dataset/labels.py - Seed repositories
src/graphgate/dataset/seed_repos.py - Trace planning
src/graphgate/dataset/traceplan.py
Model clients
- Client protocol
src/graphgate/llm/base.py - Anthropic client
src/graphgate/llm/anthropic_client.py - Response cache
src/graphgate/llm/cache.py
Other components
- Researcher
- Anthropic API
Connections 23
- Researcher → CLI: runs
README.md - CLI → Run config: configures
src/graphgate/cli.py - CLI → Loop driver: starts
src/graphgate/cli.py - CLI → Trace replay: replays
src/graphgate/cli.py - CLI → Anthropic client: creates
src/graphgate/cli.py - CLI → Response cache: wraps with
src/graphgate/cli.py - Loop driver → Run config: reads
src/graphgate/harness/driver.py - Loop driver → Repo snapshot: uses
src/graphgate/harness/driver.py - Loop driver → Change diff: uses
src/graphgate/harness/driver.py - Loop driver → Trace records: writes
src/graphgate/harness/driver.py - Loop driver → Client protocol: requests via
src/graphgate/harness/driver.py - Loop driver → Scenario slicer: injects using
src/graphgate/harness/driver.py - Trace replay → Repo snapshot: reconstructs
src/graphgate/harness/replay.py - Trace replay → Trace records: reads
src/graphgate/harness/replay.py - Trace replay → Client protocol: implements
src/graphgate/harness/replay.py - Trace replay → Scenario slicer: uses injection
src/graphgate/harness/replay.py - Anthropic client → Client protocol: implements
src/graphgate/llm/anthropic_client.py - Anthropic client → Run config: reads
src/graphgate/llm/anthropic_client.py - Anthropic client → Anthropic API: sends requests
src/graphgate/llm/anthropic_client.py - Response cache → Client protocol: wraps
src/graphgate/llm/cache.py - Event loader → Source scrubber: scrubs with
src/graphgate/dataset/events.py - Event loader → Scenario slicer: slices with
src/graphgate/dataset/events.py - Source scrubber → Scenario slicer: uses
src/graphgate/dataset/scrub.py