From 75203e7196c538ceb8441a5a0fa1eea725841cba Mon Sep 17 00:00:00 2001 From: root Date: Wed, 29 Apr 2026 23:25:47 -0300 Subject: [PATCH] =?UTF-8?q?Document=20Gitea=E2=86=94GitHub=20dual-push=20s?= =?UTF-8?q?etup=20for=20agents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit origin's push URL list spans both remotes (Gitea authoritative, GitHub mirror), so a single `git push origin main` updates both. The setup lives in `.git/config` and isn't tracked, so we explicitly document the reproduction commands plus agent guidance: propose dual-push after commits, never force-push Gitea without OK, and the recovery pattern for divergence. Co-Authored-By: Claude Opus 4.7 (1M context) --- AGENTS.md | 26 ++++++++++++++++++++++++++ CLAUDE.md | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index f2c7ff4..0a72f20 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -157,6 +157,32 @@ If a task generates YAML without the corresponding readable output, the task is - **Readable outputs** — YAML is backing data, never the deliverable - **No hallucinated architecture** — NEVER add services/components/regions the user didn't mention. When remediating WA gaps, apply minimum targeted fixes to the existing architecture; don't replace it with a generic "ideal" one. ASK before adding new services. +## Git Remotes (Gitea = source of truth, GitHub = mirror) + +`origin` is configured with **one fetch URL (Gitea) and two push URLs (Gitea + GitHub)**, so a single `git push origin main` updates both. Gitea is authoritative; GitHub is a public mirror. + +``` +fetch → git.tech-lad.com.br/diegoecab/oci-deal-accelerator.git +push → git.tech-lad.com.br/diegoecab/oci-deal-accelerator.git +push → github.com/Diegoecab/oci-deal-accelerator.git +``` + +**Recreating this on a new clone** (the dual-push lives in `.git/config`, not tracked): + +```bash +git remote set-url --add --push origin https://github.com/Diegoecab/oci-deal-accelerator.git +git remote set-url --add --push origin https://git.tech-lad.com.br/diegoecab/oci-deal-accelerator.git +git remote -v # confirm one fetch + two push URLs +``` + +The first command substitutes the implicit Gitea push URL with GitHub's; the second re-adds Gitea so origin pushes to BOTH. Counter-intuitive but necessary. + +**Agent guidance**: +- After creating a commit on `main`, **always propose `git push origin main`** (not separate pushes per remote) — it covers both. Confirm with the user before pushing (pushing is shared-state). +- If a push fails on GitHub but succeeds on Gitea (or vice versa), the dual-push is partial. Re-run after fixing the failing one — Gitea's second push will be a no-op fast-forward. +- Never force-push Gitea unless explicitly asked; force-pushing GitHub is acceptable when needed because GitHub is downstream. +- If history diverges between Gitea and GitHub (e.g. after a rebase), the recovery pattern is: temporarily strip the GitHub URL (`git remote set-url --delete --push origin `), push Gitea fast-forward, add `github` as a standalone remote, force-push, then restore the dual-push. + ## Welcome Flow When the user starts a conversation without providing discovery notes or a specific request (e.g., a greeting or empty context), present the welcome message and capability menu defined in the skill's SKILL.md § Welcome Flow. Specifically: diff --git a/CLAUDE.md b/CLAUDE.md index fb3b58b..4a2ac24 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -159,6 +159,32 @@ python tools/refresh_arch_catalog.py --validate # validate catalog - **KB is the moat** — field experience, not documentation regurgitation - **ECAL-aligned** — Define → Design → Deliver with iterative checkpoints +## Git Remotes (Gitea = source of truth, GitHub = mirror) + +`origin` is configured with **one fetch URL (Gitea) and two push URLs (Gitea + GitHub)**, so a single `git push origin main` updates both. Gitea is authoritative; GitHub is a public mirror. + +``` +fetch → git.tech-lad.com.br/diegoecab/oci-deal-accelerator.git +push → git.tech-lad.com.br/diegoecab/oci-deal-accelerator.git +push → github.com/Diegoecab/oci-deal-accelerator.git +``` + +**Recreating this on a new clone** (the dual-push lives in `.git/config`, not tracked): + +```bash +git remote set-url --add --push origin https://github.com/Diegoecab/oci-deal-accelerator.git +git remote set-url --add --push origin https://git.tech-lad.com.br/diegoecab/oci-deal-accelerator.git +git remote -v # confirm one fetch + two push URLs +``` + +The first command substitutes the implicit Gitea push URL with GitHub's; the second re-adds Gitea so origin pushes to BOTH. Counter-intuitive but necessary. + +**Agent guidance**: +- After creating a commit on `main`, **always propose `git push origin main`** (not separate pushes per remote) — it covers both. Confirm with the user before pushing (pushing is shared-state). +- If a push fails on GitHub but succeeds on Gitea (or vice versa), the dual-push is partial. Re-run after fixing the failing one — Gitea's second push will be a no-op fast-forward. +- Never force-push Gitea unless explicitly asked; force-pushing GitHub is acceptable when needed because GitHub is downstream. +- If history diverges between Gitea and GitHub (e.g. after a rebase), the recovery pattern is: temporarily strip the GitHub URL (`git remote set-url --delete --push origin `), push Gitea fast-forward, add `github` as a standalone remote, force-push, then restore the dual-push. + ## Coding Guidelines ### 1. Think Before Coding