diff --git a/README.md b/README.md index 253d5425..c7fbc093 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 bfae8785..97d2b334 100755 --- a/setup +++ b/setup @@ -27,6 +27,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 ;; --local) LOCAL_INSTALL=1; shift ;; *) shift ;; esac @@ -51,6 +52,7 @@ fi # For auto: detect which agents are installed INSTALL_CLAUDE=0 +INSTALL_ENFORCEMENT=0 INSTALL_CODEX=0 INSTALL_KIRO=0 if [ "$HOST" = "auto" ]; then @@ -447,7 +449,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."