benjaminpalko/AGENTS.md
Benjamin Palko 00006a013d
Some checks failed
PR Gate / Checks (pull_request) Failing after 17s
set up new workflow and migrate to .forgejo dir
2026-08-11 15:57:25 -04:00

2.5 KiB

AGENTS.md

Project context for AI coding agents working in this repository.

Project

Personal website and blog for Benjamin Palko, deployed on Netlify.

  • Framework: SvelteKit 5 / Svelte 5
  • Language: TypeScript (strict)
  • Styling: Tailwind CSS 4 + daisyUI
  • Markdown/blogging: mdsvex with a custom highlight hook that renders fenced code via Components.pre code={...}
  • Logging: pino (server side)
  • Icons: @lucide/svelte

Toolchain

  • pnpm is the canonical local package manager.
  • The GitHub Actions PR gate (.github/workflows/pr.yml) runs pnpm. Keep both working; document pnpm commands.
  • Deploys to Netlify run via Forgejo Actions (.forgejo/workflows/deploy.yml) on push to main. It needs NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID as Forgejo repo secrets.

Scripts (pnpm)

Command What it does
pnpm dev Start dev server
pnpm build Production build
pnpm preview Preview the production build
pnpm check svelte-kit sync + svelte-check (typecheck)
pnpm lint Prettier check + ESLint
pnpm format Prettier write
pnpm test:unit Vitest (watch mode)
pnpm test Vitest (single run)

Before finishing any work, run:

pnpm lint && pnpm check && pnpm test && pnpm build

This mirrors the existing PR gate.

Code style

  • Prettier + ESLint (flat config) with Svelte and Tailwind plugins. pnpm format will fix formatting.
  • Svelte 5 runes ($state, $props, etc.).
  • Path alias $lib maps to src/lib.

Blog / posts

  • Posts live at src/lib/posts/*.md and are written in mdsvex markdown.
  • Follow src/lib/posts/template.md.sample for the frontmatter shape: title, description, image (url/alt), date, categories, published.
  • categories must be one of 'development' | 'work' | 'life' (see src/lib/posts/index.ts).
  • The slug is the filename (dynamic import in src/routes/blog/[slug]/+page.ts).
  • Only posts with published: true appear on the site.
  • Fenced code blocks use the mdsvex highlighter via Components.pre — mind the configured highlight hook in svelte.config.js.

Theming / assets

  • Static assets live in static/.
  • App-wide styles are in src/app.css.