Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/gov_codes/afsc/enlisted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,18 @@
:name: Religious affairs
:subcategories:
:0X1: Religious affairs
:6C:
:name: Contracting
:subcategories:
:0X1: Contracting
:6F:
:name: Financial management
:subcategories:
:0X1: Financial management and comptroller
:7S:
:name: Special investigations
:subcategories:
:0X1: Special investigations
# Note: 8X (Special Duty Identifiers) and 9X (Reporting Identifiers) series
# are in ri.yml as they follow a different code structure (digit + letter + 3 digits)
# Use GovCodes::AFSC::RI.find() for codes like 8A400, 9Z200, etc.
11 changes: 10 additions & 1 deletion lib/gov_codes/afsc/ri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@
# Wikipedia Revision: 1318430021
# Extracted: 2025-11-17
#
# IMPORTANT: This file contains ONLY codes explicitly listed on Wikipedia.
# Additional codes from official DAFECD (Department of the Air Force Enlisted
# Classification Directory) verified against static.e-publishing.af.mil
#
# IMPORTANT: This file contains ONLY codes from verified official sources.
# No predictions, no assumptions, no hallucinations.
# See .agent-os/product/decisions.md (DEC-003) for anti-hallucination policy.
#
# Format: Career field (digit + letter) + identifier (3 digits) + optional suffix
# Examples: 8A400, 9Z200, 8G000B, 8R300A

:5Z:
:name: Chief enlisted manager
:subcategories:
:700: First sergeant
:800: Command chief master sergeant
:900: Senior enlisted manager
:8A:
:name: Enlisted aide and protocol
:subcategories:
Expand Down
41 changes: 41 additions & 0 deletions test/gov_codes/afsc_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,46 @@ def test_search_is_case_insensitive

assert_equal results_upper.map(&:name), results_lower.map(&:name)
end

def test_find_contracting_afsc
code = AFSC.find("6C0X1")

assert_instance_of GovCodes::AFSC::Enlisted::Code, code
assert_equal :"6C", code.career_field
assert_equal "Contracting", code.name
end

def test_find_financial_management_afsc
code = AFSC.find("6F0X1")

assert_instance_of GovCodes::AFSC::Enlisted::Code, code
assert_equal :"6F", code.career_field
assert_equal "Financial management and comptroller", code.name
end

def test_find_special_investigations_afsc
code = AFSC.find("7S0X1")

assert_instance_of GovCodes::AFSC::Enlisted::Code, code
assert_equal :"7S", code.career_field
assert_equal "Special investigations", code.name
end

def test_find_chief_enlisted_manager_codes
# First sergeant (E-7)
code = AFSC.find("5Z700")
assert_instance_of GovCodes::AFSC::RI::Code, code
assert_equal "First sergeant", code.name

# Command chief master sergeant (E-8)
code = AFSC.find("5Z800")
assert_instance_of GovCodes::AFSC::RI::Code, code
assert_equal "Command chief master sergeant", code.name

# Senior enlisted manager (E-9)
code = AFSC.find("5Z900")
assert_instance_of GovCodes::AFSC::RI::Code, code
assert_equal "Senior enlisted manager", code.name
end
end
end