# Input Agent Guide ## Mission Automate the upstream resume customization workflow. Monitor the job-description inbox, clean up messy recruiter-sourced text, combine the normalized description with the base resume and prompt templates, invoke the Codex CLI, and deposit the generated Markdown in a timestamped outbox for human review. ## Directory Responsibilities - `resume/` – contains exactly one Markdown resume. Any other count is a fatal configuration error. - `ForCustomizing/inbox/` – drop one plain-text or Markdown job description at a time to trigger processing. - `ForCustomizing/outbox/YYYY/MM/DD/HHMM/` – timestamped folders containing Codex output Markdown (`-.md`) along with the exact prompt and the cleaned job description that fed Codex. - `ForCustomizing/processed/YYYY/MM/DD/HHMM/` – archives of job descriptions that Codex processed successfully. - `ForCustomizing/failed/` – captures job descriptions when Codex errors or a recoverable issue occurs. Fatal configuration errors still exit the container. - `Docker/JobDescriptionNormalizerPrompt.md` – baked normalizer instructions (modify the container build to customize). - `templates/ResumeCustomizerPrompt.md.example` – default resume-customization instructions; copy to `ResumeCustomizerPrompt.md` to override. ## Running the Input Processor Launch the stack with the wrapper so files inherit your UID/GID and your local Codex credentials mount in: ```bash cd input/Docker ./run-input-processor.sh up -d ``` - Environment variables you can pass before the command: - `POLL_INTERVAL_SECONDS` – watcher polling cadence (default `5`). - `CODEX_TIMEOUT_SECONDS` – hard timeout for Codex calls (default `600`). - `CODEX_CONFIG_DIR` – optional override for the host directory that should mount into `/home/codex/.codex`. The container bundles the Codex CLI and expects the caller to mount their `~/.codex` directory for credentials. Stop or inspect the stack with: ```bash cd input/Docker ./run-input-processor.sh down ./run-input-processor.sh logs -f ``` ## Guardrails - Ensure only one job description resides in `ForCustomizing/inbox/`. Multiple files cause the container to exit with a fatal error. - Keep exactly one resume Markdown in `resume/`. Missing or multiple resumes also terminate the watcher. - The container runs as a non-root user matching the caller’s UID/GID. Avoid changing permissions manually inside the mounted directories. - Do not edit anything under `output/` from this agent session; treat the downstream pipeline as read-only reference material. ## Troubleshooting - If Codex CLI fails, the job description moves to `ForCustomizing/failed/`. Check container logs, adjust the Markdown, then requeue it. - Fatal errors (multiple resumes, multiple job descriptions, missing template, or missing Codex binary) stop the container. Resolve the issue and restart via the wrapper. - The watcher logs the exact `codex prompt --input … --output … --format markdown` command before each invocation; inspect container logs if troubleshooting is needed.