rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61)
CI / Architecture Guardrails (push) Successful in 2m38s
CI / Assistant Split Regression (push) Successful in 3m33s
CI / Typecheck (push) Successful in 3m51s
CI / Lint (push) Successful in 5m2s
CI / E2E Tests (push) Has been cancelled
CI / Fresh-Linux Docker Deploy (push) Has been cancelled
CI / Release Images (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled

rename(phase 1): CapaKraken → Nexus across code, UI, docs, CI (#61)

Co-authored-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
Co-committed-by: Hartmut Nörenberg <hn@hartmut-noerenberg.com>
This commit was merged in pull request #61.
This commit is contained in:
2026-05-21 16:28:40 +02:00
committed by Hartmut
parent d9a7ec0338
commit b41c1d2501
943 changed files with 24548 additions and 16832 deletions
@@ -1,4 +1,4 @@
import { computeBudgetStatus } from "@capakraken/engine";
import { computeBudgetStatus } from "@nexus/engine";
import type { TRPCContext } from "../trpc.js";
import { fmtEur } from "../lib/format-utils.js";
import { type GraphLink, type GraphNode, l, n } from "./computation-graph-shared.js";
@@ -25,9 +25,9 @@ export async function readResourceBudgetGraph(
monthStart: Date,
monthEnd: Date,
): Promise<ResourceBudgetGraph> {
const budgetProject = assignments.find((assignment) => (
assignment.project.budgetCents != null && assignment.project.budgetCents > 0
))?.project;
const budgetProject = assignments.find(
(assignment) => assignment.project.budgetCents != null && assignment.project.budgetCents > 0,
)?.project;
if (!budgetProject?.budgetCents) {
return { nodes: [], links: [] };
@@ -59,14 +59,84 @@ export async function readResourceBudgetGraph(
return {
nodes: [
n("input.budgetCents", "Project Budget", fmtEur(budgetProject.budgetCents), "EUR", "INPUT", `Budget for ${budgetProject.name}`, 0),
n("input.winProbability", "Win Probability", `${budgetProject.winProbability}%`, "%", "INPUT", "Project win probability", 0),
n("budget.confirmedCents", "Confirmed", fmtEur(budgetStatus.confirmedCents), "EUR", "BUDGET", "Sum of CONFIRMED/ACTIVE allocation costs", 2, "Σ(confirmed allocs)"),
n("budget.proposedCents", "Proposed", fmtEur(budgetStatus.proposedCents), "EUR", "BUDGET", "Sum of PROPOSED allocation costs", 2, "Σ(proposed allocs)"),
n("budget.allocatedCents", "Allocated", fmtEur(budgetStatus.allocatedCents), "EUR", "BUDGET", "Total allocated budget", 2, "confirmed + proposed"),
n("budget.remainingCents", "Remaining", fmtEur(budgetStatus.remainingCents), "EUR", "BUDGET", "Remaining budget", 3, "budget - allocated"),
n("budget.utilizationPct", "Utilization", `${budgetStatus.utilizationPercent.toFixed(1)}%`, "%", "BUDGET", "Budget utilization percentage", 3, "allocated / budget × 100"),
n("budget.weightedCents", "Win-Weighted", fmtEur(budgetStatus.winProbabilityWeightedCents), "EUR", "BUDGET", "Win-probability-weighted cost", 3, "allocated × winProb / 100"),
n(
"input.budgetCents",
"Project Budget",
fmtEur(budgetProject.budgetCents),
"EUR",
"INPUT",
`Budget for ${budgetProject.name}`,
0,
),
n(
"input.winProbability",
"Win Probability",
`${budgetProject.winProbability}%`,
"%",
"INPUT",
"Project win probability",
0,
),
n(
"budget.confirmedCents",
"Confirmed",
fmtEur(budgetStatus.confirmedCents),
"EUR",
"BUDGET",
"Sum of CONFIRMED/ACTIVE allocation costs",
2,
"Σ(confirmed allocs)",
),
n(
"budget.proposedCents",
"Proposed",
fmtEur(budgetStatus.proposedCents),
"EUR",
"BUDGET",
"Sum of PROPOSED allocation costs",
2,
"Σ(proposed allocs)",
),
n(
"budget.allocatedCents",
"Allocated",
fmtEur(budgetStatus.allocatedCents),
"EUR",
"BUDGET",
"Total allocated budget",
2,
"confirmed + proposed",
),
n(
"budget.remainingCents",
"Remaining",
fmtEur(budgetStatus.remainingCents),
"EUR",
"BUDGET",
"Remaining budget",
3,
"budget - allocated",
),
n(
"budget.utilizationPct",
"Utilization",
`${budgetStatus.utilizationPercent.toFixed(1)}%`,
"%",
"BUDGET",
"Budget utilization percentage",
3,
"allocated / budget × 100",
),
n(
"budget.weightedCents",
"Win-Weighted",
fmtEur(budgetStatus.winProbabilityWeightedCents),
"EUR",
"BUDGET",
"Win-probability-weighted cost",
3,
"allocated × winProb / 100",
),
],
links: [
l("alloc.totalCostCents", "budget.confirmedCents", "per assignment", 1),