ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/missionmatch / internal/platform/missionclass/missionclass.go

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/missionmatch / internal/platform/missionclass/missionclass.go
DateNot specified in source
RepositoryJanady13/missionmatch
Revision720d47fae476b0d38477ae4401697d372b1ea2bc
Branchfeature/opportunity-to-outcome
Path or archive memberinternal/platform/missionclass/missionclass.go
Original SHA-2560d4708ffcb79cfe99d254354af377020f8e339bf927486aa52ac72681f95c18b
Git blob SHAba519d2208e3a8d64ce9acfeb0df9813535b1d24
Reading-copy SHA-2560d4708ffcb79cfe99d254354af377020f8e339bf927486aa52ac72681f95c18b

Original source ↗

Every recorded occurrence

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

Original recordBranch or archiveRevision / identifierOriginal location
Janady13/missionmatch / internal/platform/missionclass/missionclass.gofeature/opportunity-to-outcome720d47fae476b0d38477ae4401697d372b1ea2bcOpen original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gocollision-deconfliction4ee5a09972608ed89f8377c6665542d5f450f0a6Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gom5-price-to-win41000ad30fff4129fdaf5ec84e15ba14c27d4890Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gomaster1e9249840a4302ec82e123b9c9cb6f75badea3e4Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gows8-teaching-loopc823f0fb6bb2aba0f39001eb6de96f4000d9321fOpen original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gomag-substrateb82c7100a492dec67dfd1eda6b3f53def859be35Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gotime-to-fill-survivalb66e1e505863d4f17741a4b9ede73509e45bd6c6Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gographrag-foundationb0ddeb9f633fd138d09309d1a17b7d13bc3a67f7Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gows9-bench-ingestionf585a9ef32fa554663ce1fba9a414a54b6e49cf0Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gopresentation-readinesseb574acaa29d71ce4d0f852572e87c275c79fdb7Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.govendor-intelligencefe9796a19c261951d3f2565206c0c1b5ac294465Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gows7-federal-signal6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gophase2-connectorse038d4c687aec16f8bd9bc4d907eea14d91f8704Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gofeature/aioe-upgrade2178e7298d0e5d9af83afa12402fd587f0ba6ed8Open original
Janady13/missionmatch / internal/platform/missionclass/missionclass.gocapture-readinessbae6af7cb2997e819174a9e9cfff5e16067a1975Open original

Recovered source transcript

// Package missionclass is the pure deterministic mission and labor classifier. It tags federal record // text with structured mission areas (the missionclass.Codes vocabulary) using a keyword gazetteer, the // WS2 alias layer, and a curated PSC and NAICS crosswalk, each inference carrying the mechanism and the // evidence phrase so every tag is traceable. The package is pure: no clock, no randomness, no network, // and no DB, so its output is byte stable for fixed input. Mission tags are NEVER a scoring input and // never reference the eeo schema. package missionclass import ( "regexp" "sort" "strings" ) // Mechanism records HOW a mission was inferred, so every tag is traceable (the WS7 acceptance criterion). const ( MechKeyword = "keyword" MechAlias = "alias" MechPSC = "psc" MechNAICS = "naics" ) // Hit is one mission inference with its provenance. type Hit struct { Code string Mechanism string Evidence string // the matched phrase or code } type form struct { code string re *regexp.Regexp text string // canonical evidence phrase for this form } // wbForm compiles a case insensitive, word boundary anchored matcher for a phrase. Any single space in a // multi word phrase becomes \s+, so a line break or a double space between tokens still matches. The // phrase is regex quoted, so a literal containing a metacharacter is matched safely. func wbForm(code, phrase string) form { return form{code: code, text: phrase, re: regexp.MustCompile(`(?i)\b` + strings.ReplaceAll(regexp.QuoteMeta(phrase), " ", `\s+`) + `\b`)} } // missionForms is iterated in Codes order. Keep in sync with ai/mission.go missionVocabulary. var missionForms = []form{ wbForm("SIGINT", "sigint"), wbForm("SIGINT", "signals intelligence"), wbForm("GEOINT", "geoint"), wbForm("GEOINT", "geospatial intelligence"), wbForm("HUMINT", "humint"), wbForm("HUMINT", "human intelligence"), wbForm("MASINT", "masint"), wbForm("MASINT", "measurement and signature intelligence"), wbForm("OSINT", "osint"), wbForm("OSINT", "open source intelligence"), wbForm("SAT_C2", "satellite c2"), wbForm("SAT_C2", "satellite command and control"), wbForm("CDS", "cross domain solution"), wbForm("CDS", "cross domain solutions"), wbForm("COMSEC", "comsec"), wbForm("COMSEC", "communications security"), wbForm("TEMPEST", "tempest"), wbForm("EW", "electronic warfare"), } // ClassifyKeyword returns one Hit per mission code whose keyword form appears in text, in Codes order. func ClassifyKeyword(text string) []Hit { if strings.TrimSpace(text) == "" { return nil } found := map[string]Hit{} for _, f := range missionForms { if _, ok := found[f.code]; ok { continue } if f.re.MatchString(text) { found[f.code] = Hit{Code: f.code, Mechanism: MechKeyword, Evidence: f.text} } } return ordered(found) } // AliasIndex maps a lowercased mission bearing phrase to a mission code. It is built from the curated WS2 // alias rows and the category 'mission_area' skills, so the alias layer (not a cosine threshold) carries // acronym and synonym knowledge. Phrases are matched on a word boundary, whitespace tolerant. type AliasIndex struct { forms []form } // NewAliasIndex builds an AliasIndex from a phrase to code map. The forms are appended in sorted key // order so the build is deterministic and the resulting index iterates the same way every run. func NewAliasIndex(phraseToCode map[string]string) AliasIndex { keys := make([]string, 0, len(phraseToCode)) for k := range phraseToCode { keys = append(keys, k) } sort.Strings(keys) // deterministic build order ai := AliasIndex{} for _, k := range keys { ai.forms = append(ai.forms, wbForm(phraseToCode[k], k)) } return ai } // ClassifyAlias returns one Hit per mission code whose alias phrase appears in text, in Codes order. func ClassifyAlias(text string, idx AliasIndex) []Hit { if strings.TrimSpace(text) == "" { return nil } found := map[string]Hit{} for _, f := range idx.forms { if _, ok := found[f.code]; ok { continue } if f.re.MatchString(text) { found[f.code] = Hit{Code: f.code, Mechanism: MechAlias, Evidence: f.text} } } return ordered(found) } // ordered returns the hits sorted by the canonical Codes order, for byte stable output. func ordered(m map[string]Hit) []Hit { rank := map[string]int{} for i, c := range Codes { rank[c] = i } out := make([]Hit, 0, len(m)) for _, h := range m { out = append(out, h) } sort.Slice(out, func(i, j int) bool { return rank[out[i].Code] < rank[out[j].Code] }) return out }

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