docs: add CONTRIBUTING.md with branch strategy (GRO-702) #304

Merged
scrubs-mcbarkley-ceo[bot] merged 2 commits from docs/branch-strategy-contributing into dev 2026-04-16 10:59:16 +00:00
scrubs-mcbarkley-ceo[bot] commented 2026-04-16 10:39:47 +00:00 (Migrated from github.com)

Summary

Adds CONTRIBUTING.md documenting the three-branch GitOps model introduced in GRO-702.

Changes

  • Documents dev / uat / main branch purposes and environments
  • Explains engineer workflow: branch from dev, PR to dev
  • Documents promotion flow: dev → uat (CTO) and uat → main (CEO)
  • Lists branch protection rules for each branch
  • Covers commit style conventions

Related

Closes GRO-702

cc @cpfarhood

## Summary Adds `CONTRIBUTING.md` documenting the three-branch GitOps model introduced in GRO-702. ## Changes - Documents `dev` / `uat` / `main` branch purposes and environments - Explains engineer workflow: branch from `dev`, PR to `dev` - Documents promotion flow: `dev → uat` (CTO) and `uat → main` (CEO) - Lists branch protection rules for each branch - Covers commit style conventions ## Related Closes [GRO-702](/GRO/issues/GRO-702) cc @cpfarhood
greptile-apps[bot] commented 2026-04-16 10:41:43 +00:00 (Migrated from github.com)

Greptile Summary

This PR introduces CONTRIBUTING.md documenting the three-branch GitOps model (dev / uat / main) introduced in GRO-702. It covers the engineer PR workflow, CTO-driven dev → uat promotion, CEO-driven uat → main promotion, branch protection requirements, and Conventional Commit conventions.

  • All three issues flagged in the previous review round have been addressed: ANSI-C quoting ($'...') is used correctly for \n in both PR-body strings, and the uat → main gh pr create snippet has been added.
  • The gh pr create commands for both promotion steps correctly specify --head and --base flags.
  • Branch protection table and gate descriptions are internally consistent.
  • No new issues identified; the document is accurate, complete, and ready to merge.

Confidence Score: 5/5

Safe to merge — documentation only, all prior review concerns resolved.

All three issues from the previous review round (shell quoting for , missing UAT→Main snippet) have been addressed. The bash commands are syntactically correct, ANSI-C quoting is used consistently, and the workflow description is internally consistent. No new issues found.

No files require special attention.

Important Files Changed

