Skip to content

Commit cb3b9e8

Browse files
OriNachumclaude
andauthored
feat(site): tools.culture.dev Astro site — cream/katvan-green catalog (M2) (#3)
* feat(site): tools.culture.dev Astro site — Anthropic-cream catalog (M2) Land the public index front-end under site-astro/. Astro 6, output: 'static' with no adapter, so `astro build` emits a pure-static dist/ that Cloudflare Pages serves directly (M3). The site renders from one generated file, src/data/catalog.json, produced by the M1 generator (`culture-tools index build`). Pages: - Landing: hero + `uv tool install` one-liner + a grid of certified tools (version / backend / verb-count chips, copy-install, conformance badge), plus a "Candidates not yet conformant" roadmap section listing excluded tools with the rubric bundles each still fails — honest about what the gate dropped. - Per-tool detail (/tools/<name>/): install block, repo/PyPI links, backend and model facts, and the tool's command surface table. - 404, sitemap, robots, favicon. Theme: Anthropic-cream, light by default (warm #FFFAF5, clay accent #D97706) with a dark mirror and a no-flash toggle — palette aligned with the sibling agentic-human / humanic-ai sites. Catalog-first card grid. (Diverges from katvan's dark-terminal start, per the style call; katvan supplied the static-Astro structure, not the skin.) scripts/sync-catalog.sh (`npm run catalog`) runs `index build` and distributes its two artifacts: catalog.json -> src/data/ (imported, typed via catalog.ts) and the PEP 503 simple/ tree -> public/simple/ (served verbatim). Both are committed so the site builds without the Python toolchain; CI (M3) regenerates them against live conformance. Verified: `npm run check` (astro type-check) 0 errors, `npm run build` green (5 pages + sitemap, /simple/ ships), light + dark render correctly. Repo gates unaffected: 44 pytest, markdownlint, rubric doctor all green. Docs: design doc M2 marked done + style decision recorded; CLAUDE.md site section fleshed out from placeholder; markdownlint ignores hardened for the nested site-astro/node_modules + dist. Version 0.4.0 -> 0.5.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LdsNvR24i1fGosuQ9AgtVG * feat(site): dark mode wears katvan's terminal green In dark mode the accent swaps from the light-mode clay (#D97706) to katvan's terminal green (--accent #41d67a, hover #7cff9e) so the site joins the AgentCulture cream family in light and katvan's terminal aesthetic in dark. Only the --accent trio differs between modes; cream/clay light is untouched. Added an --on-accent token so ::selection (and any accent-fill) keeps readable contrast — dark text on the bright green, white on clay. Synced the CHANGELOG (0.5.0), design doc, and CLAUDE.md theme notes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LdsNvR24i1fGosuQ9AgtVG * fix(site): address Qodo review on PR #3 (3 findings + a drift guard) All three findings valid; a colleague review (Qwen) concurred and helped shape the durable fix for #1. Fixes: 1. Stale catalog.json versions (correctness) — the committed catalog said culture-tools 0.4.0 while pyproject is 0.5.0. Root cause is structural: a committed *generated* artifact drifts on every version bump. Regenerated (`npm run catalog` → 0.5.0) AND added tests/test_site_catalog.py, a guard that fails when the committed catalog's generated_with / culture-tools entry lags pyproject. It reads committed files only (no uv/agentfront needed in CI). CLAUDE.md's version-bump convention now says to regenerate after a bump. 2. Catalog type-safety bypass (maintainability) — catalog.ts replaced `catalogJson as unknown as Catalog` (which silenced all structural checking) with a typed import `const catalog: Catalog = catalogJson`. astro check / tsc now validates the catalog shape at build; no runtime validator shipped, so the zero-runtime-dep ethos holds. 3. Clipboard copy lacks fallback (reliability) — the copy handlers now feature-detect navigator.clipboard, handle rejection, and fall back to a hidden-textarea execCommand('copy') for insecure contexts (e.g. the http://localhost preview) so they never throw an unhandled rejection. Verified: astro check 0 errors, build green; 45 pytest (incl. the new guard); black/isort/flake8/markdownlint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LdsNvR24i1fGosuQ9AgtVG --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5ebb37f commit cb3b9e8

31 files changed

Lines changed: 7478 additions & 11 deletions

.markdownlint-cli2.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ config:
1515
siblings_only: true
1616

1717
ignores:
18-
- "node_modules/**"
18+
# Matches both the repo-root node_modules and site-astro/node_modules.
19+
- "**/node_modules/**"
20+
# Astro build output (site-astro/dist) — generated, not authored.
21+
- "**/dist/**"
1922
- ".local/**"
2023
- ".afi/**"
2124
- ".teken/**"

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
55
Format follows [Keep a Changelog](https://keepachangelog.com/). This project
66
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.5.0] - 2026-06-22
9+
10+
### Added
11+
12+
- `site-astro/` — the **tools.culture.dev** front-end (M2). An Astro 6 static
13+
site (`output: 'static'`, no adapter → pure-static `dist/` for Cloudflare
14+
Pages) that renders from `culture-tools index build`'s `catalog.json`. Pages:
15+
a catalog landing (hero + `uv tool install` one-liner + a grid of certified
16+
tools + a roadmap section listing pending candidates with the rubric bundles
17+
each still fails) and per-tool detail pages (install, repo/PyPI links, command
18+
surface). Conformance badges throughout; light/dark theme toggle.
19+
- Theme is **Anthropic-cream** in light (default — warm `#FFFAF5`, clay accent
20+
`#D97706`), aligned with the sibling `agentic-human` / `humanic-ai` sites;
21+
**dark mode wears `../katvan`'s terminal green** (`#41d67a`, hover `#7cff9e`)
22+
so the two AgentCulture aesthetics meet in one site. Catalog-first card-grid
23+
layout; no-flash light/dark toggle.
24+
- `site-astro/scripts/sync-catalog.sh` (`npm run catalog`) runs
25+
`culture-tools index build` and distributes its two artifacts into the Astro
26+
tree: `catalog.json``src/data/` (imported, typed via `catalog.ts`) and the
27+
static PEP 503 `simple/` tree → `public/simple/` (served verbatim).
28+
`catalog.json` + `public/simple/` are committed so the site builds without the
29+
Python toolchain.
30+
- Design doc + `CLAUDE.md` site section updated to reflect the landed M2 site
31+
(was a placeholder pointer).
32+
833
## [0.4.0] - 2026-06-22
934

1035
### Added

CLAUDE.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ redundant otherwise — don't "simplify" them away:
133133
`pyproject.toml` version equals `main`'s — even docs/CI-only changes. Use the
134134
`version-bump` skill (or `/version-bump patch|minor|major`); it updates
135135
`pyproject.toml` and prepends a Keep-a-Changelog entry to `CHANGELOG.md`.
136+
**After bumping, regenerate the committed site catalog** — `cd site-astro &&
137+
npm run catalog` — so `catalog.json`'s `generated_with` and the `culture-tools`
138+
entry track the new version. `tests/test_site_catalog.py` fails the build if the
139+
committed catalog drifts from `pyproject` (it reads committed files only, so it
140+
needs neither `uv` nor `agentfront`).
136141
- **SonarCloud coverage needs repo-relative paths.** `[tool.coverage.run]
137142
relative_files = true` is set so `coverage.xml` filenames map onto
138143
`sonar.sources=culture_tools`; without it Sonar silently reports 0% coverage.
@@ -171,8 +176,35 @@ re-vendor only the skills you need (`docs/skill-sources.md`).
171176

172177
## Site build (tools.culture.dev)
173178

174-
The public index site is being built **`../katvan`-style with `../auntiepypi`
175-
infra, with `../cultureflare` (Cloudflare) help**. Those sibling repos in the
176-
workspace are the templates/infra references; consult them before adding site
177-
scaffolding here. (This section is a placeholder pointer — flesh it out as the
178-
site lands.)
179+
The public index site lives under **`site-astro/`** — an Astro 6 static site
180+
(`output: 'static'`, no adapter, so `astro build` emits a pure-static `dist/`
181+
for Cloudflare Pages). Architecture of record: `docs/design/tools-culture-dev.md`.
182+
183+
**The site renders from one generated file**, `site-astro/src/data/catalog.json`,
184+
produced by the M1 generator in this package (`culture-tools index build`). The
185+
data flow is one-way:
186+
187+
```text
188+
culture-tools index build → catalog.json → src/data/ (imported, typed via catalog.ts)
189+
→ simple/ → public/simple/ (static PEP 503, served verbatim)
190+
```
191+
192+
`site-astro/scripts/sync-catalog.sh` (`npm run catalog`) runs the generator and
193+
distributes both artifacts. `catalog.json` + `public/simple/` are **committed**
194+
so the site builds without the Python toolchain; regenerate them against live
195+
conformance with `npm run catalog` before a deploy. Don't hand-edit
196+
`catalog.json` — every entry passed `agentfront cli doctor <repo> --strict`.
197+
198+
Site commands (run inside `site-astro/`): `npm install`, `npm run dev`
199+
(localhost:4321), `npm run build`, `npm run check` (astro type-check),
200+
`npm run catalog` (refresh the data).
201+
202+
**Theme:** Anthropic-cream, light by default (warm `#FFFAF5`, clay accent
203+
`#D97706`, palette aligned with the sibling `../agentic-human` / `../humanic-ai`
204+
sites); **dark mode wears `../katvan`'s terminal green** (`#41d67a`). The accent
205+
is the only token that differs between modes — both swap a single `--accent`
206+
trio. The katvan / auntiepypi / cultureflare
207+
siblings supplied the static-Astro structure, the PEP 503 emitter, and the
208+
Cloudflare deploy path respectively; consult them before extending site infra.
209+
M3 (Cloudflare deploy lane) and M4 (llms.txt, markdown twins, S3 durable tier)
210+
are still ahead — see the design doc's milestones.

docs/design/tools-culture-dev.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ and not a mirror of PyPI.
2727
| Repo location | **In this `culture-tools` repo** — Astro site under `site-astro/`, catalog generator in the `culture_tools` package. | One repo; `culture-tools` *is* the index's backend (per its own description). |
2828
| Catalog source | **AgentFront metadata** — generated by running each tool's `learn` / `overview` / `doctor` `--json` verbs, plus `culture.yaml` + `pyproject.toml`. | Self-describing and self-validating; the index dogfoods the very contract it certifies. New conformant tools surface from their own output. |
2929
| Conformance gate | **Delegate to `agentfront cli doctor <repo> --strict --json`** (`healthy == true`). | `agentfront` (formerly `teken`/`afi-cli`) is the canonical rubric authority; we don't reinvent the verdict. |
30-
| Front-end style | **`../katvan` dark-terminal Astro** as the starting point — free to diverge. | Proven CF-Pages-static stack and house aesthetic; not a constraint. |
30+
| Front-end style | **Astro static, Anthropic-cream (light) + katvan-green (dark)** — catalog-first card grid. Took `../katvan`'s Astro/CF-Pages *structure*; light mode wears the warm-cream palette of the sibling `agentic-human` / `humanic-ai` sites, dark mode wears katvan's terminal green (`#41d67a`). | Registry scannability + AgentCulture house look; the two family aesthetics meet in one site. |
3131
| Hosting (v1) | **Cloudflare only** (CF Pages, static), domain bound via `../cultureflare`. | Simplest near-zero-cost static host; DNS for `culture.dev` already lives at Cloudflare. |
3232
| Hosting (later) | AWS **S3 as the durable DATA / backup / deep-cache tier** behind the CF edge; recent/hot load served from Cloudflare. | Deferred; the artifacts are plain files, so adding an S3 origin/backup later is additive, not a rewrite. |
3333

@@ -98,8 +98,14 @@ Each milestone is one PR (this repo bumps the version every PR; the
9898
(delegates to `agentfront cli doctor`), tool introspection → catalog entries,
9999
the static PEP 503 `/simple/` emitter, a starter manifest, `catalog.json`
100100
output, tests, explain entry. *Hosting-independent; the durable core.*
101-
- **M2 — Astro site.** `site-astro/` (dark-terminal start) consuming
102-
`catalog.json`: landing, per-tool pages, ecosystem grid, conformance badges.
101+
- **M2 — Astro site. ✅ Done.** `site-astro/` (Astro 6, `output: 'static'`, no
102+
adapter) consuming `catalog.json`: a cream catalog landing (hero + install
103+
one-liner + certified-tool grid + a roadmap section listing pending candidates
104+
with the bundles they still fail), per-tool detail pages (install, repo/PyPI
105+
links, command surface), conformance badges, and a light/dark toggle.
106+
`scripts/sync-catalog.sh` runs `culture-tools index build` and distributes its
107+
output → `src/data/catalog.json` (imported, typed) + `public/simple/` (served
108+
verbatim). Theme is Anthropic-cream, light by default.
103109
- **M3 — Cloudflare deploy lane.** CF Pages build of `site-astro/` (with the
104110
`index build` step wired in), `_worker.js`/`_redirects` as needed, domain bind
105111
via `cultureflare`. CI to regenerate the catalog.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "culture-tools"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
description = "tools.culture.dev — the package index for agent-first CLI tools that conform to the agentfront contract."
55
readme = "README.md"
66
license = "Apache-2.0"

site-astro/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Astro build output + tooling
2+
dist/
3+
.astro/
4+
node_modules/
5+
6+
# npm
7+
npm-debug.log*

site-astro/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# site-astro — tools.culture.dev
2+
3+
The public index site for **tools.culture.dev**: a catalog of agent-first CLI
4+
tools, each certified against the AgentFront contract. Astro, fully static
5+
(`output: 'static'`, no adapter), so `astro build` emits a `dist/` that
6+
Cloudflare Pages serves directly (M3).
7+
8+
## Data flow
9+
10+
The site renders from a single generated file, `src/data/catalog.json`, produced
11+
by the M1 generator in the parent package:
12+
13+
```text
14+
culture-tools index build ──► catalog.json ──► src/data/ (imported, typed)
15+
└─► simple/ ──► public/simple/ (static PEP 503)
16+
```
17+
18+
`scripts/sync-catalog.sh` runs the generator and distributes both artifacts.
19+
Every tool in `catalog.json` passed `agentfront cli doctor <repo> --strict`;
20+
the `excluded` roster records the candidates that did not.
21+
22+
## Develop
23+
24+
```bash
25+
npm install
26+
npm run catalog # regenerate src/data/catalog.json + public/simple/ (needs uv + agentfront)
27+
npm run dev # http://localhost:4321
28+
npm run build # -> dist/
29+
npm run preview
30+
```
31+
32+
`catalog.json` is committed so the site builds without the Python toolchain;
33+
`npm run catalog` refreshes it against live conformance.
34+
35+
## Layout
36+
37+
- `src/data/catalog.ts` — typed view over `catalog.json`.
38+
- `src/layouts/Base.astro` — HTML shell, fonts, theme toggle (light cream default).
39+
- `src/components/``ToolCard`, `ConformanceBadge`, header, footer.
40+
- `src/pages/index.astro` — hero + certified-tool grid + roadmap of pending candidates.
41+
- `src/pages/tools/[name].astro` — per-tool detail (install, links, command surface).
42+
43+
## Theme
44+
45+
Anthropic-cream, light by default (warm `#FFFAF5`, clay accent `#D97706`), with a
46+
dark mirror. Palette matches the sibling `agentic-human` / `humanic-ai` sites.

site-astro/astro.config.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import sitemap from '@astrojs/sitemap';
4+
5+
// tools.culture.dev — the package index for agent-first CLI tools.
6+
//
7+
// output: 'static' with NO adapter => `astro build` emits a fully static dist/
8+
// (HTML + assets, zero server runtime). That is exactly what Cloudflare Pages
9+
// serves (M3). The static PEP 503 `/simple/` tree lives under public/ and ships
10+
// verbatim alongside the rendered catalog.
11+
export default defineConfig({
12+
site: 'https://tools.culture.dev',
13+
output: 'static',
14+
integrations: [sitemap()],
15+
});

0 commit comments

Comments
 (0)