chore: move skills to .agents, add release-cog, and enable prettier#2961
chore: move skills to .agents, add release-cog, and enable prettier#2961markphelps merged 5 commits intomainfrom
Conversation
Signed-off-by: Mark Phelps <mphelps@cloudflare.com>
Signed-off-by: Mark Phelps <mphelps@cloudflare.com>
There was a problem hiding this comment.
This PR adds Prettier to the docs formatting workflow and reformats all Markdown files.
Summary: Add Prettier 3.6.2 to mise tooling and integrate it into fmt:docs/fmt:docs:fix tasks with proper symlink handling.
Issues found:
-
High: The array emptiness check uses a non-idiomatic pattern.
${files[*]-}only applies the default when unset, butfiles=()initializes it, so the-never triggers. While it accidentally works, it's fragile. -
Medium: When no Markdown files exist, prettier runs with no arguments and errors. The check should use
${#files[@]}instead.
| description = "Fix Markdown formatting" | ||
| run = "markdownlint-cli2 --fix" | ||
| run = [ | ||
| ''' |
There was a problem hiding this comment.
Use idiomatic array length check here as well:
| ''' | |
| if [ ${#files[@]} -gt 0 ]; then | |
| prettier --write "${files[@]}" | |
| fi |
|
Posted review comments to PR #2961 with two suggestions to fix the array emptiness check in |
- Fix array emptiness check in fmt:docs tasks to use idiomatic bash pattern - Regenerate docs/llms.txt after prettier formatting
| files+=("$file") | ||
| fi | ||
| done < <(git ls-files -z -- '*.md') | ||
| if [ "${files[0]+x}" ]; then |
There was a problem hiding this comment.
Use idiomatic array length check for clarity:
| if [ "${files[0]+x}" ]; then | |
| if [ ${#files[@]} -gt 0 ]; then | |
| prettier --check "${files[@]}" | |
| fi |
| files+=("$file") | ||
| fi | ||
| done < <(git ls-files -z -- '*.md') | ||
| if [ "${files[0]+x}" ]; then |
There was a problem hiding this comment.
Use idiomatic array length check here as well:
| if [ "${files[0]+x}" ]; then | |
| if [ ${#files[@]} -gt 0 ]; then | |
| prettier --write "${files[@]}" | |
| fi |
|
Posted review with suggestions to fix the array emptiness checks in |
- Create .prettierignore with docs/llms.txt and CLAUDE.md - Regenerate docs/llms.txt with consistent formatting
There was a problem hiding this comment.
This PR organizes skills into .agents/skills/, adds a new release-cog skill with comprehensive release documentation, and integrates Prettier into the docs formatting workflow.
One issue to address:
The array emptiness check in mise.toml (lines 401 and 420) uses a non-idiomatic bash pattern. Using ${#files[@]} is the standard, more readable idiom for checking if an array has elements.
| files+=("$file") | ||
| fi | ||
| done < <(git ls-files -z -- '*.md') | ||
| if [ "${files[0]+x}" ]; then |
There was a problem hiding this comment.
Use idiomatic array length check for clarity and consistency:
| if [ "${files[0]+x}" ]; then | |
| if [ ${#files[@]} -gt 0 ]; then | |
| prettier --check "${files[@]}" | |
| fi |
| files+=("$file") | ||
| fi | ||
| done < <(git ls-files -z -- '*.md') | ||
| if [ "${files[0]+x}" ]; then |
There was a problem hiding this comment.
Use idiomatic array length check here as well:
| if [ "${files[0]+x}" ]; then | |
| if [ ${#files[@]} -gt 0 ]; then | |
| prettier --write "${files[@]}" | |
| fi |
|
I'm Bonk, and I've done a quick review of your PR. This PR moves skill definitions to One issue found:
I've posted suggestions to fix both occurrences. |
|
LGTM |
Summary
.agents/skillsand update related skill locationsrelease-cogskill for release workflow guidancenpm:prettiertomiseand run Prettier infmt:docs/fmt:docs:fix