Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/missionmatch / internal/modules/matching/dto.go |
| Date | Not specified in source |
| Repository | Janady13/missionmatch |
| Revision | 1e9249840a4302ec82e123b9c9cb6f75badea3e4 |
| Branch | master |
| Path or archive member | internal/modules/matching/dto.go |
| Original SHA-256 | 00f41b114afa2886bd42010ac0218f859ab2bba59057948e5fe23cb41b7f8e87 |
| Git blob SHA | 22f2bbbb257eb18ff31f8fcc35e596623f2ed8fe |
| Reading-copy SHA-256 | 00f41b114afa2886bd42010ac0218f859ab2bba59057948e5fe23cb41b7f8e87 |
Every recorded occurrence
These 51 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/missionmatch / internal/modules/matching/dto.go | master | 1e9249840a4302ec82e123b9c9cb6f75badea3e4 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-d-missionmatch | 3be46ba89edb737182075a2b320509b42dc916f8 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | m5-price-to-win | 41000ad30fff4129fdaf5ec84e15ba14c27d4890 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-e-dataflow-deploy | 433815a042f9741411e60fa553fe72143e9b10db | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | w3-ai-staffing-recommendations | 43d56387270ef4da4cabd794d97ca6a49909bc7d | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws3-clearance | 4b8e7ce594c068621867f9c9deed0ec64ae6c553 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | collision-deconfliction | 4ee5a09972608ed89f8377c6665542d5f450f0a6 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-c-slatematch | 5cd60c918301b46ecd6ed3e03e20c395da0062e2 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ai-intelligence-layer | 5d5ddff70393a197c5f54a45280bb5dd42b24755 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws7-federal-signal | 6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws6-retrieval | 6c56e29231ec05735927fa265c97d517499dfeaf | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | per-tenant-routing | 9bde0f9a74b89d01980fa658e5253acda7528d0c | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ai-brain-live | aac32fc49c878cc5bca099459307611562d0bac1 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | graphrag-foundation | b0ddeb9f633fd138d09309d1a17b7d13bc3a67f7 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws1-ontology-sync | b596f449a32a1016fbd403c36505cc00a1ac9ee6 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | time-to-fill-survival | b66e1e505863d4f17741a4b9ede73509e45bd6c6 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | mag-substrate | b82c7100a492dec67dfd1eda6b3f53def859be35 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | capture-readiness | bae6af7cb2997e819174a9e9cfff5e16067a1975 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | deploy-and-ops | bdacd9d0b4d5998d25fc74bf4007f4c3ec538c7a | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws8-teaching-loop | c823f0fb6bb2aba0f39001eb6de96f4000d9321f | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | phase2-eval-fairness | d361af254701975fe239927656ababb56374655e | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | phase2-connectors | e038d4c687aec16f8bd9bc4d907eea14d91f8704 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws2-alias-relationship | e4dada4601c6eb101830f9d223a9655dfa120616 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | presentation-readiness | eb574acaa29d71ce4d0f852572e87c275c79fdb7 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws9-bench-ingestion | f585a9ef32fa554663ce1fba9a414a54b6e49cf0 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | vendor-intelligence | fe9796a19c261951d3f2565206c0c1b5ac294465 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | per-tenant-routing | 9bde0f9a74b89d01980fa658e5253acda7528d0c | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | collision-deconfliction | 4ee5a09972608ed89f8377c6665542d5f450f0a6 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws6-retrieval | 6c56e29231ec05735927fa265c97d517499dfeaf | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | m5-price-to-win | 41000ad30fff4129fdaf5ec84e15ba14c27d4890 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-c-slatematch | 5cd60c918301b46ecd6ed3e03e20c395da0062e2 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws1-ontology-sync | b596f449a32a1016fbd403c36505cc00a1ac9ee6 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | master | 1e9249840a4302ec82e123b9c9cb6f75badea3e4 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws8-teaching-loop | c823f0fb6bb2aba0f39001eb6de96f4000d9321f | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | w3-ai-staffing-recommendations | 43d56387270ef4da4cabd794d97ca6a49909bc7d | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | mag-substrate | b82c7100a492dec67dfd1eda6b3f53def859be35 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws3-clearance | 4b8e7ce594c068621867f9c9deed0ec64ae6c553 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | phase2-eval-fairness | d361af254701975fe239927656ababb56374655e | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-e-dataflow-deploy | 433815a042f9741411e60fa553fe72143e9b10db | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | time-to-fill-survival | b66e1e505863d4f17741a4b9ede73509e45bd6c6 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ai-intelligence-layer | 5d5ddff70393a197c5f54a45280bb5dd42b24755 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | graphrag-foundation | b0ddeb9f633fd138d09309d1a17b7d13bc3a67f7 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | deploy-and-ops | bdacd9d0b4d5998d25fc74bf4007f4c3ec538c7a | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws9-bench-ingestion | f585a9ef32fa554663ce1fba9a414a54b6e49cf0 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws2-alias-relationship | e4dada4601c6eb101830f9d223a9655dfa120616 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | presentation-readiness | eb574acaa29d71ce4d0f852572e87c275c79fdb7 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ws7-federal-signal | 6a9f6ce9cfb13345ffb47770d4960e7c2d9c17c2 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ai-brain-live | aac32fc49c878cc5bca099459307611562d0bac1 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-d-missionmatch | 3be46ba89edb737182075a2b320509b42dc916f8 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | phase2-connectors | e038d4c687aec16f8bd9bc4d907eea14d91f8704 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | capture-readiness | bae6af7cb2997e819174a9e9cfff5e16067a1975 | Open original |
Recovered source transcript
Download complete source text ↓263 lines · 10.8 KB
package matching
import (
"time"
"github.com/google/uuid"
"github.com/missionworkforce/missionmatch/internal/modules/matching/engine"
"github.com/missionworkforce/missionmatch/internal/modules/matching/intelligence"
"github.com/missionworkforce/missionmatch/internal/platform/database/dbgen"
)
// ScreenView is the full screenMATCH™ intelligence output for POST /api/screen: the explainable
// match plus the derived Mission Readiness panels (User Guide + the "Defining" brief).
type ScreenView struct {
Match MatchResultView `json:"match"`
MissionReadiness intelligence.MissionReadiness `json:"mission_readiness"`
BattleCard intelligence.BattleCard `json:"battle_card"`
ClearanceIntel intelligence.ClearanceIntel `json:"clearance_intelligence"`
ContractReadiness intelligence.ContractReadiness `json:"contract_readiness"`
WinImpact intelligence.WinImpact `json:"win_impact"`
NextSteps []intelligence.NextStep `json:"next_steps"`
}
// RankedCandidateView is one row of the Candidate Screening Queue (Screen 1): a candidate scored
// against a requirement, with the operational Mission Readiness status. Read-only (no slate persisted).
type RankedCandidateView struct {
CandidateID uuid.UUID `json:"candidate_id"`
FullName string `json:"full_name"`
ClearanceLevel string `json:"clearance_level"`
ClearanceStatus string `json:"clearance_status"`
YearsExperience int32 `json:"years_experience"`
Location string `json:"location,omitempty"`
Available bool `json:"available"`
Score string `json:"score"`
Band string `json:"band"`
Status string `json:"status"`
}
func rankedCandidateView(c dbgen.Candidate, res engine.MatchResult) RankedCandidateView {
return RankedCandidateView{
CandidateID: c.ID, FullName: c.FullName,
ClearanceLevel: c.ClearanceLevel, ClearanceStatus: c.ClearanceStatus,
YearsExperience: c.YearsExperience, Location: deref(c.Location), Available: c.Available,
Score: res.Total.StringFixed(2), Band: res.Band.Code(), Status: intelligence.MissionStatusLabel(res.Band),
}
}
// OpportunityFitView is one ranked "best opportunity for this person" (Opportunity Fit Engine™).
type OpportunityFitView struct {
RequirementID uuid.UUID `json:"requirement_id"`
Title string `json:"title"`
CustomerAgency string `json:"customer_agency,omitempty"`
Score string `json:"score"`
Band string `json:"band"`
Status string `json:"status"` // operational status, e.g. "Mission Ready"
}
func assembleScreenView(c engine.Candidate, r engine.Requirement, res engine.MatchResult, facts intelligence.ClearanceFacts, asOf time.Time) ScreenView {
return ScreenView{
Match: matchResultView(res),
MissionReadiness: intelligence.Readiness(res),
BattleCard: intelligence.BattleCardFor(c, r, res),
ClearanceIntel: intelligence.Clearance(facts, asOf),
ContractReadiness: intelligence.Contract(c, r, res, facts, asOf),
WinImpact: intelligence.Win(c, r, res),
NextSteps: intelligence.NextSteps(res),
}
}
// GenerateSlateInput is the validated input to slate generation.
type GenerateSlateInput struct {
RequirementID uuid.UUID
Name string
CreatedBy *uuid.UUID
MaxCandidates int32
}
// ComponentView is one row of the decision trace, JSON-friendly (decimals as fixed strings).
type ComponentView struct {
Component string `json:"component"`
Weight string `json:"weight"`
Raw string `json:"raw"`
Weighted string `json:"weighted"`
Rationale string `json:"rationale"`
}
// MatchedSkillView is one required->candidate skill resolution.
type MatchedSkillView struct {
RequiredSkill string `json:"required_skill"`
CandidateSkill string `json:"candidate_skill,omitempty"`
Similarity string `json:"similarity"`
Exact bool `json:"exact"`
Matched bool `json:"matched"`
}
// MatchResultView is the full, explainable result for POST /match (screenMATCH).
type MatchResultView struct {
CandidateID string `json:"candidate_id"`
RequirementID string `json:"requirement_id"`
Total string `json:"total_score"`
Band string `json:"band"`
BandLabel string `json:"band_label"`
Components map[string]string `json:"components"`
Explanation string `json:"explanation"`
GapSummary []string `json:"gap_summary"`
MatchedSkills []MatchedSkillView `json:"matched_skills"`
Trace []ComponentView `json:"trace"`
}
// SlateMemberView is one ranked member of a generated slate.
type SlateMemberView struct {
CandidateID string `json:"candidate_id"`
Rank int `json:"rank"`
Total string `json:"total_score"`
Band string `json:"band"`
BandLabel string `json:"band_label"`
Explanation string `json:"explanation"`
GapSummary []string `json:"gap_summary"`
}
// SlateResult is the output of POST /slates/generate (slateMATCH).
type SlateResult struct {
SlateID uuid.UUID `json:"slate_id"`
RequirementID uuid.UUID `json:"requirement_id"`
Name string `json:"name"`
Members []SlateMemberView `json:"members"`
}
// SlateSummaryView is one row of the slate list for a requirement (slateMATCH list).
type SlateSummaryView struct {
SlateID string `json:"slate_id"`
Name string `json:"name"`
Status string `json:"status"`
MemberCount int `json:"member_count"`
CreatedAt string `json:"created_at"`
}
// SlateMemberDetailView is one member on the slate detail: the frozen score and band read from the
// persisted slate (never recomputed), the human decision, the reviewer note, and the candidate name.
type SlateMemberDetailView struct {
CandidateID string `json:"candidate_id"`
FullName string `json:"full_name"`
Rank int `json:"rank"`
Total string `json:"total_score"`
Band string `json:"band"`
BandLabel string `json:"band_label"`
Components map[string]string `json:"components"`
Explanation string `json:"explanation"`
GapSummary []string `json:"gap_summary"`
Decision string `json:"decision"`
DecisionNote string `json:"decision_note"`
}
// SlateDetailView is a slate with its ranked members and the proposal readiness rollup, all read from
// the stored slate.
type SlateDetailView struct {
SlateID string `json:"slate_id"`
RequirementID string `json:"requirement_id"`
RequirementTitle string `json:"requirement_title"`
Name string `json:"name"`
Status string `json:"status"`
Members []SlateMemberDetailView `json:"members"`
Readiness ProposalReadinessView `json:"readiness"`
}
// ProposalReadinessView is the rollup of a slate's persisted members and their human decisions
// (GET /proposal-readiness). It is computed from the stored slate, never by rescoring candidates, so
// it always agrees with the frozen member scores.
type ProposalReadinessView struct {
SlateID string `json:"slate_id"`
RequirementID string `json:"requirement_id"`
TotalMembers int `json:"total_members"`
Approved int `json:"approved"`
Rejected int `json:"rejected"`
Pending int `json:"pending"`
ProposalReady int `json:"proposal_ready"` // members in the Green band
Potential int `json:"potential"` // members in the Yellow band
Recruiting int `json:"recruiting"` // members in the Red band
ApprovedReady int `json:"approved_ready"` // approved AND Green
ReadinessPct string `json:"readiness_pct"` // approved divided by total, as a percent (decimal)
Status string `json:"status"` // overall label
}
// CandidateListView / RequirementListView are minimal list projections (no embeddings/tsv).
type CandidateListView struct {
ID uuid.UUID `json:"id"`
FullName string `json:"full_name"`
ClearanceLevel string `json:"clearance_level"`
ClearanceStatus string `json:"clearance_status"`
YearsExperience int32 `json:"years_experience"`
Location string `json:"location,omitempty"`
Available bool `json:"available"`
}
type RequirementListView struct {
ID uuid.UUID `json:"id"`
Title string `json:"title"`
RequiredLevel string `json:"required_level"`
CustomerAgency string `json:"customer_agency,omitempty"`
KeyPersonnel bool `json:"key_personnel"`
}
func matchResultView(res engine.MatchResult) MatchResultView {
trace := make([]ComponentView, len(res.Trace))
for i, c := range res.Trace {
trace[i] = ComponentView{
Component: c.Component, Weight: c.Weight.String(),
Raw: c.Raw.StringFixed(2), Weighted: c.Weighted.StringFixed(4), Rationale: c.Rationale,
}
}
ms := make([]MatchedSkillView, len(res.MatchedSkills))
for i, m := range res.MatchedSkills {
ms[i] = MatchedSkillView{
RequiredSkill: m.RequiredSkillName, CandidateSkill: m.CandidateName,
Similarity: m.Similarity.StringFixed(4), Exact: m.Exact, Matched: m.Matched,
}
}
return MatchResultView{
CandidateID: res.CandidateID, RequirementID: res.RequirementID,
Total: res.Total.StringFixed(2), Band: res.Band.Code(), BandLabel: res.Band.Label(),
Components: map[string]string{
"clearance": res.Clearance.StringFixed(2),
"skills": res.Skills.StringFixed(2),
"certifications": res.Certifications.StringFixed(2),
"customer_experience": res.CustomerExperience.StringFixed(2),
"experience": res.Experience.StringFixed(2),
"location_availability": res.Location.StringFixed(2),
},
Explanation: res.Explanation, GapSummary: nonNilStrings(res.GapSummary),
MatchedSkills: ms, Trace: trace,
}
}
func slateMemberView(candidateID string, rank int, res engine.MatchResult) SlateMemberView {
return SlateMemberView{
CandidateID: candidateID, Rank: rank,
Total: res.Total.StringFixed(2), Band: res.Band.Code(), BandLabel: res.Band.Label(),
Explanation: res.Explanation, GapSummary: nonNilStrings(res.GapSummary),
}
}
func candidateListView(c dbgen.Candidate) CandidateListView {
return CandidateListView{
ID: c.ID, FullName: c.FullName, ClearanceLevel: c.ClearanceLevel, ClearanceStatus: c.ClearanceStatus,
YearsExperience: c.YearsExperience, Location: deref(c.Location), Available: c.Available,
}
}
func requirementListView(r dbgen.Requirement) RequirementListView {
return RequirementListView{
ID: r.ID, Title: r.Title, RequiredLevel: r.RequiredLevel,
CustomerAgency: deref(r.CustomerAgency), KeyPersonnel: r.KeyPersonnel,
}
}
func nonNilStrings(s []string) []string {
if s == nil {
return []string{}
}
return s
}