docs(output): sync pipeline overview

This commit is contained in:
2025-10-15 14:12:06 -05:00
parent 36296c4a83
commit fe477e6af4

View File

@@ -1,41 +1,45 @@
# Output Pipeline Overview # Output Pipeline Overview
This directory contains the post-processing side of ResumeCustomizer. It is responsible for taking a job-targeted Markdown resume produced elsewhere in the system and turning it into printable DOCX/PDF artifacts. This directory houses the post-processing side of ResumeCustomizer. It accepts one human-approved Markdown resume at a time and renders shareable DOCX/PDF artifacts while preserving historical output.
## Directory Layout ## Directory Layout
- `ForRelease/inbox`: drop a single `*.md` file here to trigger conversion. - `ForRelease/inbox` drop a single vetted `*.md` file here to trigger conversion; keep empty otherwise.
- `ForRelease/outbox/YYYY/MM/DD/HHMM`: conversion results (paired `.docx` and `.pdf`) organized by timestamp so repeated runs never overwrite each other. - `ForRelease/outbox/YYYY/MM/DD/HHMM` timestamped export folders containing the generated `.docx`/`.pdf` pair for each run.
- `ForRelease/processed/YYYY/MM/DD/HHMM`: archives of Markdown files that converted successfully. - `ForRelease/processed/YYYY/MM/DD/HHMM` timestamped archives of Markdown files that converted successfully.
- `ForRelease/failed`: Markdown files that encountered an error during conversion (contains `.gitkeep` to preserve the directory). - `ForRelease/failed` holding area for Markdown files that Pandoc could not render.
- `Docker/`: container definition, watcher script, and helper wrapper that run the conversion daemon. - `Docker/` Dockerfile, compose stack, watcher script, and wrapper used to run the conversion container.
All `ForRelease` subdirectories include `.gitkeep` and `.gitignore` so artifacts stay local and never reach version control.
All `ForRelease` subdirectories include `.gitkeep`/`.gitignore` files so generated resumes stay local and out of version control.
## Running the Output Processor ## Running the Output Processor
Use the wrapper so the container writes files with your UID/GID: Launch the stack with the wrapper so files inherit your UID/GID:
```bash ```bash
cd output/Docker cd output/Docker
./run-output-processor.sh up -d ./run-output-processor.sh up -d
``` ```
The script detects either the Docker Compose plugin or the legacy `docker-compose` binary and forwards any additional arguments you supply (`down`, `logs`, etc.). The stack registers under the project name `RCEO-AI-ResumeCustomizer-Output`, and the primary container is `RCEO-AI-ResumeCustomizer-OutputProcessor`. The wrapper auto-detects the Docker Compose plugin or legacy `docker-compose` and forwards any extra arguments (`down`, `logs`, etc.). The stack registers as `RCEO-AI-ResumeCustomizer-Output` with the container `RCEO-AI-ResumeCustomizer-OutputProcessor`.
## What the Watcher Does ## Conversion Flow
1. Polls `ForRelease/inbox` every few seconds for a single Markdown resume. 1. The watcher polls `ForRelease/inbox` every few seconds for exactly one Markdown resume.
2. Runs Pandoc using the shared DOCX and LaTeX templates to generate DOCX/PDF. 2. Pandoc renders DOCX and PDF using the shared templates.
3. Drops the exports into the timestamped folder under `ForRelease/outbox`. 3. Artifacts land in a timestamped folder under `ForRelease/outbox`.
4. Moves the original Markdown into the matching timestamp folder under `ForRelease/processed`. 4. The source Markdown moves into the matching timestamp folder under `ForRelease/processed`.
5. If the Pandoc conversion fails, moves the Markdown into `ForRelease/failed` so it can be reviewed without blocking subsequent runs. 5. On Pandoc failure, the Markdown shifts into `ForRelease/failed` for human review before retrying.
Outbox and processed directories are append-only historical records managed solely by the human operator—automation must never delete or reorganize them.
## Prerequisites ## Prerequisites
- Docker Engine with either the Compose plugin (`docker compose`) or standalone `docker-compose`. - Docker Engine with the Compose plugin (`docker compose`) or the standalone `docker-compose` binary.
- Pandoc templates available under `input/templates` relative to the repo root (mounted read-only into the container). - Template assets mounted read-only from `input/templates`.
Stop the service with: Stop or inspect the stack with:
```bash ```bash
cd output/Docker cd output/Docker
./run-output-processor.sh down ./run-output-processor.sh down
./run-output-processor.sh logs -f
``` ```
Log output is available through `./run-output-processor.sh logs -f`. Monitor logs during conversions to confirm the Markdown leaves inbox, exports appear in outbox, and the source lands in processed.