From 799dc2be6e0ee54a0edd8228909f8ebab63151cb Mon Sep 17 00:00:00 2001 From: Yann-Bilien Date: Mon, 23 Mar 2026 23:58:44 +0100 Subject: [PATCH] feat: ./setup --enforcement installs Rippletide for plan enforcement Adds an optional --enforcement flag to ./setup that runs npx rippletide-code@latest connect, wiring Rippletide's open source Claude Code hooks for plan decision enforcement. Without --enforcement, gstack works exactly as before, no change in behavior, no new dependency. --- README.md | 17 +++++++++++++++++ setup | 16 +++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 253d54252..c7fbc0933 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,23 @@ Open Claude Code and paste this. Claude does the rest. Real files get committed to your repo (not a submodule), so `git clone` just works. Everything lives inside `.claude/`. Nothing touches your PATH or runs in the background. +### Optional: enforce plan decisions + +gstack's plan skills (`/plan-eng-review`, `/plan-ceo-review`, `/plan-design-review`) produce real decisions, scope constraints, architecture choices, deferred items. By default those decisions live in the conversation and are gone when the session ends. Nothing stops the agent from drifting. + +Pass `--enforcement` to setup and gstack will install [Rippletide](https://www.rippletide.com/dev) (open source) automatically: + +```sh +./setup --enforcement +``` + +Rippletide adds enforcement via Claude Code hooks: + +- **Before the next plan session** — a `UserPromptSubmit` hook injects decisions from prior reviews before Claude produces any output, so each plan review builds on the last. +- **Before every file write** — a `PreToolUse` hook validates the change against those decisions and blocks violations before they land. + +Without `--enforcement`, gstack works exactly as before, no enforcement, no dependency. If you do run it, check `CLAUDE.md` afterward and preserve or re-add the `## gstack` section if it was overwritten. + ### Codex, Gemini CLI, or Cursor gstack works on any agent that supports the [SKILL.md standard](https://github.com/anthropics/claude-code). Skills live in `.agents/skills/` and are discovered automatically. diff --git a/setup b/setup index 4d7d29c01..6719239d6 100755 --- a/setup +++ b/setup @@ -26,6 +26,7 @@ while [ $# -gt 0 ]; do case "$1" in --host) [ -z "$2" ] && echo "Missing value for --host (expected claude, codex, kiro, or auto)" >&2 && exit 1; HOST="$2"; shift 2 ;; --host=*) HOST="${1#--host=}"; shift ;; + --enforcement) INSTALL_ENFORCEMENT=1; shift ;; *) shift ;; esac done @@ -37,6 +38,7 @@ esac # For auto: detect which agents are installed INSTALL_CLAUDE=0 +INSTALL_ENFORCEMENT=0 INSTALL_CODEX=0 INSTALL_KIRO=0 if [ "$HOST" = "auto" ]; then @@ -428,7 +430,19 @@ if [ "$INSTALL_CODEX" -eq 1 ]; then create_agents_sidecar "$SOURCE_GSTACK_DIR" fi -# 8. First-time welcome + legacy cleanup +# 8. Optional: install Rippletide for plan decision enforcement +if [ "$INSTALL_ENFORCEMENT" -eq 1 ]; then + echo "" + echo "Installing Rippletide enforcement..." + npx rippletide-code@latest connect + echo "" + echo "Rippletide connected. Plan decisions from /plan-eng-review, /plan-ceo-review," + echo "and /plan-design-review will now be enforced via Claude Code hooks." + echo "" + echo "Note: check CLAUDE.md and re-add the '## gstack' section if it was overwritten." +fi + +# 9. First-time welcome + legacy cleanup if [ ! -d "$HOME/.gstack" ]; then mkdir -p "$HOME/.gstack" echo " Welcome! Run /gstack-upgrade anytime to stay current."