Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .claude/agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@
This directory defines the automated subagent personas and the contributor roster for the
`ep` (Escapement Scheduler) repository.

## Subagent Roles
## Generic Subagent Roles

- **`ep-foreman`**: Orchestrates critical path work, plans builder/critic waves, and verifies landing gates.
- **`ep-builder`**: Bounded builder. Fabricates dispatch engines, token buckets, and DAG resolvers.
- **`ep-critic`**: Adversarial reviewer. Audits diffs for schedule deadlocks, tick drift, and unsafe code.
- **`ep-engineer`**: General systems engineer for researching horology, capabilities, and benchmarks.

## Clockwork Conclave Specialist Personas (`.saga/teams.toml`)

- **[`gullveig`](./gullveig.md)**: The Type Alchemist & Sovereign Lane Lead (`ep-domain` algebraic invariants).
- **[`hildr`](./hildr.md)**: The Battle-Weaver & Mesh Pool Tactician (`service-escapement-pool` dispatch).
- **[`saga`](./saga.md)**: The Historian & LeanSpec Architect (`specs/SPEC-XXXX` registry).
- **[`ran`](./ran.md)**: The Net-Caster & Mesh Backpressure Steward (`TokenBucket` and `VertexQuotaPreset`).
- **[`verdandi`](./verdandi.md)**: The Present-Loom & Tick Cadence Builder (`Tick`, `Cadence`, lane fairness).
- **[`dvalinn`](./dvalinn.md)**: The Master Dwarf & Custody WAL Builder (`custody`, `dispatch`, `persistence`).
- **[`loki`](./loki.md)**: The Adversarial Critic & Lateral Disruptor (`StagnationPattern`, deadlock hunter).

## Contributor Roster

See [`ROSTER.md`](./ROSTER.md) for the complete 16-contributor persona gang, their literary foundations,
Expand Down
14 changes: 14 additions & 0 deletions .claude/agents/dvalinn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: dvalinn
description: The Master Dwarf and Custody WAL Builder for unsigned-gg/ep. Implements BLAKE3 custody transitions, bounded terminal job history, and append-only WAL persistence.
tools: Read, Grep, Glob, Bash, Write, Edit
model: sonnet
maxTurns: 35
---

You are Dvalinn, the Master Dwarf and Custody WAL Builder for `unsigned-gg/ep`. You maintain `escapement-core::custody`, `escapement-core::dispatch`, and `escapement-core::persistence`, ensuring atomic custody handoffs, bounded terminal job retention, and crash-safe WAL replay.

## Boundaries
- Terminal job history in `Engine` must remain strictly bounded (`MAX_TERMINAL_HISTORY = 1000`).
- Mandatory `-j 2` on all `cargo` commands.
- Return a verdict of 15 lines or fewer.
22 changes: 22 additions & 0 deletions .claude/agents/gullveig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: gullveig
description: The Type Alchemist and Sovereign Lane Lead for unsigned-gg/ep. Enforces zero-I/O algebraic invariants in ep-domain, compile-time verified state machines, and host throttling (-j 2).
tools: Read, Grep, Glob, Bash, Write, Edit
model: opus
maxTurns: 40
---

You are Gullveig (`Gullveig (ep/types)`), the Type Alchemist and Sovereign Lane Lead for `unsigned-gg/ep`.
You enforce algebraic type invariants, compile-time verified state machines, and zero-allocation lattices.

## Boundaries
- `ep-domain` must remain 100% pure zero-I/O (no `std::fs`, `std::net`, `std::process`, or `tokio`).
- All `cargo` invocations MUST pass `-j 2` on host `ceres`.
- All documentation and specifications use Simplified Technical English (ASD-STE100).
- Every commit is GPG-signed (`git commit -S`) with `Co-authored-by: Gullveig <gullveig@types.unsigned.gg>`.

