Skip to content

docs: add agent workflow rules and verification gate documentation - #202

Merged
Sinity merged 1 commit into
masterfrom
feature/docs/workflow-governance
Apr 16, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/docs/workflow-governance

Conversation

@Sinity

@Sinity Sinity commented Apr 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Codify the workflow discipline rules learned in this session into
CLAUDE.md and CONTRIBUTING.md so they survive across sessions.

Problem

Agent workflow failures (unformatted code pushed, PR bodies missing
required sections, claims not matching code) kept recurring because
the rules existed only in conversation feedback, not in the project's
governance documents. Each new session starts without that context.

Solution

CLAUDE.md — new "Agent Workflow" section with rules that override
default agent behavior:

  • Issue-first for non-trivial work
  • devtools verify before any PR (not after CI fails)
  • PR body must fill all template sections (Summary, Problem, Solution,
    Verification)
  • Squash-merge subject rules (under 72 chars, conventional, accurate)
  • Claim verification: grep for duplicated logic before claiming
    alignment/unification
  • Issues and PRs are durable artifacts, write them standalone

CONTRIBUTING.md — updated to reflect the full lifecycle:

  • Workflow section: issue → branch → hooks → verify → PR → CI → merge
    (was just branch → push → merge)
  • Verification baseline: documents git hooks and devtools verify

Verification

devtools verify --quick    # format + lint + render-all --check

No code changes, only documentation.

Add an "Agent Workflow" section to CLAUDE.md codifying rules that
were previously only in memory/feedback:

- Issue-first for non-trivial work
- devtools verify before any PR
- PR body must fill all template sections
- Squash-merge subject must be accurate and conventional
- Claims in commit messages must be verified against the code
- Issues and PRs are durable artifacts, write them standalone

Update CONTRIBUTING.md:
- Workflow section now reflects the full issue→branch→verify→PR→merge
  lifecycle instead of the abbreviated 3-step version
- Verification baseline section documents git hooks (pre-commit,
  pre-push) and the devtools verify command

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Apr 16, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Added comprehensive AI agent workflow rules and verification requirements to CLAUDE.md, and updated CONTRIBUTING.md to mandate issue-first planning for non-trivial work, enforce local verification via devtools verify before PRs, and establish mandatory PR template sections with precise commit message formatting guidelines.

Changes

Cohort / File(s) Summary
Documentation & Workflow Guidelines
CLAUDE.md, CONTRIBUTING.md
Added "Agent Workflow" section with issue-first planning requirement for non-trivial/multi-PR/architectural changes, mandatory pre-PR local verification via devtools verify (disallowing CI as first step), and PR discipline rules (mandatory template sections, squash-merge commit constraints, claim verification). Updated CONTRIBUTING.md workflow to require upfront issues, configure git hooks for ruff linting, and replace minimal baseline checks with full devtools verify verification pre-PR.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 With whiskers twitching, I declare with glee,
New workflows hop through, clear as can be!
Verify locally, let issues bloom first,
No CI surprises—commit quenches the thirst!
The rabbit's den organized, pristine, and bright! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding agent workflow rules and verification gate documentation to CLAUDE.md and CONTRIBUTING.md.
Description check ✅ Passed The description follows the template with all required sections (Summary, Problem, Solution, Verification) properly filled with clear, specific details about the changes and why they matter.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/docs/workflow-governance

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CLAUDE.md`:
- Around line 24-32: Rename the section header "Verification before push" to
"Verification before PR" in CLAUDE.md to match the content requiring the full
baseline before opening a pull request; update any corresponding references or
table-of-contents entries in the file that link to or mention that header
(search for the exact header text) so the title is consistent across the
document.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ca43c6af-d714-40c7-9e93-b7dc7ef41911

📥 Commits

Reviewing files that changed from the base of the PR and between 2335767 and 663d82d.

📒 Files selected for processing (2)
  • CLAUDE.md
  • CONTRIBUTING.md

Comment thread CLAUDE.md
Comment on lines +24 to +32
### Verification before push

Run `devtools verify` (full, with pytest) before creating any PR. The
git hooks enforce format and lint on commit and `devtools verify --quick`
on push, but the full baseline must pass before the PR is opened.

Do not treat CI as the first verification pass. Anticipate failures
locally.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Rename section title to match the rule timing.

Line 24 says “Verification before push,” but Lines 26-31 require the full baseline before creating a PR. Consider renaming to “Verification before PR” to avoid policy ambiguity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` around lines 24 - 32, Rename the section header "Verification
before push" to "Verification before PR" in CLAUDE.md to match the content
requiring the full baseline before opening a pull request; update any
corresponding references or table-of-contents entries in the file that link to
or mention that header (search for the exact header text) so the title is
consistent across the document.

