Skip to content

Commit 4136505

Browse files
committed
chore: add CLAUDE.md, remove internal planning docs, gitignore AI config
- Add CLAUDE.md orienting contributors; flags the repo as public and sets a high bar for code that must pass open-source review. - Remove docs/plans/* internal design/planning notes (not appropriate for a public repo) and drop their references from code comments. - gitignore .claude/ and other local AI assistant config.
1 parent 92d0d1d commit 4136505

9 files changed

Lines changed: 68 additions & 1947 deletions

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,8 @@ ssmSetup.zsh
7676
# Local-only deploy notes (never commit)
7777
local.md
7878
logs/
79+
80+
# AI assistant local config / worktrees / scratch (never commit)
81+
.claude/
82+
.cursor/
83+
.aider*

CLAUDE.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Codú — contributor & assistant guide
2+
3+
Codú is the community platform for AI builders and indie hackers: a curated feed
4+
of articles, tips, questions, and links, with profiles, discussions, moderation,
5+
and a build-board. This file orients anyone (human or AI assistant) working in the
6+
repo.
7+
8+
## ⚠️ This is a public, open-source repository
9+
10+
Everything committed here is public and permanent in git history. Before you write
11+
or commit anything:
12+
13+
- **No private or internal content.** No secrets, API keys, access tokens,
14+
customer data, internal planning docs, design docs, scratch notes, or
15+
personal/operational details. Local-only notes belong in gitignored files
16+
(`local.md`, `.claude/`).
17+
- **No assistant attribution or scratch artifacts.** Do not add AI co-author
18+
trailers, "generated by" notes, planning/design markdown, or tool config to
19+
commits, commit messages, or PR descriptions.
20+
- **Code must clear public code review.** Assume every line will be read by
21+
external contributors and maintainers. Hold a high bar: clear naming, no dead
22+
code, no debug logging, tests for new logic, and changes scoped to one concern.
23+
24+
## Stack
25+
26+
- **Next.js (App Router)** + React + TypeScript.
27+
- **tRPC** for the API (`server/api/router/*`), **Drizzle ORM** over **Postgres**
28+
(`server/db/schema.ts`, migrations in `drizzle/`).
29+
- **NextAuth** for auth; **Tailwind CSS** for styling (design tokens in
30+
`styles/globals.css`).
31+
- **AWS**: S3 (uploads), Bedrock (content moderation/analysis), CDK-managed cron
32+
Lambdas + EventBridge (`cdk/`). Deployed on **Vercel** (the `develop` branch is
33+
production; `db:migrate` runs on the production build).
34+
- **Testing**: Vitest unit tests (`*.test.ts`), Playwright e2e (`e2e/`).
35+
36+
## Layout (route groups = layout boundaries)
37+
38+
`app/` is split into route groups, each its own layout "world":
39+
40+
- `(app)` — the public 3-column rail shell (`AppShell`): feed (home), profiles,
41+
posts, discussions. The feed is the homepage.
42+
- `(admin)` — private, full-width admin cockpit (`AdminShell`); ADMIN-role gate in
43+
its `layout.tsx`. Not part of the public shell.
44+
- `(auth)`, `(editor)`, `(marketing)` — their own chrome.
45+
46+
A page that should not use the public rail shell does **not** live in `(app)` — it
47+
gets a sibling route group. Don't reach for runtime flags to opt out of a layout.
48+
49+
## Working in this repo
50+
51+
- **Before claiming done, run and pass locally:** `npm run lint`,
52+
`npm run prettier`, `npm run test:unit`, and `npm run build`. Migrations:
53+
`npm run db:generate` after schema changes (review the generated SQL).
54+
- **Schema changes** are additive where possible; migrations apply on the prod
55+
deploy, so never write a migration that can fail destructively.
56+
- **Match the surrounding code**: comment density, naming, and idioms. New tRPC
57+
procedures go in the relevant `server/api/router/*` file; keep DB access there.
58+
- **Keep PRs focused** — one concern per PR, with a clear description of what and
59+
why.

app/api/cron/daily-review/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import sendEmail from "@/utils/sendEmail";
3636
// use admin-session auth); unset secret refuses to run (500), wrong/missing
3737
// token 401. Wired via AWS Lambda + EventBridge (cdk/lib/cron-stack.ts).
3838
//
39-
// Four incremental passes (see docs/plans/2026-06-14-admin-shell-and-ai-content-design.md):
39+
// Four incremental passes:
4040
// 1. topic + sentiment tagging (posts)
4141
// 2. quality / spam scoring (posts) — passes 1+2 share one Bedrock call
4242
// 3. re-screen moderation (posts + comments) -> reports queue (source=system)

components/Admin/AdminShell.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ interface NavItem {
2626
soon?: boolean;
2727
}
2828

29-
// Sidebar sections. `soon` items are Phase 2/3 surfaces (see
30-
// docs/plans/2026-06-14-admin-shell-and-ai-content-design.md) — shown as the
29+
// Sidebar sections. `soon` items are planned surfaces — shown as the
3130
// roadmap but not linked until their routes exist.
3231
const NAV: NavItem[] = [
3332
{ name: "Overview", href: "/admin", icon: Squares2X2Icon },

docs/plans/2026-06-09-moderation-overhaul-design.md

Lines changed: 0 additions & 155 deletions
This file was deleted.

0 commit comments

Comments
 (0)