ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/modules/matching/intelligence/intelligence.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/modules/matching/intelligence/intelligence.go
Original SHA-2566ff216e68c76cd33e151419396be54af09ffd261b3b8ac6dfc07b1b2442c59d2
Git blob SHAd329a4fd71cf752b092359c7220b4622e4657b46
Reading-copy SHA-2566ff216e68c76cd33e151419396be54af09ffd261b3b8ac6dfc07b1b2442c59d2

Original source ↗

Every recorded occurrence

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

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goper-tenant-routing9bde0f9a74b89d01980fa658e5253acda7528d0cOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gows6-retrieval6c56e29231ec05735927fa265c97d517499dfeafOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goworkstream-a-shared-coree0de03ac3a1ec826bd15d0e048e3b02baa23eeffOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gom5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goworkstream-c-slatematch5cd60c918301b46ecd6ed3e03e20c395da0062e2Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gows1-ontology-syncb596f449a32a1016fbd403c36505cc00a1ac9ee6Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gows8-teaching-loopc823f0fb6bb2aba0f39001eb6de96f4000d9321fOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gow3-ai-staffing-recommendations43d56387270ef4da4cabd794d97ca6a49909bc7dOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gows3-clearance4b8e7ce594c068621867f9c9deed0ec64ae6c553Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goworkstream-d-command-center255e7d1d420abf5e277d0cd8c9b14f6f72b6acb9Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gophase2-eval-fairnessd361af254701975fe239927656ababb56374655eOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goworkstream-e-dataflow-deploy433815a042f9741411e60fa553fe72143e9b10dbOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goruthless-debug-sweepb7d742f8f032984be3817efffa3eb8b13b651c1fOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goai-intelligence-layer5d5ddff70393a197c5f54a45280bb5dd42b24755Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gographrag-foundationb0ddeb9f633fd138d09309d1a17b7d13bc3a67f7Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goworkstream-a-opportunity-intelligence1675031db74316e100782d063e9eda1a597fe3a1Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.godeploy-and-opsbdacd9d0b4d5998d25fc74bf4007f4c3ec538c7aOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gows9-bench-ingestionf585a9ef32fa554663ce1fba9a414a54b6e49cf0Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gows2-alias-relationshipe4dada4601c6eb101830f9d223a9655dfa120616Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goworkstream-b-screenmatch09015496d565a172bcaa15cfe9a8e4b072b13df0Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gows7-federal-signal6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goworkstream-e-commercial-stubs4437da660539284a400ee380b9b427a300c369eeOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goai-brain-liveaac32fc49c878cc5bca099459307611562d0bac1Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goworkstream-d-missionmatch3be46ba89edb737182075a2b320509b42dc916f8Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.goworkstream-b-sam-contract-awardsd5101cceb98e70000cebb31d3e7ac73d747d3a6dOpen original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/modules/matching/intelligence/intelligence.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

