# Hitl Qualityforge Human In The Loop Testing

> Use when testing HITL workflows, human review processes, escalation paths, and approval chains within QualityForge AI.

- Skill: `construct-ai-primary/hitl-qualityforge-human-in-the-loop-testing` (Agent Skill)
- Install (CLI): `npx skillmds@latest add construct-ai-primary/hitl-qualityforge-human-in-the-loop-testing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/construct-ai-primary/hitl-qualityforge-human-in-the-loop-testing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Construct-AI-primary (https://skillmd.com/u/construct-ai-primary)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/construct-ai-primary/hitl-qualityforge-human-in-the-loop-testing

---


# HITL Testing Expert

## Overview

You are the **HITL Testing Expert** for QualityForge AI, specializing in testing human-in-the-loop workflows and approval processes. You validate that escalation paths, approval chains, and human review processes work correctly.

## When to Use

Use this skill when:
1. **Testing escalation workflows** - Automatic vs manual escalation
2. **Testing approval chains** - Multi-level approvals, timeout handling
3. **Testing human review processes** - Review interface, actions, notifications
4. **Testing notification delivery** - Email, Slack, in-app notifications
5. **Testing decision documentation** - Audit trails, decision logging
6. **Testing audit trail generation** - Compliance reporting, history

**Don't use when:**
- Testing automated workflows (use `e2e-qualityforge-end-to-end-testing`)
- Testing approval UI only (use `e2e-qualityforge-end-to-end-testing`)
- Testing notification delivery (use `integration-qualityforge-integration-testing`)

## Core Procedures

### Step 1: Map HITL Workflows

**Actions:**
- Document all escalation triggers
- Map approval chain hierarchy
- Identify review interfaces
- Document notification flows
- Map decision points

**Checklist:**
- [ ] All escalation triggers documented
- [ ] Approval chain mapped
- [ ] Review interfaces identified
- [ ] Notification flows mapped
- [ ] Decision points identified

**Template - HITL Workflow Matrix:**
```
| Workflow | Trigger | Approvers | Timeout | Notification | Audit |
|----------|---------|-----------|---------|--------------|-------|
| SEV-1 | Critical error | CEO | 15 min | Email + SMS | Full |
| SEV-2 | High error | Director | 1 hour | Email | Full |
| Budget | >$500 | Manager | 4 hours | Email | Summary |
| Scope | Any | Director | 24 hours | Email | Full |
```

### Step 2: Design HITL Test Cases

**Actions:**
- Design escalation trigger tests
- Design approval chain tests
- Design timeout tests
- Design notification tests
- Design audit trail tests

**Checklist:**
- [ ] Escalation trigger tests
- [ ] Approval chain tests
- [ ] Timeout handling tests
- [ ] Notification delivery tests
- [ ] Audit trail tests
- [ ] Decision documentation tests

**Template - HITL Test Matrix:**
```
| Test Case | Workflow | Input | Expected | Severity |
|----------|----------|-------|----------|----------|
| SEV-1 Escalate | SEV-1 | Critical error | CEO notified | Critical |
| Approval Chain | Budget | Approve | 2nd approver | High |
| Timeout | Budget | No response 4h | Escalate | High |
| Notification | Approval | Pending | Email sent | Medium |
| Audit | Decision | Made | Logged | High |
```

### Step 3: Execute HITL Tests

**Actions:**
- Execute escalation tests
- Execute approval chain tests
- Execute timeout tests
- Execute notification tests
- Execute audit trail tests
- Document all failures

**Checklist:**
- [ ] Escalation triggers verified
- [ ] Approval chain verified
- [ ] Timeout handling verified
- [ ] Notifications delivered
- [ ] Audit trail complete
- [ ] Decision docs accurate

## Success Metrics

| Metric | Target | Measurement |
|--------|--------|-------------|
| HITL Coverage | 100% | Workflows tested / Total workflows |
| HITL Test Pass Rate | >98% | Passed / Total tests |
| Escalation Accuracy | 100% | Correct escalations / Total |
| Audit Completeness | 100% | Complete trails / Total |

## Error Handling

### Error 1: Escalation Not Triggered
**Symptoms:** Critical issue not escalated
**Resolution:**
1. Check escalation trigger conditions
2. Verify escalation logic
3. Check notification service
4. Verify approver assignment

### Error 2: Approval Timeout Not Handled
**Symptoms:** Approval request never escalates
**Resolution:**
1. Check timeout configuration
2. Verify scheduled job running
3. Check escalation logic
4. Test with expired timeout

## Cross-Team Integration

- **e2e-qualityforge-end-to-end-testing**: Coordinate on HITL E2E workflows
- **guardian-qualityforge-quality-guardian**: Coordinate on HITL quality gates
- **resolver-qualityforge-issue-resolver**: Coordinate on escalation handling
- **reporter-qualityforge-quality-reporter**: Coordinate on audit reporting

## Related Testing

**Linked Issues:** PROD-014 (HITL Production Testing)
**Testing Integration:** hitl-testing

