Skip to content

merge: development -> main - #22

Open
forkni wants to merge 4 commits into
mainfrom
development
Open

merge: development -> main#22
forkni wants to merge 4 commits into
mainfrom
development

Conversation

@forkni

@forkni forkni commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Changes

  • 89a1fd7 feat: add CGW_FREEFORM_MESSAGE_BRANCHES for upstream PR branch exemption
  • 2b7c18c docs(skill): correct check-ignore, hook, and reconfigure claims
  • 40bebc6 docs(skill): add gitignore-templates reference content
  • dbc0336 docs(skill): add gitignore-templates reference doc

Branch

development -> main

forkni added 4 commits August 24, 2026 11:54
Distill the cloned github/gitignore catalog (CC0-1.0, @57286c3) into a new
skill/references/gitignore-templates.md covering composition guidance,
pattern syntax/precedence, the negation trap, the four ignore layers, a
CGW baseline block, curated stack and OS/editor templates, debugging with
git check-ignore, and the already-tracked-file trap with the CGW-correct
fix. Wire it into SKILL.md's index and hygiene section, and add it to
verify_skill_commands.sh's DOCS array for drift protection.

@charliecreates charliecreates Bot left a comment

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.

Found two blocking repository-policy issues and one non-blocking tag-ref handling issue; see inline findings.

# project's own gate, e.g. its commit-msg hook) so the branch is not left
# with no message gate at all.
local _freeform=0
if cgw_branch_is_freeform "${current_branch}"; 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.

Freeform branches bypass the repository's mandatory message check | 🔴 blocking | § repository-guidance

The base-branch rules still require conventional prefixes in .charlie/instructions/code-style.md:29 and say commit_enhanced.sh enforces that format in .charlie/instructions/git-workflow.md:20; CONTEXT.md likewise defines the format as enforced on every invocation. With CGW_FREEFORM_MESSAGE_CHECK unset (the default), this branch match lets any configured branch—including * or a protected branch—create non-conventional commits. Keep the mandatory check for this repository (or first update the authoritative base-branch policy) rather than making it optional here.

Comment thread hooks/pre-push
_BRANCH="${REMOTE_REF#refs/heads/}"
[[ "${_BRANCH}" == "${REMOTE_REF}" ]] && _BRANCH="${LOCAL_REF#refs/heads/}"

if cgw_branch_is_freeform "${_BRANCH}"; 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.

Do not let an exempt branch hide commits from normal-branch validation | 🔴 blocking | § repository-guidance

After a non-conventional commit is pushed to an exempt branch such as up/x, it is reachable from origin/up/x. When that commit is later merged or fast-forwarded into development or main, COMMITS is built with git rev-list ... --not --remotes (lines 60–66), so the commit is omitted because it is already reachable from that remote-tracking ref; the non-freeform branch never calls cgw_validate_commit_message for it. This lets the branch-scoped exemption leak into ordinary branches and violates the base requirement that pushed commits use conventional messages. Track exemption provenance or otherwise revalidate such commits on non-freeform targets; apply the same fix in .githooks/pre-push.

Comment thread hooks/pre-push
# matches a branch glob in CGW_FREEFORM_MESSAGE_BRANCHES, so tag pushes
# are unaffected.
_BRANCH="${REMOTE_REF#refs/heads/}"
[[ "${_BRANCH}" == "${REMOTE_REF}" ]] && _BRANCH="${LOCAL_REF#refs/heads/}"

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.

Do not derive a tag push's exemption from the local branch | 🟠 non-blocking | § correctness

For a valid refspec such as git push origin up/x:refs/tags/v1, Git supplies LOCAL_REF=refs/heads/up/x and REMOTE_REF=refs/tags/v1. Because REMOTE_REF is not under refs/heads/, this fallback sets _BRANCH to up/x, which can match CGW_FREEFORM_MESSAGE_BRANCHES and skip conventional-message validation for the tag's commit range. That contradicts the comment immediately above claiming tag pushes are unaffected. Only use the remote ref when it is a refs/heads/* branch; do not fall back to a branch name for tag or other non-branch updates. Apply the same fix in .githooks/pre-push.

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.

1 participant