@Sinity
Sinity merged commit d21e20e into master Apr 16, 2026
13 checks passed
@Sinity
Sinity deleted the feature/docs/workflow-governance branch April 16, 2026 21:29
Sinity added a commit that referenced this pull request Apr 22, 2026
)

## Summary

Codify the workflow discipline rules learned in this session into
CLAUDE.md and CONTRIBUTING.md so they survive across sessions.

## Problem

Agent workflow failures (unformatted code pushed, PR bodies missing
required sections, claims not matching code) kept recurring because
the rules existed only in conversation feedback, not in the project's
governance documents. Each new session starts without that context.

## Solution

**CLAUDE.md** — new "Agent Workflow" section with rules that override
default agent behavior:

- Issue-first for non-trivial work
- `devtools verify` before any PR (not after CI fails)
- PR body must fill all template sections (Summary, Problem, Solution,
  Verification)
- Squash-merge subject rules (under 72 chars, conventional, accurate)
- Claim verification: grep for duplicated logic before claiming
  alignment/unification
- Issues and PRs are durable artifacts, write them standalone

**CONTRIBUTING.md** — updated to reflect the full lifecycle:

- Workflow section: issue → branch → hooks → verify → PR → CI → merge
  (was just branch → push → merge)
- Verification baseline: documents git hooks and `devtools verify`

## Verification

```
devtools verify --quick    # format + lint + render-all --check
```

No code changes, only documentation.
Sinity added a commit that referenced this pull request Apr 22, 2026
)

Workflow failures — unformatted code pushed, PR bodies missing
required sections, claims not matching code — kept recurring because
the rules existed only in conversation feedback, not in the
project's governance documents. Each new agent session started
without that context.

Adds an "Agent Workflow" section to CLAUDE.md with rules that
override default agent behavior: issue-first for non-trivial work,
`devtools verify` before opening any PR (CI is not the first
verification pass), PR body template section requirements (Summary /
Problem / Solution / Verification), squash-merge subject rules
(under 72 chars, conventional prefix, accurate claims), claim
verification (grep for duplicated logic before claiming
alignment/unification), and the invariant that issues and PRs are
durable artifacts written to stand alone.

CONTRIBUTING.md updates to reflect the full lifecycle: issue →
branch → hooks → verify → PR → CI → merge (previously just branch →
push → merge). Documents the verification baseline including the
installed git hooks and `devtools verify`.

No code changes. Verification: `devtools verify --quick`.
Sinity added a commit that referenced this pull request Apr 22, 2026
)

Workflow failures — unformatted code pushed, PR bodies missing
required sections, claims not matching code — kept recurring because
the rules existed only in conversation feedback, not in the
project's governance documents. Each new agent session started
without that context.

Adds an "Agent Workflow" section to CLAUDE.md with rules that
override default agent behavior: issue-first for non-trivial work,
`devtools verify` before opening any PR (CI is not the first
verification pass), PR body template section requirements (Summary /
Problem / Solution / Verification), squash-merge subject rules
(under 72 chars, conventional prefix, accurate claims), claim
verification (grep for duplicated logic before claiming
alignment/unification), and the invariant that issues and PRs are
durable artifacts written to stand alone.

CONTRIBUTING.md updates to reflect the full lifecycle: issue →
branch → hooks → verify → PR → CI → merge (previously just branch →
push → merge). Documents the verification baseline including the
installed git hooks and `devtools verify`.

No code changes. Verification: `devtools verify --quick`.
Sinity added a commit that referenced this pull request Apr 22, 2026
)

Workflow failures — unformatted code pushed, PR bodies missing
required sections, claims not matching code — kept recurring because
the rules existed only in conversation feedback, not in the
project's governance documents. Each new agent session started
without that context.

Adds an "Agent Workflow" section to CLAUDE.md with rules that
override default agent behavior: issue-first for non-trivial work,
`devtools verify` before opening any PR (CI is not the first
verification pass), PR body template section requirements (Summary /
Problem / Solution / Verification), squash-merge subject rules
(under 72 chars, conventional prefix, accurate claims), claim
verification (grep for duplicated logic before claiming
alignment/unification), and the invariant that issues and PRs are
durable artifacts written to stand alone.

CONTRIBUTING.md updates to reflect the full lifecycle: issue →
branch → hooks → verify → PR → CI → merge (previously just branch →
push → merge). Documents the verification baseline including the
installed git hooks and `devtools verify`.

No code changes. Verification: `devtools verify --quick`.
@Sinity

Sinity commented Apr 28, 2026

Copy link
Copy Markdown
Owner Author

🤖 Post-hoc audit note: this PR received bot review feedback verified against current HEAD as part of #544. 1 finding(s) confirmed still present → tracked in #550.

@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

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

@Sinity
Sinity removed the request for review from Copilot May 1, 2026 01:05
@Sinity

Sinity commented May 1, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant