@neuroverseos/governance 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1168,6 +1168,137 @@ declare function fetchNotionActivity(token: string, options?: NotionFetchOptions
1168
1168
  */
1169
1169
  declare function formatNotionSignalsForPrompt(signals: NotionSignals): string;
1170
1170
 
1171
+ /**
1172
+ * @neuroverseos/governance/radiant — Linear adapter
1173
+ *
1174
+ * Reads planned work from Linear and surfaces the gap between what the team
1175
+ * said it would ship (issues, cycles, projects) and what actually got built
1176
+ * (signals from the GitHub adapter).
1177
+ *
1178
+ * The behavioral signal Linear uniquely provides:
1179
+ * stated intent (issues planned, cycle committed) vs.
1180
+ * shipped outcome (PRs merged, features delivered)
1181
+ *
1182
+ * That gap is the clearest "agency drift" signal a team can produce — and
1183
+ * none of the dev-productivity tools (LinearB, Swarmia, Jellyfish) read
1184
+ * Linear and GitHub together through a worldmodel lens.
1185
+ *
1186
+ * What it captures:
1187
+ * - Issues created (planning velocity)
1188
+ * - Issues completed (shipping velocity)
1189
+ * - Issues stalled (in-progress > N days without movement)
1190
+ * - Cycle commitment vs. completion (did we finish what we committed to?)
1191
+ * - Comments (how much the team debates vs. ships)
1192
+ * - Project-level updates (direction signals above the issue layer)
1193
+ *
1194
+ * Uses Linear GraphQL v1 via raw fetch (no @linear/sdk dependency,
1195
+ * matching the shape of notion.ts / slack.ts / discord.ts).
1196
+ * Requires a Linear personal API key with read access.
1197
+ */
1198
+
1199
+ interface LinearFetchOptions {
1200
+ /** Restrict to specific team IDs. If empty, reads all accessible teams. */
1201
+ teamIds?: string[];
1202
+ /** How many days of history to fetch. Default: 14. */
1203
+ windowDays?: number;
1204
+ /** Max issues to fetch. Default: 200. */
1205
+ maxIssues?: number;
1206
+ }
1207
+ interface LinearSignals {
1208
+ /** Issues created in window. */
1209
+ issuesCreated: number;
1210
+ /** Issues completed (moved to a "completed" state) in window. */
1211
+ issuesCompleted: number;
1212
+ /** Issues still open at window end. */
1213
+ issuesOpen: number;
1214
+ /** Issues in an in-progress state for > 14 days with no update. */
1215
+ issuesStalled: number;
1216
+ /** Ratio of completed / committed for cycles that ended in window. */
1217
+ cycleCompletionRate: number | null;
1218
+ /** Unique assignees active in window. */
1219
+ uniqueAssignees: number;
1220
+ /** Total comments across issues in window. */
1221
+ commentsTotal: number;
1222
+ /** Top project titles active in window. */
1223
+ topProjects: string[];
1224
+ }
1225
+ /**
1226
+ * Fetch Linear activity and return Radiant Events + compressed signals.
1227
+ *
1228
+ * Shape mirrors fetchNotionActivity / fetchSlackActivity so the radiant
1229
+ * pipeline composes uniformly. Call from commands/emergent.ts the same way
1230
+ * as the other adapters.
1231
+ */
1232
+ declare function fetchLinearActivity(apiKey: string, options?: LinearFetchOptions): Promise<{
1233
+ events: Event[];
1234
+ signals: LinearSignals;
1235
+ }>;
1236
+ /**
1237
+ * Format Linear signals for the AI interpretation prompt.
1238
+ * Emphasizes the stated-intent-vs-shipped-outcome framing so the lens
1239
+ * can pick up agency drift without the adapter naming it directly.
1240
+ */
1241
+ declare function formatLinearSignalsForPrompt(signals: LinearSignals): string;
1242
+
1243
+ /**
1244
+ * @neuroverseos/governance/radiant — declared vocabulary extraction
1245
+ *
1246
+ * Pulls Aligned Behaviors and Drift Behaviors from a worldmodel markdown
1247
+ * file and turns them into canonical snake_case pattern names that the AI
1248
+ * must use when it sees matching evidence.
1249
+ *
1250
+ * Why this exists: Radiant's AI was inventing names like
1251
+ * `velocity_without_declared_target` when the worldmodel already declared
1252
+ * `dependency_on_ai_presenting_as_integration` for the same observation.
1253
+ * The prompt told the AI to "use canonical names if you see them" — but
1254
+ * no one was extracting canonical names from the worldmodel. This module
1255
+ * closes that loop: Radiant now governs its own output against the
1256
+ * vocabulary it claims to read.
1257
+ *
1258
+ * Supported bullet formats (under `## Aligned Behaviors` / `## Drift Behaviors`):
1259
+ * - `` `canonical_name` — prose description `` (explicit, preferred)
1260
+ * - `canonical_name — prose description` (explicit, no backticks)
1261
+ * - `prose description only` (auto-snake-cased)
1262
+ *
1263
+ * Empty sections, missing sections, and HTML comments are silently ignored
1264
+ * — partial vocabulary is better than no vocabulary, and falling back to
1265
+ * candidate-only behavior is the correct failure mode.
1266
+ */
1267
+ interface DeclaredPattern {
1268
+ /** snake_case canonical identifier (stable across reads). */
1269
+ name: string;
1270
+ /** Human-readable prose for keyword matching against AI output. */
1271
+ prose: string;
1272
+ /** Which section this came from. */
1273
+ kind: 'aligned' | 'drift';
1274
+ }
1275
+ interface DeclaredVocabulary {
1276
+ aligned: DeclaredPattern[];
1277
+ drift: DeclaredPattern[];
1278
+ /** All canonical names (aligned + drift) for quick membership checks. */
1279
+ allNames: string[];
1280
+ }
1281
+ declare function extractDeclaredVocabulary(worldmodelContent: string): DeclaredVocabulary;
1282
+ /**
1283
+ * Given a pattern description + name the AI emitted, find a declared
1284
+ * pattern whose prose has enough keyword overlap to be "the same thing."
1285
+ *
1286
+ * Matching is deterministic keyword overlap over content words (lowercased,
1287
+ * >3 chars, punctuation stripped, common stopwords removed). A match
1288
+ * requires at least 2 shared words AND at least 30% coverage of the
1289
+ * declared prose's content words. When multiple declared patterns match,
1290
+ * the one with highest coverage wins.
1291
+ *
1292
+ * This is intentionally a simple deterministic pass, not an LLM call:
1293
+ * - no extra token cost
1294
+ * - testable and reproducible
1295
+ * - easy to tune thresholds without retraining
1296
+ *
1297
+ * Returns null when nothing matches well enough. The pattern stays a
1298
+ * candidate.
1299
+ */
1300
+ declare function matchDeclaredPattern(candidateName: string, candidateDescription: string, vocabulary: DeclaredVocabulary): DeclaredPattern | null;
1301
+
1171
1302
  /**
1172
1303
  * @neuroverseos/governance/radiant — AI pattern interpretation
1173
1304
  *
@@ -1201,8 +1332,15 @@ interface InterpretInput {
1201
1332
  lens: RenderingLens;
1202
1333
  /** AI adapter to call for interpretation. */
1203
1334
  ai: RadiantAI;
1204
- /** Known canonical pattern names from the worldmodel (optional). */
1335
+ /** Known canonical pattern names from the worldmodel (optional).
1336
+ * Kept for backward compatibility — new callers should pass
1337
+ * declaredVocabulary instead, which carries both names and prose. */
1205
1338
  canonicalPatterns?: readonly string[];
1339
+ /** Declared vocabulary extracted from the worldmodel's Aligned/Drift
1340
+ * Behaviors. When present, the AI is told the exact canonical names
1341
+ * to use, and any candidate whose description matches declared prose
1342
+ * is reclassified to the declared name. */
1343
+ declaredVocabulary?: DeclaredVocabulary;
1206
1344
  /** Stated intent from the exocortex (optional). When present, the AI
1207
1345
  * compares stated intent against observed behavior and surfaces gaps. */
1208
1346
  statedIntent?: string;
@@ -1291,7 +1429,7 @@ declare function auditGovernance(events: readonly ClassifiedEvent[], worldPath:
1291
1429
  * Takes signals + patterns + scores + lens metadata and produces the
1292
1430
  * structured output Nils reads. Two output modes:
1293
1431
  * - text: the EMERGENT / MEANING / MOVE structure for terminal display
1294
- * - yaml+text: Memory Palace coded read file (YAML frontmatter + prose)
1432
+ * - yaml+text: Mind Palace coded read file (YAML frontmatter + prose)
1295
1433
  *
1296
1434
  * The renderer enforces the lens's voice rules: forbidden phrases are
1297
1435
  * checked, bucket names are never leaked, vocabulary is Auki-native.
@@ -1321,7 +1459,7 @@ interface RenderInput {
1321
1459
  interface RenderOutput {
1322
1460
  /** The human-readable text output for terminal display. */
1323
1461
  text: string;
1324
- /** The Memory Palace coded YAML frontmatter (Tier 2 structured signals). */
1462
+ /** The Mind Palace coded YAML frontmatter (Tier 2 structured signals). */
1325
1463
  frontmatter: string;
1326
1464
  }
1327
1465
  declare function render(input: RenderInput): RenderOutput;
@@ -1514,13 +1652,13 @@ declare function parseRemoteUrl(url: string): ParsedRemote | null;
1514
1652
  declare function getRepoOrigin(repoDir: string): ParsedRemote | null;
1515
1653
 
1516
1654
  /**
1517
- * @neuroverseos/governance/radiant — Memory Palace file operations
1655
+ * @neuroverseos/governance/radiant — Mind Palace file operations
1518
1656
  *
1519
1657
  * Writes Radiant reads to the exocortex as dated markdown files (with
1520
1658
  * YAML frontmatter for structured signal data). Reads prior files to
1521
1659
  * detect pattern persistence across runs.
1522
1660
  *
1523
- * The exocortex directory IS the Memory Palace. Files are the tiers:
1661
+ * The exocortex directory IS the Mind Palace. Files are the tiers:
1524
1662
  * - reads/YYYY-MM-DD.md = Tier 2 (structured signals) + Tier 3 (narrative)
1525
1663
  * - knowledge.md = accumulated pattern facts with persistence counts
1526
1664
  *
@@ -1593,7 +1731,7 @@ declare function computePersistence(priorReads: PriorRead[], currentPatternNames
1593
1731
  declare function formatPriorReadsForPrompt(priorReads: PriorRead[]): string;
1594
1732
 
1595
1733
  /**
1596
- * @neuroverseos/governance/radiant — Memory Palace compression
1734
+ * @neuroverseos/governance/radiant — Mind Palace compression
1597
1735
  *
1598
1736
  * Applies the three-tier principle to everything that enters the AI
1599
1737
  * prompt: raw data is not the memory; structured signals are.
@@ -1729,11 +1867,16 @@ interface EmergentInput {
1729
1867
  * When present, each event is evaluated through evaluateGuard
1730
1868
  * and the GOVERNANCE section appears in the output. */
1731
1869
  worldPath?: string;
1870
+ /** When set, filter events to only this GitHub login's activity.
1871
+ * Turns Radiant into a local, personal facilitator — reads your
1872
+ * own drift, not the team's. No one else is observed. Leave
1873
+ * undefined for the default team-wide read. */
1874
+ personalUser?: string;
1732
1875
  }
1733
1876
  interface EmergentResult {
1734
1877
  /** The rendered text output (EMERGENT / MEANING / MOVE). */
1735
1878
  text: string;
1736
- /** The YAML frontmatter for Memory Palace coding. */
1879
+ /** The YAML frontmatter for Mind Palace coding. */
1737
1880
  frontmatter: string;
1738
1881
  /** Voice violations detected in AI output. */
1739
1882
  voiceViolations: VoiceViolation[];
@@ -1755,6 +1898,13 @@ interface EmergentResult {
1755
1898
  worldStack?: WorldStack;
1756
1899
  }
1757
1900
  declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1901
+ /**
1902
+ * Keep only events whose actor login matches `username` (case-insensitive).
1903
+ * Used by personal mode to narrow a read to a single contributor — Radiant
1904
+ * as a local facilitator reading one person's own drift, not a global
1905
+ * observer of the team. Pure function, testable in isolation.
1906
+ */
1907
+ declare function filterEventsByUser(events: readonly Event[], username: string): Event[];
1758
1908
 
1759
1909
  /**
1760
1910
  * @neuroverseos/governance/radiant
@@ -1776,12 +1926,12 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1776
1926
  * before the renderer sees them — deterministic shaping, no LLM in path
1777
1927
  * - Stateless commands: emergent, decision
1778
1928
  * - Stateful (via MemoryProvider) commands: drift, evolve
1779
- * - Memory Palace 4-layer coding standard (compression / baselines /
1929
+ * - Mind Palace 4-layer coding standard (compression / baselines /
1780
1930
  * knowledge / synthesis) with a SQLite reference implementation
1781
1931
  * - CLI entry (bin/radiant.ts) and MCP server entry (bin/radiant-mcp.ts)
1782
1932
  *
1783
1933
  * Build state: Phase 1 complete — voice layer, behavioral dashboard,
1784
- * MCP server, Memory Palace write-back, governance audit, ExoCortex
1934
+ * MCP server, Mind Palace write-back, governance audit, ExoCortex
1785
1935
  * handshake. See radiant/PROJECT-PLAN.md for the full roadmap.
1786
1936
  *
1787
1937
  * Usage:
@@ -1792,4 +1942,4 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1792
1942
  */
1793
1943
  declare const RADIANT_PACKAGE_VERSION = "0.0.0";
1794
1944
 
1795
- export { type Actor, type ActorDomain, type ActorKind, type AlignmentStatus, type BridgingComponent, type BridgingComponentScore, type ClassifiedEvent, type CyberCapability, type CyberDimension, DEFAULT_EVIDENCE_GATE, DEFAULT_SIGNAL_EXTRACTORS, type DiscordFetchOptions, type DiscordSignals, type DiscoveredWorld, type EmergentInput, type EmergentResult, type Event, type EventReference, type EvidenceGate, type ExemplarRef, type ExocortexContext, type ExtendsConfig, type ExtendsSpec, type ExtractionResult, type Fetcher, type GitHubFetchOptions, type GovernanceAudit, type GovernanceVerdict, type InterpretInput, type InterpretResult, LENSES, type LensVocabulary, type LifeCapability, type LifeDimension, type NotionFetchOptions, type NotionSignals, type ObservedPattern, type OrgScope, type OverlapDef, type ParsedRemote, type PatternEvidence, type PatternPersistence, type PrimaryFrame, type PriorRead, RADIANT_PACKAGE_VERSION, type RadiantAI, type RenderInput, type RenderOutput, type RenderingLens, type RepoScope, type ResolveResult, type Scope, type Score, type ScoreSentinel, type ScoredObservation, type Signal, type SignalExtractor, type SignalMatrix, type SlackFetchOptions, type SlackSignals, type ThinkInput, type ThinkResult, type ViewLevel, type VoiceDirectives, type VoiceViolation, type WorldStack, type WorldmodelItem, auditGovernance, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, compressExocortex, compressLens, compressPriorReads, compressWorldmodel, computePersistence, createAnthropicAI, createMockAI, createMockGitHubAdapter, detectOrgExtendsSpec, discoverWorlds, emergent, extractSignals, fetchDiscordActivity, fetchGitHubActivity, fetchGitHubOrgActivity, fetchNotionActivity, fetchSlackActivity, formatActiveWorlds, formatDiscordSignalsForPrompt, formatExocortexForPrompt, formatNotionSignalsForPrompt, formatPriorReadsForPrompt, formatScope, formatSlackSignalsForPrompt, formatTeamExocorticesForPrompt, getCacheDir, getLens, getRepoOrigin, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadExtendsConfig, loadPriorReads, parseExtendsSpec, parseRemoteUrl, parseRepoScope, parseScope, presenceAverage, readExocortex, readOriginRemote, readTeamExocortices, render, resolveAllExtends, resolveExtendsSpec, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, sovereignConduitLens, summarizeExocortex, think, updateKnowledge, writeRead };
1945
+ export { type Actor, type ActorDomain, type ActorKind, type AlignmentStatus, type BridgingComponent, type BridgingComponentScore, type ClassifiedEvent, type CyberCapability, type CyberDimension, DEFAULT_EVIDENCE_GATE, DEFAULT_SIGNAL_EXTRACTORS, type DeclaredPattern, type DeclaredVocabulary, type DiscordFetchOptions, type DiscordSignals, type DiscoveredWorld, type EmergentInput, type EmergentResult, type Event, type EventReference, type EvidenceGate, type ExemplarRef, type ExocortexContext, type ExtendsConfig, type ExtendsSpec, type ExtractionResult, type Fetcher, type GitHubFetchOptions, type GovernanceAudit, type GovernanceVerdict, type InterpretInput, type InterpretResult, LENSES, type LensVocabulary, type LifeCapability, type LifeDimension, type LinearFetchOptions, type LinearSignals, type NotionFetchOptions, type NotionSignals, type ObservedPattern, type OrgScope, type OverlapDef, type ParsedRemote, type PatternEvidence, type PatternPersistence, type PrimaryFrame, type PriorRead, RADIANT_PACKAGE_VERSION, type RadiantAI, type RenderInput, type RenderOutput, type RenderingLens, type RepoScope, type ResolveResult, type Scope, type Score, type ScoreSentinel, type ScoredObservation, type Signal, type SignalExtractor, type SignalMatrix, type SlackFetchOptions, type SlackSignals, type ThinkInput, type ThinkResult, type ViewLevel, type VoiceDirectives, type VoiceViolation, type WorldStack, type WorldmodelItem, auditGovernance, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, compressExocortex, compressLens, compressPriorReads, compressWorldmodel, computePersistence, createAnthropicAI, createMockAI, createMockGitHubAdapter, detectOrgExtendsSpec, discoverWorlds, emergent, extractDeclaredVocabulary, extractSignals, fetchDiscordActivity, fetchGitHubActivity, fetchGitHubOrgActivity, fetchLinearActivity, fetchNotionActivity, fetchSlackActivity, filterEventsByUser, formatActiveWorlds, formatDiscordSignalsForPrompt, formatExocortexForPrompt, formatLinearSignalsForPrompt, formatNotionSignalsForPrompt, formatPriorReadsForPrompt, formatScope, formatSlackSignalsForPrompt, formatTeamExocorticesForPrompt, getCacheDir, getLens, getRepoOrigin, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadExtendsConfig, loadPriorReads, matchDeclaredPattern, parseExtendsSpec, parseRemoteUrl, parseRepoScope, parseScope, presenceAverage, readExocortex, readOriginRemote, readTeamExocortices, render, resolveAllExtends, resolveExtendsSpec, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, sovereignConduitLens, summarizeExocortex, think, updateKnowledge, writeRead };
@@ -1168,6 +1168,137 @@ declare function fetchNotionActivity(token: string, options?: NotionFetchOptions
1168
1168
  */
1169
1169
  declare function formatNotionSignalsForPrompt(signals: NotionSignals): string;
1170
1170
 
1171
+ /**
1172
+ * @neuroverseos/governance/radiant — Linear adapter
1173
+ *
1174
+ * Reads planned work from Linear and surfaces the gap between what the team
1175
+ * said it would ship (issues, cycles, projects) and what actually got built
1176
+ * (signals from the GitHub adapter).
1177
+ *
1178
+ * The behavioral signal Linear uniquely provides:
1179
+ * stated intent (issues planned, cycle committed) vs.
1180
+ * shipped outcome (PRs merged, features delivered)
1181
+ *
1182
+ * That gap is the clearest "agency drift" signal a team can produce — and
1183
+ * none of the dev-productivity tools (LinearB, Swarmia, Jellyfish) read
1184
+ * Linear and GitHub together through a worldmodel lens.
1185
+ *
1186
+ * What it captures:
1187
+ * - Issues created (planning velocity)
1188
+ * - Issues completed (shipping velocity)
1189
+ * - Issues stalled (in-progress > N days without movement)
1190
+ * - Cycle commitment vs. completion (did we finish what we committed to?)
1191
+ * - Comments (how much the team debates vs. ships)
1192
+ * - Project-level updates (direction signals above the issue layer)
1193
+ *
1194
+ * Uses Linear GraphQL v1 via raw fetch (no @linear/sdk dependency,
1195
+ * matching the shape of notion.ts / slack.ts / discord.ts).
1196
+ * Requires a Linear personal API key with read access.
1197
+ */
1198
+
1199
+ interface LinearFetchOptions {
1200
+ /** Restrict to specific team IDs. If empty, reads all accessible teams. */
1201
+ teamIds?: string[];
1202
+ /** How many days of history to fetch. Default: 14. */
1203
+ windowDays?: number;
1204
+ /** Max issues to fetch. Default: 200. */
1205
+ maxIssues?: number;
1206
+ }
1207
+ interface LinearSignals {
1208
+ /** Issues created in window. */
1209
+ issuesCreated: number;
1210
+ /** Issues completed (moved to a "completed" state) in window. */
1211
+ issuesCompleted: number;
1212
+ /** Issues still open at window end. */
1213
+ issuesOpen: number;
1214
+ /** Issues in an in-progress state for > 14 days with no update. */
1215
+ issuesStalled: number;
1216
+ /** Ratio of completed / committed for cycles that ended in window. */
1217
+ cycleCompletionRate: number | null;
1218
+ /** Unique assignees active in window. */
1219
+ uniqueAssignees: number;
1220
+ /** Total comments across issues in window. */
1221
+ commentsTotal: number;
1222
+ /** Top project titles active in window. */
1223
+ topProjects: string[];
1224
+ }
1225
+ /**
1226
+ * Fetch Linear activity and return Radiant Events + compressed signals.
1227
+ *
1228
+ * Shape mirrors fetchNotionActivity / fetchSlackActivity so the radiant
1229
+ * pipeline composes uniformly. Call from commands/emergent.ts the same way
1230
+ * as the other adapters.
1231
+ */
1232
+ declare function fetchLinearActivity(apiKey: string, options?: LinearFetchOptions): Promise<{
1233
+ events: Event[];
1234
+ signals: LinearSignals;
1235
+ }>;
1236
+ /**
1237
+ * Format Linear signals for the AI interpretation prompt.
1238
+ * Emphasizes the stated-intent-vs-shipped-outcome framing so the lens
1239
+ * can pick up agency drift without the adapter naming it directly.
1240
+ */
1241
+ declare function formatLinearSignalsForPrompt(signals: LinearSignals): string;
1242
+
1243
+ /**
1244
+ * @neuroverseos/governance/radiant — declared vocabulary extraction
1245
+ *
1246
+ * Pulls Aligned Behaviors and Drift Behaviors from a worldmodel markdown
1247
+ * file and turns them into canonical snake_case pattern names that the AI
1248
+ * must use when it sees matching evidence.
1249
+ *
1250
+ * Why this exists: Radiant's AI was inventing names like
1251
+ * `velocity_without_declared_target` when the worldmodel already declared
1252
+ * `dependency_on_ai_presenting_as_integration` for the same observation.
1253
+ * The prompt told the AI to "use canonical names if you see them" — but
1254
+ * no one was extracting canonical names from the worldmodel. This module
1255
+ * closes that loop: Radiant now governs its own output against the
1256
+ * vocabulary it claims to read.
1257
+ *
1258
+ * Supported bullet formats (under `## Aligned Behaviors` / `## Drift Behaviors`):
1259
+ * - `` `canonical_name` — prose description `` (explicit, preferred)
1260
+ * - `canonical_name — prose description` (explicit, no backticks)
1261
+ * - `prose description only` (auto-snake-cased)
1262
+ *
1263
+ * Empty sections, missing sections, and HTML comments are silently ignored
1264
+ * — partial vocabulary is better than no vocabulary, and falling back to
1265
+ * candidate-only behavior is the correct failure mode.
1266
+ */
1267
+ interface DeclaredPattern {
1268
+ /** snake_case canonical identifier (stable across reads). */
1269
+ name: string;
1270
+ /** Human-readable prose for keyword matching against AI output. */
1271
+ prose: string;
1272
+ /** Which section this came from. */
1273
+ kind: 'aligned' | 'drift';
1274
+ }
1275
+ interface DeclaredVocabulary {
1276
+ aligned: DeclaredPattern[];
1277
+ drift: DeclaredPattern[];
1278
+ /** All canonical names (aligned + drift) for quick membership checks. */
1279
+ allNames: string[];
1280
+ }
1281
+ declare function extractDeclaredVocabulary(worldmodelContent: string): DeclaredVocabulary;
1282
+ /**
1283
+ * Given a pattern description + name the AI emitted, find a declared
1284
+ * pattern whose prose has enough keyword overlap to be "the same thing."
1285
+ *
1286
+ * Matching is deterministic keyword overlap over content words (lowercased,
1287
+ * >3 chars, punctuation stripped, common stopwords removed). A match
1288
+ * requires at least 2 shared words AND at least 30% coverage of the
1289
+ * declared prose's content words. When multiple declared patterns match,
1290
+ * the one with highest coverage wins.
1291
+ *
1292
+ * This is intentionally a simple deterministic pass, not an LLM call:
1293
+ * - no extra token cost
1294
+ * - testable and reproducible
1295
+ * - easy to tune thresholds without retraining
1296
+ *
1297
+ * Returns null when nothing matches well enough. The pattern stays a
1298
+ * candidate.
1299
+ */
1300
+ declare function matchDeclaredPattern(candidateName: string, candidateDescription: string, vocabulary: DeclaredVocabulary): DeclaredPattern | null;
1301
+
1171
1302
  /**
1172
1303
  * @neuroverseos/governance/radiant — AI pattern interpretation
1173
1304
  *
@@ -1201,8 +1332,15 @@ interface InterpretInput {
1201
1332
  lens: RenderingLens;
1202
1333
  /** AI adapter to call for interpretation. */
1203
1334
  ai: RadiantAI;
1204
- /** Known canonical pattern names from the worldmodel (optional). */
1335
+ /** Known canonical pattern names from the worldmodel (optional).
1336
+ * Kept for backward compatibility — new callers should pass
1337
+ * declaredVocabulary instead, which carries both names and prose. */
1205
1338
  canonicalPatterns?: readonly string[];
1339
+ /** Declared vocabulary extracted from the worldmodel's Aligned/Drift
1340
+ * Behaviors. When present, the AI is told the exact canonical names
1341
+ * to use, and any candidate whose description matches declared prose
1342
+ * is reclassified to the declared name. */
1343
+ declaredVocabulary?: DeclaredVocabulary;
1206
1344
  /** Stated intent from the exocortex (optional). When present, the AI
1207
1345
  * compares stated intent against observed behavior and surfaces gaps. */
1208
1346
  statedIntent?: string;
@@ -1291,7 +1429,7 @@ declare function auditGovernance(events: readonly ClassifiedEvent[], worldPath:
1291
1429
  * Takes signals + patterns + scores + lens metadata and produces the
1292
1430
  * structured output Nils reads. Two output modes:
1293
1431
  * - text: the EMERGENT / MEANING / MOVE structure for terminal display
1294
- * - yaml+text: Memory Palace coded read file (YAML frontmatter + prose)
1432
+ * - yaml+text: Mind Palace coded read file (YAML frontmatter + prose)
1295
1433
  *
1296
1434
  * The renderer enforces the lens's voice rules: forbidden phrases are
1297
1435
  * checked, bucket names are never leaked, vocabulary is Auki-native.
@@ -1321,7 +1459,7 @@ interface RenderInput {
1321
1459
  interface RenderOutput {
1322
1460
  /** The human-readable text output for terminal display. */
1323
1461
  text: string;
1324
- /** The Memory Palace coded YAML frontmatter (Tier 2 structured signals). */
1462
+ /** The Mind Palace coded YAML frontmatter (Tier 2 structured signals). */
1325
1463
  frontmatter: string;
1326
1464
  }
1327
1465
  declare function render(input: RenderInput): RenderOutput;
@@ -1514,13 +1652,13 @@ declare function parseRemoteUrl(url: string): ParsedRemote | null;
1514
1652
  declare function getRepoOrigin(repoDir: string): ParsedRemote | null;
1515
1653
 
1516
1654
  /**
1517
- * @neuroverseos/governance/radiant — Memory Palace file operations
1655
+ * @neuroverseos/governance/radiant — Mind Palace file operations
1518
1656
  *
1519
1657
  * Writes Radiant reads to the exocortex as dated markdown files (with
1520
1658
  * YAML frontmatter for structured signal data). Reads prior files to
1521
1659
  * detect pattern persistence across runs.
1522
1660
  *
1523
- * The exocortex directory IS the Memory Palace. Files are the tiers:
1661
+ * The exocortex directory IS the Mind Palace. Files are the tiers:
1524
1662
  * - reads/YYYY-MM-DD.md = Tier 2 (structured signals) + Tier 3 (narrative)
1525
1663
  * - knowledge.md = accumulated pattern facts with persistence counts
1526
1664
  *
@@ -1593,7 +1731,7 @@ declare function computePersistence(priorReads: PriorRead[], currentPatternNames
1593
1731
  declare function formatPriorReadsForPrompt(priorReads: PriorRead[]): string;
1594
1732
 
1595
1733
  /**
1596
- * @neuroverseos/governance/radiant — Memory Palace compression
1734
+ * @neuroverseos/governance/radiant — Mind Palace compression
1597
1735
  *
1598
1736
  * Applies the three-tier principle to everything that enters the AI
1599
1737
  * prompt: raw data is not the memory; structured signals are.
@@ -1729,11 +1867,16 @@ interface EmergentInput {
1729
1867
  * When present, each event is evaluated through evaluateGuard
1730
1868
  * and the GOVERNANCE section appears in the output. */
1731
1869
  worldPath?: string;
1870
+ /** When set, filter events to only this GitHub login's activity.
1871
+ * Turns Radiant into a local, personal facilitator — reads your
1872
+ * own drift, not the team's. No one else is observed. Leave
1873
+ * undefined for the default team-wide read. */
1874
+ personalUser?: string;
1732
1875
  }
1733
1876
  interface EmergentResult {
1734
1877
  /** The rendered text output (EMERGENT / MEANING / MOVE). */
1735
1878
  text: string;
1736
- /** The YAML frontmatter for Memory Palace coding. */
1879
+ /** The YAML frontmatter for Mind Palace coding. */
1737
1880
  frontmatter: string;
1738
1881
  /** Voice violations detected in AI output. */
1739
1882
  voiceViolations: VoiceViolation[];
@@ -1755,6 +1898,13 @@ interface EmergentResult {
1755
1898
  worldStack?: WorldStack;
1756
1899
  }
1757
1900
  declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1901
+ /**
1902
+ * Keep only events whose actor login matches `username` (case-insensitive).
1903
+ * Used by personal mode to narrow a read to a single contributor — Radiant
1904
+ * as a local facilitator reading one person's own drift, not a global
1905
+ * observer of the team. Pure function, testable in isolation.
1906
+ */
1907
+ declare function filterEventsByUser(events: readonly Event[], username: string): Event[];
1758
1908
 
1759
1909
  /**
1760
1910
  * @neuroverseos/governance/radiant
@@ -1776,12 +1926,12 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1776
1926
  * before the renderer sees them — deterministic shaping, no LLM in path
1777
1927
  * - Stateless commands: emergent, decision
1778
1928
  * - Stateful (via MemoryProvider) commands: drift, evolve
1779
- * - Memory Palace 4-layer coding standard (compression / baselines /
1929
+ * - Mind Palace 4-layer coding standard (compression / baselines /
1780
1930
  * knowledge / synthesis) with a SQLite reference implementation
1781
1931
  * - CLI entry (bin/radiant.ts) and MCP server entry (bin/radiant-mcp.ts)
1782
1932
  *
1783
1933
  * Build state: Phase 1 complete — voice layer, behavioral dashboard,
1784
- * MCP server, Memory Palace write-back, governance audit, ExoCortex
1934
+ * MCP server, Mind Palace write-back, governance audit, ExoCortex
1785
1935
  * handshake. See radiant/PROJECT-PLAN.md for the full roadmap.
1786
1936
  *
1787
1937
  * Usage:
@@ -1792,4 +1942,4 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1792
1942
  */
1793
1943
  declare const RADIANT_PACKAGE_VERSION = "0.0.0";
1794
1944
 
1795
- export { type Actor, type ActorDomain, type ActorKind, type AlignmentStatus, type BridgingComponent, type BridgingComponentScore, type ClassifiedEvent, type CyberCapability, type CyberDimension, DEFAULT_EVIDENCE_GATE, DEFAULT_SIGNAL_EXTRACTORS, type DiscordFetchOptions, type DiscordSignals, type DiscoveredWorld, type EmergentInput, type EmergentResult, type Event, type EventReference, type EvidenceGate, type ExemplarRef, type ExocortexContext, type ExtendsConfig, type ExtendsSpec, type ExtractionResult, type Fetcher, type GitHubFetchOptions, type GovernanceAudit, type GovernanceVerdict, type InterpretInput, type InterpretResult, LENSES, type LensVocabulary, type LifeCapability, type LifeDimension, type NotionFetchOptions, type NotionSignals, type ObservedPattern, type OrgScope, type OverlapDef, type ParsedRemote, type PatternEvidence, type PatternPersistence, type PrimaryFrame, type PriorRead, RADIANT_PACKAGE_VERSION, type RadiantAI, type RenderInput, type RenderOutput, type RenderingLens, type RepoScope, type ResolveResult, type Scope, type Score, type ScoreSentinel, type ScoredObservation, type Signal, type SignalExtractor, type SignalMatrix, type SlackFetchOptions, type SlackSignals, type ThinkInput, type ThinkResult, type ViewLevel, type VoiceDirectives, type VoiceViolation, type WorldStack, type WorldmodelItem, auditGovernance, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, compressExocortex, compressLens, compressPriorReads, compressWorldmodel, computePersistence, createAnthropicAI, createMockAI, createMockGitHubAdapter, detectOrgExtendsSpec, discoverWorlds, emergent, extractSignals, fetchDiscordActivity, fetchGitHubActivity, fetchGitHubOrgActivity, fetchNotionActivity, fetchSlackActivity, formatActiveWorlds, formatDiscordSignalsForPrompt, formatExocortexForPrompt, formatNotionSignalsForPrompt, formatPriorReadsForPrompt, formatScope, formatSlackSignalsForPrompt, formatTeamExocorticesForPrompt, getCacheDir, getLens, getRepoOrigin, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadExtendsConfig, loadPriorReads, parseExtendsSpec, parseRemoteUrl, parseRepoScope, parseScope, presenceAverage, readExocortex, readOriginRemote, readTeamExocortices, render, resolveAllExtends, resolveExtendsSpec, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, sovereignConduitLens, summarizeExocortex, think, updateKnowledge, writeRead };
1945
+ export { type Actor, type ActorDomain, type ActorKind, type AlignmentStatus, type BridgingComponent, type BridgingComponentScore, type ClassifiedEvent, type CyberCapability, type CyberDimension, DEFAULT_EVIDENCE_GATE, DEFAULT_SIGNAL_EXTRACTORS, type DeclaredPattern, type DeclaredVocabulary, type DiscordFetchOptions, type DiscordSignals, type DiscoveredWorld, type EmergentInput, type EmergentResult, type Event, type EventReference, type EvidenceGate, type ExemplarRef, type ExocortexContext, type ExtendsConfig, type ExtendsSpec, type ExtractionResult, type Fetcher, type GitHubFetchOptions, type GovernanceAudit, type GovernanceVerdict, type InterpretInput, type InterpretResult, LENSES, type LensVocabulary, type LifeCapability, type LifeDimension, type LinearFetchOptions, type LinearSignals, type NotionFetchOptions, type NotionSignals, type ObservedPattern, type OrgScope, type OverlapDef, type ParsedRemote, type PatternEvidence, type PatternPersistence, type PrimaryFrame, type PriorRead, RADIANT_PACKAGE_VERSION, type RadiantAI, type RenderInput, type RenderOutput, type RenderingLens, type RepoScope, type ResolveResult, type Scope, type Score, type ScoreSentinel, type ScoredObservation, type Signal, type SignalExtractor, type SignalMatrix, type SlackFetchOptions, type SlackSignals, type ThinkInput, type ThinkResult, type ViewLevel, type VoiceDirectives, type VoiceViolation, type WorldStack, type WorldmodelItem, auditGovernance, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, compressExocortex, compressLens, compressPriorReads, compressWorldmodel, computePersistence, createAnthropicAI, createMockAI, createMockGitHubAdapter, detectOrgExtendsSpec, discoverWorlds, emergent, extractDeclaredVocabulary, extractSignals, fetchDiscordActivity, fetchGitHubActivity, fetchGitHubOrgActivity, fetchLinearActivity, fetchNotionActivity, fetchSlackActivity, filterEventsByUser, formatActiveWorlds, formatDiscordSignalsForPrompt, formatExocortexForPrompt, formatLinearSignalsForPrompt, formatNotionSignalsForPrompt, formatPriorReadsForPrompt, formatScope, formatSlackSignalsForPrompt, formatTeamExocorticesForPrompt, getCacheDir, getLens, getRepoOrigin, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadExtendsConfig, loadPriorReads, matchDeclaredPattern, parseExtendsSpec, parseRemoteUrl, parseRepoScope, parseScope, presenceAverage, readExocortex, readOriginRemote, readTeamExocortices, render, resolveAllExtends, resolveExtendsSpec, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, sovereignConduitLens, summarizeExocortex, think, updateKnowledge, writeRead };
@@ -17,15 +17,19 @@ import {
17
17
  detectOrgExtendsSpec,
18
18
  discoverWorlds,
19
19
  emergent,
20
+ extractDeclaredVocabulary,
20
21
  extractSignals,
21
22
  fetchDiscordActivity,
22
23
  fetchGitHubActivity,
23
24
  fetchGitHubOrgActivity,
25
+ fetchLinearActivity,
24
26
  fetchNotionActivity,
25
27
  fetchSlackActivity,
28
+ filterEventsByUser,
26
29
  formatActiveWorlds,
27
30
  formatDiscordSignalsForPrompt,
28
31
  formatExocortexForPrompt,
32
+ formatLinearSignalsForPrompt,
29
33
  formatNotionSignalsForPrompt,
30
34
  formatPriorReadsForPrompt,
31
35
  formatScope,
@@ -39,6 +43,7 @@ import {
39
43
  isSentinel,
40
44
  loadExtendsConfig,
41
45
  loadPriorReads,
46
+ matchDeclaredPattern,
42
47
  parseExtendsSpec,
43
48
  parseRemoteUrl,
44
49
  parseRepoScope,
@@ -58,7 +63,7 @@ import {
58
63
  think,
59
64
  updateKnowledge,
60
65
  writeRead
61
- } from "../chunk-3ZWU7C43.js";
66
+ } from "../chunk-BZYQHJDM.js";
62
67
  import {
63
68
  LENSES,
64
69
  aukiBuilderLens,
@@ -95,15 +100,19 @@ export {
95
100
  detectOrgExtendsSpec,
96
101
  discoverWorlds,
97
102
  emergent,
103
+ extractDeclaredVocabulary,
98
104
  extractSignals,
99
105
  fetchDiscordActivity,
100
106
  fetchGitHubActivity,
101
107
  fetchGitHubOrgActivity,
108
+ fetchLinearActivity,
102
109
  fetchNotionActivity,
103
110
  fetchSlackActivity,
111
+ filterEventsByUser,
104
112
  formatActiveWorlds,
105
113
  formatDiscordSignalsForPrompt,
106
114
  formatExocortexForPrompt,
115
+ formatLinearSignalsForPrompt,
107
116
  formatNotionSignalsForPrompt,
108
117
  formatPriorReadsForPrompt,
109
118
  formatScope,
@@ -119,6 +128,7 @@ export {
119
128
  listLenses,
120
129
  loadExtendsConfig,
121
130
  loadPriorReads,
131
+ matchDeclaredPattern,
122
132
  parseExtendsSpec,
123
133
  parseRemoteUrl,
124
134
  parseRepoScope,
@@ -3,7 +3,7 @@ import {
3
3
  emergent,
4
4
  parseRepoScope,
5
5
  think
6
- } from "./chunk-3ZWU7C43.js";
6
+ } from "./chunk-BZYQHJDM.js";
7
7
  import "./chunk-TCGGED4G.js";
8
8
  import "./chunk-I4RTIMLX.js";
9
9
  import "./chunk-ZAF6JH23.js";
@@ -58,12 +58,15 @@ jobs:
58
58
  # with a fine-grained PAT stored in secrets.RADIANT_GITHUB_TOKEN.
59
59
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60
60
  ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
61
- # Memory Palace writes into THIS repo — since we checked it out at
61
+ # Mind Palace writes into THIS repo — since we checked it out at
62
62
  # the workflow root, point the CLI at $GITHUB_WORKSPACE.
63
63
  RADIANT_EXOCORTEX: ${{ github.workspace }}
64
64
  run: |
65
65
  npx @neuroverseos/governance@latest radiant emergent NeuroverseOS/ \
66
+ --entire-org \
66
67
  --lens sovereign-conduit
68
+ # --entire-org is required to read all repos in the org. Without
69
+ # it, Radiant's default scope is narrow (consent-first posture).
67
70
  # No --worlds flag needed — discovery probes NeuroverseOS/worlds
68
71
  # directly from the scope arg. See the governance repo for details.
69
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuroverseos/governance",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Deterministic governance engine for AI agents — enforce worlds (permanent rules) and plans (mission constraints) with full audit trace",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",