Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
strategy:
fail-fast: false
matrix:
suite: [api, browser, production, calibration, orchestration]
suite: [api, browser, production, calibration, orchestration, cli]
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ SyberLabs' job-search product: a private review workspace that remembers the rol
- Choose between real postings to set preferences, then plan the week to maximise the expected value of the best single offer.
- Pull public Greenhouse and Lever boards onto existing job identity. Discovery arrives Held.
- Record outcomes with a receipt before a submission counts toward reply rates. Ended applications cannot be reopened by import.
- Drive the citation-gated draft loop from a local command line. Domain refusals exit 3 and write nothing. The CLI cannot accept drafts, verify facts, or submit applications.
- Explore fictional example records; no real applicant data is included.

## Integrations
Expand All @@ -26,7 +27,7 @@ SyberLabs' job-search product: a private review workspace that remembers the rol
- **[Codex](integrations/OPENAI.md)**: The same packet, plus optional local drafting through the signed-in Codex CLI.
- **[Obsidian](integrations/OBSIDIAN.md)**: Selected research notes, version-bound draft edits, and job-context exports from your vault.
- **[Notion](integrations/README.md)**: Read-only research import through a local command you run with your own credentials.
- **[Claude](integrations/README.md)**: Draft preparation from your verified facts through the Claude API, using your own key.
- **[Claude](integrations/README.md)**: Draft preparation from your verified facts through the Claude API, using your own key. The local relay CLI can log those drafts through the citation gate.
- **[Grok Bot](integrations/GROK_BOT.md)**: Validated research and draft file exchange inside the Bot's VM.
- **[Tracker CSV](integrations/README.md)**: Map columns, preview rows, and import a local tracker file as research.
- **[Greenhouse](integrations/README.md)**: Read-only public board pull onto existing job identity. No credentials and no application sending.
Expand Down Expand Up @@ -190,11 +191,12 @@ pnpm public-copy:check
node tests/api.test.mjs
pnpm test:calibration
pnpm test:orchestration
pnpm test:cli
```

The project, organization, personal profile, and website share one [maintained product description](docs/public-copy.json). [Public-copy process](docs/PUBLIC-COPY.md) explains generation, checks, and automatic refreshes.

`pnpm test` is the unit gate. The API, calibration, and orchestration live suites each get a dedicated freshly migrated database via `pnpm test:api`, `pnpm test:calibration`, and `pnpm test:orchestration`. Do not run calibration and orchestration against the same D1: calibration graduates clusters and retires facts. Connector tests mock vendor responses; they do not prove live account access.
`pnpm test` is the unit gate. The API, calibration, orchestration, and CLI live suites each get a dedicated freshly migrated database via `pnpm test:api`, `pnpm test:calibration`, `pnpm test:orchestration`, and `pnpm test:cli`. Do not run those live suites against the same D1: calibration graduates clusters and retires facts. Connector tests mock vendor responses; they do not prove live account access.

For an existing local database still on migration 0001, apply 0002, then 0003 and 0004. From 0002, apply 0003 then 0004. From 0003, apply only 0004. Migration 0003 adds the fact ledger, style rules and draft-review tables. Migration 0004 adds preference, choice and outcome tables and defaulted posting columns on `jobs`; existing rows stay. Imported Ready is research evidence; a new record stays Held until its exact draft is accepted in Relay.

Expand Down
5 changes: 3 additions & 2 deletions docs/public-copy.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"Batch review of logged drafts. Staging a draft does not accept it or send an application.",
"Choose between real postings to set preferences, then plan the week to maximise the expected value of the best single offer.",
"Pull public Greenhouse and Lever boards onto existing job identity. Discovery arrives Held.",
"Record outcomes with a receipt before a submission counts toward reply rates. Ended applications cannot be reopened by import."
"Record outcomes with a receipt before a submission counts toward reply rates. Ended applications cannot be reopened by import.",
"Drive the citation-gated draft loop from a local command line. Domain refusals exit 3 and write nothing. The CLI cannot accept drafts, verify facts, or submit applications."
],
"integrations": [
{
Expand All @@ -42,7 +43,7 @@
},
{
"name": "Claude",
"description": "Draft preparation from your verified facts through the Claude API, using your own key.",
"description": "Draft preparation from your verified facts through the Claude API, using your own key. The local relay CLI can log those drafts through the citation gate.",
"guide": "integrations/README.md"
},
{
Expand Down
41 changes: 41 additions & 0 deletions integrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,47 @@ node integrations/relay.mjs board-pull lever <company> private-data/board.json

The board identifier is the one in the public URL. Load the output with **Load research or draft**, preview, then import. Postings normalise onto the same job identity as everything else, so a role found on several boards stays one record, and every row arrives Held. Compensation is parsed from the posting text when published and left unknown otherwise; unknown is scored neutrally, never as zero.

## The `relay` command line

The connectors above produce files. These commands talk to a running local Relay and are what an agent uses to work through the citation gate. They need `pnpm dev` running.

```sh
node integrations/relay.mjs login # cache a local session
node integrations/relay.mjs plan # this week, with ids and reasons
node integrations/relay.mjs brief <job_id> --json # facts you may cite + style rules
node integrations/relay.mjs log <job_id> draft.txt --cite f1,f2
node integrations/relay.mjs draft <job_id> [--out file] [--force]
node integrations/relay.mjs status # cluster trust, review due
node integrations/relay.mjs outcome <job_id> submitted --receipt "confirmation #A-88"
```

**Local only.** `RELAY_URL` must point at `localhost` or `127.0.0.1`. Production identity comes from a trusted gateway the CLI cannot present, so there is nothing safe to aim it at yet. The session is cached in the ignored `private-data/.session` at mode 600.

### Exit codes

An unattended agent relies on these. The distinction that matters is 3 against 4.

| Code | Meaning | What to do |
| ---- | ---------------------------- | ----------------------------------------- |
| 0 | Success | Continue |
| 1 | Usage or configuration error | Stop; a human misconfigured it |
| 2 | Not signed in | Run `login`, once |
| 3 | Refused by a domain rule | **Fix the input. Never retry unchanged.** |
| 4 | Server or network failure | Retry with backoff |
| 5 | Nothing to do | Stop cleanly |

A refused draft prints the offending sentence and writes nothing, including `--out`. `relay draft --out` writes that file only after the draft is logged. An existing file is left untouched unless `--force` is passed.

`--json` prints one object on stdout and sends every diagnostic to stderr.

Recording an outcome sends the current job `version`. A stale version is a refusal (exit 3), not a retryable server failure.

### What the command line will not do

It can do anything except exercise taste or authorise an irreversible act. It cannot accept a draft, verify a fact, close a review with rules, or answer a preference pair — those stay in the browser, where a person is looking. It cannot submit an application, because no write plane exists. Terminal outcomes need `--yes`, since they close a job permanently.

`relay draft` writes against the verified fact ledger and logs through the citation gate. The older `claude-draft` packet flow still takes facts you typed by hand and bypasses both.

## Profile, drafts and review

The fact ledger and style card live in the app at `/profile`, and review sessions at `/review`. Neither needs a connector or credentials: extraction runs locally on text you paste, and no resume file leaves your machine.
Expand Down
Loading
Loading