Comprehensive documentation for developing and maintaining the Better Conversations Foundation website.
New to the project? Start here:
- Read Development Guide for technical setup
- Review Design System for UI patterns
- Check Content Guidelines before writing
- Design System — Visual philosophy, brand identity, heading/button conventions, typography
- Design Components — Buttons, cards, forms, spacing, responsive patterns, animation
When to use: Designing new pages, creating components, styling elements
- Accessibility — Philosophy, ARIA usage, landmarks, focus, keyboard navigation
- Accessibility Testing & Patterns — Screen readers, colour contrast, forms, testing checklist
When to use: Building interactive components, implementing forms, ensuring compliance
- Development — Project structure, commands, build process, layout system
- TypeScript — Script rules, component patterns, import paths
- Styling — Tailwind approach, section background rhythm, WaveSeparator
- Alpine.js — Interactive components, progressive enhancement
- Content & Images — Content collections, image utilities
When to use: Writing code, debugging issues, understanding architecture
- Content Guidelines — Writing style, voice, tone, UK English, capitalisation
- Content & Metadata — Metadata system, SEO, blog posts, images
When to use: Writing blog posts, creating page content, optimising for search
- UK English spelling - Use British English (organisation, favour) in all user-facing content
- Run
npx astro checkafter TypeScript changes - Check global
.bcf-*classes before creating custom styling - Mobile-first approach with generous spacing
- Test accessibility with keyboard and screen reader
- Never use TypeScript syntax in
<script define:vars>tags - Never skip heading levels (H1 → H2 → H3)
- Never use "click here" as link text
- Never omit alt text on informative images
- Never deploy without running
npx astro check
- Create
.astrofile insrc/pages/ - Add metadata entry to
src/data/pageMetadata.ts - Use global
.bcf-*classes for styling - Add navigation link to
src/components/Navbar.astro(if needed) - Run
npx astro check
- Create
.mdfile insrc/content/blog/ - Add frontmatter (title, date, author, tags, excerpt)
- Add hero image to
/src/assets/images/blog/[slug]-hero.jpg - Write content following Content Guidelines
- Preview locally with
npm run dev
- Create
.astrofile insrc/components/ - Follow structure: imports → logic → template → styles
- Use TypeScript for props interface
- Check for existing global classes
- Ensure keyboard and screen reader accessibility
- Run
npx astro checkto identify errors - Check if script uses
define:vars(if yes, must use plain JS) - Add type assertions where needed (
as HTMLElement) - Fix only the files you're working on
- Re-run
npx astro checkto verify
npm install # Install dependencies
npm run dev # Start dev server (localhost:4321)
npm run build # Build for production
npm run preview # Preview production build
npx astro check # Check for TypeScript errorsTech Stack:
- Astro v5.15.6 (static site generator)
- Tailwind CSS v3.4.17 (utility-first styling)
- TypeScript (strict mode)
- Alpine.js (progressive enhancement)
Not a Sales Site: BCF emphasizes partnership, collaboration, and open resources rather than selling products or services. This affects our tone, design choices, and content strategy.
Code:
- Pages:
src/pages/ - Components:
src/components/ - Layouts:
src/layouts/ - Styles:
src/styles/global.css
Content:
- Blog:
src/content/blog/ - Metadata:
src/data/pageMetadata.ts - Images:
src/assets/images/
Documentation:
- This folder:
/docs/ - AI guidance: Root
AGENTS.md(points here)
Before deploying:
Functionality:
- All links work
- Forms submit correctly
- Images load with proper alt text
- No console errors
Accessibility:
- Keyboard navigation works
- Skip link appears on Tab
- Focus indicators visible
- Screen reader tested
Technical:
-
npx astro checkpasses - Lighthouse accessibility 95+
- Mobile responsive
- UK English spelling throughout
Questions about:
- Design / visual patterns → See Design System or Design Components
- Accessibility → See Accessibility or Accessibility Testing
- Code / TypeScript → See Development or TypeScript
- Styling / layout → See Styling
- Writing / tone → See Content Guidelines
- Metadata / SEO / blog → See Content & Metadata
Still stuck?
- Check existing components for examples
- Search documentation for keywords
- Review the specific AGENTS.md in component/page directory (if it exists)
When adding new patterns or conventions:
- Document them in the appropriate guide
- Add examples where helpful
- Update this README if adding new docs
- Keep documentation concise and scannable
- This documentation replaces scattered
_AGENTS.mdfiles - Root
AGENTS.mdnow points here for AI assistants - All docs use UK English spelling
- Keep docs up-to-date with code changes