Files
org/skills/sdlc/SKILL.md
T
Flea Flicker 152c52f47c docs(skills): loosen uat→main merge gate; CTO Approve only for novel auth, infra/prod, and risk-flagged
The 2026-06-11 merge-whitelist fix (GRO-2348) added a required_approvals
gate on uat→main merges. That gate is only satisfied by a Gitea Approve
click — the issue-thread QA/UAT-deploy/UAT-regression/security
approvals do not clear it. As a result the CTO is the human-in-the-loop
on every routine release-train PR (GRO-2358, GRO-2359 both hit it).

This change introduces an explicit "uat→main merge-gate policy" in
coding-standards: once the four pre-gates (QA, UAT deploy, UAT
regression, security) are green, the engineer self-merges. A CTO
Gitea Approve click is required only for three categories:

  1. Novel auth / session paths (login, OIDC, OOBE, session
     middleware, token issuance, MFA, new auth provider integrations).
  2. Infra / prod-affecting merges (deploys, manifests, secrets,
     GitOps overlays, CI/CD, main branch protection, prod-affecting
     routing/ingress). All Phase 5 infra overlay PRs in
     groombook/infra still require CTO Gitea Approve without
     exception.
  3. Risk-flagged merges (risk:cto-approve label, or explicit
     CTO/CEO sign-off request in the PR or issue thread).

Phase 4 in sdlc is updated to reflect the new flow: engineer
classifies the PR; CTO Approve happens only for the three categories
above; otherwise the engineer merges once the four pre-gates are
green. The pre-gates themselves do not change.

Refs: GRO-2377
Triggers: GRO-2358, GRO-2359
Source rule: GRO-2348 (merge-whitelist fix)
2026-06-12 01:30:45 +00:00

5.8 KiB

name, description
name description
sdlc Software development lifecycle for GroomBook application repos. Covers Gitea authentication, the 3-branch dev/uat/main strategy, the SDLC pipeline phases 1-5, the Stage 1 CI image build, the authentication framework, and application-tool policy. For infrastructure (groombook/infra), see the devops skill.

Software Development Lifecycle

This skill governs application code repos. For infrastructure (groombook/infra), see the devops skill. For PR/test discipline and the cc @cpfarhood visibility rule, see coding-standards. For non-negotiable safety rules, see safety.

Gitea authentication

Use the GITEA_TOKEN environment variable for all Gitea operations. It is already set in the agent environment. Use the tea CLI for all Gitea/Git operations (e.g., tea issue list, tea pr create). The token expires when the environment variable is rotated — re-invoke any Gitea operation if you get a 401.

Gitea is the primary source of truth. Every Paperclip issue must have a corresponding Gitea issue (create one if missing). Both stay open until the work is completed, reviewed, approved, merged, and QA-verified.

Branch strategy

Three long-lived branches map to the three deployment environments:

Branch Environment Who merges Prerequisites for merge
dev Dev Engineer CI passes
uat UAT Engineer QA code review approval
main Production Engineer UAT validation, security review, and the coding-standards uat→main merge-gate policy

Engineers always target dev first — never uat or main directly.

  • Feature branches: <agent-name>/<short-description>.

Pull requests

All changes happen via pull request. Gitea branch protection requires CI checks to pass. See coding-standards for the no-self-merge contract and the cc @cpfarhood visibility rule.

tea pr create --base dev --title "..." --body "... cc @cpfarhood"

SDLC pipeline

Phase 1 — Dev

  1. Engineer branches from dev, writes code.
  2. Engineer opens a PR against dev.
  3. CI fail → back to Engineer.
  4. CI pass → Engineer merges PR.
  5. CI builds and deploys automatically to Dev (https://dev.groombook.dev).

Phase 2 — UAT promotion

  1. Engineer opens a PR from dev to uat.
  2. CI fail → back to Engineer (return to Phase 1).
  3. CI pass → QA performs code review.
  4. QA rejected → back to Engineer (return to Phase 1).
  5. QA approved → Engineer merges PR.
  6. CI builds and deploys automatically to UAT (https://uat.groombook.dev).

Phase 3 — User Testing & Security Review

  1. UAT (Shedward Scissorhands) runs full regression against UAT — every feature, old and new, no exceptions.
  2. UAT fail → back to Engineer (return to Phase 1).
  3. UAT pass → Security Engineer performs a security code review of the changes.
  4. Security fail → back to Engineer (return to Phase 1).
  5. Security pass → Begin Phase 4.

Phase 4 — Production Promotion

  1. Engineer opens a PR from uat to main.
  2. CI fail → back to Engineer (return to Phase 1).
  3. CI pass → Engineer classifies the PR against the coding-standards uat→main merge-gate policy:
    • In a category that requires CTO Gitea Approve (novel auth / session paths, infra / prod-affecting merges, risk:cto-approve label or explicit CTO/CEO sign-off request) → Engineer pings the CTO for a Gitea Approve click.
      • CTO rejected → back to Engineer (return to Phase 1).
      • CTO approved → continue to step 4.
    • Outside all three categories → no CTO click needed; jump to step 4 once the four pre-gates (QA, UAT deploy, UAT regression, security) are green.
  4. Engineer merges the PR.
  5. CI fail → back to Engineer (return to Phase 1).
  6. CI pass → Begin Phase 5.

Phase 5 — Production Deployment

The Engineer opens a PR against groombook/infra to update the relevant Kustomize overlay with the new image tag. From this point the work follows the devops skill pipeline end-to-end — review, merge, and Flux reconciliation are all owned there. On merge, Flux rolls out the updated pods to production (https://demo.groombook.dev).

Stage 1 CI — Image build

Triggered automatically on every merge to main in an application repo:

  • Builds and tags the Docker image: CalVer (YYYY.MM.DD[.N]), latest, and sha-<hash>
  • Pushes tagged images to git.farh.net/groombook/<service> (see coding-standards for the registry and CalVer policy)
  • Creates a CalVer git tag in the source repo

Stage 2 (Flux GitOps deployment) is owned by devops.

Authentication

  • Framework: Better-Auth.
  • OAuth Providers: GroomBook (Authentik), Google, and Apple.
  • SSO: Authentik OIDC at https://auth.farh.net (credentials in authentik-credentials secret).
  • Never build custom authentication.

Application tools (canonical, not alternatives)

These are application-level dependency choices. Alternatives are policy violations:

  • Database: CloudNativePG-managed Postgres — no SQLite, MariaDB, or MySQL.
  • Cache / pub-sub: DragonflyDB — no Redis.
  • Authentication: Better-Auth + Google + Apple + Authentik (see Authentication above).
  • Dependency updates: Mend Renovate. Dependabot is not used and will not be used. Do not configure it.
  • Browser automation: the playwright MCP server (http://playwright:8931/mcp). Target dev only — never test production.

For the container registry, CalVer versioning, and general PR/test discipline, see coding-standards. For the operator install side (CNPG, Dragonfly, Sealed Secrets), see devops.