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
| Type | When emitted | Who emits |
|---|---|---|
commit | After a git commit | Engineer or autonomy kernel |
deploy | After a successful deploy | CI/CD or manual deploy |
error | When a build fails | Autonomy kernel |
deliberation | Before significant work begins | Engineer (pre-work prime) |
test | When a test suite runs | Test runner |
qa | When a QA check completes | QA pipeline |
Emitting Build Events
Manual emission (Engineer pre-work)
Before starting significant work, emit a deliberation event to prime the skill evolution engine:
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)
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.tsawait 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
# Last 20 build eventscurl "$JARVIS_API_URL/api/build-events?limit=20" \ -H "Authorization: Bearer $AUTH_SECRET" | jq .
# Filter by typecurl "$JARVIS_API_URL/api/build-events?type=deploy&limit=10" \ -H "Authorization: Bearer $AUTH_SECRET"
# Filter by archetypecurl "$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
commitevents - 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:
- Looks up the current skill level for each (archetype, skill) pair
- Applies the event’s quality score (if present) as a weight
- Updates the experience counter for the skill
- If the experience counter crosses a threshold, increases the skill level
Skill Level 1 → 2: 10 exercisesSkill Level 2 → 3: 50 exercisesSkill Level 3 → 4: 200 exercisesSkill Level 4 → 5: 1000 exercisesQuality-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.2Where 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 tableCREATE 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 queriesCREATE 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 daysSELECT UNNEST(archetype_ids) AS archetype, COUNT(*) AS event_count, AVG(quality) AS avg_qualityFROM build_eventsWHERE created_at > NOW() - INTERVAL '30 days'GROUP BY archetypeORDER BY event_count DESC;
-- Quality trend over last 14 daysSELECT DATE_TRUNC('day', created_at) AS day, AVG(quality) AS avg_quality, COUNT(*) AS event_countFROM build_eventsWHERE type = 'commit' AND created_at > NOW() - INTERVAL '14 days'GROUP BY dayORDER BY day;
-- Most exercised skillsSELECT UNNEST(skills_exercised) AS skill, COUNT(*) AS exercisesFROM build_eventsWHERE created_at > NOW() - INTERVAL '7 days'GROUP BY skillORDER BY exercises DESCLIMIT 20;