Skip to content

feat(workflow): 5-step default + Stop hook + planning-docs drift gate#23

Merged
shiniguchi merged 1 commit intomainfrom
docs/workflow-v2
Apr 30, 2026
Merged

feat(workflow): 5-step default + Stop hook + planning-docs drift gate#23
shiniguchi merged 1 commit intomainfrom
docs/workflow-v2

Conversation

@shiniguchi
Copy link
Copy Markdown
Owner

Summary

Port the workflow v2 pattern that shipped to AiLine (ailine-ai/shared-docs#62) — tailored for this repo's stack (SvelteKit + Cloudflare Pages + Supabase, solo-dev, single-repo).

Why

The 19-row workflow this repo had was adapted from AiLine's old 21-row sequence. Same root cause as AiLine: never adopted in practice. 14 phases shipped without following the documented chronology. Truth-in-documentation: replace with 5-step default that matches actual shipping pattern.

What changes

5-step default sequence (replaces 19 rows):
discuss → plan → execute → epic-end QA → ship.

Stop hook + Reach-for table (next-step-hint.js + reach-for.json):
On feature/phase-* branches, prints → Next: <command> after every turn. Detects current step from .planning/phases/<NN>-<slug>/ artifacts. Reach-for table tailored for this project's signals (RLS, cohort/LTV math, Cloudflare/SvelteKit/Supabase docs).

Planning-docs drift gate — three layers:

  1. Validator script — .claude/scripts/validate-planning-docs.sh compares ROADMAP [x] count, STATE.md frontmatter, and *-SUMMARY.md on disk
  2. Stop hook — calls validator on QA + SHIP steps, prints ⚠️ Planning docs drift warnings inline
  3. CI gate — .github/workflows/validate-planning.yml blocks PR merge when drift exists on PRs touching SUMMARY/ROADMAP/STATE

Small drift backfill — STATE.md total_plans 60→64, completed_plans 60→61 (matches disk).

Tailored for this repo (vs AiLine version)

  • Default deploy command: git push → CF Pages auto-deploy on main (not gh workflow run deploy_dev.yml)
  • No 9-repo sync caveats (single-repo)
  • Reach-for: RLS / cohort-LTV-math / Cloudflare-SvelteKit-Supabase signals
  • Stop hook entry added alongside existing localhost-qa-gate.js

Test plan

  • Validator clean on this branch (after backfill)
  • Stop hook silent on docs/workflow-v2 (correct — not a phase branch)
  • CI workflow fires on next PR touching SUMMARY/ROADMAP/STATE
  • First phase using new workflow validates the seam end-to-end

…+ drift gate

Retire the 19-row sequence (adapted from AiLine's old 21-row workflow,
same root cause: never adopted in practice — 14 phases shipped without
following the documented chronology). Replace with 5-step default that
matches actual practice + add the planning-docs drift gate with three
enforcement layers.

Tailored for this project:
- GSD as default planner, Superpowers as opt-in for KPI-math / typed
  SQL / refactor phases
- GStack opt-in via Reach-for table only
- Cloudflare Pages deploy mapping (CF Pages of main = DEV; branch
  deploys not enabled by default)
- Reach-for table includes RLS + cohort/LTV math signals
- Stop hook entry added alongside existing localhost-qa-gate

Files:
- docs/workflow.md: full rewrite (19-row → 5-step + Reach-for + drift gate)
- .claude/hooks/next-step-hint.js: ported from AiLine — silent on
  non-feature/phase-* branches, detects step from .planning/phases/
- .claude/reach-for.json: NEW, includes ramen-specific signals (RLS,
  cohort/LTV math, Cloudflare/SvelteKit/Supabase docs)
- .claude/scripts/validate-planning-docs.sh: ported from AiLine
- .github/workflows/validate-planning.yml: NEW CI gate, blocks PR
  merge on drift for PRs touching SUMMARY/ROADMAP/STATE
- .claude/settings.local.json: Stop hook entry for next-step-hint
  alongside existing localhost-qa-gate
- .claude/CLAUDE.md: workflow section rewritten to point to new
  5-step + planning-docs gate checklist
- .planning/STATE.md: small drift backfill — total_plans 60→64,
  completed_plans 60→61, matching disk

Smoke-tested:
  validator: ✅ planning docs in sync (after backfill)
  hook (on docs/workflow-v2): silent (correct — not a phase branch)
@shiniguchi shiniguchi merged commit 8cd03e9 into main Apr 30, 2026
3 of 4 checks passed
@shiniguchi shiniguchi deleted the docs/workflow-v2 branch April 30, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant