Skip to content

abrb-dev/prime-workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prime Repo — Tri-Framework Synthesis

Surgical union of GSD (Get-Shit-Done), Superpowers, and GStack into a single "Zero-Slop" orchestration stack for Claude Code. Each framework contributes at multiple altitudes of rigor; the One-Writer-Per-File hook enforces exactly one authority per artifact class.

Why not just pick one

The three frameworks look like duplicates but each solves a different problem:

  • Superpowers constrains the process (TDD iron law, SDD per-task, spec review loop, visual brainstorming). Wins on execution velocity and per-task rigor.
  • GSD constrains the context (fresh orchestrator per phase, .planning/ durable state, <50% context budget). Wins on documentation quality and long-session continuity.
  • GStack constrains the perspective (CEO / eng / design / DX personas, browser-based QA, cross-AI second opinion). Wins on pre-implementation decision rigor and visual/functional QA.

Running any one alone leaves two altitudes weak. Running all three without discipline creates ownership chaos. Prime Repo resolves this by stacking altitudes, not tools — each framework appears multiple times at the altitudes it actually dominates, and the hook guarantees no two compete for the same artifact.

Altitude Map — who owns what, when

Every step of a feature's life maps to exactly one framework × altitude cell.

# Altitude Job Owner Skill / command
0 Scope Should we build this? GStack /office-hours
1 Design system Overall brand / typography / color GStack /design-consultation
2 Design iteration Per-feature UI variants GStack + SP /design-shotgun, brainstorming (visual companion)
3 Design materialize Approved mockup → HTML / CSS GStack /design-html
4 Multi-persona critique 4-angle review of rough spec GStack /autoplan/plan-ceo-review, /plan-eng-review, /plan-design-review, /plan-devex-review
5 Planning Atomic task breakdown, wave deps GSD /gsd-plan-phase
6 Plan-quality Goal-backward verification GSD gsd-plan-checker (internal to planner)
7 Second opinion Cross-AI blindspot check GStack /codex
8 Execution Worktree + TDD per task + Gate A/B SP (orchestrated by GSD) /gsd-execute-phaseusing-git-worktrees + subagent-driven-development + test-driven-development + requesting-code-review + receiving-code-review + verification-before-completion + systematic-debugging
9 Arch boundary Phase-level structural review GStack /review (Prime Repo — architectural only, not line-by-line)
10 Human UAT Does a human agree it works? GSD /gsd-verify-work
11 Web / UI QA Browser-based functional QA GStack /qa, /qa-only (invokes /browse)
12 Security Threat mitigation verification GSD + GStack /gsd-secure-phase (required), /cso (optional deep audit — currently disabled)
13 Ship Merge / PR SP /shipfinishing-a-development-branch
14 Docs reconcile README / ARCHITECTURE / CHANGELOG drift GStack /document-release
15 Learnings Capture decisions / lessons GSD /gsd-extract_learnings
16 Post-deploy Canary monitoring GStack /canary

Each altitude is single-owner; every framework appears multiple times. That is the "best of all three" synthesis.

The Tri-Framework Phase Loop

PHASE 0 — PROJECT INIT (run once)
  ALT 0:  /office-hours                       → .planning/discuss/OFFICE-HOURS.md
  ALT 1:  /design-consultation                → /DESIGN.md (if UI project)
  ALT 4:  /autoplan on the rough spec         → .planning/discuss/AUTOPLAN-REVIEW.md
  ALT 7:  /codex on OFFICE-HOURS artifact     → second-opinion report
  GSD:    /gsd-new-project --auto @.planning/discuss/OFFICE-HOURS.md
          → PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md

