A wrapper for sinol-make with tools for generating packages with AI.
Project description
sinol-make-ai-tools 🤖
sinol-make-ai-tools is a wrapper for sinol-make designed to accelerate the package building process, primarily for the organizers of WWI 2025.
Disclaimer: Future support and functionality are not guaranteed, especially if sinol-make or the template package undergoes changes.
⚙️ Installation
-
Install
sinol-make. For detailed instructions, please refer to their repository: https://github.com/sio2project/sinol-make/tree/main -
Install
sinol-make-ai-toolsusingpipx:pipx install sinol-make-ai-tools
🚀 Usage
sinol-make-ai-tools comes with a convenient alias: smat.
Available Commands
-
smat init [id]- This command calls
sinol-make init [id] -t https://git.staszic.waw.pl/top/template/default. - It also creates the following additional folders and files in the root package directory:
in/out/description.txt(see Workflow section)ai_file_blacklist.txt(see Workflow section)
- This command calls
-
smat prompt- Generates a prompt for a Large Language Model (LLM) of your choice based on the content of
description.txt.
- Generates a prompt for a Large Language Model (LLM) of your choice based on the content of
-
smat unserialize- Accepts LLM output via standard input (copy-paste) and modifies the selected files accordingly.
-
smat clear- Clears the
in/andout/directories. This was created to resolve issues withsinol-makeoverwriting previously generated tests.
- Clears the
📝 Workflow
First and foremost, read the sinol-make documentation:
https://github.com/sio2project/sinol-make/tree/main
Seriously, this is worth your time.
Step-by-Step Guide
Let's say you want to build a package for a simple problem named "Calculate Absolute Value".
After reading the SIO2 discord packaging channels, the sinol-make documentation, and installing smat, run:
smat init abs
This creates a standard package with the ID abs and the following directory structure:
.
├── ai_file_blacklist.txt
├── config.yml
├── description.txt
├── doc
│ ├── abszad.tex
│ ├── licencja.pdf
│ ├── logo.pdf
│ └── spiral.cls
├── in
├── out
├── prog
│ ├── abs2.cpp
│ ├── absb1.cpp
│ ├── abschk.cpp
│ ├── abs.cpp
│ ├── absingen.cpp
│ ├── absinwer.cpp
│ ├── abss1.cpp
│ └── oi.h
└── README.md
Manual Adjustments (Recommended):
- You may want to remove or modify
abs2.cpp,absb1.cpp, andabschk.cpp. The current prompts generated bysmatdo not account for these files and their correspondingsinol-makefeatures. - Consider removing
abss1.cppandabss2.cpp. The LLM determines the number of subtasks and brute-force solutions, and if it doesn't generate these specific files, the default content (from the "Sumżyce" problem) will remain.
Configuring description.txt and ai_file_blacklist.txt:
- By default,
description.txtcontains only the package ID:Kod zadania: abs. ai_file_blacklist.txtlists files to be ignored by the AI:doc/spiral.cls prog/oi.h- Append the problem statement to
description.txt. Using Polish is recommended to avoid translation issues by the LLM. You can copy this from an existing problem PDF, ensuring the "Input" and "Output" sections are well-formatted.
Generating the Prompt:
- Save
description.txtand, from the root package directory, run:smat prompt - This creates
prompt.txt. Copy its content and paste it into your preferred LLM. You can modify the prompt before sending it. For example, to add a hint:... Kod zadania: abs. Oblicz wartość bezwględną x. How would you solve this problem? Don't generate any code yet, just describe your solution. Hint: use abs from stl.
Interacting with the LLM:
- I recommend using google ai pro, because the first month is free, and that's probably all you actually need. Then you will have gemini 2.5 pro, which is great at package generation. If you're a student, you can presumably get the subscription for free for longer.
- The default instruction is for the LLM to design algorithms first, without generating code.
- After reviewing its proposed algorithm, ask:
What tests will you include in the ingen file?
- Review the test cases and suggest changes if needed. Then, prompt it with:
Now generate all package files.
Unserializing the Output:
- The LLM should produce a single fenced code block containing all the serialized package files. Copy the contents of this block.
smatcan handle extra text and backticks that might be copied from the AI's web interface. - In your terminal, from the root package directory, run:
smat unserialize - You'll be prompted for the LLM output. Paste the copied content, press Enter, and then Ctrl+D (for EOF). This will create or modify the package files.
✅ Best Practices and Tips
Please follow these steps to avoid problems:
- Write a solution yourself. Write a solution for at least one subtask. This is a reasonable standard of quality control.
- Run
sinol-makechecks. Usesinol-make gen,sinol-make run,sinol-make doc, andsinol-make inwerto verify that the generated code works as expected. - Review the generated files. Take a close look at the
ingen,inwer, problem statement PDF, solution PDF,config.yml, etc. - Get a peer review. Have someone else verify the package. You are not the verifier.
Quick Tips
- Blacklisting Files: To prevent
smat unserializefrom overwriting a file you've modified, add its relative path toai_file_blacklist.txt. - Informing the LLM about Changes: If you change a file but still want the LLM to be able to modify it, you can inform it by saying:
FYI, I changed file xyz, here is the new content: ... - Early Correction: It's more effective to correct the LLM's ideas before it generates code. This prevents it from building upon a flawed foundation.
- Use
smat clearbefore runningsinol-make gen: That way you won't have any old, broken tests lingering in your package. - Change a parameter: You can quickly change any parameter, such as the problem name or a time limit in a subtask by prompting the LLM: Change value x to y. Rewrite all package files.
- Fix bugs: If you get an error when compiling generated code with
sinol-make, usually you can copy the error along with relevant context (line number etc.), paste it into the LLM and ask for the file to be rewritten (works 80% of the time).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sinol_make_ai_tools-0.2.0.tar.gz.
File metadata
- Download URL: sinol_make_ai_tools-0.2.0.tar.gz
- Upload date:
- Size: 53.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37845bc9033dd0c48f7bb73c956de207767a3773bb1e481bc82f910f4b9af764
|
|
| MD5 |
0fda6bde117e8d7cf33cd1a753e93547
|
|
| BLAKE2b-256 |
3808e809ec30205a098cda3d004113a0c2e748cdc43e0173f335f1e71922fab2
|
File details
Details for the file sinol_make_ai_tools-0.2.0-py3-none-any.whl.
File metadata
- Download URL: sinol_make_ai_tools-0.2.0-py3-none-any.whl
- Upload date:
- Size: 52.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac575d90bd1bac417d18730f5c80ebccebbbe71e5c376ccf17345e8383cf83b5
|
|
| MD5 |
a504804e0aaa006571259b18cae0109a
|
|
| BLAKE2b-256 |
25195594e75a31f1ffc9d22033dc6a4ff4c8dd4ee899ebe47ee1a804736f802b
|