Algorithm 1 MAS4SysML Process Require: Natural language modeling intent In Ensure: Final SysML v2 model code Cf Phase-I: Task Analysis 1: task_card_set←TaskStructureGenerationAgent(In) Phase-II: Iterative Code Generation 2: prev_code←Ø 3: for task_card in ordered(task_card_set) do 4:  generated_code←CodeGenerationAgent(task_card, context=prev_code) 5:  validation_result←SyntaxValidationModule(generated_code) 6:  if validation_result == "pass" then 7:   prev_code←generated_code 8:  else 9:   k←0 10:   while k < Kmax and validation_result == "fail" do 11:    repaired_code←CodeRepairAgent(generated_code, validation_result) 12:    validation_result←SyntaxValidationModule(repaired_code) 13:    k←k + 1 14:   end while 15:   if validation_result == "pass" then 16:    prev_code←repaired_code 17:   else 18:    record_failure(task_card) 19:    prev_code←repaired_code 20:   end if 21:  end if 22: end for Phase-III: Semantic Validation 23: semantic_result←SemanticValidationAgent(prev_code, task_card_set) 24: if semantic_result == "pass" then 25:  Cf←prev_code 26: else 27:  deviation_report←GenerateSemanticReport(prev_code, task_card_set) 28:  revised_code←CodeRepairAgent(prev_code, deviation_report) 29:  Cf←revised_code 30: end if 31: return Cf