fix(apply): record the drafted application in the tracker (#269) (#291)

/apply wrote a CV and a cover letter to disk and then wrote nothing to
job_search_tracker.csv, so a drafted and submitted application was
invisible to /gmail-sync, /html-report, /notion-sync, /interview,
/upskill aggregate mode, and to /rank's dedup exclusion. The safety net
that would have caught it - /gmail-sync - refuses to create missing
rows, so the failure it exists to catch is the one that disables it.
Nothing detected the loss afterwards.

Step 6b appends a drafted row carrying the two document paths, the fit
rating and the posting URL, reusing /outcome's exact header so the two
commands cannot diverge. It runs immediately after "Files Created" and
before the optional application-form offer, which ends the turn on a
question - anything placed after that offer would be skipped whenever
the user never answers, reproducing the bug. Re-running /apply updates
the row rather than duplicating it, and never moves a row that already
reached applied or beyond back to drafted. The step is mirrored into
job-application-assistant, which defers to it rather than restating it,
because /scrape Step 5 routes straight into the skill; /scrape Step 6
now defers to the same step instead of adding a row of its own.

seen_jobs.json is deliberately left alone: drafting is not applying, and
that file's vocabulary has no value for either. /rank builds its
exclusion set from company+role in the tracker regardless of status.

drafted is introduced into the status vocabulary, and every reader that
meant "submitted" is updated to say so. These readers define their open
set by exclusion from the final statuses, so a new non-final value would
otherwise have joined all of them silently: /outcome's follow-up branch
would have drafted a chase email to an employer who never received an
application, /gmail-sync would have searched for mail about it and then
flagged it as stale, /notion-sync would have published an "Applied on"
date for it, and /html-report would have counted it in the headline
application total. /outcome Step 4 also overwrites the draft date with
the submission date when a row leaves drafted, so the date column keeps
meaning "applied on". The wider vocabulary reconciliation - underscore
versus space, the separate archive enum - stays a separate concern.
This commit is contained in:
Jakob Stender Guldberg
2026-08-06 17:16:07 +02:00
committed by GitHub
parent cffacfdde0
commit 41b5fd857f
10 changed files with 296 additions and 20 deletions
+12 -8
View File
@@ -21,7 +21,8 @@ Read in parallel:
2. **`documents/applications/*/outcome.md`** — for each resolved application, read the outcome file to get the exact interview stages reached (the checkboxes) and any notes. Merge this into the matching tracker row by company+role fuzzy match (lowercase, ignore punctuation). If an archive exists for a row but there is no match, attach it as extra context anyway.
Status normalisation — map tracker values to five canonical buckets before computing stats:
Status normalisation — map tracker values to six canonical buckets before computing stats:
- `drafted`**Drafted** (documents written by `/apply`, not yet submitted)
- `applied`**Active** (resume submitted, no further signal)
- `interview`**Interview**
- `offer`**Offer**
@@ -34,10 +35,12 @@ Status normalisation — map tracker values to five canonical buckets before com
From the normalised data compute:
**Drafted rows are excluded from every statistic below** — they were never submitted. Report the Drafted count on its own, and include it only in the status breakdown.
- **Total applications**
- **By status bucket:** count per bucket
- **By sector:** count per unique sector value
- **By channel:** online vs referral vs other
- **By channel:** portal vs online vs referral vs other
- **By year/season:** group by the `date` field (which may be a year like `2025` or a full date)
- **Funnel rates:** what % progressed past resume screen (reached Interview or beyond)
- **Rejection rate:** Rejected/Closed ÷ Total with a resolved status (exclude Active)
@@ -55,10 +58,10 @@ Write a single self-contained HTML file. All CSS is inline in a `<style>` block.
```
┌─────────────────────────────────────────────┐
│ 🔍 Job Search Dashboard Generated: DATE │
├──────┬──────┬──────┬──────┬─────────────────┤
Total │Active│Inter-│Offer │Rejected/Closed │ ← stat cards
│ N │ N │view N│ N │ N
├──────┴──────┴──────┴──────┴─────────────────┤
├──────┬──────┬──────┬──────┬─────────────────┤
Sent │Draft │Active│Inter-│Offer │Rejected/ │ ← stat cards
│ N │ N │ N │view N│ N │Closed N
├──────┴──────┴──────┴──────┴─────────────────┤
│ Status breakdown (doughnut) │ By sector (bar)│ ← charts row
├───────────────────────────────────────────── ┤
│ By channel (bar) │ Funnel (horizontal bar) │ ← charts row
@@ -72,6 +75,7 @@ Write a single self-contained HTML file. All CSS is inline in a `<style>` block.
### Design spec
- **Colour palette:** CSS custom properties. Status colours:
- Drafted: `#64748b` (slate)
- Active: `#3b82f6` (blue)
- Interview: `#f59e0b` (amber)
- Offer: `#8b5cf6` (purple)
@@ -118,11 +122,11 @@ Then present:
> Open it in any browser — no server needed.
>
> **Summary:**
> - Total applications: N
> - Applications sent: N · drafted, not yet sent: N
> - Active: N · Interview: N · Hired: N · Rejected/Closed: N
> - Funnel: N% progressed past resume screen
>
> Re-run `/html-report` any time after adding new entries via `/outcome` to refresh the dashboard.
> Re-run `/html-report` any time after adding new entries via `/apply` or `/outcome` to refresh the dashboard.
---