Why: ADR-0015 established that Microsoft APM (apm.yml + .apm/) should replace this repo's hand-authored plugin.json/marketplace.json model, with those files becoming compiled output of `apm pack` instead of files edited by hand via the (now-retired) plugin-author/marketplace-author skills. Issue #90 was the deferred execution of that decision, gated on #88 (apm tooling) and #89 (apm-native agent-author/skill-author routing). Implementation notes: - All six plugins (bin, core, git, gitea, kyberforge, lint) now carry apm.yml + .apm/{skills,agents,hooks} as their authoring source. Skills moved with a plain git mv (content-identical across targets). Agents were re-authored, not moved: per ADR-0016, .apm/agents/*.agent.md compiles verbatim to both Claude and Copilot, so plugin-scope agents now carry only name/description/model/source_keys -- no tools: field, no Claude-only knobs (isolation, maxTurns, effort, memory, permissionMode). - Root apm.yml registers all 7 marketplace packages (6 local plus mattpocock-skills as a remote entry) under versioning: per_package, matching this repo's existing independent-plugin-versioning practice. - .claude-plugin/marketplace.json and every plugin's plugin.json are now apm-pack-compiled output, verified against the prior hand-maintained content: same names/descriptions/versions/licenses/authors, only cosmetic serialization differences (JSON key order, owner email vs. url, Unicode escaping). - plugin-author and marketplace-author are retired now that apm-based authoring fully replaces their job; kyberforge bumped 1.3.1 -> 1.4.0 for that removal, and the root marketplace catalog bumped 0.3.1 -> 0.3.2 to match, per the version-bump convention now documented in apm-workflow's reference docs instead of a dedicated script (apm has no native version-bump automation). - Fixed hardcoded pre-.apm/ path assumptions across .pre-commit-config.yaml, .pre-commit-hooks.yaml, scripts/check-scope-walkup-sync.sh, scripts/sync-vale-styles.sh, scripts/check-vale-style-sync.sh, six plugins' root plugin.json (stale skills/hooks/agents pointer fields that check-manifests.sh validates), and several tests/*.bats and tests/*.sh fixtures -- including a bats REPO_ROOT relative-path depth bug (10 files, one extra .apm/ directory level to walk up) and a vale probe-path isolation regression introduced mid-fix. - Corrected empirically-wrong assumptions surfaced this session in apm-workflow/apm-install's own reference docs: `apm marketplace package add` does not accept local paths (only owner/repo remote shorthand -- local packages are registered by editing apm.yml's marketplace.packages[] directly); `apm compile` is a consumer-side AGENTS.md/CLAUDE.md generator, not the plugin.json producer, and hard-fails on skill/agent-only packages without --clean; `apm plugin init <name>` nests a stray subdirectory when run with a positional name arg from inside a same-named directory; no native Copilot marketplace output profile exists; .mcp.json is merged into the compiled plugin.json content-aware and target-scoped, with no dependencies.mcp entry needed for simple passthrough; pipx is the correct pip fallback on externally-managed Python environments. - Renamed agent-author's copilot.agent.md template asset to copilot.agent.md.template so apm compile's recursive *.agent.md glob stops misparsing the placeholder template as a real agent primitive. Impact: plugin.json and marketplace.json are compiled artifacts from here on -- editing them by hand is no longer the workflow; edit apm.yml/.apm/ and run apm pack. CONTEXT.md's Plugin/Plugin marketplace glossary entries reflect this. ADR-0001 is marked superseded, ADR-0006 moot, and ADR-0010 updated for the new .apm/agents/ path (project/user scope unaffected, per ADR-0016). Full local verification: claude plugin validate --strict on all 6 plugins, apm audit --ci, apm marketplace check, check-manifests.sh, and the full test suite (165/165 bats, 13/13 shell scripts) all pass clean. Fixes: #90 Refs: #88, #89 ADR: 0015 ADR: 0016 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ub96PyaSRD9BHPktotj1pC
8.5 KiB
8.5 KiB
name, description, metadata, allowed-tools
| name | description | metadata | allowed-tools | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| git-commits | Use when creating, amending, squashing, or cherry-picking commits. Generates well-formatted commit messages following Conventional Commits spec (type, scope, description, body, footers). Validates against commitlint config-conventional constraints (header max 100 chars, lowercase subject, no trailing periods, type must be one of 11 standard types). Communicates SemVer impact (MAJOR for breaking changes, MINOR for features, PATCH for fixes). Handles confirmation gates for history-altering operations (amend, rebase, squash). Provides interactive guidance for humans, structured JSON output for agents. Do not use for: inspecting git history, branch management, or repository state inspection — those are separate skills. |
|
Bash |
Gotchas
- Type must be one of 11 standard types —
feat,fix,perf,revert,docs,style,refactor,test,build,ci,chore. Non-standard types will fail commitlint validation. Note: the Conventional Commits spec itself only mandatesfeat/fix— the 11-type set is a commitlint/Angular convention this skill validates against, not a spec requirement. - Scope is optional but should be used — helps identify which part of the system changed. Examples:
api,db,cli,config. - Header max 100 characters — type + scope + colon + description must fit. If longer, move detail to body.
- BREAKING CHANGE notation — use
!before the colon (feat!: drop Node 6) for visibility ingit log --oneline. Footer notation (BREAKING CHANGE: ...) is machine-readable but hidden in log. - SemVer mapping is not optional — agents must communicate:
feat→ MINOR bump,fix/perf/revert→ PATCH, any with breaking change → MAJOR. - Confirmation gates are mandatory for destructive operations — amend, rebase, squash require explicit user/agent approval before execution.
- Never skip hooks with
--no-verify— hooks are the automated QA gate; bypassing them breaks the pipeline. Do not add this flag to any commit command unless the user explicitly demands it, and warn them if they do. - Never force-push
main/master— even after an amend or interactive rebase, refuse to force-push a protected branch (main,master) and explain why; force-push is only safe on branches no one else has based work on. - Command examples use the
rtk gitwrapper — this org's convention routes all git invocations throughrtk git <subcommand>instead of baregit <subcommand>. Follow this prefix in any command you actually run. - Never commit secrets, credentials, or environment-specific config — if staged changes contain what looks like an API key, token, password, or connection string, stop and flag it before committing rather than committing it.
- Commits must be atomic and leave the repo working — each commit should be one logical, independently reviewable and reversible change, and should leave the repository in a buildable/testable state. If staged changes bundle unrelated work, suggest splitting before committing.
- Commit messages explain why, not what — the diff already shows what changed; the message's job is to capture context the diff can't (motivation, root cause, tradeoffs). See
references/commit-template.mdfor the structure this maps to.
Workflow
For creating a new commit:
- Gather context — what changed and why? (from staged changes, PR description, issue context). Verify the staged diff is one logical, atomic change and that the repo would still build/test at this commit — if not, suggest splitting before proceeding.
- Check for secrets — scan the staged diff for anything that looks like a credential, API key, token, or environment-specific config. Stop and flag it rather than committing.
- Determine type — is this a feature (
feat), bug fix (fix), or other? Default: check the change itself. - Determine scope — which system/module? Use scope from plugin config if set, otherwise infer from files changed.
- Write description — imperative mood, no period. Neither source spec sets a length target below the 100-char header max, but convention favors keeping it to ~50 characters where possible for
git log --onelinereadability. Examples: "add user authentication", "fix race condition in cache". - Add body if needed — explain why (not what). Blank line before body, wrap at 100 chars. For non-trivial changes, follow the Why / Implementation Notes / Impact structure in
references/commit-template.md. - Add footers if needed —
Fixes: #123,Refs: #123,ADR: 0012,RFC: 0003,Design: <link>,Reviewed-by: Name,Co-authored-by: Name <email>,Signed-off-by: Name <email>,BREAKING CHANGE: description. Seereferences/commit-template.mdfor the full trailer list. - Validate — check header length, type correctness, no trailing periods, lowercase.
- Confirm and execute — for agents, require explicit approval; for humans, show preview and ask. Never add
--no-verifyto skip hooks.
For amending a commit:
- Stage new changes (or changes to undo)
- Run amend operation — executes
rtk git commit --amend [--no-edit]based on user intent - Offer message edit — if user wants to change commit message, show current message and prompt for new one
- Confirm before force-push — amending is only safe on non-shared branches; if the current branch is
main/master, refuse to force-push and explain why rather than warning and proceeding
For squashing commits (interactive rebase):
- Identify commits to squash — typically the last N commits on current branch
- Confirm operation — squashing rewrites history; get explicit approval
- Execute rebase —
rtk git rebase -i HEAD~N, mark older commits assquashorfixup - Handle merge conflicts — if rebase halts, offer conflict resolution options or abort; do not resolve automatically without confirmation
- Offer message composition — if squashing interactive, allow message editing
For squashing commits (autosquash — preferred when tagging at commit time):
Prefer this over manual interactive rebase when a commit is written to be folded into an earlier one, since it removes the manual "mark as squash/fixup" step and the risk of reordering the wrong line:
- Create the fixup/squash commit —
rtk git commit --fixup=<commit>(keeps target's message) orrtk git commit --squash=<commit>(lets you edit the combined message later). Both prefix the message withfixup!/squash!and target<commit>. - Confirm operation — rewriting history still requires explicit approval before the rebase runs.
- Execute —
rtk git rebase --autosquash HEAD~N(or-i --autosquashto review the plan first); git reorders and marks thefixup!/squash!commits against their targets automatically. - Handle merge conflicts — same as manual rebase: offer resolution or abort, never resolve automatically without confirmation.
For cherry-picking:
- Identify source commit(s) — hash or branch reference
- Confirm destination branch — cherry-pick will replay commits on current branch
- Execute cherry-pick —
rtk git cherry-pick <commit-hash> - Handle conflicts — offer conflict resolution or abort
- Report outcome — successful replays, conflicts, or rejected commits
Output format (for agent consumption)
Return structured JSON:
{
"operation": "create|amend|squash|cherry-pick",
"status": "success|conflict|rejected",
"message": "Commit message or error description",
"commit_hash": "abc1234",
"semver_impact": "MAJOR|MINOR|PATCH|none",
"breaking_change": true|false,
"confirmation_required": true|false,
"details": {
"type": "feat",
"scope": "api",
"description": "add user authentication",
"body": "optional body text",
"footers": ["Fixes: #123", "Refs: #456", "ADR: 0012", "Reviewed-by: Alice", "Co-authored-by: Bob <bob@example.com>", "Signed-off-by: Alice <alice@example.com>"]
}
}
For interactive human use, format as readable prose with clear prompts and previews.
Reference
If a footer or type/scope edge case isn't covered above, read references/conventional-commits-spec.md for the full specification.
For the Why / Implementation Notes / Impact body structure and the full trailer list, read references/commit-template.md.