⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

jobhuntbot

danielpan12@danielpan12⭐ 890 stars· last commit 1mo ago· 0 open issues

A reusable job application workflow for Codex and other AI agents. Use when a user wants to set up or run an AI-assisted job search system: collecting a candidate profile, creating an application dashboard, defining screening and resume-routing rules, finding and ranking job leads, applying to jobs within explicit safety boundaries, recording outcomes, triaging blockers, or iterating a job application workflow.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐ 890 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

JobHuntBot

English below · 中文 在下方

An agent-led job application workflow and local progress-tracking dashboard. It works with any AI coding agent that can read a file and follow written instructions (Claude Code, Codex CLI, Cursor, etc.) — there's no special integration required, you just point the agent at SKILL.md and tell it to follow the workflow. It turns scattered job hunting into a repeatable system: candidate profile, screening rules, resume strategy, application execution, blocker triage, follow-up, and a browser-based dashboard to see it all at a glance.

This is not a one-click auto-apply bot. It is a structured workflow plus explicit safety boundaries — the agent fills all reachable, confirmed fields before collecting missing facts in one handoff. Final submission requires authorization, and an existing authorization remains valid within its stated scope.

What's in this repo

SKILL.md                        Core agent workflow and safety contract — start here
references/
  setup-workflow.md             Step-by-step onboarding the agent should follow
  application-playbook.md       Browser/ATS handling playbook (forms, uploads, CAPTCHA, etc.)
  lead-discovery.md             Official-source coverage, role comparison and evidence checks
  safety-and-boundaries.md      Privacy, consent, and what should never be automated
templates/
  candidate_profile.template.json    Your facts: identity, contact, work authorization, targets
  application_rules.template.md      What to prioritize, consider, skip, or hand off to you
  resume_routing.template.md        Which resume/version to use for which role family
  answer_bank.template.md           Reusable truthful answers for common application questions
  experience_bank.template.md       Which internships/projects to feature per role family and JD
  application-progress.template.json Private checkpoint for resuming unfinished forms
  dashboard-template/               Empty CSV dashboard + field reference (see its README.md)
dashboard/                       A ready-to-run local dashboard (same CSV schema as the template)
  server.js                     Local Node.js server with validated outcome/calendar updates
  dashboard.html                 The dashboard UI itself
  csv-store.js / dashboard-model.js CSV integrity and dashboard counting/matching rules
  scripts/ / tests/              Data checks and regression tests
  start-dashboard.bat / .sh     One-click launcher (Windows / macOS-Linux)
  *.csv                          Empty starter data files

Quick Start

  1. Download or clone this repo to your machine (or point your coding agent at the GitHub URL).

  2. Give the agent browser access — required for actually filling out applications. Research/lead-finding (step 5 below) can use public web sources, but step 7 in SKILL.md (filling out real forms and uploading a resume) needs the agent to control a real browser. Set this up once, before you ask it to apply to anything:

    • Claude Code: add the Playwright MCP server so the agent gets browser tools (navigate, click, type, fill forms, upload files, take snapshots):
      claude mcp add playwright npx '@playwright/mcp@latest'
      
      Restart/reopen your Claude Code session afterward so it picks up the new tools.
    • Codex CLI or another agent: check whether it has an equivalent browser-automation or computer-use capability (a Playwright-based MCP server, a built-in browser tool, etc.) and enable it the way that agent documents. Without it, the agent can still do everything up through lead-finding and drafting — it just can't open a real application page and submit it for you.
    • You can skip this entirely if you only want the lead-finding/dashboard-tracking half of the workflow and plan to submit applications yourself.
  3. Create a separate private working directory and put your materials there. Keep this public repository as the reusable package. Ask the agent to copy its templates and dashboard into the private workspace, then place your resume (ideally an editable DOCX/Markdown source), transcript and project notes in that workspace's my-materials/ folder. .gitignore helps with untracked files but cannot protect changes to already tracked CSVs or templates. Then tell the agent where to look:

    My resume, transcript, and project notes are in my-materials/. Read them before we start.
    
  4. Start a session with your AI coding agent (Claude Code, Codex CLI, or any agent that can read local files) in this folder and say:

    Use SKILL.md to initialize my job search workflow.
    

    The agent will ask a small set of minimum-viable questions and create personal copies such as candidate_profile.json and application_rules.md in the private workspace, using the source materials and your answers. The public templates/ files stay empty. Missing sensitive facts remain unknown until you confirm them.

  5. Run a safe first trial. Tell the agent explicitly:

    Do a lead-finding-only trial: find 3-5 jobs, classify them, update the dashboard, and don't open application flows or submit anything.
    

    This step only needs web search, not the browser automation from step 2 — it's the recommended way to see the workflow work before it touches any real application form.

  6. Open the dashboard to see progress:

    • Windows: double-click dashboard/start-dashboard.bat
    • macOS/Linux: run dashboard/start-dashboard.sh (requires Node.js installed; chmod +x it once if needed)
    • This opens http://localhost:8420/dashboard.html in your browser. It reads the CSVs in the same folder live — every refresh shows the latest state, no build step, no external server, nothing leaves your machine.
  7. Keep applying with the agent's help, one company at a time — this is where the browser automation from step 2 actually gets used. It updates job_pool.csv, application_log.csv, blocker_queue.csv, and follow_up.csv as it goes, and asks for submission approval only when the current application does not already have it.

Faster Form Filling

The workflow defaults to filling a complete form section, or several predictable adjacent sections, in one browser-tool call. The agent prepares confirmed answers once, checks saved values and validation errors together, and repairs only differences. If a batch is interrupted, it checks what was saved and resumes from unfinished fields. Dependent controls still wait for real options. Local gaps do not stop independent sections; inaccessible pages and unsaved fields are recorded honestly. Existing submission authorization is reused within scope. See the application playbook for the execution rules.

The Dashboard

The dashboard is a static HTML page + a tiny local Node server (no framework, no build, no external dependencies). It presents four progress views plus a consolidated action queue:

  • Applied — rows with status = Submitted, with follow-up timeline and how each was submitted. Expand a card and click "记录投递结果" (Record outcome) at the bottom, then "拿到 Offer" (Offer received) or "已挂" (Rejected) — this writes the new status straight back into job_pool.csv and the job moves to the matching Offer or Rejected view on next refresh. (The local server also confirms the row still matches company + job title before writing, in case the agent updated the same file in the meantime.)
  • Pending — companies with status = Pending / Needs user roles and no submitted/ended history, grouped by company and split into "confirmed open, not yet applied" vs. "not open / unclear" using the cohort_match_status column (see templates/dashboard-template/README.md for the full field reference).
  • Rejected — rows marked Rejected, with its own count, search and category fi

// HOW IT'S BUILT

// FILES

