Skip to content

Build Event Tracking

Build events are the primary mechanism by which the GOVERN civilization learns about itself. Every commit, deploy, deliberation, and error generates a build event. These events drive archetype skill evolution, convergence scoring, and the operational record of what was built.

What is a Build Event?

A build event is a structured record of a significant action taken by the civilization:

interface BuildEvent {
id: string; // UUID
type: 'commit' | 'deploy' | 'error' | 'deliberation' | 'test' | 'qa';
archetypeIds: ArchetypeId[]; // Which archetypes were involved
skillsExercised: string[]; // Which skills were used
description: string; // Human-readable summary
quality?: number; // 0.0–1.0 quality score (optional)
metadata?: Record<string, unknown>;
userId: string;
createdAt: string;
}

Event Types

TypeWhen emittedWho emits
commitAfter a git commitEngineer or autonomy kernel
deployAfter a successful deployCI/CD or manual deploy
errorWhen a build failsAutonomy kernel
deliberationBefore significant work beginsEngineer (pre-work prime)
testWhen a test suite runsTest runner
qaWhen a QA check completesQA pipeline

Emitting Build Events

Manual emission (Engineer pre-work)

Before starting significant work, emit a deliberation event to prime the skill evolution engine:

expressiveCode.terminalWindowFallbackTitle
curl -s -X POST "$JARVIS_API_URL/api/build-events" \
-H "Authorization: Bearer $AUTH_SECRET" \
-H "Content-Type: application/json" \
-d '{
"type": "deliberation",
"archetypeIds": ["jarvis", "meridian"],
"skillsExercised": ["system-integration", "deployment-orchestration"],
"description": "Pre-work prime: building monitoring rollup pipeline",
"metadata": { "phase": "pre-work-prime", "surface": "govern-surface-02" }
}'

Post-work emission (after commit or deploy)

expressiveCode.terminalWindowFallbackTitle
curl -s -X POST "$JARVIS_API_URL/api/build-events" \
-H "Authorization: Bearer $AUTH_SECRET" \
-H "Content-Type: application/json" \
-d '{
"type": "commit",
"archetypeIds": ["jarvis"],
"skillsExercised": ["system-integration", "diagnostic-reasoning"],
"description": "Implemented monitoring accumulator with 60s window batching",
"quality": 0.92,
"metadata": {
"commitHash": "a23b91a5",
"filesChanged": 3,
"linesAdded": 248,
"typecheckPassed": true,
"testsPassed": true
}
}'

Autonomous emission (Autonomy Kernel)

The Autonomy Kernel emits build events automatically based on its 60-second cognitive heartbeat:

// In packages/api-gateway/src/autonomy/autonomy-kernel.ts
await emitBuildEvent(env, {
type: 'deliberation',
archetypeIds: activeArchetypes,
skillsExercised: currentSkills,
description: `Autonomy heartbeat: ${heartbeatSummary}`,
metadata: { source: 'autonomy-kernel', heartbeatId: id }
});

Reading the Build Event Stream

API query

expressiveCode.terminalWindowFallbackTitle
# Last 20 build events
curl "$JARVIS_API_URL/api/build-events?limit=20" \
-H "Authorization: Bearer $AUTH_SECRET" | jq .
# Filter by type
curl "$JARVIS_API_URL/api/build-events?type=deploy&limit=10" \
-H "Authorization: Bearer $AUTH_SECRET"
# Filter by archetype
curl "$JARVIS_API_URL/api/build-events?archetypeId=jarvis&limit=20" \
-H "Authorization: Bearer $AUTH_SECRET"

Build event stream in the Internal Dashboard

The Build Activity panel shows:

  • Live stream — build events as they arrive, newest first
  • Archetype activity heat — which archetypes are most active (bubble chart)
  • Skill activation frequency — which skills are being exercised most
  • Quality trend — rolling average quality score across commit events
  • Event velocity — events per hour over the last 24 hours

Build Event → Skill Evolution

Every build event with skillsExercised triggers the skill evolution engine. The engine:

  1. Looks up the current skill level for each (archetype, skill) pair
  2. Applies the event’s quality score (if present) as a weight
  3. Updates the experience counter for the skill
  4. If the experience counter crosses a threshold, increases the skill level
Skill Level 1 → 2: 10 exercises
Skill Level 2 → 3: 50 exercises
Skill Level 3 → 4: 200 exercises
Skill Level 4 → 5: 1000 exercises

Quality-weighted exercises count more:

  • Quality 1.0 = 1.5x exercise weight
  • Quality 0.5–1.0 = 1.0x weight
  • Quality < 0.5 = 0.5x weight (poor quality builds slow skill growth)

Build Event → Convergence Score

commit and deploy events update the convergence score for the session:

convergenceContribution = quality × 0.3 +
(typecheckPassed ? 0.2 : 0) +
(testsPassed ? 0.3 : 0) +
archetypeAlignment × 0.2

Where archetypeAlignment measures whether the archetypeIds listed match the skills exercised (e.g., JARVIS listed for system-integration is high alignment; JARVIS listed for emotional-sensing is low alignment).

Build Event Database

-- build_events table
CREATE TABLE build_events (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
user_id UUID NOT NULL REFERENCES profiles(id),
type TEXT NOT NULL CHECK (type IN ('commit','deploy','error','deliberation','test','qa')),
archetype_ids TEXT[] NOT NULL DEFAULT '{}',
skills_exercised TEXT[] NOT NULL DEFAULT '{}',
description TEXT NOT NULL,
quality NUMERIC(4,3),
metadata JSONB DEFAULT '{}',
created_at TIMESTAMPTZ DEFAULT now()
);
-- Indexes for common queries
CREATE INDEX idx_build_events_user ON build_events(user_id, created_at DESC);
CREATE INDEX idx_build_events_type ON build_events(type, created_at DESC);
CREATE INDEX idx_build_events_archetype ON build_events USING GIN(archetype_ids);
CREATE INDEX idx_build_events_skills ON build_events USING GIN(skills_exercised);

Common Queries

-- Most active archetypes in the last 30 days
SELECT
UNNEST(archetype_ids) AS archetype,
COUNT(*) AS event_count,
AVG(quality) AS avg_quality
FROM build_events
WHERE created_at > NOW() - INTERVAL '30 days'
GROUP BY archetype
ORDER BY event_count DESC;
-- Quality trend over last 14 days
SELECT
DATE_TRUNC('day', created_at) AS day,
AVG(quality) AS avg_quality,
COUNT(*) AS event_count
FROM build_events
WHERE type = 'commit'
AND created_at > NOW() - INTERVAL '14 days'
GROUP BY day
ORDER BY day;
-- Most exercised skills
SELECT
UNNEST(skills_exercised) AS skill,
COUNT(*) AS exercises
FROM build_events
WHERE created_at > NOW() - INTERVAL '7 days'
GROUP BY skill
ORDER BY exercises DESC
LIMIT 20;