Skip to content

docs(B-0191): add ZETA_EXPECTED_BRANCH rule file + CLAUDE.md pointer (AC3)#2239

Merged
AceHack merged 5 commits intomainfrom
feat/b0191-zeta-expected-branch-rule
May 9, 2026
Merged

docs(B-0191): add ZETA_EXPECTED_BRANCH rule file + CLAUDE.md pointer (AC3)#2239
AceHack merged 5 commits intomainfrom
feat/b0191-zeta-expected-branch-rule

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 9, 2026

Summary

Test plan

  • bun test tools/orchestrator-checks/verify-branch.test.ts → 4 pass, 0 fail
  • dotnet build -c Release → 0 Warning(s), 0 Error(s)
  • Rule file created at .claude/rules/zeta-expected-branch.md
  • CLAUDE.md has pointer bullet (grep: ZETA_EXPECTED_BRANCH)
  • Backlog row updated with pre-start checklist + status change

What remains after this PR

  • Per-harness wiring doc for Codex/Cursor (AC2 — currently documented in B-0191 body only)
  • Sub-rows for branch-name shell prompt snippet and worktree status check script (AC5)

🤖 Generated with Claude Code

…(AC3)

The core harness hook implementation (tools/orchestrator-checks/verify-branch.ts,
.claude/hooks/verify-branch-pretooluse.ts, settings.json wiring) landed in PRs
#1585/#1586/#2151. AC3 (CLAUDE.md/AGENTS.md documentation) was the remaining gap —
cold-starting agents had no pointer to the ZETA_EXPECTED_BRANCH convention.

This slice adds:
- .claude/rules/zeta-expected-branch.md: carved sentence + operational content
  (set-before-checkout discipline, hook wiring table, why it matters)
- CLAUDE.md pointer bullet: one-liner with the opt-in semantics and PR refs,
  discoverable at every session wake
- Backlog row: status open → in-progress, pre-start checklist appended per
  backlog-item-start-gate rule

Tests: 4/4 pass (bun test tools/orchestrator-checks/verify-branch.test.ts)
Build: 0 warnings 0 errors (dotnet build -c Release)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 9, 2026 08:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Documents the ZETA_EXPECTED_BRANCH convention by adding a dedicated .claude/rules/ rule file and a CLAUDE.md pointer, and updates the B-0191 backlog row to reflect the work being actively pursued.

Changes:

  • Add .claude/rules/zeta-expected-branch.md describing the ZETA_EXPECTED_BRANCH workflow and hook wiring.
  • Add a CLAUDE.md bullet pointing to the new rule for cold-start discoverability.
  • Update B-0191 backlog row metadata and append a pre-start checklist.

Reviewed changes

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

File Description
docs/backlog/P1/B-0191-orchestrator-branch-verify-mechanization-design-aaron-2026-05-04.md Updates row metadata and adds a pre-start checklist for AC3 documentation work.
CLAUDE.md Adds a pointer bullet to the new ZETA_EXPECTED_BRANCH rule.
.claude/rules/zeta-expected-branch.md Introduces a rule file documenting the expected-branch discipline and hook wiring.

Comment thread CLAUDE.md
Four list blocks in the pre-start checklist were missing the
required blank line between the bold-text label and the list
body, triggering MD032 (blanks-around-lists) in markdownlint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@AceHack AceHack enabled auto-merge (squash) May 9, 2026 08:09
…g-taxonomy

Two Copilot findings from PR #2239:

1. status: in-progress → status: open. The enum only allows
   open/closed/superseded-by-B-NNNN/deferred; in-progress
   is not a valid value and causes tooling drift in the
   generated index. Express in-progress state in the body.

2. Reconcile the CLAUDE.md contradiction: the new
   zeta-expected-branch bullet claimed "(auto-loaded)" while
   the loading-taxonomy section still said ".claude/rules/
   auto-load is unverified — canary test pending". Both
   claims were in the same document. Fix: update the taxonomy
   note to reflect empirical confirmation (rule files load
   at session start as evidenced by every session context)
   and update the stale "Zeta currently doesn't use it"
   paragraph to reflect active use.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 9, 2026 08:11
- backlog row: revert status to 'open' (in-progress is not a valid
  status enum per tools/backlog/README.md; valid values are open /
  closed / superseded-by-B-NNNN / deferred)
- CLAUDE.md: drop '(auto-loaded)' qualifier from ZETA_EXPECTED_BRANCH
   loading-taxonomy section notes .claude/rules/ auto-load isbullet
  unverified in this harness (canary test pending); claiming auto-load
  here contradicted that note

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

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: 19470f7af3

ℹ️ 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".

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread CLAUDE.md
- keep backlog status wording consistent with supported enum
- remove stale rules auto-load unverified sentence after canary confirmation
- regenerate docs/BACKLOG.md

Co-Authored-By: Codex <noreply@openai.com>
@AceHack AceHack merged commit 0994068 into main May 9, 2026
23 checks passed
@AceHack AceHack deleted the feat/b0191-zeta-expected-branch-rule branch May 9, 2026 08:19
AceHack added a commit that referenced this pull request May 9, 2026
All primary acceptance criteria are now met:
- AC1: tools/orchestrator-checks/verify-branch.ts (PR #1585)
- AC2: .claude/settings.json hook wiring (PR #2151)
- AC3: .claude/rules/zeta-expected-branch.md + CLAUDE.md pointer (PR #2239)
- AC4: unit tests in verify-branch.test.ts
- AC5: tools/orchestrator-checks/check-orchestrator-state.ts (this PR)

The state-check script (Rule 0: TS not bash) emits structured JSON with
currentBranch, expectedBranch, branchMatch, dirtyFiles, worktrees, and
driftedWorktrees — the last field flags the CWD-bleed-over hazard when
another worktree is on the same branch as ZETA_EXPECTED_BRANCH.

Tests: 12 pass / 0 fail across both orchestrator-checks files.
Build: 0 warnings / 0 errors.

Co-authored-by: Claude Sonnet 4.6 <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.

2 participants