Files
ResumeCustomizer/input/AGENTS.md

48 lines
3.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 (`<company>-<jobtitle>.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.
- `templates/JobDescriptionNormalizerPrompt.md.example` default instructions that scrub recruiter chatter while preserving all job description content and extract metadata; copy to `JobDescriptionNormalizerPrompt.md` to override.
- `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:
- `CODEX_COMMAND_TEMPLATE` override the Codex CLI invocation for the resume customization run (defaults to `codex prompt --input {prompt} --output {output} --format markdown`).
- `CODEX_NORMALIZER_COMMAND_TEMPLATE` optional override for the job-description normalization run (defaults to the same value as `CODEX_COMMAND_TEMPLATE`).
- `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`.
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 callers 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.
- To change the Codex command format, pass a quoted template (e.g., `CODEX_COMMAND_TEMPLATE='codex run --input {prompt} --output {output}' ./run-input-processor.sh up -d'`). The template must include `{prompt}` and `{output}` placeholders.