Reorganize task categories from opaque a/b to descriptive names

Replace category_a/category_b directories with algorithm, pipeline,
environment, filesystem, and process. Add separate mode field (solve/convert)
to decouple orchestration from capability grouping. Add per-category
summary and questionnaire breakdowns to both terminal report and HTML export.
This commit is contained in:
Cormac Shannon
2026-03-29 20:59:01 +01:00
parent be8d657b24
commit 20e62f60f6
18 changed files with 487 additions and 167 deletions

View File

@@ -0,0 +1,29 @@
name = "file_organizer"
category = "filesystem"
mode = "solve"
description = """
You are given a working directory containing several files with extensions.
Read a list of extension-to-directory mappings from stdin, one per line, in the format:
ext:dirname
For example, "txt:documents" means move all .txt files into a subdirectory called "documents".
Create the target directories if they don't exist, then move matching files into them.
After processing, print each moved file as "filename -> dirname/filename", sorted alphabetically by filename.
Files that don't match any mapping should be left in place (don't print anything for them).
"""
[[test_cases]]
stdin = """txt:documents
log:logs"""
expected_stdout = """app.log -> logs/app.log
notes.txt -> documents/notes.txt
readme.txt -> documents/readme.txt"""
setup_files = { "notes.txt" = "some notes", "readme.txt" = "a readme", "app.log" = "log data", "image.png" = "fake png" }
expected_files = { "documents/notes.txt" = "some notes", "documents/readme.txt" = "a readme", "logs/app.log" = "log data", "image.png" = "fake png" }
[[test_cases]]
stdin = "csv:data"
expected_stdout = """report.csv -> data/report.csv"""
setup_files = { "report.csv" = "a,b,c", "other.txt" = "hello" }
expected_files = { "data/report.csv" = "a,b,c", "other.txt" = "hello" }

View File

@@ -0,0 +1,30 @@
name = "multi_file_search"
category = "filesystem"
mode = "solve"
description = """
You are given a working directory containing several text files.
Read a search pattern (a simple string, not regex) from stdin.
Search all .txt files in the working directory for lines containing that pattern (case-sensitive).
Print matching results in the format: "filename:line_number:line_content"
Results should be sorted first by filename, then by line number.
Line numbers are 1-based.
"""
[[test_cases]]
stdin = "error"
expected_stdout = """app.txt:2:found an error here
app.txt:4:another error occurred
system.txt:1:error on startup"""
setup_files = { "app.txt" = "all good\nfound an error here\nno problem\nanother error occurred", "system.txt" = "error on startup\nrunning fine\nshutdown", "data.csv" = "error,value\n1,2" }
[[test_cases]]
stdin = "hello"
expected_stdout = """a.txt:1:hello world
b.txt:2:say hello"""
setup_files = { "a.txt" = "hello world\ngoodbye", "b.txt" = "greetings\nsay hello" }
[[test_cases]]
stdin = "notfound"
expected_stdout = ""
setup_files = { "test.txt" = "nothing matches here" }