diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..9c6f484 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,8 @@ +[build] +jobs = 2 + +[registries.crates-io] +protocol = "sparse" + +[net] +git-fetch-with-cli = true diff --git a/.gitignore b/.gitignore index 31a691f..2a09e72 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,7 @@ Cargo.lock # Lane persona (lane-persona, ephemeral) .agents/persona.md + +# Agent custody and DAG runner stores (local runs; never committed) +.blackwall/ +.dagrun/ diff --git a/.saga/flows/ep-gates.toml b/.saga/flows/ep-gates.toml new file mode 100644 index 0000000..a0d70cc --- /dev/null +++ b/.saga/flows/ep-gates.toml @@ -0,0 +1,72 @@ +# Flow: ep-gates +# +# Standard quality verification gates for unsigned-gg/ep: +# rustfmt check, ep-domain zero-I/O hygiene, clippy (-D warnings, -j 2), +# cargo test (-j 2), and Heimdal operator sign-off gate. + +[flow] +name = "ep-gates" +description = "Execute ep verification gates: fmt, zero-I/O hygiene, clippy (-D warnings, -j 2), cargo test (-j 2), and operator gate" + +[params.package] +required = false +default = "escapement-core" +description = "Target crate package for focused test verification" + +[[step]] +id = "fmt-check" +title = "Verify rustfmt formatting" +kind = "test" +agent = "auto" +verify_cmd = ["cargo", "fmt", "--all", "--", "--check"] +prompt = """ +Run `cargo fmt --all -- --check` across all crates in the workspace. +Ensure there are no formatting violations. +""" + +[[step]] +id = "hygiene-check" +title = "Verify ep-domain zero-I/O domain isolation" +kind = "test" +agent = "auto" +deps = ["fmt-check"] +verify_cmd = ["make", "smoke"] +prompt = """ +Run `make smoke` to verify `crates/ep-domain/src` has zero I/O imports. +""" + +[[step]] +id = "clippy-check" +title = "Run clippy linter with warnings denied (-j 2)" +kind = "test" +agent = "auto" +deps = ["hygiene-check"] +verify_cmd = ["cargo", "clippy", "--workspace", "--all-targets", "-j", "2", "--", "-D", "warnings"] +prompt = """ +Run `cargo clippy --workspace --all-targets -j 2 -- -D warnings`. +Confirm the workspace passes without any warnings. +""" + +[[step]] +id = "test-suite" +title = "Execute Cargo test suite (-j 2)" +kind = "test" +agent = "auto" +deps = ["clippy-check"] +verify_cmd = ["cargo", "test", "-p", "{{params.package}}", "-j", "2"] +prompt = """ +Run unit and integration test suites with mandatory host throttling: +`cargo test -p {{params.package}} -j 2` +All tests must pass. +""" + +[[step]] +id = "operator-gate" +title = "Operator sign-off gate" +kind = "gate" +gate = "heimdal:approval" +deps = ["test-suite"] +prompt = """ +Review verification receipts (fmt, hygiene, clippy, tests). +Approve gate to permit PR landing or promotion. +""" diff --git a/.saga/teams.toml b/.saga/teams.toml index 8bc082d..aa7b614 100644 --- a/.saga/teams.toml +++ b/.saga/teams.toml @@ -1,12 +1,25 @@ -# Escapement Clockwork Conclave (unsigned-gg/ep) -# Overlay on the saga catalog for the Escapement Scheduler lane (estate/w4C:p1). +# Saga team archetypes for unsigned-gg/ep, read by bifrost::yggdrasil. + +[teams.ep-solo] +topology = "solo" +members = [ + { slot = 0, role = "brokkr", harness = "agy", effort = "high" }, +] + +[teams.ep-dual] +topology = "dual-h" +members = [ + { slot = 0, role = "brokkr", harness = "agy", effort = "high" }, + { slot = 1, role = "loki", harness = "claude", effort = "high" }, +] + [teams.ep-gang] topology = "ep-cockpit" members = [ - { slot = 0, role = "gullveig", harness = "agy", effort = "high" }, + { slot = 0, role = "brokkr", 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 = 2, role = "sindri", effort = "medium" }, + { slot = 3, role = "sindri", effort = "medium" }, + { slot = 4, role = "mimir", effort = "high" }, { slot = 5, role = "loki", effort = "high" }, ] diff --git a/.saga/topologies.toml b/.saga/topologies.toml index cfa49dc..786dd8c 100644 --- a/.saga/topologies.toml +++ b/.saga/topologies.toml @@ -1,13 +1,35 @@ +# Yggdrasil pane topologies for unsigned-gg/ep, read by bifrost::yggdrasil. + +[topologies.solo] +slots = [{ role = "brokkr", label = "lead" }] +splits = [] + +[topologies.dual-h] +slots = [ + { role = "brokkr", label = "lead" }, + { role = "loki", label = "critic" }, +] +splits = [{ from = 0, direction = "right", ratio = 0.5, new = 1 }] + +[topologies.triad] +slots = [ + { role = "brokkr", label = "lead" }, + { role = "sindri", label = "builder" }, + { role = "loki", label = "critic" }, +] +splits = [ + { from = 0, direction = "right", ratio = 0.5, new = 1 }, + { from = 1, direction = "down", ratio = 0.5, new = 2 }, +] + # 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 = "brokkr", label = "lead" }, { role = "sindri", label = "worker-top" }, - { role = "verdandi", label = "worker-mid" }, - { role = "dvalinn", label = "worker-bottom" }, - { role = "saga", label = "architect" }, + { role = "sindri", label = "worker-mid" }, + { role = "sindri", label = "worker-bottom" }, + { role = "mimir", label = "architect" }, { role = "loki", label = "critic" }, ] splits = [ diff --git a/Justfile b/Justfile deleted file mode 100644 index 7663fc5..0000000 --- a/Justfile +++ /dev/null @@ -1,28 +0,0 @@ -set shell := ["bash", "-euo", "pipefail", "-c"] - -jobs := "2" - -default: help - -help: - @echo "ep Justfile targets:" - @echo " build - Compile all crates (-j {{jobs}})" - @echo " check - Run cargo check (-j {{jobs}})" - @echo " test - Run test suite (-j {{jobs}})" - @echo " fmt - Format code" - @echo " clippy - Run clippy linter" - -build: - cargo build --workspace -j {{jobs}} - -check: - cargo check --workspace --all-targets -j {{jobs}} - -test: - cargo test --workspace -j {{jobs}} - -fmt: - cargo fmt --all - -clippy: - cargo clippy --workspace --all-targets -j {{jobs}} -- -D warnings diff --git a/Makefile b/Makefile index ed38da7..ce05e8d 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,22 @@ +# Makefile for unsigned-gg/ep SHELL := bash .SHELLFLAGS := -euo pipefail -c .DEFAULT_GOAL := help JOBS ?= 2 -.PHONY: help build check test fmt clippy clean +.PHONY: help build check test fmt fmt-check clippy smoke clean help: @echo "ep Makefile targets:" - @echo " build - Compile all crates (-j $(JOBS))" - @echo " check - Run cargo check (-j $(JOBS))" - @echo " test - Run test suite (-j $(JOBS))" - @echo " fmt - Format code" - @echo " clippy - Run clippy linter" - @echo " clean - Clean build artifacts" + @echo " build - Compile all crates (-j $(JOBS))" + @echo " check - Run cargo check (-j $(JOBS))" + @echo " test - Run test suite (-j $(JOBS))" + @echo " fmt - Format code" + @echo " fmt-check - Check code formatting" + @echo " clippy - Run clippy linter (-D warnings, -j $(JOBS))" + @echo " smoke - Verify ep-domain zero-I/O invariant" + @echo " clean - Clean build artifacts" build: cargo build --workspace -j $(JOBS) @@ -27,8 +30,18 @@ test: fmt: cargo fmt --all +fmt-check: + cargo fmt --all -- --check + clippy: cargo clippy --workspace --all-targets -j $(JOBS) -- -D warnings +smoke: + @if grep -rnE 'std::net|std::fs|tokio|std::process' crates/ep-domain/src; then \ + echo "smoke: ep-domain must not use I/O" >&2; \ + exit 1; \ + fi + @echo "smoke: ep-domain zero-I/O invariant ok" + clean: cargo clean diff --git a/blackwall.toml b/blackwall.toml new file mode 100644 index 0000000..359f7f3 --- /dev/null +++ b/blackwall.toml @@ -0,0 +1,16 @@ +# Blackwall build-pipeline custody config for unsigned-gg/ep. +# Custody chain: run -> settle -> reconcile -> verify -> PR -> merge-gate. + +[defaults] +provider = "gateway" +model = "kimi-k3" + +[verify] +command = "cargo fmt --all -- --check && cargo clippy --workspace --all-targets -j 2 -- -D warnings && cargo test --workspace -j 2" + +[merge] +# Green CI reports ready; operator or fast-forward lane lands explicitly. +automerge = false + +[budget] +max_tokens_per_run = 200000 diff --git a/projectfile.yaml b/projectfile.yaml new file mode 100644 index 0000000..0f34b7f --- /dev/null +++ b/projectfile.yaml @@ -0,0 +1,67 @@ +$schema: https://projectfile.org/schema/v1.json +kind: SoftwareSourceCode + +identity: + namespace: gg.unsigned + name: ep + version: "0.1.0" + title: + en: "ep — Escapement Scheduler" + summary: + en: "Metered, deterministic dispatch engine and event reactor for autonomous agent constellations in Rust." + created: "2026-10-11" + modified: "2026-11-16" + +repositories: + - url: "https://github.com/unsigned-gg/ep.git" + type: git + branch: main + role: origin + +links: + - type: source-code + url: https://github.com/unsigned-gg/ep + - type: bugs + url: https://github.com/unsigned-gg/ep/issues + +license: + spdx: Apache-2.0 OR MIT + file: LICENSE-MIT + +copyright: + year: 2026 + +people: + - family-names: Todie + given-names: Christian M. + email: chris@todie.io + roles: [founder, author, maintainer, copyright] + +organizations: + - name: "Unsigned" + url: https://github.com/unsigned-gg + roles: [funder, copyright, maintainer] + +keywords: + - scheduler + - event-reactor + - escapement + - agent-orchestration + - deterministic-dispatch + - rust + +org.projectfile.ci: + nodes: + - id: zero-io-domain + run: "! grep -rnE 'std::net|std::fs|tokio|std::process' crates/ep-domain/src" + - id: fmt + run: "cargo fmt --all -- --check" + - id: clippy + depends_on: [fmt, zero-io-domain] + run: "cargo clippy --workspace -j 2 --all-targets -- -D warnings" + - id: check + depends_on: [clippy] + run: "cargo check --workspace -j 2 --all-targets" + - id: test + depends_on: [check] + run: "cargo test --workspace -j 2" diff --git a/validation.dag.yaml b/validation.dag.yaml new file mode 100644 index 0000000..3b080b8 --- /dev/null +++ b/validation.dag.yaml @@ -0,0 +1,66 @@ +# ep Workstation & CI Validation DAG for dagrun v0.15.0+ +# Applies two-level cgroup-v2 containment, CPA moldable CPU width planning, +# rss_baseline_bytes memory admission, and cargo-target lock serialization on ceres. + +version: 2 + +defaults: + timeout: 600 + env: + CARGO_BUILD_JOBS: "2" + JOBS: "2" + +resource_caps: + cargo-target: 1 + +steps: + - job: zero-io-domain + group: hygiene + desc: "Verify ep-domain zero-I/O leaf purity" + cmd: "! grep -rnE 'std::net|std::fs|tokio|std::process' crates/ep-domain/src" + cmdtype: unknown + hint: + est_duration_s: 0.2 + rss_baseline_bytes: 67108864 + hard_mem_max_bytes: 268435456 + + - job: fmt-check + group: rust + desc: "Verify Rust workspace formatting" + cmd: "cargo fmt --all -- --check" + cmdtype: unknown + hint: + est_duration_s: 1.0 + rss_baseline_bytes: 268435456 + hard_mem_max_bytes: 1073741824 + + - job: clippy + group: rust + desc: "Run workspace clippy with -D warnings (-j 2)" + cmd: "cargo clippy --workspace -j 2 --all-targets -- -D warnings" + cmdtype: cargo-build + deps: + - rust.fmt-check + - hygiene.zero-io-domain + hint: + est_duration_s: 10.0 + rss_baseline_bytes: 1073741824 + hard_mem_max_bytes: 4294967296 + preferred_inner_jobs: 2 + resources: + cargo-target: 1 + + - job: test + group: rust + desc: "Run workspace unit and integration tests (-j 2)" + cmd: "cargo test --workspace -j 2" + cmdtype: cargo-test + deps: + - rust.clippy + hint: + est_duration_s: 8.0 + rss_baseline_bytes: 1073741824 + hard_mem_max_bytes: 4294967296 + preferred_inner_jobs: 2 + resources: + cargo-target: 1