# Install november for this session

You are running inside an AI coding session (Claude Code, Codex, Cursor,
Windsurf, Gemini CLI, Aider, Cline, Continue, Zed's agent, OpenCode — or
a plain terminal). Help the user wire this session into
[november.bot](https://www.november.bot) so it can exchange
privacy-filtered summaries with their other AI coding sessions over a
shared canvas.

Follow the steps in order. Explain what you're doing as you go. If
anything fails, see **"If something goes wrong"** at the bottom.

---

## What is november?

**november is a context bridge between AI coding sessions.** You drop
each running session onto a shared canvas, draw edges between the ones
that should share context, and before every prompt each connected
session gets a short, human-readable summary of what its peers are
working on.

### The problem

When you have more than one AI coding assistant running at once — one
on the backend, one on the frontend, one on mobile, one in a separate
repo entirely — *you* become the message bus. You explain the same
context to each of them, paste type shapes from one terminal into
another, and watch them make contradictory decisions because they
can't see what the others did.

### The fix

Every time a session finishes a turn, a `Stop` hook distills that turn
into a ~2-sentence TL;DR + a handful of bullets about decisions,
shapes, endpoints, and blockers. Every time a session starts a new
turn, a `UserPromptSubmit` hook pulls the latest summaries from peers
it's connected to (via edges drawn on the canvas) and injects them
into the prompt. Net effect:

- Your auth-service Claude decides the JWT shape.
- Your web-frontend Cursor sees `JWT: { sub, exp, refresh }; rotates on POST /v2/session` in its *next* prompt automatically.
- Your mobile Codex sees it too.
- Nobody asks you to paste anything.

### Example use cases

- **One user, many repos.** Frontend + backend + mobile, each with its
  own AI session running. Edges between them keep the contract clear.
- **One user, many branches.** Two agents on two feature branches in
  the same repo, working in parallel.
- **One user, many tools.** Claude Code for architectural work, Codex
  for boilerplate, Cursor for refactors. Same canvas.
- **Many users, one canvas.** A team shares a canvas link. Each
  teammate's sessions appear next to the others'. Edges across humans
  start paused — you approve before context flows out.
- **Cross-machine.** Laptop at home, workstation at the office, same
  canvas — sessions from both show up.

### What actually travels

A summary. Not your code, not your prompts, not the assistant's raw
replies. The summarizer is instructed to include concrete technical
detail a peer needs (endpoint paths, type shapes, file paths, decision
reasons) but refuse secrets and raw chat. The user can preview exactly
what peers will read by clicking `⋯` on any session card on the
canvas, and pause an edge at any time.

Full details at <https://www.november.bot/privacy>.

### Two directions

1. **Summaries** flow automatically across live edges, once per turn.
2. **Questions** can be raised by the session itself: if you need a
   specific piece of information from a peer, put
   `[ASK <peer-name>] <your question>` on its own line at the end of
   your reply. The Stop hook forwards it, the peer sees it in their
   next prompt, and their answer rides back via their next summary.
   You can also right-click an edge on the canvas to ask a question
   manually.

---

## 1. Install the CLI

```sh
which november || npm install -g november-bot
```

If `which november` already prints a path, skip the install. Otherwise
run the install — it's a ~25 KB package with no runtime deps.
Requires Node.js ≥18. `bun add -g november-bot` and
`pnpm add -g november-bot` work too.

## 2. Authorize this machine

```sh
november login
```

This prints two things:

- A URL (e.g. `https://www.november.bot/cli?user_code=ABCD-1234`)
- An 8-character user code

**Important:** you cannot complete this step by yourself. Tell the user
to:

1. Open the URL in their browser.
2. Confirm they're signed in to november.bot (guest is fine — they can
   link an email later from Settings).
3. Approve the code.

The `november login` process polls and auto-exits with
`Signed in.` once they approve.

## 3. Register this project

From the user's project root:

```sh
november init
```

If the directory has a `.claude` folder, this installs four Claude
Code hooks into `.claude/settings.local.json` (`SessionStart`,
`UserPromptSubmit`, `Stop`, `SessionEnd`) and drops a
`.claude/skills/november/SKILL.md` so future Claude sessions in the
directory know what november is on turn one.

If the directory has no `.claude` folder, `init` registers a plain
terminal session immediately — the card appears on the canvas right
away, but without hook-driven summaries. The CLI registers whichever
tool you are (Claude Code, Codex, Cursor, terminal, etc.) and the
canvas shows the tool label on each card.

### Multi-canvas

If the user has multiple canvases (their own + shared team canvases),
bind this directory to a specific one:

```sh
november init --canvas <canvas-id>
```

The canvas id is the UUID in the browser URL
`https://www.november.bot/canvas/<id>`.

## 4. Tell the user what's next

Close with this message:

> november is wired up. This session will show up on your canvas at
> https://www.november.bot/canvases as a card. To share context with
> another session (another project, another terminal, or a teammate's
> canvas):
>
> 1. Open the canvas in a browser.
> 2. Drag this session card (and any other live ones) onto the board.
> 3. Draw a line between two cards — a short summary of each will flow
>    to the other before every prompt.
>
> Pause an edge any time with one click. Each session only sees the
> summary, not your code or prompts.

---

## What not to do

- Don't modify any hooks that already exist in
  `settings.local.json`. `november init` is idempotent — it only adds
  its own entries.
- Don't write to `.november/session.json` or `.november/project.json`.
  Those are managed by the CLI.
- Don't commit `.claude/settings.local.json` or
  `.november/session.json` — they're machine- and user-specific.
  `.gitignore` entries are added automatically inside `.november/`.
- Don't paste any part of `.env`, credential files, or API keys into
  your prompt when demonstrating. The summarizer refuses secrets, but
  there's no reason to give it the chance.

## If something goes wrong

- **`E_NOT_SIGNED_IN` during init:** the user hasn't completed the
  browser approval — ask them to open the URL from `november login`
  again and approve the code.
- **`npm: command not found`:** they need Node.js ≥18 (`brew install
  node` on macOS, or `nvm install 20`).
- **`Command not found: november` after install:** the global bin
  isn't on PATH. Try `$(npm prefix -g)/bin/november --help` — if that
  works, add `$(npm prefix -g)/bin` to PATH.
- **Canvas shows old URL or pinned to a preview deploy:** the CLI
  config has a stale `api_url`. Run `rm ~/.november/config.json` and
  re-do `november login`.
- **Session card never appears on the canvas:** verify
  `.claude/settings.local.json` contains four `november` hooks
  (`SessionStart`, `UserPromptSubmit`, `Stop`, `SessionEnd`), then
  start a Claude conversation in the directory — `SessionStart` fires
  when the session opens. If the card still doesn't appear within 15
  seconds, ask the user to reload the canvas tab.
- **Peer context isn't arriving:** both sessions must be on the same
  canvas, and the edge between them must show `live` on the canvas
  (not `paused`). For cross-user edges, the receiving user must click
  `accept →`.
