Commit Graph
8 Commits
Author SHA1 Message Date
CatoandClaude fa09bc6a4f docs(agents): fold CLAUDE.md and .claude/CLAUDE.md into AGENTS.md (#1472)
Both CLAUDE.md files now only point at AGENTS.md, the fleet's one
agent-file shape (bitbaum/fleet scripts/ci/agent-rules.mjs). What was
still true moves into AGENTS.md: the principles and the entity test, the
shipping hand-offs (re-arm, post-main), the self-hosted Supabase read and
migration path, the design tiers and the one-orange rule, and the money
surface as the reference for one shape per kind. Every named path,
script, workflow key and component was checked against the tree.

Dropped as stale or copied:
- `.claude/CLAUDE.md` still listed the warm accent as `#ff5c00`; the root
  file and globals.css say it is gone (accent = Bitcoin orange).
- a machine-specific project path, the duplicated stack table and the
  `.claude/rules` restatements (those files remain).

Docs and comments that sent readers to CLAUDE.md for "Shipping" or the
principles now point at the AGENTS.md sections.


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-29 10:57:51 +01:00
CatoandClaude Opus 5.5 24c3d140ae docs: archive point-in-time records, fix live docs against the tree (#1349)
* docs: archive point-in-time records, drop broken guide symlinks

Status reports, progress trackers, audits, session summaries, completed
migration plans and the 2025 roadmap move to docs/archive/ (same relative
path), with a README saying they describe the day they were written.
.ai-guides/ held only symlinks into a docs/guides/ai/ that no longer
exists, tests/unit/docs/ held a stray copy of an old getting-started page,
and docs/operations/PORT_MANAGEMENT_README.md duplicated port-management.md;
all three are deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD

* docs: correct drifted paths, links and versions in current docs

Fix in place the reference docs agents use: point paths at where the code
lives now (src/stores/auth.ts, src/lib/supabase/*, scripts/dev/*,
docs/reference/api/CONVENTIONS.md, the squashed baseline migration),
rewrite the development, features, operations and API index pages to list
documents that exist, say plainly where something is gone (/api/metrics,
the CSP report route, .envrc in the repo, Loki's `migrate` script), and
correct the Next.js major. docs-truth findings: 468 -> 2 (both "Next 30/90
Days" headings in the legal overview, a checker false positive).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 14:09:06 +02:00
CatoandClaude Opus 5.5 b774f06de7 docs: correct drift in agent instructions, README and ops docs (#1348)
* docs: correct drift in agent instructions, README and ops docs

- Auto-merge sweep lives in bitbaum/fleet, not bitbaum/dotfiles; cd.yml is
  dispatch-only (handed off by ci.yml post-main), not a workflow_run listener
- Design-system docs match globals.css / tailwind.config.ts: warm accent
  #ff5c00, bg-bitcoinOrange (no bitcoin-orange utility), tiffany/orange are
  legacy; display typography is shipped
- .claude rules: real paths (src/lib/validation/, entityCrudHandler.ts,
  standardResponse.ts, withZod/withRateLimit/withRequestId, services/actors),
  real Button/Alert APIs, real rate limits, search via @bitbaum/searchkit,
  real payment modules, PostgREST instead of the POSTGRES_URL tunnel,
  lint-staged pre-commit, eslint.config.mjs
- README/AGENTS/REVIEW: Next 16 / TS 6 / Tailwind 4, pnpm, messaging is not
  E2E-encrypted yet, beta not Live, CD deploys, migrations apply on deploy
- docs/: deploy process, CI/CD, migrations guide, moved docs/ paths, stale
  CLI-entity and edge-function docs flagged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD

* style(docs): prettier on the docs touched by the drift fix

lint-staged would have run this; the commit was made without hooks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 12:07:09 +02:00
CatoandClaude 04a8b7ea1c feat(auth): connected apps page; sign out everywhere reaches every product (#1182)
One account for every door, steps D3 and D4 of ADR-0009.

D3 — Connected apps (Settings → Integrations): every app that signed in
with the person's OrangeCat account (Solon, Loki, Heidi, any self-registered
AI app), with what it may do, when it connected, when it was last used and
how many live sessions it holds — and a Disconnect button that forgets the
consent and revokes the app's refresh tokens. Until now a self-registered
app could keep a thirty-day session the person had no screen to find.

- src/services/auth/connectedApps.ts: list / revoke / revoke-all. Every
  query on the service-role-only oauth_* tables names the user; the unit
  tests pin that.
- GET /api/connected-apps, DELETE /api/connected-apps/[clientId]: session
  auth only, so an app can never enumerate or revoke the others.

D4 — Sign out everywhere now revokes the OAuth refresh tokens connected apps
hold before it revokes OrangeCat's own sessions; before, it signed the
person out of OrangeCat and left them signed in to everything that signs in
through it. Account deletion revokes and forgets them too (the oauth_* rows
do not cascade from auth.users). The OIDC key-rotation runbook writes down
the order of operations that keeps the JWKS overlap so a rotation signs
nobody out.

Docs: ADR-0009 (the identity design of record: one account held by
OrangeCat, every product and outside site a client of it, passwords
optional, recovery with more than one path, what a person allowed they can
see and take back — with the build order D1–D9 and every edge case's
landing place).

Verified: pnpm run verify green (3970 tests). Production E2E: emailed-code
sign-in on orangecat.ch from Solon's sign-in page completes the round trip
in five seconds with no consent screen for the trusted client; the
Connected apps list itself needs the service-role key, so it is checked on
production after deploy.


Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-29 01:20:31 -07:00
CatoandClaude Fable 5.1 9a352d3646 refactor: rename FleetCrown to Loki across the integration (#1016)
The sibling product was renamed on 2026-09-14. Every reference follows:
service and route paths (src/services/loki, /api/integrations/loki),
env keys (LOKI_*), the build-intent audience and timeline source ('loki'),
ecosystem config, docs, tests, and 13 file names.

Tool labels keep "Loki" capitalised: the old name had an internal capital
and passed the "looks like a name" shape test for free; a one-word name
needs listing, so softLower now carries a small PROPER_NOUNS set.

Box and data were moved ahead of this: LOKI_* keys sit beside the old ones
in the app env, the OAuth client is `loki` with the new callback host, and
timeline/metadata rows carrying the old name were rewritten.


Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 16:40:27 -07:00
c022bfdf46 docs: sync docs with actual stack (#890)
Truth-sweep of the living docs against repo ground truth (pnpm 11.25.0,
Node 24, Vitest, zod 4, TS 6, Next 16/React 19, self-hosted Supabase with
file-based migrations applied on deploy):

- npm/npx commands -> pnpm / pnpm exec / pnpm dlx; `run X -- --flag`
  loses the `--`; package-lock.json -> pnpm-lock.yaml
- jest -> Vitest (config names, vi.fn/vi.spyOn, reporter examples,
  debug commands, framework mentions)
- retired mcp_supabase_* examples -> current mechanisms: PostgREST
  reads, migrations as supabase/migrations/*.sql applied on deploy,
  box psql for DDL
- version claims: TypeScript 5.x -> 6.x, Node 20 -> 24, Next.js 15 ->
  16, React 18 -> 19; CI described as Node 24 + pnpm
- nonexistent scripts replaced with real ones (test:comprehensive:* ->
  test:*, diag:supabase -> scripts/diagnostics/*, db:migrate/test:
  migration -> deploy-applied migrations / migration-replay.yml)
- infrastructure.md deploy claim fixed: cd.yml deploys main after green
  CI (doc said pushes to main do NOT deploy)
- zod 4 API: z.record now takes key+value schemas


Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn

Co-authored-by: Georgy Butaev <41178744+g-but@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-04 17:02:55 +00:00
Georgy ButaevandClaude Opus 4.8 a52836c793 chore: remove all Vercel — everything runs on Hetzner
Production is fully self-hosted on the Hetzner box (bitbaum, behind Caddy)
with self-hosted Supabase. This scrubs the remaining Vercel footprint:

Code (src/ now has zero Vercel references):
- security page: "Hosted on Vercel" → self-hosted infrastructure
- FleetCrown URL fleetcrown.vercel.app → fleetcrown.orangecat.ch (entity
  registry + external-publish allowlist; the dead vercel.app subdomain was
  also a re-registration risk in an allowlist)
- webhook-secret error + cron/env comments point at the box, not Vercel
- corrected stale "Vercel kills the function on response" comments (false
  on a persistent server) to accurate await-before-respond reasoning

Security/config:
- supabase/config.toml: dropped dead *.vercel.app auth redirect URLs
- @vercel/mcp-adapter dependency removed (unused)

Artifacts removed:
- scripts/auth/vercel-login.js, scripts/preview-url.sh,
  scripts/dev/merge-env.js, scripts/monitoring/deployment-monitor.js,
  scripts/db/setup-env.js, mcp-servers/vercel-openapi.json, .vercel/
- setup_vercel_secrets MCP tool in mcp-servers/github-server.js
- .gitignore Vercel section; env scripts stripped of vercel-login/token

Docs + .claude rules/commands rewritten to the self-host deploy flow
(scripts/deploy-selfhost.sh / .github/workflows/cd.yml; env at
/opt/orangecat/app/.env). Historical/archive records left intact.

Verified: tsc 0 errors, SELF_HOST=1 build green, cron unit tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 08:50:43 +02:00
Georgy ButaevandClaude Opus 4.8 ae55dc1f80 docs: consolidate taxonomy from ~40 dirs into ~13 coherent areas
The docs tree had sprawled into ~40 overlapping/singleton/empty directories.
Consolidated (history preserved via git rename detection; links rewritten so
no previously-working link broke):

- architecture/ ← adr/, database/, + loose *_ARCHITECTURE / my-cat specs
- development/  ← standards, contributing, guides, examples, templates, components, ai
- operations/   ← devops (+runbooks), deployment, supabase
- design-system/← design, UX, ux-improvements, branding
- reference/    ← api, changelog, content, misc
- forward-looking/ ← planning, improvements, implementation
- archive/2026-h1/ ← point-in-time reports/plans that were loose at docs/ root
- removed empty docs/analysis/; rewrote docs/README.md as a current index

Verified: non-README relative-link health 81→83 OK (0 regressions, same 64
pre-existing-rot broken); all new README links resolve; external refs in
.claude/ + root repointed to moved targets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 11:34:28 +02:00