This repository is the command surface of the labour engine that rewrites global production schedules on demand. Every module, parameter, and pause lever converges so the designated owner can steer, halt, or reconfigure the markets in real time.
- Mission Vector
- Constellation Cartography
- Owner Dominion
- $AGIALPHA Canon
- Repository Atlas
- Operational Flight Deck
- Quality and Security Mesh
- Deployment Autopilot
- Documentation & Demo Orbits
- Support & Contribution Protocol
- Total owner primacy. Governance flows through
contracts/admin/OwnerConfigurator.solandcontracts/SystemPause.sol, letting the owner batch-govern, pause, resume, or retarget any subsystem instantly. - Identity truthfulness. Identity issuance and attestation, orchestrated by
contracts/IdentityRegistry.sol,contracts/AttestationRegistry.sol, andcontracts/CertificateNFT.sol, anchor every validator, employer, and platform to verifiable proofs. - Economic steering.
contracts/StakeManager.solandcontracts/Thermostat.solchannel $AGIALPHA incentives, burn pressure, and staking constraints with Hamiltonian feedback. - Global oversight.
docs/operations/holds non-technical runbooks that mirror the automation surfaces, so operational guardians can execute policies without touching Solidity.
graph TD
OwnerSafe[[Owner Safe Multisig]] -->|batch directives| OwnerConfigurator
OwnerConfigurator -->|governance calls| SystemPause
GuardianSafe[[Guardian Safe]] -->|emergency halt| SystemPause
SystemPause -->|pause/unpause| ModuleMesh[Labor Modules]
SystemPause -->|forward| StakeManager
StakeManager --> Thermostat
StakeManager --> Hamiltonian[Hamiltonian Feed]
ModuleMesh --> JobRegistry
ModuleMesh --> ValidationModule
ModuleMesh --> DisputeModule
IdentityHub[[Identity Orbit]] --> IdentityRegistry
IdentityRegistry --> JobRegistry
IdentityRegistry --> AttestationRegistry
CertificateNFT --> JobRegistry
FeePool --> Treasury
Treasury -.-> OwnerSafe
style OwnerConfigurator fill:#03045e,stroke:#4cc9f0,color:#f1faee
style SystemPause fill:#240046,stroke:#4cc9f0,color:#f1faee
style ModuleMesh fill:#0b132b,stroke:#3a86ff,color:#f1faee
style IdentityHub fill:#3a0ca3,stroke:#9d4edd,color:#ffffff
mindmap
root((Sovereign Labor Engine))
Core Contracts
Governable(contracts/Governable.sol)
SystemPause(contracts/SystemPause.sol)
StakeManager(contracts/StakeManager.sol)
JobRegistry(contracts/JobRegistry.sol)
PlatformRegistry(contracts/PlatformRegistry.sol)
Modules
Validation(contracts/ValidationModule.sol)
Dispute(contracts/modules/DisputeModule.sol)
Reputation(contracts/ReputationEngine.sol)
Arbitrator(contracts/ArbitratorCommittee.sol)
TaxPolicy(contracts/TaxPolicy.sol)
Identity Orbit
Registry(contracts/IdentityRegistry.sol)
Attestations(contracts/AttestationRegistry.sol)
Credentials(contracts/CertificateNFT.sol)
ENS Verifier(contracts/ENSIdentityVerifier.sol)
Tooling
Truffle(truffle/)
Hardhat(hardhat/)
Foundry(foundry/)
Scripts(scripts/)
Deployment
Manifests(deploy/)
Migrations(migrations/)
Ops Docs(docs/operations/)
Demonstrations
Demo Suite(demo/)
- Contracts. Solidity sources live under
contracts/with admin access hardened bycontracts/Governable.soland two-step ownership viacontracts/utils/CoreOwnable2Step.sol. - Runtime parity. Truffle, Hardhat, and Foundry configurations (
truffle/,hardhat/,foundry/) are synchronized so every invariant is exercised under multiple toolchains. - Operational intelligence. Architecture decisions, ADRs, and incident drills live in
docs/design/,docs/adr/, anddocs/operations/.
The owner has absolute control over parameter surfaces, routing, and pause levers. Guardians serve strictly as delegated safety brakes.
sequenceDiagram
participant OwnerSafe
participant GuardianSafe
participant OwnerConfigurator
participant SystemPause
participant StakeManager
participant JobRegistry
participant FeePool
participant Thermostat
participant IdentityRegistry
OwnerSafe->>OwnerConfigurator: configureBatch(governanceCalls)
OwnerConfigurator->>SystemPause: executeGovernanceCall(target, data)
SystemPause->>StakeManager: setModules / pauseAll / unpauseAll
SystemPause->>JobRegistry: refreshConnectors / setCertificate
SystemPause->>FeePool: setTreasury / setRewardRatios
GuardianSafe->>SystemPause: pauseAll()
OwnerSafe->>Thermostat: tuneIssuance()
OwnerSafe->>IdentityRegistry: setRootIdentity()
SystemPause-->>OwnerSafe: ModulesUpdated / ParameterUpdated events
| Surface | Owner-only controls | Files |
|---|---|---|
| Governance router | configure, configureBatch, setSystemPause, setGuardians |
contracts/admin/OwnerConfigurator.sol |
| Global pause lattice | setModules, refreshPausers, pauseAll, unpauseAll, executeGovernanceCall |
contracts/SystemPause.sol |
| Economic core | Treasury routing, burn ratios, validator lists, slash splits, auto tuning toggles | contracts/StakeManager.sol, contracts/Thermostat.sol |
| Labor registry | Identity anchors, module connectors, fee curves, certificate enforcement | contracts/JobRegistry.sol |
| Validation + dispute | Validator cadence, escalation policy, jail logic | contracts/ValidationModule.sol, contracts/modules/DisputeModule.sol |
| Treasury pool | setTreasury, setTreasuryAllowlist, reward ratios |
contracts/FeePool.sol |
| Identity orbit | Root updates, schema management, credential minting roles | contracts/IdentityRegistry.sol, contracts/AttestationRegistry.sol, contracts/CertificateNFT.sol |
| Compliance | Policy URIs, acknowledgement rules | contracts/TaxPolicy.sol |
Guardians listed in SystemPause can halt the mesh, but only the owner (via Governable) can rewire modules, resume operations, or change any parameter. This asymmetry keeps emergency responses subordinate to owner intent.
- Immutable binding.
$AGIALPHAresolves to ERC-20 contract0xa61a3b3a130a9c20768eebf97e21515a6046a1fa(18 decimals) throughcontracts/Constants.sol. - Runtime assertions. Constructors in
contracts/StakeManager.sol,contracts/FeePool.sol, andcontracts/JobRegistry.solvalidate token metadata and revert on mismatch. - Deployment guardrails.
deploy/config.mainnet.jsonand scripts inscripts/enforce the canonical token address before any production broadcast completes.
| Path | Purpose |
|---|---|
contracts/ |
Solidity sources grouped by core, modules, identity, and utilities. |
migrations/ |
Truffle migration scripts synchronized with deployment manifests. |
deploy/ |
Network configuration, autopilot docs, and governance manifests. |
truffle/ |
Truffle-specific helpers and persistent configuration. |
hardhat/ |
Hardhat project with dedicated scripts and tests. |
foundry/ |
Foundry configuration, scripts, and invariant tests. |
scripts/ |
Governance checks, artifact verification, deployment automation, branch enforcement. |
docs/ |
Design dossiers, ADRs, operator playbooks, and compliance narratives. |
demo/ |
Guided demonstrations of the labor mesh running simulated markets. |
Prerequisites: Node.js 20.x, npm 10+, Foundry toolchain (
foundryup), Python 3.11+ for static analysis, and access to the canonical$AGIALPHAtoken metadata.
# Install dependencies (once per machine)
npm ci --omit=optional --no-audit --no-fund
# Compile contracts with Truffle (disable analytics prompts)
TRUFFLE_TELEMETRY_DISABLED=1 npm run compile
# The compiler always runs with viaIR + optimizer because disabling IR
# triggers stack-too-deep errors in `ValidationModule`. Expect the first
# compile to take a few minutes; cached artifacts keep later runs quick.
# Execute Truffle tests using cached build artifacts
npm run test:truffle:ci
# Execute Hardhat tests
npm run test:hardhat
# Execute Foundry tests (requires forge)
npm run test:foundry
# The Truffle build artifacts now persist under `build/contracts`,
# so `npm test` compiles once and subsequent runs reuse the cached output via
# `--compile-none`. If you need a clean slate (e.g., after editing compiler
# settings), delete that directory before rerunning the suite.
# Governance matrix audit (verifies owner dominance)
npm run ci:governance
# Lint Solidity sources
npm run lint:solThe commands are idempotent and mirror the CI pipeline. Non-technical operators can copy the Safe transaction manifests from docs/operations/ when executing governance routines.
timeline
title CI & Assurance Pipeline
Checkout : Sovereign Compile (lint, compile, governance audit, multi-runtime tests, actionlint)
Static Analysis : Security Scans workflow (Slither SARIF + Mythril symbolic execution)
Branch Policy : Branch Gatekeeper (branch naming guard)
Enforcement : Branch protection rules on main & develop
- Workflows.
Sovereign Compile,Security Scans, andBranch Gatekeeperrun on pushes, pull requests, schedules, and manual dispatches. - Artifacts & summaries. Truffle build artifacts, Slither SARIF reports, and Mythril traces are uploaded for every run with concise summaries in the Actions tab.
- Branch protection.
.github/settings.ymlenforces required checks, linear history, admin inclusion, and review requirements onmainanddevelop. - Security depth. Slither fails on high-severity findings, and Mythril performs bounded symbolic execution across owner-controlled contracts to expose misconfiguration surfaces before deployment.
To reproduce locally:
# Static analysis
pip install --upgrade pip
pip install 'slither-analyzer==0.11.3' 'crytic-compile==0.3.10'
forge build --build-info --skip '*/foundry/test/**' '*/script/**' --force
slither . --config-file slither.config.json --foundry-out-directory foundry/out
# Mythril symbolic execution (subset)
pip install mythril
myth analyze contracts/SystemPause.sol --solv 0.8.25 \
--allow-paths contracts,node_modules \
--solc-remaps @openzeppelin=node_modules/@openzeppelin \
--execution-timeout 900 --max-depth 32- Review
deploy/config.mainnet.jsonfor Safe addresses, pauser delegates, and$AGIALPHAtreasury routing. - Consult
deploy/README.mdfor workflow-specific broadcast instructions. - Choose a runtime:
- Truffle:
npm run deploy:truffle:mainnet - Hardhat:
npm run deploy:hardhat:mainnet - Foundry:
npm run deploy:foundry:mainnet
- Truffle:
- Apply owner governance policies via
scripts/owner-apply-validator-policy.jsandscripts/owner-set-treasury.js. - Record emitted events (
ModulesUpdated,ParameterUpdated,TemperatureUpdated) as immutable evidence for compliance and audit trails.
Each autopilot halts if the $AGIALPHA constant or token metadata deviates from the canonical configuration, guaranteeing production deployments match the authoritative economic spine.
- Operations Runbooks:
docs/operations/translates every governance and incident response path into Safe-friendly checklists. - Architecture & ADRs:
docs/design/anddocs/adr/capture the rationale behind contract interfaces, control flows, and fail-safes. - Demo Universe:
demo/hosts meta-agentic walkthroughs (e.g.,Meta-Agentic-ALPHA-AGI-Jobs-v0) that simulate validator onboarding, treasury routing, and dispute resolution.
journey
title Operator Journey
section Preparation
Review ops runbooks: 5: Owner Safe
Confirm guardian status: 4: Guardian Safe
section Execution
Submit governance batch: 5: Owner Safe
Pause/unpause modules: 4: Guardian Safe
Tune issuance via Thermostat: 5: Owner Safe
section Evidence
Archive emitted events: 5: Compliance Cell
Update audit logs: 4: Compliance Cell
- Branch names must satisfy
scripts/check-branch-name.mjs;Branch Gatekeeperblocks non-compliant branches before other jobs start. - Pull requests require every mandatory check (compile, tests, security scans, branch guard) before merge. Force pushes and branch deletions on protected branches are disabled.
- Escalations follow the communication playbooks in
docs/operations/operator-runbook.md, with findings logged through GitHub Issues.
The sovereign labor engine contained here is engineered to be deployed immediately by the owner: parameters are owner-writeable, guardianship is subordinate, CI is fully green and enforced, and documentation equips non-technical operators to steer a global labor network with precision.