repeat for each phase N in ROADMAP.md:

  DISCUSS
    ALT 0:  /gsd-discuss-phase                → phase context
    ALT 2:  brainstorming (visual companion)  → .planning/discuss/mockups/ (if UI)
    ALT 2:  /design-shotgun                   → variant mockups (if UI)

  PLAN
    ALT 5:  /gsd-plan-phase                   → XML atomic plans, wave-tagged
    ALT 4:  /autoplan on PLAN.md              → CEO + design + eng + DX critique
    ALT 7:  /codex                            → cross-AI second opinion

  EXECUTE
    ALT 3:  /design-html (if UI approved)     → materialize mockup to HTML
    ALT 8:  /gsd-execute-phase  (orchestrator ONLY — never writes code)
              dispatches per wave:
                using-git-worktrees           → .worktrees/<branch>
                subagent-driven-development   → fresh subagent per task
                  test-driven-development     → RED → GREEN → REFACTOR
                  requesting-code-review      → Gate A (spec compliance)
                  receiving-code-review       → Gate B (code quality)
                systematic-debugging          → on test failures
                verification-before-completion → evidence gate
            orchestrator merges worktree back after wave

  VERIFY
    ALT 9:  /review                           → architectural boundary check
    ALT 10: /gsd-verify-work                  → human UAT
    ALT 11: /qa                               → browser-based functional QA
    ALT 12: /gsd-secure-phase                 → threat model verification

  SHIP
    ALT 13: /ship → finishing-a-development-branch
    ALT 14: /document-release                 → README / ARCHITECTURE / CHANGELOG
    ALT 16: /canary                           → post-deploy monitoring
    GSD:    /gsd-complete-milestone           → archive + tag

  CLOSE
    ALT 15: /gsd-extract_learnings            → capture decisions / lessons

Loop terminates when ROADMAP.md is exhausted.

Invariants — enforced by .claude/hooks/one-writer-per-file.sh

PreToolUse on Write | Edit | MultiEdit. Exit 2 blocks the tool call with DENIED: Superseded by GSD Orchestrator.

