# santifer/career-ops architecture

> Architecture diagram of the GitHub repository santifer/career-ops, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/santifer/career-ops
- Repository: https://github.com/santifer/career-ops

## Overview

1. **System boundary**
   Career-Ops is a **local-first job-search workspace**, not a hosted service. The repo stores prompts, configuration, generated reports, PDFs, and tracking data on the user’s machine; external calls go only to AI providers and job portals the user chooses. The important persistent areas are `data/`, `reports/`, `output/`, `jds/`, `interview-prep/`, and `writing-samples/`.

2. **Agent/control layer**
   The repository is designed to be driven by multiple AI coding CLIs, with a shared instruction core in `AGENTS.md` and CLI-specific wrappers such as `CLAUDE.md`, `OPENCODE.md`, `GEMINI.md`, and skill folders under `.claude/`, `.qwen/`, `.agents/`, `.antigravitycli/`, and `.opencode/`. The `modes/` directory is the command surface: each markdown file represents a task mode like scan, pipeline, pdf, cover, batch, interview, tracker, and follow-up.

3. **User input to analysis**
   The main entrypoint is conversational or command-based: the user pastes a job URL or description into a supported CLI, or invokes a mode explicitly. From there, the system classifies the role, evaluates fit against the user’s CV and profile, and produces structured outputs. This “intent → analysis → artifacts” path is the core runtime flow of the repository.

4. **Job discovery and portal adapters**
   Discovery is handled by `scan.mjs` plus the `providers/` adapters. Each provider module models a specific ATS or portal source such as Greenhouse, Lever, Ashby, Workday, Workable, Recruitee, SmartRecruiters, RemoteOK, Remotive, and others. Shared HTTP and type helpers live in `providers/_http.mjs` and `providers/_types.js`, making the provider layer the main integration boundary with external job sources.

5. **Portal verification and crawl safety**
   The scanner can optionally verify listings with browser automation. The README notes a `--verify` mode that uses Playwright to check whether postings are still live before they are promoted into the pipeline. That creates a two-step discovery boundary: fast API/feed collection first, then selective browser validation for freshness.

6. **Evaluation engine**
   The evaluation subsystem is driven by the mode prompts and supporting scripts such as `analyze-patterns.mjs`, `role-matcher.mjs`, `normalize-statuses.mjs`, `verify-pipeline.mjs`, and the pipeline/reconciliation utilities. Its purpose is to turn a job description into a structured assessment: role summary, CV match, level strategy, compensation notes, personalization, and interview prep. The output is recommendation-oriented, not an application submission.

7. **Document generation**
   Resume and cover-letter generation are separate but related output paths. Templates in `templates/` feed `generate-latex.mjs`, `build-cv-latex.mjs`, `generate-pdf.mjs`, and `generate-cover-letter.mjs`, with Playwright used to render HTML-based artifacts into PDFs. Fonts and layout assets are kept in `fonts/`, and the result lands in `output/` as ATS-oriented deliverables.

8. **Tracking and canonical state**
   Application state is normalized and stored as repo data rather than in an external database. The tracking layer uses `tracker.mjs`, `merge-tracker.mjs`, `dedup-tracker.mjs`, `reserve-report-num.mjs`, `followup-cadence.mjs`, and `reconcile-pipeline.mjs`, with `templates/states.yml` and other templates defining canonical statuses. This is the repository’s single source of truth for what has been evaluated, what is pending, and what needs follow-up.

9. **Batch orchestration**
   High-volume processing is handled by the `batch/` subsystem. It contains a dedicated worker prompt and shell runner for parallel evaluations, allowing multiple offers to be processed by headless CLI workers. This makes batch mode a distinct orchestration layer above the single-job evaluation flow.

10. **Interactive dashboard**
   The `dashboard/` subtree is a separate Go application that reads the repository’s tracking data and presents it in a terminal UI. It uses Bubble Tea/Lipgloss-style TUI structure with `internal/data`, `internal/model`, `internal/theme`, and `internal/ui/screens`, and supports browsing, filtering, sorting, and opening pipeline items. It is a read-heavy operational view over the same local data the CLI modes generate.

