Skip to content

feat(onboarding): anthropic-native overhaul — Node 24, org gate, vercel env pull#111

Merged
abdout merged 5 commits into
mainfrom
docs/onboarding-anthropic-native
May 25, 2026
Merged

feat(onboarding): anthropic-native overhaul — Node 24, org gate, vercel env pull#111
abdout merged 5 commits into
mainfrom
docs/onboarding-anthropic-native

Conversation

@abdout
Copy link
Copy Markdown
Contributor

@abdout abdout commented May 24, 2026

Why

content/docs/onboarding.mdx is the single-paste front door for every new databayt teammate. Five drifts away from "fully productive in 20 minutes":

  1. Node pin stale — "Node 22 LTS" everywhere; v24.16.0 Krypton is current Active LTS, v22 moved to Maintenance.
  2. Tailscale + Apple Notes contradict our direction — memory feedback_anthropic_native.md explicitly says drop them; Anthropic ships the primitives natively (PushNotification, claude.ai/code, computer-use).
  3. No programmatic org-membership gategh auth login succeeds even if invite never accepted; clone phase silently 404s.
  4. Only hogwarts gets a .env — six other product repos cloned with empty env; vercel env pull invoked nowhere.
  5. Parallel docs driftsecrets.mdx lists 5 of ~25 secrets, uses wrong var name; credentials.mdx mislabels in 4 places.

After this PR: fresh machine reaches clone-push-PR any org repo, has .env for every cloned product, controls/watches Claude natively — no Tailscale, no Apple Notes.

Plan: ~/.claude/plans/but-for-example-for-cheeky-lighthouse.md

Changes (5 commits, reviewable independently)

Commit What
07a63db docs(onboarding): bump Node 22 LTS → 24 LTS (Krypton) everywhere Mac pins node@24; Win pins OpenJS.NodeJS.LTS; Linux stays on nvm install --lts. Bumps NodeSource setup_24.x + nvm v0.40.3 + Playwright LTS note in mcp.mdx.
b227b66 docs(onboarding): drop Tailscale + Apple Notes Dispatch Whole sections, wizard flags, Phase 9 blocks, mac Apple Notes osascript, and 3 hard-deletes (dispatch.sh, dispatch.mdx, .claude/commands/dispatch.md). One new "Remote control & async — native Anthropic surfaces" section replaces both.
1aa2426 feat(onboarding): fail fast on missing databayt org membership + SSH push gh api user/memberships/orgs/databayt --jq .state + ssh -T git@github.com gates after Phase 3 in all 3 OS scripts. Wizard pre-flight "Accepted databayt invite?" prompt in all 3 installers.
9e8961d feat(onboarding): vercel env pull per cloned product New vercel-pull.{sh,ps1} helpers loop vercel link + vercel env pull .env --environment=development over 7 products under team databayt. Vercel CLI install in Phase 1; helper invoked after Phase 6 secrets. Warn-and-continue on per-project failure.
e5cd709 docs: refresh secrets/credentials/commands docs secrets.mdx rewritten (two-layer Gist + Vercel model, trailing-\n gotcha from PR #97, canonical GITHUB_PERSONAL_ACCESS_TOKEN). credentials.mdx rename. commands.mdx drops /dispatch. Admin checklist promotes Vercel to every-role, adds Neon + Anthropic-mobile rows.

Verify table — now 7 layers

```bash
for t in git node pnpm gh claude vercel; do command -v $t; done # Tools
gh auth status && ssh -T git@github.com # Auth
gh api user/memberships/orgs/databayt --jq .state # NEW: Org gate
ls ~/kun ~/hogwarts ~/codebase # Code
for d in kun hogwarts souq mkan shifa marketing codebase; do [[ -s ~/$d/.env ]] && echo "$d ✓"; done # NEW: per-product env
bash ~/.claude/scripts/health.sh # Config
claude doctor # Surfaces
```

Test plan

  • On a clean machine (or ~/Library/Application Support/Databayt/installer-state.json deleted), re-run the bootstrap and confirm all 7 verify rows turn green
  • Without the databayt invite accepted, Phase 3 must fail loud (not silent 404 in Phase 4)
  • With Vercel logged in, every cloned product gets a populated .env; without Vercel login, install completes with one yellow warning per product
  • pnpm build of docs site green

Follow-up (not in this PR)

  • Captain agent operational dependency on the deleted dispatch.sh — needs PushNotification + GitHub Issues + Slack MCP wiring. Tracking issue to follow.
  • Several product docs still document the dispatch.sh-based workflow (cowork.mdx, captain.mdx, workflows.mdx, architecture.mdx, voice.mdx, tips.mdx, slack.mdx) — touched by the captain refactor PR.

🤖 Generated with Claude Code

abdout and others added 5 commits May 24, 2026 13:40
Node 24.16.0 Krypton is the current Active LTS as of 2026-05-24; v22 Jod
moved to Maintenance. Updates onboarding.mdx (3 sites), all 3 OS install
scripts, wizard-steps.json, self-hosting.mdx NodeSource pin, and mcp.mdx
Playwright support line.

Mac now pins node@24 (was unpinned brew install node); Windows pins
OpenJS.NodeJS.LTS (was unpinned OpenJS.NodeJS); Linux stays on
nvm install --lts (auto-resolves to current LTS).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ve Anthropic surfaces

The optional Tailscale SSH and Apple Notes Dispatch sections contradict
the anthropic-native direction. Anthropic already ships the primitives we
should advertise instead: PushNotification tool (CLI → mobile),
claude.ai/code (remote control), computer-use beta (browser automation),
GitHub Issues + Slack MCP (team async).

Removed from onboarding flow:
- Optional row in Deliverables, Modify, wizard pre-flight, and Act 2 tables
- Entire "Remote control via Tailscale" + "Apple Notes Dispatch" sections
  → replaced with one "Remote control & async — native Anthropic surfaces"
  section that pitches the native primitives
- `--with-tailscale` / `-WithTailscale` flag (CLI + wizard + state schema)
- Phase 9 Tailscale block in onboarding-{mac,linux}.sh + onboarding-windows.ps1
- Apple Notes Dispatch-folder osascript block in onboarding-mac.sh
- Post-run "Re-run with --with-tailscale" hint in all 3 OS scripts
- /dispatch row from Daily entry points + Where-to-go-next link
- `dispatch` from .claude/CLAUDE.md Tier 2 commands + Tier 3 Operations
  vocabulary
- Tailscale VPN section + ACL table from self-hosting.mdx; updated
  cross-device row to point at mobile app + claude.ai/code

Hard-deleted (kept in git history):
- .claude/scripts/dispatch.sh
- .claude/commands/dispatch.md
- content/docs/dispatch.mdx

Known follow-up not in this commit (operational refactor needed):
- .claude/agents/captain.md and .claude/rules/cowork-bridge.md still
  reference dispatch.sh as the captain's escalation channel. These need
  a follow-up PR that switches captain to PushNotification +
  GitHub Issues + Slack MCP. Plan note added.
- Several product docs (cowork.mdx, captain.mdx, workflows.mdx,
  architecture.mdx, voice.mdx, tips.mdx, commands.mdx, slack.mdx) still
  document the dispatch.sh-based workflow; touched in Phase 5 sweep.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…push

Adds two pre-clone gates in Phase 3 of all three OS scripts (mac, linux,
windows) so a teammate can't proceed to Phase 4 cloning if their account
is misconfigured — instead of getting silent 404s on private repos:

1. databayt org membership via `gh api user/memberships/orgs/databayt
   --jq .state` — must return "active". On token-scope failure prints
   the gh auth refresh command; on inactive membership opens the invite
   page and exits.
2. SSH push capability via `ssh -T git@github.com` — grep the banner for
   "successfully authenticated" since GitHub always exits non-zero.

Also adds a wizard pre-flight prompt ("Have you accepted the databayt
org invite?") modeled on the existing GitHub-account question pattern,
persisted as `hasDatabaytInvite` in the installer state file. Modeled
on installer.sh:132 (the existing GitHub-account "Yes / No, create one
/ Skip" pattern). Mirrored across installer.sh, installer-linux.sh,
installer.ps1.

Default `gh auth login -p ssh -w` already requests `read:org` scope
(verified in gh CLI docs); no `-s` flag added.

wizard-steps.json schema gains hasGithub / hasDatabaytInvite /
hasAnthropic, plus the new pre-flight step entry. Phase 3 label in
docs + JSON now mentions the org gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…databayt)

Vercel is the source of truth for app env vars; `~/.claude/.env` (from
the Gist) handles MCP keys + cross-cutting tokens. This bridges the gap:
each cloned product gets its `.env` from Vercel during onboarding.

New helpers:
- .claude/scripts/vercel-pull.sh   — loops `vercel link` + `vercel env
  pull .env --environment=development` across kun, hogwarts, codebase,
  souq, mkan, shifa, marketing under team `databayt`. Warn-and-continue
  on per-project failure; never abort.
- .claude/scripts/vercel-pull.ps1  — Windows equivalent.

All three OS scripts now:
- Phase 1: `npm install -g vercel` (next to pnpm install)
- Phase 6: invoke vercel-pull right after secrets.sh runs

If `vercel` CLI is missing or the user isn't logged in, the helper prints
a one-line warning and exits 0 so the install doesn't fail. Teammate
runs `vercel login` later and re-runs the bootstrap (idempotent).

onboarding.mdx updated:
- Side-tools row mentions Vercel CLI
- Verify table grows from 6 to 7 layers, adding NEW rows for org gate
  (Phase 3 work) and per-product env check
- Act 2 phase descriptions updated for Phase 1 (Vercel CLI) and Phase 6
  (Gist + Vercel env pull split)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tive onboarding

Brings parallel docs in line with the new onboarding flow:

content/docs/secrets.mdx — rewritten. Old doc listed 5 secrets and used
the wrong var name; reality is ~25 keys across 9 Gist sections plus
per-product Vercel env. New doc explains:
- Two-layer model: Gist (~/.claude/.env, cross-cutting + MCP) vs.
  vercel env pull (~/<repo>/.env, per-product app vars)
- secrets-template.json source-of-truth at .claude/scripts/
- The Vercel trailing-newline gotcha (PR #97 incident) + `printf` fix
- `.env` (not `.env.local`) convention per ~/.claude/CLAUDE.md
- Canonical var name `GITHUB_PERSONAL_ACCESS_TOKEN` (not `GITHUB_TOKEN`)
- Re-pull via bash ~/kun/.claude/scripts/vercel-pull.sh

content/docs/credentials.mdx — GITHUB_TOKEN → GITHUB_PERSONAL_ACCESS_TOKEN
across the 3 example commands. Var name now matches the convention used
across all databayt repos and ~/.claude/mcp.json.

content/docs/commands.mdx — drop the /dispatch row (Apple Notes
Dispatch was removed in the previous commit; the command file is gone).

content/docs/onboarding.mdx admin checklist (Before you sit down):
- GitHub row now mentions Phase 3 hard-gate
- New "Anthropic mobile app" row (native PushNotification dispatch)
- Vercel row promoted from engineer-only to **every role** — needed for
  vercel env pull
- New Neon row (project access for DATABASE_URL_*)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kun Ready Ready Preview, Comment May 24, 2026 4:32pm

@abdout abdout merged commit 548cd28 into main May 25, 2026
2 checks passed
@abdout abdout deleted the docs/onboarding-anthropic-native branch May 25, 2026 01:30
abdout added a commit that referenced this pull request May 25, 2026
…backends

Most teammates already have Chrome, WebStorm, VS Code, git, Node, etc.
The previous "if missing { install } else { skip }" pattern left tools
stale on long-lived machines and reinstalled nothing when present. New
pattern: detect → upgrade-if-outdated → install-if-missing → skip-if-fresh.

Helpers added:
- onboarding-mac.sh: `brew_smart <pkg> [--cask]` + `npm_global_smart <pkg>`
- onboarding-linux.sh: `apt_smart <pkg>` + `snap_smart <pkg> [--classic]` +
  `npm_global_smart`
- onboarding-windows.ps1: `Winget-Smart <pkgId>` + `Npm-Global-Smart <pkg>`

All helpers report install vs upgrade vs already-latest distinctly, so
re-runs are honest about what changed.

Refactored install sites:
- Phase 1 (every script): git, gh CLI, Node (mac=brew node@24, linux=nvm
  install --lts, win=winget OpenJS.NodeJS.LTS), pnpm, vercel
- Phase 2: WebStorm, VS Code, Chrome — all skip-if-present-and-fresh,
  upgrade-if-outdated
- Phase 5: Claude Desktop (Mac brew_smart claude --cask; Win Winget-Smart
  Anthropic.Claude)

Latest stable versions confirmed:
- Node 24.16.0 Krypton (Active LTS) — already pinned in PR #111
- nvm v0.40.4 (Jan 29 release; was v0.40.3) — bumped in linux script +
  onboarding.mdx
- Claude Code CLI — native installer (curl install.sh / irm install.ps1)
  per code.claude.com/docs/en/setup; auto-updates in background
- pnpm, vercel, gh, WebStorm, VS Code, Chrome — package managers always
  pull latest stable; @latest pin added to npm globals for explicitness

Net: each re-run of the bootstrap upgrades stale tools without reinstall
churn. Fresh machines get the same install paths as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
abdout added a commit that referenced this pull request May 25, 2026
…pgrade/install) (#113)

* chore(onboarding): simplify wizard from 11 dialogs to 4

Removes 7 questions that either don't matter or can be auto-derived:

- Welcome / Start / Cancel       → install starts immediately on paste
- Pick role (engineer/business/  → universal config; backends default to
  content/ops)                     "engineer" (role is a label only)
- Claude Pro/Max?                → Act 3 Desktop dialogs now gate on
                                   /Applications/Claude.app existing
- Full name (text input)         → auto-derived from `gh api user --jq
- Email (text input)               '.name // .login'` after Phase 3 auth
                                   (email = <login>@users.noreply.github.com)
- Secrets Gist ID                → install completes without; final dialog
                                   reminds teammate to run secrets.sh later
- Set up hogwarts local dev?     → defaults to off; --hogwarts-dev /
                                   -HogwartsDev CLI flag still opts in

Anthropic dialog kept but reworded for company-account + HR/OTP context:
"Anthropic — company account (HR shares credentials + sends OTP).
Install proceeds in parallel while you wait." Non-blocking by design;
sign-in completes in Act 3 manual finishing or via `claude` post-install.

Backends (onboarding-{mac,linux}.sh + onboarding-windows.ps1):
- ROLE positional becomes optional; defaults to "engineer"
- Phase 3 git config restructured: SSH key gen + gh auth first, THEN
  set git identity (priority: --name/--email arg → existing config →
  gh api user → $(whoami) fallback). Lets the wizard skip name/email
  questions entirely while still attributing commits to the real user.

Installers (installer.sh + installer-linux.sh + installer.ps1):
- Drop state reads for role/gitName/gitEmail/gistId/proMax
- Drop ask_role / Ask-Role helper definitions (dead code)
- Backend invocation simplified: just role positional + --quiet + opt-in
  flags. No --name/--email, no GIST_ID positional.
- Act 3 Desktop sign-in dialog rephrased to mention company creds + OTP
- Act 3 dialog gates: replace `proMax == 1` with `Claude.app exists`;
  replace `role == engineer` with `WebStorm installed`
- Final dialog message: drop role mention; add "load secrets later"
  and "finish Anthropic sign-in when OTP arrives" reminders

wizard-steps.json:
- Act 1 steps: 7 removed entries replaced with the 4 that remain
  (hasGithub, hasDatabaytInvite, hasAnthropic, reposDir); each carries
  a note explaining the new behavior
- New `removedAsOf2026_05_25` block documents what was cut + why
- Phase 3 label mentions git-identity auto-set
- Act 3 gate descriptions updated for the proMax/role removals
- stateFile schema: drop role/gitName/gitEmail/gistId/proMax fields

content/docs/onboarding.mdx Act 1 table: rewritten to 4 dialogs + a
"What's no longer asked" table explaining the auto-derivation paths.
Act 2 Phase 3 description mentions git-identity auto-set.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(onboarding): smart install — skip/upgrade/install across all 3 backends

Most teammates already have Chrome, WebStorm, VS Code, git, Node, etc.
The previous "if missing { install } else { skip }" pattern left tools
stale on long-lived machines and reinstalled nothing when present. New
pattern: detect → upgrade-if-outdated → install-if-missing → skip-if-fresh.

Helpers added:
- onboarding-mac.sh: `brew_smart <pkg> [--cask]` + `npm_global_smart <pkg>`
- onboarding-linux.sh: `apt_smart <pkg>` + `snap_smart <pkg> [--classic]` +
  `npm_global_smart`
- onboarding-windows.ps1: `Winget-Smart <pkgId>` + `Npm-Global-Smart <pkg>`

All helpers report install vs upgrade vs already-latest distinctly, so
re-runs are honest about what changed.

Refactored install sites:
- Phase 1 (every script): git, gh CLI, Node (mac=brew node@24, linux=nvm
  install --lts, win=winget OpenJS.NodeJS.LTS), pnpm, vercel
- Phase 2: WebStorm, VS Code, Chrome — all skip-if-present-and-fresh,
  upgrade-if-outdated
- Phase 5: Claude Desktop (Mac brew_smart claude --cask; Win Winget-Smart
  Anthropic.Claude)

Latest stable versions confirmed:
- Node 24.16.0 Krypton (Active LTS) — already pinned in PR #111
- nvm v0.40.4 (Jan 29 release; was v0.40.3) — bumped in linux script +
  onboarding.mdx
- Claude Code CLI — native installer (curl install.sh / irm install.ps1)
  per code.claude.com/docs/en/setup; auto-updates in background
- pnpm, vercel, gh, WebStorm, VS Code, Chrome — package managers always
  pull latest stable; @latest pin added to npm globals for explicitness

Net: each re-run of the bootstrap upgrades stale tools without reinstall
churn. Fresh machines get the same install paths as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
abdout added a commit that referenced this pull request May 25, 2026
…b Issues + Slack MCP (#114)

PR #111 hard-deleted dispatch.sh; captain.md + cowork-bridge.md + 7
product docs still referenced it. This refactor swaps the shell wrapper
for native Anthropic primitives that don't need bash/osascript.

Native replacements:
- Push to Abdout's iPhone → PushNotification tool → Anthropic mobile app
- Async team comms → GitHub Issues (priority/blocking, priority/decision,
  from-captain, from-abdout labels) + Slack MCP (`/slack send`)
- Cowork ↔ Code handoff → ~/.claude/bridge.md (already existed; this PR
  promotes it from secondary to primary)
- Captain weekly digest → Slack #general via slack MCP + PushNotification
  ping to Abdout

.claude/agents/captain.md (535 lines, ~10 edit sites):
- Added PushNotification to tools array
- Session-start: dispatch.sh read inbox/cowork → read bridge.md +
  gh issue list --label from-abdout
- ACT items: dispatch_to_team_via_slack_or_apple_notes →
  notify_team_via_slack_mcp_or_pushnotification_to_abdout_mobile
- Escalation channel paragraph: 3-step native escalation (push → issue →
  Slack DM); 24h/72h follow-up logic preserved
- Monday/Friday cycle: Apple Notes dispatch lines → Slack post + push
- Channel 1 section completely rewritten (Native Push + Cowork Bridge)
- Autopilot CAN: dropped Apple Notes; added PushNotification, bridge.md,
  Slack MCP explicit grants
- Cross-agent example "Ahmed Baha hasn't responded": dispatch [decision]
  → PushNotification + companion GitHub issue

.claude/rules/cowork-bridge.md:
- Capability table: dropped Apple Notes row, added PushNotification + Slack
- Session-start: dropped dispatch.sh read; added gh issue list label filters
- "Apple Notes (Code-Only)" section → "Reaching Abdout asynchronously"
  with 4 native primitives

7 product docs swept (all dispatch.sh narrative replaced):
- content/docs/captain.mdx — 3-channel summary updated
- content/docs/cowork.mdx — Shared State table, handoff examples, session
  start protocols
- content/docs/workflows.mdx — Channel 1 table
- content/docs/architecture.mdx — 3-channel comm table + bridge flow
- content/docs/slack.mdx — dispatch-to-slack bash snippet → slack MCP
- content/docs/voice.mdx — "read latest dispatch" → "read latest weekly file"
- content/docs/tips.mdx — phone-to-desktop remote-control example

Memory files (.claude/memory/*) intentionally left alone — they're
historical record per PR #112 acceptance criteria.

Closes #112

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant