원클릭으로
pipeline-guards
Safety constraints and quality gates for pipeline and workflow execution
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Safety constraints and quality gates for pipeline and workflow execution
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts
Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile
Multi-LLM adversarial consensus loop — 3+ LLMs compete to find flaws in designs/specs until unanimous agreement is reached
Monitor Claude Code releases and auto-generate GitHub issues for each new version
Execute OpenAI Codex CLI prompts and return results
YAML-based DAG workflow engine with topological execution and failure strategies
| name | pipeline-guards |
| description | Safety constraints and quality gates for pipeline and workflow execution |
| scope | core |
| context | fork |
| user-invocable | false |
Defines mandatory safety constraints for all pipeline, workflow, and iterative execution within the oh-my-customcodex system. Prevents infinite loops, enforces timeouts, and establishes quality gates.
System-wide — these guards apply to dag-orchestration, worker-reviewer-pipeline, and any iterative process.
| Guard | Default | Hard Cap | Applies To |
|---|---|---|---|
| Max iterations | 3 | 5 | worker-reviewer-pipeline |
| Max DAG nodes | 20 | 30 | dag-orchestration |
| Max parallel agents | 4 | 5 | R009 (all pipelines) |
| Timeout per node | 300s | 600s | dag-orchestration nodes |
| Timeout per pipeline | 900s | 1800s | worker-reviewer-pipeline |
| Max retry count | 2 | 3 | Failure retry strategies |
| Max PR improvement items | 20 | 50 | pr-auto-improve |
| Max auto-improve items | 20 | 50 | omcodex:auto-improve |
Guards are enforced at two levels:
Each skill checks guard limits before execution:
Before starting pipeline:
1. Check max_iterations ≤ hard cap
2. Check timeout ≤ hard cap
3. Check node count ≤ hard cap
If any exceeded → warn user, use hard cap value
The stuck-detector hook monitors for guard violations:
PostToolUse → check:
- Iteration count > max_iterations?
- Elapsed time > timeout?
- Same error repeated > max_retry?
If any → emit advisory to stderr
[Quality Gate Check]
├── Critical issues: {count} (must be 0)
├── Major issues: {count} (must be ≤ threshold)
├── Minor issues: {count} (informational)
└── Gate: PASS | FAIL
[DAG Completion Gate]
├── Nodes completed: {n}/{total}
├── Nodes failed: {count}
├── Nodes skipped: {count}
└── Gate: PASS | PARTIAL | FAIL
When guards are triggered, they integrate with existing advisory systems:
| Event | Action |
|---|---|
| Max iterations reached | → stuck-recovery advisory |
| Repeated failures | → model-escalation advisory |
| Timeout approaching (80%) | → warn user, suggest early termination |
| Hard cap hit | → force stop, report to user |
Pipelines can override defaults (within hard caps):
# In pipeline/workflow spec
guards:
max_iterations: 4 # Override default 3, cannot exceed 5
timeout_per_node: 120 # Override default 300s
timeout_pipeline: 600 # Override default 900s
quality_gate: all_pass # all_pass | majority_pass
When a pipeline or workflow must be terminated:
[Kill Switch] Activated
├── Reason: {max_iterations | timeout | user_request | stuck_detected}
├── Pipeline: {name}
├── Progress: {completed}/{total} steps
├── Preserved state: /tmp/.codex-pipeline-$PPID.json
└── Action: Stopped gracefully, state saved for resume
The kill switch:
On guard-triggered termination:
{
"pipeline": "feature-review",
"terminated_at": "2026-03-07T10:15:00Z",
"reason": "max_iterations_reached",
"completed_iterations": 3,
"last_verdict": "FAIL",
"remaining_issues": [
{"severity": "major", "file": "src/auth.ts", "line": 42, "description": "..."}
],
"worker_last_output": "...",
"resumable": true
}
Guard warnings appear inline:
[Guard] ⚠ Iteration 3/3 — final attempt
[Guard] ⚠ Timeout 80% (240s/300s) — consider early termination
[Guard] 🛑 Max iterations reached — pipeline stopped
[Guard] 🛑 Hard timeout (600s) — force stop
| Rule/Skill | Integration |
|---|---|
| R009 | Max parallel agents enforced (hard cap: 5, soft default: 4) |
| R010 | Guards run in orchestrator only |
| R015 | Guard warnings displayed transparently |
| dag-orchestration | Node count and timeout limits |
| worker-reviewer-pipeline | Iteration and pipeline timeout limits |
| pr-auto-improve | Improvement item count limits |
| omcodex:auto-improve | Auto-improve item count limits |
| stuck-recovery | Guard triggers feed into stuck detection |
| model-escalation | Repeated failures trigger escalation advisory |
Guard pass/fail state is recorded through the tracker-checkpoint agent when a pipeline needs resumable execution.
runningpassed with relevant metricsfailed and freeze failure reasonSee .codex/agents/tracker-checkpoint.md for the checkpoint contract.