From 27d0426d8d9966e27498a3da026c72133cf1a1ba Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 29 Jun 2026 19:47:20 +0000 Subject: [PATCH 1/4] Rearchitect team page, add scaffolding, and fix site housekeeping Team page: move people to per-person JSON files in src/data/people/ so the About page auto-splits Current Team vs Alumni and students can add themselves with a single new file (no merge conflicts). Jiho is current; the rest are alumni. People without photos fall back to generated initials avatars. Scaffolding: add CONTRIBUTING.md, CLAUDE.md, and a GitHub Actions CI workflow that builds on every PR. Housekeeping: add favicon.svg (was a 404), derive canonical URL per page (every page previously claimed to be the homepage), hydrate header/footer with client:load so nav renders in static HTML, dynamic copyright year, Vision link in footer, 404 meta description, robots.txt + @astrojs/sitemap, contact now links to kenarnold.org, and remove the duplicate header/footer on the AI for Writers project page. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Xuat3bQWtEEeWMwoBwNfBL --- .github/workflows/ci.yml | 17 +++ CLAUDE.md | 37 ++++++ CONTRIBUTING.md | 47 +++++++ README-astro.md | 2 +- astro.config.mjs | 5 +- package.json | 1 + public/favicon.svg | 4 + public/robots.txt | 4 + src/components/lab/LabFooter.tsx | 10 +- src/data/people/README.md | 34 +++++ src/data/people/_example.json | 8 ++ src/data/people/alina_sainju.json | 6 + src/data/people/daniel_kim.json | 6 + src/data/people/daniel_kwon.json | 6 + src/data/people/hannah_yoo.json | 6 + src/data/people/jason_chew.json | 6 + src/data/people/jiho_kim.json | 7 + src/data/people/kyle_houston.json | 5 + src/data/people/monica_zhang.json | 5 + src/data/people/ray_flanagan.json | 6 + src/layouts/Layout.astro | 11 +- src/pages/404.astro | 2 +- src/pages/about.astro | 123 +++++++++--------- .../projects/ai-writers-2024-25/index.astro | 6 - 24 files changed, 289 insertions(+), 75 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 CLAUDE.md create mode 100644 CONTRIBUTING.md create mode 100644 public/favicon.svg create mode 100644 public/robots.txt create mode 100644 src/data/people/README.md create mode 100644 src/data/people/_example.json create mode 100644 src/data/people/alina_sainju.json create mode 100644 src/data/people/daniel_kim.json create mode 100644 src/data/people/daniel_kwon.json create mode 100644 src/data/people/hannah_yoo.json create mode 100644 src/data/people/jason_chew.json create mode 100644 src/data/people/jiho_kim.json create mode 100644 src/data/people/kyle_houston.json create mode 100644 src/data/people/monica_zhang.json create mode 100644 src/data/people/ray_flanagan.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6cd676d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,17 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm install + - run: npm run build diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..f10c0ce --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,37 @@ +# CLAUDE.md + +Guidance for AI coding agents working in this repo. For human onboarding see +[`CONTRIBUTING.md`](CONTRIBUTING.md), which this file does not repeat. + +## What this repo is + +The **public website** for the Thoughtful AI Tools Lab (https://thoughtful-ai.com), +built with Astro 5 + React + Tailwind, deployed on Cloudflare. The lab's actual +research application is a *different* repo (`AIToolsLab/writing-tools`) — do not +look for app/model code here. + +## Build & verify + +- `npm install`, then `npm run build` must pass. CI (`.github/workflows/ci.yml`) + runs the build on every PR. Always run `npm run build` before claiming a change + works — there is no test suite, so a clean build is the bar. + +## Agent-specific notes + +- **Content is data-driven; prefer editing data over markup.** People are + per-person JSON files in `src/data/people/`; publications are an array in + `src/pages/publications.astro`. When adding similar content, follow the + existing data pattern instead of hand-writing new markup blocks. +- The page shell, SEO tags, and canonical URL live in `src/layouts/Layout.astro`. + The canonical URL is derived from the request path — don't hardcode it. +- Header/footer are React islands hydrated with `client:load` so they appear in + static HTML. Don't switch them back to `client:only`. +- Match surrounding Tailwind utility classes; avoid introducing bespoke CSS. + +## Why this file is separate from CONTRIBUTING.md / README + +`README` orients a visitor ("what is this"), `CONTRIBUTING.md` onboards a human +contributor ("how to set up and where things live"), and `CLAUDE.md` is read +automatically by coding agents as standing instructions — so it focuses on the +constraints and verification steps an agent needs to not break things, and stays +short to keep the agent's context lean. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..4878dd8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,47 @@ +# Contributing + +This repository is the **public website** for the Thoughtful AI Tools Lab +(https://thoughtful-ai.com). The research application itself lives in a separate +repo: [`AIToolsLab/writing-tools`](https://github.com/AIToolsLab/writing-tools). +Changes here are about how the lab presents its people, projects, vision, and +publications — not the writing tool's behavior. + +## Getting set up + +- Requires Node.js 18+ and npm. +- `npm install` — install dependencies. +- `npm run dev` — local dev server at http://localhost:4321. +- `npm run build` — production build into `dist/`. **CI runs this on every PR; if + it fails, the PR can't merge, so run it locally before pushing.** + +## Where things live + +| You want to change... | Edit... | +|-----------------------|---------| +| A team member (add yourself, mark graduated) | a JSON file in `src/data/people/` — see that folder's `README.md` | +| Publications | the `publications` array in `src/pages/publications.astro` | +| Projects | `src/pages/projects.astro` and the per-project pages in `src/pages/projects/` | +| The lab's vision statement | `src/pages/vision.md` | +| Site-wide header/footer/nav | `src/components/lab/` | +| Page shell, ``, SEO tags | `src/layouts/Layout.astro` | + +## Adding yourself to the team + +See [`src/data/people/README.md`](src/data/people/README.md). Short version: add +your photo to `public/people/`, copy `_example.json` to `your_name.json`, fill it +in, and open a PR. One file per person means no merge conflicts when several +people add themselves at once. + +## Conventions + +- Styling is [Tailwind CSS](https://tailwindcss.com/) utility classes. Match the + classes already used on nearby elements rather than introducing new CSS. +- Pages are [Astro](https://docs.astro.build/) (`.astro`); interactive UI is React + (`.tsx`) under `src/components/`. +- Keep content data-driven where a pattern exists (e.g. the people JSON files) so + future contributors edit data, not markup. + +## Deployment + +The site is deployed on **Cloudflare** (see `wrangler.jsonc`), serving the built +`dist/` directory. You don't need to deploy manually — merging to `main` is enough. diff --git a/README-astro.md b/README-astro.md index 7959c63..505de2b 100644 --- a/README-astro.md +++ b/README-astro.md @@ -67,5 +67,5 @@ Astro-based version of the Thoughtful AI Tools Lab website. ## Deployment -Deploy to GitHub Pages or any static host. Output: `dist/`. +Deployed on Cloudflare (see `wrangler.jsonc`), serving the built `dist/` directory. diff --git a/astro.config.mjs b/astro.config.mjs index 9891045..41ca651 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,12 +4,11 @@ import react from "@astrojs/react"; // https://astro.build/config import tailwind from "@astrojs/tailwind"; - -const isProd = process.env.NODE_ENV === "production"; +import sitemap from "@astrojs/sitemap"; // https://astro.build/config export default defineConfig({ - integrations: [react(), tailwind()], + integrations: [react(), tailwind(), sitemap()], site: "https://thoughtful-ai.com", base: "/", }); diff --git a/package.json b/package.json index 2673b3a..3f94aed 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "license": "MIT", "dependencies": { "@astrojs/react": "^4.2.2", + "@astrojs/sitemap": "^3.7.3", "@astrojs/tailwind": "^6.0.2", "@heroicons/react": "^2.0.16", "@tailwindcss/typography": "^0.5.16", diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..1ab5ae5 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,4 @@ + + + T + diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..232ac5b --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://thoughtful-ai.com/sitemap-index.xml diff --git a/src/components/lab/LabFooter.tsx b/src/components/lab/LabFooter.tsx index c5fa554..dfe385e 100644 --- a/src/components/lab/LabFooter.tsx +++ b/src/components/lab/LabFooter.tsx @@ -2,7 +2,7 @@ export default function LabFooter() { return (