@rubytech/create-maxy-code 0.1.277 → 0.1.279
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/platform/config/brand.json +1 -1
- package/payload/platform/plugins/admin/skills/plainly/SKILL.md +33 -16
- package/payload/platform/plugins/admin/skills/plainly/references/worked-examples.md +51 -238
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +2 -1
- package/payload/platform/plugins/business-assistant/PLUGIN.md +4 -0
- package/payload/platform/plugins/business-assistant/references/crm.md +6 -0
- package/payload/platform/plugins/business-assistant/references/e-sign.md +302 -0
- package/payload/platform/plugins/business-assistant/references/site-lead-intake.md +52 -0
- package/payload/platform/plugins/cloudflare/PLUGIN.md +1 -0
- package/payload/platform/plugins/cloudflare/references/api.md +17 -3
- package/payload/platform/plugins/cloudflare/references/dashboard-guide.md +10 -0
- package/payload/platform/plugins/cloudflare/references/web-analytics.md +64 -0
- package/payload/platform/plugins/cloudflare/skills/cloudflare/SKILL.md +1 -0
- package/payload/platform/plugins/docs/references/plugins-guide.md +1 -0
- package/payload/platform/services/whatsapp-channel/dist/notification.d.ts +7 -0
- package/payload/platform/services/whatsapp-channel/dist/notification.d.ts.map +1 -1
- package/payload/platform/services/whatsapp-channel/dist/notification.js +22 -1
- package/payload/platform/services/whatsapp-channel/dist/notification.js.map +1 -1
- package/payload/platform/templates/agents/admin/IDENTITY.md +2 -2
- package/payload/premium-plugins/.claude-plugin/marketplace.json +5 -0
- package/payload/premium-plugins/management-consulting/.claude-plugin/plugin.json +8 -0
- package/payload/premium-plugins/management-consulting/PLUGIN.md +92 -0
- package/payload/premium-plugins/management-consulting/skills/assumption-audit/SKILL.md +54 -0
- package/payload/premium-plugins/management-consulting/skills/business-case-builder/SKILL.md +56 -0
- package/payload/premium-plugins/management-consulting/skills/competitive-intel/SKILL.md +51 -0
- package/payload/premium-plugins/management-consulting/skills/customer-segmentation/SKILL.md +50 -0
- package/payload/premium-plugins/management-consulting/skills/decision-memo/SKILL.md +53 -0
- package/payload/premium-plugins/management-consulting/skills/growth-barriers/SKILL.md +54 -0
- package/payload/premium-plugins/management-consulting/skills/initiative-prioritizer/SKILL.md +51 -0
- package/payload/premium-plugins/management-consulting/skills/kpi-architect/SKILL.md +53 -0
- package/payload/premium-plugins/management-consulting/skills/market-mapping/SKILL.md +56 -0
- package/payload/premium-plugins/management-consulting/skills/narrative-builder/SKILL.md +53 -0
- package/payload/premium-plugins/management-consulting/skills/operating-model-design/SKILL.md +54 -0
- package/payload/premium-plugins/management-consulting/skills/portfolio-review/SKILL.md +52 -0
- package/payload/premium-plugins/management-consulting/skills/pricing-strategy/SKILL.md +55 -0
- package/payload/premium-plugins/management-consulting/skills/profit-pool-analysis/SKILL.md +52 -0
- package/payload/premium-plugins/management-consulting/skills/risk-and-mitigation/SKILL.md +49 -0
- package/payload/premium-plugins/management-consulting/skills/situation-assessment/SKILL.md +55 -0
- package/payload/premium-plugins/management-consulting/skills/stakeholder-alignment/SKILL.md +51 -0
- package/payload/premium-plugins/management-consulting/skills/strategic-options/SKILL.md +53 -0
- package/payload/premium-plugins/management-consulting/skills/transformation-roadmap/SKILL.md +53 -0
- package/payload/premium-plugins/management-consulting/skills/value-realization/SKILL.md +50 -0
- package/payload/premium-plugins/management-consulting/skills/war-gaming/SKILL.md +51 -0
- package/payload/server/public/assets/AdminShell-DnH3kou-.js +1 -0
- package/payload/server/public/assets/{Checkbox-BY2lndUH.js → Checkbox-2reCESkb.js} +1 -1
- package/payload/server/public/assets/{admin-C364q_-g.js → admin-xRCXEFNW.js} +1 -1
- package/payload/server/public/assets/{arc-BW1WhwmV.js → arc-BgelqC_3.js} +1 -1
- package/payload/server/public/assets/architecture-YZFGNWBL-YM-TtgPY.js +1 -0
- package/payload/server/public/assets/{architectureDiagram-Q4EWVU46-CLhiy6Rc.js → architectureDiagram-Q4EWVU46-BabnAZJm.js} +1 -1
- package/payload/server/public/assets/{blockDiagram-DXYQGD6D-ue7Vkc-Q.js → blockDiagram-DXYQGD6D-BJzZqNsy.js} +1 -1
- package/payload/server/public/assets/{browser-D66JrDpx.js → browser-DT2XfRpL.js} +1 -1
- package/payload/server/public/assets/{c4Diagram-AHTNJAMY-dVjuUU_p.js → c4Diagram-AHTNJAMY-By-xuh9F.js} +1 -1
- package/payload/server/public/assets/channel-BRPH0atd.js +1 -0
- package/payload/server/public/assets/{chunk-2KRD3SAO-CKn-bEkI.js → chunk-2KRD3SAO-Gj2dSpBl.js} +1 -1
- package/payload/server/public/assets/{chunk-336JU56O-DLBJaAyL.js → chunk-336JU56O-2PXVPCUA.js} +2 -2
- package/payload/server/public/assets/chunk-426QAEUC-QhauxjvK.js +1 -0
- package/payload/server/public/assets/{chunk-4BX2VUAB-B2mSmC97.js → chunk-4BX2VUAB-9XIBlnC2.js} +1 -1
- package/payload/server/public/assets/{chunk-4TB4RGXK-DPHoq8nE.js → chunk-4TB4RGXK-Cr3mXPnI.js} +1 -1
- package/payload/server/public/assets/{chunk-55IACEB6-JLT9m7Hd.js → chunk-55IACEB6-Ccg46J3A.js} +1 -1
- package/payload/server/public/assets/{chunk-5FUZZQ4R-DjxdZ8WO.js → chunk-5FUZZQ4R-Cz9MvPKc.js} +1 -1
- package/payload/server/public/assets/{chunk-5PVQY5BW-BujJUZqf.js → chunk-5PVQY5BW-BleOdlgO.js} +1 -1
- package/payload/server/public/assets/{chunk-67CJDMHE-CCdP3Pdx.js → chunk-67CJDMHE-CyCYCQWy.js} +1 -1
- package/payload/server/public/assets/{chunk-7N4EOEYR-bXgVzdM9.js → chunk-7N4EOEYR-KpT3uHzH.js} +1 -1
- package/payload/server/public/assets/{chunk-AA7GKIK3-CYeDvY8B.js → chunk-AA7GKIK3-BfOzbuxq.js} +1 -1
- package/payload/server/public/assets/{chunk-BSJP7CBP-U0Fi-Ers.js → chunk-BSJP7CBP-Bq0M3wlv.js} +1 -1
- package/payload/server/public/assets/{chunk-CIAEETIT-C8QrV6Gg.js → chunk-CIAEETIT-CR-2dNaL.js} +1 -1
- package/payload/server/public/assets/{chunk-EDXVE4YY-DF2EBXie.js → chunk-EDXVE4YY-egUGMTOS.js} +1 -1
- package/payload/server/public/assets/{chunk-ENJZ2VHE-CoTooXpM.js → chunk-ENJZ2VHE-CQohBEFw.js} +1 -1
- package/payload/server/public/assets/{chunk-FMBD7UC4-DxAQS3UB.js → chunk-FMBD7UC4-DIxBUbLP.js} +1 -1
- package/payload/server/public/assets/{chunk-FOC6F5B3-CyIK3zeY.js → chunk-FOC6F5B3-C2694Zoq.js} +1 -1
- package/payload/server/public/assets/{chunk-ICPOFSXX-D8F-S9Bk.js → chunk-ICPOFSXX-DpXZKHyn.js} +2 -2
- package/payload/server/public/assets/{chunk-K5T4RW27-7GcDzjyJ.js → chunk-K5T4RW27-CUicG0Rp.js} +1 -1
- package/payload/server/public/assets/{chunk-KGLVRYIC-B7pAr9hf.js → chunk-KGLVRYIC-B5mPJhOr.js} +1 -1
- package/payload/server/public/assets/{chunk-LIHQZDEY-DEoU2jrz.js → chunk-LIHQZDEY-q81QhuMs.js} +1 -1
- package/payload/server/public/assets/{chunk-ORNJ4GCN-BwMFuN24.js → chunk-ORNJ4GCN-DgurdFZs.js} +1 -1
- package/payload/server/public/assets/{chunk-OYMX7WX6-C15Ps-tC.js → chunk-OYMX7WX6-CxqMRu2d.js} +1 -1
- package/payload/server/public/assets/chunk-QZHKN3VN-BDAQvtxz.js +1 -0
- package/payload/server/public/assets/{chunk-U2HBQHQK-BBPMxdAI.js → chunk-U2HBQHQK-BSLctJC9.js} +1 -1
- package/payload/server/public/assets/{chunk-X2U36JSP-xwRszlfe.js → chunk-X2U36JSP--0AUeeFl.js} +1 -1
- package/payload/server/public/assets/{chunk-XPW4576I-BA0a8Ygs.js → chunk-XPW4576I-D-hf9Bcn.js} +1 -1
- package/payload/server/public/assets/{chunk-YZCP3GAM-C4liAf7D.js → chunk-YZCP3GAM-PvOhSwI9.js} +1 -1
- package/payload/server/public/assets/{chunk-ZZ45TVLE-Cy3If_Rl.js → chunk-ZZ45TVLE-1zPUlNWz.js} +1 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q-BJv89PB6.js +1 -0
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-DNUszH5M.js +1 -0
- package/payload/server/public/assets/clone-CREg9jLM.js +1 -0
- package/payload/server/public/assets/{cose-bilkent-S5V4N54A-Df_JmB8E.js → cose-bilkent-S5V4N54A-Cvo-gkBd.js} +1 -1
- package/payload/server/public/assets/{dagre-DKCdgCLD.js → dagre-CMHsNfjP.js} +1 -1
- package/payload/server/public/assets/{dagre-KV5264BT-DHZ3rA0O.js → dagre-KV5264BT-CM1DSx4E.js} +1 -1
- package/payload/server/public/assets/{data-uiOcPh8T.js → data-Dr7XUvAx.js} +1 -1
- package/payload/server/public/assets/{diagram-5BDNPKRD-XAci8Krv.js → diagram-5BDNPKRD-VDHiHwEI.js} +1 -1
- package/payload/server/public/assets/{diagram-G4DWMVQ6-DI6g5YJH.js → diagram-G4DWMVQ6-OKdufoeW.js} +1 -1
- package/payload/server/public/assets/{diagram-MMDJMWI5-D94oS42o.js → diagram-MMDJMWI5-Yg6QdCA1.js} +1 -1
- package/payload/server/public/assets/{diagram-TYMM5635-D_j5_oj_.js → diagram-TYMM5635-CpEMZQDu.js} +1 -1
- package/payload/server/public/assets/{dist-BmvZ8OaX.js → dist-811BIK0R.js} +1 -1
- package/payload/server/public/assets/{erDiagram-SMLLAGMA-DPx8cHxF.js → erDiagram-SMLLAGMA-Dw5gAkFM.js} +1 -1
- package/payload/server/public/assets/{flatten-Bo6YRmWl.js → flatten-BsWEYbBB.js} +1 -1
- package/payload/server/public/assets/{flowDiagram-DWJPFMVM-Cdfxz2_5.js → flowDiagram-DWJPFMVM-Cy_R1XHz.js} +1 -1
- package/payload/server/public/assets/{ganttDiagram-T4ZO3ILL-oregwFNl.js → ganttDiagram-T4ZO3ILL-BYARP_eH.js} +1 -1
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-CtOPqykB.js +1 -0
- package/payload/server/public/assets/{gitGraphDiagram-UUTBAWPF-BZI26T0o.js → gitGraphDiagram-UUTBAWPF-BGOe0unY.js} +1 -1
- package/payload/server/public/assets/{graph-BSHyF267.js → graph-DOEjjQHD.js} +2 -2
- package/payload/server/public/assets/{graph-labels-D5ecmK-Z.js → graph-labels-eOrWYy0R.js} +1 -1
- package/payload/server/public/assets/{graphlib-BuiXJGQr.js → graphlib-DaefxCga.js} +1 -1
- package/payload/server/public/assets/info-OMHHGYJF-Jba5enA8.js +1 -0
- package/payload/server/public/assets/infoDiagram-42DDH7IO-Df9BlkPA.js +2 -0
- package/payload/server/public/assets/{isEmpty-D6Kr-M1M.js → isEmpty-BWl67LAZ.js} +1 -1
- package/payload/server/public/assets/{ishikawaDiagram-UXIWVN3A-DnBy6cze.js → ishikawaDiagram-UXIWVN3A-YrGuzpiI.js} +1 -1
- package/payload/server/public/assets/{journeyDiagram-VCZTEJTY-DeYkJsvd.js → journeyDiagram-VCZTEJTY-EIykOcqg.js} +1 -1
- package/payload/server/public/assets/{kanban-definition-6JOO6SKY-BHuZmXiA.js → kanban-definition-6JOO6SKY-BR0TC6Je.js} +1 -1
- package/payload/server/public/assets/{line-BAjS0lyG.js → line-DPGcT5IM.js} +1 -1
- package/payload/server/public/assets/{linear-COm19-p7.js → linear-CPN03uSh.js} +1 -1
- package/payload/server/public/assets/{mermaid-parser.core-Cg06vNXY.js → mermaid-parser.core-D7Iu4c9M.js} +2 -2
- package/payload/server/public/assets/{mermaid.core-DkUCZA6N.js → mermaid.core-krXRpXn9.js} +3 -3
- package/payload/server/public/assets/{mindmap-definition-QFDTVHPH-Gbaa7NRj.js → mindmap-definition-QFDTVHPH-HwiCtPzN.js} +1 -1
- package/payload/server/public/assets/{ordinal-BDi6f4xk.js → ordinal-krseTxxN.js} +1 -1
- package/payload/server/public/assets/packet-4T2RLAQJ-D_eWzeAP.js +1 -0
- package/payload/server/public/assets/pie-ZZUOXDRM-BDiy1Ob2.js +1 -0
- package/payload/server/public/assets/{pieDiagram-DEJITSTG-v7yUgLoq.js → pieDiagram-DEJITSTG-xodxyWLe.js} +1 -1
- package/payload/server/public/assets/{public-CTkj6UYK.js → public-xVaPcg6i.js} +3 -3
- package/payload/server/public/assets/{quadrantDiagram-34T5L4WZ-BpVlNbru.js → quadrantDiagram-34T5L4WZ-DuYYY4ZZ.js} +1 -1
- package/payload/server/public/assets/radar-PYXPWWZC-C5mlfmtg.js +1 -0
- package/payload/server/public/assets/{reduce-CGi9ik8i.js → reduce-tk-xY6Fv.js} +1 -1
- package/payload/server/public/assets/{requirementDiagram-MS252O5E-QrSZzaxF.js → requirementDiagram-MS252O5E-D0ta3kru.js} +1 -1
- package/payload/server/public/assets/{sankeyDiagram-XADWPNL6-IVgJCKl1.js → sankeyDiagram-XADWPNL6-KdHdlzvT.js} +1 -1
- package/payload/server/public/assets/{sequenceDiagram-FGHM5R23-DsN4J_nq.js → sequenceDiagram-FGHM5R23-DoSFUTQZ.js} +1 -1
- package/payload/server/public/assets/{src-DLEIsjER.js → src-Cpl1JzME.js} +1 -1
- package/payload/server/public/assets/{stateDiagram-FHFEXIEX-DN0-8ZrI.js → stateDiagram-FHFEXIEX-BLW0KiSA.js} +1 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-C5zlCV4X.js +1 -0
- package/payload/server/public/assets/{timeline-definition-GMOUNBTQ-BLYu380r.js → timeline-definition-GMOUNBTQ-8QAzhYz1.js} +1 -1
- package/payload/server/public/assets/treeView-SZITEDCU-CM-9m-cS.js +1 -0
- package/payload/server/public/assets/treemap-W4RFUUIX-DDHPB-Xh.js +1 -0
- package/payload/server/public/assets/{useSelectionMode-98jrB9kD.css → useSelectionMode-BnRcJeg2.css} +1 -1
- package/payload/server/public/assets/{useSelectionMode-80iYuGPa.js → useSelectionMode-DlJsX-_X.js} +1 -1
- package/payload/server/public/assets/{vennDiagram-DHZGUBPP-Tfn8qVAB.js → vennDiagram-DHZGUBPP-BKvfScOi.js} +1 -1
- package/payload/server/public/assets/wardley-RL74JXVD-CUb3Br4q.js +1 -0
- package/payload/server/public/assets/{wardleyDiagram-NUSXRM2D-CeQNnKpT.js → wardleyDiagram-NUSXRM2D-DaMfDpJ3.js} +1 -1
- package/payload/server/public/assets/whatsapp-cDxgZkbM.js +1 -0
- package/payload/server/public/assets/{xychartDiagram-5P7HB3ND-H-IatOB_.js → xychartDiagram-5P7HB3ND-BIkNQlLa.js} +1 -1
- package/payload/server/public/browser.html +5 -5
- package/payload/server/public/data.html +6 -6
- package/payload/server/public/graph.html +7 -7
- package/payload/server/public/index.html +6 -6
- package/payload/server/public/public.html +5 -5
- package/payload/server/public/whatsapp.html +18 -0
- package/payload/server/server.js +1022 -800
- package/payload/server/public/assets/AdminShell-BcHJy_Y2.js +0 -1
- package/payload/server/public/assets/architecture-YZFGNWBL-xHbVjatf.js +0 -1
- package/payload/server/public/assets/channel-1FBBBcz1.js +0 -1
- package/payload/server/public/assets/chunk-426QAEUC-CfdaOTNb.js +0 -1
- package/payload/server/public/assets/chunk-QZHKN3VN-CHE_iZO7.js +0 -1
- package/payload/server/public/assets/classDiagram-6PBFFD2Q--mLJq--t.js +0 -1
- package/payload/server/public/assets/classDiagram-v2-HSJHXN6E-C8TJtMFc.js +0 -1
- package/payload/server/public/assets/clone-UUs4PDQ1.js +0 -1
- package/payload/server/public/assets/gitGraph-7Q5UKJZL-CmHdoS27.js +0 -1
- package/payload/server/public/assets/info-OMHHGYJF-DTA9msO-.js +0 -1
- package/payload/server/public/assets/infoDiagram-42DDH7IO-C9cKcMg3.js +0 -2
- package/payload/server/public/assets/packet-4T2RLAQJ-6GjqIKgu.js +0 -1
- package/payload/server/public/assets/pie-ZZUOXDRM-T72DJ5JR.js +0 -1
- package/payload/server/public/assets/radar-PYXPWWZC-x-6xW1dE.js +0 -1
- package/payload/server/public/assets/stateDiagram-v2-QKLJ7IA2-DGDGYxGd.js +0 -1
- package/payload/server/public/assets/treeView-SZITEDCU-5-6wEryJ.js +0 -1
- package/payload/server/public/assets/treemap-W4RFUUIX-DF48Cc86.js +0 -1
- package/payload/server/public/assets/wardley-RL74JXVD-duKIa6Hq.js +0 -1
- /package/payload/server/public/assets/{_baseFor-Cam2PbSt.js → _baseFor-BHtDrjIo.js} +0 -0
- /package/payload/server/public/assets/{array-DYRGGQae.js → array-DetWRiSa.js} +0 -0
- /package/payload/server/public/assets/{chunk-CnGqDkHZ.js → chunk-CWOGyPgy.js} +0 -0
- /package/payload/server/public/assets/{cytoscape.esm-nWsJMTNI.js → cytoscape.esm-C9yNhe1u.js} +0 -0
- /package/payload/server/public/assets/{defaultLocale-Du1XY3Dp.js → defaultLocale-_WRwicXn.js} +0 -0
- /package/payload/server/public/assets/{init-B5BXBRcm.js → init-sTEcj9YX.js} +0 -0
- /package/payload/server/public/assets/{katex-HOUACuRw.js → katex-s61Rgv6l.js} +0 -0
- /package/payload/server/public/assets/{path-CNO468J-.js → path-B0Ik7Tu9.js} +0 -0
- /package/payload/server/public/assets/{rough.esm-DRO6hWPh.js → rough.esm-DKRO8IF-.js} +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: operating-model-design
|
|
3
|
+
description: Translates strategy into capabilities, roles, decision rights, governance, processes, and ways of working. Use for operating model design, org design, governance, capability model, decision rights, transformation design, or execution model questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Operating Model Design
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when a strategy is clear but the organization needs to know how work should happen. It fits transformations, growth plays, new business units, functional redesigns, and scale-up challenges.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Start with the strategy and required capabilities. Then design decision rights, roles, governance, processes, metrics, and enabling systems around those capabilities.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Define the strategy the operating model must support.
|
|
19
|
+
2. Identify required capabilities.
|
|
20
|
+
3. Diagnose current operating model gaps.
|
|
21
|
+
4. Design target roles, decision rights, governance, processes, and metrics.
|
|
22
|
+
5. Identify transition risks and capability build needs.
|
|
23
|
+
6. Recommend implementation phases.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Operating Model Design
|
|
29
|
+
|
|
30
|
+
## Strategic Requirement
|
|
31
|
+
[What the model must enable.]
|
|
32
|
+
|
|
33
|
+
## Capability Model
|
|
34
|
+
| Capability | Current State | Required State | Gap |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Target Model
|
|
38
|
+
| Element | Recommendation | Rationale |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
|
|
41
|
+
## Decision Rights
|
|
42
|
+
| Decision | Owner | Contributors | Governance |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
|
|
45
|
+
## Transition Plan
|
|
46
|
+
[Phases, risks, and first moves.]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Quality Bar
|
|
50
|
+
|
|
51
|
+
- Link every design choice to strategy.
|
|
52
|
+
- Make decision rights explicit.
|
|
53
|
+
- Include governance and metrics, not only org boxes.
|
|
54
|
+
- Show transition risks and sequencing.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: portfolio-review
|
|
3
|
+
description: Reviews a portfolio of markets, products, initiatives, customers, or bets and recommends allocation choices. Use for portfolio review, product portfolio, market portfolio, initiative portfolio, capital allocation, resource allocation, or "where should we invest?" questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Portfolio Review
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when the user needs to assess a set of businesses, products, markets, initiatives, or strategic bets and decide where to invest, hold, fix, or exit.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Compare portfolio elements on attractiveness, performance, strategic fit, right to win, and resource needs. Recommend allocation choices, not just rankings.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Define the portfolio and decision question.
|
|
19
|
+
2. Select evaluation criteria.
|
|
20
|
+
3. Score each portfolio element.
|
|
21
|
+
4. Identify invest, maintain, fix, harvest, and exit candidates.
|
|
22
|
+
5. Assess resource reallocation implications.
|
|
23
|
+
6. Recommend portfolio moves and next decisions.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Portfolio Review
|
|
29
|
+
|
|
30
|
+
## Portfolio Scope
|
|
31
|
+
[What is included and excluded.]
|
|
32
|
+
|
|
33
|
+
## Evaluation Matrix
|
|
34
|
+
| Item | Attractiveness | Performance | Fit | Right To Win | Recommendation |
|
|
35
|
+
|---|---|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Allocation Moves
|
|
38
|
+
| Move | Rationale | Resource Implication |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
|
|
41
|
+
## Decisions Required
|
|
42
|
+
1. [Decision]
|
|
43
|
+
2. [Decision]
|
|
44
|
+
3. [Decision]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Quality Bar
|
|
48
|
+
|
|
49
|
+
- Use consistent criteria across the portfolio.
|
|
50
|
+
- Separate performance from attractiveness.
|
|
51
|
+
- Recommend allocation actions.
|
|
52
|
+
- Name the trade-offs created by reallocating resources.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pricing-strategy
|
|
3
|
+
description: Diagnoses pricing power, willingness to pay, discounting, packaging, and monetization opportunities. Use for pricing strategy, discount leakage, monetization, packaging, price increase, value pricing, renewal pricing, or margin improvement.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Pricing Strategy
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when the user needs to improve monetization, diagnose discounting, raise prices, redesign packaging, or understand willingness to pay.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Connect price to value, customer segments, competitive alternatives, and sales behavior. Separate list price, realized price, discounting, mix, and packaging.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Define the pricing question and economic objective.
|
|
19
|
+
2. Gather price architecture, discount data, win-loss, churn, margin, and competitor context.
|
|
20
|
+
3. Diagnose leakage across list price, discounting, mix, packaging, and governance.
|
|
21
|
+
4. Assess willingness to pay by segment or use case.
|
|
22
|
+
5. Generate pricing moves and risks.
|
|
23
|
+
6. Recommend a pricing action plan and test design.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Pricing Strategy
|
|
29
|
+
|
|
30
|
+
## Pricing Objective
|
|
31
|
+
[Growth, margin, retention, adoption, or simplification.]
|
|
32
|
+
|
|
33
|
+
## Diagnosis
|
|
34
|
+
| Area | Evidence | Issue | Impact |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Segment Price Logic
|
|
38
|
+
| Segment | Value Driver | WTP Signal | Pricing Move |
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
|
|
41
|
+
## Recommended Moves
|
|
42
|
+
1. [Move]
|
|
43
|
+
2. [Move]
|
|
44
|
+
3. [Move]
|
|
45
|
+
|
|
46
|
+
## Risks and Tests
|
|
47
|
+
[Risks, mitigations, and pilot design.]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Quality Bar
|
|
51
|
+
|
|
52
|
+
- Do not recommend a price move without segment logic.
|
|
53
|
+
- Separate price realization from list pricing.
|
|
54
|
+
- Include customer risk and sales execution risk.
|
|
55
|
+
- Recommend a test or rollout sequence.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: profit-pool-analysis
|
|
3
|
+
description: Maps where profit is created, captured, and leaking across a market, product set, customer base, or value chain. Use for profit pool analysis, margin strategy, value chain economics, where-to-play, pricing power, or strategic attractiveness.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Profit Pool Analysis
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when revenue size alone is misleading and the user needs to know where attractive profit actually sits. It fits market entry, product portfolio, channel, value chain, and segment strategy questions.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Follow the money across the system. Separate revenue pools from profit pools, identify who captures value, and connect economics to strategic choices.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Define the market, value chain, product set, or customer base.
|
|
19
|
+
2. Map revenue and margin by activity, segment, product, channel, or customer group.
|
|
20
|
+
3. Identify profit concentration and leakage points.
|
|
21
|
+
4. Assess structural drivers: scale, pricing power, cost position, switching costs, and competitive intensity.
|
|
22
|
+
5. Identify attractive and unattractive pools.
|
|
23
|
+
6. Recommend strategic implications.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Profit Pool Analysis
|
|
29
|
+
|
|
30
|
+
## Scope
|
|
31
|
+
[Market, products, customers, or value chain included.]
|
|
32
|
+
|
|
33
|
+
## Profit Pool Map
|
|
34
|
+
| Pool | Revenue | Margin | Profit | Growth | Attractiveness |
|
|
35
|
+
|---|---|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Value Capture
|
|
38
|
+
| Player or activity | Value captured | Reason |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
|
|
41
|
+
## Strategic Implications
|
|
42
|
+
1. [Where to play]
|
|
43
|
+
2. [Where to avoid]
|
|
44
|
+
3. [How to improve capture]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Quality Bar
|
|
48
|
+
|
|
49
|
+
- Do not confuse revenue size with attractiveness.
|
|
50
|
+
- Show margin and profit, not only growth.
|
|
51
|
+
- Explain the structural reason profit concentrates.
|
|
52
|
+
- Tie findings to allocation or positioning decisions.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: risk-and-mitigation
|
|
3
|
+
description: Builds a strategic risk register with likelihood, impact, mitigations, triggers, owners, and contingency moves. Use for strategy risk, mitigation planning, risk register, board risk review, launch risk, execution risk, or "what could go wrong?" questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Risk and Mitigation
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when a strategy or initiative needs a serious risk view before approval or execution. It fits board materials, launch planning, transformation governance, and investment decisions.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Treat risk as part of the strategy, not a compliance appendix. Prioritize risks that could change the decision, economics, timing, or feasibility.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Define the strategy or initiative under review.
|
|
19
|
+
2. Identify risk categories: market, customer, competitor, financial, operational, regulatory, organizational.
|
|
20
|
+
3. Score likelihood and impact.
|
|
21
|
+
4. Define mitigations, triggers, owners, and contingency actions.
|
|
22
|
+
5. Identify residual risk after mitigation.
|
|
23
|
+
6. Recommend go, no-go, redesign, or gated approval.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Strategic Risk Register
|
|
29
|
+
|
|
30
|
+
## Strategy Under Review
|
|
31
|
+
[Brief summary.]
|
|
32
|
+
|
|
33
|
+
## Risk Register
|
|
34
|
+
| Risk | Likelihood | Impact | Mitigation | Owner | Trigger |
|
|
35
|
+
|---|---|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Highest-Risk Assumptions
|
|
38
|
+
[Assumptions that need testing.]
|
|
39
|
+
|
|
40
|
+
## Contingency Moves
|
|
41
|
+
[Actions to take if triggers occur.]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quality Bar
|
|
45
|
+
|
|
46
|
+
- Focus on risks that change decisions.
|
|
47
|
+
- Include triggers and owners.
|
|
48
|
+
- Show residual risk after mitigation.
|
|
49
|
+
- Avoid generic risk language.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: situation-assessment
|
|
3
|
+
description: Establishes a fact-based baseline for an existing business, market, product, or function. Use when the user asks for a situation assessment, current-state diagnosis, business health check, momentum review, strategic baseline, or "where are we really?" analysis. Diagnoses an operating business or function, not the validation of a brand-new startup idea.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Situation Assessment
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when the user needs a defensible read of the current situation before choosing a strategy. Typical cases include business reviews, turnaround diagnosis, market position checks, operating performance reviews, and board preparation.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Build the fact base before debating solutions. Separate facts, interpretations, and open questions. Look across financial performance, market position, customer momentum, competitive posture, operating health, and organizational constraints.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Frame the assessment question and decision context.
|
|
19
|
+
2. Ask for available facts: financials, KPIs, market data, customer signals, competitive context, and recent changes.
|
|
20
|
+
3. Build a MECE current-state view across performance, market, customers, operations, and organization.
|
|
21
|
+
4. Identify the few facts that matter most for the decision.
|
|
22
|
+
5. Separate confirmed facts from hypotheses and unknowns.
|
|
23
|
+
6. Produce a situation read with implications and next diagnostic questions.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Situation Assessment
|
|
29
|
+
|
|
30
|
+
## Executive Read
|
|
31
|
+
[One paragraph on where the business is and why it matters.]
|
|
32
|
+
|
|
33
|
+
## Fact Base
|
|
34
|
+
| Area | Evidence | Interpretation | Confidence |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Momentum Signals
|
|
38
|
+
| Signal | Direction | Why It Matters |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
|
|
41
|
+
## Strategic Issues
|
|
42
|
+
1. [Issue]
|
|
43
|
+
2. [Issue]
|
|
44
|
+
3. [Issue]
|
|
45
|
+
|
|
46
|
+
## Open Questions
|
|
47
|
+
[Questions that must be answered before committing to a strategy.]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Quality Bar
|
|
51
|
+
|
|
52
|
+
- Do not recommend before establishing the baseline.
|
|
53
|
+
- Label facts, interpretations, and assumptions separately.
|
|
54
|
+
- Highlight trend and momentum, not only point-in-time performance.
|
|
55
|
+
- End with implications for the decision.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stakeholder-alignment
|
|
3
|
+
description: Maps stakeholders, decision criteria, influence paths, concerns, and pre-wire actions needed to win support. Use for stakeholder alignment, executive buy-in, pre-wiring, change management, board approval, leadership alignment, or "how do we get this approved?" questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Stakeholder Alignment
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when a recommendation must win support across leaders, functions, investors, board members, customers, or implementation owners.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Win the room before the meeting. Understand who must say yes, what each person needs to believe, where resistance will come from, and what engagement must happen in advance.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Define the decision and approval path.
|
|
19
|
+
2. Identify stakeholders and influence relationships.
|
|
20
|
+
3. Map each stakeholder's interests, likely concerns, and decision criteria.
|
|
21
|
+
4. Assess support level and influence.
|
|
22
|
+
5. Build a pre-wire plan.
|
|
23
|
+
6. Prepare messages and objections by stakeholder.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Stakeholder Alignment Plan
|
|
29
|
+
|
|
30
|
+
## Decision Path
|
|
31
|
+
[Who decides, who influences, and when.]
|
|
32
|
+
|
|
33
|
+
## Stakeholder Map
|
|
34
|
+
| Stakeholder | Role | Influence | Current Stance | What They Need To Hear |
|
|
35
|
+
|---|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Resistance Points
|
|
38
|
+
| Concern | Who Holds It | Response |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
|
|
41
|
+
## Pre-Wire Plan
|
|
42
|
+
| Action | Owner | Timing | Desired Outcome |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Quality Bar
|
|
47
|
+
|
|
48
|
+
- Map influence, not only org hierarchy.
|
|
49
|
+
- Identify what each stakeholder needs to believe.
|
|
50
|
+
- Include objections and responses.
|
|
51
|
+
- Sequence engagement before the formal meeting.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: strategic-options
|
|
3
|
+
description: Generates and compares strategic options with clear decision criteria, trade-offs, and recommendation logic. Use for strategy options, path selection, growth choices, market entry choices, build-buy-partner, or "what are our options?" questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Strategic Options
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when the user needs alternatives before committing to a strategy. It helps avoid false binaries and creates a defensible path from options to recommendation.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Develop a small set of distinct, viable options. Compare them against decision criteria that matter. Recommend a path with trade-offs visible.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Clarify the strategic decision and constraints.
|
|
19
|
+
2. Generate mutually distinct options.
|
|
20
|
+
3. Define decision criteria.
|
|
21
|
+
4. Assess each option against attractiveness, feasibility, risk, economics, and strategic fit.
|
|
22
|
+
5. Identify hybrids or sequencing if useful.
|
|
23
|
+
6. Recommend the best path and what must be true.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Strategic Options
|
|
29
|
+
|
|
30
|
+
## Decision
|
|
31
|
+
[Decision being made.]
|
|
32
|
+
|
|
33
|
+
## Options
|
|
34
|
+
| Option | Description | Upside | Trade-Off | What Must Be True |
|
|
35
|
+
|---|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Evaluation
|
|
38
|
+
| Criteria | Option A | Option B | Option C |
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
|
|
41
|
+
## Recommendation
|
|
42
|
+
[Preferred option and rationale.]
|
|
43
|
+
|
|
44
|
+
## Next Tests
|
|
45
|
+
[Evidence needed before committing.]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Quality Bar
|
|
49
|
+
|
|
50
|
+
- Options must be meaningfully different.
|
|
51
|
+
- Criteria must reflect the user's decision, not generic attractiveness.
|
|
52
|
+
- Include trade-offs and risks.
|
|
53
|
+
- State what evidence would change the recommendation.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: transformation-roadmap
|
|
3
|
+
description: Converts strategy into sequenced workstreams, phases, milestones, owners, dependencies, risks, and governance. Use for transformation roadmap, implementation plan, change program, PMO setup, strategic execution, or "how do we make this happen?" questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Transformation Roadmap
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when a strategy needs to become a delivery plan. It fits operating transformations, growth programs, cost programs, digital transformations, post-merger integration, and capability builds.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Translate the recommendation into phases that create value while reducing execution risk. Make owners, milestones, dependencies, and governance explicit.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Define the strategic goal and target outcomes.
|
|
19
|
+
2. Identify workstreams and capabilities required.
|
|
20
|
+
3. Sequence phases by value, dependency, and readiness.
|
|
21
|
+
4. Assign owners, milestones, and decision gates.
|
|
22
|
+
5. Identify risks, dependencies, and governance.
|
|
23
|
+
6. Produce a roadmap and first 90-day plan.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Transformation Roadmap
|
|
29
|
+
|
|
30
|
+
## Target Outcome
|
|
31
|
+
[What must change and by when.]
|
|
32
|
+
|
|
33
|
+
## Workstreams
|
|
34
|
+
| Workstream | Objective | Owner | Key Dependency |
|
|
35
|
+
|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Roadmap
|
|
38
|
+
| Phase | Timing | Major Actions | Milestones |
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
|
|
41
|
+
## First 90 Days
|
|
42
|
+
[Immediate actions and decision gates.]
|
|
43
|
+
|
|
44
|
+
## Governance
|
|
45
|
+
[Cadence, escalation, metrics, and owners.]
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Quality Bar
|
|
49
|
+
|
|
50
|
+
- Sequence by dependency and value.
|
|
51
|
+
- Include first 90 days.
|
|
52
|
+
- Assign owners and decision gates.
|
|
53
|
+
- Make governance visible.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: value-realization
|
|
3
|
+
description: Defines how strategic value will be tracked, owned, measured, and captured after launch. Use for value realization, benefits tracking, synergy capture, transformation value, KPI governance, post-launch tracking, or "how do we make benefits stick?" questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Value Realization
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill when a strategy, transformation, acquisition, or initiative needs benefits that are measurable and owned after approval.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Move from promised value to captured value. Define the value ledger, owners, metrics, timing, proof standard, and governance cadence.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Define the value ambition and benefit categories.
|
|
19
|
+
2. Identify value drivers and initiatives.
|
|
20
|
+
3. Assign owners and measurement methods.
|
|
21
|
+
4. Set baselines, targets, and timing.
|
|
22
|
+
5. Define governance and escalation.
|
|
23
|
+
6. Produce the value realization plan.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Value Realization Plan
|
|
29
|
+
|
|
30
|
+
## Value Ambition
|
|
31
|
+
[Target value and timing.]
|
|
32
|
+
|
|
33
|
+
## Value Ledger
|
|
34
|
+
| Benefit | Baseline | Target | Owner | Proof Standard |
|
|
35
|
+
|---|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Governance
|
|
38
|
+
| Cadence | Participants | Decisions |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
|
|
41
|
+
## Risks To Capture
|
|
42
|
+
[What could prevent value from being realized.]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Quality Bar
|
|
46
|
+
|
|
47
|
+
- Define baseline and target.
|
|
48
|
+
- Assign owners for value, not only activity.
|
|
49
|
+
- Separate one-time and recurring benefits.
|
|
50
|
+
- Include governance and escalation triggers.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: war-gaming
|
|
3
|
+
description: Stress-tests strategy against competitor moves, market shifts, customer reactions, regulatory changes, and execution failure. Use for war gaming, scenario planning, strategy stress test, competitive response, risk scenarios, or "what could break this strategy?" questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# War Gaming
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill before committing to a strategy that could be disrupted by rivals, market shifts, execution failure, regulation, customer response, or capital constraints.
|
|
11
|
+
|
|
12
|
+
## McKinsey-Style Approach
|
|
13
|
+
|
|
14
|
+
Pressure-test the strategy before reality does. Simulate likely and high-impact scenarios, identify weak points, and pre-commit response moves.
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Define the strategy to test.
|
|
19
|
+
2. Identify scenario dimensions: competitor, customer, market, regulatory, operational, financial.
|
|
20
|
+
3. Build base, adverse, and aggressive scenarios.
|
|
21
|
+
4. Assess impact on economics and strategic logic.
|
|
22
|
+
5. Identify early warning signals.
|
|
23
|
+
6. Recommend defensive and offensive responses.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# Strategy War Game
|
|
29
|
+
|
|
30
|
+
## Strategy Under Test
|
|
31
|
+
[Strategy summary.]
|
|
32
|
+
|
|
33
|
+
## Scenarios
|
|
34
|
+
| Scenario | Trigger | Impact | Likelihood | Severity |
|
|
35
|
+
|---|---|---|---|---|
|
|
36
|
+
|
|
37
|
+
## Vulnerabilities
|
|
38
|
+
| Weak Point | Why It Matters | Mitigation |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
|
|
41
|
+
## Response Playbook
|
|
42
|
+
| Signal | Response | Owner |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Quality Bar
|
|
47
|
+
|
|
48
|
+
- Include likely scenarios and painful scenarios.
|
|
49
|
+
- Make early warning signals observable.
|
|
50
|
+
- Tie responses to owners and decisions.
|
|
51
|
+
- Do not turn the output into a generic risk list.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./chunk-CWOGyPgy.js";import{d as t,f as n,l as r,m as i,o as a,r as o,t as s,u as c}from"./useSelectionMode-DlJsX-_X.js";var l=n(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),u=n(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),d=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),f=n(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),p=n(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),m=n(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),h=n(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),g=n(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),_=n(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),v=n(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),y=n(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),b=n(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),x=n(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),ee=n(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),S=n(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),te=n(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),C=n(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),w=n(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),T=n(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),ne=n(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),E=n(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),D=e(i(),1),O=r(),k=`maxy-shell-side-px`;function A(){if(typeof window>`u`)return 0;let e=document.querySelector(`.platform > .artefact`)?.getBoundingClientRect();return e&&e.width>0?Math.round(e.width):0}function j(e){if(typeof window>`u`)return e;let t=window.innerWidth,n=Math.max(248,t-480-A());return Math.min(Math.max(e,248),n)}function re(){if(typeof window>`u`)return 264;try{let e=window.localStorage.getItem(k);if(!e)return 264;let t=parseInt(e,10);if(Number.isFinite(t)&&t>=248)return j(t)}catch{}return 264}function M({targetSelector:e=`.platform`}){let t=(0,D.useRef)(null),[n,r]=(0,D.useState)(()=>re()),i=(0,D.useRef)(n);(0,D.useEffect)(()=>{let t=document.querySelector(e);!t||!(t instanceof HTMLElement)||(t.style.setProperty(`--side-px`,`${n}px`),i.current=n)},[n,e]);let a=(0,D.useCallback)(()=>{r(e=>{let t=j(e);return t===e?e:t})},[]);(0,D.useEffect)(()=>{a(),window.addEventListener(`resize`,a);let t=document.querySelector(e),n=null;return t instanceof HTMLElement&&(n=new MutationObserver(a),n.observe(t,{attributes:!0,attributeFilter:[`data-artefact`,`class`]})),()=>{window.removeEventListener(`resize`,a),n?.disconnect()}},[a,e]);let o=e=>{e.preventDefault();let n=t.current;if(!n)return;n.setPointerCapture(e.pointerId),n.classList.add(`dragging`);let a=!1,o=e=>{a=!0,r(j(Math.round(e.clientX)))},s=()=>{if(n.releasePointerCapture(e.pointerId),n.classList.remove(`dragging`),window.removeEventListener(`pointermove`,o),window.removeEventListener(`pointerup`,s),!a)return;let t=i.current;try{window.localStorage.setItem(k,String(t))}catch{}console.info(`[admin-ui] sidebar-resize px=${t}`)};window.addEventListener(`pointermove`,o),window.addEventListener(`pointerup`,s)},s=()=>{let e=j(264);r(e);try{window.localStorage.removeItem(k)}catch{}console.info(`[admin-ui] sidebar-resize px=${e}`)};return(0,O.jsx)(`div`,{ref:t,className:`side-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize sidebar`,onPointerDown:o,onDoubleClick:s})}var N=`maxy-admin-session`,P=typeof BroadcastChannel<`u`;function F(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.type===`rotation`&&typeof t.newKey==`string`&&t.newKey.length>0&&(t.surface===`chat`||t.surface===`graph`||t.surface===`data`||t.surface===`sessions`)&&typeof t.ts==`number`}function I(e){if(!P)return()=>{};let t=new BroadcastChannel(N),n=t=>{if(!F(t.data)){console.warn(`[admin-session-broadcast] outcome=received-malformed payload=${JSON.stringify(t.data)}`);return}e(t.data)};return t.addEventListener(`message`,n),()=>{t.removeEventListener(`message`,n),t.close()}}var L=`maxy-admin-session-key`;function R(e,t){return`${e}${e.includes(`?`)?`&`:`?`}session_key=${encodeURIComponent(t)}`}async function z(e){let t;try{t=await e.clone().json()}catch{return`parse-failed`}if(typeof t!=`object`||!t)return`unknown-401`;let n=t.code;return n===`session-missing`||n===`session-not-registered`||n===`session-expired-age`||n===`grant-expired`?n:`unknown-401`}function B(){try{return sessionStorage.getItem(L)}catch{return null}}function V(e){let{initialCacheKey:t,surface:n}=e,[r,i]=(0,D.useState)(t),a=(0,D.useRef)(t);(0,D.useEffect)(()=>{a.current=r},[r]),(0,D.useEffect)(()=>{t!==a.current&&(i(t),a.current=t,s(e=>e+1))},[t]);let[o,s]=(0,D.useState)(0);(0,D.useEffect)(()=>I(e=>{let t=a.current.slice(0,8),r=e.newKey.slice(0,8);e.newKey!==a.current&&(console.log(`[admin-session-broadcast] outcome=received oldKey=${t} newKey=${r} surface=${n} senderSurface=${e.surface}`),i(e.newKey),s(e=>e+1))}),[n]);let c=(0,D.useCallback)(()=>{try{sessionStorage.removeItem(L)}catch{}window.location.href=`/`},[]);return{adminFetch:(0,D.useCallback)(async(e,t)=>{let r=a.current,o=R(e,r),l=await fetch(o,t);if(l.status!==401)return l;let u=await z(l);if(u===`session-missing`||u!==`session-not-registered`)return console.warn(`[useAdminFetch] outcome=session-expired-redirect reason=${u} surface=${n} path=${e}`),c(),l;let d=B();if(!d||d===r)return console.warn(`[useAdminFetch] outcome=session-expired-redirect reason=session-not-registered-no-fresh-key surface=${n} path=${e}`),c(),l;i(d),a.current=d,s(e=>e+1),console.log(`[useAdminFetch] outcome=retry-after-rotation oldKey=${r.slice(0,8)} newKey=${d.slice(0,8)} surface=${n} path=${e}`);let f=R(e,d),p=await fetch(f,t);return p.status===401&&(console.warn(`[useAdminFetch] outcome=session-expired-redirect reason=second-401-after-retry surface=${n} path=${e}`),c()),p},[c,n]),cacheKey:r,sessionRefetchNonce:o}}var H=(0,D.createContext)(null);function ie({cacheKey:e,onSessionExpired:t,surface:n,children:r}){let i=(0,D.useCallback)(async(r,i)=>{if(!e)return fetch(r,i);let a=R(r,e),o=await fetch(a,i);if(o.status!==401)return o;let s=await z(o),c=e.slice(-8);if(s===`session-not-registered`){let a=B();if(a&&a!==e){let e=R(r,a),o=await fetch(e,i);return o.status===401?(console.warn(`[admin-auth] outcome=session-expired-redirect code=second-401-after-retry path=${r} cacheKey=${c} surface=${n}`),t({code:`second-401-after-retry`,path:r}),o):o}}return console.warn(`[admin-auth] outcome=session-expired-redirect code=${s} path=${r} cacheKey=${c} surface=${n}`),t({code:s,path:r}),o},[e,t,n]);return(0,O.jsx)(H.Provider,{value:i,children:r})}function U(){return(0,D.useContext)(H)}function ae(e){let t=U();return(0,D.useMemo)(()=>t||(async(t,n)=>fetch(e?R(t,e):t,n)),[t,e])}function oe(e){let{businessName:t,onNavigate:n,onToggleSidebar:r,sidebarOpen:i,onLogout:s}=e,[l,u]=(0,D.useState)(!1),p=(0,D.useRef)(null),g=(0,D.useRef)(null),v=ae(null),[C,w]=(0,D.useState)(null),[ne,k]=(0,D.useState)(!1),[A,j]=(0,D.useState)(null),[re,M]=(0,D.useState)(null),[N,P]=(0,D.useState)(null),[F,I]=(0,D.useState)(``);(0,D.useEffect)(()=>{I(window.location.hostname.startsWith(`admin.`)?window.location.origin.replace(`admin.`,`public.`):window.location.origin)},[]),(0,D.useEffect)(()=>{if(!l)return;let e=e=>{p.current&&!p.current.contains(e.target)&&u(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[l]),(0,D.useEffect)(()=>{if(!l)return;let e=e=>{e.key===`Escape`&&u(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[l]),(0,D.useEffect)(()=>{l&&g.current?.focus()},[l]),(0,D.useEffect)(()=>{if(!l)return;let e=!1;return v(`/api/admin/version`).then(e=>e.json()).then(t=>{e||P(t)}).catch(e=>{console.error(`[admin/version] menu-open client fetch failed:`,e)}),()=>{e=!0}},[l,v]);let L=(0,D.useCallback)(()=>{u(e=>{let t=!e;return t&&console.info(`[admin-ui] header-menu-open`),t})},[]),R=(0,D.useCallback)(e=>{u(!1),n(e)},[n]),z=(0,D.useCallback)(async()=>{if(C!==null){w(null),M(null);return}k(!0),j(null);try{let e=await v(`/api/admin/agents`);if(!e.ok)throw Error(`Failed to load agents`);w((await e.json()).agents??[])}catch(e){console.error(`[admin/agents] list failed:`,e),j(e instanceof Error?e.message:String(e)),w([])}finally{k(!1)}},[C,v]),B=(0,D.useCallback)(e=>{M(null),w(t=>t?.filter(t=>t.slug!==e)??null),v(`/api/admin/agents/${encodeURIComponent(e)}`,{method:`DELETE`}).catch(e=>console.error(`[admin/agents] delete failed:`,e))},[v]),V=(0,D.useCallback)(()=>{u(!1),s()},[s]),H=t||o.productName;return(0,O.jsxs)(`header`,{className:`admin-header`,children:[(0,O.jsx)(`button`,{type:`button`,className:`admin-sidebar-toggle`,"aria-label":i?`Hide sidebar`:`Show sidebar`,title:i?`Hide sidebar`:`Show sidebar`,"aria-expanded":i,onClick:r,children:i?(0,O.jsx)(S,{size:20,strokeWidth:1.5}):(0,O.jsx)(te,{size:20,strokeWidth:1.5})}),(0,O.jsxs)(`div`,{className:`chat-header-label`,children:[(0,O.jsx)(`span`,{className:`chat-logo-btn`,"aria-hidden":`true`,children:(0,O.jsx)(`img`,{src:a,alt:``,className:`chat-logo`})}),(0,O.jsx)(`h1`,{className:`chat-tagline`,children:H})]}),(0,O.jsxs)(`div`,{className:`chat-burger-wrap`,ref:p,children:[(0,O.jsx)(`button`,{type:`button`,className:`admin-burger`,onClick:L,"aria-label":`Menu`,"aria-haspopup":`true`,"aria-expanded":l,children:(0,O.jsx)(x,{size:20})}),l&&(0,O.jsxs)(`div`,{className:`admin-menu`,role:`menu`,children:[(0,O.jsxs)(`button`,{ref:g,type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:()=>R(`data`),children:[(0,O.jsx)(f,{size:14}),` Data`]}),(0,O.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:()=>R(`graph`),children:[(0,O.jsx)(T,{size:14}),` Graph`]}),(0,O.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:()=>R(`browser`),children:[(0,O.jsx)(h,{size:14}),` Browser`]}),(0,O.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:()=>R(`whatsapp`),children:[(0,O.jsx)(ee,{size:14}),` WhatsApp`]}),(0,O.jsx)(`div`,{className:`chat-menu-divider`}),(0,O.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:z,children:[(0,O.jsx)(m,{size:14}),` Public`,ne&&(0,O.jsx)(y,{size:12,className:`spin`})]}),C!==null&&(0,O.jsxs)(`div`,{className:`chat-menu-agents`,children:[A&&(0,O.jsx)(`span`,{className:`chat-menu-agent-error`,children:A}),C.length===0&&!A&&(0,O.jsx)(`span`,{className:`chat-menu-agent-empty`,children:`No public agents configured`}),C.map(e=>(0,O.jsxs)(`div`,{className:`chat-menu-item chat-menu-agent-item`,children:[(0,O.jsx)(`span`,{className:`agent-status-dot ${e.status}`}),(0,O.jsxs)(`span`,{className:`agent-text`,children:[(0,O.jsx)(`span`,{className:`agent-display-name`,children:e.displayName}),(0,O.jsxs)(`span`,{className:`agent-slug`,children:[`/`,e.slug]})]}),re===e.slug?(0,O.jsxs)(`span`,{className:`agent-actions agent-confirm`,children:[(0,O.jsx)(`button`,{type:`button`,className:`agent-action-btn agent-confirm-yes`,title:`Confirm delete`,onClick:()=>B(e.slug),children:(0,O.jsx)(d,{size:12})}),(0,O.jsx)(`button`,{type:`button`,className:`agent-action-btn agent-confirm-no`,title:`Cancel`,onClick:()=>M(null),children:(0,O.jsx)(E,{size:12})})]}):(0,O.jsxs)(`span`,{className:`agent-actions`,children:[(0,O.jsx)(`a`,{href:`${F}/${e.slug}`,target:`_blank`,rel:`noopener noreferrer`,className:`agent-action-btn`,title:`Open agent`,onClick:()=>u(!1),children:(0,O.jsx)(m,{size:12})}),(0,O.jsx)(`button`,{type:`button`,className:`agent-action-btn agent-delete-btn`,title:`Delete agent`,onClick:()=>M(e.slug),children:(0,O.jsx)(c,{size:12})})]})]},e.slug))]}),(0,O.jsx)(`div`,{className:`chat-menu-divider`}),(0,O.jsxs)(`div`,{className:`chat-menu-version chat-menu-version-passive`,children:[(0,O.jsx)(_,{size:14}),(0,O.jsxs)(`span`,{className:`version-installed`,children:[N?`v${N.installed}`:`…`,N&&!N.updateAvailable&&(0,O.jsx)(`span`,{className:`version-uptodate-dot`}),N?.updateAvailable&&(0,O.jsx)(`span`,{className:`version-update-dot`})]})]}),(0,O.jsxs)(`button`,{type:`button`,className:`chat-menu-item`,role:`menuitem`,onClick:V,children:[(0,O.jsx)(b,{size:14}),` Log out`]})]})]})]})}function se(e,t,n=`data`){let r=`/api/admin/files/download?session_key=${encodeURIComponent(e)}&path=${encodeURIComponent(t)}`+(n===`data`?``:`&root=${encodeURIComponent(n)}`),i=document.createElement(`a`);i.href=r,i.rel=`noopener noreferrer`,document.body.appendChild(i),i.click(),i.remove()}function W(e){if(e<60)return`${e}s`;let t=Math.floor(e/60),n=e%60;return n>0?`${t}m ${n}s`:`${t}m`}function ce(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}var G=`auth-refresh-failed`;function le({error:e,onClose:t}){if(!e)return null;let n=e.reason===G,r=n?`Claude sign-in expired`:`Session didn’t open`,i=n?`Your claude.ai login has expired. Re-authenticate to resume sessions.`:`The session did not bind within 60 seconds, so there is no live conversation to open.`;return(0,O.jsx)(`div`,{className:`claude-info-overlay`,onClick:t,children:(0,O.jsxs)(`div`,{className:`claude-info-modal`,onClick:e=>e.stopPropagation(),role:`alertdialog`,"aria-label":`Session could not be opened`,children:[(0,O.jsxs)(`div`,{className:`claude-info-header`,children:[(0,O.jsx)(`span`,{children:r}),(0,O.jsx)(`button`,{className:`claude-info-close`,onClick:t,"aria-label":`Close`,children:`✕`})]}),(0,O.jsxs)(`div`,{className:`claude-info-section`,style:{padding:`12px 14px`,fontSize:`11px`,color:`var(--text-secondary)`},children:[i,(0,O.jsxs)(`div`,{className:`claude-info-row`,style:{marginTop:`8px`},children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Reason`}),(0,O.jsx)(`span`,{className:`claude-info-value`,children:e.reason})]}),e.sessionId&&(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Session`}),(0,O.jsxs)(`span`,{className:`claude-info-value`,children:[e.sessionId.slice(0,8),`…`]})]})]})]})})}function ue(e){let{show:t,onClose:n,claudeInfo:r,messages:i,sessionElapsed:a,sessionId:o,cacheKey:c}=e,[l,u]=(0,D.useState)(null);if(!t)return null;let d=i.flatMap(e=>e.events?.filter(e=>e.type===`usage`)??[]),f=d.at(-1),p=f?.peak_request_pct==null?f?.context_window?Math.round((f.input_tokens+f.cache_creation_tokens+f.cache_read_tokens)/f.context_window*100):0:Math.round(f.peak_request_pct*100),m=d.reduce((e,t)=>e+t.input_tokens+t.cache_creation_tokens+t.cache_read_tokens+t.output_tokens,0),h=i.flatMap(e=>e.events?.filter(e=>e.type===`rate_limit`)??[]).at(-1),g=d.reduce((e,t)=>e+(t.total_cost_usd??0),0),_=r?.account?.subscriptionType,v=e=>{let t=e*1e3-Date.now();if(t<=0)return`now`;let n=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4);return n>0?`${n}h ${r}m`:`${r}m`};return(0,O.jsx)(`div`,{className:`claude-info-overlay`,onClick:n,children:(0,O.jsxs)(`div`,{className:`claude-info-modal`,onClick:e=>e.stopPropagation(),children:[(0,O.jsxs)(`div`,{className:`claude-info-header`,children:[(0,O.jsx)(`img`,{src:`/brand/claude.png`,alt:`Claude`,className:`claude-info-icon`}),(0,O.jsx)(`span`,{children:`Claude Code`}),(0,O.jsx)(`button`,{className:`claude-info-close`,onClick:n,"aria-label":`Close`,children:`✕`})]}),(0,O.jsxs)(`div`,{className:`claude-info-section`,children:[(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Version`}),(0,O.jsx)(`span`,{className:`claude-info-value`,children:r?r.version:`…`})]}),(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Email`}),(0,O.jsx)(`span`,{className:`claude-info-value`,children:r?.account?.email??`…`})]})]}),(_||h||g>0)&&(0,O.jsxs)(`div`,{className:`claude-info-section`,children:[_&&(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Plan`}),(0,O.jsx)(`span`,{className:`claude-info-value`,style:{textTransform:`capitalize`},children:_})]}),h&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Usage`}),(0,O.jsxs)(`span`,{className:`claude-info-value`,children:[Math.round(h.utilization*100),`%`]})]}),(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Resets in`}),(0,O.jsx)(`span`,{className:`claude-info-value`,children:v(h.resetsAt)})]}),h.isUsingOverage&&(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Overage`}),(0,O.jsx)(`span`,{className:`claude-info-value`,children:`Active`})]})]}),g>0&&(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Session cost`}),(0,O.jsxs)(`span`,{className:`claude-info-value`,children:[`$`,g<.01?g.toFixed(4):g.toFixed(2)]})]})]}),(0,O.jsxs)(`div`,{className:`claude-info-section`,children:[(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Model`}),(0,O.jsx)(`span`,{className:`claude-info-value`,children:r?.model??`…`})]}),(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Context used`}),(0,O.jsx)(`span`,{className:`claude-info-value`,children:p>0?`${p}%`:`—`})]}),(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Tokens`}),(0,O.jsx)(`span`,{className:`claude-info-value`,children:m>0?ce(m):`—`})]}),(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Session`}),(0,O.jsx)(`span`,{className:`claude-info-value`,children:W(a)})]}),(o||c)&&(()=>{let e=o??c??``;return(0,O.jsxs)(`div`,{className:`claude-info-row`,children:[(0,O.jsx)(`span`,{className:`claude-info-label`,children:`Session`}),(0,O.jsx)(`button`,{type:`button`,className:`claude-info-value claude-info-id-copy`,title:`${e} (${o?`flushed`:`pre-flush`}) — click to copy`,onClick:async()=>{u(await s(e)?`copied`:`failed`),setTimeout(()=>u(null),1200)},children:l===`copied`?`copied ✓`:l===`failed`?`copy failed ✕`:`${e.slice(0,8)}…`})]})})()]})]})})}var K=`https://claude.ai/code`;function de(e,t,n){let r=n.slug??n.bridgeSessionId??null;if(e&&r)return{kind:`navigate`,url:`${K}/${r}`};let i=n.reason||n.error||`status ${t}`;return{kind:`error`,sessionId:n.sessionId??null,reason:i}}function fe(e){let{businessName:n,cacheKey:r,role:i,userName:a,userAvatar:s,onSelectProjects:d,onSelectPeople:f,onSelectTasks:h,onSelectAgents:_,onCloseMobileDrawer:y,collapsed:b}=e,x=ae(r),ee=o.productName,S=typeof a==`string`?a:a===null?`name unavailable`:n||ee,te=(S.trim().charAt(0)||`?`).toUpperCase(),[T,E]=(0,D.useState)(`sessions`),[k,A]=(0,D.useState)([]),[j,re]=(0,D.useState)(!1),[M,N]=(0,D.useState)(null),[P,F]=(0,D.useState)(!1),[I,L]=(0,D.useState)(`file`),[R,z]=(0,D.useState)(null),[B,V]=(0,D.useState)(null),[H,ie]=(0,D.useState)([]),[U,oe]=(0,D.useState)(!1),[W,ce]=(0,D.useState)(null),[G,ue]=(0,D.useState)(!1),[K,fe]=(0,D.useState)(!1),[pe,q]=(0,D.useState)(null),[J,he]=(0,D.useState)(new Set),[Y,ge]=(0,D.useState)(new Set),[X,Z]=(0,D.useState)(!1),_e=(0,D.useCallback)(e=>{if(y(),!r){console.error(`[admin-ui] artefact-download-blocked id=${e.id} reason=no-cache-key`),z({message:`Session not ready — try again`,failed:!0});return}if(!e.downloadPath){console.error(`[admin-ui] artefact-download-blocked id=${e.id} reason=not-downloadable`),z({message:`${e.name} can’t be downloaded`,failed:!0});return}console.info(`[admin-ui] artefact-download id=${e.id} root=${e.downloadRoot??`data`} path=${e.downloadPath}`),se(r,e.downloadPath,e.downloadRoot??`data`),z({message:`Downloading ${e.name}`,failed:!1})},[r,y]);(0,D.useEffect)(()=>{if(!R)return;let e=setTimeout(()=>z(null),2500);return()=>clearTimeout(e)},[R]);let ve=(0,D.useCallback)(async()=>{if(r){F(!0),N(null);try{let e=await x(`/api/admin/sidebar-artefacts`);if(!e.ok)throw Error(`status ${e.status}`);A((await e.json()).artefacts??[]),re(!0)}catch(e){let t=e instanceof Error?e.message:String(e);N(`Failed to load artefacts: ${t}`),console.error(`[admin-ui] sidebar-artefacts fetch failed: ${t}`)}finally{F(!1)}}},[r,x]),Q=(0,D.useCallback)(async()=>{if(r){ue(!0),ce(null);try{let e=await x(`/api/admin/sidebar-sessions`);if(!e.ok)throw Error(`status ${e.status}`);let t=await e.json();ie(t.sessions??[]),q(t.accountId??null),oe(!0)}catch(e){let t=e instanceof Error?e.message:String(e);ce(`Failed to load sessions: ${t}`),console.error(`[admin-ui] sidebar-sessions fetch failed: ${t}`)}finally{ue(!1)}}},[r,x]);(0,D.useEffect)(()=>{!r||U||Q()},[r,U,Q]);let ye=()=>{E(`artefacts`),console.info(`[admin-ui] sidebar-nav surface=artefacts count=${j?k.length:0} collapsed=${b}`),ve()},$=1.5,be=()=>{console.info(`[admin-ui] sidebar-refresh surface=artefacts`),ve()},xe=()=>{E(`sessions`),console.info(`[admin-ui] sidebar-nav surface=sessions count=${U?H.length:0} collapsed=${b}`),U||Q()},Se=()=>{console.info(`[admin-ui] sidebar-refresh surface=sessions`),Q()},Ce=(0,D.useCallback)(async e=>{if(e.resumable===!1||Y.has(e.sessionId))return;ge(t=>{let n=new Set(t);return n.add(e.sessionId),n});let t=window.open(``,`_blank`);try{let n=await x(`/api/admin/session-rc-spawn`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sessionId:e.sessionId,name:e.title||e.sessionId})}),r=await n.json().catch(()=>({})),i=de(n.ok,n.status,{...r,sessionId:r.sessionId??e.sessionId});console.info(`[admin-ui] sidebar-session-resume sessionId=${e.sessionId} status=${n.status} outcome=${i.kind} slug=${r.slug??r.bridgeSessionId??`none`}`),i.kind===`navigate`?(y(),t?t.location.href=i.url:window.open(i.url,`_blank`)):(t?.close(),console.error(`[admin-ui] sidebar-session-resume-failed sessionId=${e.sessionId} status=${n.status} reason=${i.reason}`),V(i))}catch(n){t?.close();let r=n instanceof Error?n.message:String(n);console.error(`[admin-ui] sidebar-session-resume-failed sessionId=${e.sessionId} error=${r}`),V({sessionId:e.sessionId,reason:r})}finally{ge(t=>{let n=new Set(t);return n.delete(e.sessionId),n})}},[x,y,Y]),we=(0,D.useCallback)(async()=>{if(X)return;Z(!0);let e=window.open(``,`_blank`);try{let t=await x(`/api/admin/session-rc-spawn`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({})}),n=await t.json().catch(()=>({})),r=de(t.ok,t.status,n);console.info(`[admin-ui] sidebar-new-session-spawned status=${t.status} outcome=${r.kind} slug=${n.slug??n.bridgeSessionId??`none`}`),r.kind===`navigate`?e?e.location.href=r.url:window.open(r.url,`_blank`):(e?.close(),console.error(`[admin-ui] sidebar-new-session-failed status=${t.status} reason=${r.reason}`),V(r))}catch(t){e?.close();let n=t instanceof Error?t.message:String(t);console.error(`[admin-ui] sidebar-new-session-failed error=${n}`),V({sessionId:null,reason:n})}finally{Z(!1)}},[x,X]),Te=(0,D.useCallback)(async(e,t)=>{if(e.stopPropagation(),!J.has(t.sessionId)){he(e=>{let n=new Set(e);return n.add(t.sessionId),n});try{let e=await x(`/api/admin/session-delete`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({sessionId:t.sessionId,projectDir:t.projectDir})});if(!e.ok){let n=await e.json().catch(()=>({}));console.error(`[admin-ui] sidebar-session-delete-failed sessionId=${t.sessionId} status=${e.status} error=${n.error??`unknown`}`),z({message:`Delete failed: ${n.error??`status ${e.status}`}`,failed:!0});return}let n=await e.json();console.info(`[admin-ui] sidebar-session-delete sessionId=${t.sessionId} pidKilled=${n.pidKilled??`?`} deleted=${n.deleted??`?`}`),ie(e=>e.filter(e=>e.sessionId!==t.sessionId)),Q()}catch(e){let n=e instanceof Error?e.message:String(e);console.error(`[admin-ui] sidebar-session-delete-failed sessionId=${t.sessionId} error=${n}`),z({message:`Delete failed: ${n}`,failed:!0})}finally{he(e=>{let n=new Set(e);return n.delete(t.sessionId),n})}}},[x,J,Q]);return(0,O.jsxs)(`aside`,{className:`side`,children:[(0,O.jsx)(`div`,{className:`side-new-session-row`,children:(0,O.jsxs)(`button`,{type:`button`,className:`side-new-session`,onClick:we,disabled:X,"aria-busy":X,children:[(0,O.jsx)(C,{size:14}),(0,O.jsx)(`span`,{children:X?`Spawning…`:`New session`})]})}),(0,O.jsxs)(`nav`,{className:`side-nav`,children:[(0,O.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=people`),f(),y()},children:[(0,O.jsx)(ne,{size:20,strokeWidth:$}),(0,O.jsx)(`span`,{className:`label`,children:`People`}),(0,O.jsx)(`span`,{className:`kbd`})]}),(0,O.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=agents`),_(),y()},children:[(0,O.jsx)(l,{size:20,strokeWidth:$}),(0,O.jsx)(`span`,{className:`label`,children:`Agents`}),(0,O.jsx)(`span`,{className:`kbd`})]}),(0,O.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=projects`),d(),y()},children:[(0,O.jsx)(u,{size:20,strokeWidth:$}),(0,O.jsx)(`span`,{className:`label`,children:`Projects`}),(0,O.jsx)(`span`,{className:`kbd`})]}),(0,O.jsxs)(`button`,{type:`button`,className:`nav-row`,onClick:()=>{console.info(`[admin-ui] sidebar-nav surface=tasks`),h(),y()},children:[(0,O.jsx)(v,{size:20,strokeWidth:$}),(0,O.jsx)(`span`,{className:`label`,children:`Tasks`}),(0,O.jsx)(`span`,{className:`kbd`})]}),(0,O.jsxs)(`button`,{type:`button`,className:`nav-row${T===`artefacts`?` active`:``}`,onClick:ye,children:[(0,O.jsx)(t,{size:20,strokeWidth:$}),(0,O.jsx)(`span`,{className:`label`,children:`Artefacts`}),(0,O.jsx)(`span`,{className:`kbd`})]}),(0,O.jsxs)(`button`,{type:`button`,className:`nav-row${T===`sessions`?` active`:``}`,onClick:xe,children:[(0,O.jsx)(g,{size:20,strokeWidth:$}),(0,O.jsx)(`span`,{className:`label`,children:`Sessions`}),(0,O.jsx)(`span`,{className:`kbd`})]})]}),T===`artefacts`&&(0,O.jsxs)(`div`,{className:`side-list`,children:[(0,O.jsxs)(`div`,{className:`group-head`,children:[(0,O.jsx)(`span`,{children:`Artefacts`}),(0,O.jsxs)(`span`,{className:`group-head-meta`,children:[(0,O.jsx)(`button`,{type:`button`,className:`group-head-refresh`,title:`Refresh artefacts`,"aria-label":`Refresh artefacts`,onClick:be,disabled:P,children:(0,O.jsx)(w,{size:12,className:P?`spinning`:void 0})}),(0,O.jsx)(`span`,{children:P?`…`:String(k.length)})]})]}),M&&(0,O.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:M}),j&&!M&&k.length>0&&(()=>{let e=k.filter(e=>e.kind===`agent-template`).length,t=k.length-e;return(0,O.jsx)(`div`,{className:`artefact-filter-chips`,children:[{key:`all`,label:`All`,count:k.length},{key:`agent`,label:`Agents`,count:e},{key:`file`,label:`Files`,count:t}].map(e=>(0,O.jsxs)(`button`,{type:`button`,className:`artefact-filter-chip${I===e.key?` active`:``}`,onClick:()=>L(e.key),disabled:e.count===0&&e.key!==`all`,children:[e.label,(0,O.jsx)(`span`,{className:`artefact-filter-chip-count`,children:e.count})]},e.key))})})(),j&&!M&&k.length===0&&(0,O.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:`No artefacts yet`}),k.filter(e=>I===`all`?!0:I===`agent`?e.kind===`agent-template`:e.kind!==`agent-template`).map(e=>{let n=e.kind===`agent-template`,r=n?l:t,i=Date.parse(e.updatedAt),a=Number.isFinite(i)?new Date(i).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):``,o=e.downloadPath!==null;return(0,O.jsxs)(`button`,{type:`button`,className:`conv`,onClick:()=>_e(e),disabled:!o,style:o?void 0:{cursor:`default`},title:o?`Download ${e.name}`:`${e.name} can’t be downloaded`,children:[(0,O.jsx)(r,{size:14,className:`conv-icon`,"data-kind":n?`agent`:`file`,"aria-label":n?`agent template`:`file`}),(0,O.jsxs)(`span`,{className:`conv-stack`,children:[(0,O.jsx)(`span`,{className:`conv-name-line`,children:(0,O.jsx)(`span`,{className:`conv-name`,children:e.name})}),a&&(0,O.jsx)(`span`,{className:`conv-timestamp`,children:a})]}),o&&(0,O.jsx)(p,{size:12,className:`conv-rc-icon`,"aria-hidden":`true`})]},e.id)})]}),T===`sessions`&&(()=>{let e=K?H:H.filter(e=>!e.isSubagent),t=H.some(e=>e.isSubagent);return(0,O.jsxs)(`div`,{className:`side-list`,children:[(0,O.jsxs)(`div`,{className:`group-head`,children:[(0,O.jsx)(`span`,{children:`Sessions`}),(0,O.jsxs)(`span`,{className:`group-head-meta`,children:[(0,O.jsx)(`button`,{type:`button`,className:`group-head-refresh`,title:`Refresh sessions`,"aria-label":`Refresh sessions`,onClick:Se,disabled:G,children:(0,O.jsx)(w,{size:12,className:G?`spinning`:void 0})}),(0,O.jsx)(`span`,{children:G?`…`:String(e.length)})]})]}),pe&&(0,O.jsx)(`div`,{className:`side-account-id`,title:`This install's accountId. The first 8 characters match the truncated UUID label on the live Remote Control daemon entry in claude.ai/code.`,children:(0,O.jsx)(`code`,{children:pe})}),t&&(0,O.jsx)(`div`,{className:`artefact-filter-chips`,children:(0,O.jsx)(`button`,{type:`button`,className:`artefact-filter-chip${K?` active`:``}`,onClick:()=>fe(e=>!e),title:K?`Hide subagent sessions`:`Show subagent sessions`,children:`Subagents`})}),W&&(0,O.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:W}),U&&!W&&e.length===0&&(0,O.jsx)(`div`,{className:`conv`,style:{color:`var(--text-tertiary)`,cursor:`default`},children:`No sessions yet`}),e.map(e=>{let t=Date.parse(e.startedAt),n=Number.isFinite(t)?new Date(t).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):``,r=Y.has(e.sessionId),i=J.has(e.sessionId);return(0,O.jsxs)(`div`,{className:`conv conv-with-actions`,children:[(0,O.jsxs)(`div`,{className:`conv-main-static`,children:[(0,O.jsx)(`span`,{className:`conv-live-dot`,"data-live":e.live?`1`:`0`,"aria-label":e.live?`live session`:`ended session`}),(0,O.jsxs)(`span`,{className:`conv-stack`,children:[(0,O.jsx)(`span`,{className:`conv-name-line`,children:(0,O.jsx)(`span`,{className:`conv-name`,title:e.title,children:e.title})}),(0,O.jsxs)(`span`,{className:`conv-timestamp`,children:[(0,O.jsx)(`code`,{className:`conv-session-id`,title:`First 8 characters of this session's id — distinguishes rows with identical auto-titles. The resume/delete buttons act on the full id.`,children:e.sessionId.slice(0,8)}),n&&(0,O.jsxs)(`span`,{children:[` · `,n]})]})]})]}),(0,O.jsxs)(`div`,{className:`conv-actions`,children:[e.resumable===!1?(0,O.jsx)(`span`,{className:`conv-ephemeral`,title:`Public webchat session — ephemeral, not resumable`,"aria-label":`Ephemeral public session (not resumable)`,children:(0,O.jsx)(g,{size:12})}):(0,O.jsx)(`button`,{type:`button`,className:`conv-action`,onClick:()=>{Ce(e)},disabled:r||i,"aria-busy":r,"aria-label":`Resume session ${e.title} in claude.ai/code`,title:`Resume in a fresh local Remote Control PTY`,children:(0,O.jsx)(m,{size:12})}),(0,O.jsx)(`button`,{type:`button`,className:`conv-action conv-action-danger`,onClick:t=>{Te(t,e)},disabled:r||i,"aria-busy":i,"aria-label":`Delete session ${e.title}`,title:`Delete session (kills PID if live, removes JSONL)`,children:(0,O.jsx)(c,{size:12})})]})]},e.sessionId)})]})})(),(0,O.jsx)(me,{}),(0,O.jsxs)(`div`,{className:`side-foot`,children:[(0,O.jsx)(`div`,{className:`avatar`,children:s?(0,O.jsx)(`img`,{src:s,alt:S}):te}),(0,O.jsxs)(`div`,{className:`who`,children:[(0,O.jsx)(`span`,{className:`name`,children:S}),(0,O.jsx)(`span`,{className:`role`,children:i??`operator`})]})]}),R&&(0,O.jsx)(`div`,{className:`copy-toast${R.failed?` copy-toast-failed`:``}`,role:`status`,children:R.message}),(0,O.jsx)(le,{error:B,onClose:()=>V(null)})]})}var pe=5e3;function me(){let[e,t]=(0,D.useState)(null);if((0,D.useEffect)(()=>{let e=!1,n=null;async function r(){try{let n=await fetch(`/api/admin/system-stats`);if(!n.ok){console.error(`[admin-ui] system-stats-fetch-failed status=${n.status}`);return}let r=await n.json();e||t(r)}catch(e){console.error(`[admin-ui] system-stats-fetch-failed reason=${e instanceof Error?e.message:String(e)}`)}}function i(){n===null&&(r(),n=setInterval(()=>{r()},pe))}function a(){n!==null&&(clearInterval(n),n=null)}function o(){document.hidden?a():i()}return document.hidden||i(),document.addEventListener(`visibilitychange`,o),()=>{e=!0,a(),document.removeEventListener(`visibilitychange`,o)}},[]),!e||e.platform===`darwin`)return null;let n=e.cpuPct,r=e.memUsedPct,i=n!==null&&n>=.9,a=n!==null&&n>=.98,o=r!==null&&r>=.9,s=r!==null&&r>=.98,c=i||o,l=a||s,u=e=>e===null?`—`:`${Math.round(e*100)}%`,d=e=>{if(e===null)return{width:`0%`,background:`var(--text-tertiary)`};let t=Math.min(1,Math.max(0,e)),n=Math.round(140*(1-t));return{width:`${Math.round(t*100)}%`,background:`hsl(${n}, 65%, 45%)`}},f=[`system-stats`];return c&&f.push(`system-stats--warn`),l&&f.push(`system-stats--crit`),(0,O.jsxs)(`div`,{className:f.join(` `),role:`status`,"aria-label":`host CPU and RAM`,children:[(0,O.jsxs)(`div`,{className:`system-stats__metric`,children:[(0,O.jsxs)(`span`,{className:i?`system-stats__fig system-stats__fig--warn`:`system-stats__fig`,children:[`CPU `,u(n)]}),(0,O.jsx)(`div`,{className:`system-stats__bar`,children:(0,O.jsx)(`div`,{className:`system-stats__bar-fill`,style:d(n)})})]}),(0,O.jsxs)(`div`,{className:`system-stats__metric`,children:[(0,O.jsxs)(`span`,{className:o?`system-stats__fig system-stats__fig--warn`:`system-stats__fig`,children:[`RAM `,u(r)]}),(0,O.jsx)(`div`,{className:`system-stats__bar`,children:(0,O.jsx)(`div`,{className:`system-stats__bar-fill`,style:d(r)})})]})]})}var q=`admin-sidebar-collapsed`,J=`admin-sidebar-drawer-open`;function he(){if(typeof window>`u`)return!1;try{return window.sessionStorage.getItem(q)===`1`}catch{return!1}}function Y(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(q,`1`):window.sessionStorage.removeItem(q)}catch{}}function ge(){if(typeof window>`u`)return!1;try{return window.sessionStorage.getItem(J)===`1`}catch{return!1}}function X(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(J,`1`):window.sessionStorage.removeItem(J)}catch{}}var Z=720;function _e(e){let{cacheKey:t,businessName:n,onLogout:r,userName:i,userAvatar:a,role:o,children:s,footer:c}=e,[l,u]=(0,D.useState)(()=>he()),[d,f]=(0,D.useState)(()=>ge()),[p,m]=(0,D.useState)(()=>typeof window<`u`&&window.matchMedia(`(max-width: ${Z}px)`).matches);(0,D.useEffect)(()=>{if(typeof window>`u`)return;let e=window.matchMedia(`(max-width: ${Z}px)`),t=e=>m(e.matches);return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let h=(0,D.useCallback)(e=>{Y(e),u(e)},[]),g=(0,D.useCallback)(e=>{X(e),f(e)},[]);(0,D.useEffect)(()=>{if(typeof window>`u`)return;let e=window.location?.pathname??``;console.info(`[admin-ui] shell-mount route=${e} collapsed=${l} drawer=${d}`)},[]);let _=p?d:!l,v=(0,D.useCallback)(()=>{if(!(typeof window>`u`))if(window.matchMedia(`(max-width: ${Z}px)`).matches){let e=d;console.info(`[admin-ui] header-sidebar-toggle from=${e?`open`:`closed`} mode=drawer`),g(!e)}else{let e=l;console.info(`[admin-ui] header-sidebar-toggle from=${e?`closed`:`open`} mode=collapse`),h(!e)}},[l,d,h,g]),y=(0,D.useCallback)(e=>{console.info(`[admin-ui] header-menu-nav target=${e}`);let t=e===`data`?`/data`:e===`graph`?`/graph`:e===`whatsapp`?`/whatsapp`:`/browser`;window.location.href=t},[]),b={collapsed:l,mobileDrawerOpen:d,sidebarOpen:_,onToggleSidebar:v,setMobileDrawerOpen:g};return(0,O.jsxs)(`div`,{className:`admin-shell admin-page admin-shell-root`,children:[(0,O.jsx)(oe,{businessName:n,onNavigate:y,onToggleSidebar:v,sidebarOpen:_,onLogout:r}),(0,O.jsxs)(`div`,{className:`platform${d?` menu-open`:``}${l?` sidebar-collapsed`:``}`,"data-artefact":`closed`,children:[(0,O.jsx)(fe,{businessName:n,cacheKey:t,role:o??null,userName:i,userAvatar:a??null,onSelectProjects:()=>{window.location.href=`/graph?label=Project`},onSelectPeople:()=>{window.location.href=`/graph?label=Person`},onSelectTasks:()=>{window.location.href=`/graph?label=Task`},onSelectAgents:()=>{window.location.href=`/graph?label=Agent`},onCloseMobileDrawer:()=>g(!1),collapsed:l,mobileDrawerOpen:d}),typeof s==`function`?s(b):s]}),d&&(0,O.jsx)(`div`,{className:`sidebar-backdrop menu-open`,"aria-hidden":`true`,onClick:()=>g(!1)}),c]})}export{f as _,ae as a,E as c,C as d,ee as f,p as g,m as h,ie as i,T as l,h as m,ue as n,V as o,y as p,se as r,M as s,_e as t,w as u};
|