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 | 09015496d565a172bcaa15cfe9a8e4b072b13df0 |
| Branch | workstream-b-screenmatch |
| Path or archive member | internal/modules/matching/dto.go |
| Original SHA-256 | 1d9ba4e8aeeda8a822e2633d4f4ae1ff4a2e1b75e9366401926fd1f86697b6d3 |
| Git blob SHA | c0cccef29d87ddb4b00c68ee0959f9443e76a008 |
| Reading-copy SHA-256 | 1d9ba4e8aeeda8a822e2633d4f4ae1ff4a2e1b75e9366401926fd1f86697b6d3 |
Every recorded occurrence
These 15 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 | workstream-b-screenmatch | 09015496d565a172bcaa15cfe9a8e4b072b13df0 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-a-opportunity-intelligence | 1675031db74316e100782d063e9eda1a597fe3a1 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-d-command-center | 255e7d1d420abf5e277d0cd8c9b14f6f72b6acb9 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | w0-aedt-compliance | 39df94f92b2a33f852481fe1954dabed841524bb | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-e-commercial-stubs | 4437da660539284a400ee380b9b427a300c369ee | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ruthless-debug-sweep | b7d742f8f032984be3817efffa3eb8b13b651c1f | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-b-sam-contract-awards | d5101cceb98e70000cebb31d3e7ac73d747d3a6d | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-a-shared-core | e0de03ac3a1ec826bd15d0e048e3b02baa23eeff | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-d-command-center | 255e7d1d420abf5e277d0cd8c9b14f6f72b6acb9 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | ruthless-debug-sweep | b7d742f8f032984be3817efffa3eb8b13b651c1f | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-a-opportunity-intelligence | 1675031db74316e100782d063e9eda1a597fe3a1 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-b-screenmatch | 09015496d565a172bcaa15cfe9a8e4b072b13df0 | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-e-commercial-stubs | 4437da660539284a400ee380b9b427a300c369ee | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | workstream-b-sam-contract-awards | d5101cceb98e70000cebb31d3e7ac73d747d3a6d | Open original |
| Janady13/missionmatch / internal/modules/matching/dto.go | w0-aedt-compliance | 39df94f92b2a33f852481fe1954dabed841524bb | Open original |
Recovered source transcript
Download complete source text ↓208 lines · 8.2 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"`
}
// 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
}