Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
Description
airc-queue card
Coordinates work via the AIRC queue substrate (airc#562). Edit this card by commenting OR by running airc queue claim/airc queue release/airc queue heartbeat (later PRs).
{
"kind": "airc-queue-card-v1",
"id": "#353",
"owner": "claude-tab-1",
"status": "claimed",
"evidence": "bulk-adopted from continuum unlabeled-open backlog (Joel directive 2026-05-14)",
"next_action": "triage scope + assign or close stale"
}Close this issue when the work is done (status=merged/abandoned).
Original issue body
Pre-adoption body
Problem
The CommandGenerator currently emits TypeScript only:
- Shared types (
*Types.ts) - Server/browser command implementations
- README, package.json, test stubs
It does NOT generate:
- Rust
commands.rs(command name constants + schemas) - Rust ServiceModule scaffolding
- IPC concurrent tokio patterns (the boilerplate every module needs)
- Integration test scaffolding for Rust
- ts-rs
#[derive(TS)]type definitions for wire types - TypeScript IPC mixin (
bindings/modules/*.ts)
Vision
A single command spec (JSON or TOML) generates the ENTIRE stack:
spec: grid.toml
→ Rust:
- commands.rs (constants, schemas)
- mod.rs (ServiceModule skeleton with handle_command dispatch)
- types.rs (wire types with #[derive(TS, Serialize, Deserialize)])
- tests.rs (unit test stubs for each command)
→ TypeScript:
- shared/*Types.ts (params, results)
- bindings/modules/grid.ts (IPC mixin)
- server/*ServerCommand.ts
- browser/*BrowserCommand.ts
→ Docs:
- README.md with usage examples
- Command schema for MCP tool discovery
Key patterns to codify
IPC tokio boilerplate
Every module has the same pattern:
pub struct MyState { ... }withArc<DashMap>for concurrent statepub struct MyModule { state: Arc<MyState> }ServiceModuleimpl withconfig(),initialize(),handle_command(),as_any()- Match dispatch to handler functions
This is mechanical and should be generated.
ts-rs bindings
Wire types that cross the Rust↔TS boundary need #[derive(TS)] with export paths. The generator should place these in shared/generated/ with barrel exports.
Test generation
- Unit tests for each command (call handler with mock params, verify JSON result shape)
- Integration test stubs (TCP roundtrip for grid-like modules)
- Test that schemas match constants (like grid's
test_schemas_match_constants)
Scope
- Extend
CommandGenerator.tsor createRustModuleGenerator.ts - Define spec format that covers both TS and Rust concerns
- Generate for new modules; optionally retrofit existing ones
- This is the "generators as architectural compilers" vision from GENERATOR-OOP-PHILOSOPHY.md
Activity
joelteply commentedon Mar 26, 2026
Generator as enforcer, not just scaffolder (from Joel):
The generator must:
The generator is not a convenience tool. It is the quality gate. A command that exists means it passed the generator. A command that does not pass the generator does not exist.
This means:
npx tsx generator/CommandGenerator.ts audit— scan all commands, report violationsnpx tsx generator/CommandGenerator.ts fix <command>— repair a command to complynpx tsx generator/CommandGenerator.ts validate <spec>— check before generatingrefactor(experience): lift room STANDING into one shared rule — archi…
chore(deps): bump airc pin 8dcfa76 → 490dc76 — picks up wall_posts_in (…
fix(observability): the room-gate abstain is a PROBE, not a tracing l…
github-actions commentedon Sep 8, 2026
This issue is stale because it has been open for 60 days with no activity. Please comment or update this issue to keep it active.
github-actions commentedon Oct 8, 2026
This issue was closed because it has been inactive for 30 days since being marked as stale.