Bug: Learnings file was created but disappeared after script exit because
SCRIPT_DIR was undefined in training_lib.sh context.
Fix: Use REPO_ROOT to construct path to training state directory:
- Changed from /.training_state
- To /scripts/training/.training_state
This ensures the learnings file is created in the correct location where
capture_learnings() in master_training_launcher.sh can find it.
Add learning capture and skill update mechanism to AITBC training system:
Phase 1 - Learning Capture Function:
- Add capture_learnings() function to master_training_launcher.sh
- Reads learnings JSON from stage scripts
- Validates JSON structure
- Calls hermes-tools skill-manage to update agent skills
- Stage 1 creates skill, subsequent stages update it
- Falls back to JSON-only if hermes-tools unavailable
Phase 2 - Optional Skill Update Flag:
- Add --with-skill-update CLI flag
- Set ENABLE_SKILL_UPDATE global variable
- Support flag combination with --stage and --complete
- Default behavior: save learnings JSON without skill update
Phase 3 - Integration:
- Call capture_learnings() after certificate generation
- Pass ENABLE_SKILL_UPDATE to control skill update behavior
- Integrated into run_stage() function
Phase 4 - Helper Function:
- Add output_stage_learnings() to training_lib.sh
- Accepts stage number, name, commands, pitfalls, key_paths, concepts
- Creates structured JSON learnings file
- Saves to .training_state/learnings_stageN.json
Phase 5 - Stage Script Learning Output:
- Add learning output to all stage scripts (0-9)
- Each stage defines stage-specific learnings
- Format: commands, pitfalls, key_paths, concepts
- Called at successful stage completion
This enables new agents on new AITBC nodes to automatically persist
training knowledge via the hermes-tools skill management system.
- Update workflow paths from docs/openclaw to docs/hermes
- Rename skill prefixes from openclaw-* to hermes-*
- Update agent skill references in refactoring and analysis docs
- Rename OPENCLAW_AITBC_MASTERY_PLAN.md to reflect hermes branding
- Update CLI examples and command references throughout documentation
Added comprehensive marketplace functionality to Exchange API and CLI:
- Created marketplace_offers and marketplace_orders database tables
- Implemented REST endpoints: GET/POST/DELETE for offers and orders
- Added marketplace CLI handlers with proper URL resolution and auth
- Support for creating offers, booking offers, listing orders, and cancellations
- Fixed order status values from 'OPEN'/'FILLED' to 'open'/'filled'
Fixed bash syntax error when log file is empty after truncation.
Changed '|| echo "0"' to '|| success_count=0' pattern to properly
handle grep -c returning nothing when file is empty.
Training now shows 100% success rate (17 successes, 0 failures).
Updated init_logging in training_lib.sh to truncate the log file
before each new training run using ': > '.
This prevents historical errors from accumulating in the log file,
which was causing the validation to count old failures and report
inaccurate success rates (e.g., 87% when current run was ~99%).
Now each run starts with a fresh log file containing only the current
run's output, making validation results accurate.
Reverted previous changes that incorrectly changed RPC port from 8006 to 8005.
Investigation revealed:
- Port 8005 runs AI service (uvicorn src.ai_service.main:app)
- Port 8006 runs blockchain node HTTP RPC (uvicorn aitbc_chain.app:app)
The blockchain node HTTP RPC is actually on port 8006, not 8005.
The issue is that the blockchain node on port 8006 is not responding to HTTP requests.
Next step: Debug why blockchain node on port 8006 is not responding to HTTP.
Updated training script and library to use HTTP RPC port 8005 instead of
blockchain protocol port 8006 for all NODE_URL environment variable settings.
Changes:
- stage1_foundation.sh: Updated NODE_URL from 8006 to 8005 in all commands
- training_lib.sh: Updated GENESIS_NODE and FOLLOWER_NODE to use port 8005
- training_lib.sh: Updated service endpoints to show 8005 as RPC endpoint
This fixes the wallet balance timeout errors where CLI was trying to connect
to port 8006 (blockchain protocol) instead of port 8005 (HTTP RPC API).
- Remove `|| echo "⚠️ ..."` fallbacks that masked failures
- Add explicit `exit 1` on port readiness failures and missing test directories
- Track port_ready flag in health check loops to fail if services don't start
- Replace warning emoji (⚠️) with error emoji (❌) for actual failures
- Fix docs-validation to use curated Markdown target list excluding high-noise directories
- Update rust-zk-tests paths from gpu_acceleration/research to dev
CLI Wrapper Changes:
- Converted aitbc-cli from bash wrapper script to direct symlink
- Symlink points to python3 /opt/aitbc/cli/aitbc_cli.py
- Simplified CLI invocation and removed wrapper overhead
CLI Command Enhancements:
- Added system status command with version and service info
- Added blockchain subcommands (info, height, block)
- Added wallet subcommands (backup, export, sync, balance)
- Added network subcommands (status
Removed AGENT_SYSTEMS_IMPLEMENTATION_PLAN.md from .windsurf/plans/ directory as agent systems functionality has been fully implemented and integrated into the production codebase. The plan served its purpose during development and is no longer needed for reference.