From 198196f23159e73e1c40f3dc9798accc4d7e99c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Villase=C3=B1or=20Montfort?= <195970+montfort@users.noreply.github.com> Date: Thu, 2 Apr 2026 17:30:49 -0600 Subject: [PATCH] docs: add Git Operations rules to CLAUDE.md Add explicit branch workflow rules (no direct main commits, branch prefixes, conventional commits) so CLAUDE.md is self-sufficient for critical Git governance without requiring full DEVTRAIL.md read. Co-Authored-By: Claude Opus 4.6 (1M context) --- ...-001-add-git-operations-rules-claude-md.md | 66 +++++++++++++++++++ CLAUDE.md | 7 ++ 2 files changed, 73 insertions(+) create mode 100644 .devtrail/07-ai-audit/agent-logs/AILOG-2026-04-02-001-add-git-operations-rules-claude-md.md diff --git a/.devtrail/07-ai-audit/agent-logs/AILOG-2026-04-02-001-add-git-operations-rules-claude-md.md b/.devtrail/07-ai-audit/agent-logs/AILOG-2026-04-02-001-add-git-operations-rules-claude-md.md new file mode 100644 index 0000000..840bcdb --- /dev/null +++ b/.devtrail/07-ai-audit/agent-logs/AILOG-2026-04-02-001-add-git-operations-rules-claude-md.md @@ -0,0 +1,66 @@ +--- +id: AILOG-2026-04-02-001 +title: Add Git Operations rules to CLAUDE.md +status: accepted +created: 2026-04-02 +agent: claude-code-v1.0 +confidence: high +review_required: false +risk_level: low +eu_ai_act_risk: not_applicable +nist_genai_risks: [] +iso_42001_clause: [5] +lines_changed: 7 +files_modified: [CLAUDE.md] +observability_scope: none +tags: [governance, git-workflow, claude-md, configuration] +related: [] +--- + +# AILOG: Add Git Operations rules to CLAUDE.md + +## Summary + +Added a `### Git Operations` section to `CLAUDE.md` with the critical Git workflow rules: no direct commits to `main`, required branch prefixes, and conventional commit format. This makes `CLAUDE.md` self-sufficient for the most important operational rules without requiring agents to read `DEVTRAIL.md` in full. + +## Context + +The project was initialized with a complete DevTrail infrastructure including `DEVTRAIL.md` (section 5: Git Operations) and `.devtrail/00-governance/GIT-BRANCHING-STRATEGY.md`. However, `CLAUDE.md` — the primary instruction file for Claude Code — did not include Git workflow rules directly. Since `CLAUDE.md` is always loaded into context, embedding the critical rules there ensures they are always enforced. + +## Actions Performed + +1. Created branch `docs/initial-claude-md-git-rules` from `main` +2. Added `### Git Operations` section to `CLAUDE.md` between `### Prohibited` and `### Pre-commit Checklist` +3. Section includes: no-main rule, branch prefixes, conventional commits, and a reference to the full strategy document + +## Modified Files + +| File | Lines Changed (+/-) | Change Description | +|------|--------------------|--------------------| +| `CLAUDE.md` | +7/-0 | Added Git Operations section with branch workflow rules | + +## Decisions Made + +- Chose a compact summary format (4 lines + reference) over duplicating the full branching strategy. This keeps `CLAUDE.md` concise while ensuring the critical rules are always visible. + +## Impact + +- **Functionality**: N/A +- **Performance**: N/A +- **Security**: N/A +- **Privacy**: N/A +- **Environmental**: N/A + +## Verification + +- [x] CLAUDE.md format is correct and section placement is logical +- [x] Rules are consistent with DEVTRAIL.md section 5 and GIT-BRANCHING-STRATEGY.md +- [ ] Manual review performed + +## Additional Notes + +This is the first AILOG for the arborist-cli project, establishing the documentation trail from the earliest configuration phase. + +--- + + diff --git a/CLAUDE.md b/CLAUDE.md index e6ca09b..bc49b3f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,6 +20,13 @@ ### Prohibited - Never document credentials, tokens, API keys, or PII in document content +### Git Operations + +- **NEVER commit directly to `main`** — all changes go through branches + PRs +- Branch prefixes: `feature/`, `feat/`, `fix/`, `hotfix/`, `docs/`, `refactor/`, `test/` +- Use conventional commits: `feat:`, `fix:`, `docs:`, `refactor:`, `chore:`, `test:`, `perf:` +- Full strategy: `.devtrail/00-governance/GIT-BRANCHING-STRATEGY.md` + ### Pre-commit Checklist Before committing, check: