This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
First-time setup for Claude Code:
cp .claude/settings.local.json.template .claude/settings.local.jsonThe settings.local.json file is gitignored to prevent rebase conflicts and allow personalized configurations.
ALWAYS verify your current working directory before running any commands. This repository has a complex architecture with theme submodules and various working directories. Always check pwd and ensure you're in the expected location:
- Main repository root:
./(top-level directory with _config.yml) - Theme submodule:
./_theme/(contains Jekyll theme files) - Temporary directories:
./_tmp(relative to repository root)
Common mistakes:
- Running Jekyll commands from wrong directory
- Editing theme files when not in
_theme/directory - Git operations in wrong repository context
Set Ruby path before running any Jekyll commands:
export PATH=$PATH:~/.local/share/gem/ruby/3.2.0/binmake build- Build the Jekyll sitemake serve- Serve site locally with auto-regeneration at http://localhost:4000make dev- Alias for serve (development mode)make production- Build for production with JEKYLL_ENV=productionmake clean- Remove generated files and cachesmake install- Install Ruby dependencies via bundle installmake test- Build and run basic validation (checks for 17 HTML files)make verify- Run comprehensive output verification script
bundle install
bundle exec jekyll serve --watch --incremental
bundle exec jekyll buildThis is a Jekyll-based website for Wafer Space with a unique submodule theme architecture:
- Main Repository: Contains site-specific content (posts, collections, overrides)
- Theme Submodule: Proprietary Jekyll theme in
_theme/directory - Custom Plugin:
_plugins/theme_plugin.rbbridges Jekyll with the submodule theme
The theme_plugin.rb file implements a sophisticated system to load theme components:
- Layouts Loading: Dynamically loads layouts from
_theme/_layouts/via Jekyll::Layout.new - Includes Path: Adds
_theme/_includes/to Jekyll's include search paths - Collections Merging: Loads theme collections (like shop_items, portfolio) when not overridden
- Demo Pages: Demo pages are excluded from production site
- Asset Copying: Copies theme assets to build output with site assets taking precedence
- Override System: Site files always override theme files when both exist
_advisors/- Advisor profiles (site-specific)_authors/- Author information (site-specific)_friends/- Partner organizations (site-specific)_posts/- Blog posts and news (site-specific)_shop_items/- E-commerce products (loaded from theme if not overridden)_portfolio/- Portfolio items (loaded from theme if not overridden)
- Site files (main repo) take highest precedence
- Theme files (
_theme/) are fallback defaults - Navigation override: Custom
_includes/layouts/nav/_btn-header.htmlchanges button text from "Free Trial" to "Free Silicon?"
The site generates 17 HTML files for the production wafer.space website. The test system verifies:
- Correct file count (17 HTML files)
- Theme plugin presence
- Theme submodule availability
_config.yml- Main Jekyll configuration withtheme_path: "_theme"Gemfile- Ruby dependencies including jekyll-paginate-v2, jekyll-archivesMakefile- Build automation and development commands
- Deploys from
mainbranch via GitHub Pages - Uses SSH deploy key (
JEKYLL_THEME_KEYsecret) for private theme repository access - Requires SSH key setup: public key as deploy key on theme repo, private key as repository secret
- Submodule checkout via SSH:
git@github.com:wafer-space/wafer-space-jekyll-theme.git
The theme is proprietary and stored as a private git submodule. For development:
git clone --recursive https://github.com/wafer-space/wafer-space.github.io.git- Site assets in
assets/override theme assets - Site includes in
_includes/override theme includes - Site layouts override theme layouts (though none currently exist)
- Site collections override theme collections entirely
- Site pages override theme demo pages
after_init- Sets up include paths and sass pathspost_read- Loads theme layouts, collections, and demo pagespost_write- Copies theme assets and removes_themefrom output
This architecture allows the main repository to focus on Wafer Space content while leveraging a full-featured proprietary theme for design and functionality.
Make sure you are on the right branch before doing any work.
- When making changes, start a new git branch and then make sure to commit to the git repository frequently as you work.
- Once the work has been completed, create a new pull request on GitHub.
- Once the pull request has been created, wait for the GitHub Action checks to run and fix any issues they find.
- Wait for GitHub Copilot to review your pull request and then use the GitHub GraphQL API to find all code suggestions, fix the issues and then resolve the threads.
Pull requests are checked by the preview-verification.yml workflow, which runs the muffet link checker against the per-PR preview site.
NEVER add exclusions to .github/workflows/preview-verification.yml without first asking the user for confirmation using the AskUserQuestion tool. Exclusions hide potential problems and should be deliberate decisions, not automatic fixes.
Before proposing an exclusion, you MUST:
- Investigate the root cause of the failure
- Attempt to fix the actual problem (broken URL, missing anchor, etc.)
- If an exclusion is truly needed, use AskUserQuestion to explain the situation and get explicit approval
- Document why the exclusion is necessary in the commit message