From quangflow
Referenced by all `/qf:*` commands. Do NOT duplicate — link here instead.
npx claudepluginhub duongmquang/quangflowqf/_protocols/# Shared Protocols Referenced by all `/qf:*` commands. Do NOT duplicate — link here instead. --- ## Core Principles - **Systems > Prompts** — enforce correctness through scripts and structure, not just instructions - **Verification > Generation** — validate with real checks (scripts, tests) before trusting LLM output - **Iteration > Perfection** — ship, learn (GOTCHAs), improve next round - **No lazy fixes** — solve root cause, never patch symptoms to pass a gate ## Discipline Layer All phases are subject to the discipline protocols: - **`_hard-gates.md`** — master red flag table, evide...
Referenced by all /qf:* commands. Do NOT duplicate — link here instead.
All phases are subject to the discipline protocols:
_hard-gates.md — master red flag table, evidence spec, phase gate checklists_tdd-enforcement.md — RED-GREEN-REFACTOR cycle. Referenced by Phase 3 and dev agents._systematic-debugging.md — 4-phase root cause process. Referenced by Phase 5 and all agents on failure._verification-gates.md — evidence before assertions at every phase gate._structured-logging.md — log format standard. Referenced by Phase 3, Phase 4, Phase 5._context-memory.md — Feature Memory Units with @mention loading. Referenced by all phases.Walk up from CWD looking for ./plans/ directory. Check parent directories up to 3 levels. Use the directory containing ./plans/ as project root for all subsequent scans.
Each phase follows this pattern (replace {artifact} with the phase-specific check):
{project-root}/plans/ for feature directories containing the required artifact{target-artifact}{target-artifact}Target artifacts per phase:
CONTEXT.mdREQUIREMENTS.mdDESIGN.mdROADMAP.mdCERTIFICATION.md (or QA-REPORT.md for legacy milestones)When presenting the next command, always use this format:
**Next:** `/qf:{N}-{phase}` — {brief description}
↳ Skip? {what happens if skipped}
↳ Also available: `/qf:status save` (save context), `/qf:status` (re-check status)
Track progress in plans/{feature-slug}/milestone-{N}/PIPELINE-STATE.md:
# Pipeline State — {feature-slug} / Milestone {N}
Updated: {timestamp}
## Mode
pm_mode: {hands-on | autopilot}
hands_free: {true | false}
## Completed Stages
- [x] {stage} — completed {timestamp}
- [ ] {stage}
## Last Completed Stage
{stage-name}
## Resume Command
`/qf:{N}-{phase}`
Usage:
/qf:status for resume context/qf:1-brainstorm for hands-free resume/qf:cook --from for crash recoveryAll phases follow the same gate structure:
Gate keywords per phase:
APPROVE (requirements)CONFIRM (artifacts), then SHIP / REFINE (execution)SHIP (verification passed)FIX NOW / FIX LATER / DEFER / IGNORE (bug triage)All generated artifacts (REQUIREMENTS.md, CONTEXT.md, ROADMAP.md, etc.) MUST include quangflow_version in their metadata.
Current version: read from .claude/.quangflow-version file (written by installer).
When a phase reads an artifact, check quangflow_version:
Every phase MUST append an entry to plans/{feature-slug}/PROGRESS.md when it completes.
This is NOT optional — the stage gate script checks for it.
# Progress — {feature-slug}
## Overview
| Milestone | Phases Done | Sessions | Status |
|-----------|------------|----------|--------|
| M1 | 0→4 | 4 | SHIPPED |
| M2 | 0→2 | 1 | IN PROGRESS |
## Milestone 1
| Phase | Started | Completed | Sessions | Iterations | Key Decisions |
|-------|---------|-----------|----------|------------|---------------|
| 0-init | 2026-03-10 | 2026-03-10 | 1 | 1 | existing project, medium scan |
| 1-brainstorm | 2026-03-10 | 2026-03-10 | 1 | 3 rounds | 8 REQs, 2 milestones |
| 2-design | 2026-03-11 | 2026-03-11 | 1 | 1 | Option A (MVC+JWT) |
| cook | 2026-03-12 | 2026-03-12 | 1 | 1+remediation | 1 gap, 120K tokens |
| 4-verify | 2026-03-13 | 2026-03-13 | 1 | 2 | 4/4 PASS |
## Metrics
- Total sessions: {N}
- Gotchas logged: {N}
- Gaps found: {N} ({N} remediated, {N} deferred)
Each phase appends its row to the milestone table when it completes:
/qf:status: Reads PROGRESS.md for timeline displayInjected into every ROADMAP phase and verified in Phase 4:
Capture mistakes, surprises, and hard-won lessons so they inform future phases.
plans/GOTCHAS.md) — lessons that apply across ALL features in the project. General patterns, recurring mistakes, team conventions learned the hard way.plans/{feature-slug}/GOTCHAS.md) — lessons specific to one feature's domain, architecture, or codebase area.# GOTCHAs — {feature-slug OR "Global"}
### G-001 [{domain}] — {one-line description}
- **When:** {which phase/stage discovered this}
- **Root cause:** {why it happened — bad assumption, missing check, etc.}
- **Rule:** {concrete rule to prevent recurrence}
- **Tags:** {comma-separated: phase-2, design, auth, database, etc.}
Domain tags: backend, frontend, infra, auth, database, api, testing, design, requirements, deployment
> ⚠️ GOTCHA: warnings.plans/{feature-slug}/GOTCHAS.mdplans/GOTCHAS.mdplans/GOTCHAS.md (global) + plans/{feature-slug}/GOTCHAS.md (feature)