chore(repo): checkpoint current capakraken implementation state

This commit is contained in:
2026-03-29 12:47:12 +02:00
parent beae1a5d6e
commit 47e4d701ff
94 changed files with 4283 additions and 1710 deletions
+4 -4
View File
@@ -6,7 +6,7 @@
## Problem
The bi-weekly chargeability report is currently produced in Excel. Planarchy needs a **live reporting section** in the app that updates in real-time as assignments, resources, and SAH change. The report is not a static file — it is an interactive page that can be **exported** as Excel or PDF on demand.
The bi-weekly chargeability report is currently produced in Excel. CapaKraken needs a **live reporting section** in the app that updates in real-time as assignments, resources, and SAH change. The report is not a static file — it is an interactive page that can be **exported** as Excel or PDF on demand.
Core requirements:
@@ -98,7 +98,7 @@ SUM(resource.fte * resource.bdPercentage[month])
## Data Requirements
### What Planarchy needs to have (per resource, per month)
### What CapaKraken needs to have (per resource, per month)
| Data Point | Source | Notes |
|---|---|---|
@@ -114,7 +114,7 @@ SUM(resource.fte * resource.bdPercentage[month])
### Forecast Chargeability Derivation
This is the key insight: **predicted chargeability can be derived from what Planarchy already knows**:
This is the key insight: **predicted chargeability can be derived from what CapaKraken already knows**:
```
forecastChg(resource, month) =
@@ -133,7 +133,7 @@ This means the chargeability report is a **query over existing assignments + SAH
For historical data, two options:
1. **Import from SAP**: bulk import of period data (P-1, P-2, etc.) as snapshots
2. **Track in-app**: if Planarchy becomes the system of record for time tracking
2. **Track in-app**: if CapaKraken becomes the system of record for time tracking
Recommendation: Start with SAP import. Add a `ChargeabilitySnapshot` model for imported actuals.
+1 -1
View File
@@ -11,7 +11,7 @@ Projects need to be linked to clients for chargeability reporting, budget tracki
- **WBS Master Client** — the parent organization (e.g. "BMW", "VOLKSWAGEN")
- **WBS Client Name** — the legal entity (e.g. "BMW AG", "Dr. Ing. h.c. F. Porsche AG")
Currently Planarchy has no Client model. Projects exist independently without client attribution.
Currently CapaKraken has no Client model. Projects exist independently without client attribution.
## Data
+1 -1
View File
@@ -6,7 +6,7 @@
## Problem
Planarchy currently uses a flat `hoursPerDay` on allocations. The chargeability reporting model requires:
CapaKraken currently uses a flat `hoursPerDay` on allocations. The chargeability reporting model requires:
- Country-specific daily working hours (8h Germany, 9h India, variable Spain)
- Public holidays per country AND metro city
+1 -1
View File
@@ -16,7 +16,7 @@ Level 5: Content Production (department)
Every resource must be mapped to an Org Unit Level 7. Level 7 rolls up to Level 6, which rolls up to Level 5. The names of org units can change over time, so they must be editable.
Planarchy already has a `Role` model, but roles represent skills/functions (e.g. "3D Artist"), not organizational placement. A person's org unit and their role are different dimensions.
CapaKraken already has a `Role` model, but roles represent skills/functions (e.g. "3D Artist"), not organizational placement. A person's org unit and their role are different dimensions.
## Current Data
+3 -3
View File
@@ -6,7 +6,7 @@
## Goal
Extend Planarchy to support chargeability reporting with country-specific SAH (Standard Available Hours), FTE-based capacity, organizational hierarchy, utilization categories, client/WBS management, and a native chargeability report replacing the current Excel workflow.
Extend CapaKraken to support chargeability reporting with country-specific SAH (Standard Available Hours), FTE-based capacity, organizational hierarchy, utilization categories, client/WBS management, and a native chargeability report replacing the current Excel workflow.
## Plan Documents
@@ -39,7 +39,7 @@ Derivation rules are configurable in admin (which countries map to which reporti
Each project carries a utilization category (Chg, BD, MD&I, etc.). Hours assigned to a project inherit its category for reporting. Unassigned hours = SAH minus all categorized hours.
### Forecast chargeability = derived metric
`forecastChg = hours on Chg projects / SAH`. No manual chargeability entry — it comes from what Planarchy already knows about assignments.
`forecastChg = hours on Chg projects / SAH`. No manual chargeability entry — it comes from what CapaKraken already knows about assignments.
## Dependency Order
@@ -92,7 +92,7 @@ New fields on `Project`:
## Open Questions
1. **Resource Type derivation rules**: The country→reporting-type mapping should be admin-configurable. Exact admin UI TBD.
2. **Win Probability**: The Dispo file mentions it "should contain the value from MMS". Is this relevant for Planarchy? If so, it's a field on Project.
2. **Win Probability**: The Dispo file mentions it "should contain the value from MMS". Is this relevant for CapaKraken? If so, it's a field on Project.
3. **LCR/UCR**: Cost rate definitions are not yet available. Placeholder fields are included.
4. **SAP import format**: What format do SAP period exports come in? CSV? API? Needs clarification for the import mechanism.
5. **FTE history**: Currently single `fte` field. Monthly FTE tracking may be needed if contract changes happen mid-month.
+1 -1
View File
@@ -6,7 +6,7 @@
## Problem
The Dispo Categories file defines a rich set of EID (employee) attributes that Planarchy's Resource model currently does not cover. These attributes are needed for chargeability reporting, resource filtering, and organizational grouping.
The Dispo Categories file defines a rich set of EID (employee) attributes that CapaKraken's Resource model currently does not cover. These attributes are needed for chargeability reporting, resource filtering, and organizational grouping.
## Current Resource Model (relevant fields)
@@ -6,7 +6,7 @@
## Problem
The chargeability report categorizes all work into utilization buckets. Currently Planarchy projects have no utilization classification. Every project needs a utilization category so that hours booked against it flow into the correct reporting bucket.
The chargeability report categorizes all work into utilization buckets. Currently CapaKraken projects have no utilization classification. Every project needs a utilization category so that hours booked against it flow into the correct reporting bucket.
## Utilization Categories
+3 -3
View File
@@ -1,13 +1,13 @@
/**
* Generates skill matrix Excel files for all Planarchy resources.
* Generates skill matrix Excel files for all CapaKraken resources.
* Format matches skillmatrix_formular_example.xlsx exactly.
*/
import { createRequire } from "module";
import { writeFileSync, mkdirSync } from "fs";
const require = createRequire(import.meta.url);
const XLSX = require("/home/hartmut/Documents/Copilot/planarchy/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx.js");
const XLSX = require("/home/hartmut/Documents/Copilot/capakraken/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx.js");
const OUT_DIR = "/home/hartmut/Documents/Copilot/planarchy/samples/skillmatrix_dummydata";
const OUT_DIR = "/home/hartmut/Documents/Copilot/capakraken/samples/skillmatrix_dummydata";
mkdirSync(OUT_DIR, { recursive: true });
// ─── Skill Definitions ─────────────────────────────────────────────────────