The Intent-First Workflow

Code is the output.
Intent is the artifact.

AI writes code faster than you can review it. Stop reverse-engineering massive diffs. Sophia forces your agent to declare its intent and boundaries before it touches a single file.

curl -fsSL https://sophiahq.com/install.sh | bash
Operational Environments
Local CLI

Full control for power users. Initialize repos, manage stacked CRs, and repair metadata directly from your local terminal.

Agent Skill

Natively compatible with Claude Code, Cursor, and OpenClaw. Sophia acts as the intent-first abstraction over Git for your AI.

CI Merge Gate

Deterministic validation in the pipeline. Block merges that exhibit scope drift or violate repo-level policy defined in SOPHIA.yaml.

The Manifesto

You are credential
laundering.

An agent drops 600 lines across 40 files in 3 hours. You spend 45 minutes skimming it, leave a nitpick about variable naming, and hit merge.

Everyone involved knows this is theater.

Converting "an AI did this" into "a human approved this" without actually understanding context isn't a code review. The author is a context window that no longer exists.

PR #402: Agent Refactor
+612 LOC
112 - const token = verify(req.headers);
113 + const token = await secureVerify(req.headers, {
114 + bypassCache: true,
115 + allowLegacy: true // Hallucinated logic
116 + });
... 38 files changed unpredictably ...
245 - redis.flush();
246 + await sessionManager.purgeAll(); // Silent drift
Unverifiable Drift

You don't learn the CLI. Your agent does.

Plan the feature in natural language. Your AI surfaces the plan and uses Sophia to lock in the constraints. You review the contract. It builds the code.

The Conversation Human + Agent
Add dark mode to settings. Only touch the frontend styles. Don't break light theme. Surface the plan.

I'll implement the toggle. I'm using sophia to lock in constraints.

> Tool call: sophia cr add "Dark Mode Settings"
> Tool call: sophia cr contract set --scope "frontend/styles/*"
Plan Locked in CR-105.
Change Request Artifact Deterministic Contract Active

CR-105: Dark Mode Settings

Risk: Low · Validation: Pending
Intent

Implement dark mode toggle in the Settings panel. Core outcome is to support system-level theme detection without breaking existing light theme variable mappings.

Enforced Scope
frontend/components/Settings.tsx
frontend/styles/themes.css
Drift Firewall: AI restricted to styles.
Invariants
  • 01. Light theme HEX codes remain constant with `main`.
  • 02. No mutations to `user_prefs` Postgres schema.
Verification Plane

The Deterministic Firewall

Sophia validates every agent action against the approved intent, blocking drift before it hits your history.

Agent Action

Modifies CSS in
themes.css

ALLOWED
Validation

Matching diffstat against approved contract...

Blocked

Agent attempts
backend/auth.ts

FATAL: SCOPE DRIFT

History

Clean commit graph.
Intent preserved.

The Audit Trail

Structured metadata, not chat logs.

Sophia persists intent state as deterministic YAML in your repository root, ensuring your audit trail is as portable as your code.

Persistence
YAML Store
Identity
Symbolic Refs
Task Model
DAG Validated
Verification
Commit Footers
Slicing
Patch Manifests
Output
JSON Envelope
HQ Collaboration

Sync Intent.
Discuss Redline.

Sophia HQ is the collaboration plane for agentic teams. Redline contracts, debate invariants, and approve evidence before a single line of code is merged.

Discussion

Contextual threads attached directly to YAML intent fields.

Verification

Centralized evidence ledger. Deterministic drift reports.

ithena-labs / sophia / cr-104
V
A

Contract Artifact

Last updated 2m ago
Intent

Add pre-checkpoint chunk tooling that lets a developer (or automation) inspect and export specific working-tree hunks...

Invariants
Chunk IDs remain derived from content hashing.
Redline Debate
@van (author) Yesterday

Wait, if we use content hashing here, will the chunk IDs remain stable across rebases?