Skip to content

docs: add governance compliance and pre-commit validation guidance - #1509

Closed
ashleyshaw wants to merge 10 commits into
developfrom
chore/exclude-shells-scripts-from-eslint
Closed

docs: add governance compliance and pre-commit validation guidance#1509
ashleyshaw wants to merge 10 commits into
developfrom
chore/exclude-shells-scripts-from-eslint

Conversation

@ashleyshaw

Copy link
Copy Markdown
Member

Linked issues

Relates to #1489

Summary

Documents the AI governance compliance system and pre-commit validation requirements in AGENTS.md and CONTRIBUTING.md. Explains how governance hooks work, integration steps, and cost benefits.

Changes

  • AGENTS.md (+131 lines): New "AI Governance Compliance" section

    • Pre-commit validation details
    • Merge-time governance validation
    • ESLint shell script exclusion
    • Governance violation recovery procedures
    • Cost-benefit analysis
  • CONTRIBUTING.md (+25 lines): Pre-commit validation guidance for Claude Code users

    • What gets validated
    • How it works
    • Manual execution
    • Cost benefit

Documentation Sections

AGENTS.md Updates

  • Pre-Commit Validation hook details
  • Integration via Claude Code UserPromptSubmit
  • Merge-time governance validation
  • ESLint configuration rationale
  • Governance violation recovery
  • Cost-benefit analysis (60-70% token reduction)

CONTRIBUTING.md Updates

  • Pre-commit validation section in Branching & Development
  • Link to full governance docs in AGENTS.md

Related

Changelog

Changed


Checklist (Global DoD / PR)

