# Elite & League Architectures Inside Competition Robot Code — a field guide to FRC robot software architecture: what sophisticated student code looks like, how to grade it, and how to build it. **Everything in one file:** [https://frc-code-scout.jointheleague.org/llms-full.txt](https://frc-code-scout.jointheleague.org/llms-full.txt) — the complete content of every page below, concatenated in book order. ## Table of Contents - [The Elite & League Architectures](https://frc-code-scout.jointheleague.org/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/_index.md)): A four-part wiki. Part I documents the Elite Architecture: the architecture that top FRC teams have actually converged on, reconstructed empirically from… ## Part I — The Elite Architecture - [Part I — The Elite Architecture](https://frc-code-scout.jointheleague.org/part-1/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-1/_index.md)): The architecture nobody designed and everybody arrived at. - [1. The baseline and the shape](https://frc-code-scout.jointheleague.org/part-1/01-baseline-and-shape/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-1/01-baseline-and-shape.md)): Every WPILib team starts from the same place. The Elite Architecture is best understood not as a thing teams build from scratch but as a specific set of… - [2. The architecture in five views](https://frc-code-scout.jointheleague.org/part-1/02-five-views/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-1/02-five-views.md)): No single drawing captures an architecture. A floor plan, a wiring diagram, and a description of how people move through a building are all true at once, and… - [3. The IO seam — the spine](https://frc-code-scout.jointheleague.org/part-1/03-the-io-seam/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-1/03-the-io-seam.md)): The IO seam is the single most widely shared idea in serious FRC code. It appears in 24 of the 55 season repos in the corpus index (44%) and is the default… - [4. The state seam — RobotState](https://frc-code-scout.jointheleague.org/part-1/04-the-state-seam/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-1/04-the-state-seam.md)): The second seam is a single object that owns the robot's best belief about the world — where it is on the field, and later its game-piece and mechanism state… - [5. The coordination seam — the superstructure](https://frc-code-scout.jointheleague.org/part-1/05-the-coordination-seam/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-1/05-the-coordination-seam.md)): The third seam turns one robot-wide goal into a coordinated set of subsystem setpoints, through a single transition function that is allowed to reorder or… - [6. The drivetrain — the special subsystem](https://frc-code-scout.jointheleague.org/part-1/06-the-drivetrain/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-1/06-the-drivetrain.md)): Ask "what is a drivetrain" and the easy answer is "the thing that makes the robot move." The corpus shows that undersells it. Every other subsystem is either… - [7. Cross-cutting practices](https://frc-code-scout.jointheleague.org/part-1/07-cross-cutting-practices/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-1/07-cross-cutting-practices.md)): Three practices separate engineering culture from cargo cult, and all three are dividends of the IO seam (ch. 3) rather than independent features. Build the… - [8. Alternatives — legitimate deviations](https://frc-code-scout.jointheleague.org/part-1/08-alternatives/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-1/08-alternatives.md)): The Elite Architecture is opinionated on purpose — it teaches one foundation-first path so a team can grow without rewrites. That path is the default, not the… - [9. Other advanced topics](https://frc-code-scout.jointheleague.org/part-1/09-other-advanced-topics/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-1/09-other-advanced-topics.md)): Where chapter 8 cataloged the alternatives — different ways to build a seam, with the graph and tree forms taken apart in Part II ch. 23 — this chapter… ## Part II — Anatomy of the Elite Architecture - [Part II — Anatomy of the Elite Architecture](https://frc-code-scout.jointheleague.org/part-2/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-2/_index.md)): The hood comes off. - [15. The control path, end to end](https://frc-code-scout.jointheleague.org/part-2/15-control-path/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-2/15-control-path.md)): This is the deep dive Part I deferred and the map for everything that follows in Part II. A button press or an autonomous routine becomes a robot-wide goal… - [16. Hardware abstraction and the IO line](https://frc-code-scout.jointheleague.org/part-2/16-hardware-abstraction/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-2/16-hardware-abstraction.md)): Part I argued that a subsystem should depend on a contract, not on a motor. This chapter shows the mechanics: the IO layer is the Strategy pattern, "IO layer"… - [17. Motor interfaces](https://frc-code-scout.jointheleague.org/part-2/17-motor-interfaces/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-2/17-motor-interfaces.md)): Part I drew the IO seam at the subsystem: one ElevatorIO per mechanism, vendor types sealed inside the implementation. This chapter goes one level lower, to… - [18. Subsystem archetypes](https://frc-code-scout.jointheleague.org/part-2/18-subsystem-archetypes/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-2/18-subsystem-archetypes.md)): Part I motivated the IO quartet in the abstract; this chapter applies it per mechanism. Game mechanisms — elevator, arm, shooter, intake — collapse to a small… - [19. The drivetrain subsystem](https://frc-code-scout.jointheleague.org/part-2/19-the-drivetrain-subsystem/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-2/19-the-drivetrain-subsystem.md)): The drivetrain is the one subsystem that breaks the single-IO rule. It is built from two interfaces (ModuleIO ×4 plus GyroIO ×1), a module is two control loops… - [20. The world model](https://frc-code-scout.jointheleague.org/part-2/20-the-world-model/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-2/20-the-world-model.md)): Part I argued for centralizing the robot's pose estimate into one shared object; it deferred the mechanics. This chapter shows them: RobotState as a subsystem… - [21. Vision systems](https://frc-code-scout.jointheleague.org/part-2/21-vision-systems/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-2/21-vision-systems.md)): Vision is the subsystem that breaks the mold: no motor, no setpoint, no control loop. The IO is a pure sensor that produces observations, and the subsystem's… - [22. Coordination I — state machines and the superstructure](https://frc-code-scout.jointheleague.org/part-2/22-coordination-state-machines/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-2/22-coordination-state-machines.md)): Part I's chapter on the coordination seam named six paradigms and deferred their construction. This chapter builds the common ones: the superstructure, and the… - [23. Coordination II — state graphs and behavior trees](https://frc-code-scout.jointheleague.org/part-2/23-coordination-graphs-trees/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-2/23-coordination-graphs-trees.md)): The wanted/current FSM and the centralized RobotManager of the previous chapter are where most elite teams stop. This chapter walks the two rungs past them… ## Part III — The League Architecture - [Part III — The League Architecture](https://frc-code-scout.jointheleague.org/part-3/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-3/_index.md)): The Elite Architecture, evolved. Parts I and II's components turn out to be instances of one shape; naming that shape is the whole proposal. - [24. From Elite to League — what we keep, what we change](https://frc-code-scout.jointheleague.org/part-3/24-elite-to-league/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-3/24-elite-to-league.md)): Parts I and II reconstructed an architecture that top teams converged on without anyone designing it. Part III takes the next step: it argues that the… - [25. The Portable Component Model — the faceplate](https://frc-code-scout.jointheleague.org/part-3/25-portable-component-model/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-3/25-portable-component-model.md)): This is the core of the proposal. One shape describes every active thing on the robot, and the rest of Part III is consequences of it. - [26. The portable motor interface — the leaf component](https://frc-code-scout.jointheleague.org/part-3/26-portable-motor-interface/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-3/26-portable-motor-interface.md)): The motor is the leaf of the component tree: its faceplate carries Config (CAN id, gains), Command (u), MotorState (x), and no outgoing-command channel. It is… - [27. The portable swerve interface — the mid-level component](https://frc-code-scout.jointheleague.org/part-3/27-portable-swerve-interface/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-3/27-portable-swerve-interface.md)): A drive subsystem is the first interesting component above the leaf: its children are four module components, each two motors. Its Commandin is a… - [28. RobotState and Superstructure as components](https://frc-code-scout.jointheleague.org/part-3/28-robotstate-superstructure-blocks/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-3/28-robotstate-superstructure-blocks.md)): The motor and swerve chapters recovered the bottom two layers as components. This chapter does the same for the two higher seams of Part I — the world model… - [29. Telemetry, replay, and tests — the dividends, at every scale](https://frc-code-scout.jointheleague.org/part-3/29-telemetry-replay-tests/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-3/29-telemetry-replay-tests.md)): This is the chapter that pays for the whole proposal. Part I's cross-cutting practices (ch. 7) hang off the IO seam at the leaf — you get simulation, replay… - [30. Lifecycle and graceful degradation](https://frc-code-scout.jointheleague.org/part-3/30-lifecycle-degradation/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-3/30-lifecycle-degradation.md)): The Lessons from Outside survey names graceful degradation as the discipline FRC most conspicuously skips: a wire comes loose, a CAN device drops, and baseline… - [31. The ROS bridge and language portability](https://frc-code-scout.jointheleague.org/part-3/31-ros-bridge-portability/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-3/31-ros-bridge-portability.md)): The last argument for the component model is external. If the four-channel shape is a sound factoring of a robot component, it should map cleanly onto the… - [32. Open questions and the road to a build recipe](https://frc-code-scout.jointheleague.org/part-3/32-open-questions/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/part-3/32-open-questions.md)): The League model is a living proposal, not finished doctrine, and the honest close to Part III is to name what is settled and what is not. An independent… ## Part IV — Scoring Elite Code - [Part IV — Scoring Elite Code](https://frc-code-scout.jointheleague.org/scoring/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/scoring/_index.md)): The instrument, its calibration against real results, and one team's four-year climb. - [33. The rubric in full](https://frc-code-scout.jointheleague.org/scoring/33-the-rubric/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/scoring/33-the-rubric.md)): This is the complete, authoritative rubric — eight dimensions, each scored 0–4 against anchored, observable indicators, with half-steps allowed. The companion… - [34. The San Diego scoresheet](https://frc-code-scout.jointheleague.org/scoring/34-the-san-diego-scoresheet/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/scoring/34-the-san-diego-scoresheet.md)): This whole book makes a claim — that the architecture on these pages is what separates elite robot code from the rest — and a claim that big deserves to be… - [35. The Patribots, four years](https://frc-code-scout.jointheleague.org/scoring/35-the-patribots-four-years/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/scoring/35-the-patribots-four-years.md)): One team, four seasons, a clean monotonic climb — 5.0 → 10.0 → 17.5 → 20.0 — and one number that never moved. (One asterisk on the series up front: 2024's 17.5… ## Appendices - [Appendices](https://frc-code-scout.jointheleague.org/appendices/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/_index.md)): Reference, method, and worked examples — the material that supports the narrative without interrupting it. ### Appendix A — How We Developed This - [Appendix A — How We Developed This](https://frc-code-scout.jointheleague.org/appendices/how-we-developed-this/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/how-we-developed-this/_index.md)): The method behind Part I — and how to find out where your own program stands. - [1. How we read the corpus](https://frc-code-scout.jointheleague.org/appendices/how-we-developed-this/01-reading-the-corpus/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/how-we-developed-this/01-reading-the-corpus.md)): The architecture in this book was not designed from first principles. It was read out of source code — dozens of public FRC repositories, plus a wider base of… - [2. Eight dimensions of sophistication](https://frc-code-scout.jointheleague.org/appendices/how-we-developed-this/02-the-rubric/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/how-we-developed-this/02-the-rubric.md)): The patterns from the corpus become useful only when they become measurable. The instrument is a rubric of eight dimensions, each scored 0–4 against anchored… - [3. The novice-to-elite maturity ladder](https://frc-code-scout.jointheleague.org/appendices/how-we-developed-this/03-the-maturity-ladder/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/how-we-developed-this/03-the-maturity-ladder.md)): The architecture is a destination; this chapter is the route. A program climbs to it over four or five seasons, and the climb is governed by three rules that… - [4. What the architecture predicts](https://frc-code-scout.jointheleague.org/appendices/how-we-developed-this/04-what-it-predicts/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/how-we-developed-this/04-what-it-predicts.md)): A rubric is only worth trusting if its scores mean something. So the scores were tested: 24 San Diego teams scored on the eight dimensions, each paired with… - [5. Foundation-first](https://frc-code-scout.jointheleague.org/appendices/how-we-developed-this/05-foundation-first/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/how-we-developed-this/05-foundation-first.md)): Chapter 2 said what the architecture is. This chapter says in what order you build it and why that order is safe. The organizing idea: build the seams, defer… - [Appendix B — Glossary & naming decisions](https://frc-code-scout.jointheleague.org/appendices/glossary/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/glossary.md)): Every load-bearing term in this book earns its place, and several were chosen against plausible alternatives that were already spent. This appendix is two… - [Appendix C — Source-document crosswalk](https://frc-code-scout.jointheleague.org/appendices/source-crosswalk/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/source-crosswalk.md)): This appendix is the machine-checkable record that nothing in the source corpus was orphaned by the wiki rewrite. Every document under knowledge/ (and… - [Appendix D — Reviewing for the seams](https://frc-code-scout.jointheleague.org/appendices/reviewing-for-the-seams/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/reviewing-for-the-seams.md)): A code review is the last gate that keeps the architecture honest. Every other chapter in this book describes how to build the three seams — the IO seam, the… - [Appendix E — The minimal worked example](https://frc-code-scout.jointheleague.org/appendices/minimal-worked-example/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/minimal-worked-example.md)): This is the whole book, once, in the smallest robot that still has all the layers. Two wheels, one color sensor, one job: drive forward until the sensor sees… ### Lessons from Outside - [Lessons from Outside](https://frc-code-scout.jointheleague.org/appendices/lessons-from-outside/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/lessons-from-outside/_index.md)): What the broader robotics world treats as table stakes — and FRC mostly skips. - [Lessons from outside FRC](https://frc-code-scout.jointheleague.org/appendices/lessons-from-outside/01-lessons-from-outside/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/lessons-from-outside/01-lessons-from-outside.md)): The Elite Architecture was reconstructed from FRC code, but FRC is a small corner of robotics. Looking outward shows what the rest of the field treats as… - [2. Spec-in, code-out — generators against the seam](https://frc-code-scout.jointheleague.org/appendices/lessons-from-outside/02-code-generators/) ([raw](https://raw.githubusercontent.com/League-Robotics/frc-code-scout/master/docs/elite-arch/appendices/lessons-from-outside/02-code-generators.md)): A whole class of FRC tools takes a specification and hands you back robot code — and every one of them optimizes the wrong axis for this book. Lesson 1 named…