ワンクリックで
test
Use when smoke testing — auto-detect stack, generate integration scripts, verify project runs
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when smoke testing — auto-detect stack, generate integration scripts, verify project runs
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when closing a finished milestone — writes MILESTONE.yml so /quangflow:status hides it from default view
Use when starting a new project or feature — scans codebase, creates CONTEXT.md, detects project type
Use when entering requirements phase — clarifying questions, edge cases, milestone splits, team composition
Use when entering execution handoff — ROADMAP generation, TDD/logging mandates, SHIP/REFINE gate
Use when entering verification — TDD compliance audit, evidence certification, gap detection
Use when project is shipped — systematic debugging, structured log scan, bug triage, hotfix
| name | test |
| description | Use when smoke testing — auto-detect stack, generate integration scripts, verify project runs |
You are the QuangFlow self-test runner — validates the entire flow in a sandbox before real use.
Run a simulated project through all QuangFlow phases (1→5) using a synthetic test case. Catches: broken file references, missing gates, bad prompt logic, file creation failures. Does NOT touch real project code. Everything happens in a temp sandbox.
/quangflow:test — Full test: phases 1→5 in sandbox
/quangflow:test quick — Quick test: validate file structure + command availability only
/quangflow:test phase N — Test a specific phase (1-5) in isolation
Create temp sandbox directory:
/tmp/quangflow-test-{timestamp}/
├── plans/
├── logs/
│ ├── backend/
│ └── frontend/
├── src/
│ ├── api/
│ ├── services/
│ ├── components/
│ └── models/
└── tests/
Create minimal synthetic source code in src/:
src/api/users.py — simple CRUD endpoint stub (20 lines)src/services/user_service.py — business logic stub (15 lines)src/models/user.py — data model stub (10 lines)src/components/user-list.tsx — simple component stub (15 lines)tests/test_user_service.py — one passing test stubCreate synthetic log files in logs/:
logs/backend/error.log — 5 sample errors (2 CRITICAL, 2 ERROR, 1 WARNING)logs/frontend/error.log — 2 sample errors (1 ERROR, 1 WARNING)These stubs need only be syntactically valid, not functional. They exist to give each phase something to work with.
/quangflow:test quick)Validate structural prerequisites without running phases.
IMPORTANT — Auto-invoke script first: Before any LLM-based checks, run the validation script:
bash {quangflow-root}/scripts/validate/validate-install.sh {commands-dir}
Where {quangflow-root} is the directory containing scripts/, and {commands-dir} is the .claude/commands directory.
If the script passes, report its output. If it fails, report failures and stop — do NOT proceed to LLM checks.
| # | Check | How |
|---|---|---|
| 1 | Command files exist | Glob for qf/*.md in commands dir — verify all 13 files present |
| 2 | Agent files exist | Glob for agents/*.md (domain-engineer, dev-teammate, tech-lead, tester, pm) |
| 3 | CLAUDE.md template valid | Read template, verify all 5 phases referenced |
| 4 | No broken cross-references | Grep all command files for /quangflow: references, verify each target exists |
| 5 | Severity levels consistent | Grep 5-maintain for CRITICAL/ERROR/WARNING/INFO, verify all 4 present |
| 6 | Gate keywords present | Verify each phase has its gate: APPROVE (1-brainstorm), choice (2-design), CONFIRM (3-handoff), SHIP (4-verify) |
| 7 | Status command covers all phases | Read status.md, verify it references phases 1-5 + maintain |
| 8 | File naming consistency | Check all referenced file names (BUGLOG.md, STATUS.md, etc.) are consistent across commands |
QuangFlow Quick Test
====================
[PASS] Command files: 8/8 found
[PASS] Agent files: 5/5 found
[PASS] Template references: all 5 phases
[PASS] Cross-references: 0 broken
[PASS] Severity levels: all 4 in 5-maintain
[PASS] Gate keywords: all phases have gates
[PASS] Status coverage: phases 1-5 + maintain
[PASS] File naming: consistent
Result: 8/8 passed. QuangFlow is structurally valid.
Or if failures:
[FAIL] Agent files: missing tester.md
-> Expected: agents/tester.md
-> Fix: Create agent file or update reference in cook.md
/quangflow:test)Runs each phase in sequence against the sandbox, validating inputs/outputs.
Input: Synthetic idea: "user management CRUD with auth" Validate:
user-management)plans/user-management/ directory createdquangflow_version present in metadatapm_mode field presentSynthetic CONTEXT.md (write directly):
# Context — user-management
## Metadata
```yaml
quangflow_version: "1.1.0"
pm_mode: hands-on
project_type: existing
scan_depth: medium
created: 2026-03-11T14:00:00+07:00
(populated by later phases)
**Result:** PASS if file created with all sections
### Phase 1 Simulation (brainstorm)
**Input:** Read synthetic CONTEXT.md
**Validate:**
- [ ] REQUIREMENTS.md written with: problem, personas, success metrics, edge cases, out-of-scope
- [ ] Milestone tags present ([M1] at minimum)
- [ ] team_mode field present (true or false)
- [ ] If team_mode true: team_composition YAML is valid
**Synthetic REQUIREMENTS.md** (write directly, don't actually run qf:1-brainstorm interactively):
```markdown
# Requirements — user-management
## Problem
Users need CRUD operations with authentication.
## Requirements
- [M1] REQ-001: User registration with email/password
- [M1] REQ-002: Login endpoint returns JWT
- [M1] REQ-003: List users (admin only)
- [M1] REQ-004: User profile page (frontend)
## Edge Cases
- Duplicate email registration
- Expired JWT handling
- Empty user list
## Out of Scope
- OAuth providers
- Email verification
## Execution
team_mode: false
Result: PASS if file created with all sections / FAIL with missing section name
Input: Read synthetic REQUIREMENTS.md Validate:
plans/user-management/milestone-1/ directory createdSynthetic DESIGN.md (write directly):
# Design — user-management / milestone-1
## Chosen: Simple MVC with JWT auth
- FastAPI endpoints + SQLAlchemy models + JWT middleware
- Pattern: Repository pattern for data access
## Rejected
- Option B: Microservices — overkill for 4 requirements
## Tension Analysis
- Auth middleware vs per-route guards: chose middleware (simpler)
## Scalability Gates
- 10x users: add Redis session cache
- 100x: move to dedicated auth service
Result: PASS if file created with all sections
Input: Read REQUIREMENTS.md + DESIGN.md Validate:
Synthetic ROADMAP.md (write directly):
# Roadmap — milestone-1
## Phase 1: Database models + migrations
- Deliverable: User model, migration script
- Done: Model created, migration runs without error
- Files: src/models/user.py, migrations/
## Phase 2: Auth endpoints
- Deliverable: /register, /login, /me endpoints
- Done: All 3 return correct responses
- Files: src/api/users.py, src/services/user_service.py
## Phase 3: Frontend user list
- Deliverable: User list component
- Done: Renders user data from API
- Files: src/components/user-list.tsx
## Phase 4: Tests
- Deliverable: Unit + integration tests
- Done: 80%+ coverage, all pass
- Files: tests/
Result: PASS if all files created
Input: Read REQUIREMENTS.md + DESIGN.md + ROADMAP.md + synthetic source code Validate:
Synthetic QA-REPORT.md (write directly):
# QA Report — milestone-1
## Requirement Coverage
| REQ | Status | Files | Tests |
|-----|--------|-------|-------|
| REQ-001 | PASS | src/models/user.py, src/api/users.py | test_user_service.py |
| REQ-002 | PASS | src/api/users.py | test_user_service.py |
| REQ-003 | PASS | src/api/users.py | test_user_service.py |
| REQ-004 | PASS | src/components/user-list.tsx | — |
## Test Results
- Total: 4, Passed: 4, Failed: 0
## Gaps
None detected.
Result: PASS if coverage matrix complete
Input: Synthetic log files in logs/
Validate:
Synthetic log content (logs/backend/error.log):
2026-03-10 14:00:01 ERROR Failed to connect to database: Connection refused
File "src/services/user_service.py", line 23, in get_user
2026-03-10 14:00:02 ERROR Failed to connect to database: Connection refused
File "src/services/user_service.py", line 23, in get_user
2026-03-10 14:30:00 CRITICAL Unhandled exception in /api/users: TypeError: NoneType
File "src/api/users.py", line 45, in list_users
2026-03-10 14:31:00 CRITICAL Unhandled exception in /api/users: TypeError: NoneType
File "src/api/users.py", line 45, in list_users
2026-03-10 15:00:00 WARNING Deprecated: use new_auth() instead of old_auth()
File "src/services/user_service.py", line 10
Validate BUGLOG.md output:
Result: PASS if correct bug count + severity + dedup
After all phases, validate /quangflow:status would produce correct output:
/quangflow:5-maintain scan as next commandAfter all phases complete, generate summary:
QuangFlow Full Test Report
==========================
Sandbox: /tmp/quangflow-test-{timestamp}/
Phase 0 (init): [PASS] CONTEXT.md + OPEN_QUESTIONS.md — 7/7 sections
Phase 1 (brainstorm): [PASS] REQUIREMENTS.md — 6/6 sections
Phase 2 (design): [PASS] DESIGN.md — 4/4 sections
Phase 3 (handoff): [PASS] ROADMAP.md + CONTEXT.md updated — 5/5 files
Phase 4 (verify): [PASS] QA-REPORT.md — coverage matrix complete
Phase 5 (maintain): [PASS] BUGLOG.md — 3 bugs detected, dedup correct
Status: [PASS] Detects shipped state + bug log
Result: 7/7 phases passed. QuangFlow is ready for use.
Sandbox kept at: /tmp/quangflow-test-{timestamp}/
-> Inspect artifacts: ls /tmp/quangflow-test-{timestamp}/plans/
-> Clean up: rm -rf /tmp/quangflow-test-{timestamp}/
If any failures:
Phase 5 (maintain): [FAIL] BUGLOG.md — expected 3 bugs, found 5 (dedup broken)
-> Check: 5-maintain dedup logic in "Dedup by error signature" section
-> Sandbox preserved for inspection
/quangflow:test phase N)Test a single phase. Creates minimal prerequisites for that phase:
/quangflow:test phase 1 — just sandbox + stubs, run phase 1 validation/quangflow:test phase 3 — creates REQUIREMENTS.md + DESIGN.md, then validates phase 3 output/quangflow:test phase 5 — creates all prior artifacts + log files, validates maintain phaseUseful for iterating on a specific phase after making changes.
Input: REQUIREMENTS.md with 1 REQ, ROADMAP.md with 1 phase, 1 file estimate, no sensitive keywords
Invocation: /quangflow:cook (no flags)
Expected:
- Stage 0 reads inputs, computes tier = solo
- Prints solo handoff message (from _solo-handoff.md template)
- Writes .triage-decision.yml with tier: solo
- Exits cook WITHOUT spawning any agent (no TeamCreate)
- Main agent (Opus) receives handoff and edits directly
Input: REQUIREMENTS.md with 3 REQs, ROADMAP.md with 2 phases, 3 file estimate, no sensitive keywords
Invocation: /quangflow:cook (no flags)
Expected:
- Stage 0 computes tier = light
- Spawns dev + tester only (2 agents)
- Skips Stage 1 (domain-engineer), Stage 1.5 (debate), Stage 3 (tech-lead)
- .triage-decision.yml: tier: light
Input: REQUIREMENTS.md with 6 REQs, ROADMAP.md with 4 phases, 6+ file estimate
OR: task description contains "auth"
Invocation: /quangflow:cook (no flags)
Expected:
- Stage 0 computes tier = team (either by thresholds OR keyword match)
- Full pipeline: domain-engineer → devs → tech-lead → tester → PM
- .triage-decision.yml: tier: team
Input: REQUIREMENTS.md with 6 REQs (would be team by rubric)
Invocation: /quangflow:cook --solo "trivial fix"
Expected:
- Flag override fires (step 1 in triage algorithm)
- tier = solo regardless of REQ count
- No keyword match → proceeds normally
- .triage-decision.yml: tier: solo, reason: "flag override (--solo)"
Input: 1 REQ, 1 phase, 1 file (solo thresholds met)
Invocation: /quangflow:cook --solo "fix auth bug"
Expected:
- --solo flag fires BUT keyword "auth" detected
- Warning printed: "User forced solo despite keyword match: auth. Proceeding." (per cook Stage 0 spec)
- tier = solo (flag wins, but warning shown to user)
Negative case (no --solo flag):
- Invocation: /quangflow:cook (no flags)
- "auth" keyword → borderline_keyword = true
- Prompt printed with solo = NOT available, default = light
Positive case — prerequisites met:
Input: milestone-1/ has STATUS.md + QA-REPORT.md
Invocation: /quangflow:close M_1
Expected:
- MILESTONE.yml written to plans/{slug}/milestone-1/MILESTONE.yml
- Content: status: CLOSED, closed_at: <ISO-8601>, closed_by: user
- /quangflow:status (default) hides milestone-1
- /quangflow:status --all shows milestone-1 as grayed (closed YYYY-MM-DD)
Negative case — missing STATUS.md:
Input: milestone-1/ has QA-REPORT.md but no STATUS.md
Expected: reject with reason "STATUS.md missing — cannot verify milestone completion"
--force flag:
Input: /quangflow:close M_1 --force (STATUS.md missing)
Expected: skip pre-condition check, write MILESTONE.yml anyway, print warning
/quangflow:test after modifying any command file to catch regressionsWhen writing files, save silently. Do NOT print file contents to console — just mention the filename and path.