diff --git a/input/AGENTS.md b/input/AGENTS.md index 40771a1..af09785 100644 --- a/input/AGENTS.md +++ b/input/AGENTS.md @@ -9,7 +9,7 @@ Automate the upstream resume customization workflow. Monitor the job-description - `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. -- `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. +- `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 diff --git a/input/templates/JobDescriptionNormalizerPrompt.md.example b/input/Docker/JobDescriptionNormalizerPrompt.md similarity index 94% rename from input/templates/JobDescriptionNormalizerPrompt.md.example rename to input/Docker/JobDescriptionNormalizerPrompt.md index 5066636..a9db66c 100644 --- a/input/templates/JobDescriptionNormalizerPrompt.md.example +++ b/input/Docker/JobDescriptionNormalizerPrompt.md @@ -1,5 +1,5 @@ # Default instructions that clean messy job descriptions before resume customization. -# Copy to `JobDescriptionNormalizerPrompt.md` (same directory) to override locally. +# Customize only by modifying the container build. You are an expert technical recruiter. diff --git a/input/Docker/watch_and_customize.py b/input/Docker/watch_and_customize.py index 41eac67..ebdffcd 100644 --- a/input/Docker/watch_and_customize.py +++ b/input/Docker/watch_and_customize.py @@ -32,8 +32,7 @@ TEMPLATES_DIR = Path("/templates") TEMPLATE_CACHE = Path("/tmp/templates") PROMPT_TEMPLATE = TEMPLATES_DIR / "ResumeCustomizerPrompt.md" PROMPT_TEMPLATE_EXAMPLE = TEMPLATES_DIR / "ResumeCustomizerPrompt.md.example" -NORMALIZER_TEMPLATE = TEMPLATES_DIR / "JobDescriptionNormalizerPrompt.md" -NORMALIZER_TEMPLATE_EXAMPLE = TEMPLATES_DIR / "JobDescriptionNormalizerPrompt.md.example" +NORMALIZER_TEMPLATE = Path('/app/JobDescriptionNormalizerPrompt.md') POLL_INTERVAL_SECONDS = int(os.environ.get("POLL_INTERVAL_SECONDS", "5")) CODEX_COMMAND_TEMPLATE = os.environ.get( @@ -89,12 +88,11 @@ def ensure_environment() -> None: TEMPLATE_CACHE, "Resume customization prompt", ) - RESOLVED_NORMALIZER_TEMPLATE = resolve_template( - NORMALIZER_TEMPLATE, - NORMALIZER_TEMPLATE_EXAMPLE, - TEMPLATE_CACHE, - "Job description normalizer prompt", - ) + RESOLVED_NORMALIZER_TEMPLATE = NORMALIZER_TEMPLATE + if not RESOLVED_NORMALIZER_TEMPLATE.exists(): + raise FatalConfigurationError( + f"Job description normalizer prompt missing at {RESOLVED_NORMALIZER_TEMPLATE}" + ) def resolve_template( diff --git a/input/README.md b/input/README.md index 929ce6a..71a0348 100644 --- a/input/README.md +++ b/input/README.md @@ -6,7 +6,7 @@ The input side of ResumeCustomizer prepares job-specific Markdown resumes by sti 1. Ensure `input/resume/` contains exactly one Markdown resume. 2. Drop a single job-description file (plain text or Markdown) into `input/ForCustomizing/inbox/`. 3. Start the watcher stack (`input/Docker/run-input-processor.sh up -d`). -4. The watcher normalizes the messy job description via Codex (using `templates/JobDescriptionNormalizerPrompt.md.example` by default), stripping recruiter chatter while preserving every job-related detail, then combines the cleaned Markdown, the base resume, and the resolved customization prompt into a second Codex run that writes the generated resume to `ForCustomizing/outbox/YYYY/MM/DD/HHMM/-.md`. +4. The watcher normalizes the messy job description via Codex (using the baked-in normalizer prompt), stripping recruiter chatter while preserving every job-related detail, then combines the cleaned Markdown, the base resume, and the resolved customization prompt into a second Codex run that writes the generated resume to `ForCustomizing/outbox/YYYY/MM/DD/HHMM/-.md`. 5. Successful runs archive the job description under `ForCustomizing/processed/`, copy both the prompt and the cleaned job description into the same outbox folder, and leave the Codex output for human review. Failures move the job description into `ForCustomizing/failed/`. The human operator reviews the Codex output Markdown, makes any edits, and then manually hands it off to the output pipeline for document rendering. @@ -20,7 +20,7 @@ The watcher lives in `input/Docker/`: - `docker-compose.yml` – defines the container, volumes, environment variables, and restart policy (`no` so fatal errors halt the stack). ### Templates -- `templates/JobDescriptionNormalizerPrompt.md.example` ships with default instructions that clean recruiter chatter and extract company/role details. Copy it to `JobDescriptionNormalizerPrompt.md` to override. +- baked normalizer prompt (`input/Docker/JobDescriptionNormalizerPrompt.md`) ships with the container; customize by editing the image. - `templates/ResumeCustomizerPrompt.md.example` ships with default resume-customization instructions. Copy it to `ResumeCustomizerPrompt.md` to override. - The `.gitignore` in `templates/` keeps local overrides out of version control. diff --git a/input/templates/.gitignore b/input/templates/.gitignore index 064cd9a..7b5c605 100644 --- a/input/templates/.gitignore +++ b/input/templates/.gitignore @@ -1,4 +1,2 @@ ResumeCustomizerPrompt.md -JobDescriptionNormalizerPrompt.md !ResumeCustomizerPrompt.md.example -!JobDescriptionNormalizerPrompt.md.example