Skip to content
usekarmaPublic

About

Infrastructure as Consequence

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Karma

An experimental event-driven system for understanding change—and a real workload for proving Adage's infrastructure control model.

Karma explores how events, state, dependencies, and outcomes can make a system's behavior explainable. Its source includes Kafka normalization code, event/action contracts, ClickHouse state and latency analysis, and prototype API handlers. The longer-term goal is to connect observations with reviewable decisions and measured results.

Website · Adage architecture · Implementation and proof status

What Karma is for

Karma asks: what happened, what changed, which entities or dependencies were affected, and what evidence supports the next decision? Event processing and queryable history provide the foundation for observability, analysis, and proposed actions.

Adage supplies the configuration-driven infrastructure model. Karma is the workload and experimental proving ground; Adage defines how infrastructure intent, implementation, runtime discovery, and controlled deployment fit together.

What exists today

Area Source evidence Current scope
Event and action contracts contracts/, action topics JSON schemas and topic conventions; enforcement across every producer/consumer is not established.
CDC normalization Kafka Streams normalizer, Python normalizer Implementation source and mappings exist; deployment and end-to-end behavior need verification.
State and latency analysis ClickHouse sink SQL, analysis SQL Table, materialized-view, and query definitions. Their presence does not prove a live pipeline.
Local services docker-compose.yml Kafka/ZooKeeper and ClickHouse development services; not a complete application deployment.
Graph API prototype query handler, log handler, OpenAPI Query handler returns mock graphs; logging handler prints events and has a graph insertion TODO.
Prediction and deviation jobs predictor, detector Placeholder code and design notes, not working detection services.
Action processing actions/ Contracts and example placeholders; no verified execution engine.

Persistent Neptune graph integration, a complete Karma CLI/service, coordinated changes, and autonomous remediation remain proposals. Source availability is not production readiness. No complete end-to-end verification or live deployment is claimed by this README.

Reference pipeline

The intended streaming flow is raw CDC → normalization → events.normalized → ClickHouse history/state/latency views → analysis → proposed actions. Normalization and SQL source exist; prediction, deviation detection, and action execution are incomplete. Kafka Connect or another source/sink integration must be supplied and validated.

The API prototype uses Lambda handlers and an OpenAPI specification with x-lambda-nickname for discovery. It is not yet a persistent graph API or an automatically connected front end for the streaming pipeline. Shared envelope conventions are an integration goal to verify, not proof that both paths already interoperate.

How Adage supports Karma

Part Responsibility
Adage Infrastructure control model and architectural rationale.
aws-config Desired instances and environment bindings.
aws-iac Reusable Terraform/Terragrunt implementations.
AWS SSM Parameter Store Published configuration and runtime dependency metadata.
Karma Workload, observations, experiments, and evidence about the model's results.
agent-business-solution-template Specification, deterministic verification, security/readiness evidence, and human release decisions.

Adage's architecture predates the current agent use case. Its explicit state, reusable interfaces, and controlled execution make it a useful substrate for agent-assisted engineering. See Adage's full story.

Agent work and human authority

Agents can inspect source/history and AWS read-only, develop components, prepare configuration, run checks, generate plans, investigate cost/drift, and produce evidence and pull requests. Consequential AWS execution—including production apply, destroy, data deletion, sensitive IAM/security changes, and SSM publishing—requires explicit human authorization.

Agent safeguards are implemented in aws-iac PR #1 and aws-config PR #1, currently under review. They are not Karma runtime capabilities and are not yet the infrastructure repositories' default-branch behavior.

Queued strategic work

Faraday-visible queued directions are recorded under docs/queue/. Queue entries are planning signals, not execution authority.

  • KARMA-AWS-ESTATE-001 — AWS estate monitoring: read-only-first reconciliation of desired state, deployed state, operational state, security posture, and cost across authorized AWS accounts and deployments. It is queued, not active, and remains subject to the current STOP_FOR_HUMAN and single-active-task boundaries.

First infrastructure proof

Compare desired state vs. actual AWS state vs. actual cost, explain discrepancies, and prepare safe remediation without destructive changes.

Minimal site steady state Exact expected target
strall.com $0.51/month
usekarma.dev $0.61/month
Combined $1.12/month

These owner-specified targets are awaiting billing proof. They describe the intended minimal state for those two sites, not the full historical Karma stack or the additional Adage documentation site. The proof must establish scope, usage assumptions, shared charges, resource attribution, uncertainty, and data-loss risk. Proof requirements define success.

Explore the source

For local service development, inspect docker-compose.yml, then start the services:

docker compose up -d

This starts supporting services only. Review ClickHouse definitions and the normalizer's build/run instructions before connecting a source and sink. Confirm topics, schemas, listener configuration, and query results rather than assuming the stack is wired end-to-end.

Streaming development requires Docker/Compose, Kafka, and ClickHouse; the Java normalizer documents JDK/Gradle requirements. API/deployment tools require Python, boto3, PyYAML, and properly configured AWS access. Lambda publishing and OpenAPI publishing change AWS and require separate authorization.

There is no root Poetry project or complete application test suite in this checkout. Start with the component-specific instructions and record what was actually verified.

Deeper documentation

Offline personal stewards (review prototype)

coordination/ proposes a strict minimal work-item contract for Prudence #4 and Aegis #5. Only opaque workflow metadata and synthetic check receipts are accepted. Financial/medical records and family identities stay outside Karma. The existing active task and STOP_FOR_HUMAN are preserved; no dispatch, runtime integration or infrastructure is enabled. Run the isolated component quality gates and frozen demonstration before reviewing.

About

Infrastructure as Consequence

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages