Repository navigation
Description
RFC: Springfield - Chained Autonomous AI Coding Toolkit
Summary
Build an autonomous AI coding toolkit around a chained, artifact-driven orchestration loop that improves software iteratively until it is functional, verified, and audited.
Core idea: Replace parallel/multi-agent collaboration with a single active stage at a time.
Each stage produces a clear artifact for the next stage. Loopbacks happen only when needed.
Implementation Language: Go
Why chained orchestration instead of parallel orchestration?
Parallel agent collaboration sounds powerful, but in practice it creates:
- coordination overhead
- context drift
- duplicated work
- race conditions around git/worktrees/state
- unclear ownership when something goes wrong
A chained model is simpler and more reliable:
- one stage is active at a time
- each stage has a defined responsibility
- each handoff uses an explicit artifact
- failures are easier to localize and correct
This keeps the useful role separation without turning the system into an agent society.
The Springfield Chain
lisa → frank → ralph ↔ skinner → martin
^ |
|_______________________________|
loop back
| Character | Role | Output |
|---|---|---|
| lisa | Planner | PRD / clarified requirements |
| frank | Architect | Technical spec |
| ralph | Builder | Code changes + implementation notes |
| skinner | Verifier | Verification report against acceptance criteria |
| martin | Auditor | Audit findings + recommended loopback target |
Important constraint
Only one role is active at a time.
No parallel execution between Lisa/Frank/Ralph/Skinner/Martin in v1.
Core operating model
Artifact-driven handoffs
Each stage must produce a concrete artifact that the next stage consumes.
Suggested canonical artifacts:
prd.md— Lisaspec.md— Frank- code diff + implementation summary — Ralph
verify.md— Skinneraudit.md— Martin
Loopbacks
Loopbacks should go to the earliest necessary stage, not automatically all the way back to Lisa.
Examples:
- implementation bug → back to Ralph
- acceptance criteria failure due to bad spec → back to Frank
- unclear requirements → back to Lisa
Single responsible executor
At any point in the run, the system should be able to answer:
- which stage is active
- what artifact is being produced
- what the current loop count is
- why the next handoff is happening
Architecture Overview
┌─────────────────────────────────────────────────────────────────────┐
│ CLI (cmd/sfk/main.go) │
├─────────────────────────────────────────────────────────────────────┤
│ Config │ Run State │ Worktree Manager │ Artifact Store │
├─────────────────────────────────────────────────────────────────────┤
│ Chained Orchestration Controller │
│ lisa → frank → ralph ↔ skinner → martin → loopback │
├─────────────────────────────────────────────────────────────────────┤
│ Engine Interface │
│ Opencode implementation | Codex implementation │
└─────────────────────────────────────────────────────────────────────┘
Not part of v1
- freeform agent-to-agent messaging
- parallel multi-agent execution
- always-on in-memory message bus between roles
- one worktree per role by default
Key Technical Decisions
| Decision | Choice |
|---|---|
| Language | Go |
| Engines | Opencode + Codex |
| Execution model | Chained, one active stage at a time |
| Thread strategy | Persistent session/thread per run or stage as needed |
| Artifacts | Explicit files/structured outputs between stages |
| Verification | Derived from PRD acceptance criteria |
| Audit scope | Whole-project first loop, scoped on later loops |
| Git strategy | Start simple; shared worktree first, expand only if needed |
| Platforms | Linux, macOS, Windows |
Worktree decision
Do not require one worktree per agent in v1.
Start with a simpler shared-worktree or single-task worktree model.
Add multiple worktrees later only if real concurrency or isolation needs prove necessary.
File Structure
springfield/
├── cmd/
│ └── sfk/
│ ├── main.go
│ └── completion.go
├── internal/
│ ├── config/
│ ├── engine/
│ │ ├── engine.go
│ │ ├── types.go
│ │ ├── opencode/
│ │ └── codex/
│ ├── artifacts/
│ │ ├── store.go
│ │ ├── prd.go
│ │ ├── spec.go
│ │ ├── verify.go
│ │ └── audit.go
│ ├── worktree/
│ ├── stages/
│ │ ├── lisa/
│ │ ├── frank/
│ │ ├── ralph/
│ │ ├── skinner/
│ │ └── martin/
│ ├── loop/
│ │ ├── controller.go
│ │ ├── state.go
│ │ ├── escalation.go
│ │ └── stats.go
│ └── ui/
├── pkg/
│ └── sfk/
├── go.mod
├── go.sum
└── Makefile
Implementation Phases
Phase 1: Foundation
- project scaffold
- CLI framework
- config loader
- logging
- run-state model
Phase 2: Engine abstraction
- engine interface
- Opencode implementation
- Codex implementation
- persistent thread/session handling
- streamed event support
Phase 3: Artifact-driven loop
- PRD artifact
- spec artifact
- verify artifact
- audit artifact
- controller that hands off stage-to-stage
Phase 4: Ralph ↔ Skinner loop
- builder/verifier kickback cycle
- configurable max retries
- escalation back to Frank or Lisa when needed
Phase 5: Git/worktree operations
- start simple
- dirty file handling
- commit discipline
- optional task worktree support
Phase 6: TUI / polish
- progress display
- loop state visibility
- notifications
- shell completions
Commands
Stage commands
sfk lisa
sfk frank
sfk ralph
sfk skinner
sfk martinMain chained execution
# Start at planner
sfk run
# Start at implementation phase
sfk run --from ralph
# Run exactly N loops
sfk run --loops 3
# Stop after current stage
sfk run --exit-after-stage
# Full audit every loop
sfk run --full-auditSetup
sfk bartLoop semantics
A loop completes when Martin finishes auditing and either:
- declares the work acceptable, or
- routes the next iteration to the earliest required prior stage.
Example
Lisa → Frank → Ralph → Skinner → Martin
↑ |
└─────────┘
If Skinner fails AC:
- loop stays inside Ralph ↔ Skinner until resolved or escalated
If Martin finds implementation bugs:
- route back to Ralph
If Martin finds design issues:
- route back to Frank
If Martin finds requirements ambiguity:
- route back to Lisa
Verification and audit model
Skinner
Skinner should:
- run verify commands from the PRD / spec
- collect evidence
- determine pass/fail against explicit acceptance criteria
- produce a structured verification artifact
Martin
Martin should:
- audit the resulting code and behavior
- stay scoped to changed files + nearby impact areas after loop 1
- produce findings with severity and recommended loopback target
- avoid speculative noise
Aider-inspired features to keep
Repo map for Lisa
Lisa should build or refresh a concise repo map at the start of a run or when context changes significantly.
Technical spec for Frank
Frank should emit a technical spec artifact that Ralph implements against.
Dirty file handling for Ralph
Before implementation, Ralph should detect dirty files and handle them explicitly so human work and AI work do not blur together.
Conventional commits
Ralph should commit with conventional commits when committing is appropriate.
Auto-verify
Skinner should automatically run the relevant verification commands and capture output as evidence.
Risks & mitigations
| Risk | Impact | Mitigation |
|---|---|---|
| Overbuilding the orchestration too early | High | Start chained, not parallel |
| Engine differences between Opencode and Codex | High | Strong engine abstraction and tests |
| Artifact drift between stages | Medium | Canonical artifact formats and ownership |
| Git/worktree complexity | Medium | Keep worktree strategy simple in v1 |
| Loop churn / endless refinement | Medium | Explicit loop counts, escalation rules, and stop conditions |
What this RFC intentionally avoids
This RFC does not assume:
- autonomous parallel agent collaboration
- freeform agent chat/messages as the core control plane
- multiple active agents working simultaneously by default
- one worktree per role as a hard requirement
Those may become future experiments, but they are not required for a useful first version.
Acceptance Criteria
- Springfield runs as a chained orchestration system with one active stage at a time.
- Lisa is the main requirements/planning entry point.
- Frank produces a technical spec artifact from the PRD.
- Ralph implements against Frank’s spec.
- Ralph ↔ Skinner form the main verification loop until AC passes or escalation occurs.
- Martin audits and routes loopback to the earliest necessary stage.
- Handoffs are artifact-driven, not freeform parallel agent chatter.
- Loop counts and exit behavior are configurable.
- Per-engine/per-stage model configuration is supported.
- Bart setup exists for initial project setup and preference capture.
- Dirty file handling and conventional commits are supported.
- Auto-verify is supported through explicit verify commands and captured evidence.
- The architecture remains compatible with Opencode and Codex backends.
- No backward-compatibility scaffolding is required.
Activity
dominicnunez commentedon Feb 21, 2026
This RFC addresses the following open issues:
Closed as duplicate:
dominicnunez commentedon Feb 21, 2026
Update: Issues #12 and #13 have been closed as out of scope for this RFC.
Additional issue addressed: #23 (Consolidate audit prompt resolution logic) - This will be addressed in Phase 4 (Audit Pipeline) implementation, ensuring clean audit prompt resolution with documented priority:
The hardcoded global file path will be removed, and the priority will be documented in config.example and README.
dominicnunez commentedon Feb 21, 2026
Update: Issues #12 and #13 have been closed as out of scope for this RFC.
Additional issue addressed: #23 (Consolidate audit prompt resolution logic) - This will be addressed in Phase 4 (Audit Pipeline) implementation, ensuring clean audit prompt resolution with documented priority:
The hardcoded global file path will be removed, and the priority will be documented in config.example and README.
dominicnunez commentedon Feb 21, 2026
Additional issues closed as duplicates:
The audit pipeline in Phase 4 will include a test quality agent that verifies:
Remaining open issues: #4 (Codex CLI), #15 (Browser), #18 (Docker)
[-]RFC: Springfield Ultra - Parallel Autonomous Toolkit with PAUL+GSD+Memory[/-][+]RFC: Springfield - Parallel Autonomous AI Coding Toolkit[/+][-]RFC: Springfield - Parallel Autonomous AI Coding Toolkit[/-][+]RFC: Springfield - Chained Autonomous AI Coding Toolkit[/+]