> ## Documentation Index
> Fetch the complete documentation index at: https://specs.flux.employinc.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Wave 4: Candidate Selection

# Wave 4: Candidate Selection

**Status**: IN PROGRESS
**Domain**: The employer's evaluation and selection of candidates for jobs: screening, ranking, persistent match intelligence, fairness, compliance, and the "Select for Hire" decision flowing into canonical payroll projection and Paychex Flex integration.
**Owner**: @pj

***

## Scope

Wave 4 owns the "which candidate for which job" decision — from first screening through final hire. It encompasses:

* **Screening & Ranking** (already available via Wave 0 Cycle 203 tools: `screen_resume`, `rank_candidates`).
* **Persistent Match Agent** (Cycle 218 + 10 sub-cycles): the Level-4-maturity autonomous agent that monitors the employer's candidate pool continuously, proactively searches for matches, re-evaluates as signals change, and coordinates with the candidate agent for engagement.
* **Match Intelligence UI** (Cycle 219): rankings visualization, agent activity timeline, strategy config surface.
* **Fairness Engine** (Cycle 220): disparate impact analysis on retrieval, bias detection on scoring, agent reasoning audit.
* **EU AI Act Formal Conformity Assessment** (Cycle 221 — see numbering-collision flag below).
* **Workflow Outbox** (Cycle 222): transactional outbox pattern for event-driven integration across domain boundaries.
* **Select for Hire** (Cycle 363): canonical-first `HirePackage` architecture with `FluxEmployeeProjection` and `PaychexWorkerProjection`.
* **Real `PaychexApiGateway`**: the production Paychex Flex integration that replaces `StubPayrollGateway`.

***

## Cycles

| Cycle  | Title                                                | Status                              | Milestone                                 |
| ------ | ---------------------------------------------------- | ----------------------------------- | ----------------------------------------- |
| 218    | Candidate Match Agent (foundation)                   | Plan merged (PR #404)               | M4                                        |
| 218.1  | Domain State Model                                   | Plan merged                         | M4                                        |
| 218.2  | Cerebe Ingestion Pipeline                            | Plan merged                         | M4                                        |
| 218.3  | Candidate Retriever                                  | Plan merged                         | M4                                        |
| 218.4  | Retrieval/Eval Tools                                 | Plan merged                         | M4                                        |
| 218.5  | State & Communication Tools                          | Plan merged                         | M4                                        |
| 218.6  | Agent Registration & Prompts                         | Plan merged                         | M4                                        |
| 218.7  | Match Workflow (Temporal)                            | Plan merged                         | M4                                        |
| 218.8  | Match Strategy Skill (employer-facing)               | Plan merged                         | M4                                        |
| 218.9  | Notification Integration                             | Plan merged                         | M4                                        |
| 218.10 | Observability Seeds                                  | Plan merged                         | M4                                        |
| 219    | Match Intelligence UI                                | Draft                               | M4                                        |
| 220    | Fairness Engine                                      | Draft                               | M4                                        |
| 221    | EU AI Act Formal Compliance (**see collision flag**) | Draft                               | M4                                        |
| 222    | Workflow Outbox                                      | Draft                               | M1 prerequisite for 363 / stretch Paychex |
| 363    | Select for Hire — Canonical-First (HC-8)             | Plan merged (PR #364); impl pending | **M1 floor**                              |
| —      | Real `PaychexApiGateway` (from PR #307 §1)           | Not started                         | M1 stretch (CL-1)                         |

***

## M1 Paychex Pilot Contribution

**Floor**:

* Cycle 363 Select for Hire — implementation of the merged plan. Delivers `HirePackage` + `FluxEmployeeProjection` + `PaychexWorkerProjection`. Pilot uses the export path (printable sheet + JSON) for manual Paychex entry.
* Existing Cycle 203 tools (`screen_resume`, `rank_candidates`) handle screening at pilot scale — no match agent.

**Stretch** (CL-1 governed):

* Real `PaychexApiGateway` implementation. Replaces the `StubPayrollGateway` used by `PaychexOnboardingWorkflow`. Scope per PR #307 §1: OAuth 2.0 client, employee CRUD, direct deposit setup, benefits enrollment, onboarding verification, saga compensation roundtrip verified against sandbox.

**Explicitly out of pilot**:

* Full Candidate Match Agent (218.x 10-sub-cycle series) — M4
* Match Intelligence UI (219), Fairness Engine (220), EU AI Act Formal Compliance (221) — M4
* Cycle 222 Workflow Outbox — post-pilot infrastructure unless blocked into M1 for stretch Paychex saga

***

## Dependencies

* Wave 0: hiring tools (203), Temporal workflows (204), domain models (202).
* Wave 3: 217 candidate identity (merged — identity/application split is foundational for matching), 217.5 autonomous agent architecture (enables 218's persistent workflow).
* Wave 5: observability stack (301.x) for match agent telemetry; staging for pre-prod burn-in.

***

## Strategic Importance

The Candidate Match Agent is Flux's Level-4 maturity differentiator. ATS platforms (Greenhouse, Lever, Ashby) rely on keyword screening. Talent intelligence platforms (Eightfold, SmartRecruiters Winston) have retrieval + scoring but are only beginning agent reasoning as of 2025. Flux ships the full three-layer stack — Cerebe retrieval + evidence-anchored scoring + persistent autonomous agent — natively integrated into the conversational product experience. This is the architectural moat.

Cycle 363 (Select for Hire) is the bridge from "a candidate looks good" to "they're on payroll." It implements the canonical-first architecture that inverts the Paychex API contract: the domain speaks domain vocabulary, projections convert to provider schemas, PII is encrypted at the repository layer. This is the closing step of the hiring pipeline.

***

## Numbering Collision Flag

Two Cycle 221s currently exist:

1. **Cycle 221: Chief Engineer Review System** (Wave 6, operating) — the manifesto + AI persona + review skill.
2. **Cycle 221: EU AI Act Formal Compliance** (Wave 4, this wave) — the match agent's formal conformity assessment.

Only one can hold the `cycle221-*` filename. Recommendation: renumber the Match Agent compliance cycle (candidate: 218.11 or 223). Tracked as a post-pilot cleanup pass.

***

## Historical Context

Wave 4 was previously labeled "Wave 5: Candidate Match Intelligence". In the 2026-04-17 domain-reorganization: it was renumbered to Wave 4 to sit adjacent to Wave 3 (Candidate) — the candidate-selection domain is a peer to the candidate-experience domain. Cycle 363 (Select for Hire) moved into Wave 4 from an earlier Wave 3 draft placement, because the hire decision is the culmination of candidate selection, not candidate experience.
