Understanding Pigment Modeling

作者 gopigment6fec49f4ce9d無授權條款22 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 天前更新

Foundational skill. Read first before any modeling task. Provides the mental model (in-memory sparse multidimensional engine), block-type taxonomy, engine vocabulary, common decision mistakes, and hard rules.

AI 產生的概覽

Pigment 建模引擎的基礎參考:區塊類型、硬性規則與常見決策錯誤。

功能
此技能提供 Pigment 建模的概念性參考。它說明記憶體內的稀疏多維引擎,定義區塊類型分類(維度清單、日曆、版本維度、指標、交易清單、表格、看板、檢視、資料夾),並列出涵蓋結構、命名、建置順序、公式安全性與結構變更的硬性規則。它也提供代理最常出錯的決策對照表,例如維度與交易清單、維度類型屬性與簡單屬性的選擇。
適用情境
依照技能本身的說明,在任何 Pigment 建模工作開始前使用,以建立心智模型與術語體系。在需要判斷區塊類型或進行結構變更前核對硬性規則時也適用。
執行需求
無需指令碼或工具,僅為純說明性參考文件。文中以名稱引用其他技能與 Pigment 工具,但不執行任何操作。

Understanding Pigment Modeling

Read this before any modeling task.

Mental Model

Pigment is an in-memory, sparse, multidimensional engine. An Application is a collection of typed blocks. Two orthogonal layers (Native Scenarios for what-if sandboxes, Snapshots for frozen copies) apply across all blocks.

Block typeWhat it isWhen to use
Dimension listAnalysis axis with unique items (rows) and typed properties (columns: Number / Date / Text / Bool / Dimension). A dimension placed in a metric's grid is a structural dimension.Anything you slice metrics by: Country, Product, Employee, Account
CalendarBuilt-in time dimensions: Month, Quarter, Year, Date.Always reuse. Never recreate time lists.
Version DimensionDimension holding Budget / Actual / Forecast items, with switchover and gating properties.Any planning cycle. See skill:building-versions-and-planning-cycles.
MetricMultidimensional sparse grid (Number / Date / Text / Dim / Bool). Each cell = one value at one combination of structural items. Blank cells are not stored (sparsity). Formulas evaluate within a dimensional context called scope.Anything you compute, plan, or report
Transaction ListHigh-volume row store. Items not unique. Never structural.Granular events (GL, orders, HRIS) to aggregate into metrics with BY
TableGroups metrics sharing dimensions, with calculated rows/columns.P&L, Balance Sheet, multi-metric reporting
BoardContainer page of Widgets.Dashboards, reports, input screens
ViewConfigured visual of a Metric or Table (pivots, filters, sort, display mode: Grid / Chart / KPI). Reusable across Boards.Any reusable data presentation
FolderOrganizational only. No logic.Sorting and governance

Invariants

These are never negotiable.

Structure

  1. Only dimension lists can be structural. Transaction lists never. Aggregate with BY.
  2. A metric cell = one item per structural dimension. Blank cells are not stored (sparsity).
  3. Every app with planning metrics gets a Version Dimension. Do not skip or defer.
  4. List Subsets delete data irreversibly on membership change. Prefer filters unless the use case is clear.

Naming and organization

  1. Never use ., :, ', or " in block names. Prefer ASCII.
  2. Never place a block at the root level. Use numbered folders.
  3. Folders are inert. They affect discovery, not calculation.

Build order

  1. Calendar (verify/configure) → Dimensions → Version Dimension → Transaction Lists → Metrics (input, then calculated) → Tables → Boards. Always create prerequisites before dependents.
  2. Never recreate time dimensions. Reuse the app calendar.

Formula safety

  1. Never hard-code dimension item references for Time, Version, countries, or planning periods. Use a Dimension-typed input metric. Stable type/class/category items (e.g. 'FX Rate Types'."AVG") may stay hard-coded.
  2. Never use DATE() with literal year/month for period bounds. Use a Date-typed input metric.
  3. When T&D is active: never use a disconnected dimension as the property type on a connected dimension. Ask the user about connectivity if unknown.

Structural changes on existing blocks

  1. A structural change (adding/removing a dimension, changing type) does not automatically propagate to the metrics that reference the changed one. Pigment aligns mismatched dimensions silently (broadcast/collapse) instead of failing, which can produce wrong numbers with no visible error. Before editing, use tool:get_data_dependency_tree (direction Sources) to trace back to the originating metric(s) and transaction list, so you know what grain of detail already exists upstream. Before declaring such a change done, use tool:get_data_dependency_tree (direction Usages) to find dependent formulas, then tool:validate_formula (with target.metric_id) on each to catch a silent mismatch — see skill:writing-pigment-formulas ("Structural Dimension Changes") for the full workflow.
  2. Removing a dimension from a metric's structure is lossy and irreversible. Unlike adding a dimension, once the metric no longer stores that grain the historical detail cannot be recovered from the metric itself. Say so explicitly when proposing the change, even if the detail still exists upstream (e.g. on a source metric or transaction list).

Decisions the Agent Gets Wrong Most Often

DecisionChoose A whenChoose B when
Dimension vs Transaction ListUnique items you slice byHigh-volume events, no uniqueness, not structural
Dimension-typed property vs simple propertyValues form a finite set you may slice or aggregate by (create a dimension list, reference it as property type)Free text, measure, date, or boolean that is never a slicing axis
Metric vs Transaction ListAggregated planning / reporting valuesAtomic events from ERP / CRM (then aggregate with BY)

When unsure about property types: do not default categorical fields to Text. If the values form a finite set that could become a slicing axis, make it a Dimension.

來源與署名

來源:gopigment/ai-plugins位於skills/understanding-pigment-modeling提交6fec49f

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架