1.5 Fork the Example Repository
In this section, you'll use Claude Code to fork the Emerald Grove Pet Clinic — the example application you'll work with throughout this program.
About Emerald Grove Pet Clinic
Emerald Grove Pet Clinic is a veterinary clinic management application designed as an AI-native development example. It mirrors the complexity of real enterprise codebases:
- Full-stack architecture — Spring Boot backend with Thymeleaf frontend
- Comprehensive test suite — Unit tests, integration tests, and Playwright E2E tests
- CI/CD pipeline — GitHub Actions workflows for build, test, and deployment
- AI-native documentation — CLAUDE.md, architecture docs, and coding standards
- Sample data — Pre-loaded owners, pets, vets, and visits for immediate testing
Prerequisites for the Example Project
Before forking, ensure you have Java installed. The Pet Clinic application requires Java 17 or higher.
Check your Java version:
java -version
Install Java if needed:
macOS:
brew install openjdk@17
Ubuntu/Debian:
sudo apt install openjdk-17-jdk
The project includes a Maven wrapper (mvnw), so you don't need to install Maven separately. The wrapper will download the correct Maven version automatically.
Fork the Repository
Fork the repository into the liatrio-forge organization with your name appended, then clone it:
<first>-<last> before running!The commands below contain <first>-<last> as a placeholder. Replace it with your first and last name in lowercase, separated by hyphens (e.g., jane-doe). If you copy-paste without editing, the < and > characters will cause a shell error.
gh repo fork liatrio-labs/emerald-grove-pet-clinic \
--org liatrio-forge \
--fork-name emerald-grove-pet-clinic-<first>-<last> \
--clone
cd emerald-grove-pet-clinic-<first>-<last>
Then install the pre-commit hooks (requires pre-commit):
./scripts/setup-precommit.sh
Then start Claude Code inside the project:
claude
Copy Issues to Your Fork
GitHub forks don't include the parent repository's issues, so you'll need to copy them over. These issues represent the backlog of work you'll tackle throughout the program.
Ask Claude to enable issues on your fork and copy them from the parent repo:
<first>-<last> before running!The prompt below contains <first>-<last> as a placeholder. Replace it with the same name you used when forking (e.g., jane-doe).
Enable issues on liatrio-forge/emerald-grove-pet-clinic-<first>-<last> using
`gh api repos/liatrio-forge/emerald-grove-pet-clinic-<first>-<last> --method PATCH -f has_issues=true`,
then use the gh cli to fetch all open issues from liatrio-labs/emerald-grove-pet-clinic
and create identical issues (same title and body) on liatrio-forge/emerald-grove-pet-clinic-<first>-<last>.
This is a great early example of using Claude Code to automate a multi-step workflow. Claude will use the gh CLI to enable issues, list the parent repo's issues, and recreate each one on your fork — all in one prompt.
Detach from the Fork Network
GitHub forks are linked to their parent repository in a "fork network." This linkage prevents you from changing the fork's visibility — which you'll need to set to internal later in this section.
To detach, you'll use the Leave fork network option in GitHub's UI. There is no API or CLI equivalent for this action.
The confirmation dialog will explain what happens to your repo's metadata. Read it carefully before proceeding. If the dialog indicates that issues, PRs, or other metadata will be lost, stop and contact GitHub Support instead — select "Attach, detach, or reroute forks" and they can detach while preserving everything.
Steps to detach:
- Open your fork's settings:
https://github.com/liatrio-forge/emerald-grove-pet-clinic-<first>-<last>/settings - Scroll to the Danger Zone at the bottom of the page
- Find "Leave fork network" and click the button
- Read the confirmation dialog — confirm that issues and repo metadata will be preserved
- Complete the detach process
After detaching, your local clone may still have an upstream remote pointing to the original parent repository. Remove it so your repo only references your own fork:
git remote remove upstream
git remote -v # verify only 'origin' remains
Once detached, your repository is a standalone repo. You can now change its visibility to internal:
gh repo edit liatrio-forge/emerald-grove-pet-clinic-<first>-<last> --visibility internal --accept-visibility-change-consequences
Internal repositories are visible to all members of the liatrio-forge organization but private to outsiders. This allows teammates to collaborate while still enabling access to organization-level secrets — required for CI workflows that use secrets, such as automated code review with Claude Code. The --accept-visibility-change-consequences flag is required for the command to work
Project Structure Overview
Ask Claude to give you a high-level overview:
Give me a high-level overview of this project's structure. What are the main directories and their purposes?
Claude will analyze the repository and explain:
emerald-grove-pet-clinic-<first>-<last>/
├── src/ # Java source code
│ ├── main/
│ │ ├── java/ # Application code
│ │ └── resources/ # Configuration, templates, static assets
│ └── test/ # Test code
├── e2e-tests/ # Playwright end-to-end tests
├── docs/ # Documentation and specs
│ └── specs/ # SDD specification artifacts
├── .github/ # GitHub Actions workflows
├── .claude/ # Claude Code configuration
├── AGENTS.md # AI assistant context file (open standard)
├── CLAUDE.md # Symlink → AGENTS.md (Claude Code workaround)
├── pom.xml # Maven build configuration
└── README.md # Project documentation
Build and Run the Application
Let's verify the application works. Ask Claude:
How do I build and run this application locally?
Claude will read the project configuration and provide instructions. Typically:
./mvnw spring-boot:run
The application will start on http://localhost:8080.
You can add "!" in front of any command to execute directly to the bash shell from a claude code session. Try running:
!./mvnw spring-boot:run
Explore with Claude
Try these prompts to explore the codebase:
Find the main application entry point:
Where is the main application entry point? Show me the main class.
Understand the domain model:
What entities does this application manage? Show me the domain model.
Find the test structure:
What kinds of tests does this project have? Where are they located?
Check for AI-native configuration:
Does this project have a CLAUDE.md file? Show me its contents.
What Makes This Repo "AI-Native"?
As you explore, notice these AI-native characteristics:
- AGENTS.md — A context file that helps AI assistants understand the project. AGENTS.md is an open standard supported by multiple AI coding tools. The repo also includes a
CLAUDE.mdsymlink pointing to the same file — this is a workaround because Claude Code does not yet support AGENTS.md natively. Functionally they are identical; favorAGENTS.mdwhen authoring. - docs/specs/ — Directory structure for SDD artifacts
- Comprehensive tests — Provide feedback loops for AI-generated code
- Clear architecture — Makes it easier for AI to understand and modify code
- Coding standards — Documented conventions AI can follow
Next Steps
Now that you have the project forked and running, the next section takes you on a guided tour of the AI-native repository structure — understanding the patterns that make this codebase optimized for AI-assisted development.