# yuvraj3905/career-ops architecture

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

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

## Overview

#### Purpose and Entry Points
career-ops is a local, CLI-agnostic job-search operating system. An AI coding CLI interprets shared instructions and modes to evaluate job descriptions, discover roles, create application artifacts, and maintain a candidate-owned pipeline. Main agent entry points are `AGENTS.md`, `.agents/skills/career-ops/SKILL.md`, and CLI-specific command adapters such as `.opencode/commands/career-ops.md`. Script-level installation/CLI behavior is exposed through `package.json`.

#### Agent Router and Mode Layer
The agent runtime is declarative: the shared skill routes user requests (or pasted URLs/JDs) to workflow modes. Modes encode evaluation criteria, human-review boundaries, language variants, and output expectations rather than implementing an autonomous service.
- `modes/auto-pipeline.md`
- `modes/oferta.md`
- `modes/scan.md`

The primary control flow is: user request → selected mode → local files, browser tools, and scripts → markdown/PDF/tracker outputs. The explicit boundary is human-in-the-loop: drafts and recommendations are produced, but application submission is not automated.

#### Candidate Data and Pipeline Record
User-owned local files are the system of record: CV/profile inputs, Markdown tracker data, reports, and generated output. Scripts parse, update, normalize, lock, merge, and reconcile this state to protect against concurrent agents and duplicate records.
- `config/profile.example.yml`
- `tracker.mjs`
- `tracker-parse.mjs`
- `pipeline-lock.mjs`
- `reconcile-pipeline.mjs`

Runtime state belongs in gitignored `data/`, `reports/`, and `output/`; templates establish expected schemas and canonical statuses in `templates/states.yml` and `DATA_CONTRACT.md`.

#### Discovery and Job Normalization
Scanning uses a registry of job-board/ATS providers and custom portal configuration. `scan.mjs` coordinates discovery, deduplication, and pipeline insertion; provider modules isolate each external feed/API/parser and shared HTTP, DNS, trust, and registry behavior.
- `scan.mjs`
- `providers/_registry.mjs`
- `providers/_http.mjs`
- `providers/greenhouse.mjs`
- `providers/local-parser.mjs`

Discovery may use ATS APIs, public feeds, or web pages. Optional browser verification checks liveness after deduplication before new roles enter the tracker, keeping browser cost bounded. Provider isolation is also the security boundary for untrusted remote content and SSRF-sensitive network access.

#### Evaluation and Application Artifact Flow
For a URL or pasted JD, the agent classifies fit/archetype and performs the A–G evaluation against candidate context. It produces a structured report, tailored CV content, cover/application drafts, and a tracker entry. Deterministic scripts support specialized analyses and artifact lifecycle steps.
- `classify-tier.mjs`
- `prepare-application.mjs`
- `application-artifacts.mjs`
- `generate-cover-letter.mjs`
- `mark-pdf-ready.mjs`

Reports are decision-support artifacts; legitimacy and work-authorization signals remain distinct from the scored fit assessment.

#### Document Rendering and Browser Automation
CV and cover-letter generation render HTML/LaTex sources, then use Playwright/browser tooling for PDFs and optionally visual validation. Template files separate presentation from agent-authored content.
- `generate-pdf.mjs`
- `build-cv-html.mjs`
- `templates/cv-template.html`
- `templates/cover-letter-template.html`

Material runtime dependencies are Node.js for `.mjs` workflows and Playwright/Chromium for rendering, extraction, liveness checks, and form-oriented browser tasks. Fonts and output artifacts remain local.

#### Batch, Integrations, and Dashboard
Batch orchestration delegates independent evaluations to headless AI CLI workers, then aggregates outputs into the same local pipeline. Optional plugins provide explicit integrations; they are disabled by default and encapsulate credentials/network access.
- `batch/batch-runner.sh`
- `batch/batch-prompt.md`
- `plugins/_engine.mjs`
- `plugins/gmail/index.mjs`

A separate Go terminal UI reads and updates the shared tracker rather than replacing it. It uses Bubble Tea/Lipgloss and platform-specific file-lock/process handling.
- `dashboard/main.go`
- `dashboard/internal/data/career.go`
- `dashboard/internal/ui/screens/pipeline.go`

External services include the user-selected AI provider/CLI, ATS and job-board APIs, public company sites, optional Gmail/Notion/Apify plugins, and optional Google Gemini/OpenAI/OpenRouter/Ollama evaluation runners.

Main entry points: [`tracker.mjs`](https://github.com/yuvraj3905/career-ops/blob/main/tracker.mjs) (Tracker operations), [`classify-tier.mjs`](https://github.com/yuvraj3905/career-ops/blob/main/classify-tier.mjs) (Fit evaluation), [`modes/auto-pipeline.md`](https://github.com/yuvraj3905/career-ops/blob/main/modes/auto-pipeline.md) (Workflow modes), [`scan.mjs`](https://github.com/yuvraj3905/career-ops/blob/main/scan.mjs) (Discovery scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Agent workflow"]
  node_user["User request or JD<br/>input"]
  node_agent_entry["Agent instructions<br/>agent entrypoints<br/>[AGENTS.md]"]
  node_modes["Workflow modes<br/>mode definitions<br/>[auto-pipeline.md]"]
end

subgraph group_pipeline["Local pipeline"]
  node_local_state[("Candidate pipeline state<br/>local data")]
  node_data_contract["State schema<br/>data contract<br/>[DATA_CONTRACT.md]"]
  node_tracker["Tracker operations<br/>Node scripts<br/>[tracker.mjs]"]
  node_pipeline_lock["Pipeline lock<br/>concurrency control<br/>[pipeline-lock.mjs]"]
  node_artifacts_output[("Reports and application outputs<br/>local artifacts")]
end

subgraph group_discovery["Role discovery"]
  node_providers{{"Provider registry and HTTP boundary<br/>provider infrastructure<br/>[_registry.mjs]"}}
  node_ats_sources(("ATS and public job sources<br/>external sources"))
  node_scan["Discovery scanner<br/>Node workflow<br/>[scan.mjs]"]
end

subgraph group_artifacts["Evaluation and documents"]
  node_browser{{"Playwright and Chromium<br/>browser runtime"}}
  node_evaluation["Fit evaluation<br/>agent analysis<br/>[classify-tier.mjs]"]
  node_application_prep["Application preparation<br/>artifact workflow"]
  node_document_templates["Document templates<br/>HTML templates<br/>[cv-template.html]"]
  node_pdf_renderer["PDF rendering<br/>Node rendering<br/>[generate-pdf.mjs]"]
end

subgraph group_extensions["Batch and optional clients"]
  node_batch_runner["Batch workers<br/>shell orchestration<br/>[batch-runner.sh]"]
  node_ai_cli(("AI providers and CLI runners<br/>external AI runtime"))
  node_plugins{{"Optional integration plugins<br/>plugin engine<br/>[_engine.mjs]"}}
  node_dashboard["Go terminal dashboard<br/>TUI<br/>[main.go]"]
end

node_user -->|"invokes"| node_agent_entry
node_agent_entry -->|"routes request"| node_modes
node_modes -->|"discovery mode"| node_scan
node_modes -->|"evaluation mode"| node_evaluation
node_modes -->|"application mode"| node_application_prep
node_data_contract -.->|"defines schema"| node_local_state
node_pipeline_lock -->|"guards updates"| node_tracker
node_tracker -->|"reads and updates"| node_local_state
node_providers -->|"fetches from"| node_ats_sources
node_scan -->|"uses"| node_providers
node_scan -.->|"optionally verifies"| node_browser
node_scan -->|"inserts deduplicated roles"| node_tracker
node_local_state -->|"candidate context"| node_evaluation
node_evaluation -->|"writes reports"| node_artifacts_output
node_evaluation -->|"fit decision"| node_application_prep
node_application_prep -->|"populates"| node_document_templates
node_application_prep -->|"creates application entry"| node_tracker
node_document_templates -->|"render source"| node_pdf_renderer
node_browser -->|"browser PDF"| node_pdf_renderer
node_pdf_renderer -->|"stores PDFs"| node_artifacts_output
node_batch_runner -->|"launches workers"| node_ai_cli
node_batch_runner -->|"aggregates evaluations"| node_evaluation
node_plugins -.->|"optional pipeline access"| node_tracker
node_dashboard -->|"reads and updates"| node_tracker

click node_agent_entry "https://github.com/yuvraj3905/career-ops/blob/main/AGENTS.md"
click node_modes "https://github.com/yuvraj3905/career-ops/blob/main/modes/auto-pipeline.md"
click node_local_state "https://github.com/yuvraj3905/career-ops/blob/main/config/profile.example.yml"
click node_data_contract "https://github.com/yuvraj3905/career-ops/blob/main/DATA_CONTRACT.md"
click node_tracker "https://github.com/yuvraj3905/career-ops/blob/main/tracker.mjs"
click node_pipeline_lock "https://github.com/yuvraj3905/career-ops/blob/main/pipeline-lock.mjs"
click node_providers "https://github.com/yuvraj3905/career-ops/blob/main/providers/_registry.mjs"
click node_scan "https://github.com/yuvraj3905/career-ops/blob/main/scan.mjs"
click node_evaluation "https://github.com/yuvraj3905/career-ops/blob/main/classify-tier.mjs"
click node_application_prep "https://github.com/yuvraj3905/career-ops/blob/main/prepare-application.mjs"
click node_document_templates "https://github.com/yuvraj3905/career-ops/blob/main/templates/cv-template.html"
click node_pdf_renderer "https://github.com/yuvraj3905/career-ops/blob/main/generate-pdf.mjs"
click node_batch_runner "https://github.com/yuvraj3905/career-ops/blob/main/batch/batch-runner.sh"
click node_plugins "https://github.com/yuvraj3905/career-ops/blob/main/plugins/_engine.mjs"
click node_dashboard "https://github.com/yuvraj3905/career-ops/blob/main/dashboard/main.go"

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_user,node_agent_entry,node_modes toneBlue
class node_local_state,node_data_contract,node_tracker,node_pipeline_lock,node_artifacts_output toneAmber
class node_providers,node_ats_sources,node_scan toneMint
class node_browser,node_evaluation,node_application_prep,node_document_templates,node_pdf_renderer toneRose
class node_batch_runner,node_ai_cli,node_plugins,node_dashboard toneIndigo
```

## Components

### Agent workflow

Declarative instructions and request routing.

- **User request or JD**: input · Requests, URLs, and pasted job descriptions.
- [Agent instructions](https://github.com/yuvraj3905/career-ops/blob/main/AGENTS.md): agent entrypoints · Shared skill and CLI adapters select workflow behavior. · `AGENTS.md`
- [Workflow modes](https://github.com/yuvraj3905/career-ops/blob/main/modes/auto-pipeline.md): mode definitions · Encode evaluation, review, language, and output rules. · `modes/auto-pipeline.md`

### Local pipeline

Candidate-owned records, outputs, and concurrency controls.

- [Candidate pipeline state](https://github.com/yuvraj3905/career-ops/blob/main/config/profile.example.yml): local data · Gitignored data, reports, and output are the system of record. · `config/profile.example.yml`
- [State schema](https://github.com/yuvraj3905/career-ops/blob/main/DATA_CONTRACT.md): data contract · Defines canonical statuses and expected local data shape. · `DATA_CONTRACT.md`
- [Tracker operations](https://github.com/yuvraj3905/career-ops/blob/main/tracker.mjs): Node scripts · Parses, updates, normalizes, merges, and reconciles records. · `tracker.mjs`
- [Pipeline lock](https://github.com/yuvraj3905/career-ops/blob/main/pipeline-lock.mjs): concurrency control · Protects shared local state from concurrent agents. · `pipeline-lock.mjs`
- **Reports and application outputs**: local artifacts · Decision reports, drafts, CVs, and PDFs; never automatic submission.

### Role discovery

Provider-isolated collection and normalization.

- [Provider registry and HTTP boundary](https://github.com/yuvraj3905/career-ops/blob/main/providers/_registry.mjs): provider infrastructure · Isolates remote feeds and SSRF-sensitive access. · `providers/_registry.mjs`
- **ATS and public job sources**: external sources · APIs, feeds, and company pages supply role listings.
- [Discovery scanner](https://github.com/yuvraj3905/career-ops/blob/main/scan.mjs): Node workflow · Coordinates collection, deduplication, and tracker insertion. · `scan.mjs`

### Evaluation and documents

Decision support and application artifact production.

- **Playwright and Chromium**: browser runtime · Verifies listings, extracts content, renders PDFs, and supports forms.
- [Fit evaluation](https://github.com/yuvraj3905/career-ops/blob/main/classify-tier.mjs): agent analysis · Classifies role fit and creates structured decision reports. · `classify-tier.mjs`
- [Application preparation](https://github.com/yuvraj3905/career-ops/blob/main/prepare-application.mjs): artifact workflow · Builds tailored CV, application drafts, and lifecycle state. · `prepare-application.mjs`
- [Document templates](https://github.com/yuvraj3905/career-ops/blob/main/templates/cv-template.html): HTML templates · Separate presentation from agent-authored content. · `templates/cv-template.html`
- [PDF rendering](https://github.com/yuvraj3905/career-ops/blob/main/generate-pdf.mjs): Node rendering · Builds HTML and produces locally stored PDFs. · `generate-pdf.mjs`

### Batch and optional clients

Independent workers, integrations, and terminal UI.

- [Batch workers](https://github.com/yuvraj3905/career-ops/blob/main/batch/batch-runner.sh): shell orchestration · Delegates independent evaluations to headless AI CLI workers. · `batch/batch-runner.sh`
- **AI providers and CLI runners**: external AI runtime · User-selected local or remote model runners.
- [Optional integration plugins](https://github.com/yuvraj3905/career-ops/blob/main/plugins/_engine.mjs): plugin engine · Disabled-by-default credential and network integrations. · `plugins/_engine.mjs`
- [Go terminal dashboard](https://github.com/yuvraj3905/career-ops/blob/main/dashboard/main.go): TUI · Reads and updates the shared tracker without replacing it. · `dashboard/main.go`

## Connections

- User request or JD → Agent instructions: invokes
- Agent instructions → Workflow modes: routes request
- Workflow modes → Discovery scanner: discovery mode
- Workflow modes → Fit evaluation: evaluation mode
- Workflow modes → Application preparation: application mode
- State schema → Candidate pipeline state: defines schema
- Pipeline lock → Tracker operations: guards updates
- Tracker operations → Candidate pipeline state: reads and updates
- Provider registry and HTTP boundary → ATS and public job sources: fetches from
- Discovery scanner → Provider registry and HTTP boundary: uses
- Discovery scanner → Playwright and Chromium: optionally verifies
- Discovery scanner → Tracker operations: inserts deduplicated roles
- Candidate pipeline state → Fit evaluation: candidate context
- Fit evaluation → Reports and application outputs: writes reports
- Fit evaluation → Application preparation: fit decision
- Application preparation → Document templates: populates
- Application preparation → Tracker operations: creates application entry
- Document templates → PDF rendering: render source
- Playwright and Chromium → PDF rendering: browser PDF
- PDF rendering → Reports and application outputs: stores PDFs
- Batch workers → AI providers and CLI runners: launches workers
- Batch workers → Fit evaluation: aggregates evaluations
- Optional integration plugins → Tracker operations: optional pipeline access
- Go terminal dashboard → Tracker operations: reads and updates
