# Gravity Keep Documentation

> **Status:** Draft 0.2, 2026-11-23. The index to the documentation: the reading order, how the documents are organized, and the identifier systems.

Gravity Keep is an AWS-native control plane that is configured the way a Junos router is: **edit a candidate, check it, commit it, and the control plane pulls the cloud into line.** It is a proposed alternative to Terraform for AWS estates, built to fit companies that use the [Gravity Standard](https://gravitystandard.com) without depending on it. Website: [gravitykeep.com](https://gravitykeep.com).

The desired configuration is a tree. Namespaces are the branches, resources are the leaves, and settings flow down the branches. A commit changes the tree in one step, with a number and a comment, and it can be rolled back. Reactors compare what AWS actually holds with what the tree says should be true, and act on the difference, continuously, not only when someone runs an apply.

# Reading order

| Document | Answers |
|---|---|
| [vision.md](vision.md) | What is Gravity Keep, why build it, and what is it not? Concepts, glossary, and how it relates to the Gravity Standard. |
| [tree-model.md](tree-model.md) | How is the configuration shaped? Namespaces, placement (organization, account, region, zone), defaults, guardrails, templates, resources, references, and sources (where each branch is written: the control plane or Git). |
| [commit-model.md](commit-model.md) | How does a change happen? Candidate, check, commit, convergence, commit confirmed, rollback, drift, adoption, deletion, and Git-sourced namespaces. |
| [rules.md](rules.md) | What must always be true? The numbered `CTL-nnn` rules, in one place. |
| [command-reference.md](command-reference.md) | What does a person type? Modes, prompts, every command, pipes, and output formats. |
| [architecture.md](architecture.md) | How is it built? Sessions over WebSocket, the desired-state store in Postgres, CloudTrail and EventBridge, reactors, Cloud Control API, and Step Functions. Built as a Gravity Standard application. |
| [comparison.md](comparison.md) | How does it compare with Terraform, CloudFormation, Crossplane, AWS Controllers for Kubernetes, and the scheduled drift checks in HCP Terraform and Pulumi Cloud, honestly, including where they win? |
| [adoption-path.md](adoption-path.md) | How does a company get from Terraform to Gravity Keep without a leap? Observe, own, then replace. |
| [samples/](samples/README.md) | What does it look like in use? Tidewater's configuration tree and a set of worked CLI sessions. |
| [ai-reference.md](ai-reference.md) | The whole method in one file, for an AI assistant to read. |

Start with the vision, then read the tree model and the commit model. The samples make the most sense after those two.

# How these documents are organized

Gravity Keep follows the documentation conventions of the [Gravity Standard README](https://gravitystandard.com/):

- **Every document carries a version and a date** in its status line. Decisions are settled. Anything not settled is a numbered question at the end of the document that raises it.
- **File names are lower-case kebab-case.** `README.md` marks the index of a folder.
- **Rules and questions carry stable IDs.** An ID is never reused or renumbered, and its number carries no meaning.
- Keywords **must**, **should**, and **may** carry their RFC 2119 meaning.

| Prefix | Meaning | Defined in |
|---|---|---|
| `CTL-nnn` | A Gravity Keep rule. The prefix predates the name and stays, because rule IDs are never renumbered | [rules.md](rules.md) |
| `CTLQ-nnn` | An open or resolved Gravity Keep question | the document that raises it |
| `COMMIT-n` | A commit number in a running control plane (not a document ID) | [commit-model.md](commit-model.md) |

**The dependency runs one way.** Gravity Keep builds on the Gravity Standard and refers to it; the Standard never refers to Gravity Keep, and nothing here asks it to change. Where the two differ, a company records a `DESIGN-nnn`, as the Standard provides for any deviation, and the Standard wins if anything here appears to conflict with it. `CTL` and `CTLQ` are Gravity Keep's own prefixes and need no reservation in the Standard, because they never appear in a company's specifications ([CTLQ-001](vision.md#9-questions)).

# What changed in 0.2

Draft 0.2 (2026-11-23) refines the concept after a review of draft 0.1. Every decision is in the document that explains it; this is the map.

| Area | What changed | Where |
|---|---|---|
| Sources | Each namespace has one writer, the control plane or one Git file, declared by its parent; Git loads only move forward; every commit is copied outside the control plane | [tree-model 11](tree-model.md#11-sources), [commit-model 12](commit-model.md#12-git-sourced-namespaces), CTL-050 to CTL-057 |
| Confirm or revert | Session commits and commit requests get `commit confirmed`, automatically when policy lists a type; Git loads never do, and are undone by `request revert` | [commit-model 5](commit-model.md#5-commit-confirmed), CTL-027, CTL-058 |
| State | Commits are asynchronous; resources are `stable`, `converging`, `drifted`, `failed`, or `unknown`, rolled up the tree; `wait` and `commit and-wait`; `enforce` is now `remediate` | [commit-model 4](commit-model.md#4-commit-and-convergence), CTL-059 to CTL-062 |
| Type table | Runner, converging limit, early attributes, list keys, comparison normalisers, destroy values, identity | [tree-model 4](tree-model.md#4-resources-and-types), CTL-063, CTL-064, CTL-067 |
| Templates | Terraform's version constraint syntax, resolved only at commit, with digests recorded | [tree-model 6.1](tree-model.md#61-version-constraints), CTL-065 |
| Lifecycle | `create { }`, maintained statements, and `destroy { }`; inherited create-only values never replace | [tree-model 4.1](tree-model.md#41-lifecycle-phases), CTL-066, CTL-070, CTL-071 |
| Drift accuracy | Nested properties nobody stated are unmanaged; normalisers before comparing; secrets only by reference; write-only properties compared with what was last sent | [tree-model 4.2, 4.3](tree-model.md#42-comparing-values), CTL-067 to CTL-069 |
| Promotion | Audit guardrails, `promote`, and review that follows a commit's reach | [tree-model 5](tree-model.md#5-defaults-and-guardrails), CTL-072, CTL-073 |
| Deletion | Identity-bearing types are destructive like stateful ones; hosted zones and Elastic IPs are retained by default | [commit-model 9](commit-model.md#9-deletion-and-replacement), CTL-074 |
| Permits | Gravity Keep no longer checks development permits; pipelines check their own | CTL-037 (retired) |
| Holds | Warnings before expiry, extensions within a total, capture into a commit, and holds that end themselves | [commit-model 6.1](commit-model.md#61-holds), CTL-033, CTL-075 |
| Supervision | An inventory source (Resource Explorer by default), `explore`, `ownership learning` (replacing `drift adopt`), and `evict` | [commit-model 8](commit-model.md#8-supervision-bringing-resources-in-and-letting-them-go), CTL-076 to CTL-079 |
| Standard | The dependency runs one way: the Standard never refers to Gravity Keep; a company uses it under a `DESIGN-nnn` | [vision 7](vision.md#7-how-it-relates-to-the-gravity-standard), CTLQ-001, CTLQ-002 |
| Comparison | Crossplane, AWS Controllers for Kubernetes, and the scheduled drift checks of HCP Terraform and Pulumi Cloud | [comparison](comparison.md) |
| Samples | Sessions 9 (guardrail rollout) and 10 (explore, learn, evict); sessions 1, 3, 5, 6, and 8 revised | [samples](samples/README.md) |
