vigie-emploi 0.0.0-stage → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.en.md +122 -0
- package/AGENTS.md +122 -0
- package/LICENSE +21 -0
- package/README.en.md +375 -0
- package/README.md +372 -2
- package/bin/vigie-emploi.js +31 -0
- package/dist/api/broadcast.js +95 -0
- package/dist/api/file.js +67 -0
- package/dist/api/idle.js +25 -0
- package/dist/api/mail.js +101 -0
- package/dist/api/open.js +41 -0
- package/dist/api/server.js +417 -0
- package/dist/api/work.js +78 -0
- package/dist/cli/mail.js +165 -0
- package/dist/cli/main.js +937 -0
- package/dist/core/access-files.js +179 -0
- package/dist/core/actions.js +166 -0
- package/dist/core/config.js +179 -0
- package/dist/core/count.js +15 -0
- package/dist/core/events.js +276 -0
- package/dist/core/extraction.js +86 -0
- package/dist/core/files.js +99 -0
- package/dist/core/links.js +93 -0
- package/dist/core/node.js +41 -0
- package/dist/core/offers.js +301 -0
- package/dist/core/queries.js +142 -0
- package/dist/core/rubric-storage.js +239 -0
- package/dist/core/rubric.js +657 -0
- package/dist/core/scoring.js +130 -0
- package/dist/core/statistics.js +41 -0
- package/dist/core/statuses.js +64 -0
- package/dist/core/text.js +123 -0
- package/dist/cv/cv.js +391 -0
- package/dist/cv/pages.js +141 -0
- package/dist/db/database.js +56 -0
- package/dist/export/tracker.js +190 -0
- package/dist/i18n/en.js +464 -0
- package/dist/i18n/fr.js +484 -0
- package/dist/i18n/index.js +33 -0
- package/dist/i18n/labels.js +62 -0
- package/dist/i18n/tool.js +41 -0
- package/dist/import/history.js +438 -0
- package/dist/import/journal.js +296 -0
- package/dist/import/markdown.js +67 -0
- package/dist/ingest/eml.js +85 -0
- package/dist/ingest/ingest.js +221 -0
- package/dist/ingest/jsonld.js +112 -0
- package/dist/init/init.js +156 -0
- package/dist/mail/fetch.js +138 -0
- package/dist/mail/providers.js +54 -0
- package/dist/mail/secret.js +162 -0
- package/dist/mail/settings.js +47 -0
- package/dist/mcp/dashboard.js +139 -0
- package/dist/mcp/i18n/en.js +310 -0
- package/dist/mcp/i18n/fr.js +58 -0
- package/dist/mcp/presentation.js +120 -0
- package/dist/mcp/results.js +32 -0
- package/dist/mcp/server.js +554 -0
- package/dist/mcp/state.js +55 -0
- package/dist/mcp/texts.js +30 -0
- package/dist/mcp/workspace.js +384 -0
- package/dist/ui/assets/index-CNACKQ35.js +241 -0
- package/dist/ui/assets/index-CRIB1ZbN.css +2 -0
- package/dist/ui/favicon.svg +1 -0
- package/dist/ui/index.html +29 -0
- package/docs/utiliser-avec-une-ia.md +164 -0
- package/examples/rubric.en.json +142 -0
- package/examples/rubric.json +142 -0
- package/migrations/0001_initial.sql +119 -0
- package/migrations/0002_suivi_candidatures.sql +14 -0
- package/migrations/0003_journal_evenements.sql +47 -0
- package/migrations/0004_grille_notation.sql +21 -0
- package/migrations/0005_english.sql +227 -0
- package/migrations/0006_mailbox.sql +9 -0
- package/package.json +84 -4
- package/scaffold/.claude/skills/cv-cible/SKILL.md +7 -0
- package/scaffold/.claude/skills/preparer-go/SKILL.md +7 -0
- package/scaffold/.claude/skills/traiter-emails/SKILL.md +7 -0
- package/scaffold/AGENTS.md +78 -0
- package/scaffold/CLAUDE.md +1 -0
- package/scaffold/DEMARRAGE.md +106 -0
- package/scaffold/README.md +40 -0
- package/scaffold/_A-FAIRE.md +3 -0
- package/scaffold/_CONTEXTE.md +72 -0
- package/scaffold/_JOURNAL-DECISIONS.md +4 -0
- package/scaffold/a-deposer/LISEZMOI.md +10 -0
- package/scaffold/candidatures/_MODELE-dossier-candidature.md +35 -0
- package/scaffold/cv/LISEZMOI.md +35 -0
- package/scaffold/cv/_exemple-structure.md +78 -0
- package/scaffold/emails/.gitkeep +0 -0
- package/scaffold/gitignore +11 -0
- package/scaffold/messages/MODELES.md +82 -0
- package/scaffold/procedures/alertes-automatiques.md +40 -0
- package/scaffold/procedures/cv-cible.md +10 -0
- package/scaffold/procedures/preparer-go.md +28 -0
- package/scaffold/procedures/traiter-emails.md +51 -0
- package/scaffold/profils-publics/LISEZMOI.md +3 -0
- package/scaffold-en/.claude/skills/cv-cible/SKILL.md +7 -0
- package/scaffold-en/.claude/skills/preparer-go/SKILL.md +7 -0
- package/scaffold-en/.claude/skills/traiter-emails/SKILL.md +7 -0
- package/scaffold-en/AGENTS.md +80 -0
- package/scaffold-en/CLAUDE.md +1 -0
- package/scaffold-en/DEMARRAGE.md +108 -0
- package/scaffold-en/README.md +42 -0
- package/scaffold-en/_A-FAIRE.md +3 -0
- package/scaffold-en/_CONTEXTE.md +72 -0
- package/scaffold-en/_JOURNAL-DECISIONS.md +4 -0
- package/scaffold-en/a-deposer/LISEZMOI.md +10 -0
- package/scaffold-en/candidatures/_MODELE-dossier-candidature.md +35 -0
- package/scaffold-en/cv/LISEZMOI.md +34 -0
- package/scaffold-en/cv/_exemple-structure.md +78 -0
- package/scaffold-en/emails/.gitkeep +0 -0
- package/scaffold-en/gitignore +11 -0
- package/scaffold-en/messages/MODELES.md +82 -0
- package/scaffold-en/procedures/alertes-automatiques.md +40 -0
- package/scaffold-en/procedures/cv-cible.md +10 -0
- package/scaffold-en/procedures/preparer-go.md +28 -0
- package/scaffold-en/procedures/traiter-emails.md +51 -0
- package/scaffold-en/profils-publics/LISEZMOI.md +3 -0
- package/templates/cv/compact/fonts/OFL.txt +93 -0
- package/templates/cv/compact/fonts/source-sans-3-400-italic.woff2 +0 -0
- package/templates/cv/compact/fonts/source-sans-3-400-normal.woff2 +0 -0
- package/templates/cv/compact/fonts/source-sans-3-600-normal.woff2 +0 -0
- package/templates/cv/compact/fonts/source-sans-3-700-normal.woff2 +0 -0
- package/templates/cv/compact/gabarit.css +103 -0
- package/templates/cv/modern/fonts/OFL.txt +93 -0
- package/templates/cv/modern/fonts/source-sans-3-400-italic.woff2 +0 -0
- package/templates/cv/modern/fonts/source-sans-3-400-normal.woff2 +0 -0
- package/templates/cv/modern/fonts/source-sans-3-600-normal.woff2 +0 -0
- package/templates/cv/modern/fonts/source-sans-3-700-normal.woff2 +0 -0
- package/templates/cv/modern/gabarit.css +117 -0
- package/templates/cv/plain/fonts/OFL.txt +94 -0
- package/templates/cv/plain/fonts/amiri-400-italic-0.woff2 +0 -0
- package/templates/cv/plain/fonts/amiri-400-italic-1.woff2 +0 -0
- package/templates/cv/plain/fonts/amiri-400-normal-2.woff2 +0 -0
- package/templates/cv/plain/fonts/amiri-400-normal-3.woff2 +0 -0
- package/templates/cv/plain/fonts/amiri-700-normal-4.woff2 +0 -0
- package/templates/cv/plain/fonts/amiri-700-normal-5.woff2 +0 -0
- package/templates/cv/plain/gabarit.css +468 -0
- package/vigie-emploi.config.example.json +7 -0
package/AGENTS.en.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Driving vigie-emploi from an AI
|
|
2
|
+
|
|
3
|
+
This file is for an agent (Claude Code or another) that helps the user sort their job ads. The application contacts no AI model: the agent reads, scores and reports back, and the application keeps the state. Work and write in English with the user; the names of the commands, options, MCP tools, parameters and statuses are identifiers: use them as they are.
|
|
4
|
+
|
|
5
|
+
Two ways to drive it: the **MCP tools** (`vigie-emploi mcp`, preferred when the MCP client is connected, see [`docs/utiliser-avec-une-ia.md`](docs/utiliser-avec-une-ia.md)) or the **CLI** with `--json`. Both call the same core.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
- CLI: always pass `--json`: the output is stable and unambiguous. Errors go to stderr (`{"ok": false, "error": "…"}`) with a non-zero exit code. MCP: an error comes back as an error result (`isError`), and the server keeps running.
|
|
10
|
+
- `_SUIVI.md` (the tracker) is generated from the database (`generate_tracker` / `vigie-emploi generate-tracker`): do not edit it by hand (if it replaces a tracker kept by hand, compare with the preview first). By default it writes the preview `candidatures/_SUIVI.genere.md`; use `replace` only if the user asks for it.
|
|
11
|
+
- The data folder comes from `VIGIE_EMPLOI_DATA`, `--data` or `vigie-emploi.config.json`. Never write personal data into the application's repository.
|
|
12
|
+
- Mailbox: never ask for the password in the conversation. The user connects their mailbox themselves, in the dashboard ("Mailbox" button) or with `vigie-emploi mail setup`; the password goes to the system keychain.
|
|
13
|
+
- Do not download LinkedIn, Indeed or Glassdoor pages with a script: read them in the user's browser, or ask them for the text (Glassdoor blocks bots). The Hellowork and Free-Work descriptions are already in the database after `ingest`.
|
|
14
|
+
- The scoring grid belongs to the user (`profil/grille.json` in their data folder): read it before scoring a batch (`rubric` over MCP, `vigie-emploi rubric --instructions --json` on the CLI). Never give the final score: score the criteria, and the application calculates it.
|
|
15
|
+
- Only change the grid (`update_rubric`, `vigie-emploi rubric --update`) when the user asks: first a trial run (`dry_run: true` / `--dry-run`) whose impact you show them, then save it with a summary.
|
|
16
|
+
|
|
17
|
+
## Full flow over MCP
|
|
18
|
+
|
|
19
|
+
1. **Ingest**: `ingest_emails` (`keep: true` to keep the `.eml` files); it fetches the mailbox first when one is configured. Note `added`, `duplicates`, `dismissed` (discarded), `to_read` and `errors`, and pass on `to_tell` (e-mails fetched or mailbox error, e-mails deleted).
|
|
20
|
+
2. **Read**: `offers_to_read`. Depending on `reading`: text in `description`; `browser` = open `url` in the user's browser; `human` = ask them for the text. `read_offer` for the full details.
|
|
21
|
+
3. **Score** with the grid: `rubric` first (criteria, weights, scales, rules, inventory, examples, `instructions_ai`), then `score_batch` (`{ "offers": [ {id, criteria, inputs, blockers, fit, gaps, read, tags}, … ] }`) or `score_offer` for a single one. See "Scoring with the grid" below. Seen before? `list_offers` with `text`.
|
|
22
|
+
4. **Summarise** for the user: job ads scored, those above their threshold (the grid's), with the breakdown (sub-scores, rules, "unknown" flags to check), conditions, what matches, gaps. No "go": `change_status` to `dismissed`, with the reason as the comment.
|
|
23
|
+
5. **Apply** on their "go": `apply` (full job ad, data folder, `suggested_folder`, steps). Prepare the application file, the CV and the messages following their instructions (in the data folder).
|
|
24
|
+
6. **Record the application**: `save_application` with `folder`, `cv`, `channel`, `message`, `next_action`; once sent, `sent_at` (the job ad moves to `sent`). After that: `change_status` (`followed-up`, `interview`, `rejected`, `closed`, `withdrawn`) and `save_application` for the next action.
|
|
25
|
+
7. **Keep the log** (see below): each exchange becomes an event, and what comes next a deadline.
|
|
26
|
+
8. **Generate the tracker**: `generate_tracker` → `candidatures/_SUIVI.genere.md` (sections In progress, Sent without reply, Closed; the next action comes from the next deadline).
|
|
27
|
+
|
|
28
|
+
## Scoring with the grid
|
|
29
|
+
|
|
30
|
+
1. Read the grid (`rubric`). Criteria with `source: "ai"` are scored from 0 to 10 with a short justification; their `description` says what to look at. The technical criterion is judged against the inventory (`strong` / `medium` / `light` / `zero`): list the gaps. Calibrate your sub-scores on the `examples`.
|
|
31
|
+
2. Do not score the calculated criteria (`remote`, `compensation`): fill in `inputs` when the job ad gives them (`onsite_days` 0 to 5, 0 = fully remote; `salary_min` / `salary_max` as plain amounts in the grid's currency; `unit`: `year`, `month`, `day` or `hour`). Otherwise the application reads them from the job ad's fields; when unknown, they are worth 5 with a flag.
|
|
32
|
+
3. `blockers`: ids of the active rules that apply (internship, defence…). An unknown rule is refused.
|
|
33
|
+
4. Do not send `score`: with `criteria`, it is ignored (reported in `warnings`). The response gives the calculated score, the exact value and the `breakdown`.
|
|
34
|
+
5. Trial run available: `score_batch` with `dry_run: true` (CLI `score --file lot.json --dry-run`) calculates without saving anything.
|
|
35
|
+
6. Changing priorities ("remote work matters more", "£50K is enough for me"): `update_rubric` as a trial, show the impact (`rising`, `falling`), then save with a `summary`; every criteria-based score is recalculated. Going back: `update_rubric` with `restore_version`. History: `rubric_history`.
|
|
36
|
+
|
|
37
|
+
Sample entry:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{ "id": 42,
|
|
41
|
+
"criteria": { "technique": { "score": 8, "justification": "PHP, REST APIs; gap: PostgreSQL (none)" },
|
|
42
|
+
"role": { "score": 7, "justification": "Senior, no lead role" },
|
|
43
|
+
"interet": { "score": 6, "justification": "SaaS for small businesses" },
|
|
44
|
+
"risque": { "score": 7, "justification": "Test on an existing project" } },
|
|
45
|
+
"inputs": { "onsite_days": 2, "salary_min": 55000, "salary_max": 65000, "unit": "year" },
|
|
46
|
+
"blockers": [], "fit": "…", "gaps": "…", "read": true }
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Log: when the user reports a call, an interview, a message, a quote
|
|
50
|
+
|
|
51
|
+
1. **The event**: `add_event` (CLI: `vigie-emploi event <id> …`) with the type (`message`, `interview`, `test`, `proposal` = offer or quote, `decision`, `note`), the actual date (`at`), a short summary, and whatever is known: `direction` (`sent` or `received`, for a message), `channel`, `contacts`, `amount` + `unit` and `days` for a quote, `details`.
|
|
52
|
+
2. **Any document** (meeting notes, quote, call sheet): write it in the application folder (`candidatures/<company-role>/…`), then reference it in `files` (path relative to the data folder; `folder_files` lists the existing ones). Never copy a document's content into the database.
|
|
53
|
+
3. **The next deadline**: a second `add_event` dated in the future (`done: false`), for example "Follow up if no news" at D+7, "Technical interview" on the planned date.
|
|
54
|
+
4. A deadline that has been dealt with: `mark_done`, then the event for what happened. A change of stage remains a status (`change_status`: `followed-up`, `interview`, `rejected`…).
|
|
55
|
+
5. At the start of a session: `deadlines` (overdue items and the next 7 days) to tell the user what lies ahead.
|
|
56
|
+
|
|
57
|
+
A job ad already being followed that reappears in an alert or a batch keeps its status: do not rescore it or change its status because of that.
|
|
58
|
+
|
|
59
|
+
## "Process the e-mails" flow (CLI)
|
|
60
|
+
|
|
61
|
+
1. `vigie-emploi ingest --json`: fetches the mailbox when one is configured (`mail` in the result), reads `<data>/emails/*.eml`, adds the new job ads, deletes the processed e-mails. Note `added`, `duplicates`, `dismissed`, `to_read` and `errors`.
|
|
62
|
+
2. `vigie-emploi to-read --json`: job ads to process without a score. `reading` field:
|
|
63
|
+
- `description`: the description is in the `description` field (truncated at 2,500 characters; `--full` for all of it);
|
|
64
|
+
- `browser`: open `url` in the user's browser;
|
|
65
|
+
- `human`: protected page, ask the user for the text.
|
|
66
|
+
3. Read the grid (`vigie-emploi rubric --instructions --json`), then read each job ad and score its criteria.
|
|
67
|
+
4. Write a batch file (JSON array, format below) then `vigie-emploi score --file lot.json` (`--dry-run` to check without saving). Job ads are found by `id` or `url`; they move to `scored`.
|
|
68
|
+
5. Summarise for the user: job ads scored, those above their threshold with conditions, what matches and the gaps.
|
|
69
|
+
6. Depending on their answer:
|
|
70
|
+
- "go": `vigie-emploi apply <id> --json` (moves to `go`, returns the full job ad and a suggested folder);
|
|
71
|
+
- no go: `vigie-emploi status <id> dismissed --comment "reason"`.
|
|
72
|
+
|
|
73
|
+
Format of a batch entry:
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"id": 42,
|
|
78
|
+
"url": "https://www.linkedin.com/jobs/view/1234567890/",
|
|
79
|
+
"title": "…", "company": "…", "location": "…", "contract": "…", "compensation": "…",
|
|
80
|
+
"remote": "…", "published": "DD/MM/YYYY or NC", "stack": "…",
|
|
81
|
+
"criteria": { "technique": { "score": 8, "justification": "…" }, "role": { "score": 7 }, "interet": { "score": 6 }, "risque": { "score": 7 } },
|
|
82
|
+
"inputs": { "onsite_days": 3 }, "blockers": [],
|
|
83
|
+
"fit": "…", "gaps": "…", "read": true, "tags": ["wordpress"]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`id` or `url` is enough; the other fields fill in what is missing from the database. Old format (overall score, without `criteria`): `"raw_score": 6.5, "penalties": "…", "score": 6`, still accepted but frozen.
|
|
88
|
+
|
|
89
|
+
## Other useful commands
|
|
90
|
+
|
|
91
|
+
| Need | Command |
|
|
92
|
+
|---|---|
|
|
93
|
+
| Seen before? | `vigie-emploi list --text "company" --json` |
|
|
94
|
+
| Best unprocessed job ads | `vigie-emploi list --status scored --score-min 5 --sort score --json` |
|
|
95
|
+
| By batch received, best scores first | `vigie-emploi list --status scored --sort received_at:desc,score:desc --json` |
|
|
96
|
+
| My applications | `vigie-emploi list --applications --json` |
|
|
97
|
+
| Details of a job ad | `vigie-emploi show <id> --json` |
|
|
98
|
+
| Application (folder, channel, date sent, next action) | `vigie-emploi application <id> --folder candidatures/x --channel LinkedIn --sent-at 02/11/2026 --next-action "…" --json` |
|
|
99
|
+
| Next action only | `vigie-emploi next-action <id> "Follow up on 09/11" --json` |
|
|
100
|
+
| Follow-up, interview, rejection | `vigie-emploi status <id> followed-up --comment "channel, date"` |
|
|
101
|
+
| Application tracker | `vigie-emploi generate-tracker --json` (preview `candidatures/_SUIVI.genere.md`) |
|
|
102
|
+
| Tags | `vigie-emploi tag <id> +a-reprendre -urgent --json` |
|
|
103
|
+
| Event (call, quote…) | `vigie-emploi event <id> --type proposal --at 15/10/2026 --summary "Quote sent via Upwork" --direction sent --amount 3000 --unit "£" --days 6 --file candidatures/x/quote.md --json` |
|
|
104
|
+
| Deadline | `vigie-emploi event <id> --type message --at +7 --summary "Follow up if no news" --json` |
|
|
105
|
+
| Log, deadlines | `vigie-emploi journal <id> --json`, `vigie-emploi deadlines --days 7 --json`, `vigie-emploi done <event_id> --json` |
|
|
106
|
+
| Files in the folder | `vigie-emploi files <id> --json` |
|
|
107
|
+
| Single score | `vigie-emploi score <id> --json '{"criteria": {"technique": {"score": 8, "justification": "…"}, …}, "fit": "…", "gaps": "…"}'` |
|
|
108
|
+
| Grid, instructions | `vigie-emploi rubric --instructions --json` |
|
|
109
|
+
| Change a weight (trial, then for real) | `vigie-emploi rubric --update '{"weight": {"remote": 30}}' --dry-run --json`, then `--summary "Remote work first"` |
|
|
110
|
+
| History, going back | `vigie-emploi rubric --history --json`, `vigie-emploi rubric --restore 2 --json` |
|
|
111
|
+
| Recalculate | `vigie-emploi rescore --json` |
|
|
112
|
+
|
|
113
|
+
The dashboard's "Process N e-mails" and "Prepare N applications" buttons open a terminal in the data folder and start the agent with `/traiter-emails` or `/preparer-go`: these commands come from the data folder (the user's instructions); follow them as if the user had typed them. The dashboard updates itself as things are written.
|
|
114
|
+
|
|
115
|
+
The dashboard's "Apply" button copies `apply <id>`: when the user pastes that text, run `vigie-emploi apply <id> --json` and prepare the application following their instructions.
|
|
116
|
+
|
|
117
|
+
## Developing on this repository
|
|
118
|
+
|
|
119
|
+
- `npm test` and `npm run build` must pass before each commit.
|
|
120
|
+
- Fictitious fixtures only (`tests/fixtures`): never real e-mails or real job ads.
|
|
121
|
+
- Schema: add a migration `migrations/000N_name.sql`; never change a migration that has already been published.
|
|
122
|
+
- The code (identifiers, comments, tests) is in English; the documentation is written in French, and `AGENTS.en.md`, `README.en.md` and `scaffold-en/` are its English versions.
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Piloter vigie-emploi depuis une IA
|
|
2
|
+
|
|
3
|
+
Ce fichier s'adresse à un agent (Claude Code ou autre) qui aide l'utilisateur à trier ses offres. L'application ne contacte aucun modèle d'IA : c'est l'agent qui lit, note et rend compte, l'application garde l'état.
|
|
4
|
+
|
|
5
|
+
Deux façons de piloter : les **outils MCP** (`vigie-emploi mcp`, à privilégier quand le client MCP est branché, voir [`docs/utiliser-avec-une-ia.md`](docs/utiliser-avec-une-ia.md)) ou la **CLI** avec `--json`. Les deux appellent le même noyau.
|
|
6
|
+
|
|
7
|
+
## Règles
|
|
8
|
+
|
|
9
|
+
- CLI : toujours passer `--json` : la sortie est stable et se lit sans ambiguïté. Les erreurs sortent sur stderr (`{"ok": false, "error": "…"}`) avec un code de retour non nul. MCP : une erreur revient comme résultat d'erreur (`isError`), le serveur continue.
|
|
10
|
+
- `_SUIVI.md` se génère depuis la base (`generate_tracker` / `vigie-emploi generate-tracker`) : ne pas l'éditer à la main (s'il remplace un ancien suivi tenu à la main, comparer d'abord avec l'aperçu). Par défaut l'aperçu `candidatures/_SUIVI.genere.md` ; `replace` seulement si l'utilisateur le demande.
|
|
11
|
+
- Le dossier de données vient de `VIGIE_EMPLOI_DATA`, de `--data` ou de `vigie-emploi.config.json`. Ne jamais écrire de donnée personnelle dans le dépôt de l'application.
|
|
12
|
+
- Boîte mail : ne jamais demander le mot de passe dans la conversation. L'utilisateur connecte sa boîte lui-même, dans le tableau de bord (bouton « Boîte mail ») ou avec `vigie-emploi mail setup` ; le mot de passe va dans le trousseau du système.
|
|
13
|
+
- Ne pas télécharger LinkedIn, Indeed ni Glassdoor par script : lire ces pages dans le navigateur de l'utilisateur, ou lui demander le texte (Glassdoor bloque les robots). Les descriptions Hellowork et Free-Work sont déjà en base après `ingest`.
|
|
14
|
+
- La grille de notation appartient à l'utilisateur (`profil/grille.json` de son dossier de données) : la lire avant de noter un lot (`rubric` en MCP, `vigie-emploi rubric --instructions --json` en CLI). Ne jamais donner la note finale : noter les critères, l'application calcule.
|
|
15
|
+
- Ne modifier la grille (`update_rubric`, `vigie-emploi rubric --update`) qu'à la demande de l'utilisateur : d'abord un essai (`dry_run: true` / `--dry-run`) dont on lui montre l'impact, puis l'enregistrement avec un résumé.
|
|
16
|
+
|
|
17
|
+
## Flux complet via MCP
|
|
18
|
+
|
|
19
|
+
1. **Ingérer** : `ingest_emails` (`keep: true` pour conserver les `.eml`) ; il relève d'abord la boîte mail si elle est configurée. Relever `added`, `duplicates`, `dismissed`, `to_read`, `errors`, et transmettre `to_tell` (e-mails relevés ou erreur de la boîte, e-mails supprimés).
|
|
20
|
+
2. **Lire** : `offers_to_read`. Selon `reading` : texte dans `description` ; `browser` = ouvrir `url` dans le navigateur de l'utilisateur ; `human` = lui demander le texte. `read_offer` pour le détail complet.
|
|
21
|
+
3. **Noter** avec la grille : `rubric` d'abord (critères, poids, barèmes, règles, inventaire, exemples, `instructions_ai`), puis `score_batch` (`{ "offers": [ {id, criteria, inputs, blockers, fit, gaps, read, tags}, … ] }`) ou `score_offer` pour une seule. Voir « Noter avec la grille » ci-dessous. Déjà vue ? `list_offers` avec `text`.
|
|
22
|
+
4. **Résumer** à l'utilisateur : offres notées, celles au-dessus de son seuil (celui de la grille), avec la décomposition (sous-notes, règles, drapeaux « inconnu » à vérifier), conditions, ce qui colle, écarts. Sans « go » : `change_status` → `dismissed` avec la raison en commentaire.
|
|
23
|
+
5. **Candidater** sur son « go » : `apply` (offre complète, dossier de données, `suggested_folder`, étapes). Préparer le dossier, le CV et les messages selon ses consignes (dans le dossier de données).
|
|
24
|
+
6. **Enregistrer la candidature** : `save_application` avec `folder`, `cv`, `channel`, `message`, `next_action` ; à l'envoi, `sent_at` (l'offre passe en `sent`). Ensuite : `change_status` (`followed-up`, `interview`, `rejected`, `closed`, `withdrawn`) et `save_application` pour la prochaine action.
|
|
25
|
+
7. **Tenir le journal** (voir ci-dessous) : chaque échange devient un événement, la suite une échéance.
|
|
26
|
+
8. **Générer le suivi** : `generate_tracker` → `candidatures/_SUIVI.genere.md` (sections En cours, Envoyées sans suite, Closes ; la prochaine action vient de la prochaine échéance).
|
|
27
|
+
|
|
28
|
+
## Noter avec la grille
|
|
29
|
+
|
|
30
|
+
1. Lire la grille (`rubric`). Les critères `source: "ai"` sont à noter de 0 à 10 avec une justification courte ; leur `description` dit quoi regarder. Le critère technique se juge contre l'inventaire (`strong` / `medium` / `light` / `zero`) : lister les écarts. Caler ses sous-notes sur les `examples`.
|
|
31
|
+
2. Ne pas noter les critères calculés (`remote`, `compensation`) : remplir `inputs` quand l'offre les donne (`onsite_days` 0 à 5, 0 = full remote ; `salary_min` / `salary_max` en euros ; `unit` year, month, day, hour). Sinon l'application les lit dans les champs de l'offre ; inconnus, ils valent 5 avec un drapeau.
|
|
32
|
+
3. `blockers` : identifiants des règles actives qui s'appliquent (stage, défense…). Une règle inconnue est refusée.
|
|
33
|
+
4. Ne pas envoyer `score` : avec `criteria`, il est ignoré (signalé dans `warnings`). La réponse donne la note calculée, la valeur exacte et la `breakdown`.
|
|
34
|
+
5. Essai possible : `score_batch` avec `dry_run: true` (CLI `score --file lot.json --dry-run`) calcule sans rien enregistrer.
|
|
35
|
+
6. Changer de priorité (« le télétravail compte plus », « 50 K€ me suffisent ») : `update_rubric` en essai, montrer l'impact (`rising`, `falling`), puis enregistrer avec un `summary` ; toutes les notes à critères sont recalculées. Retour arrière : `update_rubric` avec `restore_version`. Historique : `rubric_history`.
|
|
36
|
+
|
|
37
|
+
Exemple d'entrée :
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{ "id": 42,
|
|
41
|
+
"criteria": { "technique": { "score": 8, "justification": "PHP, API REST ; écart : PostgreSQL (zéro)" },
|
|
42
|
+
"role": { "score": 7, "justification": "Senior, pas de lead" },
|
|
43
|
+
"interet": { "score": 6, "justification": "SaaS pour TPE" },
|
|
44
|
+
"risque": { "score": 7, "justification": "Test sur projet existant" } },
|
|
45
|
+
"inputs": { "onsite_days": 2, "salary_min": 55000, "salary_max": 65000, "unit": "year" },
|
|
46
|
+
"blockers": [], "fit": "…", "gaps": "…", "read": true }
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Journal : quand l'utilisateur raconte un appel, un entretien, un message, un devis
|
|
50
|
+
|
|
51
|
+
1. **L'événement** : `add_event` (CLI : `vigie-emploi event <id> …`) avec le type (`message`, `interview`, `test`, `proposal`, `decision`, `note`), la date réelle (`at`), un résumé court, et ce qui est connu : `direction` (message envoyé / reçu), `channel`, `contacts`, `amount` + `unit` et `days` pour un devis, `details`.
|
|
52
|
+
2. **Le document éventuel** (compte rendu, devis, fiche d'appel) : l'écrire dans le dossier de candidature (`candidatures/<entreprise-poste>/…`), puis le citer dans `files` (chemin relatif au dossier de données ; `folder_files` liste ceux qui existent). Ne jamais recopier le contenu d'un document dans la base.
|
|
53
|
+
3. **La prochaine échéance** : un second `add_event` daté dans le futur (`done: false`), par exemple « Relancer si sans nouvelles » à J+7, « Entretien technique » à la date prévue.
|
|
54
|
+
4. Une échéance réalisée : `mark_done`, puis l'événement de ce qui s'est passé. Un changement d'étape reste un statut (`change_status` : `followed-up`, `interview`, `rejected`…).
|
|
55
|
+
5. En début de session : `deadlines` (retards et 7 prochains jours) pour dire à l'utilisateur ce qui l'attend.
|
|
56
|
+
|
|
57
|
+
Une offre déjà suivie qui réapparaît dans une alerte ou un lot garde son statut : ne pas la renoter ni la changer de statut pour autant.
|
|
58
|
+
|
|
59
|
+
## Flux « traite les e-mails » (CLI)
|
|
60
|
+
|
|
61
|
+
1. `vigie-emploi ingest --json` : relève la boîte mail si elle est configurée (`mail` dans le résultat), lit `<données>/emails/*.eml`, ajoute les nouvelles offres, supprime les e-mails traités. Relever `added`, `duplicates`, `dismissed`, `to_read`, `errors`.
|
|
62
|
+
2. `vigie-emploi to-read --json` : offres à traiter sans note. Champ `reading` :
|
|
63
|
+
- `description` : la description est dans le champ `description` (tronquée à 2 500 caractères ; `--full` pour tout) ;
|
|
64
|
+
- `browser` : ouvrir `url` dans le navigateur de l'utilisateur ;
|
|
65
|
+
- `human` : page protégée, demander le texte à l'utilisateur.
|
|
66
|
+
3. Lire la grille (`vigie-emploi rubric --instructions --json`), puis lire chaque offre et noter ses critères.
|
|
67
|
+
4. Écrire un fichier de lot (tableau JSON, format ci-dessous) puis `vigie-emploi score --file lot.json` (`--dry-run` pour vérifier sans enregistrer). Les offres sont retrouvées par `id` ou par `url` ; elles passent en `scored`.
|
|
68
|
+
5. Résumer à l'utilisateur : offres notées, celles au-dessus de son seuil avec conditions, ce qui colle et les écarts.
|
|
69
|
+
6. Selon sa réponse :
|
|
70
|
+
- « go » : `vigie-emploi apply <id> --json` (passe en `go`, renvoie l'offre complète et un dossier suggéré) ;
|
|
71
|
+
- pas de go : `vigie-emploi status <id> dismissed --comment "raison"`.
|
|
72
|
+
|
|
73
|
+
Format d'une entrée de lot :
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"id": 42,
|
|
78
|
+
"url": "https://www.linkedin.com/jobs/view/1234567890/",
|
|
79
|
+
"title": "…", "company": "…", "location": "…", "contract": "…", "compensation": "…",
|
|
80
|
+
"remote": "…", "published": "JJ/MM/AAAA ou NC", "stack": "…",
|
|
81
|
+
"criteria": { "technique": { "score": 8, "justification": "…" }, "role": { "score": 7 }, "interet": { "score": 6 }, "risque": { "score": 7 } },
|
|
82
|
+
"inputs": { "onsite_days": 3 }, "blockers": [],
|
|
83
|
+
"fit": "…", "gaps": "…", "read": true, "tags": ["wordpress"]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`id` ou `url` suffit ; les autres champs complètent ce qui manque en base. Ancien format (note globale, sans `criteria`) : `"raw_score": 6.5, "penalties": "…", "score": 6`, encore accepté mais figé.
|
|
88
|
+
|
|
89
|
+
## Autres commandes utiles
|
|
90
|
+
|
|
91
|
+
| Besoin | Commande |
|
|
92
|
+
|---|---|
|
|
93
|
+
| Déjà vue ? | `vigie-emploi list --text "entreprise" --json` |
|
|
94
|
+
| Meilleures offres non traitées | `vigie-emploi list --status scored --score-min 5 --sort score --json` |
|
|
95
|
+
| Par lot reçu, meilleures notes d'abord | `vigie-emploi list --status scored --sort received_at:desc,score:desc --json` |
|
|
96
|
+
| Mes candidatures | `vigie-emploi list --applications --json` |
|
|
97
|
+
| Détail d'une offre | `vigie-emploi show <id> --json` |
|
|
98
|
+
| Candidature (dossier, canal, envoi, prochaine action) | `vigie-emploi application <id> --folder candidatures/x --channel LinkedIn --sent-at 02/11/2026 --next-action "…" --json` |
|
|
99
|
+
| Prochaine action seule | `vigie-emploi next-action <id> "Relancer le 09/11" --json` |
|
|
100
|
+
| Relance, entretien, refus | `vigie-emploi status <id> followed-up --comment "canal, date"` |
|
|
101
|
+
| Suivi des candidatures | `vigie-emploi generate-tracker --json` (aperçu `candidatures/_SUIVI.genere.md`) |
|
|
102
|
+
| Tags | `vigie-emploi tag <id> +a-reprendre -urgent --json` |
|
|
103
|
+
| Événement (appel, devis…) | `vigie-emploi event <id> --type proposal --at 15/10/2026 --summary "Devis envoyé sur Malt" --direction sent --amount 3000 --unit "€ HT" --days 6 --file candidatures/x/devis.md --json` |
|
|
104
|
+
| Échéance | `vigie-emploi event <id> --type message --at +7 --summary "Relancer si sans nouvelles" --json` |
|
|
105
|
+
| Journal, échéances | `vigie-emploi journal <id> --json`, `vigie-emploi deadlines --days 7 --json`, `vigie-emploi done <event_id> --json` |
|
|
106
|
+
| Fichiers du dossier | `vigie-emploi files <id> --json` |
|
|
107
|
+
| Note seule | `vigie-emploi score <id> --json '{"criteria": {"technique": {"score": 8, "justification": "…"}, …}, "fit": "…", "gaps": "…"}'` |
|
|
108
|
+
| Grille, consignes | `vigie-emploi rubric --instructions --json` |
|
|
109
|
+
| Changer un poids (essai, puis pour de vrai) | `vigie-emploi rubric --update '{"weight": {"remote": 30}}' --dry-run --json`, puis `--summary "Télétravail prioritaire"` |
|
|
110
|
+
| Historique, retour arrière | `vigie-emploi rubric --history --json`, `vigie-emploi rubric --restore 2 --json` |
|
|
111
|
+
| Recalculer | `vigie-emploi rescore --json` |
|
|
112
|
+
|
|
113
|
+
Les boutons « Traiter N e-mails » et « Préparer N candidatures » du tableau de bord ouvrent un terminal dans le dossier de données et lancent l'agent avec `/traiter-emails` ou `/preparer-go` : ces commandes viennent du dossier de données (consignes de l'utilisateur) ; les suivre comme si l'utilisateur les avait tapées. Le tableau de bord se met à jour seul au fil des écritures.
|
|
114
|
+
|
|
115
|
+
Le bouton « Candidater » du tableau de bord copie `apply <id>` : quand l'utilisateur colle ce texte, lancer `vigie-emploi apply <id> --json` et préparer la candidature selon ses consignes.
|
|
116
|
+
|
|
117
|
+
## Développer sur ce dépôt
|
|
118
|
+
|
|
119
|
+
- `npm test` et `npm run build` doivent passer avant chaque commit.
|
|
120
|
+
- Fixtures uniquement fictives (`tests/fixtures`) : jamais de vrais e-mails ni de vraies offres.
|
|
121
|
+
- Schéma : ajouter une migration `migrations/000N_nom.sql`, ne jamais modifier une migration déjà publiée.
|
|
122
|
+
- Code (identifiants, commentaires, tests) en anglais ; interface et documentation en français, avec leurs versions anglaises (`AGENTS.en.md`, `README.en.md`, `scaffold-en/`, dictionnaires `en.ts`).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Damien BECHERINI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|