ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.md

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / docs/AI_MAG_ARCHITECTURE.md
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberdocs/AI_MAG_ARCHITECTURE.md
Original SHA-25644118dd7c06971c1281369390dff2d038dd22b0123209e4e18b1f9ae33c963ec
Git blob SHA99d9eded2449d7e87874d1afa9ac70dc521b5d9e
Reading-copy SHA-25644118dd7c06971c1281369390dff2d038dd22b0123209e4e18b1f9ae33c963ec

Original source ↗

Every recorded occurrence

These 10 records contain identical original source bytes. Their paths and revisions remain part of the archive.

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.mdfeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.mdcollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.mdmaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.mdmag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.mdtime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.mdpresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.mdvendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.mdphase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.mdfeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / docs/AI_MAG_ARCHITECTURE.mdcapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

# The augmentative generator: Model Augmented Generation (MAG) Source: a seven agent grounded research sweep (2026-06-30) on how to close the learned/predictive layer, the enterprise connectors, and the two people side modules, within the hard constraints (frozen engine the only scorer, Postgres+pgvector only both cloud, no Python, AEDT, FIPS, secrets server side). ## The answer The augmentative generator we need is **Model Augmented Generation (MAG)**: a fourth augmentation class after RAG, TAG, and GraphRAG. A MAG intent is a new INTENT KIND inside the already closed `ai.Registry`, selected by name by the planner exactly like a SQL or graph intent, that the model authors ZERO of (no SQL, no params, no coefficients), and that can ONLY emit one of three legal outputs, never a candidate score: ``` OutputKind ∈ { opportunity_score, display_order, confidence } ``` That hard enum is the single mechanism that makes it **structurally impossible** for any learned capability to become a second per candidate scorer, so the frozen decimal engine (ModelVersion v1.4.0) stays the only per candidate scorer by construction. A MAG intent reads its FEATURES from the existing graph planes (G1/G3/G5/G9) through the already guarded `ExecuteIntent` paths (so RLS, the read allowlist, ForbidEEO, and suppression all still hold), scores a calibrated number in `shopspring/decimal` from stored coefficients, and returns a per feature additive contribution trace shaped exactly like `engine.ComponentScore`. That trace is the citations the existing orchestrator faithfulness gate verifies the narration against, so a learned answer is grounded exactly like RAG and TAG and falls back to the deterministic rendering of the contributions if the prose asserts an unsupported driver. Every future learned capability (win probability, the display order reranker, hazard and retention timing, price to win refinements, a learned vendor rerank) is then just ONE new Registry entry plus a version row on this ONE surface. ## The five shared primitives (Phase 0, buildable now, zero labels) 1. **The Model Backed Intent kind.** Add `Executor` (ExecutorSQL default, ExecutorModel) and `ModelSpec{ModelKey, OutputKind}` to `ai.QueryIntent`, with OutputKind the hard enum above, an `IsModelIntent` helper alongside `IsBenchIntent`/`IsGraphIntent`, and a `ValidateRegistry` MAG branch that rejects any eeo marker in the feature spec, an illegal OutputKind, or an unresolvable registered champion. 2. **The coefficients and calibration store.** Three GLOBAL, migrator owned, app and compliance SELECT only Postgres tables mirroring `aedt_model_versions`: `aedt_learned_models(model_key, version, family, output_kind, feature_spec jsonb, effective_from, champion bool, notes)`, `aedt_model_coefficients(model_key, version, feature_name, coefficient numeric)`, `aedt_calibration_bins(model_key, version, bin_lo, bin_hi, empirical_rate numeric)`. A learned artifact is stored as interpretable numeric coefficients plus a monotone calibration map, scored in SQL/Go into decimal, so serving needs no second datastore, no cloud ML service, and no Python at request time. 3. **The MAG executor.** `ExecuteModelIntent` parallel to `ExecuteIntent`, dispatched by one new switch arm in `graph_route.go` and one arm in the planner `runPlan`, that gathers features through the guarded feature source intents, reads the champion coefficients, computes `log odds = intercept + SUM(beta_j * standardized x_j)` plus the calibration map in decimal, and returns the number plus the ComponentScore shaped contribution trace as the faithfulness citations. The plan trace audit gains model_key and version (counts only, no PII). 4. **`cmd/train-model`, the pure Go trainer.** Reads the accruing labels offline under a migrator scoped read (bid_outcomes win/loss, slate_members.decision approve/reject, later realized roll off), fits interpretable coefficients (IRLS/Newton Raphson logistic, PAVA isotonic, LambdaMART with inverse propensity weighting for the reranker), and writes a CHALLENGER version and its coefficient/calibration rows. It NEVER flips champion. 5. **`cmd/eval-model`, the champion challenger harness.** Offline replays a challenger against held out labels (calibration error, AUC, nDCG) AND recomputes the `eeo.fairness_snapshots` four fifths ratios under the challenger ranking, refusing promotion if any group impact ratio drops below 0.80 or regresses from the champion. Promotion to champion is a human governance action on a passing eval; the orchestrator serves the frozen engine order or the base rate on live drift. ## The sequenced plan - **Phase 0, the MAG substrate.** Buildable NOW, no labels. Migration 0036 (the three coefficient tables) + the QueryIntent Executor/ModelSpec/OutputKind change + ValidateRegistry MAG branch + `ai/mag.go` ExecuteModelIntent + the dispatch arms + `cmd/train-model` and `cmd/eval-model`. This is the first build. - **Phase 1, interpretable calibrated opportunity win probability.** The highest leverage learned capability because it delivers on day one: register `IntentOpportunityWinProbability` (family logistic, OutputKind opportunity_score) with features from G1 incumbent share, G9 recompete flag, the agency set aside mix and vendor concentration, and bid_outcomes segment depth (NONE a protected attribute). Seed a v0 PRIOR ONLY model (intercept = logit of the federal recompete base rate, all betas 0, empirical Bayes shrinkage toward `bid_win_rate_by_segment`) so it reads a defensible market base rate the day it ships and its learned coefficients light up automatically as M7 fills, per segment, once a segment crosses the events per predictor floor (roughly 60 to 120 decided bids). Add a `tenant_capability` table if the org profile does not carry the socioeconomic status (8a, SDVOSB, WOSB, HUBZone) the set aside fit feature needs. Gated on the MAG surface plus label accrual. - **Phase 2, the enterprise connectors.** The largest DATA gap (today the whole loop runs on stale CSV). A Go `connector` port with an iCIMS ATS adapter (OAuth client credentials, updated since incremental window, pagination, daily cap graceful stop) then a Workday RaaS HRIS adapter, behind a provider interface like storage and inference, reusing the proven `sourcing` writeStructuredCandidate path, with `connector_sync_state` (RLS cursor), an audit per sync, and mm-icims-sync / mm-hris-sync systemd timers. REJECT a cloud unified aggregator (Merge.dev, not FedRAMP authorized) from the CUI core path; allow it later only behind the same port for demo tenants. Gated only on a consenting pilot tenant's OAuth grant, not on labels; fresh live data accelerates the label accrual Phase 1 depends on. - **Phase 3, the two people side modules, deterministic first.** Vendor Intelligence (staffing_vendors + vendor_submissions, a deterministic weighted PerformanceScore over fill rate, submit to interview, time to submit, and the frozen engine bands of submitted candidates, NEVER re scoring a person; a vendor_performance_scorecard TAG intent + a k=10 suppressed vendor_quality_distribution). Employee Mobility (internal opportunity match reusing engine.ScoreCandidate unchanged; skill alignment via G3; a role_reachability_from_role recursive CTE emitting DISPLAY ORDER only; a deterministic retention index over structural signals only, k=10 suppressed, behind an employee consent gate). Both learned upgrades defer to the MAG surface when their labels accrue. ## What makes it self improving The labels are already being captured, dormant, ahead of the models that consume them: bid_outcomes (win/loss), slate_members.decision (approve/reject with all six frozen sub scores and the band frozen on the same row), candidate_evaluations, staffing_recommendations.decision_note, teaching_signal_aggregates. Each cycle is a closed loop: labels accrue, `cmd/train-model` fits a challenger offline in pure Go, `cmd/eval-model` replays it against held out labels and the four fifths fairness gate, a human promotes the champion, and the served surface gets strictly better while the frozen v1.4.0 engine stays the untouched per candidate scorer and the deterministic base rate is always the safe fallback. ## Founder stops (governance decisions, needed at Phase 1 and Phase 3, not Phase 0) 1. The exact four fifths floor and the held out cohort for the no adverse impact regression gate: per tenant versus pooled, and whether thin per tenant labels force a differential privacy protected pooled cross tenant training posture that respects the teaching scrub contents free boundary. 2. The employee consent and manager visibility contract for the retention index (Employee Mobility touches employees as people). 3. Whether champion promotion flips via a governance endpoint or only via a migration. 4. Whether outcome calibrated confidence replaces or runs parallel to the deterministic `staffing.Confidence` behind a flag. All hard constraints hold throughout: the frozen engine stays the only per candidate scorer (enforced by the OutputKind enum), Postgres+pgvector only both cloud, no Python (Go trainer, SQL/decimal serving), FIPS unchanged (only numeric arithmetic and existing HTTP inside GOFIPS140), secrets server side only.

Search equations, builds, manuscript text, and recovered sources.