Scaffold a new AI Devs task solution. Creates the task directory, entry file, and __init__.py following project conventions. Use this skill when asked to create a new task, scaffold a solution, or start a new AI Devs exercise.
Scaffold a new task solution in the ai-devs-4 Python project.
Extract the season/episode from the user's request (e.g. s01e03, s02e01). The format is always s##e##.
Before creating, check if tasks/{task_id}/ already exists. If it does, ask the user before overwriting.
Check ai-dev-lessons/4/ for a matching lesson file. Read it to understand the task requirements. This helps tailor the solution scaffold.
Before writing any utility code, review what's already available in src/ai_devs/:
config.py — get_api_key(), , , , HUB_BASE_URLHUB_VERIFY_URLHUB_DATA_URLHUB_API_URLapi.py — post_request(), get_request(), get_hub_data(), send_report()openai_service.py — LLMService (providers: openrouter, gateway, openai)agent.py — Tool, run_agent() for Function Calling agentsgeo.py — haversine_distance(), POLISH_CITY_COORDSDo NOT recreate these utilities in the task file.
Create these files:
tasks/{task_id}/__init__.py — Empty file for cross-task imports.
tasks/{task_id}/solution.py — Main entry point following this template:
"""S##E## — {Task Name}.
{Brief description of what the task does.}
Usage:
python -m tasks.{task_id}.solution
"""
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
from src.ai_devs import get_api_key, get_hub_data, post_request, send_report, LLMService
from src.ai_devs.config import HUB_API_URL
def main():
# TODO: Implement task logic
pass
if __name__ == "__main__":
main()
Always use these import conventions:
# Absolute imports from project root
from src.ai_devs import get_api_key, post_request, send_report, LLMService
from src.ai_devs.config import HUB_VERIFY_URL, HUB_API_URL
# Cross-task imports (when reusing prior task logic)
from tasks.s01e01.solution import some_function
Tell the user how to run the task:
cd /Users/marek.szkudelski/VSCode/ai-devs-4
python3 -m tasks.{task_id}.solution
tasks/{task_id}/__init__.py existstasks/{task_id}/solution.py follows the templateget_api_key())if __name__ == "__main__": main() pattern used