This directory stores evidence, prompt snippets, and notes gathered during the **Crawl** phase of the AI-track course.
> **Branch strategy and PR automation are defined below** — read the [Branch Strategy](#branch-strategy) and [Automatic PRs](#automatic-prs) sections before starting exercises.
---
## What is the Crawl phase?
@ -16,18 +18,139 @@ The track is structured as **Crawl → Walk → Run**:
---
## Branch Strategy
Each exercise lives on its own branch, chained from the previous one so diffs stay focused:
```
main
└─ exercise-0 (bootstrap scaffolding)
└─ exercise-1
└─ exercise-2
└─ exercise-3
└─ …
```
**Rules:**
- `exercise-0` branches from `main`.
- Each subsequent exercise branches from the **previous** exercise branch — never from `main`.
- PR base is always the **previous exercise branch** (not `main`), so reviewers see only the delta for that exercise.
- Merge commits are fine; rebasing is fine — just keep the chain intact.
### Creating a branch for exercise N
```bash
# Replace N with the exercise number, e.g. 3
PREV=exercise-$((N-1))
git checkout "$PREV"
git pull origin "$PREV" # sync if remote exists
git checkout -b exercise-$N
```
---
## Chain-PRs
Each lesson produces a **chain PR** — a small, focused pull request that:
1. Targets the **previous exercise branch** as base (not `main`).
2. Contains **evidence** that the stated goal was met (tests, screenshots, logs).
3. Uses the PR title format: `GHCP — Crawl: <ex#> <name>` (e.g. `GHCP — Crawl: Ex1 Repo orientation`).
4. Follows the PR description template below.
### Why chain PRs?
- Keeps history linear and bisectable.
- Each PR is independently reviewable without a giant context window.
- Evidence in the PR body makes AI assistance auditable.
---
## Automatic PRs
Yes — you can open a PR automatically at the end of each exercise using the [GitHub CLI (`gh`)](https://cli.github.com/):
```bash
# Run this at the end of every exercise (replace variables as needed)
**Tip:** Write your PR body into `.copilot-track/crawl/pr-body-ex<N>.md` first, then run the command above. The body file is the single source of truth — commit it alongside your changes.
- Updated `ai-track-docs/SYSTEM-OVERVIEW.md` with a full repo summary: languages, entry points, test approach, directory map, three low-risk modules, and a justified module recommendation.
- Updated `.copilot-track/crawl/README.md` with the canonical PR template, chain-branch strategy, and `gh pr create` automation command.
| 1 | `Squidex.Domain.Apps.Core.Model` | Pure C# value objects / record types. No I/O, no DI, no HTTP. 112 test files provide tight safety net. Changes are confined to domain invariants. |
| 2 | `Squidex.Infrastructure` | Cross-cutting utilities (tasks, queries, timers). 96 test files. Broadly used but changes to leaf utilities are isolated. |
| 3 | `Squidex.Shared` | Tiny module (12 files): permission ID constants and `.resx` text resources. Zero runtime logic — almost impossible to break anything. |
- **No I/O or external dependencies** — pure in-memory domain types; changes can never break database adapters, API routing, or authentication.
- **Rich test suite** — 112 test files in `Squidex.Domain.Apps.Core.Tests` give immediate red/green feedback.
- **Well-scoped** — sub-directories (`Apps`, `Schemas`, `Contents`, `Assets`, `Rules`, `Comments`, `Teams`) make it easy to pick a single concept to modify without touching others.
- **Reusable across exercises** — schema validation, field type models, and content value types appear in later Walk/Run exercises, so understanding this module pays forward.
---
## Key external dependencies
- MongoDB (primary datastore) or Entity Framework (SQL alternative)
- ASP.NET Core Identity / OpenID Connect
- Angular CLI, Vitest (unit), Playwright (e2e)
- MongoDB (primary datastore) or Entity Framework / SQL (alternative)
- ASP.NET Core Identity / OpenID Connect (auth)
- Angular Material (UI components)
- Vitest, Playwright, k6 (testing)
---
## TODO — complete during Crawl
## TODO
- [ ] List major bounded contexts / domain aggregates
- [ ] Document auth flow
- [ ] Note any feature flags or environment variables required for local dev