Hydra tutorial series — Part 1: What is Hydra?
A short introduction to Hydra, Conduction's agentic CI/CD platform. What it does, why it exists, and where it sits inside our app factory. The first of six short modules.
Hydra runs on OpenSpec changes. If you're not yet familiar with terms like spec, change, requirement and scenario, take the OpenSpec tutorial series first (parts 1 and 2, roughly 30 minutes together). It will save you a lot of backtracking in the rest of these modules.
A large part of Hydra's internals leans on Claude Skills: opsx-*, hydra-gate-*, team-*, test-*. If you've never written or read a skill, take part 1 of the Claude Skills tutorial series first (10 minutes). That makes part 4 of this series — where we open up the skill families inside Hydra — a lot easier to follow.
Hydra is Conduction's internal agentic CI/CD platform: a factory that turns OpenSpec proposals into reviewed, tested code on a feature branch. This module explains in ten minutes what Hydra is, why it exists, and how it fits inside our app factory. It is the first part of a six-part series; by the end you're ready for part 2 on the three pipelines.
In one sentence
Hydra is a stateless, label-driven pipeline that turns OpenSpec proposals into feature branches with code, tests, a review history and a PR — ready for human approval.
Not an "AI assistant that helps the developer", but a factory. You throw an OpenSpec change in one end and out the other end rolls a PR that two independent reviewers have looked at.
Concretely: Hydra works on the openspec/changes/<slug>/ folder — proposal.md, design.md, tasks.md and the spec delta. If those terms are new, take the OpenSpec series first (see tip at the top).
Why does Hydra exist?
Conduction builds a lot of open-source apps for the Nextcloud workplace. The rhythm of that factory is determined by two things: how fast we can write changes, and how fast those changes become code. Hydra automates that second step, with three explicit goals:
- Shorten lead time. Without Hydra, an average OpenSpec proposal takes half a day to three days to implement. With Hydra, it's half an hour to a few hours, depending on complexity.
- Lock in quality. No PR leaves the system without mechanical quality gates (PHPCS, Psalm, PHPStan, ESLint, PHPUnit), an independent code review and an independent security review. Two pairs of AI eyes before a human looks.
- Preserve the four-eyes principle. Hydra does not merge on its own — except when an issue explicitly carries the
yoloflag, and even then all gates have to be green. A human presses the button.
The four personas
Internally, Hydra is built from four ephemeral container personas. Each plays one role, in one container, with scoped credentials and tight turn budgets. You don't have to memorise their names now — they come back in part 2 — but it helps to spot the role pattern early:
Important: Al Gorithm runs on Haiku, the other three on Sonnet (with Opus as fallback). Reason: building follows patterns and is cheap on Haiku; judgement needs more depth. On Claude Max you have separate Sonnet-only and all-models quotas, so this split stretches the budget.
When to use, when not
Hydra is no silver bullet. The rule of thumb:
Use it when:
- The work fits inside one coherent OpenSpec change (one feature, not a refactor of the whole system).
- The acceptance criteria can be checked mechanically (tests exist, or can be written quickly with PHPUnit/Newman/Playwright).
- The target repo is ready for Hydra: has the
hydra-gate-*labels, anapp-config.json, and runs the standard quality suite.
Don't use it when:
- It's a one-off spike, prototype, or "let's try something" without reviewer discipline.
- The architecture changes in a way that doesn't fit one PR (multi-repo refactor, breaking schema change with data migration).
- You don't trust the gates on the target repo — Hydra is only as safe as its quality checks.
- The work requires human negotiation with an external party (customer, vendor) before it can start.
What Hydra does not do
A common mistake: thinking Hydra invents your whole product. The opposite is true.
- Hydra doesn't write changes (or specs). Those are provided up front, or a human writes them by hand (with
/opsx-ff). - Hydra doesn't do vision or strategy. What features we build is a human choice.
- Hydra doesn't decide architecture. That's what ADRs are for, maintained by humans (see
hydra/openspec/architecture/). - Hydra doesn't merge on its own authority. Except for
yoloissues — and there, all gates are still hard requirements.
Test yourself
Four short questions to check whether you've understood this part. Stuck? Click Hint. Curious about the answer? Click Answer.
1. What is Hydra's primary purpose?
Hint
Hydra does one specific step in our factory. Which step, and which two benefits does that deliver?
Answer
Hydra automates the step from OpenSpec change to reviewed feature branch + PR. Three explicit goals:
- Shorten lead time — from half a day to three days by hand, down to half an hour to a few hours.
- Lock in quality — mandatory mechanical gates (PHPCS, Psalm, PHPStan, ESLint, PHPUnit) + two independent AI reviews.
- Preserve the four-eyes principle — Hydra doesn't merge itself; a human presses the button. Exception:
yoloissues, and even then all gates must be green.
2. Why does Hydra rely on mechanical quality gates (PHPCS, Psalm, PHPStan, ESLint, PHPUnit) rather than only AI review?
Hint
AI reviewers can sound convincing without being factually correct. Mechanical checks have one property AI review by definition lacks.
Answer
Mechanical gates are deterministic and unpersuadable. You can't talk PHPStan around; ESLint doesn't care about a well-reasoned story. Two consequences:
- False positives and hallucinations get filtered before a reviewer looks — a PR that fails the gates never even reaches Juan Claude or Clyde.
- Standards are enforceable across the whole fleet — code style, types and test results are objective, not dependent on who reviews that day.
AI review sits on top, not in place of. The two layers catch different classes of problems.
3. What are Hydra's four personas, and which one is the one that CANNOT write?
Hint
One persona is deliberately read-only — its role is a binary gate ("does this pass or not?"). It has no Write or Edit tools.
Answer
The four personas:
- Al Gorithm — builder (Haiku). Writes code.
- Juan Claude van Damme — code reviewer (Sonnet). May push bounded fixes.
- Clyde Barcode — security reviewer (Sonnet). May also push bounded fixes.
- Axel Pliér — applier (Sonnet, no write access). Reads the final diff + both reviews and gives one binary answer:
pass: trueorpass: false. He judges, he doesn't intervene.
4. Name two situations in which you would NOT use Hydra and work by hand instead.
Hint
Think about: does the work fit in one change, is the target repo ready, and is there a non-technical issue that has to be resolved first?
Answer
A few common ones:
- The work doesn't fit in one OpenSpec change — multi-repo refactor, breaking schema change with data migration.
- The target repo isn't ready — no
hydra-gate-*labels, noapp-config.json, or an unreliable quality suite. Hydra is only as safe as its gates. - Spike or prototype without reviewer discipline — "just trying something out". The overhead isn't worth the gain.
- Human negotiation required — a customer, vendor or legal point has to be resolved first before the work can begin.
Next step
Now that you know what Hydra is, in part 2 we look inside the three pipelines.