11. **Customization and content packs**
   The repo is heavily content-driven. `modes/`, `templates/`, `examples/`, `config/profile.example.yml`, and localized README/mode files provide the reusable knowledge base and per-user customization points. That means the architecture is less “app code + database” and more “prompt library + templates + adapters + local artifacts.”

12. **Validation, packaging, and lifecycle**
   Maintenance is supported by scripts such as `doctor.mjs`, `check-liveness.mjs`, `liveness-core.mjs`, `liveness-browser.mjs`, `test-all.mjs`, and portal validation scripts. CI workflows under `.github/workflows/` enforce testing, code scanning, dependency review, SBOM generation, release automation, and stale-issue cleanup. Optional Docker/Nix files indicate the project is designed to be portable across local dev environments.

Main entry points: [`tracker.mjs`](https://github.com/santifer/career-ops/blob/main/tracker.mjs) (Tracker core), [`modes`](https://github.com/santifer/career-ops/tree/main/modes) (Modes), [`scan.mjs`](https://github.com/santifer/career-ops/blob/main/scan.mjs) (Scan entry), [`doctor.mjs`](https://github.com/santifer/career-ops/blob/main/doctor.mjs) (Validation tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Control surface"]
  node_agents_core["AGENTS core<br/>instruction set<br/>[AGENTS.md]"]
  node_cli_wrappers["CLI wrappers<br/>cli configs"]
  node_modes["Modes<br/>task prompts"]
end

subgraph group_discovery["Discovery"]
  node_scan_entry["Scan entry<br/>intake script<br/>[scan.mjs]"]
  node_portal_adapters["Portal adapters<br/>integration layer"]
  node_provider_http["HTTP helpers<br/>shared networking<br/>[_http.mjs]"]
  node_provider_types["Adapter types<br/>shared schema<br/>[_types.js]"]
  node_browser_verify(("Browser verify<br/>playwright check<br/>[verify-portals.mjs]"))
end

subgraph group_generation["Analysis and outputs"]
  node_analyze_engine["Analyze engine<br/>evaluation pipeline<br/>[role-matcher.mjs]"]
  node_pattern_analysis["Pattern analysis<br/>analysis script"]
  node_template_pack["Templates"]
  node_latex_build["LaTeX build<br/>document generator<br/>[generate-latex.mjs]"]
  node_pdf_render["PDF render<br/>artifact renderer<br/>[generate-pdf.mjs]"]
  node_cover_letter["Cover letter<br/>document generator"]
end

subgraph group_state["State and ops"]
  node_status_normalizer["Status normalizer<br/>state transform"]
  node_local_store[("Local store<br/>repo data")]
  node_tracker_core["Tracker core<br/>canonical state<br/>[tracker.mjs]"]
  node_tracker_sync["Tracker sync<br/>merge and dedup<br/>[merge-tracker.mjs]"]
  node_cadence_reconcile["Cadence reconcile<br/>follow-up logic"]
  node_dashboard_tui["Dashboard TUI<br/>go terminal app"]
  node_batch_runner["Batch runner<br/>parallel orchestration"]
end

subgraph group_support["Support and lifecycle"]
  node_profile_pack["Profile pack<br/>user custom"]
  node_validation_tools["Validation tools<br/>checks and probes<br/>[doctor.mjs]"]
  node_ci_pack["CI pipeline<br/>github workflows<br/>[workflows]"]
end

node_agents_core -->|"shared by"| node_cli_wrappers
node_cli_wrappers -->|"invoke"| node_modes
node_profile_pack -->|"customizes"| node_modes
node_modes -->|"starts discovery"| node_scan_entry
node_scan_entry -->|"collects listings"| node_portal_adapters
node_portal_adapters -->|"uses"| node_provider_http
node_portal_adapters -->|"normalizes"| node_provider_types
node_scan_entry -.->|"optionally verifies"| node_browser_verify
node_scan_entry -->|"stores raw jobs"| node_local_store
node_modes -->|"drives"| node_analyze_engine
node_analyze_engine -->|"consults"| node_pattern_analysis
node_analyze_engine -->|"fills"| node_template_pack
node_template_pack -->|"drives"| node_latex_build
node_template_pack -->|"drives"| node_cover_letter
node_latex_build -->|"renders to"| node_pdf_render
node_pdf_render -->|"writes artifacts"| node_local_store
node_cover_letter -->|"writes artifacts"| node_local_store
node_modes -->|"updates state"| node_tracker_core
node_tracker_core -->|"canonicalizes"| node_status_normalizer
node_tracker_core -->|"reconciles"| node_tracker_sync
node_tracker_core -->|"schedules follow-up"| node_cadence_reconcile
node_tracker_core -->|"reads from"| node_dashboard_tui
node_batch_runner -->|"parallelizes"| node_analyze_engine
node_batch_runner -->|"records results"| node_tracker_core
node_validation_tools -->|"checks"| node_scan_entry
node_validation_tools -->|"checks"| node_tracker_core
node_validation_tools -->|"feeds"| node_ci_pack
node_ci_pack -->|"tests prompts"| node_modes
node_ci_pack -->|"runs"| node_validation_tools

click node_agents_core "https://github.com/santifer/career-ops/blob/main/AGENTS.md"
click node_modes "https://github.com/santifer/career-ops/tree/main/modes"
click node_profile_pack "https://github.com/santifer/career-ops/blob/main/config/profile.example.yml"
click node_scan_entry "https://github.com/santifer/career-ops/blob/main/scan.mjs"
click node_portal_adapters "https://github.com/santifer/career-ops/tree/main/providers"
click node_provider_http "https://github.com/santifer/career-ops/blob/main/providers/_http.mjs"
click node_provider_types "https://github.com/santifer/career-ops/blob/main/providers/_types.js"
click node_browser_verify "https://github.com/santifer/career-ops/blob/main/verify-portals.mjs"
click node_analyze_engine "https://github.com/santifer/career-ops/blob/main/role-matcher.mjs"
click node_pattern_analysis "https://github.com/santifer/career-ops/blob/main/analyze-patterns.mjs"
click node_status_normalizer "https://github.com/santifer/career-ops/blob/main/normalize-statuses.mjs"
click node_template_pack "https://github.com/santifer/career-ops/tree/main/templates"
click node_latex_build "https://github.com/santifer/career-ops/blob/main/generate-latex.mjs"
click node_pdf_render "https://github.com/santifer/career-ops/blob/main/generate-pdf.mjs"
click node_cover_letter "https://github.com/santifer/career-ops/blob/main/generate-cover-letter.mjs"
click node_local_store "https://github.com/santifer/career-ops/tree/main/data"
click node_tracker_core "https://github.com/santifer/career-ops/blob/main/tracker.mjs"
click node_tracker_sync "https://github.com/santifer/career-ops/blob/main/merge-tracker.mjs"
click node_cadence_reconcile "https://github.com/santifer/career-ops/blob/main/followup-cadence.mjs"
click node_dashboard_tui "https://github.com/santifer/career-ops/tree/main/dashboard"
click node_batch_runner "https://github.com/santifer/career-ops/tree/main/batch"
click node_validation_tools "https://github.com/santifer/career-ops/blob/main/doctor.mjs"
click node_ci_pack "https://github.com/santifer/career-ops/blob/main/.github/workflows"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_agents_core,node_cli_wrappers,node_modes toneBlue
class node_scan_entry,node_portal_adapters,node_provider_http,node_provider_types,node_browser_verify toneAmber
class node_analyze_engine,node_pattern_analysis,node_template_pack,node_latex_build,node_pdf_render,node_cover_letter toneMint
class node_status_normalizer,node_local_store,node_tracker_core,node_tracker_sync,node_cadence_reconcile,node_dashboard_tui,node_batch_runner toneRose
class node_profile_pack,node_validation_tools,node_ci_pack toneIndigo
```

## Components

### Control surface

Shared instructions and mode entrypoints used by multiple AI CLIs.

- [AGENTS core](https://github.com/santifer/career-ops/blob/main/AGENTS.md): instruction set · Shared operating instructions for AI coding CLIs. · `AGENTS.md`
- **CLI wrappers**: cli configs · Repo-specific wrappers for Claude, Gemini, OpenCode, Qwen, and similar runtimes.
- [Modes](https://github.com/santifer/career-ops/tree/main/modes): task prompts · Command surface for scan, pipeline, PDF, cover, batch, interview, tracker, and follow-up flows. · `modes`

### Discovery

Job intake, portal adapters, and optional listing verification.

- [Scan entry](https://github.com/santifer/career-ops/blob/main/scan.mjs): intake script · Main job discovery entrypoint from URL or pasted description. · `scan.mjs`
- [Portal adapters](https://github.com/santifer/career-ops/tree/main/providers): integration layer · Source-specific adapters for Greenhouse, Lever, Workday, Ashby, Recruitee, and other portals. · `providers`
- [HTTP helpers](https://github.com/santifer/career-ops/blob/main/providers/_http.mjs): shared networking · Shared request and response helpers used by the adapter layer. · `providers/_http.mjs`
- [Adapter types](https://github.com/santifer/career-ops/blob/main/providers/_types.js): shared schema · Common typing and normalization helpers for provider data. · `providers/_types.js`
- [Browser verify](https://github.com/santifer/career-ops/blob/main/verify-portals.mjs): playwright check · Optional freshness validation for live postings before they enter the pipeline. · `verify-portals.mjs`

### Analysis and outputs

Role evaluation and artifact generation for resumes, cover letters, PDFs, and prep materials.

- [Analyze engine](https://github.com/santifer/career-ops/blob/main/role-matcher.mjs): evaluation pipeline · Turns a job description into fit, level, compensation, and personalization guidance. · `role-matcher.mjs`
- [Pattern analysis](https://github.com/santifer/career-ops/blob/main/analyze-patterns.mjs): analysis script · Supporting analysis for recurring role signals and normalization. · `analyze-patterns.mjs`
- [Templates](https://github.com/santifer/career-ops/tree/main/templates): artifact templates · Resume, CV, cover-letter, and state templates that drive output generation. · `templates`
- [LaTeX build](https://github.com/santifer/career-ops/blob/main/generate-latex.mjs): document generator · Produces ATS-oriented LaTeX resumes and CV artifacts. · `generate-latex.mjs`
- [PDF render](https://github.com/santifer/career-ops/blob/main/generate-pdf.mjs): artifact renderer · Renders HTML/LaTeX outputs into PDFs for delivery and archiving. · `generate-pdf.mjs`
- [Cover letter](https://github.com/santifer/career-ops/blob/main/generate-cover-letter.mjs): document generator · Creates tailored cover letters from the same analysis and template inputs. · `generate-cover-letter.mjs`

### State and ops

Canonical local tracking data plus the terminal dashboard and batch orchestration.

- [Status normalizer](https://github.com/santifer/career-ops/blob/main/normalize-statuses.mjs): state transform · Canonicalizes pipeline statuses and related labels. · `normalize-statuses.mjs`
- [Local store](https://github.com/santifer/career-ops/tree/main/data): repo data · Persistent job data, reports, outputs, JD archives, interview prep, and writing samples on disk. · `data`
- [Tracker core](https://github.com/santifer/career-ops/blob/main/tracker.mjs): canonical state · Main application-state ledger for evaluated jobs, pending work, and follow-up status. · `tracker.mjs`
- [Tracker sync](https://github.com/santifer/career-ops/blob/main/merge-tracker.mjs): merge and dedup · Reconciliation utilities that merge, deduplicate, and reserve report numbers. · `merge-tracker.mjs`
- [Cadence reconcile](https://github.com/santifer/career-ops/blob/main/followup-cadence.mjs): follow-up logic · Follow-up cadence and pipeline reconciliation rules. · `followup-cadence.mjs`
- [Dashboard TUI](https://github.com/santifer/career-ops/tree/main/dashboard): go terminal app · Read-heavy terminal UI for browsing and opening tracked pipeline items. · `dashboard`
- [Batch runner](https://github.com/santifer/career-ops/tree/main/batch): parallel orchestration · High-volume worker path for processing multiple jobs with headless CLI workers. · `batch`

### Support and lifecycle

Customization packs, validation scripts, packaging, and CI/lifecycle automation.

- [Profile pack](https://github.com/santifer/career-ops/blob/main/config/profile.example.yml): user custom · Reusable profile, examples, and localized content that personalize the workspace. · `config/profile.example.yml`
- [Validation tools](https://github.com/santifer/career-ops/blob/main/doctor.mjs): checks and probes · Liveness, pipeline verification, portal checks, and repo health scripts. · `doctor.mjs`
- [CI pipeline](https://github.com/santifer/career-ops/blob/main/.github/workflows): github workflows · Automated testing, security scanning, SBOM, release, and maintenance workflows. · `.github/workflows`

## Connections

- AGENTS core → CLI wrappers: shared by · Common instructions are wrapped for different CLIs.
- CLI wrappers → Modes: invoke · CLI-specific entrypoints expose the mode command surface.
- Profile pack → Modes: customizes · User profile and localized content shape mode behavior.
- Modes → Scan entry: starts discovery · Scan and pipeline modes initiate job intake.
- Scan entry → Portal adapters: collects listings · Scan delegates source-specific fetching to portal adapters.
- Portal adapters → HTTP helpers: uses · Adapters share request/response utilities.
- Portal adapters → Adapter types: normalizes · Adapters map portal data into shared types.
- Scan entry → Browser verify: optionally verifies · Listings can be rechecked in a browser before promotion.
- Scan entry → Local store: stores raw jobs · Discovered jobs are persisted locally for later processing.
- Modes → Analyze engine: drives · Evaluation modes route the job description into analysis.
- Analyze engine → Pattern analysis: consults · Pattern and normalization scripts support fit analysis.
- Analyze engine → Templates: fills · Analysis output feeds document and report templates.
- Templates → LaTeX build: drives · Resume/CV templates are compiled into LaTeX artifacts.
- Templates → Cover letter: drives · Cover-letter templates support tailored letter generation.
- LaTeX build → PDF render: renders to · LaTeX and HTML artifacts are rendered into PDFs.
- PDF render → Local store: writes artifacts · Generated deliverables land in local output and report areas.
- Cover letter → Local store: writes artifacts · Tailored documents are stored with other generated outputs.
- Modes → Tracker core: updates state · Tracker-related modes record canonical application state.
- Tracker core → Status normalizer: canonicalizes · Statuses are normalized into a shared vocabulary.
- Tracker core → Tracker sync: reconciles · Merges, deduplicates, and reserves report numbers.
- Tracker core → Cadence reconcile: schedules follow-up · Follow-up timing is derived from tracker state.
- Tracker core → Dashboard TUI: reads from · The dashboard presents the same local tracking data.
- Batch runner → Analyze engine: parallelizes · Batch mode fans out multiple evaluations across workers.
- Batch runner → Tracker core: records results · Batch outputs are merged back into canonical tracking state.
- Validation tools → Scan entry: checks · Health scripts validate discovery behavior and portal integration.
- Validation tools → Tracker core: checks · Pipeline and liveness checks guard the tracked state flow.
- Validation tools → CI pipeline: feeds · Local validation complements automated repository workflows.
- CI pipeline → Modes: tests prompts · CI exercises the mode and script surface.
- CI pipeline → Validation tools: runs · Workflows execute tests, scans, releases, and maintenance checks.
