Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ jobs:

# As above: an empty pattern would match every branch name and turn
# this job into a silent pass.
: "${BRANCH_PATTERN:=^(feature|bug|hotfix)-[1-9][0-9]*(-[a-z0-9]+)*$}"
# decisions/0022: a shape check, not an identifier check.
# Traceability moved to Validate Issue Link. Either
# <type>-<id> with an optional slug, which stays the
# recommended form, or <type>/<slug> over the
# decisions/0003 Conventional Commits types plus
# feature, bug and hotfix.
: "${BRANCH_PATTERN:=^((feature|bug|hotfix)-[1-9][0-9]*(-[a-z0-9]+)*|(feat|fix|perf|refactor|docs|test|build|ci|style|chore|revert|feature|bug|hotfix)/[a-z0-9]+(-[a-z0-9]+)*)$}"

if echo "$BRANCH" | grep -qE "$AUTOMATION_BRANCH_PATTERN" || \
{ [ "$REPOSITORY" = "z-shell/zi" ] && [ "$BRANCH" = "next" ]; }; then
Expand Down
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ When working in z-shell repositories, optimize for:
- **Commits and PR titles:** Conventional Commits. See `decisions/0003-conventional-commits.md`.
- **Commit trailers:** `Co-authored-by` crediting a real human, including the PR author crediting themselves, is fine. Never credit a bot, AI agent, or automation as a co-author. `z-shell/.github` and `z-shell/zi` enforce this in CI. Other repositories remain author-enforced until their own verified caller is live; do not infer enforcement from organization policy alone.
- **Branch selection:** Follow `decisions/0019-trunk-on-main-default.md` and verify the live state of the owning repository; `zi` is the named persistent-integration exception.
- **Issue traceability:** Per `decisions/0022-issue-traceability-on-pull-requests.md`, every pull request closes or references an issue, or carries the `meta:no-issue` label a maintainer applies. Branch names carry a type shape; the issue identifier in a branch name is recommended, not required.
- **Worktrees:** Treat `git worktree list --porcelain` as the authoritative inventory. Use the owning repository's declared helper and stable worktree root; do not create worktrees in `/tmp` or another ad hoc location. Do not use a linked superproject checkout for work that needs initialized submodules. Follow `runbooks/worktrees.md`.
- **Documentation placement:** keep long-form docs in the wiki when practical; keep repo-local docs focused on policy, workflow, and source-adjacent guidance.
- **Workflow files:** follow the org workflow conventions and keep permissions explicit, actions pinned, and concurrency defined.
Expand Down
5 changes: 5 additions & 0 deletions decisions/0019-trunk-on-main-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ The decision was re-evaluated in

Use trunk-based development on `main` as the organization default:

> **Amended by `decisions/0022-issue-traceability-on-pull-requests.md`.**
> The issue identifier below is no longer mandatory. Traceability is
> enforced on the pull request instead, and the branch check verifies a
> type shape. The identifier form remains valid and recommended.

- branch short-lived `feature-<id>`, `bug-<id>`, `hotfix-<id>`, and
dependency-update branches from current `main`;
- open pull requests into `main`;
Expand Down
11 changes: 10 additions & 1 deletion scripts/test-commit-lint-policy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,18 @@ check_branch_cases() {
assert_branch codex/learning-capture-publication allow
assert_branch next allow

# decisions/0022 relaxed this to a shape check, so a Conventional Commits
# type prefix now passes without an identifier.
assert_branch fix/labeler-audit-reject-malformed allow
assert_branch docs/adr-0022-rollout allow
assert_branch chore/tidy-workflows allow
assert_branch feature/no-identifier allow

# 'code' is not in the decisions/0003 type set, so it is still rejected.
assert_branch code/promotion-precondition-ancestry reject
assert_branch fix/labeler-audit-reject-malformed reject
assert_branch ss-o-govern-plugin-standard reject
assert_branch fix/Bad-Caps reject
assert_branch fix/ reject
assert_branch feature-0 reject
assert_branch feature- reject
assert_branch feature-505- reject
Expand Down
Loading