Spoke
anycomp
Compensation decision logic, decomposed — models, evaluate, cycles, BLS context.
Character
Problem
External. Comp tools bundle band design, individual evaluation, and cycle workflow into closed products. You can't swap any one piece. The market-rate data is locked inside; the recommendation logic stays locked behind the SKU wall—teams pay enterprise rent for workflows they barely wire up.
Internal. You're the one who knows where the band math is wrong, or where the market data is stale, or where the recommendation logic over-weights tenure. You can't fix any of it.
Philosophical. Comp logic is three separable concerns (model authoring, individual evaluation, cycle audit). They should ship as three separable services.
Guide
Abstract
Background. Reward systems couple proprietary benchmarks, heuristic evaluators, and workflows—preventing recomputation scrutiny when CFO staff challenge recommendations.
Methodology. Author dimensional models once, evaluate individuals statelessly or run population engines with audited cycleId rows. Persisted market reference histories fit YoY movement priors that compose calculus forecasting surrogates. PAT-160 routes apply pure transforms aligned to consulting workbook artefacts (variance vs plan, pool % payroll, crossover ratios, lifecycle columns, drift histograms, dual nine-box counts).
Scope. Classification of jobs remains job-family-agent; statutory minima integrations route through wage-compliance flags.
Contribution. HTTP + MCP parity, explicit Zod contracts, optional Insight Card render hooks, statistical bridges tightening calculus ↔ forecasting cohesion.
Evidence / Provenance. Donor PAT-18 anycomp repo lift + PAT-147 / PAT-160 CHANGELOG regressions enumerated under src/spokes/anycomp/tests/.
Plan
- 01
Define a comp model
anycomp.models.createpersists dimensions × pay mixes × band slices × indices. - 02
Evaluate + run engines
anycomp.evaluatestays stateless; CompEngine/engines/*/runpersists enriched populations when configs exist (PAT-147-B Track A surfaces). - 03
Cycles + analytics bundle
anycomp.cycles.runrecords bulk outcomes; PAT-160/analytics/*emits VS-plan/pool/etc. diagnostics POSTed under service keys (mirroring MCP tools). - 04
Market context + movement
Compose
anycomp.market.*priors with/market-movement/history|ingest|fit|forecasttails so recommendations respect YoY midpoint drift.
Call to Action
Direct. Try the API. Define a comp model free.
Transitional. Read PAT-147 movement + PAT-160 analytics notes alongside band-math docs; inspect cycle audit trails via your cycleId.
Spoke I/O (visual language v1)
Every toolbox spoke shares the same abstract choreography: typed inputs on the left, distilled verbs in the center, typed outputs on the right, and (when relevant) cross-spoke HTTP composition along the bottom rail. Source package: @people-analytics-toolbox/spoke-illustrations.
Try it now
Copy this curl. Paste in any terminal. POST endpoint — set TOOLBOX_SERVICE_KEY in your shell first.
anycomp.market.labor-rate
POSTSERVICE KEY REQUIRED
Look up a BLS-derived labor-market rate (voluntary attrition / hire / opening / employment) for (socCode, geo, period). Service key required (POST endpoint).
curl -sS -X POST "https://people-analytics-toolbox.vercel.app/api/spokes/anycomp/market/labor-rate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOOLBOX_SERVICE_KEY" \
-d '{
"metric": "voluntary_attrition",
"socCode": "15-1252",
"geo": "national",
"period": "2024"
}'Vendor the contract
The Zod contract is the source of truth. Vendor a copy into your consumer app — you keep it; we don't break it underneath you. Re-vendor when the version bumps.
// In your consumer app:
import { z } from "zod";
// Vendor a copy of these contracts from the toolbox repo at:
// src/spokes/anycomp/contracts/types.ts
import {
CompModelSchema,
RegisterCompModelRequestSchema,
CompEvaluateRequestSchema,
CompEvaluateResponseSchema,
CompCycleEvaluationRequestSchema,
LaborMarketRateRequestSchema,
LaborMarketRateResponseSchema,
CONTRACT_VERSION,
} from "./vendored/anycomp/types";
// Then call the toolbox over HTTP or MCP.
// See docs/EXTERNAL-CONSUMERS.md for onboarding.Source path: src/spokes/anycomp/contracts/types.ts · GitHub
Failure
The board asks to “show the engine” and the vendor forwards marketing PDFs—you cannot reconcile promo dollars to finance because the math stays opaque.
Success
Transparent calculators, deterministic workbook-parity diagnostics, reproducible audit rows, and MCP-callable comps science your CFO’s quant bench recognises.