Skip to content

chore: move skills to .agents, add release-cog, and enable prettier#2961

Merged
markphelps merged 5 commits intomainfrom
release-skill
Apr 24, 2026
Merged

chore: move skills to .agents, add release-cog, and enable prettier#2961
markphelps merged 5 commits intomainfrom
release-skill

Conversation

@markphelps
Copy link
Copy Markdown
Contributor

@markphelps markphelps commented Apr 24, 2026

Summary

  • move skill definitions to .agents/skills and update related skill locations
  • add the new release-cog skill for release workflow guidance
  • add npm:prettier to mise and run Prettier in fmt:docs/fmt:docs:fix
  • apply formatter fixes across Markdown docs in a follow-up commit

Signed-off-by: Mark Phelps <mphelps@cloudflare.com>
Signed-off-by: Mark Phelps <mphelps@cloudflare.com>
@markphelps markphelps requested a review from a team as a code owner April 24, 2026 17:21
@markphelps markphelps changed the title chore: add prettier to docs fmt workflow chore: move skills to .agents, add release-cog, and enable prettier Apr 24, 2026
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. High: The array emptiness check uses a non-idiomatic pattern. ${files[*]-} only applies the default when unset, but files=() initializes it, so the - never triggers. While it accidentally works, it's fragile.

  2. Medium: When no Markdown files exist, prettier runs with no arguments and errors. The check should use ${#files[@]} instead.

Comment thread mise.toml
Comment thread mise.toml Outdated
description = "Fix Markdown formatting"
run = "markdownlint-cli2 --fix"
run = [
'''
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use idiomatic array length check here as well:

Suggested change
'''
if [ ${#files[@]} -gt 0 ]; then
prettier --write "${files[@]}"
fi

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 24, 2026

Posted review comments to PR #2961 with two suggestions to fix the array emptiness check in mise.toml.

github run

- Fix array emptiness check in fmt:docs tasks to use idiomatic bash pattern

- Regenerate docs/llms.txt after prettier formatting
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest commit changed the array check pattern, but it's still non-idiomatic. Using ${#files[@]} is the standard bash idiom for checking array emptiness and is more readable.

Comment thread mise.toml Outdated
files+=("$file")
fi
done < <(git ls-files -z -- '*.md')
if [ "${files[0]+x}" ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use idiomatic array length check for clarity:

Suggested change
if [ "${files[0]+x}" ]; then
if [ ${#files[@]} -gt 0 ]; then
prettier --check "${files[@]}"
fi

Comment thread mise.toml Outdated
files+=("$file")
fi
done < <(git ls-files -z -- '*.md')
if [ "${files[0]+x}" ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use idiomatic array length check here as well:

Suggested change
if [ "${files[0]+x}" ]; then
if [ ${#files[@]} -gt 0 ]; then
prettier --write "${files[@]}"
fi

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 24, 2026

Posted review with suggestions to fix the array emptiness checks in mise.toml lines 401 and 420. The current "${files[0]+x}" pattern works but ${#files[@]} is the standard bash idiom.

github run

- Create .prettierignore with docs/llms.txt and CLAUDE.md

- Regenerate docs/llms.txt with consistent formatting
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread mise.toml Outdated
files+=("$file")
fi
done < <(git ls-files -z -- '*.md')
if [ "${files[0]+x}" ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use idiomatic array length check for clarity and consistency:

Suggested change
if [ "${files[0]+x}" ]; then
if [ ${#files[@]} -gt 0 ]; then
prettier --check "${files[@]}"
fi

Comment thread mise.toml Outdated
files+=("$file")
fi
done < <(git ls-files -z -- '*.md')
if [ "${files[0]+x}" ]; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use idiomatic array length check here as well:

Suggested change
if [ "${files[0]+x}" ]; then
if [ ${#files[@]} -gt 0 ]; then
prettier --write "${files[@]}"
fi

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 24, 2026

I'm Bonk, and I've done a quick review of your PR.

This PR moves skill definitions to .agents/skills/, adds a new release-cog skill with comprehensive release documentation, and integrates Prettier into the docs formatting workflow.

One issue found:

  1. Medium severity: The array emptiness checks in mise.toml (lines 401 and 420) use a non-idiomatic bash pattern [ "${files[0]+x}" ]. The standard idiom is [ ${#files[@]} -gt 0 ], which is more readable and clearer in intent.

I've posted suggestions to fix both occurrences.

github run

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 24, 2026

LGTM

github run

@markphelps markphelps added this pull request to the merge queue Apr 24, 2026
Merged via the queue into main with commit 72570cb Apr 24, 2026
43 checks passed
@markphelps markphelps deleted the release-skill branch April 24, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants