Skip to content

fix(implementation): defer branch-name grammar to consumer convention#453

Merged
kyle-sexton merged 3 commits into
mainfrom
fix/403-branch-grammar-agnostic
Jul 19, 2026
Merged

fix(implementation): defer branch-name grammar to consumer convention#453
kyle-sexton merged 3 commits into
mainfrom
fix/403-branch-grammar-agnostic

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

The branch-name grammar <type>/<description> was presented as the form in the implementation plugin's implement skill, with no deferral to the consumer's branch-naming convention. Target environments using Jira-key branches (SW2-12345-desc, feature/SW2-12345) diverge, breaking agnosticism (extensibility seam 3 + the convention-resolution ladder: read the declared value before defaulting).

The fix mirrors the same file's commit-message convention treatment (SKILL.md, Step 2 commit discipline), which already defers to the consumer's CLAUDE.md / rules and frames Conventional Commits as "a common default".

Changes

  • skills/implement/SKILL.md (Step 1 prerequisite check): branch creation now defers to the consuming project's branch-naming convention (its CLAUDE.md / rules) and presents <type>/<description> as a common default rather than the required form. The /source-control:worktree pointer is unchanged.
  • skills/implement/context/gotchas.md (branch-check gotcha): the <type>/<description> example now reads as a common default following the project's convention, keeping the "takes 2 seconds" point.
  • skills/implement/evals/evals.json (eval branch-check-stops-on-default-branch): reframed as a grammar-agnostic acceptance guard. Note: the file did not literally contain <type>/<description> — the eval already accepted convention-deferring behavior — so the edit makes that acceptance explicit (expected_output no longer implies a bare git checkout -b as the mechanism; a new expectation asserts no specific grammar is mandated) rather than removing a hardcode that was not there.
  • Version: 0.7.00.7.1; matching ## [0.7.1] ### Fixed CHANGELOG entry.

Verification

  • npx markdownlint-cli2 on all changed .md — 0 issues.
  • jq -e . on evals.json — valid JSON; edits stay within schema-allowed fields.
  • jq -e .version on plugin.json"0.7.1".
  • No trailing whitespace / all final newlines present (editorconfig).

Closes #403

Related

🤖 Generated with Claude Code

The branch-name grammar `<type>/<description>` was presented as the mandated
form in the implement skill's Step 1 prerequisite check and its gotchas, with
no deferral to the consumer's branch-naming convention. Target environments
using Jira-key branches (e.g. `SW2-12345-desc`) diverged, breaking agnosticism.

Mirror the same file's commit-message convention treatment: defer to the
consuming project's CLAUDE.md / rules and present `<type>/<description>` as a
common default. The branch-check eval is reframed to accept any convention-
compliant branch name rather than asserting a single hardcoded grammar.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011V31qpAHP3jfs76B9d5Rfo
@claude

claude Bot commented Jul 19, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 40s —— View job


PR Review: fix(implementation): defer branch-name grammar to consumer convention

  • Gather context and read changed files
  • Review diff against origin/main
  • Assess alignment with CLAUDE.md / plugin design rules
  • Check evals.json changes for correctness
  • Provide final review summary

Summary

Clean, targeted fix. All five changed files are consistent with each other and with the plugin's stated design principles. No correctness issues found.


File-by-file findings

SKILL.md Step 1, line 56

The updated bullet now reads:

"stop and create one following the consuming project's branch-naming convention (check its CLAUDE.md / rules; <type>/<description> is a common default) — git checkout -b <branch>, or /source-control:worktree when that plugin is installed"

This is structurally identical to the commit-message convention treatment at line 86:

"Follow the consuming project's commit-message convention (check its CLAUDE.md / rules; Conventional Commits is a common default)"

The symmetry is exactly right. ✓

context/gotchas.md line 29

The em-dash sentence structure is slightly more complex than the old one-liner, but it's grammatically correct and the meaning is unambiguous. No issue. ✓

evals/evals.json eval #2

The new expectation is well-formed and directly testable:

"Does NOT mandate a specific branch-name grammar — treats `<type>/<description>` as one acceptable form, not the only correct one"

The expected_output addition ("It does not mandate a specific branch-name grammar.") is appropriately concise. The PR description accurately notes that the eval didn't previously hardcode <type>/<description> — the new expectation makes the grammar-agnostic acceptance explicit rather than implied. ✓

plugin.json / CHANGELOG.md

