Skip to content
Projects

About

Make Gemini code like Claude Models. Forces it to inspect files before editing, plan changes, test its work, and back up every “done” with actual evidence.

Other Projects

How these counts are measured

Measured star growth

in 24h
+20
in 7 days
+548
in 15 days
+613
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

GRAVITAS

Make AI coding agents more reliable.

GRAVITAS is an open-source, model-agnostic reliability runtime for coding agents. It gives a task an explicit scope and acceptance criteria, checks tool actions against policy, records validator runs, and requires fresh evidence before verified completion.

GRAVITAS changes the engineering process, not model weights.

CI skills.sh License: MIT Status: research preview

Star History

Open the full Star History chart.

Research preview: comparative performance is not yet measured.

The problem

Coding agents can edit files they have not inspected, make changes outside a task's intended scope, retry failed actions without changing their approach, or report completion using checks that ran before the last edit. GRAVITAS puts task requirements, policy decisions, executed checks, and their evidence in one workflow so the result can be inspected after the session.

What GRAVITAS does

A task contract names the objective, allowed write scope, acceptance criteria, and required validators. The policy engine checks actions before they run. Validators execute their declared commands, and the runtime records hash-linked evidence. The completion gate checks that required results are present, current, and tied to the task.

The six invariants

# Invariant Runtime consequence
1 Ground before editing Existing files must be read before they are changed.
2 Keep changes in scope Writes outside the contract's declared scope are denied where the host exposes the action.
3 Verify the task Each acceptance criterion needs a fresh PASS from its assigned validator.
4 Learn from failures An identical failed action is blocked until its diagnosis, context, or strategy changes.
5 Satisfy the contract Acceptance criteria and required validators gate completion.
6 Mark uncertainty Missing or unverifiable evidence cannot be reported as a verified pass.

Planning scales with task risk. gravitas decide --signals '{...}' emits a machine-readable decision with reason codes. It can choose direct execution, compact or deep planning, or a replan after new evidence.

Installation and first use

GRAVITAS began with Gemini in Antigravity. The same task contract and policy model now support more than one host; each setup exposes a different level of mechanical enforcement.

Core skill for Antigravity

The Core skill is the lightest setup. It supplies portable workflow guidance; it does not add host-level enforcement.

npx skills add udaysharmadev/Gravitas --skill gravitas --agent antigravity --yes
python3 .agents/skills/gravitas/scripts/doctor.py

Antigravity Native hooks

Native adds hooks for action checks, evidence recording, and the completion gate.

git clone --depth 1 https://github.com/udaysharmadev/Gravitas.git
cd Gravitas
bash scripts/build-native-bundle.sh
agy plugin install "$PWD/dist/gravitas-antigravity"
agy plugin validate "$PWD/dist/gravitas-antigravity"

OpenCode

OpenCode adds a pre-action guard and permission profile. It does not have an automatic Stop completion gate.

cd your-project
gravitas init --host opencode --profile balanced
gravitas doctor
gravitas validators --root . --depth targeted

Installation, first-run setup, updates, and removal are documented in the installation guide, quickstart, and host capability reference.

How a task is checked

flowchart LR
  A[Task contract] --> B[Host tool action]
  B --> C{Policy}
  C -->|deny| D[Explain the boundary]
  C -->|allow| E[Run declared validator]
  E --> F[Append evidence]
  F --> G{Fresh PASS for each criterion?}
  G -->|No| H[Continue or report unverified]
  G -->|Yes| I[Verified completion]

Host support and enforcement

GRAVITAS began with Gemini in Antigravity and now carries its shared task contract and policy model across Antigravity and OpenCode.

Capability Core skill Antigravity Native OpenCode
Task and planning guidance Instructions Instructions and hooks Instructions and policy shim
Write and scope checks Instructions only PreToolUse hook gravitas guard plus host permissions
Evidence ledger Manual workflow Automatic CLI-assisted
Completion gate Skill procedure Automatic Stop hook Manual through CLI
Destructive action Instruction only Host confirmation (force_ask) Denied; no ask channel
Session isolation Host context Per conversation Per-workspace contract

The host integrations have different lifecycle guarantees. Antigravity hooks record tool events and gate stopping when required evidence is missing or stale. The OpenCode shim checks actions before execution and records supported after-event evidence, but it has no automatic Stop completion gate. See the host capability details for the event-specific behavior.

Hooks are workflow controls, not operating-system sandboxes. They cannot contain arbitrary processes or prevent every filesystem side effect. The security policy describes those trust boundaries.

Enforcement depends on the host reaching the hook. OpenCode's guard denies when it is unreachable, times out, returns malformed output, or reports an unknown verdict. Antigravity denies malformed pre-tool events and named-session mutations without a contract, but its host may ignore a nonzero hook exit or terminate a hook before its decision returns. Local fixtures cover these paths; they do not certify every installed host version.

Action policy

GRAVITAS normalizes host tool calls into four capability levels. The shell classifier uses tokenization and an operator scan, examines command segments and recognized wrappers, and treats uncertain or unparseable commands conservatively. Scope checks can reject writes whose paths the runtime can identify.

Level What it means Example
none Read-only query git status, ls
write File change with a named target Edit src/app.py inside the declared scope
mutation Code execution or a command with possible side effects pytest, a script, or a pipeline
destructive Deletion, blind overwrite, infrastructure change, or execution of fetched code rm, git reset --hard, curl … | sh

This classification governs the requested tool action; it does not contain arbitrary subprocesses. The detailed threat model and tested boundaries are in SECURITY.md.

Evidence and verification

Evidence model

A completion-grade validator run is bound to its declared command and acceptance criteria. The runner records its exit status and a repository snapshot; a relevant later change makes an earlier PASS stale. Evidence is hash-linked and checked against a user-local anchor. Self-review, an old green run, and a reproducer alone do not satisfy the completion gate.

The completion gate accepts only a fresh PASS from an owned validator assigned to the criterion. The command must match the contract, and timeout or interruption cannot produce a PASS. Freshness is recomputed from the evidence ledger, so a later relevant write makes earlier evidence pending again. The receipt also records the repository snapshot and the limits of what the host observed.

The anchor makes ledger edits detectable while it remains outside the attacker-controlled write scope. It does not protect against an attacker who can rewrite both the ledger and its anchor. See proof and evidence for the receipt format and its limits.

Verification

The repository's CI and contributor verification use these checks from the repository root:

.venv/bin/python -m unittest discover -s tests
.venv/bin/python benchmarks/runner/audit.py
.venv/bin/python benchmarks/runner/validate.py --episodes benchmarks/results --allow-empty
.venv/bin/python -m py_compile gravitas_cli.py gravitas_init.py plugins/gravitas-antigravity/scripts/*.py
.venv/bin/python .github/scripts/validate_skill.py
.venv/bin/python scripts/check_readme_claims.py
bash scripts/build-native-bundle.sh

GitHub Actions checks Python 3.9, 3.12, and 3.14, plus a Windows portability job. These checks cover the tested workflow; they do not certify every host version or operating system.

Gravitas Proof

gravitas proof exports a receipt for the current task. It can be saved and checked against the session's trusted evidence:

gravitas proof --json --output .gravitas/proof.json
gravitas proof --verify .gravitas/proof.json

The receipt records the contract, repository identity, criteria, validators, freshness, failures, and limitations. VERIFIED requires fresh bound PASS evidence for every required criterion; missing or stale evidence cannot pass. See the receipt format and trust limits.

Research and project results

Research on tool-using agents and repository tasks informs GRAVITAS's design. These findings motivate the workflow; they are not measurements of GRAVITAS:

Research foundations

  • ReAct grounds reasoning in actions and observations, motivating repository inspection and feedback from executed tools.
  • Plan-and-Solve studies explicit task decomposition. Its transfer to coding workflows remains a project hypothesis.
  • Huang et al. evaluate limits of unaided self-correction, motivating external validators over self-review.
  • SWE-bench evaluates repository changes against tests, motivating checks of resulting artifacts rather than final-message claims.

Harness and agent evaluation

  • SWE-agent studies how the agent-computer interface affects repository navigation, code editing, and test execution.
  • Harness-Bench evaluates model-and-harness configurations across tasks and trajectories, including completion, process quality, efficiency, and failure behavior.
  • The Scaffold Effect reports that harness choice can change token cost per solved task even when paired pass-rate differences are small.
  • Agentic Harness Engineering studies an observability-driven harness loop and reports results for its evaluated setup.
  • Harness-IF measures instruction following across coding-agent instruction surfaces using execution evidence. It is a preprint, not evidence about GRAVITAS.

The research foundations map these sources to design choices and separate published results from GRAVITAS hypotheses. The central open question remains whether the GRAVITAS workflow improves reliability in a paired, release-grade study.

Project findings

The 2026 project review records reproduced integrity problems and their regression coverage, including stale validator results masking newer failures and invalid benchmark records being counted as successes. Later evaluator changes reject incomplete, duplicate, or incorrectly typed checkpoint inputs and keep the legacy trace scorer outside release scoring. Those checks improve result integrity; they are not evidence that GRAVITAS improves a model's task success rate. The boundaries are documented in the benchmark methodology.

The separate offline repository fixture reproduces one historical GRAVITAS bug without a model call. Its baseline fails evaluator-side acceptance, while two distinct fixes pass; the public validator makes it a development fixture, not a secret holdout or model comparison.

Benchmark status

The registry contains 48 registered task specifications across 10 planned lanes. The model runner currently exercises five synthetic fixtures; harvested task descriptions do not yet make it execute their pinned repositories. The publication gate requires repository evidence, consistent paired inputs, at least 30 distinct tasks, and at least five valid paired runs per task. No eligible comparative model results have been collected.

The offline repository fixture uses a pinned MIT-licensed GRAVITAS revision and runs evaluator-side acceptance and regression checks. Its validator is public, so it is not a secret holdout or a model-comparison result. Read the benchmark methodology and production-readiness board before interpreting any benchmark artifact.

Current limitations

  • Host hooks do not provide operating-system containment.
  • Antigravity's live hook lifecycle and OpenCode's read-success behavior still have host-version boundaries; local fixtures do not certify every live host version. See host support and the readiness board.
  • The benchmark corpus and runner are not yet eligible for comparative performance claims.
  • No model gains, cost reductions, or competitor superiority have been measured for GRAVITAS.

Community

GRAVITAS began as an open-source effort in India. The community page preserves the 19 original Instagram reel links shared with this project. Creator details are included only where they have been publicly verified.

Contributors

Uday Sharma Devansh Singh Manan Bharti Rudra Makwana Neel Dharmendra Ankit Tiwari Pasit Nusso
Uday Sharma Devansh Singh Manan Bharti Rudra Makwana Neel Dharmendra Ankit Tiwari Pasit Nusso
maintainer shell-injection hardening (#1) init safety, classifier and policy/gate hardening evidence freshness and shell hardening shell classifier fixes (#34–#36) gate/contract hardening and Windows portability PR #82

Documentation

Quickstart · Concepts · Hosts · Configuration · Benchmark methodology · Production readiness · Proof · Install and troubleshooting · Contributing · Research foundations · Architecture decisions · Security policy

Contributing

Code, documentation, host compatibility checks, and licensed benchmark tasks are welcome. Read CONTRIBUTING.md before opening a change; include a regression test for confirmed bugs and report the checks that ran. The full contributor record is maintained in CONTRIBUTORS.md.

Citation

Use CITATION.cff and pin a commit until a versioned release and archived benchmark dataset exist.

License

MIT © Uday Sharma.

Explore related projects

Loading…