From 9ba19c8cd4a2cfbe2a66d86601cf32737d655f6e Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Thu, 7 May 2026 17:00:52 +0200 Subject: [PATCH] Fix Stage 8-9 scripts: paths and Python command syntax - Fix REPO_ROOT path in stage8 and stage9 scripts - Remove --json flag from Python command (use positional arg) - Stages 8-9 now run successfully with --with-skill-update - All 9 stages now generate learnings files correctly --- scripts/training/stage8_advanced_agent_specialization.sh | 5 +++-- scripts/training/stage9_multi_chain_architecture.sh | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/training/stage8_advanced_agent_specialization.sh b/scripts/training/stage8_advanced_agent_specialization.sh index 63a70ca2..2a76cd36 100755 --- a/scripts/training/stage8_advanced_agent_specialization.sh +++ b/scripts/training/stage8_advanced_agent_specialization.sh @@ -29,7 +29,8 @@ echo # Execute stage from JSON definition execute_stage_from_json() { local stage_num=8 - local json_file="$SCRIPT_DIR/../docs/agent-training/stage${stage_num}_advanced_agent_specialization.json" + local repo_root="${REPO_ROOT:-/opt/aitbc}" + local json_file="$repo_root/docs/agent-training/stage${stage_num}_advanced_agent_specialization.json" print_status "Executing stage from JSON definition: $json_file" @@ -40,7 +41,7 @@ execute_stage_from_json() { # Use Python training setup to execute stage cd "$AITBC_DIR" - if python3 -m aitbc.training_setup.cli run-stage --json "$json_file" 2>&1 | tee -a "$CURRENT_LOG"; then + if python3 -m aitbc.training_setup.cli run-stage "$json_file" 2>&1 | tee -a "$CURRENT_LOG"; then print_success "Stage $stage_num executed successfully" return 0 else diff --git a/scripts/training/stage9_multi_chain_architecture.sh b/scripts/training/stage9_multi_chain_architecture.sh index 64f23c9b..88fa340b 100755 --- a/scripts/training/stage9_multi_chain_architecture.sh +++ b/scripts/training/stage9_multi_chain_architecture.sh @@ -29,7 +29,8 @@ echo # Execute stage from JSON definition execute_stage_from_json() { local stage_num=9 - local json_file="$SCRIPT_DIR/../docs/agent-training/stage${stage_num}_multi_chain_architecture.json" + local repo_root="${REPO_ROOT:-/opt/aitbc}" + local json_file="$repo_root/docs/agent-training/stage${stage_num}_multi_chain_architecture.json" print_status "Executing stage from JSON definition: $json_file" @@ -40,7 +41,7 @@ execute_stage_from_json() { # Use Python training setup to execute stage cd "$AITBC_DIR" - if python3 -m aitbc.training_setup.cli run-stage --json "$json_file" 2>&1 | tee -a "$CURRENT_LOG"; then + if python3 -m aitbc.training_setup.cli run-stage "$json_file" 2>&1 | tee -a "$CURRENT_LOG"; then print_success "Stage $stage_num executed successfully" return 0 else