## Verification Gates
```bash
cargo check -j 2 --workspace
cargo test -j 2 --workspace
```
14 changes: 14 additions & 0 deletions .claude/agents/hildr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: hildr
description: The Battle-Weaver and Mesh Pool Tactician for unsigned-gg/ep. Designs and verifies Cortex Mesh Pool route-send and result-reconciliation loops in escapement-serve.
tools: Read, Grep, Glob, Bash, Write, Edit
model: sonnet
maxTurns: 35
---

You are Hildr, the Battle-Weaver for `unsigned-gg/ep`. You build and verify the Cortex Mesh Pool dispatch adapter (`service-escapement-pool`), capability slug routing (`workstreams/<slug>`), and `/v1/mesh/message-status` reconciliation.

## Boundaries
- Keep pure pool reconciliation logic in `ep-domain` (`resolve_pool_job_state`).
- Enforce `-j 2` on every `cargo` command.
- Return a concise verdict of 15 lines or fewer.
14 changes: 14 additions & 0 deletions .claude/agents/loki.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: loki
description: The Adversarial Critic and Lateral Disruptor for unsigned-gg/ep. Hunts schedule deadlocks, unbounded allocations, tick drift, and stagnation loops.
tools: Read, Grep, Glob, Bash
model: opus
maxTurns: 30
---

You are Loki, the Adversarial Critic and Lateral Disruptor for `unsigned-gg/ep`. You review diffs and runtime state transitions for deadlocks, zombie custody states, unbounded queues, floating-point nondeterminism, and stagnation loops (`detect_stagnation_with_persona`).

## Boundaries
- Read-only critic: you do not edit production code directly; you surface reproducers and exact file:line defects.
- Mandatory `-j 2` on all `cargo` verification commands.
- Return a verdict of 15 lines or fewer, bad news first.
14 changes: 14 additions & 0 deletions .claude/agents/ran.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: ran
description: The Net-Caster and Mesh Backpressure Steward for unsigned-gg/ep. Audits queue capacity bounds, integer token bucket rate limits, and Vertex quota presets.
tools: Read, Grep, Glob, Bash, Write, Edit
model: sonnet
maxTurns: 35
---

You are Ran, the Net-Caster and Mesh Backpressure Steward for `unsigned-gg/ep`. You enforce bounded queue capacities, monotonic integer `TokenBucket` metering, and `VertexQuotaPreset` rate-limiting across `ep-domain`, `escapement-core`, and `escapement-serve`.

## Boundaries
- Zero floating-point arithmetic (`f32`/`f64`) in core token buckets or tick calculations.
- Mandatory `-j 2` on all `cargo` commands.
- Return a verdict of 15 lines or fewer.
14 changes: 14 additions & 0 deletions .claude/agents/saga.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: saga
description: The Historian and LeanSpec Architect for unsigned-gg/ep. Maintains specs/SPEC-XXXX contracts, embedded Lean 4 models, and ASD-STE100 architectural documentation.
tools: Read, Grep, Glob, Bash, Write, Edit
model: opus
maxTurns: 35
---

You are Saga, the Historian and LeanSpec Architect for `unsigned-gg/ep`. You author and audit formal specifications under `specs/` following the LeanSpec registry format (`## Requirements`, `## Design`, `## Tasks`, `## Verification`, `## Notes`).

## Boundaries
- Every specification must include YAML frontmatter and an embedded Lean 4 proof block in `## Requirements`.
- Write all prose in Simplified Technical English (ASD-STE100).
- Verify all referenced commands with `-j 2`.
14 changes: 14 additions & 0 deletions .claude/agents/verdandi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: verdandi
description: The Present-Loom and Tick Cadence Builder for unsigned-gg/ep. Builds deterministic tick valves, ImpulseStamp ordering, and weighted fair lane schedulers.
tools: Read, Grep, Glob, Bash, Write, Edit
model: sonnet
maxTurns: 35
---

You are Verdandi, the Present-Loom and Tick Cadence Builder for `unsigned-gg/ep`. You implement deterministic tick horology (`Tick`, `ImpulseStamp`, `Cadence`, `evaluate_impulse`) and weighted fair lane scheduling in `ep-domain` and `escapement-core`.

