You are setting up this clone for the user, who is present and can do browser
steps when asked. docs/setup.md is the source of truth — read it before
acting and follow its order. Go ONE STEP AT A TIME: do a step, verify it,
show the evidence, then move on.
-
Prerequisites — python3 (3.11+), git, gh CLI installed AND
authenticated (gh auth status); confirm origin points at the user's
fork and the branch is main. Report gaps with install instructions
before continuing.
-
Install — virtualenv, pip install -e '.[dev]', then
python3 -m pytest and bowerbird lint must pass; git status clean.
-
X developer app — create a NEW app dedicated to Bowerbird (names
are globally unique; suggest bowerbird-<handle>). Pay-as-you-go
billing, OAuth 2.0 user auth, and redirect URI
http://bowerbird.localhost:8080/callback. Follow the click-by-click appendix in
docs/setup.md (covers the old portal and the new console.x.com). Stage
the three credentials per the clipboard rule.
-
Remaining credentials — stage into bin/.env, then push:
a. GitHub automation: first use existing gh authentication for everything
terminal automation can do. bowerbird push-secrets sets initial Actions
secrets from bin/.env through gh secret set; do not create a PAT just
to push setup secrets. If the repo exposes a GitHub App setup path for
scheduled writeback, prefer it: one human install/authorization step, then
short-lived installation tokens generated programmatically. Only if this
repo version still requires GH_PAT, create a fine-grained PAT scoped to
this repo with repository permission Secrets: read and write. Do not
try to API-create the PAT; GitHub requires its browser settings flow. Keep
the PAT name under 40 characters and treat creation as a user-owned
Generate/Copy handoff if browser automation is brittle. Clipboard rule
applies.
b. Model provider key: default to the active setup agent's provider unless
the user chooses otherwise. In Codex, use OpenAI/Codex:
bowerbird models --provider openai --write, open
https://platform.openai.com/api-keys, create a Bowerbird API key, and
stage it as OPENAI_API_KEY per the clipboard rule. If the user selects
Claude or Gemini instead, use bowerbird models --provider anthropic --write plus ANTHROPIC_API_KEY, or bowerbird models --provider gemini --write plus GEMINI_API_KEY. Hosted CI cannot use a local app
subscription directly; it needs the API key secret.
c. Run bowerbird auth to create bin/.x_tokens.json, then run
bowerbird push-secrets. Verify names with gh secret list; it
should include X_TOKENS and the compile key the user chose.
BOWERBIRD_LIVE_INSTANCE=true should be set once required ingest
secrets are present.
-
Watch folders and follow accounts — run bowerbird folders, then
ask the user which folders to watch and which accounts to follow. Use
plain language: "watch a folder", "follow an account", "wiki section",
and "recap label". Write config/topics.toml and
config/accounts.toml directly, then commit the config changes.
-
First pull — commit/push anything still local, ensure Actions are
enabled, then run the first import workflows serially to avoid branch-race
push failures: dispatch account-dump first, watch it green, pull the
resulting commit locally, then dispatch pull-bookmarks with
limit_per_folder=3 and watch it green. The default first bookmark import
is capped to the latest 3 items per selected folder. If the user explicitly
asks to import all folder history,
first run bowerbird folders --counts, explain the count/cost estimate,
then dispatch pull-bookmarks with import_all=true. Confirm
compile-wiki chains green, new files land in raw/ and wiki/, and
bowerbird lint passes. Compile can take a few minutes in the model step;
do not treat a quiet running run as stuck. Capture the compile run id with
gh run list, then watch it in a background terminal or repo-watcher helper
with low-frequency status updates, e.g.
gh run watch <run-id> --exit-status. While compile runs, only do
non-mutating prep such as reading Slack/setup docs; do not dispatch
recap/slack work or claim setup success until compile is green and the wiki
commit is pulled locally. If an older compile run fails only in the final
push/commit step after compile and lint passed, and a newer compile run is
already queued for the current branch, watch the newer run before declaring
setup blocked. Run bowerbird doctor if this checkout exposes it.
-
Slack connector — follow connectors/slack/README.md: create or
configure a dedicated Slack app named Bowerbird from
connectors/slack/manifest.json with the user present, stage the Bot User
OAuth Token as SLACK_BOT_TOKEN in bin/.env without exposing it, record
the non-secret channel/DM destination in config/recaps.toml, run
bowerbird push-secrets, and verify by secret name only that
SLACK_BOT_TOKEN is present. Dispatch recap or run bowerbird slack-recap
against an existing manifest, then confirm one delivery from the
Bowerbird bot plus the logged destination, Slack channel, and timestamp.
Do not send from the user's personal Slack account, a personal user token,
an incoming webhook, Codex/ChatGPT's Slack connector, or Guild's Slack app.
-
Wrap-up — status table: what works (tests, lint, doctor, each
workflow, Slack connector), what the user chose (watched folders,
followed accounts, Slack destination), what remains optional
(COMPILE_RUNNER, DUMP_WINDOW_DAYS, cron times per docs/upgrading.md).
Remind them the wiki fills as the daily crons run.