How egen/junction works
Junction is a CLI that bootstraps infrastructure repositories with a tailored six-agent coding-agent graph and supporting operational framework. The main workflow is to collect or infer platform answers, generate and validate the graph, then scaffold agent-native configuration, shared guardrails and knowledge, and optionally GCP Terraform. The graph preserves the optional local-agent discovery branch and the documented agent-format and operations capabilities. Some wiring is based on the README and partial excerpts; uncertain internal calls are omitted.
Main entry points: cli.py Junction CLI · _base.py Adapter Base · scaffold.py Framework Scaffold · graph_schema.py Graph Schema
Components 19
CLI and Discovery
- Junction CLI
junction/cli.py - Question Discovery
junction/discovery.py - Agent Discovery
junction/agent_discovery.py - Platform Config
junction/config_builder.py
Graph and Agent Model
- Graph Generator
junction/graph_generator.py - Graph Schema
junction/graph_schema.py - Graph JSON Schema
junction/schemas/agent-graph.schema.json - Agent Specs
junction/agent_specs.py
Repository Scaffolding
- Adapter Base
junction/agent_adapters/_base.py - Copilot Adapter
junction/agent_adapters/copilot.py - Claude Adapter
junction/agent_adapters/claude_code.py - Cursor Adapter
junction/agent_adapters/cursor.py - Continue Adapter
junction/agent_adapters/continue_dev.py - Framework Scaffold
junction/scaffold.py - Skills and Guardrails
junction/framework/github
Infrastructure Output
- Terraform Generator
junction/terraform_generator.py
Other components
- Engineer
- Claude CLI
- Target Repository
Connections 21
- Engineer → Junction CLI: runs
- Junction CLI → Agent Discovery: optionally infers answers
- Agent Discovery → Claude CLI: inspects read-only
- Junction CLI → Question Discovery: collects answers
- Junction CLI → Platform Config: loads platform settings
- Junction CLI → Graph Generator: generates graph
- Graph Generator → Graph Schema: produces graph
- Junction CLI → Graph Schema: validates graph
- Graph Schema → Graph JSON Schema: checks schema
- Junction CLI → Agent Specs: builds agent specs
- Agent Specs → Adapter Base: provides agent definitions
- Adapter Base → Copilot Adapter: renders format
- Adapter Base → Claude Adapter: renders format
- Adapter Base → Cursor Adapter: renders format
- Adapter Base → Continue Adapter: renders format
- Junction CLI → Framework Scaffold: starts scaffolding
- Framework Scaffold → Skills and Guardrails: copies framework
- Framework Scaffold → Target Repository: writes shared files
- Junction CLI → Target Repository: targets repository
- Junction CLI → Terraform Generator: optionally generates IaC
- Terraform Generator → Target Repository: writes Terraform