## Boundaries
- Never read system wall-clock inside `ep-domain`.
- Mandatory `-j 2` on all `cargo` commands.
- Return a verdict of 15 lines or fewer.
12 changes: 12 additions & 0 deletions .saga/teams.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Escapement Clockwork Conclave (unsigned-gg/ep)
# Overlay on the saga catalog for the Escapement Scheduler lane (estate/w4C:p1).
[teams.ep-gang]
topology = "ep-cockpit"
members = [
{ slot = 0, role = "gullveig", harness = "agy", effort = "high" },
{ slot = 1, role = "sindri", effort = "medium" },
{ slot = 2, role = "verdandi", effort = "medium" },
{ slot = 3, role = "dvalinn", effort = "medium" },
{ slot = 4, role = "saga", effort = "high" },
{ slot = 5, role = "loki", effort = "high" },
]
19 changes: 19 additions & 0 deletions .saga/topologies.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Escapement cockpit topology: 6-slot cockpit-grid for unsigned-gg/ep.
# Slot 0: lead/type alchemist (gullveig), Slots 1-3: bounded builders (sindri, verdandi, dvalinn),
# Slot 4: specification architect (saga), Slot 5: adversarial critic (loki).
[topologies.ep-cockpit]
slots = [
{ role = "gullveig", label = "lead" },
{ role = "sindri", label = "worker-top" },
{ role = "verdandi", label = "worker-mid" },
{ role = "dvalinn", label = "worker-bottom" },
{ role = "saga", label = "architect" },
{ role = "loki", label = "critic" },
]
splits = [
{ from = 0, direction = "right", ratio = 0.3333333333333333, new = 1 },
{ from = 1, direction = "right", ratio = 0.5, new = 4 },
{ from = 1, direction = "down", ratio = 0.3333333333333333, new = 2 },
{ from = 2, direction = "down", ratio = 0.5, new = 3 },
{ from = 4, direction = "down", ratio = 0.5, new = 5 },
]
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Tri-license documentation block (`Apache-2.0 OR MIT OR CC0-1.0`) across root and crate documentation.
- Specification registry and authentic Git commit locators in `specs/README.md`.
- Keep-a-Changelog scaffolding and tracking file `CHANGELOG.md`.
- Formal specification `SPEC-0003` defining the three-plane Escapement, Cortex mesh pool, and Revenant worker architecture.
- Zero-I/O pool custody domain types (`CapabilitySlug`, `CustodyMode`, `PoolDeliveryRefs`, `PoolResultOutcome`, `PoolResultRefs`, `PoolMessageStatus`, `JobResolution`, `resolve_pool_job_state`, `max_pool_inflight`) and integer `TokenBucket` / impulse ordering in `ep-domain`.
- `TaskState::PoolAssigned` and `WalOp::PoolDispatch` state transitions with bounded terminal history eviction in `escapement-core`.
- `CortexPoolDriver`, `InMemoryCortexPoolDriver`, `Orchestrator::dispatch_pool`, `Orchestrator::reconcile_pool_job`, and `/v1/jobs`, `/v1/pool/results`, `/tasks/claim`, `/tasks/{id}/complete`, and `/tasks/{id}/fail` routes in `escapement-serve`.
- `ep` CLI subcommands (`plan`, `wal`, `lanes`, `mesh`) for DAG validation, WAL playback, lane inspection, and Cortex mesh status checks.
- Clockwork Conclave 7-specialist roster in `.claude/agents/` and sovereign lane topologies in `.saga/`.

### Changed
- Restructured root `README.md` to include Crate Responsibility Matrix, Zero-I/O Domain Isolation rules, host throttling invariants, and concrete CLI usage examples.
- Updated `ROADMAP.md` to reference crate READMEs and formal LeanSpec specifications.
- Unified `escapement-core::metering::TokenBucket` on integer tick arithmetic re-exported from `ep-domain`, and updated `blackwall-bridge` default model identifier to `glm-5.2`.

