원클릭으로
spec-from-core
Generate or update Stellar Protocol Spec(s) from stellar-core C++ source
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate or update Stellar Protocol Spec(s) from stellar-core C++ source
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
One tick of a CI watchdog — check main-branch GHA status; spawn an agent to fix if failing and no investigation is in flight.
One tick of the henyey mainnet monitor — checks, metrics scan, deploy, status report
Continuous always-on orchestrator for the henyey project pipeline. Each pass queries the board, central-picks up to N actionable issues by priority, and fans out parallel foreground specialist sub-agents (triage/plan/do/review-pr) with the right Claude model per stage. Owns concurrency, conflict-avoidance, CI pipelining, sibling-nit consolidation, and a self-reflection pass that files pipeline-improvement issues. Replaces scripts/project-tick-loop.sh. Use when the operator asks to "run the loop", "process the board continuously", or "keep the pipeline going".
Single-pick dispatcher primitive for the henyey project pipeline. One tick = pick one actionable issue from the project board and dispatch the right specialist sub-agent for its current state. Used for manual single picks and `--issue=` recovery; the continuous orchestrator is `/project-loop`, which owns concurrency centrally. Use when the user asks to "run a tick", "pick up an issue", or "process one board item".
Run two parallel adversarial PR reviewers and combine their verdicts with external PR reviews (GH Copilot bot, humans, other bots) and CI state into a merge decision. Agent reviewers post structured comment verdicts (since the agent is the PR author and cannot self-approve via GH native review). External CHANGES_REQUESTED reviews block merge identically to agent CHANGES_REQUESTED. Operates on issues in `in-review`. Auto-merges with --admin on all-green (after filing follow-up issues for unaddressed inline review comments, so non-critical feedback is preserved as backlog instead of dropped); bounces to `ready-for-doing` on any request-changes or CI red; blocks after 3 bounce-backs on the same code state. At the lifetime cap (6 bounces since last `## Review: Reset`) the PR enters **force-converge mode**: if CI is green, the PR auto-merges and unresolved reviewer concerns become follow-up issues; only red/pending CI at the cap still blocks. Use when invoked by /project-tick with an issue in in-review, or manuall
Audit a Rust crate's adherence to its Stellar protocol spec (spec-driven, walks every normative claim)
SOC 직업 분류 기준
| name | spec-from-core |
| description | Generate or update Stellar Protocol Spec(s) from stellar-core C++ source |
Parse $ARGUMENTS:
{README, SCP_SPEC, OVERLAY_SPEC, HERDER_SPEC, LEDGER_SPEC, TX_SPEC, BUCKETLISTDB_SPEC, CATCHUP_SPEC}
(case-insensitive, with or without a trailing .md), set $SCOPE
to the matched spec. Otherwise $SCOPE = all.--apply is present, $MODE = apply. Otherwise $MODE = review.--regenerate is present, $STRATEGY = regenerate. Otherwise
$STRATEGY = update.Generate or update one or more documents under stellar-specs/ from
the stellar-core C++ reference implementation pinned in the
stellar-core/ submodule. The specs are
implementation-agnostic: they describe observable protocol
behavior that any conforming implementation MUST reproduce. They are
the single source of truth for parity; pseudocode trees are retired.
| Spec | stellar-core source dirs |
|---|---|
README.md | cross-cutting — indexes all 7 subsystem specs |
SCP_SPEC.md | src/scp/ |
OVERLAY_SPEC.md | src/overlay/ |
HERDER_SPEC.md | src/herder/ |
LEDGER_SPEC.md | src/ledger/, src/main/ (ledger close path) |
TX_SPEC.md | src/transactions/, src/main/ (apply path) |
BUCKETLISTDB_SPEC.md | src/bucket/ |
CATCHUP_SPEC.md | src/catchup/, src/history/ |
All paths are relative to stellar-core/. Implementation-only modules
(util/, crypto/, database/, process/, work/, simulation/,
invariant/) are deliberately unmapped — they contain no observable
protocol behavior. If a sweep surfaces consensus-deterministic logic
from one of these modules, surface it for human review rather than
silently folding it in.
$STRATEGY = update (default)Read the existing spec and propose targeted additions only. This is the safe default — curated content is preserved.
releaseAssert / assert invariants: runtime correctness
checks that crash on violation.protocolVersionStartsFrom,
protocolVersionIsBefore, and similar conditional logic.**Date:** to today.$STRATEGY = regenerate (overwrite)Produce the spec fresh from the mapped source dirs, replacing any existing content. Follows the document structure and writing style below.
Safety: in $STRATEGY = regenerate, the skill MUST require
$MODE = apply. Review-mode regenerate is meaningless (it just
produces a draft that diverges from the live spec); without
--apply, refuse and tell the user to add it if they really want a
full overwrite.
$MODE = review (default)Report proposed additions/changes in the conversation. Do not write any files. Format:
## Spec Update: <SPEC>
**Strategy:** update | regenerate
### Proposed additions
- §N.M: <one-line summary>
### Proposed strengthenings
- §N.M: <one-line summary of weaker → stronger change>
### Intentionally skipped (implementation-internal)
- <one-line summary, grouped>
### Structural concerns
- (if any — e.g., a finding has no natural section to land in)
$MODE = applyWrite changes to disk:
update: edit the spec file in place. Apply each addition and
strengthening; bump **Date:**.regenerate: overwrite the spec file with freshly derived content
per the canonical document structure below.$SCOPE = <single spec>Process only that spec. The mapped source dirs in the table above are the only stellar-core inputs.
$SCOPE = all (no argument)update: process all 8 specs. Specs cover independent files, so
parallel passes are safe. Recommend launching one subagent per
spec for speed.regenerate: process the 7 per-subsystem specs first, then the
README (which indexes them). Requires --apply, same as
single-spec regenerate.═══════════════════════════════════════════════════════════════════ EXTRACTION PRINCIPLES (used in both strategies) ═══════════════════════════════════════════════════════════════════
OBSERVABLE BEHAVIOR ONLY. Extract the protocol's observable behavior — message formats, state transitions, validation rules, ordering guarantees, resource limits, error codes, and deterministic outputs. Strip away all implementation internals: threading models, SQL schemas, caching strategies, file system layouts, metrics, logging, memory management.
IMPLEMENTATION AGNOSTIC. Never use C++ syntax, class names
with :: notation, #include directives, or language-specific
constructs. Use camelCase pseudocode for algorithms. Reference
XDR types by name (e.g., StellarValue, TransactionEnvelope)
without reproducing their definitions.
DETERMINISM IS THE LITMUS TEST. If a behavior affects consensus or ledger state determinism, it MUST be specified. If it doesn't, it SHOULD be omitted. Exception: include implementation-internal details only when they affect observable correctness (e.g., the single-child LedgerTxn invariant).
PROTOCOL VERSION AWARENESS. The primary target is whatever
protocol version the stellar-core/ submodule is pinned to. Use
@version(≥N) and @version(<N) annotations to document
behavioral differences across versions. Capture every version
threshold the source uses, not just recent ones. Support range
is protocol 24+.
═══════════════════════════════════════════════════════════════════ DOCUMENT STRUCTURE ═══════════════════════════════════════════════════════════════════
Every spec file MUST follow this structure.
TITLE (subsystem specs): use the form
# Stellar <Subsystem> [<Modifier>] Specification. Examples:
"Stellar Consensus Protocol (SCP) Specification", "Stellar Ledger
Close Pipeline Specification", "Stellar Catchup, Replay, and History
Publishing Specification". The <Modifier> MAY name the scope when
the subsystem has multiple aspects.
HEADER:
# <Full Descriptive Title>
**Version:** <N> (<qualifier>)
**Status:** Informational
**Date:** YYYY-MM-DD
The <qualifier> is stellar-core v<N.x> / Protocol <N> for specs
coupled to ledger versioning. Specs with their own version axis MAY
use a domain-specific qualifier (e.g., OVERLAY uses
Overlay Protocol v38–v39).
TABLE OF CONTENTS: manually numbered, with Markdown anchor links. Use plain integers (1, 2, 3...), not hierarchical numbering (1.1, 1.2) at the TOC level.
SECTIONS (in this canonical order):
## 1. Introduction
### 1.1 Purpose and Scope (REQUIRED)
- State what the spec covers and what is out of scope
- MUST include the boilerplate sentence (substituting the
subsystem's observable outputs as appropriate):
"This specification is **implementation agnostic**. It is
derived exclusively from the vetted stellar-core C++
implementation (v<N.x>). Any conforming implementation that
produces identical <observable outputs for this subsystem>
for all valid inputs is considered correct."
- Explicit out-of-scope list
### 1.2 Conventions and Terminology (REQUIRED)
- RFC 2119 boilerplate
- Glossary table: Term | Definition
- MAY include the Relationship to Other Specifications table
here (see §1.x below)
### 1.3 Notation (RECOMMENDED)
- Explain pseudocode conventions, version annotations, XDR
references — include only if the spec uses notation beyond
what the global Pseudocode Notation section already covers
### 1.x Relationship to Other Specifications (RECOMMENDED)
- Table: | Specification | Relationship |
- May live under §1.2 or as a separate §1.3 / §1.4; numbering
is flexible
## 2. Architecture/Protocol Overview
- High-level design, component relationships, design goals
- Include a Mermaid diagram showing component architecture
## 3. Data Types (RECOMMENDED — title flexible)
- Title MAY be "Data Types", "Data Types and Encoding", or
"Data Encoding"
- OPTIONAL where the subsystem has no distinct XDR types of its
own (e.g., HERDER, whose types are inherited from TX/LEDGER —
in that case document type usage inline with the algorithms)
- XDR type references (by name, not full definitions)
- Field-level tables: Field | Type | Description
- Sort order, encoding conventions
## 4–N. Core Specification Sections (domain-specific)
- State machines: named states, transition tables, forbidden
transitions
- Algorithms: numbered step sequences with pseudocode
- Validation rules: enumerated checks with XDR result codes
- Error handling: result codes mapped to SCREAMING_SNAKE_CASE
XDR enums
- Lifecycle sequences: step-by-step multi-phase processes
- Network-facing specs MAY include a "Security Considerations"
section in lieu of (or in addition to) Invariants
## N-3. Invariants and Safety Properties (RECOMMENDED)
- OPTIONAL where the subsystem has no consensus-deterministic
invariants of its own (e.g., HERDER's invariants live in
SCP+LEDGER+TX; OVERLAY's safety is covered under "Security
Considerations")
- Each invariant SHOULD have a stable identifier of the form
`INV-<X><N>` where `<X>` is the 1-2 letter spec sigil
(`S` SCP, `O` OVERLAY, `H` HERDER, `L` LEDGER, `T` TX,
`B` BUCKETLISTDB, `C` CATCHUP). Example: `INV-L8`. Stable IDs
let code reference invariants directly
(`// Invariant: INV-L8`).
- Formal statements using MUST/SHALL keywords
- Each invariant: what it guarantees, why it matters, what breaks
if violated
## N-2. Constants (RECOMMENDED)
- SHOULD split into "Protocol Constants" (MUST NOT change) and
"Recommended Parameters" (RECOMMENDED defaults) where both
coexist
- MAY use a single flat table where only consensus-fixed values
are present
- Large constant sets MAY use categorized subsections (e.g.,
OVERLAY's Wire / Timing / Capacity / Flooding split)
- Table format: Constant | Value | Description | Section
- The `Section` column SHOULD link back to the body section
that defines the constant's role (e.g.,
`[8.3](#83-initial-capacity-grant)`), making Constants act
as an index back into the body
## N-1. References (REQUIRED — numbered top-level section)
- Numbered top-level `## N. References` placed AFTER Constants
and BEFORE Appendices
- Table form: `Reference | Description`
- Footnote-style link definitions (`[name]: <url>`) MAY be used
inline in the body; place all such definitions at the very end
of the file, AFTER the Appendices
## N. Appendices
- Named alphabetically: Appendix A, Appendix B, ...
- Content types: sequence diagrams, flowcharts, state machine
diagrams, decision matrices, worked examples, detailed
procedures
- KEY RULE: Appendices illustrate; the body specifies. An
appendix MUST NOT introduce new normative requirements.
SEPARATORS: a --- horizontal rule between every top-level ##
section.
SUBSECTION NUMBERING: ### 3.1 Title, ### 3.2 Title. Up to
4 levels (#### X.Y.Z) MAY be used when natural subdivision exists
(e.g., handshake substeps, per-step descriptions). 5+ levels SHOULD
be avoided; use bold inline headings or numbered lists instead.
═══════════════════════════════════════════════════════════════════ WRITING STYLE ═══════════════════════════════════════════════════════════════════
═══════════════════════════════════════════════════════════════════ DIAGRAMS ═══════════════════════════════════════════════════════════════════
All visual diagrams MUST use Mermaid syntax (```mermaid code
blocks). Use <br/> for line breaks inside node labels (NOT \n).
Diagram types:
stateDiagram-v2 — state machines, lifecycle transitionsgraph TD / LR — architecture, component trees, data flowsequenceDiagram — message exchanges between participantsblock-beta — protocol stacks / layered architecturesflowchart TD / LR — decision trees, processing pipelinesPlacement:
═══════════════════════════════════════════════════════════════════ CROSS-REFERENCING ═══════════════════════════════════════════════════════════════════
SPEC_NAME §N.N notation
(e.g., HERDER_SPEC §12, TX_SPEC §3). Do not wrap in a markdown
link — section numbering is the stable anchor.Specification | Relationship.[name]: <url>) placed at the very end of the file, AFTER the
Appendices.═══════════════════════════════════════════════════════════════════ PSEUDOCODE NOTATION ═══════════════════════════════════════════════════════════════════
For algorithms embedded in spec sections:
camelCase (e.g., closeTime, txSetHash).functionName() (e.g., getNodeWeight()).SCREAMING_SNAKE_CASE (e.g.,
MANAGE_SELL_OFFER_MALFORMED).@version(≥N), @version(<N),
@version(=N) annotations on the conditional logic.if, else, for each, while,
return, indentation. Language-agnostic.Use prose with embedded pseudocode (the established style across the suite). Do not invent a custom DSL — there is no GUARD / MUTATE / ASSERT / CONST keyword set. Where ordering of checks matters, either number them or describe the order explicitly in prose.
═══════════════════════════════════════════════════════════════════ SPECIFIC CONTENT TO EXTRACT PER SPEC ═══════════════════════════════════════════════════════════════════
README.md:
graph TD).SCP_SPEC.md (from src/scp/):
OVERLAY_SPEC.md (from src/overlay/):
HERDER_SPEC.md (from src/herder/):
LEDGER_SPEC.md (from src/ledger/, src/main/):
TX_SPEC.md (from src/transactions/, src/main/):
BUCKETLISTDB_SPEC.md (from src/bucket/):
CATCHUP_SPEC.md (from src/catchup/, src/history/):
═══════════════════════════════════════════════════════════════════ PROCESS ═══════════════════════════════════════════════════════════════════
For each spec in scope:
$STRATEGY = update: classify findings against the existing
spec and apply only additions / strengthenings.
$STRATEGY = regenerate: organize into the canonical section
structure above and write the full document.SPEC_NAME §N.N notation.$MODE = review: produce the structured report described
under "Mode" above. Do not write any spec files. For
$STRATEGY = regenerate in review mode, refuse with: "Regenerate
overwrites curated content. Re-run with --apply to confirm."$MODE = apply: write each spec file in $SCOPE to disk and
print a short summary of what changed.stellar-core/
submodule is currently pinned to. To target a different version,
bump the submodule first.$SCOPE = all, $STRATEGY = update,
$MODE = apply), the 8 specs are independent — run as parallel
subagents.// Spec: XXX_SPEC §N comments in crates/*/src/
are the anchor between Rust code and these specs. When the skill
adds new sections that may be referenced from code, prefer
numbering inside an existing top-level ## section to avoid
invalidating existing anchors.