This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
These rules override all other instructions:
- NEVER commit directly to main - Always create a feature branch and submit a pull request
- Conventional commits - Format:
type(scope): description - GitHub Issues for TODOs - Use
ghCLI to manage issues, no local TODO files. Use conventional commit format for issue titles - Pull Request titles - Use conventional commit format (same as commits)
- Branch naming - Use format:
type/scope/short-description(e.g.,feat/blog/new-post-script) - Working an issue - Always create a new branch from an updated main branch
- Check branch status before pushing - Verify the remote tracking branch still exists. If a PR was merged/deleted, create a new branch from main instead
- Write tests - All new/refactored code requires tests where applicable
- Run validation before commits - Run
npm run buildand verify no errors before committing - No co-authors - Do not add co-author information on commits or pull requests
- No "generated by" statements - Do not add generated-by statements on pull requests
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
refactor |
Code change that neither fixes a bug nor adds a feature |
test |
Adding or updating tests |
chore |
Maintenance tasks |
perf |
Performance improvement |
ci |
CI/CD changes |
gh issue list # List open issues
gh issue view <number> # View details
gh issue create --title "type(scope): description" --body "..."
gh issue close <number>npm run dev # Start dev server at localhost:4321
npm run build # Build production site to ./dist/
npm run preview # Preview production build locally
npm run new # Create a new blog post (interactive prompts)This is an Astro static site for Calvin Allen's personal blog, deployed to Cloudflare Pages.
- Blog posts are markdown files in
src/content/blog/{year}/{slug}/index.md - Each post lives in its own directory to colocate images (e.g.,
cover.png) - Schema defined in
src/content/config.tswith Zod validation:- Required:
title,date,categories(array) - Optional:
description,image,youtube
- Required:
---
title: "Post Title"
date: "2025-12-25T21:58:58-05:00"
categories: [dotnet, csharp]
description: "Optional description"
image: ./cover.png
---Dates include timezone offset in frontmatter. Display formatting uses timeZone: 'America/New_York' to ensure dates render correctly regardless of build server timezone.
src/pages/[...slug].astro- Dynamic post routessrc/pages/rss.xml.ts- RSS feed generationsrc/layouts/PostLayout.astro- Individual post layoutsrc/components/PostCard.astro- Blog listing card componentscripts/new-post.js- Interactive post creation script