Skip to content

feat: add composite actions, command files, and docs (Phase 1) - #29

Merged
benhigham merged 11 commits into
mainfrom
feat/composite-actions-and-commands
Mar 31, 2026
Merged

benhigham merged 11 commits into
mainfrom
feat/composite-actions-and-commands

Conversation

@benhigham

@benhigham benhigham commented Mar 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Implements all six Phase 1 tasks from #25 — the foundation for Claude Code CI in this repo.

  • 3 composite actions (setup-node-pnpm, setup-terraform, claude-invoke) with SHA-pinned action references
  • 11 reference command files in .claude/commands/ for Claude Code workflows (code review, test gen, security review, triage, etc.)
  • Documentation updates to AGENTS.md and README.md covering the new actions and commands system
  • Linting config tweaks: yamllint comments.min-spaces-from-content: 1 for prettier compatibility; local .markdownlint.yaml in .claude/commands/ to disable MD041 (first-line heading) for prompt files

Resolves #19, #20, #21, #22, #23, #24

Behavioral changes from prior workflow

  • --frozen-lockfile added: setup-node-pnpm runs pnpm install --frozen-lockfile by default. The previous inline step in release-changesets.yml ran pnpm install without this flag. This is stricter (prevents lockfile drift in CI) but may cause failures if a caller's lockfile is out of date. The install input can be set to "false" to skip the install step entirely if needed.
  • cache-dependency-path restored: setup-node-pnpm now defaults cache-dependency-path to "**/pnpm-lock.yaml", preserving the monorepo-compatible glob that was previously set inline in release-changesets.yml.

Test plan

  • mise run check passes (prettier, yamllint, actionlint, markdownlint — all green)
  • Lefthook pre-commit hooks pass on all commits
  • After merge, pin consuming workflows to the merge commit SHA
  • Trigger a test workflow in benhigham/web to validate setup-node-pnpm cache behaviour

Add proper headings and structure to all 11 command files so they
pass markdownlint. Remove the .claude/commands/ exclusion from
.markdownlint-cli2.yaml and .prettierignore — all Markdown should
be linted.
…eadings

Add .claude/commands/.markdownlint.yaml to disable MD041 (first-line
heading) for command files — they are prompts, not documents.
Remove the artificial # Title headings while keeping the structural
improvements (## sections, blank lines around lists, line wrapping).
Copilot AI review requested due to automatic review settings March 30, 2026 09:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds Phase 1 foundations for Claude Code CI in this repo by introducing reusable composite actions, reference .claude/commands prompt files, and associated documentation/linting updates.

Changes:

  • Added 3 composite actions: setup-node-pnpm, setup-terraform, and claude-invoke (SHA-pinned external actions).
  • Added 11 reference Claude Code command files under .claude/commands/ plus local markdownlint overrides for that directory.
  • Updated README.md, AGENTS.md, and yamllint config to document and support the new system.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Documents new composite actions and lists available Claude Code commands.
AGENTS.md Adds repo structure + usage docs for composite actions and command files.
.yamllint.yml Tweaks yamllint comment spacing rule for prettier compatibility.
.github/actions/setup-node-pnpm/action.yml Composite action to install pnpm, set up Node, and optionally install deps with caching.
.github/actions/setup-terraform/action.yml Composite action to install Terraform toolchain via mise.
.github/actions/claude-invoke/action.yml Composite wrapper around anthropics/claude-code-action with validation, command resolution, and standardized args/plugins.
.claude/commands/.markdownlint.yaml Disables MD041 for command prompt files and sets line length.
.claude/commands/code-review.md Reference command prompt for PR code review workflow.
.claude/commands/renovate-review.md Reference prompt for reviewing Renovate PRs.
.claude/commands/test-gen.md Reference prompt for identifying missing coverage and generating tests.
.claude/commands/security-review.md Reference prompt for security-focused PR review.
.claude/commands/docs-sync.md Reference prompt for documentation drift checks per PR.
.claude/commands/respond.md Minimal reference prompt for handling mentions/comments.
.claude/commands/triage.md Reference prompt for issue triage + labeling.
.claude/commands/release-notes.md Reference prompt for generating release notes from git history/releases.
.claude/commands/quality-audit.md Reference prompt for periodic code quality sweep.
.claude/commands/dependency-audit.md Reference prompt for dependency security/maintenance audit.
.claude/commands/docs-drift.md Reference prompt for broader documentation drift verification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Default to reading Node version from package.json instead of
hardcoding '24'. Callers can override with node-version for an
explicit version or node-version-file for a different source.

Migrate release-changesets.yml to use the composite action.
…ache-dependency-path

claude-invoke:
- Fail fast when command file is missing and no prompt fallback provided
- Validate command name against [a-zA-Z0-9_-]+ and max-turns as positive integer
- Collapse two Run Claude steps into one using resolved prompt output
- Fix trailing-space bug when command-args is empty
- Simplify claude_args output to plain echo (single-line value)
- Correct command description from "mutually exclusive" to precedence semantics

setup-node-pnpm:
- Add cache-dependency-path input (default "**/pnpm-lock.yaml") for monorepo support
- Validate install input is exactly "true" or "false"

docs:
- Remove stale node-version input from README release-changesets example
- Remove "Phase 1" references from AGENTS.md
- Update behaviour list and input table to reflect new validations

commands:
- Fix dependency-audit.md package manager detection via lockfile existence
- Normalize renovate-review.md $ARGUMENTS placement (inline on first line)
- Standardize security-review.md wording to "project conventions"
…D013

- Validate extra-tools input to prevent argument injection into claude_args
- Add openssl rand fallback to $RANDOM for self-hosted runner compatibility
- Promote command-file fallback log to ::warning:: annotation
- Promote diagnostic echo lines to ::debug:: level
- Add set -euo pipefail to setup-node-pnpm install step
- Remove redundant file-path comments and unnecessary inline comment
- Fix setup-terraform description to not overpromise specific tools
- Document @main self-reference exception for SHA-pinning convention
- Inline allowed-tools default in AGENTS.md input table
- Clarify README trigger column describes intended workflow events
- Disable MD013 (line-length) across all markdownlint configs
@benhigham
benhigham merged commit ea00c44 into main Mar 31, 2026
3 checks passed
@benhigham
benhigham deleted the feat/composite-actions-and-commands branch March 31, 2026 03: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.

Create setup-node-pnpm composite action

2 participants