Regenerating Technical Summaries of stellar-core
Overview
This skill describes the process of generating (or regenerating) the full set of technical summary skill documents for stellar-core. These summaries provide AI agents with compact architectural context about each subsystem and the system as a whole.
Output Artifacts
The process produces:
- 21 subsystem summary files in
.claude/skills/subsystem-summary-of-$X/SKILL.md
- 1 whole-system summary file in
.claude/skills/stellar-core-summary/SKILL.md
Subsystem List
The following subsystem directories under src/ are each summarized individually:
| Subsystem |
Source Directory |
Notes |
| bucket |
src/bucket/ |
Bucket list and merge machinery |
| catchup |
src/catchup/ |
Ledger catchup / sync logic |
| crypto |
src/crypto/ |
Hashing, signing, key management |
| database |
src/database/ |
SQL database abstraction |
| herder |
src/herder/ |
Consensus coordination, tx queue |
| history |
src/history/ |
History archive management |
| historywork |
src/historywork/ |
Work tasks for history operations |
| invariant |
src/invariant/ |
Runtime invariant checking |
| ledger |
src/ledger/ |
Ledger state management, LedgerTxn |
| main |
src/main/ |
Application, Config, event loop |
| overlay |
src/overlay/ |
P2P network layer |
| process |
src/process/ |
Child process management |
| protocol-curr |
src/protocol-curr/ |
Current protocol XDR definitions |
| rust |
src/rust/ (excl. soroban/) |
C++/Rust bridge, non-soroban Rust |
| soroban-env |
src/rust/soroban/p26/soroban-env-{common,host}/ |
One protocol version of soroban env |
| scp |
src/scp/ |
SCP consensus protocol |
| simulation |
src/simulation/ |
Network simulation, load generation |
| test |
src/test/ |
Test utilities and infrastructure |
| transactions |
src/transactions/ |
Transaction/operation processing |
| util |
src/util/ |
Utility classes and helpers |
| work |
src/work/ |
Async work scheduling framework |
Procedure
Phase 1: Generate Subsystem Summaries (Parallelizable)
For each subsystem directory listed above, launch a parallel sub-agent with the following instructions:
Read the entire source of all .h, .cpp, and/or .rs files in that subsystem directory, excluding any test files (files with "test" or "Test" in the name, or files ending in Tests.cpp, Test.cpp, test.cpp).
Create a skill document at .claude/skills/subsystem-summary-of-$X/SKILL.md
Write the document using this template:
---
name: "subsystem-summary-of-$X"
description: "read this skill for a token-efficient summary of the $X subsystem"
---
# Subsystem: $X
## Key Classes and Data Structures
...
## Key Modules
...
## Key Functions
...
## Control Loops, Threads, and Tasks
...
## Ownership Relationships
...
## Key Data Flows
...
The summary should be approximately 10KB and focus on:
- Key classes / data structures with brief descriptions
- Key modules and their responsibilities
- Key functions within major classes
- Summary of key control loops, threads and/or tasks
- Ownership relationships between data structures
- Key data flows between components
Special Cases
- protocol-curr: Focus on XDR type definitions, enumerations, unions, and type relationships.
- rust (non-soroban): Include the C++/Rust bridge mechanism (CXX bridge), files in
src/rust/src/ and src/rust/*.h/*.cpp, but exclude src/rust/soroban/.
- soroban-env: Read from one protocol version directory (currently
p26), specifically soroban-env-common/src/ and soroban-env-host/src/. Cover Val types, Env traits, Host internals, budget/metering, storage model, and VM dispatch.
- test: This contains test utilities and infrastructure, not tests themselves. Read everything but still skip files that are purely individual test cases (
*Tests.cpp).
Phase 2: Generate Whole-System Summary
After all subsystem summaries are complete, launch a sub-agent that:
- Reads ALL 21 subsystem summary files together
- Creates
.claude/skills/stellar-core-summary/SKILL.md
- Writes a ~30KB summary covering:
- System overview (what stellar-core is)
- Architecture overview (component relationships)
- Core subsystems (concise paragraph per subsystem)
- Threading model (all thread types across subsystems)
- Key data flows (transaction lifecycle, ledger close, catchup, history publication, overlay messaging)
- Ownership hierarchy (Application → managers)
- Cross-cutting concerns (protocol versioning, invariants, metrics, logging, process management, work scheduling)
- Soroban integration (Rust/C++ FFI, Host runtime)
- Testing infrastructure
- Key design patterns (recurring patterns across the codebase)
The description should indicate this is good initial context for any broad-scope task on stellar-core.
When to Regenerate
Regenerate summaries when:
- Major architectural changes are made to a subsystem
- New subsystems are added
- Significant refactoring occurs across multiple subsystems
- The soroban protocol version advances (update the
p26 reference to the latest)
Notes
- The soroban protocol version directory (currently
p26) should be updated to the latest version when regenerating.
- Each subsystem summary targets ~10KB; the whole-system summary targets ~30KB.
- All summaries use YAML frontmatter with
name: and description: fields.
- The goal is to provide enough context for an AI agent to understand the architecture without reading all the source code.
1---2name: summarizing-the-codebase3description: Regenerating Technical Summaries of stellar-core4---5# Regenerating Technical Summaries of stellar-core67## Overview89This skill describes the process of generating (or regenerating) the full set of technical summary skill documents for stellar-core. These summaries provide AI agents with compact architectural context about each subsystem and the system as a whole.1011## Output Artifacts1213The process produces:14- 21 subsystem summary files in `.claude/skills/subsystem-summary-of-$X/SKILL.md`15- 1 whole-system summary file in `.claude/skills/stellar-core-summary/SKILL.md`1617## Subsystem List1819The following subsystem directories under `src/` are each summarized individually:2021| Subsystem | Source Directory | Notes |22|-----------|-----------------|-------|23| bucket | `src/bucket/` | Bucket list and merge machinery |24| catchup | `src/catchup/` | Ledger catchup / sync logic |25| crypto | `src/crypto/` | Hashing, signing, key management |26| database | `src/database/` | SQL database abstraction |27| herder | `src/herder/` | Consensus coordination, tx queue |28| history | `src/history/` | History archive management |29| historywork | `src/historywork/` | Work tasks for history operations |30| invariant | `src/invariant/` | Runtime invariant checking |31| ledger | `src/ledger/` | Ledger state management, LedgerTxn |32| main | `src/main/` | Application, Config, event loop |33| overlay | `src/overlay/` | P2P network layer |34| process | `src/process/` | Child process management |35| protocol-curr | `src/protocol-curr/` | Current protocol XDR definitions |36| rust | `src/rust/` (excl. soroban/) | C++/Rust bridge, non-soroban Rust |37| soroban-env | `src/rust/soroban/p26/soroban-env-{common,host}/` | One protocol version of soroban env |38| scp | `src/scp/` | SCP consensus protocol |39| simulation | `src/simulation/` | Network simulation, load generation |40| test | `src/test/` | Test utilities and infrastructure |41| transactions | `src/transactions/` | Transaction/operation processing |42| util | `src/util/` | Utility classes and helpers |43| work | `src/work/` | Async work scheduling framework |4445## Procedure4647### Phase 1: Generate Subsystem Summaries (Parallelizable)4849For each subsystem directory listed above, launch a parallel sub-agent with the following instructions:50511. **Read the entire source** of all `.h`, `.cpp`, and/or `.rs` files in that subsystem directory, **excluding** any test files (files with "test" or "Test" in the name, or files ending in `Tests.cpp`, `Test.cpp`, `test.cpp`).52532. **Create a skill document** at `.claude/skills/subsystem-summary-of-$X/SKILL.md`54553. **Write the document** using this template:5657```markdown58---59name: "subsystem-summary-of-$X"60description: "read this skill for a token-efficient summary of the $X subsystem"61---6263# Subsystem: $X6465## Key Classes and Data Structures66...6768## Key Modules69...7071## Key Functions72...7374## Control Loops, Threads, and Tasks75...7677## Ownership Relationships78...7980## Key Data Flows81...82```8384The summary should be approximately **10KB** and focus on:85- Key classes / data structures with brief descriptions86- Key modules and their responsibilities87- Key functions within major classes88- Summary of key control loops, threads and/or tasks89- Ownership relationships between data structures90- Key data flows between components9192### Special Cases9394- **protocol-curr**: Focus on XDR type definitions, enumerations, unions, and type relationships.95- **rust** (non-soroban): Include the C++/Rust bridge mechanism (CXX bridge), files in `src/rust/src/` and `src/rust/*.h`/`*.cpp`, but exclude `src/rust/soroban/`.96- **soroban-env**: Read from one protocol version directory (currently `p26`), specifically `soroban-env-common/src/` and `soroban-env-host/src/`. Cover Val types, Env traits, Host internals, budget/metering, storage model, and VM dispatch.97- **test**: This contains test *utilities* and *infrastructure*, not tests themselves. Read everything but still skip files that are purely individual test cases (`*Tests.cpp`).9899### Phase 2: Generate Whole-System Summary100101After all subsystem summaries are complete, launch a sub-agent that:1021031. **Reads ALL 21 subsystem summary files** together1042. **Creates** `.claude/skills/stellar-core-summary/SKILL.md`1053. **Writes a ~30KB summary** covering:106 - System overview (what stellar-core is)107 - Architecture overview (component relationships)108 - Core subsystems (concise paragraph per subsystem)109 - Threading model (all thread types across subsystems)110 - Key data flows (transaction lifecycle, ledger close, catchup, history publication, overlay messaging)111 - Ownership hierarchy (Application → managers)112 - Cross-cutting concerns (protocol versioning, invariants, metrics, logging, process management, work scheduling)113 - Soroban integration (Rust/C++ FFI, Host runtime)114 - Testing infrastructure115 - Key design patterns (recurring patterns across the codebase)116117The description should indicate this is good initial context for any broad-scope task on stellar-core.118119## When to Regenerate120121Regenerate summaries when:122- Major architectural changes are made to a subsystem123- New subsystems are added124- Significant refactoring occurs across multiple subsystems125- The soroban protocol version advances (update the `p26` reference to the latest)126127## Notes128129- The soroban protocol version directory (currently `p26`) should be updated to the latest version when regenerating.130- Each subsystem summary targets ~10KB; the whole-system summary targets ~30KB.131- All summaries use YAML frontmatter with `name:` and `description:` fields.132- The goal is to provide enough context for an AI agent to understand the architecture without reading all the source code.