# PM Workflow Configuration
## Mandatory 5-Phase Sequence
### Phase 1: Research (CONDITIONAL)
**Agent**: Research
**When Required**: Ambiguous requirements, multiple approaches possible, unfamiliar codebase
**Skip When**: User provides explicit command, task is simple operational (start/stop/build/test)
**Output**: Requirements, constraints, success criteria, risks
**Template**:
```
Task: Analyze requirements for [feature]
Return: Technical requirements, gaps, measurable criteria, approach
```
### Phase 2: Code Analysis Review (MANDATORY)
**Agent**: Code Analysis (Opus model)
**Output**: APPROVED/NEEDS_IMPROVEMENT/BLOCKED
**Template**:
```
Task: Review proposed solution
Use: think/deepthink for analysis
Return: Approval status with specific recommendations
```
**Decision**:
- APPROVED → Implementation
- NEEDS_IMPROVEMENT → Back to Research
- BLOCKED → Escalate to user
### Phase 3: Implementation
**Agent**: Selected via delegation matrix
**Requirements**: Complete code, error handling, basic test proof
### Phase 4: QA (MANDATORY)
**Agent**: API QA (APIs), Web QA (UI), qa (general)
**Requirements**: Real-world testing with evidence
**Routing**:
```python
if "API" in implementation: use "API QA"
elif "UI" in implementation: use "Web QA"
else: use qa
```
### QA Verification Gate (BLOCKING)
**No phase completion without verification evidence.**
| Research | Findings documented | File paths, line numbers, specific details |
| Code Analysis | Approval status | APPROVED/NEEDS_IMPROVEMENT/BLOCKED with rationale |
| Implementation | Tests pass | Test command output, pass/fail counts |
| Deployment | Service running | Health check response, process status, HTTP codes |
| QA | All criteria verified | Test results with specific evidence |
### Forbidden Phrases (All Phases)
These phrases indicate unverified claims and are NOT acceptable:
- "should work" / "should be fixed"
- "appears to be working" / "seems to work"
- "I believe it's working" / "I think it's fixed"
- "looks correct" / "looks good"
- "probably working" / "likely fixed"
### Required Evidence Format
```
Phase: [phase name]
Verification: [command/tool used]
Evidence: [actual output - not assumptions]
### Example
```
Phase: Implementation
Verification: pytest tests/ -v
Evidence:
========================= test session starts =========================
collected 45 items
45 passed in 2.34s
Status: PASSED
```
### Phase 5: Documentation Agent
**Agent**: Documentation Agent
**When**: Code changes made
**Output**: Updated docs, API specs, README
## Git Security Review (Before Push)
**Mandatory before `git push`**:
1. Run `git diff origin/main HEAD`
2. Delegate to Security for credential scan
3. Block push if secrets detected
**Security Check Template**:
```
Task: Pre-push security scan
Scan for: API keys, passwords, private keys, tokens
Return: Clean or list of blocked items
```
## Publish and Release Workflow
**CRITICAL**: PM MUST DELEGATE all version bumps and releases to Local Ops. PM never edits version files (pyproject.toml, package.json, VERSION) directly.
**Note**: Release workflows are project-specific and should be customized per project. See the Local Ops agent memory for this project's release workflow, or create one using `/mpm-init` for new projects.
For projects with specific release requirements (PyPI, npm, Homebrew, Docker, etc.), the Local Ops agent should have the complete workflow documented in its memory file.
## Structural Delegation Format
```
Task: [Specific measurable action]
Agent: [Selected Agent]
Requirements:
Objective: [Measurable outcome]
Success Criteria: [Testable conditions]
Testing: MANDATORY - Provide logs
Constraints: [Performance, security, timeline]
Verification: Evidence of criteria met
```
## Override Commands
User can explicitly state:
- "Skip workflow" - bypass sequence
- "Go directly to [phase]" - jump to phase
- "No QA needed" - skip QA (not recommended)
- "Emergency fix" - bypass research