Agent & Developer API Reference
View-Only OpenAPI 3.1 Specification & Structured JSON Datasets
Full schema for agents and tools.
Human-friendly schema format.
60+ operations, shifts & stack deltas.
28 keys, modes, and superpowers.
1. Overview for Autonomous AI Agents
To support modern agentic coding workflows, calculator verification, and LLM-assisted curriculum generation, StackCalc publishes view-only, machine-readable specifications of its hardware architectures, button rubrics, and operational state machines.
Agents can query these endpoints to:
1. Look up exact keystrokes: Determine primary, yellow ([f]), and blue ([g]) shift sequences without hallucination.
2. Verify stack transitions (\(\Delta \text{Stack}\)): Inspect how \(X, Y, Z, T\) registers mutate before and after an operation (such as [÷R], [REP], or [SOLVE]).
3. Inspect mode parameters: Understand the active visual mode (e.g. Ten-Frame [▦], Clock [🕒], or 4-Stack XYZT).
2. Core API Endpoints
The API is structured as a lightweight, read-only resource model:
3. Schema Architecture: The CalculatorOperation Object
Every operation in the StackCalc ecosystem is defined with deterministic stack transformation semantics:
{
"id": "intDiv",
"name": "Integer Division with Remainder",
"key": "÷",
"shift": "blue",
"legend": "÷R",
"subsystem": "Core Stack & Arithmetic",
"description": "Performs integer division of Y by X. Places integer quotient in X and integer remainder in Y simultaneously. Divisor saved in LAST X.",
"stack_delta": {
"before": {
"T": "t",
"Z": "z",
"Y": "dividend",
"X": "divisor"
},
"after": {
"T": "t",
"Z": "z",
"Y": "remainder",
"X": "quotient"
}
},
"example": "23 [ENTER] 4 [g] [÷R] -> Y: 3.0000 (R), X: 5.0000 (Q)"
}
4. Example: Agent Keystroke Retrieval
An agent assisting a student with a Texas UIL word problem or elementary division remainder can parse docs/api/sc32-reference.json or docs/api/sc6-reference.json directly to construct valid keystroke chains: