Before doing anything else, detect the stack by reading manifest files at
the repo root: package.json, pyproject.toml, requirements.txt, Cargo.toml,
go.mod, Gemfile, mix.exs, build.gradle, pom.xml, composer.json.
Report which you found in one short line. Then proceed with the stage-
specific task below, adapting your reading list to that stack.

Repo: $repo_name at $repo_path
Wiki root: $wiki_root
HEAD: $head_sha
Today: $today

Stage 1 of 5 — data model.

Read the data-model surface, adapting to the detected stack:
  - Python (SQLAlchemy/Django/Pydantic): models, schema migrations, alembic versions
  - Ruby on Rails: app/models, db/schema.rb, db/migrate
  - Go: types in pkg/<domain>, sqlc/migrate dirs
  - JS/TS (Prisma/Drizzle): prisma/schema.prisma, drizzle/schema.ts
  - SQL-first: db/schema.sql, migrations dir

Generate $wiki_root/projects/$repo_name/data-model.md with an ER overview,
the table inventory, key associations, and a Mermaid ER diagram.

Generate $wiki_root/projects/$repo_name/models/<entity>.md per significant
entity covering columns, associations, validations, and any non-trivial
behavior (callbacks, hooks, computed properties).

If you can extract migration history, generate
$wiki_root/projects/$repo_name/schema-evolution.md with major schema
changes and WHY they happened (mine git log inside $repo_path for the
migration files).

Use [[wikilinks]] between related models. Every page must carry the v2
frontmatter template:

    ---
    title: <page title>
    type: model | overview
    source: bootstrap
    project: $repo_name
    created: $today
    updated: $today
    tags: [data-model, ...]
    confidence: high | medium | low
    ---

Rules:
- Edit only files inside $wiki_root.
- Do NOT touch $wiki_root/raw/.
- Stay within $wiki_root/projects/$repo_name/ for repo-specific pages.

After editing, append one entry to $wiki_root/log.md:
`## [$today] bootstrap-1 | $repo_name $head_sha — data-model`.

Return a single short confirmation message; do not summarize the changes.
