- Use
ai/project_structure.mdfor task placement and naming rules. - Use
ai/task_structure.mdfor the canonical TOML schema, field semantics, and allowed type signatures. - Use
ai/task_example.tomlas the formatting and ordering reference when creating or editing tasks. - If this file conflicts with the
ai/docs, follow theai/docs.
- All tasks live under
tasks/. - There are 4 task levels:
elementary,easy,medium,hard. - Every task must have a unique
name. - Every task has a
tagsarray of strings. - The path for each task must be
tasks/<level>/<tags[0]>/<name>.toml. preview/contains the local React/Vite preview app.- Root scripts such as
test_solutions.py,check_task_names.py, andpush_tasks.pyhandle validation and publishing. release/andrelease.tar.gzare generated build artifacts; do not edit them manually.
make check-namesverifies task-name uniqueness and filename alignment.python test_solutions.py tasksvalidates all public tasks by parsing TOML, runningsolution, and checking[[asserts]].make buildruns name checks, rebuildsrelease/, and validates public tasks.make previewinstalls preview dependencies and starts the local UI.make build-and-previewbuilds first, then starts the preview app.
- Required fields:
name,description_en,description_ru,input_signature,output_signature,asserts,examples,solution,level,tags,time_to_solve_sec. - Optional fields:
limits,comment. - Keep field order aligned with
ai/task_example.toml. namemust be English andsnake_case; the filename must match it exactly.description_enanddescription_ruare Markdown strings rendered with math support; keep them concise.- Wrap mathematical notation in LaTeX using
$...$or$$...$$. limits, when present, should be a Markdown list of constraints using math notation only, without prose.examplesmust be a fenced-style assertion block as a string, sorted by line length from shortest to longest.solutionmust definesolution(...), stay concise, and avoid unnecessary imports or boilerplate.tagsmay be empty, but when non-empty the first tag determines the directory name in the task path.
input_signatureis an array of arguments, each withargument_nameand atypeobject.output_signatureis an object containing atypeobject.- Only use types allowed by
ai/task_structure.md. - Primitive names are
string,boolean,integer,float,array, andhash. - Nested container types must follow the documented
nestedstructure exactly.
- Put validation cases in
[[asserts]]. - Each assert must provide
argumentsininput_signatureorder and anexpectedvalue. - Optional assert
commentvalues should be short and in English. - Cover edge cases, extreme values, and algorithmic corner cases.
- Prefer realistic and varied test data over repetitive cases.
- Recommended coverage is about 25-30 asserts per task.
- All string data in asserts should be English.
elementary: target a 1-2 line solution.easy: target a 2-6 line solution.medium: target a 7-11 line solution.hard: target a 12+ line solution.- Set
time_to_solve_secconsistently with the project guidance documented inai/task_structure.md.
- Follow existing Python style in repository scripts: 4-space indentation and conventional import ordering.
- If formatting TOML, preserve the aligned style used in
ai/task_example.tomland repository task files. - Keep task text concise; avoid extra notes unless they materially clarify the contract.
- Use short, imperative commit messages.
- In PRs, list created or changed tasks and note the validation commands you ran.
- Include preview screenshots only for UI changes under
preview/.