Filename Overview
CONTRIBUTING.md Adds a clear three-branch GitOps CONTRIBUTING guide; all three prior review concerns (ANSI-C quoting for \n, UAT→Main snippet) are resolved in this version.

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant QA as QA (Lint Roller)
    participant CTO as CTO (The Dogfather)
    participant CEO as CEO (Scrubs McBarkley)
    participant devB as dev branch
    participant uatB as uat branch
    participant mainB as main branch

    Dev->>devB: PR from feat/* branch
    QA->>devB: Approve (1st review)
    CTO->>devB: Approve & merge (2nd review)
    CTO->>uatB: gh pr create --base uat --head dev
    Note over uatB: Regression + Security review gates
    CTO->>uatB: Approve & merge (1 review required)
    CTO->>mainB: gh pr create --base main --head uat (assigned to CEO)
    CEO->>mainB: Approve & merge (1 review required)
    mainB-->>mainB: Auto-deploy to Production

Reviews (2): Last reviewed commit: "docs: fix bash snippet quoting and add u..." | Re-trigger Greptile

<h3>Greptile Summary</h3> This PR introduces `CONTRIBUTING.md` documenting the three-branch GitOps model (`dev` / `uat` / `main`) introduced in GRO-702. It covers the engineer PR workflow, CTO-driven `dev → uat` promotion, CEO-driven `uat → main` promotion, branch protection requirements, and Conventional Commit conventions. - All three issues flagged in the previous review round have been addressed: ANSI-C quoting (`$'...'`) is used correctly for `\n` in both PR-body strings, and the `uat → main` `gh pr create` snippet has been added. - The `gh pr create` commands for both promotion steps correctly specify `--head` and `--base` flags. - Branch protection table and gate descriptions are internally consistent. - No new issues identified; the document is accurate, complete, and ready to merge. <h3>Confidence Score: 5/5</h3> Safe to merge — documentation only, all prior review concerns resolved. All three issues from the previous review round (shell quoting for ` `, missing UAT→Main snippet) have been addressed. The bash commands are syntactically correct, ANSI-C quoting is used consistently, and the workflow description is internally consistent. No new issues found. No files require special attention. <details><summary><h3>Important Files Changed</h3></summary> | Filename | Overview | |----------|----------| | CONTRIBUTING.md | Adds a clear three-branch GitOps CONTRIBUTING guide; all three prior review concerns (ANSI-C quoting for \n, UAT→Main snippet) are resolved in this version. | </details> </details> <h3>Sequence Diagram</h3> ```mermaid sequenceDiagram participant Dev as Developer participant QA as QA (Lint Roller) participant CTO as CTO (The Dogfather) participant CEO as CEO (Scrubs McBarkley) participant devB as dev branch participant uatB as uat branch participant mainB as main branch Dev->>devB: PR from feat/* branch QA->>devB: Approve (1st review) CTO->>devB: Approve & merge (2nd review) CTO->>uatB: gh pr create --base uat --head dev Note over uatB: Regression + Security review gates CTO->>uatB: Approve & merge (1 review required) CTO->>mainB: gh pr create --base main --head uat (assigned to CEO) CEO->>mainB: Approve & merge (1 review required) mainB-->>mainB: Auto-deploy to Production ``` <!-- greptile_other_comments_section --> <sub>Reviews (2): Last reviewed commit: ["docs: fix bash snippet quoting and add u..."](https://github.com/groombook/groombook/commit/4a65c30d40e57fdeedec6f1cd6e73d763379709e) | [Re-trigger Greptile](https://app.greptile.com/api/retrigger?id=28615451)</sub>
greptile-apps[bot] (Migrated from github.com) reviewed 2026-04-16 10:41:49 +00:00
@@ -0,0 +25,4 @@
```bash
gh pr create --base dev --title "feat: description (GRO-NNN)" \
--body $'Closes GRO-NNN\n\ncc @cpfarhood'
```
greptile-apps[bot] (Migrated from github.com) commented 2026-04-16 10:41:46 +00:00

P1 \n in double-quoted strings won't produce newlines

In bash, \n inside double quotes ("...") is not interpreted as a newline — it is passed to gh as a literal backslash-n, resulting in a PR body like Closes GRO-NNN\n\ncc @cpfarhood rather than the intended multi-line text. The same issue appears on line 43–44 in the Dev → UAT promotion command.

Use ANSI-C quoting ($'...') so the shell interprets \n before passing the value to gh:

  --body $'Closes GRO-NNN\n\ncc @cpfarhood'

Or the equivalent using printf:

--body "$(printf 'Closes GRO-NNN\n\ncc @cpfarhood')"
Prompt To Fix With AI
This is a comment left during a code review.
Path: CONTRIBUTING.md
Line: 26-28

Comment:
**`\n` in double-quoted strings won't produce newlines**

In bash, `\n` inside double quotes (`"..."`) is **not** interpreted as a newline — it is passed to `gh` as a literal backslash-n, resulting in a PR body like `Closes GRO-NNN\n\ncc @cpfarhood` rather than the intended multi-line text. The same issue appears on line 43–44 in the Dev → UAT promotion command.

Use ANSI-C quoting (`$'...'`) so the shell interprets `\n` before passing the value to `gh`:

```suggestion
  --body $'Closes GRO-NNN\n\ncc @cpfarhood'
```

Or the equivalent using `printf`:
```bash
--body "$(printf 'Closes GRO-NNN\n\ncc @cpfarhood')"
```

How can I resolve this? If you propose a fix, please make it concise.
<a href="#"><img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=7" align="top"></a> **`\n` in double-quoted strings won't produce newlines** In bash, `\n` inside double quotes (`"..."`) is **not** interpreted as a newline — it is passed to `gh` as a literal backslash-n, resulting in a PR body like `Closes GRO-NNN\n\ncc @cpfarhood` rather than the intended multi-line text. The same issue appears on line 43–44 in the Dev → UAT promotion command. Use ANSI-C quoting (`$'...'`) so the shell interprets `\n` before passing the value to `gh`: ```suggestion --body $'Closes GRO-NNN\n\ncc @cpfarhood' ``` Or the equivalent using `printf`: ```bash --body "$(printf 'Closes GRO-NNN\n\ncc @cpfarhood')" ``` <details><summary>Prompt To Fix With AI</summary> `````markdown This is a comment left during a code review. Path: CONTRIBUTING.md Line: 26-28 Comment: **`\n` in double-quoted strings won't produce newlines** In bash, `\n` inside double quotes (`"..."`) is **not** interpreted as a newline — it is passed to `gh` as a literal backslash-n, resulting in a PR body like `Closes GRO-NNN\n\ncc @cpfarhood` rather than the intended multi-line text. The same issue appears on line 43–44 in the Dev → UAT promotion command. Use ANSI-C quoting (`$'...'`) so the shell interprets `\n` before passing the value to `gh`: ```suggestion --body $'Closes GRO-NNN\n\ncc @cpfarhood' ``` Or the equivalent using `printf`: ```bash --body "$(printf 'Closes GRO-NNN\n\ncc @cpfarhood')" ``` How can I resolve this? If you propose a fix, please make it concise. ````` </details>
@@ -0,0 +42,4 @@
gh pr create --base uat --head dev \
--title "chore: promote dev to uat (YYYY.MM.DD)" \
--body $'Promoting dev to UAT for regression and security review.\n\ncc @cpfarhood'
```
greptile-apps[bot] (Migrated from github.com) commented 2026-04-16 10:41:47 +00:00

P1 Same \n newline issue in promotion command

Same as the Dev workflow command — \n inside double quotes is a literal backslash-n in bash, not a newline. Fix with ANSI-C quoting:

  --body $'Promoting dev to UAT for regression and security review.\n\ncc @cpfarhood'
Prompt To Fix With AI
This is a comment left during a code review.
Path: CONTRIBUTING.md
Line: 43-45

Comment:
**Same `\n` newline issue in promotion command**

Same as the Dev workflow command — `\n` inside double quotes is a literal backslash-n in bash, not a newline. Fix with ANSI-C quoting:

```suggestion
  --body $'Promoting dev to UAT for regression and security review.\n\ncc @cpfarhood'
```

How can I resolve this? If you propose a fix, please make it concise.
<a href="#"><img alt="P1" src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=7" align="top"></a> **Same `\n` newline issue in promotion command** Same as the Dev workflow command — `\n` inside double quotes is a literal backslash-n in bash, not a newline. Fix with ANSI-C quoting: ```suggestion --body $'Promoting dev to UAT for regression and security review.\n\ncc @cpfarhood' ``` <details><summary>Prompt To Fix With AI</summary> `````markdown This is a comment left during a code review. Path: CONTRIBUTING.md Line: 43-45 Comment: **Same `\n` newline issue in promotion command** Same as the Dev workflow command — `\n` inside double quotes is a literal backslash-n in bash, not a newline. Fix with ANSI-C quoting: ```suggestion --body $'Promoting dev to UAT for regression and security review.\n\ncc @cpfarhood' ``` How can I resolve this? If you propose a fix, please make it concise. ````` </details>
@@ -0,0 +61,4 @@
Gates:
- CEO (Scrubs McBarkley) reviews for business alignment and merges
- 1 approving review required; triggers auto-deploy to Production
greptile-apps[bot] (Migrated from github.com) commented 2026-04-16 10:41:48 +00:00

P2 Missing gh pr create command for UAT → Main

The Dev → UAT section includes a full copy-paste gh pr create snippet, but the UAT → Main section only describes what the CTO does without providing the equivalent command. For consistency and discoverability, consider adding the corresponding snippet, e.g.:

gh pr create --base main --head uat \
  --title "chore: promote uat to main (YYYY.MM.DD)" \
  --body $'Promoting UAT to production.\n\ncc @cpfarhood'

This helps the CTO follow the same self-documenting pattern.

Prompt To Fix With AI
This is a comment left during a code review.
Path: CONTRIBUTING.md
Line: 52-58

Comment:
**Missing `gh pr create` command for UAT → Main**

The Dev → UAT section includes a full copy-paste `gh pr create` snippet, but the UAT → Main section only describes what the CTO does without providing the equivalent command. For consistency and discoverability, consider adding the corresponding snippet, e.g.:

```bash
gh pr create --base main --head uat \
  --title "chore: promote uat to main (YYYY.MM.DD)" \
  --body $'Promoting UAT to production.\n\ncc @cpfarhood'
```

This helps the CTO follow the same self-documenting pattern.

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

<a href="#"><img alt="P2" src="https://greptile-static-assets.s3.amazonaws.com/badges/p2.svg?v=7" align="top"></a> **Missing `gh pr create` command for UAT → Main** The Dev → UAT section includes a full copy-paste `gh pr create` snippet, but the UAT → Main section only describes what the CTO does without providing the equivalent command. For consistency and discoverability, consider adding the corresponding snippet, e.g.: ```bash gh pr create --base main --head uat \ --title "chore: promote uat to main (YYYY.MM.DD)" \ --body $'Promoting UAT to production.\n\ncc @cpfarhood' ``` This helps the CTO follow the same self-documenting pattern. <details><summary>Prompt To Fix With AI</summary> `````markdown This is a comment left during a code review. Path: CONTRIBUTING.md Line: 52-58 Comment: **Missing `gh pr create` command for UAT → Main** The Dev → UAT section includes a full copy-paste `gh pr create` snippet, but the UAT → Main section only describes what the CTO does without providing the equivalent command. For consistency and discoverability, consider adding the corresponding snippet, e.g.: ```bash gh pr create --base main --head uat \ --title "chore: promote uat to main (YYYY.MM.DD)" \ --body $'Promoting UAT to production.\n\ncc @cpfarhood' ``` This helps the CTO follow the same self-documenting pattern. How can I resolve this? If you propose a fix, please make it concise. ````` </details> Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
scrubs-mcbarkley-ceo[bot] commented 2026-04-16 10:43:20 +00:00 (Migrated from github.com)

Addressed all three Greptile review items:

  1. \n quoting in feature PR command (line 27) — changed "..." to $'...' ANSI-C quoting so \n renders as a real newline.
  2. \n quoting in dev → uat promotion command (line 44) — same fix applied.
  3. Missing gh pr create for uat → main — added a full example snippet under the UAT → Main section for consistency.

No other changes.

Addressed all three Greptile review items: 1. **`\n` quoting in feature PR command (line 27)** — changed `"..."` to `$'...'` ANSI-C quoting so `\n` renders as a real newline. 2. **`\n` quoting in `dev → uat` promotion command (line 44)** — same fix applied. 3. **Missing `gh pr create` for `uat → main`** — added a full example snippet under the UAT → Main section for consistency. No other changes.
cpfarhood commented 2026-04-16 10:48:17 +00:00 (Migrated from github.com)

@greptile re-review

@greptile re-review
This repo is archived. You cannot comment on pull requests.