The lifecycle I am experimenting with: issue ingestion by outbound polling, Spec-Driven Development with Spec-Kit, durable Hatchet DAGs in gVisor sandboxes, and generated C4 documentation. It describes the intended design and what I am testing; limitations and failed runs belong in the lab notebook.
Dark Gravity combines specialized agent bounded contexts with strict human oversight. Autonomous agents formulate specs and surgically write code, but a human keeps the final decision over budgets and merges.
Governs the intelligence domain. Queries R2R GraphRAG to synthesize architectural context, executes the 7-step Spec-Kit planning pipeline, formulates atomic tasks with parallel markers, and performs early SAST security reviews.
Governs code implementation inside ephemeral gVisor micro-sandboxes. Applies Tree-sitter AST mutations via native ADK-Rust (avoiding subprocess latency), runs cargo test suites, and enforces forensic memory zeroization.
Governs the Aethelgard auto-remediation loop and production crash triage. Polls Sentry REST APIs every 15 minutes, maps exception stack traces via R2R GraphRAG, and auto-dispatches hotfix DAGs for verified anomalies.
Governs living corporate memory. Following PR merges, triggers deepwiki-rs Tree-sitter AST delta indexing, syncs dependency graphs to pgvector, auto-renders C4 Level 1–3 Mermaid diagrams, and validates the < 5% OSR quality gate.
Branch protection and review gates are designed to prevent agents from merging code on their own. The human steers intent and keeps the veto.
Human Product Owner: Authors high-level business Epics or issues in Jira, GitHub, or GitLab, tagged with autonomous-mission. The human defines why and what value is required.
Human Tech Lead: Reviews the generated Spec-Kit artifacts (spec.md, plan.md, tasks.md) and approves the sprint. Prevents runaway token and compute spending.
Human System Architect: Ideally no intervention during active loops. Alerts fire only if Aethelgard hits the 3-retry limit or a spend velocity trip trips to Agent-Stuck. The architect untangles the edge case.
Human Senior Reviewer: Conducts final code review on remote Pull/Merge Requests. Agents are physically forbidden from auto-merging. Human validates architecture and business logic before manual merge.
Trace a feature from initial issue discovery through mathematical specification, durable Hatchet sub-workflows, sandboxed code surgery, and post-merge living knowledge graphs.
Each phase implements hardened security primitives, bounded contexts, and deterministic contracts. Explore the technical mechanics behind each operational stage.
To achieve a zero-trust, air-gapped perimeter, Dark Gravity firmly rejects all open inbound webhooks. Inbound HTTP ports create external attack surfaces and dependency on external proxy tunnels (such as ngrok or Cloudflare Tunnels). Instead, the native Rust GitPlatformPoller daemon (factory-cli poller) queries Jira, GitHub, and GitLab APIs via outbound HTTPS requests every 30 to 60 seconds.
autonomous-mission or dark-gravity label.[RESOURCE_LIMIT: RAM <= 30Mi, CPU <= 250m] directly from issue descriptions.did:factory:dark-gravity-euskadi).MissionInput and publishes to the mission-input topic in Confluent Kafka.
Dark Gravity completely replaces free-form LLM code generation with Spec-Driven Development (SDD). Before a single byte of code is written in a sandbox, the Product Owner Agent (Rustant) queries R2R GraphRAG for architectural context and runs a deterministic Spec-Kit pipeline through the spec_kit_tool MCP endpoint.
Enforces sovereign principles: Zero Trust, mTLS 1.3, gVisor resource caps, and anti-loop safeguards.
Combines R2R context with issue intent to create spec.md: defining what and why without stack pollution.
Runs up to 5 automated Q&A cycles against edge cases before architecture begins, eliminating requirements ambiguity.
Outputs technical blueprints (plan.md, research.md, contracts/), pinning crates and interfaces.
Decomposes plan into atomic, dependency-ordered tasks (tasks.md) with [P] parallel flags.
Converts tasks into tracked backlog sub-issues with injected hardware clamping markers.
Validates generated plan against organizational ontology to catch architectural contradictions before sandbox ignition.
The speckit-superpowers-bridge (Superspec) parses Spec-Kit tasks.md into structured domain entities and maps them into Hatchet's durable develop-task sub-workflows. Hatchet provides at-least-once, durable execution semantics; how well this holds up in the lab is one of the things being tested.
As the Developer Agent completes each atomic task (e.g. T001, T002), execution snapshots (BridgeState) are flushed to MinIO S3 in the dg-factory-checkpoints bucket and CloudNativePG PostgreSQL. If a worker pod crashes or is terminated due to memory bounds, Hatchet restarts execution exactly at the first pending task without repeating completed AST code surgery or wasting LLM tokens.
Execution occurs exclusively in ephemeral gVisor (runsc) user-space sandboxes configured with target limits of RAM ≤ 30 MiB and CPU ≤ 250m. AST code mutations are executed via native ADK-Rust, followed by test and security gates.
Tree-sitter AST search-and-replace algorithm applies localized mutations directly to Rust files without external subprocess overhead or regex hallucinations.
All JIT tokens and credentials derive #[derive(Zeroize, ZeroizeOnDrop)], so they are overwritten in memory when dropped. Timing figures from micro-benchmarks are not treated as production guarantees.
Heterogeneous frontier models score patches. Scores < 8.0/10 or detected vulnerabilities trigger the Aethelgard loop (max 3 retries) or freeze to Agent-Stuck.
Approved patches are committed atomically via REST APIs directly to feature branches (specs/NNN-<feature>) and open Pull/Merge Requests targeting main. Human developers interactively steer the bot on PR threads via command directives.
@darkgravity)@darkgravity /status — Queries factory health, DAG step, and token spend.@darkgravity /refine <prompt> — Triggers ZeroClaw to apply localized AST edits.@darkgravity /spec <prompt> — Instructs Rustant to re-evaluate Spec-Kit spec.md.@darkgravity /validate — Reruns cargo test suite and SAST security check.@darkgravity /retry — Restarts the Aethelgard remediation loop.The poller places an immediate "eyes" (👀) reaction upon comment detection to acknowledge receipt without posting spam comments. It strictly ignores self-authored bot accounts to prevent infinite loops, and posts a single comprehensive summary when the directive finishes.
main. Merge authority rests solely with the human Senior Reviewer (HITL Vertex 4).
When a PR is merged into main, the autonomous lifecycle doesn't end: it automatically updates living corporate memory. The deepwiki-rs daemon parses AST diffs, updates R2R GraphRAG in pgvector, and dispatches the Documentation Agent (DocAgent) using the Superpowers framework to regenerate C4 architecture diagrams and OpenWiki documentation.
writing-plans: Decomposes wiki updates into 2–5 min atomic tasks.dispatching-parallel-agents: Spawns isolated subagents per wiki page.subagent-driven-development: Loads only targeted R2R sub-graphs.verification-before-completion: Enforces OSR < 5% gate.requesting-code-review: Validates C4 Mermaid syntax and Markdown.finishing-a-development-branch: Commits pages and packages EU R&D grants.
The C4 model (Context, Container, Component, Code) provides four progressive levels of architectural abstraction. Dark Gravity's DocAgent queries depends_on edges in R2R GraphRAG to generate and maintain these diagrams automatically in Mermaid syntax.
Shows the Dark Gravity software factory as a black-box system, surrounded by human users, external source control systems, identity providers, and telemetry sinks.
Expands the factory into its high-level runtime containers: the 5-crate Rust workspace, Hatchet DAG engine, Kafka event mesh, pgvector R2R memory, MinIO storage, and gVisor sandboxes.
Zooms into the internal components of factory-application, factory-infrastructure, and deepwiki-rs.
A side-by-side comparative summary of each lifecycle phase, its core technology stack, isolation boundary, and gating success criteria.