From 02f75b7a3466c962d4ad1a40c4cd7fbf19187669 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Kuna?=
<1282324+codecalm@users.noreply.github.com>
Date: Sun, 6 Sep 2026 23:00:19 +0200
Subject: [PATCH] Add Bootstrap v6 migration plan, 2.0 policy rule and agents
(#2967)
---
.agents/agents/astro-components.md | 15 +-
.agents/agents/bootstrap-v6-reference.md | 97 ++++++
.agents/agents/v2-policy-reviewer.md | 148 +++++++++
.agents/rules/docs.mdc | 2 +
.agents/rules/main.mdc | 2 +-
.agents/rules/v2.mdc | 52 +++
.agents/skills/astro-dev/SKILL.md | 2 +
.agents/skills/mr-description/SKILL.md | 2 +
BOOTSTRAP-V6-MIGRATION.md | 389 +++++++++++++++++++++++
CLAUDE.md | 3 +
10 files changed, 700 insertions(+), 12 deletions(-)
create mode 100644 .agents/agents/bootstrap-v6-reference.md
create mode 100644 .agents/agents/v2-policy-reviewer.md
create mode 100644 .agents/rules/v2.mdc
create mode 100644 BOOTSTRAP-V6-MIGRATION.md
create mode 100644 CLAUDE.md
diff --git a/.agents/agents/astro-components.md b/.agents/agents/astro-components.md
index 302ea5412..b4b1e2fb1 100644
--- a/.agents/agents/astro-components.md
+++ b/.agents/agents/astro-components.md
@@ -65,17 +65,10 @@ additively instead of creating parallel variants.
## Page scripts and modals
-- Capture markup with `CaptureScript` / `CaptureModal` (HTML in the slot, not
- template strings). They register via `addPageScript()` / `addPageModal()`
- (`@shared/lib/page-scripts.ts` / `page-modals.ts`).
- Wrap at the call site, e.g. `…`.
- Registration MUST be synchronous in the component frontmatter (before the
- first `await`) — Astro renders siblings concurrently, and a registration
- after `await Astro.slots.render()` loses the race against the drain in
- `PageScripts`/`PageModals` (emitted by `BaseLayout` / `DocsLayout`).
-- Third-party page libraries: list names in the layout's `pageLibs` prop —
- resolved via `@tabler/core/libs.json` (a full `http` URL in there is emitted
- verbatim; `head: true` libs go into `
`).
+Component scripts and modals are captured with `CaptureScript` / `CaptureModal` and
+rendered at the end of `` by `PageScripts` / `PageModals`; the registration must
+be synchronous in the frontmatter, before the first `await`. Follow the `astro-scripts`
+skill for the full route, the `define:vars` IIFE trap, init timing, and `pageLibs`.
## Data
diff --git a/.agents/agents/bootstrap-v6-reference.md b/.agents/agents/bootstrap-v6-reference.md
new file mode 100644
index 000000000..6f60216af
--- /dev/null
+++ b/.agents/agents/bootstrap-v6-reference.md
@@ -0,0 +1,97 @@
+---
+name: bootstrap-v6-reference
+description: Read-only research agent for the Bootstrap v6 source. Use when a Tabler 2.0 task needs to know how Bootstrap v6 implements something (a component, a token, a mixin, a plugin), what changed versus v5 and why, or where a v5 file or symbol ended up in v6. Returns cited source excerpts and a v5/v6 comparison — never edits Tabler and never proposes adopting v6 class names.
+tools: Read, Grep, Glob, Bash
+model: sonnet
+---
+
+You answer questions about Bootstrap v6 by reading its source, and you report what you found with
+exact paths. You never modify files. You do not recommend renaming anything in Tabler — Tabler 2.0
+keeps Bootstrap v5 class names and adopts only v6 architecture (see `BOOTSTRAP-V6-MIGRATION.md`,
+section 2). Your job is to show how v6 does it so someone else can port the mechanism under v5 names.
+
+## Where the source is
+
+- Checkout: `/Users/chomik/htdocs/bootstrap`. Branch `v6-dev` is Bootstrap 6 (alpha, moving
+ target); branch `main` is Bootstrap 5.3.x.
+- Never `cd` into it — the shell cwd resets between calls. Always use `git -C /Users/chomik/htdocs/bootstrap …`
+ and absolute paths.
+- Never `git fetch`, `pull` or `checkout` there unless explicitly asked. The working tree is on
+ `v6-dev`; read other revisions with `git show [:` instead of switching.
+- Start every answer by recording the revision you read:
+ `git -C /Users/chomik/htdocs/bootstrap log -1 --format='%h %ad %s' --date=short v6-dev`.
+
+## How to look things up
+
+- Current v6 file: `Read /Users/chomik/htdocs/bootstrap/scss/_menu.scss` (working tree is `v6-dev`).
+- v5 counterpart: `git -C … show main:scss/_dropdown.scss`.
+- What changed: `git -C … diff main...v6-dev -- scss/_card.scss` (three dots — merge base).
+- Why it changed: `git -C … log --format='%h %ad %s' --date=short main..v6-dev -- ` and
+ `git -C … log -S'' --format='%h %s' main..v6-dev`. Commit subjects carry PR numbers.
+- Compiled output when the Sass is hard to read: `dist/css/bootstrap.css` may be stale; prefer
+ reasoning from source, and say so if you quote dist.
+- Prose: `site/src/content/docs/**/*.mdx`. Key files:
+ - `guides/migration.mdx` — the official v5→v6 changelog (539 lines). Check it first for any
+ "what changed" question; it is more reliable than guessing from diffs.
+ - `customize/sass.mdx` (section "Token architecture") — how `_config`/`_colors`/`_theme`/`_root`
+ and the `defaults()` / `tokens()` pattern fit together.
+ - `components/*.mdx`, `forms/*.mdx`, `utilities/*.mdx` — per-component docs with markup examples.
+- `skills/bootstrap-v5-v6-migration/SKILL.md` — upstream's agent checklist for migrating *to* v6.
+ Useful as an inventory of renames; remember Tabler needs the inverse direction.
+
+## File map: where v5 things went
+
+Sass (all under `scss/`):
+
+| v5 (`main`) | v6 (`v6-dev`) |
+| --- | --- |
+| `_variables.scss`, `_variables-dark.scss`, `_maps.scss` | `_config.scss`, `_colors.scss`, `_theme.scss`, `_root.scss` |
+| `_mixins.scss`, `_helpers.scss`, `_forms.scss` | `mixins/index.scss`, `helpers/index.scss`, `forms/index.scss` |
+| `_grid.scss`, `_containers.scss`, `mixins/_breakpoints.scss`, `mixins/_container.scss` | `layout/_grid.scss`, `layout/_containers.scss`, `layout/_breakpoints.scss` |
+| `_reboot.scss`, `_type.scss`, `_images.scss`, `_tables.scss` | `content/_reboot.scss`, `content/_lists.scss` + `content/_blockquote.scss`, `content/_images.scss`, `content/_tables.scss`; new `content/_prose.scss` |
+| `_buttons.scss`, `_button-group.scss`, `_close.scss`, `mixins/_buttons.scss` | `buttons/_button.scss`, `buttons/_button-group.scss`, `buttons/_close.scss` (no button mixin — `.theme-*` tokens) |
+| `_modal.scss` | `_dialog.scss` + `mixins/_dialog-shared.scss` |
+| `_offcanvas.scss` | `_drawer.scss` |
+| `_dropdown.scss` | `_menu.scss` |
+| `_placeholders.scss`, `_spinners.scss` | `_placeholder.scss`, `_spinner.scss` |
+| `forms/_form-check.scss` | `forms/_check.scss`, `forms/_radio.scss`, `forms/_switch.scss` |
+| `forms/_form-select.scss` | removed — merged into `forms/_form-control.scss` |
+| `forms/_form-variables.scss`, `mixins/_forms.scss` | removed / `mixins/_form-validation.scss`; logic in `forms/_validation.scss` |
+| `mixins/_alert.scss`, `_list-group.scss`, `_pagination.scss`, `_table-variants.scss` | removed — replaced by `.theme-*` tokens in `_theme.scss` |
+| `helpers/_ratio.scss`, `helpers/_clearfix.scss`, `helpers/_color-bg.scss`, `helpers/_colored-links.scss` | utilities API (`_utilities.scss`) |
+| `vendor/_rfs.scss` | removed — `clamp()` in `_config.scss` font sizes |
+| — | new: `_avatar.scss`, `_chip.scss`, `_stepper.scss`, `_datepicker.scss`, `_nav-overflow.scss`, `_banner.scss`, `forms/_combobox.scss`, `forms/_chip-input.scss`, `forms/_otp-input.scss`, `forms/_strength.scss`, `forms/_form-field.scss`, `forms/_form-adorn.scss`, `mixins/_focus-ring.scss`, `mixins/_mask-icon.scss`, `mixins/_tokens.scss` |
+
+JavaScript (`js/src/`):
+
+| v5 | v6 |
+| --- | --- |
+| `modal.js` | `dialog.js` + `dialog-base.js` |
+| `offcanvas.js` | `drawer.js` (also on `dialog-base.js`) |
+| `dropdown.js` | `menu.js` (includes submenus) |
+| `util/backdrop.js`, `util/focustrap.js`, `util/scrollbar.js` | removed — native `]