Skip to main content
Selected workConcurrency / AI Engineering Reliability

openspec-team

Two agents. One specification. No silent overwrites.

A single-binary Go implementation of OpenSpec with Claude Code integration that fingerprints every requirement a change touches and blocks archiving if another change modified that requirement first.

StackGo / Claude Code
FocusOptimistic concurrency control, Requirement fingerprinting, Conflict detection, Specification integrity
Author-provided description

The problem

Multiple AI coding agents working in parallel can read the same specification, prepare independent changes, and silently overwrite each other when archiving stale proposals.

Approach

openspec-team computes requirement-level fingerprints when a change is prepared and checks them before archiving. If the current specification fingerprint has diverged, archiving is blocked so the conflict is reconciled explicitly.

Engineering teams coordinating concurrent human and AI agent workflows against shared specifications.

Specification Conflict Lab

When two agents prepare changes against the same requirement version, what happens when the second agent tries to archive?

Simplified simulation
Deterministic state machine using an educational FNV-1a requirement fingerprint. Prevents stale-baseline overwrites; does not claim to solve all concurrency classes.
LIVE SPECIFICATION · REQ-AUTH-04 · v1Fingerprint: fp_5d3f2a60

REQ-AUTH-04: Session tokens MUST expire after 30 minutes of inactivity and require re-authentication.

Last updated by: Baseline specification

Agent A (Security hardening)

idle

Tightens timeout to 15 minutes and adds refresh-token rotation.

REQ-AUTH-04: Session tokens MUST expire after 15 minutes of inactivity and rotate refresh tokens on each renewal.

Agent B (Audit logging)

idle

Adds expiration audit logging while keeping the 30-minute text it read.

REQ-AUTH-04: Session tokens MUST expire after 30 minutes of inactivity and emit an audit log entry upon expiration.
State Transition Log
  1. 01 [Baseline loaded] REQ-AUTH-04 v1 active (fp_5d3f2a60).

Architecture & notes

Claims are labeled by evidence type. Details requiring direct source inspection are kept explicit.

Capabilities3
  • — Single-binary Go implementation of OpenSpec integrated with Claude Code.
  • — Fingerprints every requirement touched by a change.
  • — Blocks archiving if another change modified the same requirement first, preventing silent overwrites from stale requirements.
Design & implementation evidence4
Optimistic requirement fingerprinting
Author-provided description

Each proposed change records the fingerprint of the requirement version it was derived from; archive time compares that stored fingerprint against the live specification.

Explicit reconciliation boundary
Conceptual illustration

Blocking an archive forces the stale change to re-read the updated requirement rather than silently clobbering prior work.

Single-binary distribution
Author-provided description

Written in Go for zero-runtime-dependency execution alongside Claude Code.

Hash algorithm details
Simplified simulation

The Specification Conflict Lab uses a deterministic educational fingerprint function rather than claiming to mirror the exact internal digest format.

Scope & limitations2
  • — Prevents silent overwrites from stale requirement baselines; it does not eliminate semantic conflicts across unrelated requirements.
  • — Conflict resolution remains an explicit human or agent reconciliation step.

Shared concerns: making ai agents reliable