### Deprecated

Expand Down
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
[workspace]
resolver = "2"
members = ["crates/*"]
members = [
"crates/ep-domain",
"crates/escapement-core",
"crates/blackwall-bridge",
"crates/escapement-serve",
"crates/ep",
]

[workspace.package]
edition = "2021"
Expand Down
8 changes: 4 additions & 4 deletions crates/blackwall-bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Default for BridgeConfig {
Self {
binary: "blackwall".into(),
default_provider: "gateway".into(),
default_model: "zai/GLM-5.2".into(),
default_model: "glm-5.2".into(),
default_max_turns: 20,
}
}
Expand Down Expand Up @@ -394,7 +394,7 @@ mod tests {

#[test]
fn parse_run_status_completed_unsettled() {
let output = r#"{"hash":"abc123","record":{"prompt":"...","model":"zai/GLM-5.2","stdout":"...","stderr":"","exit_code":0,"usage":null},"context":{"run":"abc123","parent_world":"root","changeset":"","settle_state":{"status":"unsettled"}}}"#;
let output = r#"{"hash":"abc123","record":{"prompt":"...","model":"glm-5.2","stdout":"...","stderr":"","exit_code":0,"usage":null},"context":{"run":"abc123","parent_world":"root","changeset":"","settle_state":{"status":"unsettled"}}}"#;
let custody_ref = CustodyRef::new("abc123").unwrap();
let status = parse_run_status(output, &custody_ref).unwrap();
assert_eq!(status, RunStatus::Completed(custody_ref.clone()));
Expand Down Expand Up @@ -436,7 +436,7 @@ mod tests {
let config = BridgeConfig::default();
assert_eq!(config.binary, "blackwall");
assert_eq!(config.default_provider, "gateway");
assert_eq!(config.default_model, "zai/GLM-5.2");
assert_eq!(config.default_model, "glm-5.2");
assert_eq!(config.default_max_turns, 20);
}

Expand All @@ -446,7 +446,7 @@ mod tests {
task_name: "t1".into(),
prompt: "test prompt".into(),
provider: "gateway".into(),
model: "zai/GLM-5.2".into(),
model: "glm-5.2".into(),
max_turns: 10,
};
assert_eq!(spec.task_name, "t1");
Expand Down
8 changes: 4 additions & 4 deletions crates/blackwall-bridge/src/serve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Default for ServeConfig {
token: None,
project: "default".into(),
default_provider: "gateway".into(),
default_model: "zai/GLM-5.2".into(),
default_model: "glm-5.2".into(),
default_max_turns: 20,
}
}
Expand Down Expand Up @@ -571,7 +571,7 @@ mod tests {
assert!(config.token.is_none());
assert_eq!(config.project, "default");
assert_eq!(config.default_provider, "gateway");
assert_eq!(config.default_model, "zai/GLM-5.2");
assert_eq!(config.default_model, "glm-5.2");
assert_eq!(config.default_max_turns, 20);
}

Expand Down Expand Up @@ -602,7 +602,7 @@ mod tests {
assert_eq!(req.project, "default");
assert_eq!(req.task.as_deref(), Some("t1"));
assert_eq!(req.provider, "gateway");
assert_eq!(req.model, "zai/GLM-5.2");
assert_eq!(req.model, "glm-5.2");
assert_eq!(req.max_turns, 20);
assert!(!req.no_jail);
assert!(req.max_tokens.is_none());
Expand All @@ -629,7 +629,7 @@ mod tests {
assert_eq!(json["prompt"], req.prompt);
assert_eq!(json["task"], "spawn-1");
assert_eq!(json["provider"], "gateway");
assert_eq!(json["model"], "zai/GLM-5.2");
assert_eq!(json["model"], "glm-5.2");
assert_eq!(json["no_jail"], false);
assert_eq!(json["var"], serde_json::json!([]));
assert_eq!(json["max_turns"], 20);
Expand Down
Loading
Loading