50 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • SKILL.md15 KBb56d5f6b5108upstream ↗
    ---
    name: jobhuntbot
    description: "A reusable job application workflow for Codex and other AI agents. Use when a user wants to set up or run an AI-assisted job search system: collecting a candidate profile, creating an application dashboard, defining screening and resume-routing rules, finding and ranking job leads, applying to jobs within explicit safety boundaries, recording outcomes, triaging blockers, or iterating a job application workflow."
    ---
    
    # JobHuntBot
    
    JobHuntBot is a job application operating workflow for AI agents. It helps users turn job searching into a repeatable system: profile, dashboard, screening rules, resume strategy, application execution, blocker triage, and follow-up.
    
    ## Core Contract 
    
    Optimize for truthful, traceable, interview-generating applications, not blind volume.
    
    Treat setup as an agent-led onboarding flow, not a user homework packet. Ask only for the minimum information needed to start safely, create drafts/templates for the user, then iterate after the first trial run.
    
    Before searching or applying, make sure the user has:
    
    1. A candidate profile.
    2. A dashboard or workbook for tracking outcomes.
    3. Application screening rules.
    4. A resume strategy.
    5. Clear safety boundaries for browser automation and form answers.
    
    If any source is missing, initialize it first. Do not guess identity, legal, work authorization, compensation, current employment, sponsorship, relocation, or other high-impact facts.
    
    Once an application is authorized, complete all reachable fields supported by confirmed facts before requesting missing information. A missing answer or failed widget normally blocks that field or module, not the whole application. Follow the scope, consolidated handoff and resume rules in `references/application-playbook.md`; reuse existing authorization within its company/role/material scope.
    
    ## Workflow
    
    ### 1. Initialize the System
    
    Read `references/setup-workflow.md` when:
    
    - The user is installing JobHuntBot for the first time.
    - The user asks to create a profile, dashboard, rules, templates, or GitHub-ready setup.
    - The user has not provided enough information for safe applications.
    
    Use the templates in `templates/` to create user-owned files:
    
    - `candidate_profile.template.json`
    - `application_rules.template.md`
    - `resume_routing.template.md`
    - `answer_bank.template.md`
    - `experience_bank.template.md`
    - `dashboard-template/*.csv`
    
    ### 2. Confirm the Company and Research the Opening
    
    Read `references/lead-discovery.md` before finding, comparing, excluding or rechecking openings. Work one company at a time, checking the official portal with targeted and broader searches. Verify the full JD and actual eligibility text, retain official role URLs, and record coverage limits rather than equating an empty filter with no openings.
    
    Reuse existing company categories. For a new company, apply the user's category definitions and record sourced recommendation provenance before adding its pool records. Use `record_type=company_summary` for company-level research and `role` for actual jobs. Update `cohort_match_status` explicitly as `Yes`, `No` or `Unclear` for active research rows; do not infer it from notes or inherit company-wide eligibility for every role.
    
    Preserve prior rejected attempts while considering other permitted roles or cycles. Verify current employer limits and available slots before applying again; a rejection does not automatically restore a slot. Research and workflow repair do not authorize a new application or publication.
    
    ### 3. Screen Before Applying
    
    Read the user's current application rules and compare actual duties, verified experience fit, work arrangements, career and business context, compensation and feasibility. A title, keyword or workplace setting alone must not determine fit. Use the configured recruiting-season policy: freshness affects urgency, while an older posting can remain open and relevant.
    
    Skip or defer roles that violate the user's rules, are clearly overleveled, are closed or duplicate, require unsupported work authorization, need missing materials, or involve long account-heavy flows with weak fit.
    
    This is a research/prioritization rule. Once the user authorizes filling a target, missing materials do not automatically cancel the fill pass: complete independent reachable sections, then report the affected scope and remaining prerequisites under the playbook.
    
    ### 4. Compare Specific Positions and Resume Variants
    
    Compare multiple genuine matches at the company when available before filling. Present exact title/ID, team, city, official URL, eligibility, concrete experience evidence and gaps, work arrangements, career/business context, compensation basis and recommended resume. Report fewer matches honestly rather than padding with unrelated roles. Label facts, inferences and unknowns, following `references/lead-discovery.md`.
    
    If a company limits applicants to one or two total submissions in the cycle, say so before the user picks. Present the role, city and recommended resume together when the choice is still open. Reuse an approved pairing or explicitly delegated selection; do not re-ask during filling or resuming. A routing recommendation alone does not authorize an application.
    
    ### 5. Match Experience to the Role
    
    Read the chosen resume before creating structured internship and project entries. Those entries should mirror the resume and any explicit user-required additions; do not independently choose a shorter JD-matched subset from the experience bank. State the intended entries in a brief progress notice and continue the already authorized work. If the site caps entries, reuse an applicable authorized selection or queue that choice while completing independent sections; do not silently omit experiences.
    
    Use `experience_bank.md` earlier to compare resume variants and later to support tailored free-text answers. Emphasize the verified experiences that best fit the specific JD and field length; a relevance matrix is not permission to invent facts or remove structured resume entries. Self-evaluation and cover-letter text should connect the candidate's evidence to this role rather than dump a generic biography. After submission, record which entries and materials were actually used.
    
    ### 6. Route the Resume Strategy
    
    Use the user's chosen strategy:
    
    - Precision mode: screen for high-fit jobs first, then tailor resume/materials before applying.
    - Volume mode: use prebuilt resume variants by role family and move quickly.
    
    Default to Volume mode unless the user explicitly asks for Precision. Individual high-fit roles can be promoted from Volume to Precision.
    
    Preserve an approved role/resume pairing. Do not silently switch files during filling; resolve a genuinely new material choice together with other outstanding decisions.
    
    Whenever a resume is created or tailored for a posting, treat these as acceptance criteria:
    
    - Select the internships and projects that best support the JD from the candidate's verified experience inventory; preserve the chosen entries' material facts and avoid repetitive evidence.
    - Write every internship and project entry using STAR. Across the entry's bullets, make the situation/task, the candidate's specific actions, and the result explicit. Do not invent a result or metric; if the source material cannot support a complete STAR account, obtain the missing fact or use an honest qualitative outcome.
    - Sort education, internships, and projects independently in reverse chronological order. An ongoing entry comes first; otherwise compare end date, then start date when end dates tie. Do not reorder these sections by JD relevance.
    - Deliver a PDF that is exactly one page and visually fills that page without overflow or a conspicuously empty bottom area. Iterate on wording, the number and length of non-duplicative bullets, spacing, and readable typography; do not omit material information merely to fit or repeat content merely to fill space.
    - Render the final PDF, verify that its page count is exactly one, and inspect the rendered page before considering the tailored resume complete.
    
    Never fabricate experience, credentials, degrees, employers, dates, work authorization, or portfolio artifacts.
    
    ### 7. Fill Out the Application
    
    Read `references/application-playbook.md` before operating browser-based applications, LinkedIn Easy Apply, Simplify, Greenhouse, Lever, Ashby, Workday, or other ATS flows.
    
    Read the user's `application_rules.md` for current execution preferences. Default to the playbook's **Batch Filling & Consolidated Verification**: prepare confirmed answers once, fill the largest predictable group of fields in one tool call, then inspect the saved module together and repair only discrepancies. Group adjacent simple modules when the page and controls remain predictable; avoid a separate model turn or full-page read after each field.
    
    On a new form, prefer uploading the chosen resume first and auditing the parsed entries together. Avoid re-parsing an already repaired form unless necessary, since parsing can overwrite corrections. Fill whatever you confidently can from `candidate_profile.json`, `resume_routing.md`, `experience_bank.md` (for relevant-experience/self-evaluation fields, using the combo picked in step 5), and `answer_bank.md`. Collect questions together for anything on the `never_guess` list, anything requiring a subjective call, or anything not backed by the résumé or profile; leave those fields pending while filling independent confirmed fields. Verify saved-account bio text before retaining it in a real submission.
    
    Do not bypass verification, login, permission or other site controls. Queue local missing facts, materials and widget failures while filling independent reachable sections. Hand off immediately only when a whole-application gate leaves no further authorized form work reachable; report uninspected pages honestly. Use `templates/application-progress.template.json` for a private resumable draft, separate from disposable working files.
    
    ### 8. Verify the Application and Submission Authorization
    
    Before final submission, verify the whole reachable application and show a concise summary of company, role, resume, actual experiences, key answers and gaps. Reuse existing explicit submission authorization for this unchanged application, including “complete it and submit,” once required facts/materials and checks are complete. Otherwise request approval together with the consolidated missing-information review; permission to fill or an informative preview is not submission consent. A consequential change outside the authorization needs a focused decision. Verify real confirmation evidence before recording `Submitted`; inspect application history before retrying an uncertain submission to avoid duplicates.
    
    ### 9. Sync Everything — Dashboard and Profile
    
    The bundled dashboard has separate Applied, Pending, Rejected and Offer views plus a consolidated action queue. Pending groups active leads by company and excludes companies with submitted or ended history; this display rule does not exclude permitted additional applications from research. The other progress views count role records, not `company_summary` rows. The action queue combines open/retry-later blockers and `Needs user` / `Blocked` jobs, including gaps at companies already applied to.
    
    Every job lead or attempt must end in one of these states:
    
    - `Submitted`: explicit confirmation was seen.
    - `Skipped`: not worth applying, with reason.
    - `Blocked`: automation could not proceed, with blocker and next step.
    - `Needs user`: user must provide a missing high-impact fact, complete CAPTCHA/login/upload, answer a sensitive question, or make a required judgment before the agent can decide.
    - `Pending`: selected for later action because it appears worth reviewing or applying after known prerequisites are satisfied.
    - `Rejected`: a confirmed rejection for this application; keep its history.
    - `Offer`: the user or reliable evidence confirms an offer was received. Passing an interview stage is not an offer, and receipt is not acceptance.
    
    Count only confirmed submissions. Saved jobs, trackers, autofill badges, or "quick apply" labels do not count.
    
    For a first trial or demo run, default to lead finding only: find, screen, classify, and update the dashboard without opening real application flows or submitting anything. In lead-finding-only runs, update `job_pool`, `daily_dashboard`, `blocker_queue`, and `automation_rules` as needed; leave `application_log` empty because no application attempt occurred.
    
    For an existing tracker, preserve historical application logs during lead-only work. Record an externally reported offer or rejection with its confirmation source and known facts; do not fabricate a submission, receipt date, acceptance or calendar event. Preserve the original compensation wording and label any annualized calculation and unknown assumptions.
    
    For a real submission, update the same dashboard files (`job_pool` status, `application_log` with the resume version/evidence/answers used, `follow_up` if a next step is already known, `daily_dashboard` summary) *and* the candidate's own profile: if filling the form surfaced a fact that isn't already in `candidate_profile.json` (a new internship detail, an updated exam/grade result, a preference the user stated on the spot, anything), write it back into the profile before moving on — don't let it live only in the one application you just filed. Same discipline as everywhere else in this skill: record what you've confirmed, don't invent what you haven't.
    
    When recording a submission in `application_log`, also capture the full job description text (responsibilities and requirements) from the official posting into the `job_description` field, copied verbatim from the source — not summarized or paraphrased. This is what makes later interview prep possible without having to re-find a posting that may since have been taken down.
    
    For the bundled CSV dashboard, use `dashboard/csv-store.js` snapshot reads and atomic writes, preserve unrelated rows, and match dates/JDs by exact role rather than borrowing another role at the company. Run `node dashboard/scripts/audit-data.js` after data edits and `node dashboard/scripts/company-categories.js --check` after discovery/classification changes. Use the relevant dashboard tests for code changes. Report historical gaps without inventing missing evidence.
    
    ### 10. Learn From Blockers
    
    After each run, summarize blockers and convert repeated issues into rules. JobHuntBot should improve through use: address matching, dropdown handling, resume upload checks, account/session checks, and ATS-specific lessons belong in the dashboard and rules.
    
    ## Safety
    
    Read `references/safety-and-boundaries.md` when the user asks about automation limits, CAPTCHA, email verification, account login, privacy, public sharing, or what should not be included in a repo.
    
    Do not publish or copy private resumes, phone numbers, emails, addresses, immigration documents, application history, browser sessions, cookies, OTPs, or user-specific secrets into a public JobHuntBot package.
    
  • README.md22 KB3fd3f7a45fe4upstream ↗
    # JobHuntBot
    
    **English** below · [中文](#中文说明) 在下方
    
    An agent-led job application workflow and local progress-tracking dashboard. It works with any AI coding agent that can read a file and follow written instructions (Claude Code, Codex CLI, Cursor, etc.) — there's no special integration required, you just point the agent at `SKILL.md` and tell it to follow the workflow. It turns scattered job hunting into a repeatable system: candidate profile, screening rules, resume strategy, application execution, blocker triage, follow-up, and a browser-based dashboard to see it all at a glance.
    
    This is not a one-click auto-apply bot. It is a structured workflow plus explicit safety boundaries — the agent fills all reachable, confirmed fields before collecting missing facts in one handoff. Final submission requires authorization, and an existing authorization remains valid within its stated scope.
    
    ## What's in this repo
    
    ```
    SKILL.md                        Core agent workflow and safety contract — start here
    references/
      setup-workflow.md             Step-by-step onboarding the agent should follow
      application-playbook.md       Browser/ATS handling playbook (forms, uploads, CAPTCHA, etc.)
      lead-discovery.md             Official-source coverage, role comparison and evidence checks
      safety-and-boundaries.md      Privacy, consent, and what should never be automated
    templates/
      candidate_profile.template.json    Your facts: identity, contact, work authorization, targets
      application_rules.template.md      What to prioritize, consider, skip, or hand off to you
      resume_routing.template.md        Which resume/version to use for which role family
      answer_bank.template.md           Reusable truthful answers for common application questions
      experience_bank.template.md       Which internships/projects to feature per role family and JD
      application-progress.template.json Private checkpoint for resuming unfinished forms
      dashboard-template/               Empty CSV dashboard + field reference (see its README.md)
    dashboard/                       A ready-to-run local dashboard (same CSV schema as the template)
      server.js                     Local Node.js server with validated outcome/calendar updates
      dashboard.html                 The dashboard UI itself
      csv-store.js / dashboard-model.js CSV integrity and dashboard counting/matching rules
      scripts/ / tests/              Data checks and regression tests
      start-dashboard.bat / .sh     One-click launcher (Windows / macOS-Linux)
      *.csv                          Empty starter data files
    ```
    
    ## Quick Start
    
    1. **Download or clone this repo** to your machine (or point your coding agent at the GitHub URL).
    
    2. **Give the agent browser access — required for actually filling out applications.** Research/lead-finding (step 5 below) can use public web sources, but step 7 in `SKILL.md` (filling out real forms and uploading a resume) needs the agent to control a real browser. Set this up once, before you ask it to apply to anything:
       - **Claude Code**: add the Playwright MCP server so the agent gets browser tools (navigate, click, type, fill forms, upload files, take snapshots):
         ```bash
         claude mcp add playwright npx '@playwright/mcp@latest'
         ```
         Restart/reopen your Claude Code session afterward so it picks up the new tools.
       - **Codex CLI or another agent**: check whether it has an equivalent browser-automation or computer-use capability (a Playwright-based MCP server, a built-in browser tool, etc.) and enable it the way that agent documents. Without it, the agent can still do everything up through lead-finding and drafting — it just can't open a real application page and submit it for you.
       - You can skip this entirely if you only want the lead-finding/dashboard-tracking half of the workflow and plan to submit applications yourself.
    
    3. **Create a separate private working directory and put your materials there.** Keep this public repository as the reusable package. Ask the agent to copy its templates and dashboard into the private workspace, then place your resume (ideally an editable DOCX/Markdown source), transcript and project notes in that workspace's `my-materials/` folder. `.gitignore` helps with untracked files but cannot protect changes to already tracked CSVs or templates. Then tell the agent where to look:
    
       ```text
       My resume, transcript, and project notes are in my-materials/. Read them before we start.
       ```
    
    4. **Start a session with your AI coding agent** (Claude Code, Codex CLI, or any agent that can read local files) in this folder and say:
    
       ```text
       Use SKILL.md to initialize my job search workflow.
       ```
    
       The agent will ask a small set of minimum-viable questions and create personal copies such as `candidate_profile.json` and `application_rules.md` in the private workspace, using the source materials and your answers. The public `templates/` files stay empty. Missing sensitive facts remain unknown until you confirm them.
    
    5. **Run a safe first trial.** Tell the agent explicitly:
    
       ```text
       Do a lead-finding-only trial: find 3-5 jobs, classify them, update the dashboard, and don't open application flows or submit anything.
       ```
    
       This step only needs web search, not the browser automation from step 2 — it's the recommended way to see the workflow work before it touches any real application form.
    
    6. **Open the dashboard** to see progress:
       - Windows: double-click `dashboard/start-dashboard.bat`
       - macOS/Linux: run `dashboard/start-dashboard.sh` (requires [Node.js](https://nodejs.org/) installed; `chmod +x` it once if needed)
       - This opens `http://localhost:8420/dashboard.html` in your browser. It reads the CSVs in the same folder live — every refresh shows the latest state, no build step, no external server, nothing leaves your machine.
    
    7. **Keep applying with the agent's help**, one company at a time — this is where the browser automation from step 2 actually gets used. It updates `job_pool.csv`, `application_log.csv`, `blocker_queue.csv`, and `follow_up.csv` as it goes, and asks for submission approval only when the current application does not already have it.
    
    ### Faster Form Filling
    
    The workflow defaults to filling a complete form section, or several predictable adjacent sections, in one browser-tool call. The agent prepares confirmed answers once, checks saved values and validation errors together, and repairs only differences. If a batch is interrupted, it checks what was saved and resumes from unfinished fields. Dependent controls still wait for real options. Local gaps do not stop independent sections; inaccessible pages and unsaved fields are recorded honestly. Existing submission authorization is reused within scope. See [the application playbook](references/application-playbook.md#batch-filling--consolidated-verification) for the execution rules.
    
    ## The Dashboard
    
    The dashboard is a static HTML page + a tiny local Node server (no framework, no build, no external dependencies). It presents four progress views plus a consolidated action queue:
    
    - **Applied** — rows with `status = Submitted`, with follow-up timeline and how each was submitted. Expand a card and click **"记录投递结果" (Record outcome)** at the bottom, then **"拿到 Offer" (Offer received)** or **"已挂" (Rejected)** — this writes the new status straight back into `job_pool.csv` and the job moves to the matching Offer or Rejected view on next refresh. (The local server also confirms the row still matches company + job title before writing, in case the agent updated the same file in the meantime.)
    - **Pending** — companies with `status = Pending` / `Needs user` roles and no submitted/ended history, grouped by company and split into "confirmed open, not yet applied" vs. "not open / unclear" using the `cohort_match_status` column (see `templates/dashboard-template/README.md` for the full field reference).
    - **Rejected** — rows marked `Rejected`, with its own count, search and category filter.
    - **Offer received** — rows marked `Offer`, separately counted and filtered; passing an interview stage is not an offer.
    
    The **Action queue** combines open `blocker_queue.csv` items with `Needs user` / `Blocked` roles, preserving multiple gaps and post-submission corrections. Applied/Rejected/Offer counts exclude `record_type=company_summary`; dates and JD match the exact role. CSV writes validate snapshots and roll back failed multi-file updates.
    
    Below the views, a **7-day calendar** shows upcoming events (tests, interviews, anything you schedule) for jobs in the Applied bucket. Click **"+ 添加日程"** to add one: pick the date/time, search for the company/job from your already-submitted list, and type the event content freely (e.g. "二轮面试", "笔试") — whatever you type is used verbatim, since every company's process reads differently. Saving an event also stamps that job's `current_stage` in `job_pool.csv` with the same text, so the Applied card immediately shows it. Events can be edited or deleted later from the calendar; deleting one does not revert `current_stage` (there's no reliable "previous stage" to roll back to — edit it manually if needed). Calendar data lives in `follow_up.csv`.
    
    You can open the CSVs directly in Excel/Google Sheets/Numbers too — the dashboard is a view on the same files, with writes limited to the outcome and calendar actions above.
    
    **Important:** open the dashboard through `start-dashboard.bat`/`start-dashboard.sh`, not by double-clicking `dashboard.html` directly — the page fetches the CSVs over `http://`, which browsers block when a file is opened directly from disk.
    
    ## Safety Boundaries (read `references/safety-and-boundaries.md` for the full list)
    
    The agent should never:
    
    - Guess identity, work authorization, compensation, or legal facts.
    - Bypass CAPTCHA, Cloudflare, or anti-bot checks, or auto-login through unknown accounts/2FA.
    - Fabricate experience, credentials, or portfolio work.
    - Count a saved/tracked job as a submitted application.
    - Click final submit without authorization covering the current application; an unchanged, already authorized submission does not require another confirmation.
    
    ## Privacy
    
    This repo ships empty templates and an empty dashboard — no personal data. Once you fill in `candidate_profile.json`, `job_pool.csv`, and the rest with your own information, **do not publish that filled-in copy publicly** (don't push your personal fork's data to a public repo, don't screenshot it into an issue, etc.). Keep your working copy private; only the workflow/template layer is meant to be shared.
    
    ## Validation and Public Releases
    
    From the repository root:
    
    ```sh
    node scripts/check-public-package.js
    node --test scripts/check-public-package.test.js
    node --test dashboard/tests/*.test.js
    ```
    
    The public-package check rejects filled starter databases and forbidden private artifacts. Inspect the staged diff as well; no automated check can prove that free text or Git history is anonymous. The regression suite covers CSV parsing/atomic writes, role matching, outcome separation and the action queue. Its browser test runs when Playwright and a compatible browser are available; otherwise that test is skipped. CI runs the public-package check and available tests.
    
    After editing data in a private operational copy, use `node dashboard/scripts/audit-data.js` and `node dashboard/scripts/company-categories.js --check`. Preserve historical gaps explicitly instead of inventing facts to clear warnings.
    
    ## License
    
    MIT — see `LICENSE`. This project is a renamed/adapted derivative of Yvonne He's open-source *ApplyPilot* workflow; the original copyright notice is preserved in `LICENSE` (as required by its MIT license) alongside a copyright line for this adaptation.
    
    ---
    
    ## 中文说明
    
    一个由 AI Agent 驱动的求职投递工作流,配一个本地的求职进度追踪看板。它适用于任何能读文件、能听懂并执行文字指令的编程 Agent(Claude Code、Codex CLI、Cursor 等)——不需要任何特殊的官方集成,你只需要让 Agent 打开 `SKILL.md` 并按照里面的工作流执行即可。它会把零散的投递过程变成一套可重复的系统:候选人信息、筛选规则、简历策略、投递执行、卡点处理、后续跟进,外加一个网页版进度看板。
    
    这不是一个"一键自动海投"的机器人。它是一套结构化流程 + 明确的安全边界——先填完所有可达且已确认的内容,再集中询问未知事实。最终提交需有授权;在范围不变时沿用已经取得的授权,不重复确认。
    
    ### 这个仓库里有什么
    
    ```
    SKILL.md                        Agent 核心工作流与安全约定 —— 从这里开始
    references/
      setup-workflow.md             Agent 应遵循的分步初始化流程
      application-playbook.md       浏览器/ATS 操作手册(表单、上传、验证码等)
      lead-discovery.md             官方岗位搜索覆盖、比较与证据规则
      safety-and-boundaries.md      隐私、知情同意、以及绝不应自动化的事项
    templates/
      candidate_profile.template.json    你的基本信息:身份、联系方式、工作资格、目标岗位
      application_rules.template.md      哪些优先投、需要人工复核、直接跳过或转交给你决定
      resume_routing.template.md         不同岗位族使用哪个简历版本
      answer_bank.template.md           常见申请问题的可复用真实回答
      experience_bank.template.md       针对不同岗位族/JD该用哪几段实习或项目经历
      application-progress.template.json 私有续填检查点
      dashboard-template/               空白CSV看板 + 字段说明(见其中的 README.md)
    dashboard/                       开箱即用的本地进度看板(CSV结构与模板一致)
      server.js                     本地 Node.js 服务及结果/日程写入校验
      dashboard.html                 看板界面本体
      csv-store.js / dashboard-model.js CSV完整性及看板计数/关联逻辑
      scripts/ / tests/              数据检查与回归测试
      start-dashboard.bat / .sh     一键启动脚本(Windows / macOS-Linux)
      *.csv                          空白起始数据文件
    ```
    
    ### 快速开始
    
    1. **下载或克隆本仓库**到本地(或者直接把 GitHub 地址发给你的编程 Agent)。
    
    2. **给 Agent 配上操作浏览器的能力——真正投递表单时必须要有。** 下面第5步的"仅找岗位"调研可以使用公开网页来源,但 `SKILL.md` 第7步(填真实表单、上传简历)需要 Agent 能真正操作浏览器。建议在真正开始投递前先配好:
       - **Claude Code**:装上 Playwright MCP,让 Agent 拿到浏览器操作工具(打开页面、点击、输入、填表单、上传文件、截图等):
         ```bash
         claude mcp add playwright npx '@playwright/mcp@latest'
         ```
         装完之后重新开一个 Claude Code 会话,让它加载上新工具。
       - **Codex CLI 或其他 Agent**:去查一下它有没有对应的浏览器自动化/computer-use 能力(比如基于 Playwright 的 MCP、内置的浏览器工具等),按它自己的文档启用。没配这个也不影响"仅找岗位"调研和草拟材料这部分,只是没法真的帮你打开表单页面并点提交。
       - 如果你只想用"找岗位+看板追踪"这一半功能,自己手动投递,这一步可以完全跳过。
    
    3. **另建私有工作目录,把原始材料放在那里。** 本仓库保留为可复用发布包,让 Agent 把模板和看板复制到私有工作区。简历(最好包含可编辑的 DOCX/Markdown 源文件)、成绩单和项目文档放到私有工作区的 `my-materials/`。`.gitignore` 能帮助排除未跟踪文件,但无法阻止已经跟踪的 CSV 或模板被填入个人数据后提交。然后告诉 Agent 去哪找:
    
       ```text
       我的简历、成绩单和项目经历都在 my-materials/ 里,开始之前先读一下。
       ```
    
    4. **在这个文件夹里跟你的 AI 编程助手**(Claude Code、Codex CLI,或任何能读取本地文件的 Agent)开一个新会话,说:
    
       ```text
       使用 SKILL.md 帮我初始化求职工作流。
       ```
    
       Agent 会问一小组必要问题,结合材料和回答,在私有工作区创建 `candidate_profile.json`、`application_rules.md` 等个人文件;公开仓库的 `templates/` 保持空白。尚未确认的敏感事实留空,不会猜测。
    
    5. **先做一次安全的试运行**,明确告诉 Agent:
    
       ```text
       先做一次"仅找岗位"的试运行:找3-5个岗位、分类、更新看板,不要打开投递流程也不要提交任何申请。
       ```
    
       这一步只需要网页搜索,不需要第2步配的浏览器自动化——建议先用这种方式看工作流跑起来是什么样子,再让它真正接触投递表单。
    
    6. **打开进度看板**查看情况:
       - Windows:双击 `dashboard/start-dashboard.bat`
       - macOS/Linux:运行 `dashboard/start-dashboard.sh`(需要先安装 [Node.js](https://nodejs.org/);如有需要先执行一次 `chmod +x`)
       - 会在浏览器打开 `http://localhost:8420/dashboard.html`,实时读取同目录下的 CSV——每次刷新都是最新状态,不需要构建、不需要外部服务器,数据也不会离开你的电脑。
    
    7. **在 Agent 的帮助下继续投递**,一次处理一家公司——这一步才会真正用到第2步配的浏览器自动化。它会持续更新 `job_pool.csv`、`application_log.csv`、`blocker_queue.csv`、`follow_up.csv`,尚未取得本次提交授权时才在完整核验后集中请求确认,已有授权不重复索取。
    
    ### 填报提速
    
    工作流默认在一次浏览器工具调用中填写完整模块,条件明确时合并多个相邻模块。Agent 会集中准备已确认信息,统一核对保存结果和报错,只修复差异;批次中断后先核对已保存内容,再从未完成处续填。局部缺失不打断其他可填模块;记录尚未检查的页面和未保存内容。联动控件仍等待真实选项,最终提交沿用适用范围内的已有授权。具体执行规则见[填报操作手册](references/application-playbook.md#batch-filling--consolidated-verification)。
    
    ### 关于看板
    
    看板是一个纯静态网页 + 一个很小的本地 Node 服务器(没有框架、不需要构建、没有外部依赖)。它提供四类进度视图及集中待办入口:
    
    - **已投递** —— `status = Submitted` 的记录,附带后续跟进时间线和投递方式。展开某张卡片,点最下方的 **"记录投递结果"**,再选 **"拿到 Offer"** 或 **"已挂"**——会直接把新状态写回 `job_pool.csv`,刷新后这条记录就会进入对应的"拿到 Offer"或"已挂"列表。(本地服务器写入前会先核对这一行的公司+职位是否还对得上,防止 Agent 恰好同时改过这份文件导致写错行。)
    - **未投递** —— `status = Pending` / `Needs user` 的岗位按公司合并,并排除已有投递或终态历史的公司,根据 `cohort_match_status` 列区分"已确认开放但还没投"和"未开放/状态不明"(完整字段说明见 `templates/dashboard-template/README.md`)。
    - **已挂** —— 标记为 `Rejected` 的岗位,单独计数、搜索与分类筛选。
    - **拿到 Offer** —— 标记为 `Offer` 的岗位,单独计数、搜索与分类筛选;面试过关仍记录在当前阶段,不记为Offer。
    
    你也可以直接用 Excel/Google Sheets/Numbers 打开这些 CSV;看板使用同一份数据,通过“记录投递结果”和日程操作写回文件。
    
    **集中待办** 汇总开放阻塞项与 `Needs user` / `Blocked` 岗位,同岗多个缺漏与提交后问题都保留。已投/已挂/Offer按准确岗位关联日志,`company_summary` 不重复计数。后端严格校验CSV、核对编辑快照,并在联动文件写入失败时回滚。
    
    **注意:** 请通过 `start-dashboard.bat`/`start-dashboard.sh` 打开看板,不要直接双击 `dashboard.html`——页面需要通过 `http://` 读取 CSV 数据,直接从磁盘打开文件时浏览器会拦截这类请求。
    
    ### 安全边界(完整清单见 `references/safety-and-boundaries.md`)
    
    Agent 不应该:
    
    - 猜测身份、工作资格、薪资或法律相关的事实。
    - 绕过验证码、Cloudflare 或反爬机制,或用未知账号/二次验证自动登录。
    - 编造经历、学历或作品集内容。
    - 把"已收藏/已追踪"的岗位算作"已投递"。
    - 在没有覆盖当前申请的授权时点击最终提交;范围未变的已有授权无需重复确认。
    
    ### 隐私说明
    
    本仓库提供的是空白模板和空白看板——不包含任何个人数据。当你按自己的信息填好 `candidate_profile.json`、`job_pool.csv` 等文件后,**请不要把填好个人信息的版本公开发布**(不要把自己 fork 出来的、填了真实数据的仓库推成公开仓库,也不要把内容截图发到 issue 里)。你自己在用的那份数据请保持私有,只有工作流/模板这一层是设计给别人复用的。
    
    ### 验证与公开发布
    
    在仓库根目录执行:
    
    ```sh
    node scripts/check-public-package.js
    node --test scripts/check-public-package.test.js
    node --test dashboard/tests/*.test.js
    ```
    
    发布检查会拒绝已填入数据的起始数据库和禁止发布的私有文件;仍须检查暂存区差异,自动检查不能保证自由文本或 Git 历史完全匿名。回归测试覆盖 CSV解析和原子写入、岗位关联、结果分离与集中待办。浏览器测试需要 Playwright 和兼容浏览器,否则跳过这一项;CI运行发布检查及可运行的测试。
    
    私有工作区的数据变更后,运行 `node dashboard/scripts/audit-data.js` 和 `node dashboard/scripts/company-categories.js --check`;历史缺口应明确保留,不靠猜测清除警告。
    
    ### 许可证
    
    MIT —— 见 `LICENSE`。本项目是 Yvonne He 的开源工作流 *ApplyPilot* 的改名/改编衍生版本;按照其 MIT 许可证要求,`LICENSE` 文件中保留了原始版权声明,同时也加上了这份改编版本自己的版权行。
    
  • templates/dashboard-template/README.md6.6 KB2bce2336fcedupstream ↗
    # Dashboard Template
    
    Use these CSV files as a lightweight dashboard. They can be imported into Excel, Google Sheets, Airtable, Notion, or converted into a workbook.
    
    ## Sheet Purposes
    
    ### `daily_dashboard.csv`
    
    Daily operator summary.
    
    Fields:
    
    - `date`: run date.
    - `found_count`: jobs found.
    - `submitted_count`: confirmed submissions only.
    - `skipped_count`: intentionally skipped jobs.
    - `blocked_count`: attempted but automation could not complete.
    - `needs_user_count`: waiting for user action.
    - `pending_count`: queued for later.
    - `top_sources`: LinkedIn, company sites, job boards, etc.
    - `summary`: short run summary.
    - `user_actions_needed`: concrete next actions for the user.
    
    ### `job_pool.csv`
    
    Main job lead table and current state.
    
    Fields:
    
    - `date_found`: when the job was found.
    - `company`, `job_title`, `role_family`, `level`, `location`, `remote_policy`.
    - `source`, `job_url`, `posted_date`.
    - `priority`: High, Medium, Low, Stretch.
    - `status`: Submitted, Skipped, Blocked, Needs user, Pending, Offer, Rejected.
    - `record_type` (optional): `role` by default; `company_summary` preserves research/history without counting as another submitted or ended role.
    - `resume_variant`: selected resume route.
    - `skip_reason`: why skipped.
    - `blocker`: current blocker if any.
    - `next_action`: what should happen next.
    - `notes`: short context.
    - `cohort_match_status`: `Yes` / `No` / `Unclear` — whether the target hiring cycle (e.g. a specific graduating class / 届 for campus recruiting) has been explicitly confirmed open for this row. Set this explicitly every time you finish checking a company; don't leave the dashboard to guess it from free-text `notes`. The dashboard's "confirmed open, not yet applied" view is driven entirely by this column.
    - `current_stage`: free-text label for where an already-submitted application currently stands (e.g. "笔试", "二面"). Set by the dashboard's calendar "add/edit event" action, verbatim as typed — it does not add a suffix or normalize wording, since every company's process reads differently. Left blank until the first calendar event is scheduled for that job.
    
    ### `application_log.csv`
    
    Audit trail for actual attempts.
    
    Fields:
    
    - `attempt_date`, `company`, `job_title`, `job_url`, `platform`.
    - `status`: final attempt outcome.
    - `submission_evidence`: what proved submission.
    - `resume_used`: exact resume file or variant.
    - `answers_used`: answer bank sections or custom answers used.
    - `confirmation_url`, `confirmation_text`.
    - `notes`.
    - `job_description`: saved official posting text when available; missing historical originals must stay explicit.
    
    ### `blocker_queue.csv`
    
    Retry and handoff queue.
    
    Fields:
    
    - `date`, `company`, `job_title`, `job_url`.
    - `blocker_category`: CAPTCHA, login, dropdown, upload, missing material, etc.
    - `what_happened`: observed failure.
    - `why_blocked`: why the agent stopped.
    - `can_retry`: yes/no.
    - `next_retry_strategy`: browser automation, visual control, user handoff, skip.
    - `user_action_needed`: exact user action.
    - `status`: open, retry later, resolved, abandoned.
    
    ### `follow_up.csv`
    
    Post-application pipeline.
    
    Fields:
    
    - `date`, `time`, `company`, `job_title`, `contact`, `channel`.
    - `event_type`: recruiter reply, rejection, interview, assessment, follow-up. Rows added via the dashboard's calendar UI use this field as free-text event content and also copy it into `job_pool.csv`'s `current_stage` for that job.
    - `deadline`, `next_action`, `status`, `notes`.
    
    ### `resume_rules.csv`
    
    Resume routing table.
    
    Fields:
    
    - `role_family`.
    - `resume_file_path`.
    - `use_for_titles`.
    - `avoid_for_titles`.
    - `tailor_threshold`: external score or qualitative threshold.
    - `notes`.
    
    ### `automation_rules.csv`
    
    Lessons learned.
    
    Fields:
    
    - `date`.
    - `rule_category`: screening, browser, ATS, answer, resume, safety.
    - `rule`: new or updated rule.
    - `reason`: why it exists.
    - `source_blocker_or_lesson`: link to blocker, application, or observation.
    - `status`: active, testing, retired.
    
    ## Counting Rules
    
    - Count only confirmed submissions in `submitted_count`.
    - Deduplicate `job_pool.csv` by company, requisition and recruiting cycle, not title alone. Preserve distinguishable, explicitly permitted repeat attempts and previous outcomes.
    - `company_summary` rows retain research without inflating Applied/Rejected/Offer counts. Blank `record_type` is treated as `role` for compatibility.
    - Keep `Offer` and `Rejected` separate; passing an interview does not mean an offer was received. User-reported outcomes can be recorded with source and known terms without fabricating submission history, acceptance or receipt dates.
    - Pending is grouped by company and excludes companies with submitted/ended history. This display rule does not prohibit a permitted additional application. Read full records and verify current application limits.
    - The action queue merges open/retry-later blockers and `Needs user` / `Blocked` roles, preserving multiple gaps and post-submission issues. Resolve the relevant blockers when the issue is actually fixed.
    - Put every real application attempt in `application_log.csv`, even if it failed.
    - For a fresh lead-finding-only trial, leave `application_log.csv` empty. In an existing tracker, preserve historical log rows unchanged.
    - Put repeatable failures in `blocker_queue.csv`.
    - Convert repeated blockers into `automation_rules.csv`.
    
    ## Integrity Checks
    
    Use the bundled `dashboard/csv-store.js` snapshot-read and atomic-write helpers rather than manually splitting or joining CSV strings. Match dates and job descriptions by exact role; do not borrow another role's facts solely because the company matches. Preserve unknown historical facts as unknown.
    
    From the private workspace root, run:
    
    ```sh
    node dashboard/scripts/audit-data.js
    node dashboard/scripts/company-categories.js --check
    ```
    
    `company_categories.json` stores the user's company groups separately from CSVs. Define the three supported category labels during setup, reuse existing choices, and record dated evidence and recommendation provenance for new entries. The public package ships an empty map.
    
    ## Lead-Finding Trial Rules
    
    For a first clean-room trial or demo:
    
    - Find 3-5 jobs.
    - Update `job_pool.csv` and `daily_dashboard.csv`.
    - Use `Pending` only for jobs worth later review or application.
    - Use `Needs user` when a missing high-impact fact blocks the decision, such as sponsorship, work authorization, compensation, relocation, or real resume file.
    - Use `Skipped` for roles that clearly violate rules.
    - Use `Blocked` only when an attempted workflow or site interaction cannot proceed.
    - Do not write to `application_log.csv` unless the agent actually opened or attempted an application flow.
    
  • scripts/check-public-package.js7.3 KB861b7d48f4ffupstream ↗
    #!/usr/bin/env node
    // A conservative release guard for the empty public starter package.
    // It supplements manual privacy review; it cannot identify every personal fact.
    const fs = require('node:fs');
    const path = require('node:path');
    const { execFileSync } = require('node:child_process');
    const { readCSVRows } = require('../dashboard/csv-store.js');
    
    const TABLES = ['application_log', 'automation_rules', 'blocker_queue', 'daily_dashboard', 'follow_up', 'job_pool', 'resume_rules'];
    const PRIVATE_PATH = /(^|\/)(?:job_search|my-materials|drafts|backups|\.tmp|tmp|\.playwright-mcp|node_modules|test-results|playwright-report)(\/|$)|(^|\/)(?:candidate_profile|answer_bank|experience_bank|application_rules|resume_routing)\.(?:json|md)$|(^|\/)\.env(?:\.|$)|\.(?:bak|tmp|pdf|docx?|png|jpe?g|webp|zip|sqlite|db|pem|key)$/i;
    const CONTENT_RULES = [
      ['machine-specific absolute path', /(?:\b[A-Za-z]:[\\/]|\/(?:Users|home)\/[A-Za-z0-9_.-]+\/)/],
      ['private key', /-----BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY-----/],
      ['access token', /\b(?:gh[pousr]_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{30,}|sk-[A-Za-z0-9_-]{24,})\b/],
    ];
    
    function inspectPublicPackage(root) {
      const errors = [];
      const report = (file, message) => errors.push(`${file}: ${message}`);
      // Git's publishable inventory omits ignored private working files. Never echo
      // matching content: diagnostics must not leak the very values being detected.
      let files;
      try {
        files = execFileSync('git', ['ls-files', '-z', '--cached', '--others', '--exclude-standard'], { cwd: root, encoding: 'utf8' }).split('\0').filter(Boolean);
      } catch (_) {
        return ['Unable to inspect Git file inventory; run this check inside the release checkout.'];
      }
      for (const file of new Set(files)) {
        if (PRIVATE_PATH.test(file)) report(file, 'private or binary artifact must not be published');
        const absolute = path.join(root, file);
        if (!fs.existsSync(absolute)) continue; // A tracked deletion has no outgoing content.
        if (fs.lstatSync(absolute).isSymbolicLink()) { report(file, 'symlinks are not allowed in the release package'); continue; }
        const buffer = fs.readFileSync(absolute);
        if (buffer.includes(0)) { report(file, 'unexpected binary content'); continue; }
        const content = buffer.toString('utf8');
        for (const [label, pattern] of CONTENT_RULES) if (pattern.test(content)) report(file, label);
        if (file.endsWith('.csv') && !TABLES.some(name => file === `dashboard/${name}.csv` || file === `templates/dashboard-template/${name}.csv`)) {
          report(file, 'unexpected CSV outside the empty starter tables');
        }
      }
      for (const name of TABLES) {
        const headers = [];
        for (const directory of ['dashboard', 'templates/dashboard-template']) {
          const file = `${directory}/${name}.csv`;
          try {
            const table = readCSVRows(path.join(root, file));
            if (table.dataRows.length) report(file, 'starter table must contain only its header');
            headers.push(JSON.stringify(table.header));
          } catch (_) { report(file, 'missing or invalid starter CSV'); }
        }
        if (headers.length === 2 && headers[0] !== headers[1]) report(`${name}.csv`, 'dashboard and template schemas differ');
      }
      try {
        const file = 'dashboard/company_categories.json';
        const data = JSON.parse(fs.readFileSync(path.join(root, file), 'utf8'));
        if (data.version !== 1 || !data.companies || Array.isArray(data.companies) || Object.keys(data.companies).length || Object.keys(data).some(key => !['version', 'companies'].includes(key))) {
          report(file, 'release classification store must be empty');
        }
      } catch (_) { report('dashboard/company_categories.json', 'missing or invalid empty classification store'); }
      try {
        const file = 'templates/candidate_profile.template.json';
        const data = JSON.parse(fs.readFileSync(path.join(root, file), 'utf8'));
        if (!data.candidate || Object.values(data.candidate).some(value => value !== '')) report(file, 'candidate identity/contact fields must be blank');
        if (!data.current_status || Object.values(data.current_status).some(value => value !== '')) report(file, 'current status fields must be blank');
        if (!data.targets || Object.values(data.targets).some(value => value !== '' && !(Array.isArray(value) && value.length === 0))) report(file, 'target preferences must be blank');
        if (!data.compensation || ['base_salary_range', 'total_compensation_range', 'notes'].some(key => data.compensation[key] !== '')) report(file, 'compensation fields must be blank');
        if (!data.work_authorization || ['country', 'current_authorization', 'answer_exactly_as'].some(key => data.work_authorization[key] !== '') || ['requires_sponsorship_now', 'requires_sponsorship_in_future'].some(key => data.work_authorization[key] !== null)) report(file, 'work authorization facts must be blank or unknown');
        if (!Array.isArray(data.resume_files) || data.resume_files.some(resume => Object.values(resume).some(value => value !== ''))) report(file, 'resume references must be blank');
        for (const section of ['education', 'employment', 'application_completion', 'application_history']) if (data[section]) report(file, 'unexpected personal-history section');
      } catch (_) { report('templates/candidate_profile.template.json', 'missing or invalid blank profile template'); }
      try {
        const file = 'templates/application-progress.template.json';
        const data = JSON.parse(fs.readFileSync(path.join(root, file), 'utf8'));
        if (!data.target || Object.values(data.target).some(value => value !== '') || data.updated_at !== null) report(file, 'checkpoint must not contain a real target or timestamp');
        if (!data.authorization || data.authorization.fill_authorized !== false || data.authorization.submit_authorized !== false) report(file, 'checkpoint template must not carry actual authorization');
        // Only these workflow defaults may be populated in a blank checkpoint.
        // The usage object is explanatory prose and remains part of manual review.
        const defaults = {
          schema_version: 1,
          'sections.*.inspection': 'uninspected',
          'sections.*.state': 'not_started',
          'unresolved_items.*.blocked_scope': 'field',
          'unresolved_items.*.status': 'open',
          'handoff.submission_approval_needed': true,
          'outcome.status': 'in_progress',
        };
        function visit(value, key = '') {
          if (key === 'usage') return;
          if (Array.isArray(value)) return value.forEach(item => visit(item, `${key}.*`));
          if (value !== null && typeof value === 'object') return Object.entries(value).forEach(([child, item]) => visit(item, key ? `${key}.${child}` : child));
          if (value !== '' && value !== null && value !== false && defaults[key] !== value) report(file, 'checkpoint contains populated progress or evidence');
        }
        visit(data);
      } catch (_) { report('templates/application-progress.template.json', 'missing or invalid blank checkpoint template'); }
      return errors;
    }
    
    if (require.main === module) {
      const errors = inspectPublicPackage(path.resolve(__dirname, '..'));
      if (errors.length) {
        console.error('Public package check failed:\n' + errors.map(error => `- ${error}`).join('\n'));
        process.exitCode = 1;
      } else console.log('Public package check passed: empty starter data, matching schemas, blank profile/checkpoint targets, and no detected private artifacts or tokens. Manual privacy review is still required.');
    }
    
    module.exports = { inspectPublicPackage };
    
  • scripts/check-public-package.test.js4.2 KB68fd58fd1a26upstream ↗
    const test = require('node:test');
    const assert = require('node:assert/strict');
    const fs = require('node:fs');
    const os = require('node:os');
    const path = require('node:path');
    const { execFileSync } = require('node:child_process');
    const { inspectPublicPackage } = require('./check-public-package.js');
    
    function fixture(t) {
      const root = fs.mkdtempSync(path.join(os.tmpdir(), 'jobhunt-public-check-'));
      t.after(() => {
        const resolved = path.resolve(root);
        assert.equal(path.dirname(resolved), path.resolve(os.tmpdir()));
        assert.ok(path.basename(resolved).startsWith('jobhunt-public-check-'));
        fs.rmSync(resolved, { recursive: true, force: true });
      });
      execFileSync('git', ['init', '--quiet', root]);
      const source = path.resolve(__dirname, '..');
      for (const directory of ['dashboard', 'templates/dashboard-template']) {
        fs.mkdirSync(path.join(root, directory), { recursive: true });
        for (const name of fs.readdirSync(path.join(source, directory)).filter(name => name.endsWith('.csv'))) {
          fs.copyFileSync(path.join(source, directory, name), path.join(root, directory, name));
        }
      }
      for (const file of ['dashboard/company_categories.json', 'templates/candidate_profile.template.json', 'templates/application-progress.template.json']) {
        fs.copyFileSync(path.join(source, file), path.join(root, file));
      }
      return root;
    }
    
    test('empty public starter package passes', t => {
      assert.deepEqual(inspectPublicPackage(fixture(t)), []);
    });
    
    test('populated tracking data and classifications are rejected', t => {
      const root = fixture(t);
      const file = path.join(root, 'dashboard/job_pool.csv');
      const header = fs.readFileSync(file, 'utf8').trim().split(',');
      const row = header.map(() => 'fictional');
      fs.appendFileSync(file, row.join(',') + '\n');
      fs.writeFileSync(path.join(root, 'dashboard/company_categories.json'), JSON.stringify({ version: 1, companies: { 'Fictional Co': {} } }));
      const errors = inspectPublicPackage(root);
      assert.ok(errors.some(error => error.includes('starter table must contain only its header')));
      assert.ok(errors.some(error => error.includes('classification store must be empty')));
    });
    
    test('personalized templates and private files are rejected', t => {
      const root = fixture(t);
      const file = path.join(root, 'templates/candidate_profile.template.json');
      const profile = JSON.parse(fs.readFileSync(file, 'utf8'));
      profile.candidate.legal_name = 'Fictional Candidate';
      fs.writeFileSync(file, JSON.stringify(profile));
      fs.writeFileSync(path.join(root, 'candidate_profile.json'), '{}');
      const errors = inspectPublicPackage(root);
      assert.ok(errors.some(error => error.includes('identity/contact fields must be blank')));
      assert.ok(errors.some(error => error.includes('private or binary artifact')));
    });
    
    test('secret diagnostics contain labels but never the detected value', t => {
      const root = fixture(t);
      const fakeToken = 'ghp_' + 'x'.repeat(36);
      fs.writeFileSync(path.join(root, 'notes.md'), fakeToken);
      const errors = inspectPublicPackage(root);
      assert.ok(errors.some(error => error.includes('access token')));
      assert.ok(errors.every(error => !error.includes(fakeToken)));
    });
    
    test('mismatched template schemas are rejected', t => {
      const root = fixture(t);
      fs.appendFileSync(path.join(root, 'templates/dashboard-template/job_pool.csv'), 'unexpected_column\n');
      assert.ok(inspectPublicPackage(root).length > 0);
    });
    
    test('salary details and saved application evidence are rejected', t => {
      const root = fixture(t);
      const file = path.join(root, 'templates/candidate_profile.template.json');
      const profile = JSON.parse(fs.readFileSync(file, 'utf8'));
      profile.compensation.base_salary_range = 'fictional salary';
      fs.writeFileSync(file, JSON.stringify(profile));
      const progressFile = path.join(root, 'templates/application-progress.template.json');
      const progress = JSON.parse(fs.readFileSync(progressFile, 'utf8'));
      progress.outcome.confirmation_evidence = 'fictional confirmation';
      fs.writeFileSync(progressFile, JSON.stringify(progress));
      const errors = inspectPublicPackage(root);
      assert.ok(errors.some(error => error.includes('compensation fields must be blank')));
      assert.ok(errors.some(error => error.includes('populated progress or evidence')));
    });
    
  • references/application-playbook.md18 KB26c2fa65e00fupstream ↗
    # Application Playbook
    
    Use this reference for browser-based job applications, LinkedIn Easy Apply, Simplify, Greenhouse, Lever, Ashby, Workday, and other ATS pages.
    
    ## Global Rules
    
    - Count only confirmed submissions.
    - Prefer short, reliable paths over long custom forms.
    - Close each completed or skipped job tab before moving on.
    - Keep only tabs that need user handoff.
    - Record every outcome in the dashboard.
    - Do not bypass verification or guess high-impact answers. Isolate the affected scope and complete independent authorized work.
    - Fill all reachable confirmed fields, collect unresolved items, and submit only with explicit authorization that covers the current application. Existing scoped authorization need not be repeated.
    
    ## Completion Scope and Interruption Rules
    
    The goal of a fill pass is to exhaust reachable, independent work, not merely finish one tool batch. A tool result, module save, or local validation error is not by itself a reason to end the turn or ask the user to take over.
    
    1. **Resolve sources and authorization once.** Read the current conversation, private rules, candidate profile (including dated confirmations and application-specific updates), chosen resume, answer bank, and existing draft. Record the target company/role/cycle, resume and authorized actions. For a fact, prefer the latest applicable user confirmation or explicit correction over older defaults; use scope as well as date. Candidate Profile owns facts, Answer Bank owns phrasing, Resume Routing owns material selection, and application logs own historical outcomes. A per-company salary, consent, start date, adjustment preference, or placeholder is not a general preference. Do not mistake a newer upload authorization for a new personal fact. When sources genuinely conflict without a clear correction, queue only that fact. Do not re-ask a confirmed value just because it is absent from the first profile section read.
    2. **Map the reachable form.** Inspect visible sections, tabs, required/optional fields, attachments, parsed entries and validation messages. Record sections hidden behind a required-field gate as `unreachable` or `uninspected`, not complete. Open other sections through the site's supported navigation when safe; do not clear correct data or trigger submission to explore. Upload the chosen resume before manual repair when practical, then audit the parsed result.
    3. **Classify each unresolved item by scope.** `field`: one missing answer, unknown date or failed widget; `section`: a required field prevents saving or advancing that module; `application`: login, CAPTCHA/anti-bot, permission, or navigation gate makes all remaining form work unreachable. Record the actual observed scope; an upload failure or sensitive question is not automatically application-wide. For a local technical failure, inspect once and try one targeted supported alternative; stop retrying that control if it still fails and continue elsewhere. Never bypass a control or supply invented values to unlock later pages.
    4. **Complete every independent reachable section.** Fill and verify known values, all selected experiences, user-required optional sections and authorized files. Missing portfolio/video, unclear salary/legal wording, an experience cap, or one unknown self-ID answer joins a pending list while the rest proceeds. Draft unconfirmed custom wording from known facts and reserve its approval for the same list. Save valid sections through an available save-draft action; when validation prevents saving, explicitly record `filled_unsaved` and preserve the browser tab plus a minimal private checkpoint. Do not describe unsaved text as saved.
    5. **Use one consolidated handoff after the pass.** Report completed and saved sections, remaining gaps grouped by user answer/action, the relevant form labels and why each item needs input, unseen pages and the resume point. Include proposed wording or choices when useful, without inventing facts. Distinguish required gaps from optional blanks; an unknown optional field does not require the user to answer it unless their rules require that section. If final submission authorization is also absent, combine it with this review when the consequence is clear. Progress notices and the experience list are informational, not additional confirmation requests.
    6. **Resume from the checkpoint.** On return, read the user's answers and current page before mutating it. Apply only the gaps/corrections, recheck dependent values and newly unlocked pages, and avoid duplicate experiences, uploads, or submissions. Newly revealed requirements may justify a further consolidated request after that newly reachable pass; do not claim all pages were reviewed before they were reachable.
    
    An immediate handoff is appropriate when a whole-application gate prevents further authorized work, an action exceeds existing permissions, or continuing would lose unsaved data. Before handing off, capture the current progress and exact user action; do any independent local preparation that remains useful. A login or anti-bot page must not be bypassed. When the user authorized several applications, one blocked application does not cancel the other authorized targets, but it does not authorize adding targets either.
    
    Use `../templates/application-progress.template.json` as a lightweight checkpoint at `drafts/<company>-<job-id>-<cycle>.json`. Keep field-level facts in Candidate Profile; checkpoint source paths and unresolved labels rather than duplicating sensitive values. Record `blocked_scope`, filled/saved/readback state, unseen sections and next action. Never store passwords, OTPs, cookies or session tokens. Before handing off, link this draft from the existing blocker record/next action; after resolution, close the related blocker and mark the checkpoint complete only when the observed result supports it.
    
    ## Batch Filling & Consolidated Verification
    
    Use this execution pattern by default with the current authorized browser tool:
    
    1. **Prepare once.** Assemble the chosen resume, selected structured entries, confirmed profile answers, and unresolved questions into a compact application packet. Inspect the relevant form sections together for field labels/types, required fields, existing values, and validation errors. Reuse this packet during the application; refresh only changed facts or newly exposed requirements.
    2. **Fill a predictable batch.** In one tool call, execute as many known actions as the tool supports within its timeout: normally a complete basic-information, education, internship, or project module; combine adjacent simple modules when practical. Use sequential awaited UI actions on the same page, not concurrent mutations. Include save and readback in that call when their controls and resulting state are known. A normal text field does not need its own model turn.
    3. **Respect dependencies.** For dependent dropdowns, autocomplete, dates, and newly added entries, wait for the actual options or controls to appear and select real options. Continue within the batch when the next step is observed and unambiguous. An unexpected modal, navigation, or ambiguous control ends that batch with its progress and relevant state returned. Do not guess stale locators, use hidden write APIs, or remove necessary waits to increase batch size; avoid arbitrary sleeps when an observable readiness condition is available.
    4. **Audit together.** After the module is saved, read back all its values, entry counts, date controls, save status, and validation errors in one inspection. Return a compact coverage/result summary plus mismatches, missing values, and errors. Do not read the full page or take a screenshot after every successful field. Use broader inspection for an unfamiliar page, the final whole-application review, or a problem that scoped inspection cannot explain.
    5. **Repair only differences.** If a batch partially fails, inspect the current state and resume from the unfinished fields. Preserve correct values and saved entries; check before adding an entry again to avoid duplicates. Retry a failed interaction once with a targeted alternative, then queue the remaining blocker and continue other reachable sections instead of replaying the batch or ending the application pass.
    
    Collect missing facts and custom-answer confirmations throughout the pass, complete independent confirmed fields, then request the unresolved items together. Keep verification, login, permission, and final-submission boundaries intact. Before final approval, audit the whole application together, including attachments and every required experience; batching changes the number of round trips, not the coverage of checks. After an authorized submission is confirmed, batch the required local dashboard updates and their consistency checks immediately, before starting another company.
    
    ### Completion Audit Coverage
    
    - Inspect every structured entry after parsing and after saving, grouping checks by module: start/end date controls, institution/company, title/major, descriptions, and project responsibilities. Dates embedded in prose do not fill date controls. Keep the source date precision; ask for an exact date or an authorized placeholder convention if the form requires more precision.
    - Check all user-required sections and entries, including campus roles, certificate dates, and photos when applicable. Every field must be covered, but does not require an individual tool call.
    - Verify the primary resume is the chosen version, not merely an extra attachment. Re-parsing can overwrite repaired fields, so audit again after replacement.
    - Read saved values and validation messages back. A completeness percentage alone is not proof of completeness; report unresolved fields before requesting final submission approval.
    
    ## Form Answer Defaults
    
    - Basic fields with clear profile values can be filled automatically: name, email, phone, LinkedIn, location, resume upload, and start date.
    - Work authorization, sponsorship, and compensation can be filled only when wording matches the profile or answer bank closely.
    - Voluntary self-ID defaults to blank, "Prefer not to say", or decline/skip when available unless the user configured exact answers.
    - Reuse confirmed custom-answer patterns. If none applies, draft from known facts and collect it for the consolidated review while continuing other fields.
    - Final submit requires explicit user authorization for this application. Reuse valid existing authorization for the unchanged target and materials; otherwise request it at the final consolidated review.
    
    ## Low-Friction Applications
    
    Volume mode and first real application tests should prefer low-friction applications:
    
    - No new account creation.
    - Not Workday, Oracle, or another long enterprise ATS by default.
    - No video, long writing sample, or mandatory portfolio submission.
    - At most one custom question.
    - Clear resume upload and final confirmation path.
    - No CAPTCHA, Cloudflare, login, or 2FA interruption.
    
    This is a prioritization rule, not a permanent ban. In Precision mode, a high-value role may justify Workday, Oracle, long forms, or deeper custom work after the user confirms it is worth the extra time.
    
    ## Automation Ladder
    
    Use the fastest reliable method first, then escalate only when needed:
    
    1. Browser automation / Playwright-style control: best for batch work, normal buttons, form fields, tab cleanup, and repeatable ATS flows.
    2. DOM plus keyboard repair: use Escape, Tab, Enter, arrow keys, and real option selection when dropdowns or overlays misbehave.
    3. Visual or computer-use control: use when the page state matters visually, buttons are covered, dropdowns are custom, uploads are silent, or DOM state and visible state disagree.
    4. Scoped user handoff: queue missing materials, unclear legal answers and local permission failures while completing independent reachable work. Hand off immediately for CAPTCHA, Cloudflare, login/2FA or another gate only when all remaining authorized work is unreachable; do not bypass the control.
    
    Playwright is an implementation detail, not the user-facing concept. Describe it to users as fast browser automation unless they ask for the technical details.
    
    ## The 10 Common Cardpoints
    
    ### 1. Permissions
    
    Before long runs, verify that the agent can click, read pages, switch tabs, and upload files. Also verify browser extension permissions for the target websites.
    
    If permissions fail mid-run, record the exact permission and affected scope. Do not bypass it. An upload permission failure can leave other form modules usable: finish those before the consolidated handoff. Stop the whole application pass only when no independent authorized work remains reachable.
    
    ### 2. Dropdowns That Look Selected But Are Not
    
    ATS dropdowns may show a value visually while internal validation still fails.
    
    Try:
    
    - Press Escape to close autofill overlays.
    - Click the real dropdown option text.
    - Use keyboard navigation.
    - Use visual/computer control if ordinary DOM interaction fails.
    - After fixing, verify that the site no longer reports the field invalid.
    
    If the same field repeatedly fails, record a blocker instead of burning time.
    
    ### 3. Address and Option Matching
    
    Address fields may require full names, abbreviations, city, state, country, or localized text.
    
    Try in this order, adapted to the user's profile:
    
    1. Full city, state, country.
    2. City only.
    3. State only.
    4. Country full name.
    5. Country abbreviation.
    6. Local-language variant if relevant.
    
    For autocomplete fields, type, wait for candidates, then select a candidate. Do not submit raw typed text unless the site accepts free text.
    
    ### 4. Simplify or Extension Overlay Blocks Buttons
    
    If Next, Review, or Submit does not respond:
    
    - Close the Simplify side panel or other overlay.
    - Focus the button and press Enter.
    - Retry once.
    - If still blocked, record a blocker.
    
    Do not count an application as submitted unless the confirmation rule passes.
    
    ### 5. Close Completed Windows or Tabs
    
    After each job is submitted, skipped, or blocked, close no-longer-needed tabs. This keeps memory, page scripts, and agent context under control.
    
    Only keep tabs open when the user must act, such as CAPTCHA, login, upload, or final manual review.
    
    ### 6. Define Submission Success Strictly
    
    Submission evidence can include:
    
    - Visible text like `Application submitted`, `Application sent`, or `Thank you for applying`.
    - A thank-you page.
    - URL patterns like `thanks`, `thank-you`, `submitted`, or `confirmation`.
    - A platform status that clearly says the application was sent.
    
    Do not count:
    
    - Saved jobs.
    - Job trackers.
    - Simplify quick apply labels.
    - Autofill completion.
    - A clicked submit button with no confirmation.
    
    ### 7. Email Verification vs CAPTCHA / Cloudflare
    
    Email security codes may be handled if the user has connected an email tool and authorized code retrieval.
    
    CAPTCHA, hCaptcha, reCAPTCHA, Cloudflare, and anti-bot checks must be treated as user handoff. Do not bypass them.
    
    ### 8. Login Sessions and Account Choice
    
    If a login page appears, record `Login required` or `Session expired` and do not proceed through authentication without authorization. When the login gates all remaining application work, hand off with saved progress and unseen pages. If it affects only an optional integration or a separate attachment flow, preserve that local blocker and continue independent accessible sections without bypassing login.
    
    Do not attempt automatic login unless the user explicitly instructs it and the flow is safe. If multiple LinkedIn or email accounts exist, use the account specified in the candidate profile or rules.
    
    ### 9. Resume Upload Verification
    
    After uploading a resume, verify the file is attached before submitting.
    
    Watch for:
    
    - Sites that accept PDF only.
    - Custom upload widgets.
    - Silent upload failure.
    - Wrong resume variant attached.
    - Browser permission failure.
    
    If upload cannot be verified, queue the attachment issue and complete independent reachable sections before handoff. Record whether the issue blocks one field or the whole application; do not silently submit without a required resume or substitute another file.
    
    ### 10. Goal Mode Expectations
    
    Goal-style runs are best for volume mode and short application flows.
    
    Expect the agent to skip or defer:
    
    - Workday or Oracle account-heavy flows.
    - Long custom applications.
    - Forms requiring missing materials.
    - Login, 2FA, CAPTCHA, or Cloudflare.
    
    For high-value target roles, use a focused run instead of a volume goal.
    
    ## Common ATS Notes
    
    ### LinkedIn Easy Apply
    
    - Prefer fresh filters and direct apply flows.
    - Close overlays before clicking Next, Review, or Submit.
    - Count only after visible submitted/sent confirmation.
    
    ### Greenhouse
    
    - Dropdown validation may be stale even when the page looks correct.
    - Confirm required fields visually before retrying submit.
    - If invalid state persists, record exact field and blocker.
    
    Greenhouse email security code SOP:
    
    - Use only when the user authorized email access.
    - Read the latest Greenhouse security code from email.
    - Locate each single-character security input when possible.
    - Clear each box before typing.
    - Enter one character per box using focused keypresses rather than bulk paste.
    - Read the values back and verify the joined code exactly matches the email code.
    - Submit only after verification.
    - If characters duplicate, show as `undefined`, fail to clear, or cannot be verified, stop and hand off to the user.
    
    ### Lever
    
    - Watch for hCaptcha or final confirmation pages.
    - Count only explicit confirmation or thank-you page.
    
    ### Ashby
    
    - Often requires resume upload.
    - Verify upload before continuing.
    - Record file permission blockers exactly.
    
    ### Workday / Oracle / Enterprise ATS
    
    - Skip or defer long login-heavy flows unless fit is strong.
    - Record maintenance, account creation, or login blockers.
    
  • references/lead-discovery.md7.8 KBb0ed62f94f89upstream ↗
    # Lead Discovery: Coverage and Evidence
    
    Read before finding, comparing, excluding, or rechecking openings. Use the candidate's configured roles, constraints and recruiting season; examples are not default preferences. Research does not authorize an application or publication.
    
    ## Search coverage
    
    - Start with official recruitment entry points. Verify the actual posting and eligibility text, not a search-summary hedge or the existence of a careers homepage.
    - Use targeted searches and a cross-check without restrictive cohort, function, city or employment-type filters. Search related responsibilities as well as job titles, including the candidate's configured adjacent interests. A missing tag or zero-result filter is not proof that no matching role exists.
    - Review the relevant result pages and the full official JDs of shortlisted jobs and plausible near-matches. Follow named external leads to their official details before dismissing them. Distinguish a title/card reviewed from a full JD read.
    - Keep campus, internship, graduate programs and experienced-hire channels distinct. Verify degree, major, graduation window, experience and work authorization independently. An open detail page is not proof that the candidate is eligible or the form still accepts applications.
    - Record portal, date, active filters, displayed count, pages/cards checked, unique requisition IDs, full JDs read, unresolved leads and channels not checked. If coverage is incomplete, say “not found within this scope,” not “none exists.”
    
    ## Reliable navigation and public sources
    
    - Use a stable, task-owned tab identity or URL. Preserve unrelated user tabs and application drafts.
    - After changing filters or pages, verify the settled state, active page, result count and representative job IDs. Detect repeated pages and transient empty/loading states; neither a URL change nor a timeout proves coverage or zero results. Save verified batches so an interruption does not erase the research record.
    - Where the available tools and site policies permit it, prefer official public read-only sources. A public same-origin HTML/JSON endpoint visibly used by the frontend may be used only when it requires no login, account cookies or private token; verify representative results against the official page and retain official posting URLs. Do not replay sessions, call mutation endpoints or bypass access controls. A denied browser action is not permission to switch methods to evade the denial.
    
    ## Compare duties, eligibility and preferences
    
    For each plausible role record exact title, ID, department, location, official URL, employment type, eligibility evidence, required experience, core duties, work arrangements, candidate evidence, gaps and recommended resume.
    
    - Apply the user's boundaries to actual duties. A workplace setting or site category does not establish what the job does; disclose uncertain onsite, travel or rotation requirements where they matter.
    - Keep same-title requisitions distinct when teams, locations or requirements differ. Distinguish a preferred background from an accepted qualification, and both from a hard requirement.
    - Use verified experience and transferable evidence. Do not turn portfolio work into employment tenure, double-count overlapping projects, or promote the candidate's preferences into employer facts.
    - Present adjacent career directions separately when they change the requested role family. Do not pad a shortlist with weak matches to reach an arbitrary count.
    - Compare multiple genuine options at a company when available, even if only one application slot is allowed. Report fewer matches honestly and explain the search limits.
    - Rank using the user's combined preferences: concrete experience fit, city/work arrangements, business and industry outlook, career development, business importance, compensation and application feasibility. Explain tradeoffs; do not invent precise scores or weights. Freshness affects urgency, not eligibility or quality by itself.
    - Use current, linked evidence for business and compensation claims. Prefer official JDs, recruitment FAQs, disclosures and recruiter statements; label third-party estimates and anecdotes with their date and relevance. Separate fact, inference and unknown.
    - Separate fixed monthly pay, number of paid months, variable bonus, sign-on payments, allowances and equity. Annualize only explicit assumptions; do not present calculated compensation as guaranteed, infer tax treatment or use the candidate's desired salary as an employer offer. Unknown pay remains unknown.
    
    Present a comparable shortlist: role/ID/team/city/URL, evidence and gaps, preference fit, career/business context, compensation basis, application limits, recommendation and resume. Resolve the role/city/resume choice only if still open. Reuse an approved pairing or explicitly delegated choice without asking again during filling.
    
    ## Company categories and application history
    
    - Reuse the company's existing category. For a new company, follow the user's category definitions and store a dated, sourced recommendation in `dashboard/company_categories.json`, using `basis: recommended` for recommendations and `basis: user` for user-confirmed choices (`existing` preserves an established classification). Preserve user choices and distinct subsidiaries; do not mark a recommendation as confirmed or classify every unknown company into one fallback bucket.
    - The bundled UI supports `第一类`, `第二类` and `第三类`. Define what these mean during setup; they are user-defined groups, not universal quality grades. Check the companion script's accepted schema before writing a category. Validate coverage with `node dashboard/scripts/company-categories.js --check`.
    - A historical rejection concerns that attempt, not a permanent company-wide ban. Before applying again, verify cooldowns, per-role/project/cycle limits, shared quotas and applicable remaining slots using official rules and authorized candidate records. Rejection does not automatically restore a slot. Unknown permission remains pending verification.
    - Preserve old outcomes. Track distinct roles/cycles separately; distinguish an explicitly permitted repeat attempt from its previous result without erasing history. The Pending view's company-level grouping is a display rule, not the full research inventory or permission to apply.
    
    ## Record the conclusion
    
    Update `job_pool` as findings become verified. Use `record_type=company_summary` for company-level research and `role` for actual jobs; summaries must not inflate submitted, rejected or offer counts.
    
    Set `cohort_match_status` explicitly for active research rows: `Yes` needs row-specific open-cycle/eligibility evidence, `No` needs evidence of mismatch, and `Unclear` covers missing or ambiguous evidence. A company-level `Yes` does not establish every role's eligibility. Use `Pending` for unfinished external research and `Needs user` for candidate-owned missing facts or decisions.
    
    On a correction, update the current summary and affected role rows together, including stale next actions and daily recommendations. Preserve dated evidence as superseded and deduplicate by company, requisition and recruiting cycle. Leave historical application logs intact during lead-only work; research is not an application attempt.
    
    Longer private research notes can use:
    
    ```text
    Checked at / company / official portal:
    Filters / displayed count / pages and unique cards checked:
    Full JDs read / unresolved leads / channels not checked:
    Role decisions / eligibility evidence / candidate gaps / resume routes:
    Work-arrangement fit / career and business context / compensation sources:
    Ranking and tradeoffs / application quota / next action:
    Correction of prior conclusion, if any:
    ```
    
    Read back changed rows and run the data audit and classification check. Report remaining historical gaps rather than guessing them away.
    
  • references/safety-and-boundaries.md3.9 KB9e8c71f8e8e7upstream ↗
    # Safety and Boundaries
    
    Use this reference for privacy, public sharing, browser automation limits, and uncertain application questions.
    
    ## Public Package Rules
    
    Never include the user's private materials in a public JobHuntBot repo:
    
    - Real resumes.
    - Phone numbers, email addresses, addresses, or IDs.
    - Immigration documents or work authorization evidence.
    - Application history.
    - Browser sessions, cookies, local storage, or screenshots with private data.
    - OTPs or security codes.
    - Private scripts that contain real job URLs, account state, or personal information.
    
    Use templates and placeholders instead.
    
    Keep the operational workspace separate from the public package. Before a user-authorized release, run `node scripts/check-public-package.js`, inspect the staged diff, and verify all dashboard CSVs contain headers only and `company_categories.json` has no real entries. `.gitignore` does not remove already tracked data or sanitize commit history. Share reusable rules and synthetic examples, never renamed copies of real applications, offer terms or candidate records.
    
    ## Truthfulness Rules
    
    Do not fabricate or alter:
    
    - Legal name.
    - Work authorization.
    - Sponsorship needs.
    - Employment history.
    - Degree, school, dates, GPA, certificates, or licenses.
    - Compensation history or expectations if not provided.
    - Portfolio, work samples, publications, or references.
    - Disability, veteran, gender, ethnicity, or other voluntary self-ID answers.
    
    If unsure, leave the affected answer pending and continue independent confirmed fields. Collect unresolved facts into one review after the reachable fill pass; `Needs user` records what remains, not permission to abandon other fillable sections.
    
    ## Browser Automation Boundaries
    
    Allowed with user authorization:
    
    - Reading public job pages.
    - Filling application forms with user-provided facts.
    - Uploading user-provided resumes.
    - Using autofill tools as accelerators.
    - Reading email verification codes if the user connected an email tool and requested it.
    - Recording outcomes.
    
    Do not proceed through unresolved gates or answer unsupported questions:
    
    - CAPTCHA, hCaptcha, reCAPTCHA, Cloudflare, or anti-bot checks.
    - Login, password, 2FA, or unknown account switching.
    - Payment, subscription, or purchase prompts.
    - Camera, microphone, location, or extension permission prompts.
    - Missing resume, portfolio, video, writing sample, or reference materials.
    - Unclear legal, identity, employment, sponsorship, or compensation questions.
    
    Apply the smallest blocked scope. Missing materials and unclear answers usually affect a field or section: finish independent reachable work before the consolidated handoff. Login, verification, or a blocking permission prompt can require immediate handoff when no further authorized work is reachable. Follow `application-playbook.md` for saving progress, unseen sections and recovery. Reuse existing scoped authorization, but never infer a new submission or consent from permission to fill.
    
    ## Submission Counting
    
    Only count an application after explicit evidence.
    
    If the agent clicked submit but did not see confirmation, use supported status `Blocked` with a pending-confirmation explanation; do not invent an unsupported status or mark `Submitted`. Inspect application history before retrying to avoid a duplicate.
    
    Record `Offer` and `Rejected` separately from submission and interview progress. A user-reported external outcome may be recorded with that source without fabricating an application-log entry or an event date. Receipt of an offer does not mean acceptance.
    
    ## User Responsibility
    
    The user remains responsible for:
    
    - Truthfulness of all application materials.
    - Final review of sensitive answers.
    - Compliance with job board and employer terms.
    - Handling human verification.
    - Deciding whether Volume or Precision mode matches their job search.
    
    JobHuntBot should make the workflow more structured and less draining, not remove human responsibility.
    
  • references/setup-workflow.md16 KB9febbe1aa99aupstream ↗
    # Setup Workflow
    
    Use this reference when initializing JobHuntBot for a new user or refreshing their job-search operating system.
    
    This document is the agent's SOP, not a form for the user to complete manually. Guide the user through setup conversationally. Draft files and templates for them whenever possible.
    
    Initialize in a separate private working directory. Copy the templates there and remove `.template` from the personal filenames; copy the local dashboard if it will be used. Keep this public package's tracked templates and CSVs empty. `.gitignore` alone cannot protect changes to already tracked files.
    
    Use a lightweight phased setup:
    
    - Minimum viable setup first: collect only what is needed to run safely.
    - Trial run second: find and classify a few jobs before attempting any submissions.
    - Iteration third: improve rules, answer bank, resume routing, and dashboard from observed issues.
    
    Keep first-time onboarding short. Aim for 8-10 minutes. Do not ask the user to fully complete every template before the first safe trial.
    
    ## Setup Order
    
    1. Candidate Profile
    2. Dashboard
    3. Application Rules
    4. Resume Strategy
    5. Answer Bank
    6. First Trial Run
    
    Do not apply to jobs until the first four are complete.
    
    ## Minimum Viable Setup
    
    For a first run, collect only:
    
    - Target role families.
    - Location and remote/hybrid/onsite preference.
    - Work authorization and sponsorship rules.
    - Resume files and file formats.
    - Resume mode: Volume or Precision. Default to Volume.
    - Voluntary self-ID strategy: tell the user that if they do not choose, JobHuntBot will default to `Prefer not to say` / decline / leave blank when available.
    - Custom answer policy: draft first, ask once before reuse.
    - Must-skip rules.
    - Intended job boards/accounts.
    - Dashboard location or permission to create one from templates.
    
    After this, run a small trial before asking for more detail.
    
    Defer these until needed:
    
    - Full answer bank wording.
    - Detailed voluntary self-ID answers.
    - Follow-up rules.
    - Detailed company preferences.
    - Resume tailoring beyond the chosen first strategy.
    
    ## First Trial Protocol
    
    Default first trial: lead finding only.
    
    Unless the user explicitly asks otherwise, the first trial should:
    
    - Find 3-5 jobs.
    - Screen and classify each job.
    - Update the dashboard.
    - Record blockers and lessons.
    - Avoid opening real application flows.
    - Avoid clicking Apply.
    - Avoid submitting applications.
    
    Use this default for clean-room tests and first-time users. It exposes whether onboarding, screening, status classification, and dashboard updates work before any real application risk exists.
    
    Offer three trial boundaries:
    
    - `Lead finding only`: find, screen, classify, and update dashboard. No applications.
    - `Review before every apply`: find jobs and ask before opening any application flow.
    - `Limited low-risk apply`: apply to 1-3 low-risk roles only after profile, resume, sponsorship, and compensation facts are complete.
    
    Do not recommend `Limited low-risk apply` when sponsorship, work authorization, compensation, real resume file, or account/session facts are missing.
    
    ## Concept Boundaries
    
    Use these concepts differently:
    
    - Candidate Profile: stable facts about the person. It answers "Who is this candidate, what are their constraints, and what must never be guessed?"
    - Application Rules: decision policy. It answers "Which jobs should be prioritized, considered, skipped, or handed off?"
    - Resume Strategy: materials policy. It answers "Which resume should be used, and when should a resume be tailored?"
    - Answer Bank: reusable form answers. It answers "How should the agent respond to repeated application questions using user-provided wording or agent-drafted wording the user has confirmed once?"
    - Dashboard: operating memory. It answers "What happened, what is the current state, and what needs action?"
    
    Example: compensation belongs in Candidate Profile as the user's real range and constraints. Answer Bank stores the exact phrasing to use on forms, such as "I am flexible depending on scope and total package; my target base range is X-Y."
    
    ## 1. Candidate Profile
    
    The candidate profile is the source of truth. It is more than a resume.
    
    Collect:
    
    - Basic identity: name, email, phone, LinkedIn, portfolio, current location.
    - Current framing: current role, target transition, availability, start date.
    - Work authorization: current authorization, sponsorship needs, restrictions, and expiration details if the user wants them stored.
    - Target roles: primary, secondary, and avoid lists.
    - Target companies: industries, company stages, geographies, and dealbreakers.
    - Location preferences: remote, hybrid, onsite, relocation, commute radius.
    - Compensation: base range, total compensation range, answer style, and when to defer.
    - Resume files: role family, file path, version, and when to use each file.
    - Voluntary self-ID preferences: only if the user explicitly wants these stored.
    - Non-guessable facts: legal status, employment dates, degree dates, sponsorship, salary, relocation, non-compete, references, background checks.
    
    If a high-impact fact is missing, ask before using it.
    
    ## 2. Dashboard
    
    The dashboard is the system memory. Use a workbook, Google Sheet, Notion database, or the CSV templates in `templates/dashboard-template/`.
    
    Recommended sheets:
    
    - `daily_dashboard.csv`: daily totals, sources, summary, and user actions needed.
    - `job_pool.csv`: all found jobs, prioritization, current status, selected resume, and next action.
    - `application_log.csv`: every application attempt, confirmation evidence, resume used, and answer set used.
    - `blocker_queue.csv`: blockers, root cause, retry strategy, and user handoff.
    - `follow_up.csv`: recruiter replies, interviews, rejections, and follow-up tasks.
    - `resume_rules.csv`: role-to-resume mapping and tailoring threshold.
    - `automation_rules.csv`: lessons learned and rule changes from repeated blockers.
    
    Every researched or attempted job must have an accurate current state. Later outcomes remain distinct from research and submission.
    
    Status meanings:
    
    - `Submitted`: explicit confirmation evidence was observed.
    - `Skipped`: the job was intentionally skipped, with a reason.
    - `Blocked`: the agent attempted but automation could not safely complete it.
    - `Needs user`: the agent cannot decide or proceed because a user-owned fact or action is missing, such as sponsorship, work authorization, compensation, relocation, CAPTCHA, login, upload, or a sensitive answer.
    - `Pending`: the job appears worth later review or application, and there is no known blocker beyond normal user review or prerequisites already listed.
    - `Rejected`: this application received a confirmed rejection.
    - `Offer`: an offer was confirmed received; neither an interview pass nor acceptance is implied.
    
    Use `record_type=company_summary` for company research and `role` for actual jobs. Applied/Rejected/Offer count roles separately. Pending groups by company and excludes companies with submitted/ended history, but discovery still uses the full records. The consolidated action queue includes open or retry-later blockers and `Needs user` / `Blocked` jobs even when the company already has application history. Link dates and JDs to the exact role.
    
    The bundled dashboard also uses `company_categories.json`. Define the user's meanings for 第一类/第二类/第三类, reuse existing categories and distinguish sourced recommendations from user-confirmed choices. After changes, run the data audit and company classification check described in `SKILL.md`.
    
    Use `application_log.csv` for evidence and audit trail. Use `job_pool.csv` for the current state of each job.
    
    For lead-finding-only trials, do not create application log rows. No application attempt occurred. Use `job_pool.csv` for found jobs, `daily_dashboard.csv` for counts, `blocker_queue.csv` for user-dependent blockers, and `automation_rules.csv` for lessons learned.
    
    If a posting explicitly conflicts with an unknown high-impact fact, mark it `Needs user`, not `Pending`. Example: if sponsorship is `TBD` and the job says candidates needing sponsorship now or in the future cannot be considered, ask the user to confirm sponsorship before deciding whether to apply or skip.
    
    ## 3. Application Rules
    
    Define what is worth applying to and what should be skipped.
    
    At minimum, collect:
    
    - Primary role families.
    - Secondary role families.
    - Roles to avoid.
    - Target level and overleveled titles to skip.
    - Required experience range and stretch-role policy.
    - Freshness policy appropriate to the candidate's recruiting season, without treating older open postings as closed.
    - Location policy.
    - Sponsorship/work authorization policy.
    - Company and industry preference.
    - Form complexity policy.
    - Contract, internship, part-time, and agency policy.
    
    Useful rule shape:
    
    - Prioritize: roles worth applying to quickly.
    - Consider: roles that need fit review.
    - Skip: roles that should not consume time.
    - Hand off: roles needing human judgment or missing information.
    
    ## 4. Resume Strategy
    
    Ask the user to choose one:
    
    - Precision mode: tailor materials for high-fit jobs only.
    - Volume mode: prepare several stable resume variants and route by role family.
    Default to Volume mode. A single high-fit or high-value job can be promoted to Precision later.
    
    Before the user chooses, explain the resume file requirement:
    
    - PDF is fine for direct applications and fit review.
    - PDF-only is not ideal for tailoring because agents usually cannot reliably edit the original PDF in place.
    - For Precision mode, ask the user to provide an editable resume source: DOCX, Markdown, Google Docs export, or plain text.
    - If the user only has PDF, offer to draft a new editable resume version from it before tailoring.
    
    If the user is unsure, recommend Volume mode:
    
    - Start with stable resume variants so the system can run quickly.
    - Use short, low-friction applications.
    - Promote a specific high-fit role to Precision when it is worth extra work.
    
    JobHuntBot can use external fit signals from tools like Jobright or Simplify when the user already uses them. These tools are optional, not required.
    
    If no external fit score is available, estimate fit qualitatively from:
    
    - Role/title match.
    - Required years and level match.
    - Required skills and keywords.
    - Industry/domain match.
    - Location and work authorization feasibility.
    - Candidate story coherence.
    - Form complexity versus expected conversion value.
    
    Do not present qualitative fit as a precise score unless the source provides one. Use labels such as `High`, `Medium`, `Low`, or `Stretch`.
    
    For Volume mode, create role families such as:
    
    - Product Manager
    - AI Product / Growth
    - Product Marketing
    - Data / Analytics
    - Sales / BD / GTM
    - Design
    - Engineering
    - Operations
    
    Each role family needs a resume file path, allowed job titles, disallowed job titles, and notes.
    
    For resume tailoring, prefer editable source files:
    
    - Best: DOCX, Markdown, Google Docs export, or plain text source.
    - Acceptable: PDF plus a separate editable source.
    - Weak: PDF only. The agent can critique or draft changes, but should not promise reliable in-place PDF editing.
    
    Tailoring should preserve truthfulness. It may reorder bullets, emphasize relevant experience, adjust summary wording, and align keywords. It must not invent experience, metrics, employers, degrees, tools, or dates.
    
    For each tailored resume, create a new versioned output and record it in the dashboard. Do not overwrite the user's source resume.
    
    ## 5. Answer Bank
    
    Create truthful reusable answers for common questions:
    
    - Why this company?
    - Why this role?
    - Work authorization.
    - Sponsorship.
    - Location and relocation.
    - Compensation.
    - Start date.
    - Voluntary self-ID.
    - Portfolio or work samples.
    - Short free-text application questions.
    
    If the answer depends on the job, write a reusable pattern rather than a fixed answer.
    
    Answer Bank is not the source of personal truth. Candidate Profile stores the facts; Answer Bank stores reusable wording.
    
    Keep this lightweight:
    
    1. Let the user provide answers if they already have them.
    2. Otherwise draft a first version from Candidate Profile.
    3. Ask the user to confirm the first version once.
    4. Reuse low-risk answers after confirmation.
    5. Queue unresolved high-impact or ambiguous answers and ask about the gaps together after completing independent reachable fields; reuse known facts and applicable authorization.
    
    Examples:
    
    - Candidate Profile stores whether the user needs sponsorship. Answer Bank stores the wording to use for common sponsorship forms.
    - Candidate Profile stores target compensation. Answer Bank stores how to phrase compensation when the field is required.
    - Candidate Profile stores location preferences. Answer Bank stores relocation, remote, hybrid, and onsite wording.
    - Candidate Profile stores portfolio links. Answer Bank stores which link to use for which question pattern.
    
    For "Why this company?" or "Why this role?", store reusable patterns and let the agent customize them with public job/company context. Do not reuse a generic answer if it would look careless.
    
    High-impact questions that should still trigger confirmation include legal identity, work authorization, sponsorship wording that differs from the profile, compensation outside the stored range, background checks, non-compete, references, and voluntary self-ID.
    
    Voluntary self-ID strategy:
    
    - During onboarding, ask only for the user's strategy, not detailed identity answers.
    - Default to `Prefer not to say`, decline, or leave blank when available.
    - If the user wants exact answers used, store them only in their private candidate profile.
    - If the user does not choose a strategy, explicitly tell them JobHuntBot will default to non-disclosure and will not guess identity information.
    
    Custom answer policy:
    
    - The agent may draft answers to open-ended application questions from the candidate profile, resume, and answer bank.
    - Collect a new question-pattern draft for the consolidated review after completing independent fields.
    - After confirmation, reuse or adapt the pattern for similar questions.
    - Leave unsupported claims or materials pending while completing other fields; never invent missing information.
    
    Default application question behavior:
    
    - Fill basic profile fields automatically when the candidate profile has clear values: name, email, phone, LinkedIn, location, resume upload, and start date.
    - Fill work authorization, sponsorship, and compensation only when the form wording matches the candidate profile or answer bank closely.
    - If wording differs materially, queue that question and finish independent reachable fields before the consolidated review.
    - For voluntary self-ID, default to leaving blank, "Prefer not to say", or decline/skip when the form allows it, unless the user configured exact answers.
    - For custom questions, reuse a confirmed pattern or draft from known facts and collect any required confirmation in that same review.
    - Before final submit, audit and show a concise summary. Reuse existing explicit authorization for this unchanged application; otherwise request approval at the final consolidated review.
    
    ## 6. First Trial Run
    
    Before a long run or Goal-mode run, run a lead-finding-only trial first:
    
    1. Find 3-5 roles from intended sources.
    2. Classify each as `Pending`, `Skipped`, `Needs user`, or `Blocked`.
    3. Explain the reason for each status.
    4. Update `job_pool.csv`, `daily_dashboard.csv`, blocker records, and automation rules.
    5. Do not submit applications.
    
    Before any application trial:
    
    1. Confirm the user is logged into the intended job boards and email account.
    2. Confirm the intended LinkedIn/email account if multiple accounts exist.
    3. Test resume upload on one easy ATS.
    4. Test address dropdown behavior.
    5. Test a short application flow.
    6. Verify that completed tabs are closed.
    7. Verify that dashboard updates are correct.
    
    The first application trial should expose permission, upload, dropdown, session, and tracking issues before the user relies on automation overnight.
    
  • .github/workflows/validate.yml766 B9420b0738cafupstream ↗
    name: Validate public package
    
    on:
      push:
      pull_request:
    
    permissions:
      contents: read
    
    jobs:
      validate:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: '22'
          - name: Check public package privacy and empty starter data
            run: node scripts/check-public-package.js
          - name: Test release guard
            run: node --test scripts/check-public-package.test.js
          - name: Test dashboard and CSV storage
            run: node --test dashboard/tests/*.test.js
          - name: Audit empty dashboard
            run: node dashboard/scripts/audit-data.js
          - name: Validate company classifications
            run: node dashboard/scripts/company-categories.js --check
    
  • .gitignore340 B45845deb8fbbupstream ↗
    my-materials/
    # Private working data belongs outside this public release package.
    job_search/
    candidate_profile.json
    answer_bank.md
    experience_bank.md
    application_rules.md
    resume_routing.md
    drafts/
    backups/
    .tmp/
    tmp/
    .env
    .env.*
    !.env.example
    *.bak
    *.tmp
    node_modules/
    test-results/
    playwright-report/
    .playwright-mcp/
    .DS_Store
    Thumbs.db
    
  • AGENTS.md1.5 KB1672ff1db290upstream ↗
    # JobHuntBot workspace entry
    
    For JobHuntBot setup, job research, applications or dashboard work, read `SKILL.md` first and the references relevant to the task. Follow the user's current instructions and scoped authorization.
    
    - This repository is a public workflow and empty starter dashboard. Initialize personal files in a separate private workspace by copying the templates; do not fill the tracked templates with real data.
    - Read current candidate facts, application rules, resume routing, the answer bank and chosen resume before applying. Respect confirmation dates and company/role scope.
    - Finish all independent reachable fields before one consolidated gap review. Save a private checkpoint using `templates/application-progress.template.json`; on recovery inspect actual saved state before adding entries again.
    - Preserve application evidence and outcome history. Use `record_type=company_summary` for non-counting company research. Offer and Rejected are separate outcomes; an interview pass is not an offer.
    - For local CSV changes use the snapshot and atomic-write helpers in `dashboard/csv-store.js`. Run the relevant data checks and tests after modifications; never invent historical facts to clear warnings.
    - Before publishing, run `node scripts/check-public-package.js` and inspect the staged diff. Publish reusable code, documentation and empty templates only. Exclude personal materials, filled databases, screenshots, drafts, backups and credentials. A workflow repair is not authorization to apply or publish.
    
  • dashboard/application_log.csv157 Bf59350558d7bupstream ↗
    attempt_date,company,job_title,job_url,platform,status,submission_evidence,resume_used,answers_used,confirmation_url,confirmation_text,notes,job_description
    
  • dashboard/automation_rules.csv63 B68aa3dc2a92aupstream ↗
    date,rule_category,rule,reason,source_blocker_or_lesson,status
    
  • dashboard/blocker_queue.csv130 B38608fe32500upstream ↗
    date,company,job_title,job_url,blocker_category,what_happened,why_blocked,can_retry,next_retry_strategy,user_action_needed,status
    
  • dashboard/company_categories.json38 Bb406875870c9upstream ↗
    {
      "version": 1,
      "companies": {}
    }
    
  • dashboard/csv-store.js5.2 KB744a705abd55upstream ↗
    // Strict CSV reads and recoverable, atomic replacements for dashboard mutations.
    // Agent-side editors should use this helper as well: uncoordinated external
    // writers cannot be fully locked by a local HTTP server.
    const fs = require('node:fs');
    const { randomUUID } = require('node:crypto');
    
    function parseCSV(text) {
      text = String(text).replace(/^/, '');
      const rows = [];
      let row = [], field = '', quoted = false, closed = false, started = false;
      const finishField = () => { row.push(field); field = ''; closed = false; started = false; };
      for (let i = 0; i < text.length; i++) {
        const c = text[i];
        if (quoted) {
          if (c === '"' && text[i + 1] === '"') { field += '"'; i++; }
          else if (c === '"') { quoted = false; closed = true; }
          else field += c;
        } else if (c === ',') finishField();
        else if (c === '\n' || c === '\r') {
          if (c === '\r' && text[i + 1] === '\n') i++;
          finishField(); rows.push(row); row = [];
        } else if (closed) throw new Error('CSV has text after a closing quote');
        else if (c === '"') {
          if (started) throw new Error('CSV has a quote inside an unquoted field');
          quoted = true; started = true;
        } else { field += c; started = true; }
      }
      if (quoted) throw new Error('CSV has an unterminated quoted field');
      if (started || closed || row.length) { finishField(); rows.push(row); }
      return rows;
    }
    
    function validateRows(header, dataRows) {
      if (!Array.isArray(header) || !header.length || header.some(name => !name.trim())) {
        throw new Error('CSV needs a non-empty header');
      }
      if (new Set(header).size !== header.length) throw new Error('CSV contains duplicate column names');
      dataRows.forEach((row, index) => {
        if (row.length !== header.length) {
          throw new Error(`CSV record ${index + 2} has ${row.length} columns; expected ${header.length}`);
        }
        if (row.every((value, column) => value === header[column])) {
          throw new Error(`CSV record ${index + 2} repeats the header`);
        }
      });
    }
    
    function stringifyCSV(rows) {
      return rows.map(row => row.map(value => '"' + String(value ?? '').replace(/"/g, '""') + '"').join(','))
        .join('\r\n') + '\r\n';
    }
    
    function createCSVStore(io = fs) {
      function readCSVRows(filePath) {
        const source = io.readFileSync(filePath, 'utf8');
        const rows = parseCSV(source);
        const header = rows.shift();
        // Keep the browser's logical indices: physical blank lines are not records.
        const dataRows = rows.filter(row => !(row.length === 1 && row[0] === ''));
        validateRows(header, dataRows);
        return { filePath, header, dataRows, source };
      }
    
      function writeCSVFiles(files) {
        if (new Set(files.map(file => file.filePath)).size !== files.length) {
          throw new Error('A CSV transaction cannot contain the same file twice');
        }
        const prepared = [];
        let failure;
        try {
          for (const file of files) {
            validateRows(file.header, file.dataRows);
            if (typeof file.source !== 'string') throw new Error('CSV write needs its original source snapshot');
            const entry = { ...file, content: stringifyCSV([file.header, ...file.dataRows]), committed: false };
            const suffix = '.' + randomUUID();
            entry.tempPath = file.filePath + suffix + '.tmp';
            entry.backupPath = file.filePath + suffix + '.bak';
            prepared.push(entry);
            io.writeFileSync(entry.tempPath, entry.content, { encoding: 'utf8', flag: 'wx' });
            io.writeFileSync(entry.backupPath, entry.source, { encoding: 'utf8', flag: 'wx' });
          }
          const assertUnchanged = entry => {
            if (io.readFileSync(entry.filePath, 'utf8') !== entry.source) {
              const error = new Error('Dashboard data changed during this edit; refresh and try again');
              error.httpStatus = 409;
              throw error;
            }
          };
          prepared.forEach(assertUnchanged);
          for (const entry of prepared) {
            assertUnchanged(entry);
            io.renameSync(entry.tempPath, entry.filePath);
            entry.committed = true;
          }
        } catch (error) {
          failure = error;
          const recoveryFiles = [];
          for (const entry of [...prepared].reverse()) {
            if (!entry.committed) continue;
            try {
              // Do not roll back over a newer edit made outside this process.
              if (io.readFileSync(entry.filePath, 'utf8') !== entry.content) {
                throw new Error('File changed after commit');
              }
              io.renameSync(entry.backupPath, entry.filePath);
            } catch (_) { entry.keepBackup = true; recoveryFiles.push(entry.backupPath); }
          }
          if (recoveryFiles.length) {
            failure = new Error('CSV write failed and rollback needs manual recovery. Original snapshots: ' + recoveryFiles.join(', '));
            failure.httpStatus = 500;
            failure.recoveryFiles = recoveryFiles;
          }
        } finally {
          for (const entry of prepared) {
            for (const file of [entry.tempPath, ...(entry.keepBackup ? [] : [entry.backupPath])]) {
              try { io.unlinkSync(file); } catch (_) { /* Absent or locked cleanup files do not change commit success. */ }
            }
          }
        }
        if (failure) throw failure;
      }
      return { readCSVRows, writeCSVFiles };
    }
    
    module.exports = { parseCSV, stringifyCSV, validateRows, createCSVStore, ...createCSVStore() };
    
  • dashboard/daily_dashboard.csv132 B4a69cc56a3efupstream ↗
    date,found_count,submitted_count,skipped_count,blocked_count,needs_user_count,pending_count,top_sources,summary,user_actions_needed
    
  • dashboard/dashboard-model.js5.2 KB0325961f87e0upstream ↗
    (function (root) {
      'use strict';
    
      // Normalize spelling format only; similarly named subsidiaries remain distinct.
      function companyKey(name) {
        return String(name || '').normalize('NFKC').trim().replace(/\s+/g, ' ').toLowerCase();
      }
    
      function isRoleRecord(row) {
        return row.record_type !== 'company_summary';
      }
    
      // URLs retain query strings and hashes: recruiting sites put role IDs there.
      // A title alone must not merge two different, explicitly identified postings.
      function sameRole(left, right) {
        if (!companyKey(left.company) || companyKey(left.company) !== companyKey(right.company)) return false;
        const leftUrl = String(left.job_url || '').trim();
        const rightUrl = String(right.job_url || '').trim();
        if (leftUrl && rightUrl) return leftUrl === rightUrl;
        const title = companyKey(left.job_title);
        return Boolean(title && title === companyKey(right.job_title));
      }
    
      function recordsForRole(row, records, jobPool = []) {
        return records.filter(record => {
          if (!sameRole(row, record)) return false;
          if (String(row.job_url || '').trim() && String(record.job_url || '').trim()) return true;
          // A title-only historical event is ambiguous when that title identifies
          // multiple known posting URLs. Do not assign it to every such posting.
          const urls = new Set([...jobPool, ...records].filter(candidate =>
            companyKey(candidate.company) === companyKey(row.company) &&
            companyKey(candidate.job_title) === companyKey(row.job_title))
            .map(candidate => String(candidate.job_url || '').trim()).filter(Boolean));
          return urls.size <= 1;
        });
      }
    
      function latestApplication(row, applicationLog, jobPool = []) {
        return recordsForRole(row, applicationLog, jobPool)
          .filter(record => ['Submitted', 'Offer', 'Rejected'].includes((record.status || '').trim()))
          .slice().sort((a, b) => String(b.attempt_date || '').localeCompare(String(a.attempt_date || '')))[0] || null;
      }
    
      function actionItems(jobPool, blockerQueue) {
        const groups = [];
        function add(row, source) {
          // Match against the canonical record only, avoiding transitive title-only
          // merges between different posting URLs. Ambiguous records stay visible.
          const matches = groups.filter(group => sameRole(group.reference, row));
          let group = matches.length === 1 ? matches[0] : null;
          if (!group) {
            group = { company: String(row.company || '').trim(), reference: row, rows: [], blockers: [] };
            groups.push(group);
          }
          group[source].push(row);
        }
        jobPool.filter(row => ['Needs user', 'Blocked'].includes((row.status || '').trim()))
          .forEach(row => add(row, 'rows'));
        blockerQueue.filter(row => !['resolved', 'closed', 'cancelled', 'canceled', 'dismissed', 'abandoned']
          .includes(companyKey(row.status))).forEach(row => add(row, 'blockers'));
        // Never exclude an open issue merely because this company has applied.
        // Post-submission corrections and other roles' issues still need attention.
        return groups.map(group => ({ ...group,
          titles: [...new Set([...group.rows, ...group.blockers].map(row => row.job_title).filter(Boolean))],
          updated_on: [...group.blockers.map(row => row.date), ...group.rows.map(row => row.date_found)]
            .filter(Boolean).sort().at(-1) || '',
        })).sort((a, b) => b.updated_on.localeCompare(a.updated_on));
      }
    
      function pendingCompanies(jobPool, applicationLog, matches = () => true) {
        const appliedStatuses = new Set(['Submitted', 'Offer', 'Rejected']);
        const applied = new Set([...jobPool, ...applicationLog]
          .filter(row => appliedStatuses.has((row.status || '').trim()))
          .map(row => companyKey(row.company)).filter(Boolean));
        const groups = new Map();
    
        for (const row of jobPool) {
          const key = companyKey(row.company);
          if (!key || applied.has(key) || !['Pending', 'Needs user'].includes((row.status || '').trim())) continue;
          if (!matches(row)) continue;
          if (!groups.has(key)) groups.set(key, { key, company: row.company.trim(), rows: [] });
          groups.get(key).rows.push(row);
        }
    
        return [...groups.values()].map(group => ({
          ...group,
          // A company appears in exactly one section. This summarizes the visible
          // candidate rows without changing any role's own eligibility evidence.
          cohort_match_status: group.rows.some(row => row.cohort_match_status === 'Yes') ? 'Yes'
            : group.rows.some(row => row.cohort_match_status !== 'No') ? 'Unclear' : 'No',
        }));
      }
    
      const categoryNames = ['第一类', '第二类', '第三类'];
      function companyClassification(row, registry = {}) {
        const entry = registry[companyKey(row.company)];
        if (entry && categoryNames.includes(entry.category)) return entry;
        const legacy = (row.notes || '').match(/分类[::]\s*(第[一二三]类)/);
        return legacy ? { category: legacy[1], basis: 'existing', reason: '沿用历史分类' } : null;
      }
    
      const model = { companyKey, isRoleRecord, sameRole, recordsForRole, latestApplication, actionItems,
        pendingCompanies, companyClassification, categoryNames };
      if (typeof module !== 'undefined' && module.exports) module.exports = model;
      else root.DashboardModel = model;
    })(typeof globalThis !== 'undefined' ? globalThis : this);
    
  • dashboard/dashboard.html53 KB4f44de23d03bupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • dashboard/follow_up.csv89 B49518029f3dbupstream ↗
    date,company,job_title,contact,channel,event_type,deadline,next_action,status,notes,time
    
  • dashboard/job_pool.csv212 B68f6622f39edupstream ↗
    date_found,company,job_title,role_family,level,location,remote_policy,source,job_url,posted_date,priority,status,resume_variant,skip_reason,blocker,next_action,notes,cohort_match_status,current_stage,record_type
    
  • dashboard/resume_rules.csv84 B2669d4d7a474upstream ↗
    role_family,resume_file_path,use_for_titles,avoid_for_titles,tailor_threshold,notes
    
  • dashboard/scripts/audit-data.js7.1 KBe25cfdaa9287upstream ↗
    // Read-only checks for the CSV database. Findings never change application facts.
    const fs = require('node:fs');
    const path = require('node:path');
    const { companyKey, sameRole, recordsForRole } = require('../dashboard-model.js');
    const { checkCoverage } = require('./company-categories.js');
    const { parseCSV, validateRows } = require('../csv-store.js');
    
    function readTable(text) {
      const records = parseCSV(text);
      const header = records.shift();
      const dataRows = records.filter(r => !(r.length === 1 && r[0] === ''));
      validateRows(header, dataRows);
      return { header, rows: dataRows.map(r => Object.fromEntries(header.map((h, i) => [h, r[i]]))) };
    }
    
    const required = {
      job_pool: ['company', 'job_title', 'job_url', 'status', 'cohort_match_status', 'blocker', 'next_action'],
      application_log: ['attempt_date', 'company', 'job_title', 'job_url', 'status', 'submission_evidence', 'job_description'],
      blocker_queue: ['company', 'job_title', 'job_url', 'status', 'why_blocked', 'user_action_needed'],
      follow_up: ['date', 'company', 'job_title', 'event_type', 'status', 'time'],
      daily_dashboard: ['date', 'found_count', 'submitted_count', 'skipped_count', 'blocked_count', 'needs_user_count', 'pending_count'],
      resume_rules: ['role_family', 'resume_file_path'],
      automation_rules: ['date', 'rule', 'status'],
    };
    function inspectTables(tables, options = {}) {
      const issues = [];
      const add = (severity, code, table, row, message) => issues.push({ severity, code, table, record: row ? tables[table].indexOf(row) + 1 : null, company: row?.company, job_title: row?.job_title, message });
      const jobs = tables.job_pool || [], logs = tables.application_log || [], blockers = tables.blocker_queue || [];
      const allowed = new Set(['Pending', 'Needs user', 'Blocked', 'Submitted', 'Offer', 'Rejected', 'Skipped']);
      const seen = new Map();
      for (const row of jobs) {
        if (row.record_type && !['role', 'company_summary'].includes(row.record_type)) add('error', 'invalid_record_type', 'job_pool', row, 'Use role / company_summary');
        if (!allowed.has(row.status)) add('error', 'invalid_status', 'job_pool', row, `Unknown status: ${row.status}`);
        if (!row.company || !row.job_title) add('error', 'missing_identity', 'job_pool', row, 'Company and role are required');
        if (!['', 'Yes', 'No', 'Unclear'].includes(row.cohort_match_status)) add('error', 'invalid_cohort', 'job_pool', row, 'Use Yes / No / Unclear');
        if (['Pending', 'Needs user'].includes(row.status) && !row.cohort_match_status) add('warning', 'missing_cohort', 'job_pool', row, 'Eligibility has not been recorded');
        const key = JSON.stringify([companyKey(row.company), row.job_title, row.job_url]);
        if (seen.has(key)) add('warning', 'duplicate_role', 'job_pool', row, `Also recorded at logical record ${seen.get(key)}; inspect cycle and history before merging`);
        else seen.set(key, jobs.indexOf(row) + 1);
        if (['Needs user', 'Blocked'].includes(row.status)) {
          if (!row.blocker && !row.next_action) add('error', 'missing_resume_step', 'job_pool', row, 'Waiting record has no blocker or next step');
          if (!blockers.some(b => !['resolved', 'abandoned'].includes(b.status) && sameRole(row, b))) add('warning', 'unqueued_work', 'job_pool', row, 'Waiting item exists only in job_pool; dashboard must include it and continuation should save a checkpoint');
        }
        if (row.record_type !== 'company_summary' && row.status === 'Submitted' && !recordsForRole(row, logs, jobs).some(log => ['Submitted', 'Offer', 'Rejected'].includes(log.status))) add('warning', 'missing_attempt', 'job_pool', row, 'No exact role/URL application log match; check aliases or missing evidence');
      }
      for (const row of logs) {
        if (!allowed.has(row.status)) add('error', 'invalid_status', 'application_log', row, `Unknown status: ${row.status}`);
        if (row.status === 'Submitted' && !row.submission_evidence && !row.confirmation_text && !row.confirmation_url) add('warning', 'missing_evidence', 'application_log', row, 'Submitted entry has no confirmation evidence');
        if (row.status === 'Submitted' && !row.job_description) add('warning', 'missing_jd', 'application_log', row, 'Historical JD missing; do not invent or replace with a different current posting');
      }
      for (const row of blockers) {
        if (!['open', 'retry later', 'resolved', 'abandoned'].includes(row.status)) add('error', 'invalid_status', 'blocker_queue', row, `Unknown status: ${row.status}`);
        if (!['resolved', 'abandoned'].includes(row.status) && !row.user_action_needed && !row.next_retry_strategy) add('warning', 'missing_resume_step', 'blocker_queue', row, 'Open item has no actionable next step');
      }
      for (const row of tables.daily_dashboard || []) {
        for (const col of required.daily_dashboard.filter(c => c.endsWith('_count'))) {
          if (!/^\d+$/.test(row[col] || '')) add('error', 'invalid_count', 'daily_dashboard', row, `Invalid non-negative count: ${col}`);
        }
      }
      for (const row of tables.resume_rules || []) {
        if (options.exists && !options.exists(row.resume_file_path)) add('error', 'missing_resume', 'resume_rules', row, `Resume file missing for ${row.role_family}`);
      }
      return issues;
    }
    
    function audit(root = path.resolve(__dirname, '..')) {
      const tables = {}, issues = [], counts = {};
      for (const [name, columns] of Object.entries(required)) {
        try {
          const table = readTable(fs.readFileSync(path.join(root, name + '.csv'), 'utf8'));
          const missing = columns.filter(c => !table.header.includes(c));
          if (missing.length) throw new Error('Missing columns: ' + missing.join(', '));
          tables[name] = table.rows; counts[name] = table.rows.length;
        } catch (error) { issues.push({ severity: 'error', code: 'invalid_csv', table: name, message: error.message }); }
      }
      issues.push(...inspectTables(tables, { exists: file => Boolean(file) && fs.existsSync(path.resolve(root, '../..', file)) }));
      // The shareable dashboard starts empty and can run before profile onboarding.
      // When the user creates a profile, validate it without requiring private data
      // to be distributed with this package.
      const profilePath = path.join(root, '../candidate_profile.json');
      if (fs.existsSync(profilePath)) {
        try { JSON.parse(fs.readFileSync(profilePath, 'utf8')); }
        catch (error) { issues.push({ severity: 'error', code: 'invalid_profile', message: error.message }); }
      }
      try {
        const coverage = checkCoverage(tables.job_pool || [], JSON.parse(fs.readFileSync(path.join(root, 'company_categories.json'), 'utf8')));
        for (const company of [...coverage.missing, ...coverage.invalid]) issues.push({ severity: 'error', code: 'invalid_category', company, message: 'Missing or invalid company classification' });
      } catch (error) { issues.push({ severity: 'error', code: 'invalid_json', message: error.message }); }
      return { counts, errors: issues.filter(i => i.severity === 'error').length, warnings: issues.filter(i => i.severity === 'warning').length, issues };
    }
    if (require.main === module) {
      const result = audit(process.argv[2] ? path.resolve(process.argv[2]) : undefined);
      console.log(JSON.stringify(result, null, 2));
      if (result.errors) process.exitCode = 1;
    }
    module.exports = { readTable, inspectTables, audit };
    
  • dashboard/scripts/company-categories.js3.6 KB4b2d30b5da96upstream ↗
    // Company-level categories are maintained by the discovery agent, not guessed
    // from company names. This CLI propagates historical labels and validates coverage.
    const fs = require('node:fs');
    const path = require('node:path');
    const { companyKey, categoryNames } = require('../dashboard-model.js');
    const root = path.resolve(__dirname, '..');
    const registryPath = path.join(root, 'company_categories.json');
    
    function parseCSV(text) {
      const { parseCSV: parseRows, validateRows } = require('../csv-store.js');
      const records = parseRows(text);
      const header = records.shift();
      const rows = records.filter(row => !(row.length === 1 && row[0] === ''));
      validateRows(header, rows);
      return rows.map(row => Object.fromEntries(header.map((column, index) => [column, row[index]])));
    }
    
    function readJobs() { return parseCSV(fs.readFileSync(path.join(root, 'job_pool.csv'), 'utf8')); }
    function readRegistry() {
      return fs.existsSync(registryPath) ? JSON.parse(fs.readFileSync(registryPath, 'utf8')) : { version: 1, companies: {} };
    }
    function writeRegistry(registry) {
      registry.companies = Object.fromEntries(Object.entries(registry.companies).sort(([a], [b]) => a.localeCompare(b, 'zh-CN')));
      const temp = registryPath + '.tmp';
      fs.writeFileSync(temp, JSON.stringify(registry, null, 2) + '\n');
      fs.renameSync(temp, registryPath);
    }
    function checkCoverage(jobs, registry) {
      const missing = [], invalid = [];
      const names = new Map(jobs.map(row => [companyKey(row.company), row.company]));
      for (const [key, company] of names) {
        const entry = registry.companies[key];
        if (!entry) missing.push(company);
        else if (!categoryNames.includes(entry.category) || !entry.reason || !entry.updated_on ||
          !Array.isArray(entry.evidence) || !entry.evidence.length ||
          !['existing', 'recommended', 'user'].includes(entry.basis) || companyKey(entry.company) !== key) invalid.push(company);
      }
      return { companies: names.size, rows: jobs.length, missing, invalid };
    }
    
    if (require.main === module) {
      try {
        const [command, inputFile] = process.argv.slice(2);
        const registry = readRegistry();
        if (command === '--set') {
          // JSON input avoids shell-quoting ambiguity in explanations and evidence.
          const entry = JSON.parse(fs.readFileSync(inputFile, 'utf8'));
          const key = companyKey(entry.company);
          if (!key || !categoryNames.includes(entry.category) || !entry.reason || !entry.updated_on ||
            !Array.isArray(entry.evidence) || !entry.evidence.length ||
            !['recommended', 'user'].includes(entry.basis)) throw new Error('Entry needs company, category, reason, updated_on, evidence and basis (recommended/user)');
          const current = registry.companies[key];
          if (current && current.category !== entry.category && entry.basis !== 'user') {
            throw new Error('Changing an existing category requires a user-confirmed entry; recommendations do not override it');
          }
          if (current && current.basis !== 'recommended' && entry.basis === 'recommended') {
            throw new Error('Preserve the existing classification provenance');
          }
          registry.companies[key] = entry;
          writeRegistry(registry);
        } else if (command !== '--check') {
          throw new Error('Usage: node company-categories.js --check | --set entry.json');
        }
        const result = checkCoverage(readJobs(), registry);
        console.log(JSON.stringify(result, null, 2));
        if (result.missing.length || result.invalid.length) process.exitCode = 1;
      } catch (error) { console.error(error.message); process.exitCode = 1; }
    }
    
    module.exports = { parseCSV, readJobs, readRegistry, writeRegistry, checkCoverage };
    
  • dashboard/server.js12 KB939e63999a4dupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • dashboard/start-dashboard.bat109 B5ecd6c1cd6f4upstream ↗
    @echo off
    chcp 65001 >nul
    cd /d "%~dp0"
    start "" "http://localhost:8420/dashboard.html"
    node server.js
    pause
    
  • dashboard/start-dashboard.sh233 B6cae652c6c26upstream ↗
    #!/bin/sh
    # Start the JobHuntBot dashboard on macOS/Linux.
    cd "$(dirname "$0")"
    ( sleep 1 && (open "http://localhost:8420/dashboard.html" 2>/dev/null || xdg-open "http://localhost:8420/dashboard.html" 2>/dev/null) ) &
    node server.js
    
  • dashboard/tests/audit-data.test.js3.2 KBe08a93b0873bupstream ↗
    const { test } = require('node:test');
    const assert = require('node:assert/strict');
    const fs = require('node:fs');
    const path = require('node:path');
    const { temporaryDirectory } = require('./test-helpers.js');
    const { readTable, inspectTables, audit } = require('../scripts/audit-data.js');
    
    test('audit reads BOM, multiline quoted cells and blank records without shifting fields', () => {
      assert.deepEqual(readTable('a,b\r\nx,"line1\r\nline2, ""quote"""\r\n\r\n').rows, [{ a: 'x', b: 'line1\r\nline2, "quote"' }]);
      assert.throws(() => readTable('a,b\nx,y,z'), /columns/);
      assert.throws(() => readTable('a,a\nx,y'), /duplicate/);
      assert.throws(() => readTable('a,b\nx,"y'), /unterminated/);
    });
    
    test('company summaries preserve history without demanding another application attempt', () => {
      assert.deepEqual(inspectTables({ job_pool: [{ company: '甲', job_title: '公司汇总', status: 'Submitted', record_type: 'company_summary', cohort_match_status: 'Yes' }] }), []);
    });
    
    test('separate roles and post-submission discrepancies are not auto-resolved', () => {
      const tables = {
        job_pool: [{ company: '甲', job_title: '产品', job_url: '/1', status: 'Needs user', cohort_match_status: 'Yes', next_action: '补充日期' }],
        blocker_queue: [{ company: '甲', job_title: '采购', job_url: '/2', status: 'open', user_action_needed: '核对志愿顺序' }],
        application_log: [{ company: '甲', job_title: '采购', job_url: '/2', status: 'Submitted', submission_evidence: 'success', job_description: 'JD' }],
      };
      const before = JSON.stringify(tables);
      assert.ok(inspectTables(tables).some(i => i.code === 'unqueued_work'));
      assert.equal(JSON.stringify(tables), before);
    });
    
    test('invalid statuses, duplicate records, missing evidence and absent resumes are reported', () => {
      const row = { company: '甲', job_title: '产品', job_url: '/1', status: 'Wrong', cohort_match_status: 'Yes' };
      const codes = inspectTables({ job_pool: [row, { ...row }], application_log: [{ status: 'Submitted' }], resume_rules: [{ role_family: 'PM', resume_file_path: 'missing.pdf' }] }, { exists: () => false }).map(i => i.code);
      for (const code of ['invalid_status', 'duplicate_role', 'missing_evidence', 'missing_resume']) assert.ok(codes.includes(code));
    });
    
    test('empty standalone dashboard needs no private profile and still audits an existing profile', t => {
      const root = temporaryDirectory(t);
      const dashboard = path.join(root, 'dashboard');
      fs.mkdirSync(dashboard);
      const source = path.resolve(__dirname, '..');
      for (const name of ['job_pool', 'application_log', 'blocker_queue', 'follow_up', 'daily_dashboard', 'resume_rules', 'automation_rules']) {
        const header = fs.readFileSync(path.join(source, name + '.csv'), 'utf8').split(/\r?\n/)[0];
        fs.writeFileSync(path.join(dashboard, name + '.csv'), header + '\n');
      }
      fs.writeFileSync(path.join(dashboard, 'company_categories.json'), JSON.stringify({ version: 1, companies: {} }));
      assert.equal(audit(dashboard).errors, 0);
      fs.writeFileSync(path.join(root, 'candidate_profile.json'), '{invalid');
      assert.ok(audit(dashboard).issues.some(issue => issue.code === 'invalid_profile'));
      fs.writeFileSync(path.join(root, 'candidate_profile.json'), '{}');
      assert.equal(audit(dashboard).errors, 0);
    });
    
  • dashboard/tests/csv-row-index.test.js1.9 KBd23e970e7c45upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • dashboard/tests/csv-store.test.js3.1 KB66124b8606c6upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • dashboard/tests/dashboard-browser.test.js10 KB6b540d623895upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • dashboard/tests/dashboard-csv-validation.test.js1.2 KB708dd94b1ae8upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • dashboard/tests/dashboard-model.test.js10 KB2393b11ebf11upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • dashboard/tests/server.test.js9.3 KB10ac7ba1e6edupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • dashboard/tests/test-helpers.js2.6 KB35cce3d51556upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • LICENSE1.1 KB3ca0cc79908bupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • templates/answer_bank.template.md2.8 KBcf1c36f98a0cupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • templates/application-progress.template.json2.2 KB115bc11e193bupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • templates/application_rules.template.md5.6 KB9bc518771c28upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • templates/candidate_profile.template.json1.9 KB2d5cf6cc8751upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • templates/dashboard-template/application_log.csv157 Bf59350558d7bupstream ↗
    attempt_date,company,job_title,job_url,platform,status,submission_evidence,resume_used,answers_used,confirmation_url,confirmation_text,notes,job_description
    
  • templates/dashboard-template/automation_rules.csv63 B68aa3dc2a92aupstream ↗
    date,rule_category,rule,reason,source_blocker_or_lesson,status
    
  • templates/dashboard-template/blocker_queue.csv130 B38608fe32500upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • templates/dashboard-template/daily_dashboard.csv132 B4a69cc56a3efupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • templates/dashboard-template/follow_up.csv89 B49518029f3dbupstream ↗
    date,company,job_title,contact,channel,event_type,deadline,next_action,status,notes,time
    
  • templates/dashboard-template/job_pool.csv212 B68f6622f39edupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • templates/dashboard-template/resume_rules.csv84 B2669d4d7a474upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • templates/experience_bank.template.md4.7 KB05df183e8f58upstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

  • templates/resume_routing.template.md4.4 KB549f1b3d30fbupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/danielpan12-jobhuntbot.md

// REPO STATS

890 stars
0 open issues
Last commit: 1mo ago