// Package intelligence derives the customer-facing screenMATCH™ "Mission Readiness" panels from the // pure engine output. It is PURE (no DB/IO/clock except an explicit asOf passed in) and adds NO new // scoring, every panel is a presentation/derivation of the same deterministic MatchResult, so the // AEDT explainability and reproducibility guarantees carry through unchanged. // // Panels (from the "Defining missionMATCH/screenMATCH" brief + screenMATCH User Guide): // - MissionReadiness : the centerpiece, operational status + the 6 named readiness categories. // - NextSteps : recommended actions from the band/gaps. // - BattleCard : strengths/gaps scouting view. // - ClearanceIntel : clearance intelligence layer (eligibility, investigation age, recency). // - ContractReadiness: satisfied requirement areas + risk areas. // - WinImpact : proposal-staffing win impact + reasons. package intelligence import ( "fmt" "strings" "time" "github.com/shopspring/decimal" "github.com/missionworkforce/missionmatch/internal/modules/matching/engine" ) var hundredVal = decimal.NewFromInt(100) // ---------- Mission Readiness (the centerpiece) ---------- // MissionReadiness rebadges the engine result into operational language. type MissionReadiness struct { Status string `json:"status"` // "Mission Ready" | "Review Required" | "Recruiting Required" StatusCode string `json:"status_code"` // "ready" | "review" | "recruiting" Score string `json:"score"` // "92.00" Band string `json:"band"` // green | yellow | red Categories []ReadinessCategory `json:"categories"` } // ReadinessCategory is one named readiness dimension (the User Guide §8 breakdown). type ReadinessCategory struct { Name string `json:"name"` // "Clearance Readiness" Score string `json:"score"` // "100.00" Weight string `json:"weight"` // "0.25" State string `json:"state"` // "ready" (>=90) | "partial" (75-89) | "gap" (<75) } // engine Trace component name -> operational readiness label. var categoryLabels = map[string]string{ "Clearance": "Clearance Readiness", "Skills": "Skills Readiness", "Certifications": "Certification Readiness", "CustomerExperience": "Customer Readiness", "Experience": "Experience Readiness", "LocationAvailability": "Availability Readiness", } // Readiness builds the Mission Readiness panel from a match result. func Readiness(res engine.MatchResult) MissionReadiness { cats := make([]ReadinessCategory, 0, len(res.Trace)) for _, c := range res.Trace { name := categoryLabels[c.Component] if name == "" { name = c.Component } cats = append(cats, ReadinessCategory{ Name: name, Score: c.Raw.StringFixed(2), Weight: c.Weight.String(), State: stateFor(c.Raw), }) } status, code := missionStatus(res.Band) return MissionReadiness{ Status: status, StatusCode: code, Score: res.Total.StringFixed(2), Band: res.Band.Code(), Categories: cats, } } // MissionStatusLabel is the operational status label for a band ("Mission Ready", etc.). func MissionStatusLabel(b engine.Band) string { l, _ := missionStatus(b); return l } func missionStatus(b engine.Band) (label, code string) { switch b { case engine.BandGreen: return "Mission Ready", "ready" case engine.BandYellow: return "Review Required", "review" default: return "Recruiting Required", "recruiting" } } // stateFor classifies a 0-100 sub-score using the same band thresholds as the total. func stateFor(score decimal.Decimal) string { switch { case score.GreaterThanOrEqual(engine.BandGreenMin): return "ready" case score.GreaterThanOrEqual(engine.BandYellowMin): return "partial" default: return "gap" } } // ---------- Recommended Next Steps ---------- // NextStep is a recommended action shown after evaluation. type NextStep struct { Action string `json:"action"` Reason string `json:"reason"` } // NextSteps recommends actions from the band (User Guide §12). func NextSteps(res engine.MatchResult) []NextStep { switch res.Band { case engine.BandGreen: return []NextStep{ {"Move to Candidate Slate", "Candidate is proposal ready."}, {"Add to Talent Pipeline", "Retain for future opportunities."}, } case engine.BandYellow: return []NextStep{ {"Request Interview", "Additional validation recommended."}, {"Review Gaps", "Resolve gaps before submission."}, {"Add to Talent Pipeline", "Suitable for future opportunities."}, } default: return []NextStep{ {"Recruit Additional Candidates", "Qualification gaps identified."}, {"Add to Talent Pipeline", "Reconsider for better-fit opportunities."}, } } } // ---------- Battle Card ---------- // BattleCard is the scouting-report view (User Guide §9). type BattleCard struct { Strengths []string `json:"strengths"` Gaps []string `json:"gaps"` } // BattleCardFor derives strengths (✓) and gaps (⚠) from the candidate + result. func BattleCardFor(c engine.Candidate, r engine.Requirement, res engine.MatchResult) BattleCard { var strengths []string if res.Clearance.GreaterThanOrEqual(hundredVal) && c.Clearance.Level >= engine.ClearanceConfidential { strengths = append(strengths, fmt.Sprintf("%s %s", c.Clearance.Level.String(), c.Clearance.Status.String())) } for _, m := range res.MatchedSkills { if m.Matched { strengths = append(strengths, m.RequiredSkillName) } } if res.CustomerExperience.GreaterThanOrEqual(hundredVal) && r.CustomerAgency != "" { strengths = append(strengths, fmt.Sprintf("%s experience", r.CustomerAgency)) } if r.RequiredYears > 0 && c.YearsExperience >= r.RequiredYears { strengths = append(strengths, fmt.Sprintf("Exceeds experience requirement (%d yrs)", c.YearsExperience)) } // Held certifications that the requirement asked for. held := lowerSet(c.Certifications) for _, rc := range r.RequiredCerts { if held[lower(rc)] { strengths = append(strengths, rc) } } gaps := append([]string{}, res.GapSummary...) // unmet mandatory items (empty slice, never null) return BattleCard{Strengths: dedupe(strengths), Gaps: gaps} } // ---------- Clearance Intelligence ---------- // ClearanceFacts is the clearance input (carries dates the engine deliberately omits). type ClearanceFacts struct { Level engine.ClearanceLevel Poly engine.Polygraph Status engine.ClearanceStatus GrantedAt *time.Time ExpiresAt *time.Time ReinvestigationDueAt *time.Time CustomerAgencies []string // Provenance records HOW the clearance is known (self_reported is the default and honest baseline); // the platform never verifies a clearance itself. VerifiedAt is set when an FSO or sponsor confirmed. Provenance string VerifiedAt *time.Time } // ClearanceIntel is the clearance intelligence layer (Evolution #6). type ClearanceIntel struct { Current string `json:"current"` // "TS/SCI" Status string `json:"status"` // "Active" SCIEligible bool `json:"sci_eligible"` // TS or above CIPolyEligible bool `json:"ci_poly_eligible"` FullScopePoly bool `json:"full_scope_poly"` Expired bool `json:"expired"` InvestigationAgeMonths *int `json:"investigation_age_months,omitempty"` ExpiresAt *string `json:"expires_at,omitempty"` ReinvestigationDueAt *string `json:"reinvestigation_due_at,omitempty"` RecentClassifiedSupport bool `json:"recent_classified_support"` // Provenance and honesty: the platform never verifies a clearance, it records how the clearance is // known. Verified is true ONLY when an FSO or sponsor confirmed it (the authoritative DISS check), // never because the platform checked. The default self_reported reads "self reported, not verified". Provenance string `json:"provenance"` // self_reported | sponsor_verified | document | continuous_vetting ProvenanceLabel string `json:"provenance_label"` // human label Verified bool `json:"verified"` // true only for a sponsor FSO verification VerifiedAt *string `json:"verified_at,omitempty"` } // provenanceLabel maps a clearance provenance code to honest UI copy. Self reported is never "verified". func provenanceLabel(p string) string { switch p { case "sponsor_verified": return "Sponsor FSO verified" case "document": return "Document on file, not FSO verified" case "continuous_vetting": return "Continuous vetting enrolled" default: return "Self reported, not verified" } } // Clearance derives the clearance intelligence as-of a date. func Clearance(f ClearanceFacts, asOf time.Time) ClearanceIntel { ci := ClearanceIntel{ Current: f.Level.String(), Status: f.Status.String(), SCIEligible: f.Level >= engine.ClearanceTopSecret, CIPolyEligible: f.Poly >= engine.PolyCI, FullScopePoly: f.Poly == engine.PolyFullScope, RecentClassifiedSupport: len(f.CustomerAgencies) > 0, } if f.ExpiresAt != nil { ci.Expired = f.ExpiresAt.Before(asOf) s := f.ExpiresAt.Format("2006-01-02") ci.ExpiresAt = &s } if f.Status == engine.StatusExpired { ci.Expired = true } if f.ReinvestigationDueAt != nil { s := f.ReinvestigationDueAt.Format("2006-01-02") ci.ReinvestigationDueAt = &s } if f.GrantedAt != nil { m := monthsBetween(*f.GrantedAt, asOf) ci.InvestigationAgeMonths = &m } prov := f.Provenance if prov == "" { prov = "self_reported" } ci.Provenance = prov ci.ProvenanceLabel = provenanceLabel(prov) ci.Verified = prov == "sponsor_verified" // only an FSO confirmation counts as verified, never the platform if f.VerifiedAt != nil { s := f.VerifiedAt.Format("2006-01-02") ci.VerifiedAt = &s } return ci } // ---------- Contract Readiness ---------- // RequirementArea is one contract requirement category and whether the candidate satisfies it. type RequirementArea struct { Area string `json:"area"` Met bool `json:"met"` } // RiskArea is a flagged staffing risk. type RiskArea struct { Severity string `json:"severity"` // "warning" | "info" Message string `json:"message"` } // ContractReadiness lists satisfied requirement areas + risk areas (Evolution #3). type ContractReadiness struct { Areas []RequirementArea `json:"areas"` Risks []RiskArea `json:"risks"` } // Contract derives contract readiness. expiringWindow is how soon a clearance expiry is a risk. func Contract(c engine.Candidate, r engine.Requirement, res engine.MatchResult, f ClearanceFacts, asOf time.Time) ContractReadiness { areas := []RequirementArea{ {"Labor Category Requirements", res.Skills.GreaterThanOrEqual(engine.BandYellowMin)}, {"Clearance Requirements", res.Clearance.GreaterThanOrEqual(hundredVal)}, {"Certification Requirements", res.Certifications.GreaterThanOrEqual(hundredVal)}, {"Customer Experience Requirements", res.CustomerExperience.GreaterThanOrEqual(hundredVal)}, {"Availability Requirements", res.Location.GreaterThanOrEqual(engine.BandGreenMin)}, } risks := []RiskArea{} // empty slice, never null if f.ExpiresAt != nil { days := int(f.ExpiresAt.Sub(asOf).Hours() / 24) switch { case days < 0: risks = append(risks, RiskArea{"warning", "Clearance is expired."}) case days <= 90: risks = append(risks, RiskArea{"warning", fmt.Sprintf("Clearance expires in %d days.", days)}) } } if len(f.CustomerAgencies) == 0 { risks = append(risks, RiskArea{"warning", "No recorded classified/customer program support."}) } if r.RequiredYears > 0 && c.YearsExperience < r.RequiredYears { risks = append(risks, RiskArea{"info", fmt.Sprintf("Experience below requirement (%d of %d years).", c.YearsExperience, r.RequiredYears)}) } if f.ReinvestigationDueAt != nil && f.ReinvestigationDueAt.Before(asOf) { risks = append(risks, RiskArea{"warning", "Periodic reinvestigation is overdue."}) } return ContractReadiness{Areas: areas, Risks: risks} } // ---------- Win Impact ---------- // WinImpact is the proposal-staffing win impact (Evolution #2). type WinImpact struct { Level string `json:"level"` // "High Impact" | "Medium Impact" | "Low Impact" LevelCode string `json:"level_code"` // high | medium | low StaffingStrength string `json:"staffing_strength"` // "92.00" Reasons []string `json:"reasons"` } // Win derives the win impact + reasons. func Win(c engine.Candidate, r engine.Requirement, res engine.MatchResult) WinImpact { // A non nil empty slice so JSON encodes [] not null when nothing fires; the client maps over it. reasons := []string{} if c.Clearance.Level == engine.ClearanceTSSCI && c.Clearance.Status == engine.StatusActive { reasons = append(reasons, "Active TS/SCI") } if res.CustomerExperience.GreaterThanOrEqual(hundredVal) && r.CustomerAgency != "" { reasons = append(reasons, fmt.Sprintf("Prior %s / similar program experience", r.CustomerAgency)) } if r.KeyPersonnel && res.Band == engine.BandGreen { reasons = append(reasons, "Matches Key Personnel requirements") } if r.RequiredYears > 0 && c.YearsExperience > r.RequiredYears { reasons = append(reasons, "Exceeds required experience") } if res.Clearance.GreaterThanOrEqual(hundredVal) { reasons = append(reasons, "Meets clearance requirement") } level, code := "Low Impact", "low" switch res.Band { case engine.BandGreen: level, code = "High Impact", "high" case engine.BandYellow: level, code = "Medium Impact", "medium" } return WinImpact{Level: level, LevelCode: code, StaffingStrength: res.Total.StringFixed(2), Reasons: reasons} } // ---------- helpers ---------- // monthsBetween returns whole calendar months from a to b (>= 0). func monthsBetween(a, b time.Time) int { m := int(b.Year()-a.Year())*12 + int(b.Month()) - int(a.Month()) if b.Day() < a.Day() { m-- } if m < 0 { m = 0 } return m } func lower(s string) string { return strings.ToLower(strings.TrimSpace(s)) } func lowerSet(items []string) map[string]bool { m := make(map[string]bool, len(items)) for _, it := range items { m[lower(it)] = true } return m } func dedupe(items []string) []string { seen := make(map[string]bool, len(items)) out := make([]string, 0, len(items)) for _, it := range items { if !seen[it] { seen[it] = true out = append(out, it) } } return out }

Mathematical records from this source

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