ashleyshawand others added 3 commits August 4, 2026 16:23
Shell scripts in the hooks/ directory are not JavaScript and should not
be linted by ESLint. Add hooks/** to the ignore patterns so ESLint
doesn't attempt to process them.
This prevents linting failures on portable shell scripts like
hooks/pr-checklist-validator.sh and hooks/pr-merge-governance-validator.sh
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Document pre-commit and merge-time governance safeguards:
- Pre-commit validation hook (hooks/pr-checklist-validator.sh)
- Merge-time validation (hooks/pr-merge-governance-validator.sh)
- ESLint configuration for shell scripts
- Governance violation recovery procedures
- Cost-benefit analysis of pre-commit validation
Relates to #1489 (governance validation improvements)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Document the pre-commit validation hook for Claude Code users:
- Explains what gets validated (branch naming, template sections)
- How to run the hook manually
- Cost-benefit of pre-commit validation
- Link to full governance docs in AGENTS.md
Relates to #1489 (governance validation improvements)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitaiBot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ashleyshaw, you've reached your PR review limit, so we couldn't start this review.

Next review available in:39 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 1573cdce-dcda-4aa1-8c09-480d8bd14f55

📥 Commits

Reviewing files that changed from the base of the PR and between d3447e5 and 30b60f1.

📒 Files selected for processing (14)
  • AGENTS.md
  • CONTRIBUTING.md
  • docs/AGENT_CREATION.md
  • docs/AGENT_STANDARDS.md
  • docs/AI_REFERENCES_STANDARDS.md
  • docs/COOKBOOKS_STANDARDS.md
  • docs/HOOKS_STANDARDS.md
  • docs/HUSKY_PRECOMMITS.md
  • docs/INSTRUCTIONS_STANDARDS.md
  • docs/PLUGINS_STANDARDS.md
  • docs/PROMPTS_STANDARDS.md
  • docs/SKILLS_STANDARDS.md
  • docs/WORKFLOWS_STANDARDS.md
  • eslint.config.cjs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

Copy link
Copy Markdown
Contributor

📄 README Validation

✅ All README checks passed.

CheckResult
✅ FrontmatterPassed
✅ StructurePassed

@github-actionsgithub-actionsBot added status:needs-review Awaiting code review type:chore Chore / small hygiene change priority:normal Default priority area:documentation Docs & guides labels Aug 4, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⏱️ Aging and SLA annotation

  • Age: 0 day(s)
  • SLA state: Within SLA
  • Thresholds: warn at 7 days, breach at 14 days
  • Last updated: 2026-08-04T17:49:18.514Z

Maintained by project-meta-sync workflow.

@github-actionsgithub-actionsBot added lang:md Markdown content/docs type:documentation Documentation meta:needs-changelog Requires a changelog entry before merge labels Aug 4, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎨 Mermaid Diagram Validation

❌ One or more Mermaid diagram checks failed.

CheckResult
✅ SyntaxPassed
❌ AccessibilityFailed
✅ Colour ContrastPassed

@mergify

mergifyBot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #1509

CI Status:success
Files changed: 3
Risk Distribution: 0 critical, 0 high, 0 medium, 3 low

Recommendations

  • Ready to proceed pending human review

CopilotAI 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.

Pull request overview

This PR updates repository documentation to explain the AI governance compliance system (pre-commit-style validation and merge-time checks) and how contributors can run or integrate the validation hooks.

Changes:

  • Add an “AI Governance Compliance” section to AGENTS.md describing pre-push validation, merge-time governance, recovery steps, and cost/benefit.
  • Add CONTRIBUTING.md guidance for Claude Code users on running/configuring the checklist validator.
  • Update eslint.config.cjs to ignore hooks/** (note: this is a non-doc change and appears inconsistent with the PR’s stated “docs-only” scope).

Reviewed changes

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

FileDescription
AGENTS.mdAdds governance compliance documentation covering pre-push validation and merge-time checks.
CONTRIBUTING.mdAdds contributor-facing instructions for configuring/running the checklist validator.
eslint.config.cjsAdds hooks/** to ESLint ignore patterns (non-documentation change).
Suppressed comments (1)

CONTRIBUTING.md:95

  • These bullets still read as if the hook runs by default. Tweaking the wording to “once configured” makes the behaviour clearer and aligns with the note that .claude/settings.json is local.
 - Runs automatically via Claude Code's UserPromptSubmit hook
- Integration via `.claude/settings.json` (local, not committed)
- Provides real-time feedback before push

Comment threadAGENTS.md Outdated

### Pre-Commit Validation (Before Push)

The `hooks/pr-checklist-validator.sh` hook validates every commit attempt via Claude Code's UserPromptSubmit hook.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Updated AGENTS.md line 278 to clarify the validator is optional and must be manually configured via .claude/settings.json, not automatic.

🤖 Addressed by Claude Code

Comment threadCONTRIBUTING.md Outdated

**Pre-Commit Validation (Claude Code Users):**

If you're using Claude Code, the pre-commit validation hook will automatically check your branch name and PR template compliance:

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Updated CONTRIBUTING.md lines 84 and 93 to clarify the hook is optional and only runs if manually configured via .claude/settings.json.

🤖 Addressed by Claude Code

Comment threadeslint.config.cjs
"website/dist/**", // Migrated from .eslintignore
"website/node_modules/**", // Migrated from .eslintignore
"projects/active/**", // Project documentation and deliverables (excluded from linting)
"hooks/**", // Shell scripts and portable hooks (not JavaScript)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Removed the duplicate eslint.config.cjs change since it was already merged in PR #1495. This PR now contains only documentation updates as intended.

🤖 Addressed by Claude Code

ashleyshawand others added 7 commits August 4, 2026 23:44
Address Copilot review feedback:
- AGENTS.md line 278: Clarify UserPromptSubmit hook is optional, not automatic
- CONTRIBUTING.md lines 84 & 93: Emphasize hook requires manual configuration
- Remove duplicate eslint.config.cjs change (already merged in PR #1495)
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Use proper YAML frontmatter for flowchart config and indent accessibility attributes.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
GitHub's renderer requires inline accTitle/accDescr, not YAML frontmatter.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add missing accTitle and accDescr to Mermaid diagram in docs/WORKFLOWS_STANDARDS.md.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add accTitle and accDescr attributes to all Mermaid diagrams across
documentation standards files to improve accessibility and compliance
with diagram labeling best practices.
Fixed diagrams:
- AGENT_STANDARDS.md: 2 diagrams
- AI_REFERENCES_STANDARDS.md: 2 diagrams
- COOKBOOKS_STANDARDS.md: 2 diagrams
- INSTRUCTIONS_STANDARDS.md: 2 diagrams
- PLUGINS_STANDARDS.md: 2 diagrams
- SKILLS_STANDARDS.md: 2 diagrams
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Added missing accTitle and accDescr to 6 Mermaid diagrams
- Fixed malformed accDescr formatting (removed incorrect {} wrappers)
- Affected files: AGENT_CREATION.md, HOOKS_STANDARDS.md, HUSKY_PRECOMMITS.md, PROMPTS_STANDARDS.md
- All 12 docs files now have complete accessibility attributes on all diagrams
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Add accTitle and accDescr to three code examples (diagrams 3, 4, 5) in COOKBOOKS_STANDARDS.md.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
auto-merge was automatically disabled August 4, 2026 22:16

Pull request was closed

ashleyshaw added a commit that referenced this pull request Aug 4, 2026
Add missing accTitle and accDescr to all Mermaid diagrams across the
repository to fix validation checks. Scanned and fixed diagrams in:
- .github/ documentation and project files
- instructions/ folder
- vendor documentation in agents/
- Root-level README files and scripts
This unblocks PR #1509 governance validation PR.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
ashleyshaw added a commit that referenced this pull request Aug 4, 2026
* docs: add Mermaid accessibility attributes repository-wide
Add missing accTitle and accDescr to all Mermaid diagrams across the
repository to fix validation checks. Scanned and fixed diagrams in:
- .github/ documentation and project files
- instructions/ folder
- vendor documentation in agents/
- Root-level README files and scripts
This unblocks PR #1509 governance validation PR.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
* fix: correct Mermaid indentation in cookbook examples
Fix indentation of accTitle/accDescr to match diagram content indentation level.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:documentationDocs & guideslang:mdMarkdown content/docsmeta:needs-changelogRequires a changelog entry before mergepriority:normalDefault prioritystatus:needs-reviewAwaiting code reviewtype:choreChore / small hygiene changetype:documentationDocumentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ashleyshaw