- Python 61.2%
- TypeScript 36.7%
- Jinja 1%
- CSS 0.8%
- Batchfile 0.1%
- Other 0.1%
| config | ||
| examples | ||
| frontend | ||
| src/advanced_task_system | ||
| templates | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| AdvancedTaskSystem.cmd | ||
| AdvancedTaskSystem.spec | ||
| pyproject.toml | ||
| README.md | ||
AdvancedTaskSystem
AdvancedTaskSystem is a local/server-ready automation scaffold for technical protocols. It ingests assignment files, lets a fresh Codex planning agent derive a task list, executes those tasks sequentially with a Codex work agent, gates every task through an independent Codex review agent, builds a LaTeX protocol, and prepares neutral review artifacts.
The default mode is dry-run. No real Codex CLI calls, Git pushes, MATLAB runs, or Qt runs are performed unless the project is explicitly switched to real mode and the matching tools are configured.
Installation
python -m venv .venv
.\.venv\bin\python.exe -m pip install -e ".[dev]"
Configuration
Defaults live in config/default.yaml.
git:
server_base_url: "https://git.fxrz.de/TheoZockt"
default_branch: "main"
auto_push: false
codex:
command: "codex"
default_timeout_seconds: 1200
max_retries: 2
max_memory_mb: 0
latex:
engine: "latexmk"
matlab:
command: "matlab"
qt:
preferred_binding: "PySide6"
workspace:
dry_run: true
The app no longer stores or requests external AI API keys. The only AI backend is Codex: dry-run uses deterministic mock agents, while real mode uses configured Codex CLI commands.
Git Setup
This tool repository is prepared for:
- Version repo:
https://git.fxrz.de/TheoZockt/AdvancedTaskSystem.git - Tool context repo:
https://git.fxrz.de/TheoZockt/AdvancedTaskSystem-context.git - Per project context repo:
https://git.fxrz.de/TheoZockt/<project-name>-context.git
Run:
ats init-tool-repos
Push is disabled by default. Authentication is expected through existing Git configuration, SSH keys, credential helpers, or tokens outside the repository.
In the desktop app, the Repos view can run the same safe Git flow used for this tool repository: prepare or find the project repo on the configured server, set origin, stage with git add -A, create a commit, and push main to origin. If the API login is missing or the remote cannot be reached, the GUI reports the exact failing step in the live log instead of silently continuing.
The Einstellungen view also contains a Git login area. Enter the Git server URL, namespace/organisation, username, and a personal access token or password, then use Git Login speichern to store the credential in the local Git Credential Helper. The secret is not written to settings.yaml, project.yaml, or logs. Tool-Repos auf Server anlegen creates AdvancedTaskSystem and AdvancedTaskSystem-context through a Forgejo/Gitea-compatible API, with GitLab supported as a fallback. In the Repos view, Commit & Push now performs the full project sync; Server-Repo anlegen is still available as a separate explicit preparation step.
CLI Workflow
ats --help
ats create-project demo --input examples/sample_assignment.pdf
ats create-project multi-demo --input assignment.pdf --input measurements.csv --input notes.md
ats create-project tool-demo --prompt "Baue ein Python-Tool, das Messdaten auswertet und Ergebnisse dokumentiert."
ats ingest demo
ats analyze demo
ats run-codex demo
ats build demo
ats review demo
ats final-review-prompt demo
ats git-sync demo --message "Sync project state"
ats delete-project demo --yes
Or run the full dry-run pipeline:
ats run-all demo
Generated project data lives under projects/<project-name>/ and is intentionally ignored by the tool repository.
Desktop GUI
The Figma/Vite GUI lives in frontend/. By default, ats gui starts a native PySide6 desktop window, not a website and not an embedded Chromium browser.
cd frontend
npm.cmd install
npm.cmd run build
cd ..
.\.venv\bin\python.exe -m pip install -e ".[desktop]"
ats gui
For frontend development or visual browser checks only:
ats gui --dev --port 5173
ats gui --web --port 5173
For a quick desktop startup check:
ats gui --smoke-test
Desktop startup diagnostics are written to logs/gui/desktop.log.
The experimental embedded browser engines can still be selected with ATS_DESKTOP_ENGINE=webview or ATS_DESKTOP_ENGINE=qtwebengine, but the default is the more stable native Qt Widgets shell.
Current native desktop workflow:
- Start
ats guior double-click the built EXE. - Enter a project name.
- Either type a project prompt directly or pick one or more PDF, text, data, or other supported input files. Prompt and files can be used together.
- Click
Projekt anlegen. - Select the project in the sidebar.
- Optionally open
Ressourcenand add measurement files, CSV data, images, or a resource folder. - Optionally open
Einstellungen, configure the Codex command, timeout and retries, and switch the current project from Dry-Run to real Codex mode. - Click
Run All. - Inspect
Prompts,Artefakte,Reviews,Repos,Ressourcen, andLogsin the sidebar. - Delete local projects from the
Projekteview with confirmation when they are no longer needed.
The GUI runs pipeline actions in a worker thread, keeps the live log readable, and persists every step status in project.yaml.
The Abhaengigkeiten sidebar view shows the project-wide shared dependency workspace. It lists installed Python and Node packages, cache sizes, the paths passed to Codex, and the agent context file that is also mirrored into the local context repository.
Build a double-clickable Windows executable with:
.\.venv-desktop\Scripts\python.exe -m PyInstaller --noconfirm --clean --windowed --name AdvancedTaskSystem --collect-data advanced_task_system --hidden-import advanced_task_system.desktop_native --hidden-import PySide6.QtXml --hidden-import PySide6.QtSvg --distpath release-desktop --workpath build\pyinstaller src\advanced_task_system\desktop_entry.py
After the first build, the checked-in spec can be reused:
.\.venv-desktop\Scripts\python.exe -m PyInstaller --noconfirm --clean --distpath release-desktop --workpath build\pyinstaller AdvancedTaskSystem.spec
Then start:
release-desktop\AdvancedTaskSystem\AdvancedTaskSystem.exe
The frozen EXE stores projects, logs, and generated artifacts in %LOCALAPPDATA%\AdvancedTaskSystem by default. Set ATS_TOOL_ROOT to override that location.
Project Layout
Each project contains:
inputs/raw/for copied original inputsinputs/raw/project_prompt.mdwhen the project was created from a typed promptinputs/extracted/for extracted textanalysis/assignment_text.md,assignment_analysis.json, andwork_plan.mdagent_tasks/for the Codex planning result, task list, progress JSON, and per-task YAMLagent_reviews/for independent Codex review-agent decisions per task/attemptprompts/for generated Codex and review promptscodex_runs/run_*/for per-prompt logs and result JSONlatex/for protocol projects that really needmain.tex, sections, tables, figures, andbuild.logmatlab/for scripts and mock or real result exportsqt/for visualization scripts and exported figuresreviews/for first review andfinal_review_prompt.mdartifacts/for generated project reports, PDFs, export ZIPs, EXEs or build metadataresources/raw/for additional measurement data and other project resourcesresources/resources.yamlfor resource metadata and checksumsshared/dependencies/for project-wide dependency caches and local installsshared/dependencies/python/.venv/as the preferred reusable Python environment for that projectshared/dependencies/python/pip-cache/andshared/dependencies/node/npm-cache/to avoid repeated downloadsshared/dependencies/manifest.json,installed.md, andshared/agent_context.mdfor visible dependency documentationlogs/for command logsrepos/context-repo/as a separate local Git repository
Shared Dependencies
Every project gets its own shared/ workspace. Codex planner, worker, and reviewer prompts are told where it is, and real Codex subprocesses receive these environment variables:
ATS_SHARED_ROOTATS_PYTHON_SHARED_VENVPIP_CACHE_DIRnpm_config_cachePLAYWRIGHT_BROWSERS_PATH
This lets all generated repos and task attempts reuse the same project-local caches instead of downloading dependencies again for every step. Heavy cache folders and virtual environments stay local and are ignored by Git; the manifest, report, and context notes remain visible in the UI and can be committed.
After a successful dry-run Run All, the expected key files are:
analysis/assignment_text.mdanalysis/assignment_analysis.jsonanalysis/work_plan.mdagent_tasks/tasks.jsonagent_tasks/task_list.mdagent_tasks/progress.jsonagent_reviews/task_001_attempt_01_review.jsonprompts/codex_prompt_001.mdthroughcodex_prompt_003.mdcodex_runs/run_001/result.jsonthroughrun_003/result.jsonlatex/main.texfor protocol-shaped dry-run projects, or app/build files for general software projectsmatlab/outputs/results.jsonqt/visualizations/visualization_app.pyartifacts/protocol.texartifacts/protocol.pdfartifacts/project_report.mdandartifacts/export.zipfor general software projectsreviews/first_review.mdreviews/final_review_prompt.md
Codex Agent Mode
The desktop Einstellungen view provides:
- default Dry-Run switch for new projects
- Codex CLI command setting
Codex CLI automatisch findento prefer the startable standalone CLI over the WindowsApps app aliasCodex EXE auswaehlenfor installations that are not available throughPATH- Codex timeout setting
- Codex retry setting
- soft RAM limit for external process trees such as Codex, LaTeX, MATLAB, or build tools
- a local Codex command availability check
Existing projects keep their own dry_run flag. To use real Codex CLI calls for a project, select it and click Aktuelles Projekt: echter Codex-Modus in Einstellungen. If the Codex CLI is missing, the app reports the error in the live log instead of crashing. Dry-run remains fully usable without external AI credentials or tools.
When Codex-Verfuegbarkeit pruefen cannot find the codex command while the selected project is still in dry-run mode, the GUI reports it as a warning-style status: dry-run can continue, real Codex mode needs a valid CLI command.
If codex is already available in the system PATH, keep the command as codex. Otherwise click Codex CLI automatisch finden or Codex EXE auswaehlen and choose the installed standalone codex.exe; the app stores the executable path and uses it for planner, worker, and reviewer calls. Typical Windows standalone installs live under %USERPROFILE%\.codex\packages\standalone\releases\...\bin\codex.exe.
The availability check now starts the command with --help. A WindowsApps file can be visible but still fail with "Zugriff verweigert"; in that case real Codex mode is not usable from this app yet and the project should stay in dry-run mode until a startable Codex CLI command is configured.
Real agent calls use codex exec -: prompts are sent over stdin, event output is logged as JSONL, and the final agent message is saved separately for planner/reviewer JSON parsing.
Set max_memory_mb to 0 to disable memory enforcement. Any positive value is treated as a soft cap for subprocess trees started by the app; when the tree goes over the limit, the app terminates that process tree and records a clear error in the step logs.
Dry-run is prompt-aware. For example, a prompt like "Baue eine EXE die Pong spielen kann" creates a Tkinter Pong scaffold, a Windows build script, a mock EXE artifact marker, and an export zip instead of LaTeX/MATLAB protocol placeholders.
The artifact step is intentionally general. It only runs a real LaTeX build when the assignment or Codex task list actually asks for a LaTeX/protocol output. For app, game, data, or tool projects it writes a generic project report/export and does not fail just because an old latex/main.tex exists.
The Codex integration is backend-based:
MockCodexAgentBackendcreates deterministic task plans, files, and approvals in dry-run mode.CliCodexAgentBackendstarts fresh Codex CLI calls for planner, worker, and reviewer roles in real mode.- A task only advances when the independent review agent returns
approved. - If the review returns
needs_revision, the feedback is passed to the work agent and the same task is retried before the next task can start.
Timeout Handling
All real external commands go through a subprocess wrapper with:
- configurable timeout, default
1200seconds - stdout and stderr log files
- process-tree termination on timeout
- exit code, runtime, and timeout status capture
- retry support
Codex command retries are controlled by codex.max_retries and also serve as the maximum review-driven rework attempts per task.
Review Pipeline
Every Codex task is reviewed by an independent reviewer agent before the next task begins. The first protocol review summarizes those task reviews and the generated artifacts. The final review prompt is always written to:
projects/<project-name>/reviews/final_review_prompt.md
That prompt deliberately includes only the original assignment, final LaTeX protocol, and neutral criteria. It excludes internal planning, previous reviews, and execution history.
Limits
- Dry-run artifacts are structurally useful but not mathematically authoritative.
- Real Codex CLI/API integration is represented by a clear backend interface and a conservative CLI hook.
- MATLAB and Qt real execution hooks are intentionally minimal in this first pass.
- PDF extraction falls back to raw text decoding for mock PDFs and damaged documents.
Tests
.\.venv\bin\python.exe -m pytest
The tests cover configuration loading, local app settings, project creation, resource import, mock PDF ingestion, timeout handling, prompt generation, Git URL creation, final review prompt creation, and the full dry-run pipeline.
TODO
- Add a confirmed real Codex CLI/API adapter once the target interface is stable.
- Add richer MATLAB script discovery and result collection.
- Add a real PySide6 renderer for visualization exports.
- Add optional push workflows and remote repository creation through a provider-specific API.
- Add stronger LaTeX validation and PDF text extraction during review.