Target path Writable by
.planning/discuss/** GSD agents/commands + all GStack content skills + SP brainstorming
.planning/** (all other paths) GSD agents/commands only (invoker matches gsd-*)
/ARCHITECTURE.md, /DESIGN.md GStack content skills: office-hours, design-consultation, document-release, review
src/**, tests/**, .worktrees/** Superpowers skills (SDD subagents, code-reviewer, finisher)
everything else unrestricted

.planning/discuss/ carve-out rationale. GStack decision-zone artifacts live inside GSD's tree rather than at repo root, avoiding a parallel artifact tree. Office-hours spec, plan reviews, mockups, QA reports, codex outputs, brainstorming artifacts all write here. GSD ingesters (/gsd-new-project, /gsd-discuss-phase) consume these to produce canonical PROJECT.md, REQUIREMENTS.md, ROADMAP.md, and {N}-CONTEXT.md. The carve-out is narrow: STATE.md, ROADMAP.md, and all other non-discuss .planning/ paths remain strictly GSD-owned.

Hook test matrix. 18-case harness at .claude/hooks/one-writer-per-file.test.sh covers every ownership cell including worktree-escape traversal, GStack-cross-write attempts, and defense-in-depth cases where gsd-executor is blocked from writing code at the hook layer even if the <prime_repo_override> prompt is ignored. Run with ./.claude/hooks/one-writer-per-file.test.sh — expected 18 passed, 0 failed.

Repository layout

prime-workflow/
├── .claude/
│   ├── skills/              30 skills (11 Superpowers + 19 GStack)
│   ├── agents/              29 agents (28 GSD + 1 SP code-reviewer)
│   ├── commands/gsd/        40 GSD slash-commands (pruned from 79)
│   ├── get-shit-done/       GSD support (templates, workflows, references, bin, contexts)
│   ├── hooks/
│   │   ├── one-writer-per-file.sh    invariant enforcer
│   │   ├── one-writer-per-file.test.sh  18-case harness
│   │   └── <GSD hooks preserved>
│   └── settings.local.json  PreToolUse registration
├── .planning/               GSD-owned: PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md
│   └── discuss/             GStack decision-zone carve-out
├── ARCHITECTURE.md          GStack-owned skeleton (populated during Phase 0)
├── DESIGN.md                GStack-owned skeleton
├── LICENSES/                upstream licenses preserved
└── DISABLED/                audit trail (outside .claude auto-discovery)
    ├── gsd-ui-phase/          UI phase collision set (5 files)
    ├── gsd-code-review/       code-review collision set (4 files)
    ├── gsd-overcoverage/      39 commands pruned from GSD
    ├── superpowers-skills/    writing-plans, executing-plans, dispatching-parallel-agents
    └── gstack-unlisted/       peripheral GStack skills (benchmark*, plan-tune, pair-agent, guard, freeze, careful, setup-*, etc.)

What's kept vs. disabled (audit trail in DISABLED/)

Superpowers — 3 skills disabled, 11 kept

Disabled: writing-plans, executing-plans, dispatching-parallel-agents. GStack /autoplan + GSD /gsd-plan-phase own planning; GSD wave map owns batching; SDD internalizes parallel dispatch.

GSD — 5 agents + 4 commands + 39 over-coverage commands disabled

  • UI phase (5 files): gsd-ui-auditor, gsd-ui-checker, gsd-ui-researcher, ui-phase, ui-review. Folds into GStack /design-consultation + /design-shotgun + /design-review.
  • Code review (4 files): gsd-code-reviewer, gsd-code-fixer, code-review, code-review-fix. Superpowers SDD two-stage review owns code review.
  • Over-coverage (39 commands): multi-workspace / telemetry / overlap commands moved to DISABLED/gsd-overcoverage/. Single-user single-repo doesn't need /gsd-workstreams, /gsd-forensics, /gsd-session-report, /gsd-debug (overlaps SP systematic-debugging), /gsd-fast, /gsd-quick, /gsd-autonomous (overlaps execute-phase), /gsd-sketch/spike (use throwaway branches), etc.

GStack — peripheral skills disabled, 19 kept

Kept: office-hours, design-consultation, document-release, review (modified), ship (aliased), plan-ceo-review, plan-eng-review, plan-design-review, plan-devex-review, autoplan, design-shotgun, design-html, design-review, browse, qa, qa-only, canary, codex, learn.

Disabled: benchmark, benchmark-models, plan-tune, pair-agent, connect-chrome, open-gstack-browser, guard, freeze, unfreeze, careful (hook layer already enforces), setup-*, context-save/ restore (duplicates GSD state), gstack-upgrade, retro, make-pdf, hosts, land-and-deploy, devex-review (until DX-surface project), investigate (overlaps SP systematic-debugging), cso (re-enable for security-critical projects).

Modifications applied to retained artifacts

  1. GStack preamble stripped from 17 skills. The original GStack skills carried a ~80-line bootstrap calling binaries under ~/.claude/skills/gstack/bin/ that were moved to DISABLED/. Replaced with a minimal Prime Repo preamble that echoes the environment markers downstream sections key off (EXPLAIN_LEVEL, QUESTION_TUNING, REPO_MODE, etc.). Saves ~180KB across skills; eliminates a silent-failure class of bug where preamble calls fail silently to /dev/null and fall back to wrong defaults.
  2. .claude/agents/gsd-executor.md — prepended <prime_repo_override> block forbidding code writes; re-scoped to dispatching SP subagents + merging worktrees.
  3. .claude/agents/gsd-planner.md — removed --reviews flag, <reviews_mode> block, and planner-reviews.md load step. Cross-AI code review loop eliminated (Superpowers SDD owns code review).
  4. .claude/skills/review/SKILL.md — rewritten to architectural boundary scope only. Emits findings to stdout; never writes files. Line-by-line code review forbidden.
  5. .claude/skills/ship/SKILL.md — rewritten as alias that invokes Superpowers finishing-a-development-branch.

GStack SKILL.md.tmpl files removed — Prime Repo is a permanent fork; bun run gen:skill-docs is no longer in scope.

Next step

Run /office-hours to begin Phase 0. STATE.md currently reads: Phase 0: Awaiting Office Hours.

Handoff schema for .planning/discuss/OFFICE-HOURS.md is at .claude/get-shit-done/references/OFFICE-HOURS.schema.md. Preflight check: ./.claude/hooks/preflight.sh.

About

Tri-framework synthesis of GSD + Superpowers + GStack as a single Claude Code orchestration stack, hook-enforced across 17 altitudes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages