Conversation
|
🌐 Fork Preview for PR #751 https://pr-751.ddev-com-fork-previews.pages.dev This preview updates automatically when you push changes to your fork. |
…le docs ## Short Summary (TL;DR) Most of `AGENTS.md` moves into rules and skills that load only when needed, hooks now run the prettier and textlint checks that CI runs, and the docs that had drifted from the code are corrected. ## The Issue `AGENTS.md` had grown to 304 lines, all loaded in every session, although most of it applies only to blog content, images, or commits. Nothing enforced its rules, and `.gitignore` ignored all of `.claude`, so no shared Claude Code configuration could be committed. `ddev textlint` passed on errors it could not fix, because `textlint --fix` exits 0 when they remain, so CI failed where the local check had passed. README.md, README_SPONSOR.md, MARKDOWN_FORMATTING.md, and FORK_PREVIEW_SETUP.md had drifted from the code. ## How This PR Solves The Issue Follows ddev/ddev#8805 and its follow-ups. `AGENTS.md` keeps what applies to every change and links the rest: - `.claude/rules/content.md` (blog posts, their voice, schema, links, images) and `.claude/rules/comments.md` load only for the files they cover. - Skills: `bump-deps` documents the dependency bump from ddev#601, ddev#637, ddev#685, ddev#734, and ddev#747, including `allowScripts`. `add-sponsor` replaces README_SPONSOR.md, and only needs the sponsor's website. `ddev-commit` holds the commit and PR rules, and the PR template gains the Short Summary (TL;DR) section from the ddev/ddev template. `blog-images` holds the screenshot steps, now with a shorter FEATURE_IMAGE_GUIDE.md as `feature-banner.md`. - `.claude/settings.json` denies `git push`, allows read-only `gh` commands and the `ddev` checks, and adds two hooks. Before `git commit`, the check-only prettier and textlint run as in CI. After an edit, `ddev prettier` runs on that file, and `ddev textlint` too under `src/content/`. - `ddev prettier` and `ddev textlint` take optional file arguments, and `ddev textlint` checks again after fixing. The npm scripts call `prettier` and `textlint` by name, since `npm run` already puts `node_modules/.bin` on `PATH`. - `.gitignore` ignores only the personal files the Claude Code docs list. The docs corrections include blog categories, the dev server port, page paths, image conversion to WebP, external link behavior, feature image sizes, the unused `squareLogo`, the theme toggle, and the fork preview workflows and URLs. Prettier has no Astro plugin, so `AGENTS.md` now says nothing formats `.astro` files. README.md is shorter, with setup steps that `AGENTS.md` and the skills no longer repeat, and opens with the logo, badges, and links, as the ddev/ddev README does. Two posts set `modifiedData` instead of `modifiedDate`, which the content schema dropped without an error, so their modified dates now show. ## Manual Testing Instructions ```bash ddev start ddev prettier src/lib/api.ts # formats one file ddev textlint # fixes, then reports anything left ``` Start a new Claude Code session on this branch, then confirm that `/bump-deps`, `/add-sponsor`, `/ddev-commit`, and `/blog-images` are listed, that editing a file formats it, that `git commit` runs the checks first, and that `git push` is denied. ## Automated Testing Overview None. The hook scripts were run directly against a formatted file, an unformatted one, an unfixable textlint error, a `.prettierignore` path, a path outside the project, an empty payload, and a stopped project. In a live session, an edit was formatted, an unfixable textlint error was reported back, and `git commit --dry-run` was blocked while that error remained. ## Release/Deployment Notes No effect on the site build. Agents other than Claude Code, including Copilot code review, keep reading `AGENTS.md`, which links each rule and skill file. 🤖 Developed with assistance from [Claude Code](https://claude.ai/code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
stasadev
force-pushed
the
20261005_stasadev_agents_md
branch
from
October 5, 2026 13:09
7ba3228 to
d8905a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short Summary (TL;DR)
Most of
AGENTS.mdmoves into rules and skills that load only when needed, hooks now run the prettier and textlint checks that CI runs, and the docs that had drifted from the code are corrected.The Issue
AGENTS.mdhad grown to 304 lines, all loaded in every session, although most of it applies only to blog content, images, or commits. Nothing enforced its rules, and.gitignoreignored all of.claude, so no shared Claude Code configuration could be committed.ddev textlintpassed on errors it could not fix, becausetextlint --fixexits 0 when they remain, so CI failed where the local check had passed. README.md, README_SPONSOR.md, MARKDOWN_FORMATTING.md, and FORK_PREVIEW_SETUP.md had drifted from the code.How This PR Solves The Issue
Follows ddev/ddev#8805 and its follow-ups.
AGENTS.mdkeeps what applies to every change and links the rest:.claude/rules/content.md(blog posts, their voice, schema, links, images) and.claude/rules/comments.mdload only for the files they cover.bump-depsdocuments the dependency bump from build(deps): bump astro from v6.1.1 to v6.1.3 #601, build(deps): bump astro from v6.1.8 to v6.3.1 #637, build: bump Astro from 6 to 7 #685, build: bump astro from v7.1.3 to v7.2.10 #734, and build(deps): bump astro from v7.2.10 to v7.3.5, @astrojs/react to v7 #747, includingallowScripts.add-sponsorreplaces README_SPONSOR.md, and only needs the sponsor's website.ddev-commitholds the commit and PR rules, and the PR template gains the Short Summary (TL;DR) section from the ddev/ddev template.blog-imagesholds the screenshot steps, now with a shorter FEATURE_IMAGE_GUIDE.md asfeature-banner.md..claude/settings.jsondeniesgit push, allows read-onlyghcommands and theddevchecks, and adds two hooks. Beforegit commit, the check-only prettier and textlint run as in CI. After an edit,ddev prettierruns on that file, andddev textlinttoo undersrc/content/.ddev prettierandddev textlinttake optional file arguments, andddev textlintchecks again after fixing. The npm scripts callprettierandtextlintby name, sincenpm runalready putsnode_modules/.binonPATH..gitignoreignores only the personal files the Claude Code docs list.The docs corrections include blog categories, the dev server port, page paths, image conversion to WebP, external link behavior, feature image sizes, the unused
squareLogo, the theme toggle, and the fork preview workflows and URLs. Prettier has no Astro plugin, soAGENTS.mdnow says nothing formats.astrofiles. README.md is shorter, with setup steps thatAGENTS.mdand the skills no longer repeat, and opens with the logo, badges, and links, as the ddev/ddev README does. Two posts setmodifiedDatainstead ofmodifiedDate, which the content schema dropped without an error, so their modified dates now show.Manual Testing Instructions
Start a new Claude Code session on this branch, then confirm that
/bump-deps,/add-sponsor,/ddev-commit, and/blog-imagesare listed, that editing a file formats it, thatgit commitruns the checks first, and thatgit pushis denied.Automated Testing Overview
None. The hook scripts were run directly against a formatted file, an unformatted one, an unfixable textlint error, a
.prettierignorepath, a path outside the project, an empty payload, and a stopped project. In a live session, an edit was formatted, an unfixable textlint error was reported back, andgit commit --dry-runwas blocked while that error remained.Release/Deployment Notes
No effect on the site build. Agents other than Claude Code keep reading
AGENTS.md, which links each rule and skill file.🤖 Developed with assistance from Claude Code