Skip to content
lythoskill-red-green-release logo

Red-Green Release Workflow

lythoskill-red-green-release

User-acceptance-driven release workflow using heredoc patch files. Each iteration produces a timestamped pr-<timestamp>-<desc>.sh that self-archives after execution. No tag without explicit user LGTM. Supports rollback via archived backups.

SKILL.md

Full skill instructions

Red-Green Release Workflow

No tag without LGTM. Every change is a self-archiving patch. Every state is rollback-able.

Typical Scenarios

This skill shines when the agent does not have direct filesystem or git access to the user's project. Typical setups:

  • Web chat + Repomix: User pastes a Repomix dump of their codebase into a web chat. The agent proposes changes as pr-*.sh heredoc patches. The user copies the patch locally and runs bash pr-*.sh.
  • Distributed / async review: Patches are posted in issues, emailed, or shared via web UI for a human to review and apply manually.
  • No git on target: Environments (e.g., bare-metal servers, deployed configs) where git revert is unavailable — .bak files provide rollback.

In these scenarios the agent cannot git commit, git diff, or write files directly. The heredoc patch is the only viable delivery format.

Core Principles

  1. User acceptance drives releases — "LGTM" / "对了" ("that's right") / "就是这样" ("exactly") → then and only then commit + tag.
  2. Atomic patches — Each iteration = one pr-<timestamp>-<desc>.sh with heredoc content replacement.
  3. Self-archiving — Patch copies itself to archived-patches/ and deletes itself after execution.
  4. Rollback-ready — Every patch backs up originals before modifying. Rollback = restore backup.

Workflow (4 Phases)

Phase 1 — Plan: Understand requirement, describe approach, user confirms design. Phase 2 — Create Patch (dry-run): Write pr-<timestamp>-<desc>.sh containing backup + heredoc replacement + self-archive logic. Show to user for review. User says "apply it" → proceed. Phase 3 — Apply & Test: Execute patch (bash pr-*.sh). Restart service. User tests. If issues → back to Phase 2 with a new patch. Iterate until green. Phase 4 — Accept & Tag: User says LGTM →

git add -A
git commit -m "<summary>"
git tag -a <tag> -m "<summary>"

Patch File Format

Naming

pr-<timestamp>-<description>.sh

Forbidden words in description: final, done, fix, ok. These words encourage skipping the red-green test cycle by implying pre-verified success.

Template

#!/​bin/​bash
# PR: <timestamp>-<description>
# 1. Create archive directory
mkdir -p archived-patches
# 2. Backup current files (for rollback)
cp src/​target.ts "archived-patches/​target.ts.$(date +%Y%m%d).bak"
# 3. Apply changes (declarative full-file replacement via heredoc)
cat > src/​target.ts << 'PATCH_EOF'
// Full replacement content here — exact file state after patch
PATCH_EOF
# 4. Self-archive: copy patch to archive, then delete from root
cp "$0" "archived-patches/​$(basename "$0")"
rm "$0"

⚠️ Heredoc delimiter (PATCH_EOF) must be quoted in the cat command to prevent variable expansion. See references/​archive-format.md for multi-file patches and escaping rules.

Supporting References

Read these only when the specific topic arises:

When you need to…Read
See complete heredoc syntax, multi-file patches, and escaping rulesreferences/​archive-format.md
Understand the 4-phase workflow in detailreferences/​phase-details.md
See conversation examples of red-green iterationsreferences/​conversation-examples.md

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
Imagica logo
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View