refactor(input): bake job normalizer prompt

This commit is contained in:
2025-10-15 16:59:56 -05:00
parent 4f05e0fd5d
commit f1f9a94c02
5 changed files with 10 additions and 14 deletions

View File

@@ -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 (`<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.
- `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

View File

@@ -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.

View File

@@ -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,11 +88,10 @@ 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}"
)

View File

@@ -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/<company>-<jobtitle>.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/<company>-<jobtitle>.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.

View File

@@ -1,4 +1,2 @@
ResumeCustomizerPrompt.md
JobDescriptionNormalizerPrompt.md
!ResumeCustomizerPrompt.md.example
!JobDescriptionNormalizerPrompt.md.example