0.7.00.7.1 is the correct semver bump for a behavioral bug fix. The CHANGELOG entry is accurate and follows the existing Keep a Changelog format (no date on the version heading, consistent with prior entries like ## [0.7.0]). ✓


Coverage check

A repo-wide grep for checkout -b and <type>/<description> patterns in plugins/implementation/ confirms no other files contain un-fixed instances of the hardcoded grammar. The fix is complete. ✓


Alignment with CLAUDE.md design rules

Rule Assessment
Repo-agnostic — no hardcoded project-specific values Previously violated by mandating <type>/<description>; fixed ✓
Configurable without editing the plugin — read consumer's CLAUDE.md / rules before defaulting Now correctly deferred ✓
Versioned — explicit semver on plugin changes 0.7.1 bump present ✓

Verdict

Approve. The change is minimal, precise, and consistent across all touch points. No issues found.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bb8c61c692

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/implementation/skills/implement/SKILL.md Outdated
Step 1's branch-naming convention lookup checked only CLAUDE.md and
rules. A consuming repo declaring its branch grammar in AGENTS.md would
be missed before the <type>/<description> fallback. Match the adjacent
source-control convention resolution, which already reads AGENTS.md.
@claude

claude Bot commented Jul 19, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 31s —— View job


PR Review: fix(implementation): defer branch-name grammar to consumer convention

  • Gather context and read changed files
  • Review diff against origin/main (both commits)
  • Verify AGENTS.md fix in 9e197dc is complete and correct
  • Check consistency across all touch points
  • Final review summary

Summary

Two-commit fix. Both are clean, minimal, and correct. The second commit (9e197dc) directly addresses the Codex/inline-review finding and is well-motivated — plugins/source-control/skills/pull-request/SKILL.md:29 already enumerates AGENTS.md as a consumer-convention source, so the branch-naming lookup in this plugin was inconsistent by omission.


File-by-file findings

SKILL.md line 56

Final form after both commits:

"…stop and create one following the consuming project's branch-naming convention (check its CLAUDE.md / AGENTS.md / rules; <type>/<description> is a common default)…"

Resolution order is now CLAUDE.mdAGENTS.md → rules → default. This matches the source-control plugin's convention resolution at pull-request/SKILL.md:29. ✓

Minor note (non-blocking, pre-existing): The adjacent commit-message convention at SKILL.md line 86 still reads CLAUDE.md / rules without AGENTS.md. The asymmetry is small and out of scope for this PR, but worth a follow-up. Fix this →

context/gotchas.md line 29

The gotcha is a compact user-facing tip that explicitly references Step 1 as the authoritative gate. It doesn't need to enumerate the full resolution stack — it already says "following the project's branch-naming convention" and the reader is directed back to the step that specifies where to look. ✓

evals/evals.json eval #2

expected_output and the new fourth expectation are consistent with each other and with the updated SKILL.md. The expectation correctly tests for grammar-agnosticism as an observable behavior rather than as a source-lookup detail — a good boundary for an eval. ✓

CHANGELOG.md

The 0.7.1 entry was correctly updated in 9e197dc to mention AGENTS.md. Both sentences of the entry are accurate and match all changed behavior. ✓

plugin.json

0.7.00.7.1 is the right semver bump for a behavioral fix with no API surface change. ✓


Codex finding resolution

Finding Status
Include AGENTS.md in branch-convention lookup (SKILL.md:56) Fixed in 9e197dc — lookup now reads CLAUDE.md / AGENTS.md / rules; CHANGELOG updated to match ✓

Alignment with CLAUDE.md design rules

Rule Assessment
Repo-agnostic — no hardcoded project-specific values Violation (mandated grammar) corrected ✓
Configurable without editing — read consumer's CLAUDE.md / AGENTS.md / rules before defaulting Now correctly deferred ✓
Versioned — explicit semver on plugin changes 0.7.1 bump present ✓

Verdict

Approve. Both commits are minimal, precise, and internally consistent. The AGENTS.md addition in 9e197dc correctly addresses the only review finding and aligns with the source-control plugin's existing convention-resolution pattern.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e197dce2c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/implementation/skills/implement/evals/evals.json Outdated
…ention

Eval #2 expectation #4 framed <type>/<description> as unconditionally
acceptable; align it with Step 1 (SKILL.md:56), which treats that form as
the fallback default only when the consumer declares no branch convention.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 19, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 23s —— View job


PR Review: fix(implementation): defer branch-name grammar to consumer convention

  • Gather context and read changed files
  • Review diff against origin/main (all 3 commits)
  • Verify eval fix in 7cc5c9a addresses the Codex finding
  • Check consistency across all touch points
  • Final review summary

Summary

Three-commit arc is clean and complete. Every Codex finding has been addressed; all five changed files are internally consistent.


Commit-by-commit findings

bb8c61c — Core fix

SKILL.md:56, gotchas.md:29, evals.json eval #2, plugin.json 0.7.1, CHANGELOG entry. The deferral to consumer convention is correct; <type>/<description> is framed as a common default throughout. ✓

9e197dc — Add AGENTS.md to lookup

SKILL.md:56 now reads CLAUDE.md / AGENTS.md / rules, matching plugins/source-control/skills/pull-request/SKILL.md:29. CHANGELOG updated to mention AGENTS.md. ✓

7cc5c9a — Strengthen eval expectation (Codex P2)

This commit directly resolves the Codex finding about the unconditional framing. The final eval state:

"Does NOT mandate a specific branch-name grammar — defers to the consuming project's declared branch-naming convention, treating `<type>/<description>` only as the fallback default when no convention is declared"

The key change is conditional: <type>/<description> is now explicitly the fallback when no convention is declared, not "one acceptable form" generally. This correctly matches SKILL.md:56 and prevents an eval pass from rewarding an implementation that offers a non-compliant branch to a repo with a declared grammar like PROJ-123-description. ✓


File-by-file assessment

File Assessment
SKILL.md:56 Resolution order: CLAUDE.mdAGENTS.md → rules → <type>/<description> default. Matches source-control plugin. ✓
context/gotchas.md:29 User-facing tip correctly defers convention lookup to Step 1 rather than re-enumerating the full stack. ✓
evals/evals.json:27 Expectation #4 is now conditional and directly testable. Codex P2 finding resolved. ✓
CHANGELOG.md Accurate, matches all behavior changes incl. AGENTS.md. Keep a Changelog format preserved. ✓
plugin.json 0.7.1 is the correct semver bump for a behavioral fix with no API surface change. ✓

Non-blocking follow-up (pre-existing, out of scope)

SKILL.md:86 (commit-message convention) still reads CLAUDE.md / rules without AGENTS.md, creating a small asymmetry with the branch-convention lookup on line 56 which now includes it. Not a blocker for this PR. Fix this →


Alignment with CLAUDE.md design rules

Rule Assessment
Repo-agnostic — no hardcoded project-specific values Violation (mandated grammar) corrected ✓
Configurable without editing — read consumer's CLAUDE.md / AGENTS.md / rules before defaulting Now correctly deferred across all touch points ✓
Versioned — explicit semver on plugin changes 0.7.1 bump present ✓

Verdict

Approve. All Codex findings addressed across all three commits. The fix is minimal, precise, and consistent across SKILL.md, gotchas.md, evals.json, CHANGELOG.md, and plugin.json.

@kyle-sexton

Copy link
Copy Markdown
Contributor Author
# Finding Classification Evidence
1 Commit-message convention lookup at SKILL.md:86 still reads CLAUDE.md / rules without AGENTS.md, asymmetric with the branch lookup at line 56 VALID (defer) Genuine inconsistency, but out of scope for this branch-grammar PR (different convention — commit-message, not branch naming). Tracked as a follow-up; addressing it here would expand scope beyond the review finding this PR targets.

@kyle-sexton
kyle-sexton merged commit 7f94cee into main Jul 19, 2026
15 checks passed
@kyle-sexton
kyle-sexton deleted the fix/403-branch-grammar-agnostic branch July 19, 2026 16:20
kyle-sexton added a commit that referenced this pull request Jul 20, 2026
…ls (#531) (#609)

## Summary

Skills declared ecosystem/forge/tracker-agnostic ship bare hardcoded
stack/forge/branch/tracker defaults because agnosticism was asserted in
prose and
never enforced mechanically — the dominant review-churn class, re-caught
by the
external reviewer PR after PR (branch/remote hardcodes, seam-conditional
eval,
.NET-flavored examples). This adds a fail-closed CI lane that
mechanically detects
that coupling instead of paying for it at review time again and again.

Detection only — this PR builds the gate. Fixing the existing violations
stays
with the member issues below.

## Fix

A new `portability-lint` lane (`.github/workflows/ci.yml`) wired into
the required
`ci-status` aggregate, plus a repo-local detector:

- **`scripts/check-skill-portability.sh`** — scans skill files for
coupling tokens.
On a PR it scans only the skill files the change **touches** (mirroring
the
`skill-quality-gate` changed-diff pattern), so enabling a token class
prevents
**new** coupling without red-lining pre-existing violations — main's
push event
scans nothing (self-test is the push path), and existing hits wait for
their
  owning follow-up fix or the file's next edit.
- **`scripts/skill-portability-tokens.txt`** — the token list as
external,
extensible **data** (not logic buried in bash), so a reviewer re-catch
is a
one-line data edit. Seeded with **one active class** — the
branch/default-branch
hardcode (`origin/main` / `origin/master`) — per the ratified
one-token-class-at-
a-time rollout; further classes (`dotnet`/`Clean Arch`,
`raw.githubusercontent`,
bare `gh` tracker calls) are staged as commented entries with
enable-triggers.
- **Never-skip shape**: the job is unconditional; only the PR-diff step
is
event-gated, and a self-test step runs first so a broken detector can
never mask
  a real violation behind a green gate.

**Design decisions** (resolved per the ratified plan, not invented):

- *How a skill declares agnosticism scope* — **no new frontmatter
field**. A skill
is agnostic by default (the Design boundary already binds every plugin),
so the
gated set is the files a change touches. A hit is excused three ways,
all
reviewer-visible comments (reusing the silent-skip gate's
annotated-exemption
shape): an auto-recognized detection-first / presence-gated use; a
per-site
`portability-ok: <reason>`; or a whole-file `portability-scope:
<reason>`
declaring an inherent narrower boundary (the
forge-locked-under-a-neutral-name
case). This distinguishes **guarded** refs (fine) from **bare** ones, as
the
  guarded-forward-ref disposition requires.
- `docs/PLUGIN-PHILOSOPHY.md` gains one doctrine sentence extending the
existing
  declared-narrower-boundary allowance from OS platform to the
  forge/ecosystem/tracker axis.

No `plugins/<name>/` directory is touched, so no version bump /
CHANGELOG entry is
needed (matching the CI-gate precedent).

## Verification

- **Self-test suite** (`scripts/check-skill-portability.test.sh`, runs
in CI):
`PASS=12 FAIL=0` — covers bare-token FAIL with file:line,
detection-ladder pass,
same-line and comment-block-above `portability-ok`, annotation non-leak
past
intervening code, whole-file `portability-scope`, staged tokens staying
inactive
under the shipped list, fail-closed exit 2 on missing token list /
invalid base
  ref, the vendor/evals/`*.test.sh` exclusion set, and empty scope.

- **Catches a real violation, passes a real legit use** (the
bare-vs-guarded
  discrimination that drives this class), on live corpus files:

  ```
$ scripts/check-skill-portability.sh --paths
plugins/work-items/skills/track/actions/start.md
COUPLING: plugins/work-items/skills/track/actions/start.md:61:
origin/(main|master) -> ... git checkout -b <type>/<N>-<slug>
origin/main ...
COUPLING: plugins/work-items/skills/track/actions/start.md:65:
origin/(main|master) -> ... git checkout -b <type>/<N>-<slug>
origin/main ...
  (exit 1)

$ scripts/check-skill-portability.sh --paths
plugins/review/skills/fanout/SKILL.md
No unexcused coupling tokens in 1 skill file(s). # detection-first
origin/HEAD ladder → guarded
  (exit 0)
  ```

- **Calibrated against the full corpus** (`--all`): the active branch
class flags
exactly 3 genuine bare hardcodes in 2 files (owned by member issues;
changed-file
scoping keeps them off main) and correctly passes the detection-ladder
uses in
  `review/*` and excludes evals/test fixtures.

- **Changed-file CI path proven** against a real base ref (16 changed
skills gated,
all clean). Local checks green: `shellcheck` (repo `.shellcheckrc`),
`shfmt`,
  `actionlint`, comment-residue detector (T1=T2=T3=0), `typos`.

Closes #620

Part of #531 (umbrella stays open — stages remain; child #620 carries
this PR's shipped scope per the #603 pattern).

## Related

- Member coupling instances (this is prevention; it does not block
them): #404
#405 #406 #408 #410 #412 #415 #416 #418 #421 #422 #423 #428 #429 #432
#438 #439
  #441 #442
- #445 — sibling CI-gate backlog (mechanical conformance only;
explicitly not
  coupling)
- #412 — guarded-forward-ref disposition the gate honors (guarded ≠
bare)
- #441 — declared narrower-scope exemption the `portability-scope`
mechanism serves
- #467 — the branch/remote review-churn the seed active class targets
- #453 — seam-conditional eval re-catch of this class
- #491 #492 — .NET-flavored-example hand-fixes a future staged class
would obviate
- #611 — post-green review finding (annotation-carry pending_annot
doesn't distinguish inline vs block HTML comments), deferred out of this
PR's scope

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01KyLj6oaFVTE6xFuoYCC2KC

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.

implementation: branch-name grammar <type>/<description> hardcoded with no consumer-convention deferral

1 participant