2.1 KiB
2.1 KiB
Training Console Public Surface v1
This document defines the current public-facing Training module surface for ai-ict.
Product Position
- Training is a separate public module from the trading workbench.
- The public browser entry is
/training. - The trading workbench stays at
/. - Training assets live in
src/web/training.htmlandsrc/web/training.js.
Dashboard Entry
- available cases
- user progress
- attempt start
- annotation note save
- attempt submit
- public case fields only
API Surface
| Method | Path | Capability |
|---|---|---|
| GET | /training/cases |
list cases with status, skill tag, instrument, and limit filters |
| GET | /training/cases/{case_id} |
read one public case |
| GET | /training/cases/export |
export a public package with the same case filters |
| POST | /training/cases/import |
import a versioned public package with cases plus tasks |
| POST | /training/attempts |
start an attempt for one case |
| POST | /training/attempts/{attempt_id}/annotations |
save an annotation payload for one attempt |
| POST | /training/attempts/{attempt_id}/submit |
submit an attempt with optional score data |
| GET | /training/progress |
list progress with user, skill tag, and limit filters |
Validation And Errors
Training public error catalog:
- deterministic public validation errors
400withinvalid_json_body400withmissing_required_json_field:<field>400withinvalid_json_field:<field>400withinvalid_path_param:<field>400withinvalid_limit_query_param:limit404withnot_found500withinternal_server_error- masks raw internals
Package CLI public errors:
- one-line JSON
input_file_not_foundinput_path_is_directoryoutput_path_is_directoryoutput_path_unwritable
Package Smoke
- public package
- public export
- public output
- internal solution details are excluded from exported public JSON
- fixture path:
tests/fixtures/training_case_package_m6.json - example command:
.venv/bin/python scripts/run_training_case_package.py --input tests/fixtures/training_case_package_m6.json --output /tmp/training_case_public_export.json