Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
31 changes: 25 additions & 6 deletions .agents/skills/changelog-entries/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: changelog-entries
description: >
Write changelog entries for CHANGELOG.md. Use when work has been completed
Write changelog entries for CHANGELOG.md or CHANGELOG-WIP.md. Use when work has been completed
and changelog entries need to be added, or when the user asks to write, add, or update changelog
entries, release notes, or document changes. Triggers on requests like "add changelog entry",
"update the changelog", "write release notes", or after completing a feature/fix that needs documenting.
Expand All @@ -13,8 +13,10 @@ Write entries that match the established format in the target changelog file.

## Determine Target File

1. If the user specifies a file, use that, otherwise use `CHANGELOG.md`.
2. Read the first ~80 lines of the target file to confirm the current format and find the insertion point.
1. If the user specifies a file, use that.
2. If both `CHANGELOG.md` and `CHANGELOG-WIP.md` exist, ask the user which to target.
3. If only one exists, use that file.
4. Read the first ~80 lines of the target file to confirm the current format and find the insertion point.

## CHANGELOG.md Format

Expand All @@ -26,7 +28,7 @@ Each entry is a `- ` prefixed line. No blank lines between entries within a sect
## Unreleased

- Added `craft\helpers\SomeHelper::someMethod()`.
- Fixed a bug where something wasn't working properly. ([#12345](https://github.com/craftcms/cms/pull/12345))
- Fixed a bug where something wasn't working properly. ([#12345](https://github.com/craftcms/cms/issues/12345))
- Deprecated `craft\old\Thing`. `craft\new\Thing` should be used instead.
```

Expand All @@ -41,6 +43,23 @@ Each entry is a `- ` prefixed line. No blank lines between entries within a sect
> Important note about breaking changes.
```

## CHANGELOG-WIP.md Format

Work-in-progress changelog for the next major version. Entries organized by domain under `##` headers (e.g., `## Fields`, `## Elements`, `## Auth`). Within a domain, entries may be further grouped under `###`/`####` subheaders like `### Added`, `### Deprecations`, `### Events`.

```markdown
## Fields

- Added `CraftCms\Cms\Field\NewField`.
- Deprecated `craft\fields\OldField`. `CraftCms\Cms\Field\NewField` should be used instead.

### Events

- Deprecated `craft\events\OldEvent`. `CraftCms\Cms\New\Events\NewEvent` should be used instead.
```

Place new entries under the most appropriate existing `##` domain section, or create a new one if none fits. Group entries by type: Added first, then Deprecated, then Removed.

## Writing Rules

1. **Start with a past-tense verb** — capitalize it:
Expand All @@ -57,9 +76,9 @@ Each entry is a `- ` prefixed line. No blank lines between entries within a sect

4. **End entries with a period.**

5. **Link issues/PRs** at the end when applicable, prefer PRs when there is one:
- PRs: `([#12345](https://github.com/craftcms/cms/pull/12345))`
5. **Link issues/PRs** at the end when applicable:
- Issues: `([#12345](https://github.com/craftcms/cms/issues/12345))`
- PRs: `([#12345](https://github.com/craftcms/cms/pull/12345))`
- Security: `(GHSA-xxxx-xxxx-xxxx)`
- External repos: `([craftcms/commerce#4006](https://github.com/craftcms/commerce/issues/4006))`

Expand Down
12 changes: 6 additions & 6 deletions .agents/skills/changelog-entries/references/entry-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

**Bug fix:**
```
- Fixed a bug where something wasn't working properly. ([#12345](https://github.com/craftcms/cms/pull/12345))
- Fixed a bug where something wasn't working properly. ([#12345](https://github.com/craftcms/cms/issues/12345))
- Fixed a bug where Matrix fields in Blocks view could lose their existing values when they became editable.
```

Expand All @@ -76,8 +76,8 @@

**JavaScript fix:**
```
- Fixed a JavaScript error that occurred if a Matrix field's label was hidden. ([#18366](https://github.com/craftcms/cms/pull/18366))
- Fixed potential JavaScript errors that could occur if a disclosure menu's trigger was missing. ([#18358](https://github.com/craftcms/cms/pull/18358))
- Fixed a JavaScript error that occurred if a Matrix field's label was hidden. ([#18366](https://github.com/craftcms/cms/issues/18366))
- Fixed potential JavaScript errors that could occur if a disclosure menu's trigger was missing. ([#18358](https://github.com/craftcms/cms/issues/18358))
```

**Security fix:**
Expand All @@ -89,7 +89,7 @@

**Styling fix:**
```
- Fixed a styling issue with slideouts within Live Preview. ([#18383](https://github.com/craftcms/cms/pull/18383))
- Fixed a styling issue with slideouts within Live Preview. ([#18383](https://github.com/craftcms/cms/issues/18383))
```

## Deprecated
Expand Down Expand Up @@ -210,8 +210,8 @@
```
- `CraftCms\Cms\User\Elements\User` now implements `Illuminate\Contracts\Auth\Authenticatable`.
- `craft\services\Elements::stopCollectingCacheInfo()` no longer sets the returned duration to the `cacheDuration` config setting if a duration wasn't explicitly declared. ([#16796](https://github.com/craftcms/cms/pull/16796))
- Element indexes now show "Paste" buttons alongside bulk element action buttons. ([#18427](https://github.com/craftcms/cms/pull/18427))
- `slug` columns referenced in element queries' `select`, `where`, or `orderBy` expressions now explicitly resolve to `elements_sites.slug`. ([#18416](https://github.com/craftcms/cms/pull/18416))
- Element indexes now show "Paste" buttons alongside bulk element action buttons. ([#18427](https://github.com/craftcms/cms/issues/18427))
- `slug` columns referenced in element queries' `select`, `where`, or `orderBy` expressions now explicitly resolve to `elements_sites.slug`. ([#18416](https://github.com/craftcms/cms/issues/18416))
- The `maxCachedCloudImageSize` config setting is now set to `0` by default. ([#17997](https://github.com/craftcms/cms/pull/17997))
```

Expand Down
2 changes: 0 additions & 2 deletions .agents/skills/testing-guidelines/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ uses(UnitTestCase::class)->in('Unit');
- For element traits, create minimal test elements that override only what is needed.
- Use Laravel event fakes/listeners to assert dispatch, cancellation, or data changes.
- Use Pest's `->with()` data providers to consolidate tests that share the same structure but differ only in input/expected values. Use named dataset entries for clarity.
- Avoid long chains of `toContain()` / `not()->toContain()` assertions against rendered HTML. They tend to test incidental markup, labels, ordering, and template structure instead of behavior. Prefer assertions that target the semantic contract directly, such as input names, selected values, option values, or data attributes. Keep raw string containment assertions for small, stable strings that are themselves the contract.
- Tests that assert Yii2 backwards-compatibility surfaces (legacy aliases, `ValidateMixin` helpers like `hasErrors()`, other adapter-only behavior) must live in `yii2-adapter/tests-laravel/`, not `tests/Feature/` or `tests/Unit/`.
- Test actual behavior and ensure assertions aren't brittle

## When to Load References

Expand Down
15 changes: 7 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/.husky/ export-ignore
/.lando.yml export-ignore
/.vite-hooks/ export-ignore
/.lintstagedrc.json export-ignore
/.nvmrc export-ignore
/.prettierignore export-ignore
/.prettierrc.json export-ignore
/CHANGELOG-WIP.md export-ignore
/CHANGELOG.md export-ignore
/README.md export-ignore
Expand All @@ -23,8 +27,6 @@
/package.json export-ignore
/packages/ export-ignore
/phpstan.neon export-ignore
/resources/css/ export-ignore
/resources/js/ export-ignore
/scripts/ export-ignore
/src/web/assets/**/src/ export-ignore
/stubs/ export-ignore
Expand All @@ -36,9 +38,6 @@
# Ignore exporting the adapter as it will be split off and released on its own.
/yii2-adapter export-ignore

# Workbench is only for development
/workbench export-ignore

# Identify generated files
/resources/translations/a*/app.php linguist-generated=true
/resources/translations/c*/app.php linguist-generated=true
Expand All @@ -61,8 +60,8 @@
/src/web/assets/**/dist/**/*.min.js linguist-generated=true
/src/web/assets/**/dist/**/*.min.js.map linguist-generated=true

# Built CMS assets generated files
/cms-assets/resources/**/* linguist-generated=true
# resources/build generated files
/resources/build/**/* linguist-generated=true

# Auto detect text files and perform LF normalization
* text=auto
2 changes: 1 addition & 1 deletion .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, ffi
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
tools: composer:v2
ini-values: display_errors=On, memory_limit=2G
coverage: none
Expand Down
6 changes: 3 additions & 3 deletions .github/instructions/a11y.instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: "Guidance for creating more accessible code"
applyTo: "resources/js/**,resources/css/**,resources/templates/**,packages/craftcms-ui/src/**"
applyTo: "resources/js/**,resources/css/**,resources/templates/**,packages/craftcms-cp/src/**"
---

# Accessibility instructions
Expand All @@ -11,11 +11,11 @@ You are an expert in accessibility with deep software engineering expertise.

- Conform to [WCAG 2.2 Level AA](https://www.w3.org/TR/WCAG22/).
- Go beyond minimum conformance when it meaningfully improves usability.
- UI components are defined as Lit Web Components in the component library (`@craftcms/ui`) or as Vue components in `./resources/js/`. You SHOULD use the component patterns as defined. Do not recreate patterns.
- UI components are defined as Lit Web Components in the component library (`@craftcms/cp`) or as Vue components in `./resources/js/`. You SHOULD use the component patterns as defined. Do not recreate patterns.
- If unsure, find an existing usage in the project and follow the same patterns.
- Ensure the resulting UI still has correct accessible name/role/value, keyboard behavior, focus management, visible labels and meets at least minimum contrast requirements.
- If a needed component does not exist, prefer native HTML elements/attributes over ARIA.
- The `@craftcms/ui` component library should include components that can be reused by plugin developers, or outside the context of this application. Vue components should be used for application-specific UI.
- The `@craftcms/cp` component library should include components that can be reused by plugin developers, or outside the context of this application. Vue components should be used for application-specific UI.
- Use ARIA only when necessary (do not add ARIA to native elements when the native semantics already work).
- Ensure correct accessible **name, role, value, states, and properties**.
- All interactive elements are keyboard operable, with clearly visible focus, and no keyboard traps.
Expand Down
167 changes: 0 additions & 167 deletions .github/instructions/php.instructions.md

This file was deleted.

Loading
Loading