cometric 0.3.0__tar.gz → 0.5.0__tar.gz
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.
- cometric-0.5.0/.hypothesis/constants/1452a68a7516a238 +4 -0
- cometric-0.5.0/.hypothesis/constants/2257685fa79eb38b +4 -0
- cometric-0.5.0/.hypothesis/constants/3c659223e341fbda +4 -0
- cometric-0.5.0/.hypothesis/constants/5c08095823382694 +4 -0
- cometric-0.5.0/.hypothesis/constants/5e3c558a497b7b3b +4 -0
- cometric-0.5.0/.hypothesis/constants/6eef135e443dc63b +4 -0
- cometric-0.5.0/.hypothesis/constants/82495ee482750ddc +4 -0
- cometric-0.5.0/.hypothesis/constants/bfc29117d774107a +4 -0
- cometric-0.5.0/.hypothesis/constants/f19d2aecb94f07ec +4 -0
- {cometric-0.3.0 → cometric-0.5.0}/CHANGELOG.md +15 -0
- {cometric-0.3.0 → cometric-0.5.0}/PKG-INFO +12 -3
- {cometric-0.3.0 → cometric-0.5.0}/README.md +11 -2
- {cometric-0.3.0 → cometric-0.5.0}/docs/COMETRIC_SPEC_v0.3.md +21 -3
- {cometric-0.3.0 → cometric-0.5.0}/docs/PATTERNS.md +11 -0
- {cometric-0.3.0 → cometric-0.5.0}/docs/STATUS.md +1 -1
- cometric-0.5.0/docs/ontology/README.md +248 -0
- cometric-0.5.0/docs/ontology/cometric.ttl +10376 -0
- cometric-0.5.0/docs/ontology/core.md +647 -0
- cometric-0.5.0/docs/ontology/pack-alsp.md +804 -0
- cometric-0.5.0/docs/ontology/pack-base.md +4083 -0
- cometric-0.5.0/docs/ontology/pack-consulting.md +307 -0
- {cometric-0.3.0 → cometric-0.5.0}/pyproject.toml +2 -2
- {cometric-0.3.0 → cometric-0.5.0}/scripts/build_alsp.py +119 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/cli.py +15 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/api.py +60 -16
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/enums.py +12 -0
- cometric-0.5.0/src/cometric/core/glossary.py +19 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/models.py +29 -0
- cometric-0.5.0/src/cometric/core/ontology.py +1103 -0
- cometric-0.5.0/src/cometric/core/quantities.py +324 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/quickstart.py +1 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/schema.py +2 -1
- cometric-0.5.0/src/cometric/examples/pattern_counting_rules.json +513 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/mcp/server.py +1 -18
- cometric-0.5.0/src/cometric/packs/alsp/concepts/counting_rules.yaml +51 -0
- cometric-0.5.0/tests/test_counting.py +149 -0
- cometric-0.5.0/tests/test_ontology.py +105 -0
- {cometric-0.3.0 → cometric-0.5.0}/uv.lock +24 -1
- cometric-0.3.0/.hypothesis/constants/02af8a95fc854af3 +0 -4
- cometric-0.3.0/.hypothesis/constants/2616f13a910320c7 +0 -4
- cometric-0.3.0/.hypothesis/constants/8291cdcd8414a40b +0 -4
- cometric-0.3.0/.hypothesis/constants/8408e47180d8b9c1 +0 -4
- cometric-0.3.0/.hypothesis/constants/a402bbad3ba0ac69 +0 -4
- cometric-0.3.0/.hypothesis/constants/ed391256aab33efd +0 -4
- cometric-0.3.0/src/cometric/core/quantities.py +0 -147
- {cometric-0.3.0 → cometric-0.5.0}/.github/workflows/ci.yml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.github/workflows/publish.yml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.gitignore +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/.gitignore +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/052e28aa39cf014b +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/0a08468b27ab0e2b +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/1a54c0e5b66b34fa +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/284cdb085a69e559 +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/31846ac0f55db7cc +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/3570e270a2e92983 +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/3faf924fe60f71dc +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/52563cc61b61afeb +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/64a2c31fcab5443b +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/6ab7a80f708d05c3 +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/85a66397c5e4b867 +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/b428358d86c25f38 +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/bddcf7e0e0af1f28 +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/da39a3ee5e6b4b0d +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/.hypothesis/constants/e275ad1f9cb17aaf +0 -0
- /cometric-0.3.0/.hypothesis/constants/52445b4e87bec631 → /cometric-0.5.0/.hypothesis/constants/fd18071893a59813 +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/LICENSE +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/docs/ALSP_COMMERCIAL_ONTOLOGY_SPEC_v0.1.pdf +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/docs/COMETRIC_SPEC_v0.2.md +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/docs/RECONCILIATION.md +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/scripts/build_consulting.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/scripts/build_fixtures.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/__init__.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/__init__.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/engine.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/fingerprint.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/issues.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/ledger.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/money.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/packs.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/periods.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/predicates.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/present.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/templates.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/tiers.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/core/validation.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/case_a.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/case_b.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/case_c.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/case_d.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/case_e.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/case_f.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/case_g.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/case_h.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/pattern_partial_and_hours.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/pattern_termination.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/pattern_tiered_minimum.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/pattern_transition_credit.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/examples/spec_example.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/mcp/__init__.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/mcp/__main__.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/concepts/provider_types.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/concepts/service_categories.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/concepts/unit_templates.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/coverage.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/evidence/claims.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/evidence/sources.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/overlays/levers.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/overlays/mechanisms.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/overlays/metrics.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/overlays/pricing_models.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/pack.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/rules/rules.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/alsp/templates/tiered_units_annual_minimum.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/automation_structures.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/billing_bases.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/cost_categories.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/dimensions.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/fee_components.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/layers.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/levers.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/mechanisms.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/metrics.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/negotiation_exchanges.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/offers.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/pricing_models.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/schema_map.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/selection_framework.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/concepts/selection_heuristics.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/coverage.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/evidence/claims.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/evidence/sources.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/excluded.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/pack.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/base/rules/rules.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/concepts/consulting_concepts.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/concepts/provider_types.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/concepts/service_categories.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/concepts/unit_templates.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/coverage.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/overlays/pricing_models.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/pack.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/rules/rules.yaml +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/templates/capped_tm.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/templates/fixed_fee_plus_success.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/templates/phased_fixed_fee.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/templates/retainer_hours_drawdown.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/packs/consulting/templates/role_based_tm.json +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/src/cometric/py.typed +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/builders.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/conftest.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_casebook.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_engine_review_fixes.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_llm_feedback.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_mcp.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_outcome_and_realization.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_packs_and_templates.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_patterns.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_pricing.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_properties.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_reconcile.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_reproducibility_and_search.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_search_and_context.py +0 -0
- {cometric-0.3.0 → cometric-0.5.0}/tests/test_termination.py +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/core/api.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
[10000, '...', '/', '/...', '/actuals', '/actuals/term', '/assumption', '/candidates', '/constraints', '/cost_policy', '/detail', '/driver', '/name', '/objective', '/objective/sense', '/parameters', '/pointer', '/pointers', '/precision', '/results', '/risk_premium', '/scenarios', '/search_spec', '/target_margin', '/tolerance_absolute', '/tolerance_relative', '/transform', '/values', '0', '0.01', '0.15', '0.2', '100', '100000', '140', '20', '90000', '; ', '?', 'BAD_CONSTRAINT', 'BAD_POINTER', 'BASE', 'BEST_AT_GRID_EDGE', 'COSTS_NOT_EVALUATED', 'COST_POLICY_REQUIRED', 'DUPLICATE_ID', 'ERROR', 'INTERNAL_POLICY', 'MEAN', 'NO_RESULTS', 'PARAMETER_SPEC', 'PENDING_HUMAN_REVIEW', 'RANGE', 'RATE', 'RISK_MISMATCH', 'RISK_PREMIUM_RANGE', 'SCENARIO_INFEASIBLE', 'SCHEMA', 'TARGET_MARGIN_RANGE', 'TERM', 'UNKNOWN_DRIVER', 'UNKNOWN_METRIC', 'UNKNOWN_QUANTITY', 'WORST', '_doc', 'absolute', 'accumulation_period', 'actual', 'actuals', 'add', 'aggregation', 'allowances', 'approval_state', 'assumption', 'assumptions', 'base', 'base_client_price', 'base_contribution', 'base_fee', 'base_scenario', 'base_scenario_id', 'baseline', 'best', 'best_under_objective', 'binding_constraints', 'calculate_periods', 'calculated', 'calculations', 'candidates', 'capacity', 'client_downside', 'client_price', 'closest_value_slack', 'code', 'cometric_higher', 'cometric_lower', 'commitment_shortfall', 'compared', 'component', 'computed', 'constraints', 'contract_facts', 'contractual_fee', 'contribution_margin', 'contribution_profit', 'cost_per_unit', 'cost_policy', 'costs', 'costs_by_category', 'costs_evaluated', 'costs_in_floor', 'counts', 'currency', 'current', 'current_fee', 'declared_bearer', 'decreasing', 'definitions', 'derived_bearer', 'derived_quantities', 'description', 'detail', 'deviations', 'difference', 'direct_delivery_cost', 'direction', 'discrepancies', 'display', 'distribution', 'dominated_by', 'driver', 'dry_run', 'edge', 'engagement', 'engagement_id', 'engine_version', 'entitlement', 'enumerated', 'errors', 'estimated_seconds', 'evaluated', 'exact', 'explanation', 'failing_constraints', 'feasible', 'fee_change', 'fee_line_items', 'fee_total', 'fees', 'fingerprints', 'flat', 'floors', 'formula', 'from', 'frontier', 'frontier_metrics', 'frontier_truncated', 'full', 'full_cost_profit', 'grid_edges', 'grid_size', 'gross_margin', 'gross_profit', 'gt', 'gte', 'headroom', 'horizon', 'id', 'include_baseline', 'increasing', 'infeasible', 'input_fingerprint', 'invalid', 'invalid_reasons', 'issues', 'kind', 'labels', 'leaf_true', 'ledger', 'line_items', 'lower', 'lt', 'lte', 'max', 'max_candidates', 'max_returned', 'measured', 'mechanisms_priced', 'message', 'metric', 'metrics', 'min', 'minimums', 'money_policy', 'month', 'must not be negative', 'name', 'non_dominated', 'not', 'note', 'nothing_compared', 'objective', 'objective_values', 'ok', 'on_frontier', 'op', 'operation', 'origin', 'outcome_fee', 'overage_fee', 'overage_recognition', 'packs', 'parameter', 'parameters', 'path', 'percent', 'period', 'periods', 'pointer', 'pointers', 'precision', 'price_floor', 'profile', 'provider_downside', 'publishable_summary', 'quantity_spreading', 'range', 'ranking', 'rate', 'rate_assumptions', 'reason', 'reconcile', 'reconciled', 'record_type', 'reference', 'rejected', 'relative', 'relative_difference', 'results', 'risk', 'risk_exposure', 'risk_premium', 'rollover', 'rounding', 'rows', 'rules_fired', 'scale', 'scenario', 'scenario_id', 'scenarios', 'schema_version', 'scope', 'sense', 'set', 'severity', 'shortfall_rule', 'standard', 'standard_value', 'status', 'step', 'summary', 'target_margin', 'term', 'termination', 'tested_against', 'threshold', 'thresholds', 'tie_breakers', 'time_period', 'to', 'tolerance', 'transform', 'type', 'unit', 'unit_contribution', 'unit_floor', 'upper', 'valid', 'value', 'values', 'values_per_parameter', 'volume', 'volume_quantity', 'vs_baseline', 'warnings', 'whole', 'within_limit', 'within_tolerance', 'worked_hours', 'years', '~', '~0', '~1']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/core/ontology.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
[' (', ' .', ' ;\n ', '"', '""")', '# Cometric ontology', '## Claims', '## Classes', '## Contents', '## Core model', '## Core vocabularies', '## Files', '## Glossary', '## Overlays', '## Packs', '## Rules', '## Sources', '### Classes', '### References by id', '(?<!^)(?=[A-Z])', ')', ', ', ', evaluated', ', not evaluated', '-', '.', '0..1', '1', '; ', '</details>', 'Adjustment', 'Arrangement version', 'ArrangementVersion', 'Billing bases: ', 'Broader: ', 'CapacityLimit', 'Claim', 'Claims', 'Claims: ', 'Commitment', 'CostComponent', 'CostPolicy', 'CostTier', 'DeliveryPlan', 'EffectivePeriod', 'Engagement', 'Entitlement', 'FeeComponent', 'Glossary', 'Horizon', 'IncurredLine', 'Methods: ', 'MoneyPolicy', 'Namespaces:', 'OutcomeTerms', 'Overlay', 'Overlays', 'Pack', 'PackRef', 'Party', 'PaymentLine', 'ProductionStandard', 'README.md', 'RateSchedule', 'Related: ', 'ResourceLine', 'ResourceRole', 'RiskAllocation', 'RoleRate', 'Rollover', 'Root documents: ', 'Rule', 'Rules', 'Scenario', 'Service', 'Source', 'Sources', 'Synonyms: ', 'Tier', 'TolerancePolicy', 'URL', 'UnitDefinition', 'WeightBand', '\\', '\\"', '\\\\', '\\n', '\\r', '\\t', '\\|', '_', '```', '```json', '```mermaid', '```python', 'a', 'allowed value', 'allowedValue', 'applies_to', 'assessment', 'attributes', 'bases', 'billing basis', 'billingBasis', 'boolean', 'broader', 'calculation method', 'calculationMethod', 'caveat', 'caveats', 'claim', 'claims', 'classification', 'cm', 'cm:Claim', 'cm:Overlay', 'cm:Pack', 'cm:Rule', 'cm:Source', 'cm:allowedValue', 'cm:assessment', 'cm:attributes', 'cm:billingBasis', 'cm:calculationMethod', 'cm:caveat', 'cm:claim', 'cm:code', 'cm:condition', 'cm:defaultValue', 'cm:evaluable', 'cm:evidenceClass', 'cm:explanation', 'cm:extends', 'cm:fieldName', 'cm:kind', 'cm:message', 'cm:minItems', 'cm:multiple', 'cm:overlays', 'cm:pack', 'cm:prevalence', 'cm:publicationDate', 'cm:referencedById', 'cm:required', 'cm:retrievedDate', 'cm:severity', 'cm:source', 'cm:sourceRef', 'cm:sourceType', 'cm:statement', 'cm:status', 'cm:url', 'cm:verified', 'cmv', 'code', 'cometric.ttl', 'component_id', 'component_ids', 'concepts', 'condition', 'core model', 'core vocabularies', 'core#', 'core.md', 'date', 'dcterms', 'dcterms:license', 'decimal (string)', 'default', 'default value', 'defaultValue', 'definition', 'depends_on', 'description', 'emit', 'en', 'entitlement_id', 'enum', 'evaluable', 'evidence class', 'evidenceClass', 'evidence_class', 'explanation', 'extends', 'field name', 'fieldName', 'flowchart LR', 'glossary', 'granted_by', 'id', 'import rdflib', 'integer', 'issue code', 'kind', 'label', 'literal', 'map', 'message', 'methods', 'minItems', 'min_items', 'minimum items', 'model', 'month (YYYY-MM)', 'multiple', 'no', 'object (map)', 'one of ', 'ontology terms', 'overflow_replaces', 'overlay', 'overlays', 'owl', 'owl:Class', 'owl:DatatypeProperty', 'owl:ObjectProperty', 'owl:Ontology', 'owl:versionInfo', 'pack', 'prevalence', 'publication date', 'publicationDate', 'publication_date', 'rate_schedule_id', 'rdf', 'rdf:JSON', 'rdfs', 'rdfs:comment', 'rdfs:domain', 'rdfs:label', 'rdfs:range', 'ref', 'referenced by id', 'referencedById', 'related', 'required', 'retrieved date', 'retrievedDate', 'retrieved_date', 'row', 'rows = g.query("""', 'rule', 'scalar', 'service_id', 'severity', 'skos', 'skos:Concept', 'skos:ConceptScheme', 'skos:altLabel', 'skos:broader', 'skos:definition', 'skos:inScheme', 'skos:notation', 'skos:prefLabel', 'skos:related', 'skos:topConceptOf', 'source', 'source reference', 'source type', 'sourceRef', 'sourceType', 'source_ref', 'source_type', 'sources', 'statement', 'status', 'string', 'supersedes_id', 'synonyms', 'title', 'true', 'unit_definition_id', 'url', 'values', 'verified', 'version', 'vocab#', 'weight_table_id', 'when', 'xsd', 'xsd:anyURI', 'xsd:boolean', 'xsd:date', 'xsd:decimal', 'xsd:gYearMonth', 'xsd:integer', 'xsd:string', 'yes', '|', '| Class | Meaning |', '| File | Contents |', '|---|---|', '|---|---|---|', '|---|---|---|---|', '} ORDER BY ?id']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/cli.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
[8765, '+', '--actuals', '--component', '--cost-policy', '--detail', '--driver', '--host', '--out', '--pack', '--period', '--port', '--risk-premium', '--scenario', '--scenarios', '--summary-only', '--target-margin', '--tolerance-absolute', '--tolerance-relative', '--transport', '--version', '.yaml', '.yml', '0', '0.01', '127.0.0.1', '__main__', 'append', 'break-even', 'calculate', 'cmd', 'cometric', 'compare', 'compared', 'cost_policies', 'description', 'discrepancies', 'engagement', 'engagements', 'errors', 'explain', 'feasible', 'floor', 'http', 'id', 'infeasible', 'issues', 'line_items', 'list installed packs', 'list templates', 'lookup', 'mcp', 'model', 'nothing_compared', 'ok', 'ontology', 'pack', 'packs', 'periods', 'print a template', 'problems', 'publishable_summary', 'query', 'reconcile', 'reconciled', 'run the MCP server', 'scenarios', 'schema', 'search', 'source', 'spec', 'status', 'stdio', 'store_true', 'summary', 'template', 'template_id', 'templates', 'valid', 'validate', 'validate-pack', 'version', 'warnings']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/core/quantities.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
[' + ', ' - ', ' / ', ' x ', '(', ')', '..', '/const', '/expression', '/name', '/profile', '/q', '/rounding', '/time_period', '/unit', '/value', 'ASSUMPTION_OVERLAP', 'BAD_EXPRESSION', 'DEPENDENCY_CYCLE', 'DIVISION_BY_ZERO', 'DUPLICATE_ID', 'NEGATIVE_QUANTITY', 'NOT_ALLOCATABLE', 'PROFILE_LENGTH', 'ROUNDING_REQUIRED', 'TERM', 'UNKNOWN_QUANTITY', 'UNKNOWN_UNIT', '^\\d{4}$', 'assumptions', 'const', 'count', 'currency', 'derived', 'difference', 'expression', 'flag', 'fte', 'hours', 'product', 'q', 'quotient', 'ratio', 'scenario', 'scenario.', 'sum']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/core/schema.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
[10000, '$schema', ', ', '.', '0', '0.15', '110', 'A bare engagement', 'Actuals (reconcile)', 'BASE', 'Default display', 'Default summary', 'MEAN', 'SearchSpec', 'WORST', 'actuals', 'add', 'adjustment', 'aggregation', 'all', 'arrangement_version', 'array', 'assumption', 'base_scenario', 'boolean', 'by_reference', 'candidate', 'commitment', 'commitment_shortfall', 'constraint', 'constraint_paths', 'constraints', 'contractual_fee', 'contribution_margin', 'contribution_profit', 'cost_component', 'cost_policy', 'delivery_plan', 'derived_quantities', 'description', 'detail', 'direct_delivery_cost', 'display', 'dry_run', 'engagement', 'entitlement', 'enum', 'error_paths', 'exact', 'examples', 'fee_component', 'from', 'frontier_metrics', 'full', 'gross_margin', 'gross_profit', 'gt', 'id', 'include_baseline', 'integer', 'items', 'lt', 'lte', 'max', 'max_candidates', 'max_returned', 'maximum', 'metric', 'min', 'name', 'not', 'object', 'objective', 'oneOf', 'outcome_fee', 'overage_fee', 'parameters', 'path', 'paths', 'periods', 'pointer', 'pointers', 'precision', 'properties', 'quantity_source', 'range', 'rate_schedule', 'required', 'rule_paths', 'scale', 'scenario', 'scenarios', 'schema_version', 'search_parameters', 'search_spec', 'sense', 'set', 'standard', 'step', 'string', 'summary', 'term', 'tie_breakers', 'title', 'to', 'tolerance_policy', 'transform', 'type', 'values', '{metric: "amount"}']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/core/enums.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
['AI_INFERENCE', 'ALLOWANCE_OVERAGE', 'ALL_ELIGIBLE', 'ALL_UNITS', 'AMORTIZED', 'ANNUAL', 'APPROVAL_REQUIRED', 'AVOIDABLE', 'A_DIRECT', 'BACKLOG', 'BONUS', 'B_CORROBORATED', 'CALENDAR_DAYS', 'CAP', 'CAPACITY', 'CLIENT', 'COLLAR', 'COMPONENT', 'CONTRACTED', 'CONTRACT_YEAR', 'CORPORATE_OVERHEAD', 'COST', 'COST_PLUS', 'COUNT', 'CUMULATIVE', 'C_INFERENCE', 'DEDICATED', 'DEDICATED_LABOR', 'DEDICATED_RESOURCE', 'DELIVERY_MANAGEMENT', 'DIRECT_DELIVERY', 'DISCOUNT', 'DOWN', 'D_PROPOSED', 'EMERGING', 'ENGAGEMENT', 'ENGAGEMENT_AVOIDABLE', 'ENGAGEMENT_OVERHEAD', 'ENTIRE_SUBTOTAL', 'ERROR', 'ESTABLISHED_COMMON', 'ESTIMATED', 'EVENT', 'EXCESS_ONLY', 'FIXED', 'FIXED_PROJECT', 'FIXED_RECURRING', 'FLAT', 'FTE_MONTHS', 'FULL_MONTH_FROM_NEXT', 'GRADUATED_BLOCK', 'GROSS', 'HALF_EVEN', 'HALF_UP', 'HIGHER_IS_BETTER', 'HOLDBACK', 'HOURS', 'HYBRID', 'IDLE_POOLED_CAPACITY', 'ILLUSTRATIVE', 'INCURRED', 'INDEXATION', 'INFEASIBLE', 'INFO', 'INTERNAL_POLICY', 'JOINT', 'LINE_ITEM', 'LOWER_IS_BETTER', 'MARGINAL', 'METER', 'MINIMUM_SPEND', 'MINIMUM_VOLUME', 'MONTH', 'MONTHLY', 'NET_OF_CREDITS', 'NET_OF_DISCOUNTS', 'NEXT_PERIOD', 'NONE', 'NONE_ADVERSE', 'OBSERVED', 'ONE_TIME', 'OUTCOME', 'OUTCOME_ADJUSTMENT', 'OUTPUT', 'OVERFLOW_COST', 'PERCENT_OF_OUTCOME', 'PERIOD_END', 'PERIOD_END_TRUE_UP', 'PERIOD_TOTAL', 'PER_SEGMENT', 'PLATFORM_OPERATIONS', 'POOLED', 'POOLED_LABOR', 'PORTFOLIO_SHARED', 'PREPAID_CREDIT', 'PROFILE', 'PRORATE', 'PROVIDER', 'QA_REWORK', 'QUARTER', 'QUARTERLY', 'RATE', 'REBATE', 'REMAINDER_DUE', 'RESERVED_CAPACITY', 'RESOURCE', 'REUSABLE_ENGINEERING', 'SERVICE', 'SHARE', 'SHARED', 'SLA_CREDIT', 'STEP', 'SUBCONTRACTOR', 'SUCCESS', 'TERM', 'THIRD_PARTY', 'TIERED_VARIABLE', 'TIME', 'TOTAL', 'TRANSITION', 'UNAVOIDABLE', 'UNIT_OUTPUT', 'UNKNOWN', 'UNVERIFIED', 'UP', 'USAGE', 'USAGE_TRIGGERED', 'VARIABLE', 'WAIVED', 'WARNING', 'WEIGHTED', 'WEIGHTED_UNIT_OUTPUT', 'YEAR']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/core/glossary.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
['accumulation_period', 'contractual_fee', 'contribution_profit', 'cost_policy', 'derived_bearer', 'dominance', 'evidence_class', 'gross_profit', 'margin', 'margin_layer', 'origin', 'outcome_fee', 'price_floor', 'realization', 'recognition']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/mcp/server.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
[b'Method Not Allowed', b'POST', b'Unauthorized', b'allow', b'authorization', b'content-type', b'text/plain', 401, 405, 8765, ',', '.yaml', '.yml', '/', '/mcp', '0', '0.01', '127.0.0.1', '127.0.0.1:*', 'COMETRIC_MCP_TOKEN', 'Cometric', 'DELETE', 'ERROR', 'GET', 'INTERNAL_ERROR', 'INVALID_INPUT', 'UNKNOWN_NAME', 'application/json', 'approvals_required', 'areas', 'body', 'claims', 'code', 'cometric', 'cometric://glossary', 'concept', 'concept-scheme', 'coverage', 'display', 'engagement', 'engine_version', 'error', 'errors', 'evidence_class', 'example', 'examples', 'glossary', 'headers', 'hint', 'http', 'http.response.body', 'http.response.start', 'id', 'info', 'invalid', 'issues', 'label', 'localhost', 'localhost:*', 'message', 'method', 'name', 'overlays', 'pack', 'pack-template', 'packs', 'path', 'prevalence', 'query', 'quickstart', 'reference', 'results', 'rules', 'schema', 'schema_version', 'search_structures', 'severity', 'source_records', 'sources', 'status', 'stdio', 'summary', 'template', 'templates', 'terms', 'type', 'validate_engagement', 'values', 'warnings']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/core/quickstart.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
['0.10', '0.20', '100000', '110', '12000', '1200000', '130', '140.00', '15000', '2027-01', '40', '40000', '9000', '90000', 'DEDICATED_LABOR', 'ESTIMATED', 'EX-ALT', 'FIXED', 'MEAN', 'MONTHLY', 'POOLED_LABOR', 'TERM', 'VARIABLE', 'WORST', 'accepted_units', 'actuals', 'aggregation', 'amount', 'arguments', 'arrangement_versions', 'assumptions', 'base', 'base_fee', 'behavior', 'break_even', 'by_reference', 'calculate_periods', 'candidates', 'category', 'compare_arrangements', 'components', 'constraints', 'contractual_fee', 'contribution_profit', 'conventions', 'cost_components', 'cost_policy', 'counting_rules', 'current', 'decimals', 'delivery_plan', 'derive_risk_exposure', 'detail', 'detail_and_precision', 'driver', 'engagement', 'engagement_id', 'errors', 'examples', 'explain_fee', 'fixed_amount', 'get_template', 'high', 'how', 'id', 'lookup_concept', 'low', 'lower_base', 'lt', 'max', 'metric', 'name', 'next', 'no_arithmetic', 'not', 'notes', 'objective', 'origin', 'overage_rate', 'parameters', 'path', 'patterns', 'per_review', 'period', 'periods', 'pointer', 'price_floor', 'quantities', 'rate', 'rate_schedules', 'reconcile', 'reference', 'references', 'results', 'scenario', 'scenarios', 'search_dry_run', 'search_spec', 'search_structures', 'sense', 'spec_example.json', 'summary', 'target_margin', 'team', 'term', 'termination', 'tie_breakers', 'tiers', 'time_period', 'tool', 'tools_with_examples', 'unit', 'validate_engagement', 'value', 'values']
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.0 (2026-11-05)
|
|
4
|
+
|
|
5
|
+
Additive; no breaking changes. `ENGINE_VERSION` stays 0.3.0: no calculation or fingerprint changed.
|
|
6
|
+
|
|
7
|
+
- Ontology export: `cometric ontology` prints the ontology as Turtle (OWL classes and properties for the input model, SKOS concept schemes for the core vocabularies and every pack, with overlays, rules, claims, and sources as typed resources). `cometric ontology --out DIR` also writes a Markdown reference. The generated reference is committed in `docs/ontology/`, and a test fails when it is stale.
|
|
8
|
+
- The glossary moved from the MCP server to `cometric.core.glossary`, so the ontology can use it without the `mcp` extra.
|
|
9
|
+
|
|
10
|
+
## 0.4.0 (2026-11-05)
|
|
11
|
+
|
|
12
|
+
Additive; no breaking changes. `ENGINE_VERSION` stays 0.3.0 because no existing calculation changed. Fingerprints of existing scenarios still change, because the scenario schema gained fields with default values (`derived`, and `basis` on assumptions) that are part of the fingerprint.
|
|
13
|
+
|
|
14
|
+
- Counting rules: assumptions with `basis: RATE` apply every month unchanged; scenarios can declare `derived` quantities (sum, difference, product, quotient over other quantities and constants), evaluated each month in dependency order, with explicit rounding for COUNT units. Results list derived formulas under `definitions`.
|
|
15
|
+
- Search parameters can set a named scenario assumption in every scenario (`"assumption": "reissue_rate"`).
|
|
16
|
+
- ALSP pack: counting-rule concepts (CNT-001 to CNT-003) and `pattern_counting_rules`.
|
|
17
|
+
|
|
3
18
|
## 0.3.0 (2026-11-05)
|
|
4
19
|
|
|
5
20
|
### Breaking changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cometric
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Commercial Intelligence Engine: model, simulate, and optimize the economics of service engagements.
|
|
5
5
|
Project-URL: Homepage, https://github.com/mfbaig35r/cometric
|
|
6
6
|
Project-URL: Repository, https://github.com/mfbaig35r/cometric
|
|
@@ -118,7 +118,7 @@ The HTTP transport keeps no session state, answers `GET /mcp` with 405, keeps DN
|
|
|
118
118
|
|
|
119
119
|
## Packs
|
|
120
120
|
|
|
121
|
-
Packs are YAML only, with no executable code. `base` holds domain-neutral commercial knowledge: billing bases, 34 pricing models,
|
|
121
|
+
Packs are YAML only, with no executable code. `base` holds domain-neutral commercial knowledge: billing bases, 34 pricing models, 70 levers, 16 commercial dimensions, 49 metrics and indicators, cost categories, compatibility and reasoning rules, selection heuristics, mechanisms, and negotiation exchanges. `alsp` extends it for alternative legal services with service categories, unit templates, provider types, regulatory review rules, sector prevalence overlays, and evidence. `consulting` extends it for advisory work with realization and staffing concepts, outcome-fee review rules, and five templates: role-based time and materials, capped time and materials, phased fixed fee, hours-drawdown retainer, and fixed fee plus success fee.
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
124
|
cometric packs
|
|
@@ -126,6 +126,15 @@ cometric validate-pack alsp
|
|
|
126
126
|
cometric validate-pack consulting
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
## Ontology
|
|
130
|
+
|
|
131
|
+
The ontology is published in [`docs/ontology/`](docs/ontology/README.md): diagrams of the core model, every field and controlled vocabulary, and a page per pack with each concept's definition, evidence class, relations, rules, claims, and sources. [`cometric.ttl`](docs/ontology/cometric.ttl) holds the same content in Turtle (OWL classes for the core model, SKOS concept schemes for vocabularies and packs), for Protégé, rdflib, or any SPARQL store. Both are generated from the package, and a test fails when the committed copy is out of date.
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
cometric ontology > cometric.ttl # Turtle to stdout
|
|
135
|
+
cometric ontology --out docs/ontology # regenerate the reference
|
|
136
|
+
```
|
|
137
|
+
|
|
129
138
|
## Development
|
|
130
139
|
|
|
131
140
|
```bash
|
|
@@ -135,7 +144,7 @@ uv run ruff check src tests scripts && uv run ruff format --check src tests scri
|
|
|
135
144
|
uv run python scripts/build_fixtures.py # regenerate casebook fixtures
|
|
136
145
|
```
|
|
137
146
|
|
|
138
|
-
The specification is `docs/COMETRIC_SPEC_v0.3.md
|
|
147
|
+
The specification is `docs/COMETRIC_SPEC_v0.3.md`; the ontology reference is `docs/ontology/`. Implementation status is in `docs/STATUS.md`; worked commercial patterns (tiered minimums, transition credits, partial billing, cost from hours, early termination) are in `docs/PATTERNS.md`; reconciling a real engagement is described in `docs/RECONCILIATION.md`.
|
|
139
148
|
|
|
140
149
|
## License
|
|
141
150
|
|
|
@@ -88,7 +88,7 @@ The HTTP transport keeps no session state, answers `GET /mcp` with 405, keeps DN
|
|
|
88
88
|
|
|
89
89
|
## Packs
|
|
90
90
|
|
|
91
|
-
Packs are YAML only, with no executable code. `base` holds domain-neutral commercial knowledge: billing bases, 34 pricing models,
|
|
91
|
+
Packs are YAML only, with no executable code. `base` holds domain-neutral commercial knowledge: billing bases, 34 pricing models, 70 levers, 16 commercial dimensions, 49 metrics and indicators, cost categories, compatibility and reasoning rules, selection heuristics, mechanisms, and negotiation exchanges. `alsp` extends it for alternative legal services with service categories, unit templates, provider types, regulatory review rules, sector prevalence overlays, and evidence. `consulting` extends it for advisory work with realization and staffing concepts, outcome-fee review rules, and five templates: role-based time and materials, capped time and materials, phased fixed fee, hours-drawdown retainer, and fixed fee plus success fee.
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
94
|
cometric packs
|
|
@@ -96,6 +96,15 @@ cometric validate-pack alsp
|
|
|
96
96
|
cometric validate-pack consulting
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
+
## Ontology
|
|
100
|
+
|
|
101
|
+
The ontology is published in [`docs/ontology/`](docs/ontology/README.md): diagrams of the core model, every field and controlled vocabulary, and a page per pack with each concept's definition, evidence class, relations, rules, claims, and sources. [`cometric.ttl`](docs/ontology/cometric.ttl) holds the same content in Turtle (OWL classes for the core model, SKOS concept schemes for vocabularies and packs), for Protégé, rdflib, or any SPARQL store. Both are generated from the package, and a test fails when the committed copy is out of date.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
cometric ontology > cometric.ttl # Turtle to stdout
|
|
105
|
+
cometric ontology --out docs/ontology # regenerate the reference
|
|
106
|
+
```
|
|
107
|
+
|
|
99
108
|
## Development
|
|
100
109
|
|
|
101
110
|
```bash
|
|
@@ -105,7 +114,7 @@ uv run ruff check src tests scripts && uv run ruff format --check src tests scri
|
|
|
105
114
|
uv run python scripts/build_fixtures.py # regenerate casebook fixtures
|
|
106
115
|
```
|
|
107
116
|
|
|
108
|
-
The specification is `docs/COMETRIC_SPEC_v0.3.md
|
|
117
|
+
The specification is `docs/COMETRIC_SPEC_v0.3.md`; the ontology reference is `docs/ontology/`. Implementation status is in `docs/STATUS.md`; worked commercial patterns (tiered minimums, transition credits, partial billing, cost from hours, early termination) are in `docs/PATTERNS.md`; reconciling a real engagement is described in `docs/RECONCILIATION.md`.
|
|
109
118
|
|
|
110
119
|
## License
|
|
111
120
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cometric | Commercial Intelligence Engine
|
|
2
2
|
|
|
3
|
-
**Engineering Requirements v0.3 (as built for 0.
|
|
3
|
+
**Engineering Requirements v0.3 (as built for 0.5.0)**
|
|
4
4
|
|
|
5
5
|
Cometric does three things:
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ It is built for any service relationship priced through a composite arrangement:
|
|
|
13
13
|
| | |
|
|
14
14
|
|---|---|
|
|
15
15
|
| Project | Cometric (`cometric` on PyPI; CLI and MCP server `cometric`) |
|
|
16
|
-
| Status | Normative for `cometric` 0.
|
|
16
|
+
| Status | Normative for `cometric` 0.5.0 (0.1.0 released 2026-11-04; 0.2.0 to 0.5.0 on 2026-11-05). Open-source project. Where this document and the code disagree, the code's tests are the tiebreaker and the disagreement is a defect in one of them. |
|
|
17
17
|
| License | Apache-2.0 |
|
|
18
18
|
| Date | November 4, 2026 |
|
|
19
19
|
| Supersedes | `COMETRIC_SPEC_v0.2.md` (kept for history, with the v0.1 to v0.2 change log) |
|
|
@@ -57,6 +57,8 @@ v0.3 records what was built. Most changes resolve questions v0.2 left implicit;
|
|
|
57
57
|
| V3-22 | App. D | Evidence verification status replaces the v0.2 priority list. |
|
|
58
58
|
| V3-23 | 4.2, 9 | ALL_UNITS cliff bands compare every earlier tier with each threshold, with an inclusive lower bound where a band starts at a tier edge (0.2.0). |
|
|
59
59
|
| V3-24 | 8.3, 9, 10 | `reconcile` operation for M6, with a publishable summary (0.2.0). |
|
|
60
|
+
| V3-30 | 6.1, 6.4, 9 | Counting rules through RATE assumptions and derived quantities; search parameters can set a named assumption (0.4.0). |
|
|
61
|
+
| V3-31 | 3.7, 9 | Ontology export: Turtle (OWL and SKOS) and a Markdown reference generated from the models, core vocabularies, and packs; committed in `docs/ontology/` (0.5.0). |
|
|
60
62
|
| V3-28 | 4.4, 6.1, 9 | Termination scenarios: `termination_date` on a scenario, `termination_rule` on minimums, `termination_fee` on a version (0.3.0). |
|
|
61
63
|
| V3-29 | 3.4, 6.3, App. C | ALSP template `tiered_units_annual_minimum` and five worked patterns (`docs/PATTERNS.md`); "pending human review" defined (0.3.0). |
|
|
62
64
|
| V3-27 | 6.2, 6.4, 8.3, 11 | Search returns best results first with full figures, tie-breakers, constraint results, grid-edge warnings, and baseline differences; dry run; linked and scaled parameters; detail and precision levels; the server stays stateless (0.3.0). |
|
|
@@ -338,6 +340,18 @@ The research report itself is not shipped as prose (§11, Q-3). It is decomposed
|
|
|
338
340
|
- Every record keeps its evidence class. A class C or D record is always returned labeled as inference or proposal.
|
|
339
341
|
- Capture is auditable: every report identifier, and every row of the unnumbered tables above, appears in a pack or in `packs/base/excluded.yaml` with a reason (T-033).
|
|
340
342
|
|
|
343
|
+
### 3.7 Ontology export `[V3-31]`
|
|
344
|
+
|
|
345
|
+
The ontology is a generated view of what the engine accepts, never a separate source of truth. `cometric ontology` emits it as Turtle:
|
|
346
|
+
|
|
347
|
+
| Layer | Representation | Namespace |
|
|
348
|
+
|---|---|---|
|
|
349
|
+
| Core model (every class reachable from Engagement, Scenario, CostPolicy, TolerancePolicy) | `owl:Class`; each field an `owl:ObjectProperty` or `owl:DatatypeProperty` with domain, range, required, multiple, and default. Fields that hold another object's id are object properties marked `cm:referencedById`. | `cm:` |
|
|
350
|
+
| Core vocabularies and the glossary | `skos:ConceptScheme` (also an `owl:Class`) with one `skos:Concept` per value | `cmv:` |
|
|
351
|
+
| Packs | One `skos:ConceptScheme` per concept file; concepts carry `skos:broader`, `skos:related`, billing bases, methods, evidence class, prevalence, claims, and caveats. Overlays, rules, claims, and sources are `cm:Overlay`, `cm:Rule`, `cm:Claim`, `cm:Source`. | `pack-<id>:` |
|
|
352
|
+
|
|
353
|
+
Concept ids are unique within a pack chain, not across packs, so a reference resolves through the referring pack's chain. `cometric ontology --out DIR` also writes a Markdown reference (one diagram per aggregate, a table of references by id, field tables, one page per pack). The copy in `docs/ontology/` is committed; a test regenerates it and fails on any difference, and fails on any reference to an undeclared resource.
|
|
354
|
+
|
|
341
355
|
## 4. Contract and fee semantics
|
|
342
356
|
|
|
343
357
|
### 4.1 Fee component contract
|
|
@@ -660,6 +674,8 @@ A scenario is an immutable snapshot of arrangement version, cost policy, demand
|
|
|
660
674
|
|
|
661
675
|
Assumptions stated over a longer period than a month MUST declare a `demand_distribution`: `FLAT` (exact allocation per §4.7) or an explicit monthly profile.
|
|
662
676
|
|
|
677
|
+
**Rates and derived quantities** `[V3-30]`. An assumption with `basis: RATE` applies its value to every month of its time period unchanged (rates, shares, ratios); the default `TOTAL` spreads a total. A scenario's `derived` list computes quantities each month from assumptions and other derived quantities with a small expression language: `{"q": name}`, `{"const": "1"}`, `{"sum": [...]}`, `{"difference": [a, b]}`, `{"product": [...]}`, `{"quotient": [a, b]}`. Derived quantities are evaluated in dependency order (cycles are errors), may be used anywhere a `quantity_source` or cost driver is, and must declare `rounding` (`NONE`, `HALF_UP`, `DOWN`, `UP`) when their unit is a COUNT unit. Counting rules such as "re-issued documents are billed once" or "a bundle is billed once at its highest tier" are written this way, so the rule's assumptions stay visible, labelled, and searchable. Results list rate assumptions and each derived quantity's formula under `definitions`.
|
|
678
|
+
|
|
663
679
|
v1 SHALL support low/base/high scenarios and deterministic one-way sensitivity analysis. Probability distributions and Monte Carlo are deferred until calibrated data is available.
|
|
664
680
|
|
|
665
681
|
### 6.2 Candidate comparison
|
|
@@ -715,7 +731,7 @@ In Cometric, "optimize" means a deterministic search over a space of candidate s
|
|
|
715
731
|
|
|
716
732
|
**Output** `[V3-27]`: the best results come first. With an objective, `best` lists every candidate tied at the top after applying `objective.tie_breakers` in order, each with its parameter values, objective values, key metrics per scenario, difference from the baseline per scenario, the result of each constraint leaf, provider and client downside per deviation, `grid_edges` (parameters whose winning value is the lowest or highest in the grid), and calculation fingerprints. A `BEST_AT_GRID_EDGE` warning says when the grid should be widened before calling a result optimal. The baseline (default on) is the search_spec engagement as given. Then come counts (enumerated, invalid, infeasible, failing constraints, on frontier), invalid reasons, and the unranked frontier. If the frontier exceeds `max_returned` (default 20), the result says so. It never applies an undeclared ranking.
|
|
717
733
|
|
|
718
|
-
**Parameters and sizing** `[V3-27]`: a parameter may write one `pointer` or several `pointers`, with `transform` `set` (write the value), `scale` (base × (1 + value)), or `add` (base + value), so "the same uplift on every tier" is one parameter instead of a combinatorial grid. `dry_run: true` returns grid size, calculation count, and an estimated time without running the search, so the user can confirm first.
|
|
734
|
+
**Parameters and sizing** `[V3-27]`: a parameter may set a named scenario assumption in every scenario (`assumption`, `[V3-30]`), or write one `pointer` or several `pointers`, with `transform` `set` (write the value), `scale` (base × (1 + value)), or `add` (base + value), so "the same uplift on every tier" is one parameter instead of a combinatorial grid. `dry_run: true` returns grid size, calculation count, and an estimated time without running the search, so the user can confirm first.
|
|
719
735
|
|
|
720
736
|
**Detail and precision** `[V3-27]`: `detail` is `summary` (default: best results in full, frontier as parameter sets, key metrics only, empty nested fields dropped), `standard`, or `full`; `precision` is `display` (default: ratios to 4 places, prices to 2) or `exact`. Fingerprints are unaffected.
|
|
721
737
|
|
|
@@ -1048,6 +1064,8 @@ The test suite MUST include:
|
|
|
1048
1064
|
| T-044 | LLM-feedback fixes `[V3-26]` | Threshold discount and rebate: EXCESS_ONLY 3,175,000 and ENTIRE_SUBTOTAL 2,925,000 on a 3,250,000 gross with a 2,500,000 threshold; the excess discount starts in the crossing month; missing scope or period is an error with an example; several unit types give a null unit price with a warning, and `client_value_unit` with `+` sums them; bare-engagement candidates work and bad ones get a pointer; the constraint `op` alias works; no tool returns an unstructured error; every quickstart payload runs through the MCP server |
|
|
1049
1065
|
| T-045 | Termination `[V3-28]` | PRORATE charges the shortfall against 150,000 x 181/365 at a 30 June termination; REMAINDER_DUE charges 90,000 for one year and 240,000 with a second year, and owes later years at a period-end termination; WAIVED charges none; the fee posts; quantities spread over the original term; unamortized transition is written off; a cut-short outcome fee is not charged; a missing rule, an out-of-range date, and a mid-month date without proration are errors |
|
|
1050
1066
|
| T-046 | Patterns `[V3-29]` | Every pattern file matches figures computed by hand in `scripts/build_alsp.py`; the ALSP template round-trips |
|
|
1067
|
+
| T-048 | Ontology export `[V3-31]` | The Turtle parses; every pack concept, rule, claim, and source is typed; no reference points to an undeclared resource; every model field is a property; the README's example query returns rows; the committed `docs/ontology/` matches the generator |
|
|
1068
|
+
| T-047 | Counting rules `[V3-30]` | A RATE assumption applies each month; a derived billable quantity prices correctly; rounding is required for COUNT units and applied per month; bad expressions, unknown references, cycles, division by zero, negative results, and name clashes are errors with paths; search can vary an assumption; the counting-rules pattern matches its hand-computed fee |
|
|
1051
1069
|
| T-042 | Reconciliation `[V3-24]` | Actuals equal to computed figures reconcile; a changed July invoice is reported at month 7 with the mechanism that priced it; the publishable summary contains no amounts, dates, or names; relative tolerance and unknown metrics are honored |
|
|
1052
1070
|
|
|
1053
1071
|
**Property tests** SHOULD verify: non-negative accepted units; non-overlapping effective dates; contiguous tiers; under `MARGINAL` tier schedules with non-negative rates, the pre-credit fee never decreases when eligible consumption increases, holding other terms fixed. Under `ALL_UNITS` schedules the property holds outside every band reported by `TIER_CLIFF` and is not asserted inside them. T-033 runs only when the private research report is present; CI skips it.
|
|
@@ -54,3 +54,14 @@ To keep a transition fee outside the minimum, give the minimum `aggregation_scop
|
|
|
54
54
|
| base | 3,154,000 |
|
|
55
55
|
|
|
56
56
|
Other termination rules: `REMAINDER_DUE` charges this period's full minimum and every later period's; `WAIVED` charges none. Outcome fees and rebates whose period termination cuts short are not charged, with a `TERMINATED_MID_PERIOD` warning, because the contract decides what is owed.
|
|
57
|
+
|
|
58
|
+
## 6. Counting rules
|
|
59
|
+
|
|
60
|
+
`pattern_counting_rules`. Pattern 1's volumes with two counting rules, written as derived quantities so every assumption is visible:
|
|
61
|
+
|
|
62
|
+
- **Re-issues billed once:** a `RATE` assumption `reissue_rate` of 5%, and `unique_k = submitted_k x (1 - reissue_rate)` for each tier.
|
|
63
|
+
- **Bundles billed once at the highest tier:** `bundle_share` (10% of lower-tier documents arrive in bundles) and `docs_per_bundle` (4) as `RATE` assumptions. Each lower tier keeps `unique_k - bundled_k`; tier 4 gets `unique_4 + bundles`, where `bundles = (bundled_1 + bundled_2 + bundled_3) / docs_per_bundle`.
|
|
64
|
+
|
|
65
|
+
Monthly billable units become 42.75 / 17.1 / 51.3 / 79.0875 instead of 50 / 20 / 60 / 80, so the year bills 3,552,525 before the discount and 3,497,272.50 after it, against 3,972,000 without the rules. The counts are fractional expected values (`rounding: NONE`); use `HALF_UP`, `DOWN`, or `UP` to bill whole units each month.
|
|
66
|
+
|
|
67
|
+
Monthly totals cannot show which documents arrive together, so the bundle share and size are assumptions, not facts. Search them by adding a parameter such as `{"name": "reissue", "assumption": "reissue_rate", "values": ["0", "0.05", "0.10"]}`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Cometric implementation status
|
|
2
2
|
|
|
3
|
-
Version `0.
|
|
3
|
+
Version `0.5.0` (0.1.0 released 2026-11-04; 0.5.0 adds the ontology export (`docs/ontology/`); 0.4.0 adds counting rules through rate assumptions and derived quantities; 0.2.0 added reconciliation and the fixes from two code reviews; 0.3.0 adds termination scenarios, the ALSP tiered-minimum template and patterns, and the fixes from an LLM-driven pricing analysis). The normative specification is `COMETRIC_SPEC_v0.3.md`, which incorporates every clarification below. The ontology reference (Markdown and Turtle) is generated into `ontology/`.
|
|
4
4
|
|
|
5
5
|
## Milestones
|
|
6
6
|
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
<!-- Generated by `cometric ontology --out docs/ontology`. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# Cometric ontology
|
|
4
|
+
|
|
5
|
+
Cometric's ontology has three layers, all generated from the package so they match what the engine accepts:
|
|
6
|
+
|
|
7
|
+
1. **Core model** ([core.md](core.md)): the classes and fields of an engagement, a scenario, and a cost policy. These are OWL classes and properties.
|
|
8
|
+
2. **Core vocabularies** ([core.md#core-vocabularies](core.md#core-vocabularies)): the controlled values the engine executes, such as billing bases, calculation methods, accumulation periods, and evidence classes. These are SKOS concept schemes.
|
|
9
|
+
3. **Packs**: domain knowledge as SKOS concept schemes, plus overlays, rules, claims, and sources. A pack can extend another and qualify its concepts with overlays.
|
|
10
|
+
|
|
11
|
+
## Files
|
|
12
|
+
|
|
13
|
+
| File | Contents |
|
|
14
|
+
|---|---|
|
|
15
|
+
| [cometric.ttl](cometric.ttl) | The whole ontology in Turtle (RDF): OWL for the core model, SKOS for vocabularies and packs, rules and evidence as typed resources. |
|
|
16
|
+
| [core.md](core.md) | Core classes, fields, and vocabularies. |
|
|
17
|
+
| [pack-alsp.md](pack-alsp.md) | Alternative legal services. |
|
|
18
|
+
| [pack-base.md](pack-base.md) | Base commercial knowledge. |
|
|
19
|
+
| [pack-consulting.md](pack-consulting.md) | Consulting and advisory services. |
|
|
20
|
+
|
|
21
|
+
## Packs
|
|
22
|
+
|
|
23
|
+
| Pack | Version | Extends | Concept schemes | Concepts | Overlays | Rules | Claims | Sources |
|
|
24
|
+
|---|---|---|---|---|---|---|---|---|
|
|
25
|
+
| [alsp](pack-alsp.md) | 0.1.0 | base | 4 | 21 | 52 | 16 | 48 | 25 |
|
|
26
|
+
| [base](pack-base.md) | 0.1.0 | | 15 | 325 | 0 | 29 | 52 | 14 |
|
|
27
|
+
| [consulting](pack-consulting.md) | 0.1.0 | base | 4 | 21 | 8 | 3 | 0 | 0 |
|
|
28
|
+
|
|
29
|
+
## Core model
|
|
30
|
+
|
|
31
|
+
One diagram per aggregate, showing what each object contains, then a table of the references by id between objects. Labels give the field and its cardinality. Grey dashed boxes are drawn in full in another diagram. `CostPolicy` and `TolerancePolicy` are flat (see [core.md](core.md)).
|
|
32
|
+
|
|
33
|
+
### Engagement
|
|
34
|
+
|
|
35
|
+
```mermaid
|
|
36
|
+
flowchart LR
|
|
37
|
+
Engagement -->|"packs 0..*"| PackRef
|
|
38
|
+
Engagement -->|"money_policy 0..1"| MoneyPolicy
|
|
39
|
+
Engagement -->|"parties 0..*"| Party
|
|
40
|
+
Engagement -->|"unit_definitions 1..*"| UnitDefinition
|
|
41
|
+
Engagement -->|"weight_tables 0..*"| ComplexityWeightTable
|
|
42
|
+
Engagement -->|"services 1..*"| Service
|
|
43
|
+
Engagement -->|"arrangement_versions 1..*"| ArrangementVersion
|
|
44
|
+
Engagement -->|"delivery_plan 0..1"| DeliveryPlan
|
|
45
|
+
Engagement -->|"risk_allocations 0..*"| RiskAllocation
|
|
46
|
+
ComplexityWeightTable -->|"bands 1..*"| WeightBand
|
|
47
|
+
classDef other fill:#f6f8fa,stroke:#8c959f,stroke-dasharray:4 3
|
|
48
|
+
class ArrangementVersion,DeliveryPlan other
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Arrangement version
|
|
52
|
+
|
|
53
|
+
```mermaid
|
|
54
|
+
flowchart LR
|
|
55
|
+
ArrangementVersion -->|"components 1..*"| FeeComponent
|
|
56
|
+
ArrangementVersion -->|"entitlements 0..*"| Entitlement
|
|
57
|
+
ArrangementVersion -->|"rate_schedules 0..*"| RateSchedule
|
|
58
|
+
ArrangementVersion -->|"commitments 0..*"| Commitment
|
|
59
|
+
ArrangementVersion -->|"adjustments 0..*"| Adjustment
|
|
60
|
+
FeeComponent -->|"effective_period 1"| EffectivePeriod
|
|
61
|
+
FeeComponent -->|"role_rates 0..*"| RoleRate
|
|
62
|
+
FeeComponent -->|"resources 0..*"| ResourceLine
|
|
63
|
+
FeeComponent -->|"payment_schedule 0..*"| PaymentLine
|
|
64
|
+
FeeComponent -->|"outcome 0..1"| OutcomeTerms
|
|
65
|
+
Entitlement -->|"rollover 0..1"| Rollover
|
|
66
|
+
RateSchedule -->|"tiers 1..*"| Tier
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Delivery plan and costs
|
|
70
|
+
|
|
71
|
+
```mermaid
|
|
72
|
+
flowchart LR
|
|
73
|
+
DeliveryPlan -->|"capacity 0..*"| CapacityLimit
|
|
74
|
+
DeliveryPlan -->|"roles 0..*"| ResourceRole
|
|
75
|
+
DeliveryPlan -->|"production_standards 0..*"| ProductionStandard
|
|
76
|
+
DeliveryPlan -->|"standard_rate_card 0..*"| RoleRate
|
|
77
|
+
DeliveryPlan -->|"cost_components 0..*"| CostComponent
|
|
78
|
+
CostComponent -->|"tiers 0..*"| CostTier
|
|
79
|
+
CostComponent -->|"incurred_schedule 0..*"| IncurredLine
|
|
80
|
+
CostComponent -->|"effective_period 0..1"| EffectivePeriod
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Scenario
|
|
84
|
+
|
|
85
|
+
```mermaid
|
|
86
|
+
flowchart LR
|
|
87
|
+
Scenario -->|"horizon 0..1"| Horizon
|
|
88
|
+
Scenario -->|"assumptions 0..*"| Assumption
|
|
89
|
+
Scenario -->|"derived 0..*"| DerivedQuantity
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### References by id
|
|
93
|
+
|
|
94
|
+
These fields hold another object's id rather than the object itself.
|
|
95
|
+
|
|
96
|
+
| From | Field | To | Cardinality |
|
|
97
|
+
|---|---|---|---|
|
|
98
|
+
| [Service](core.md#service) | `unit_definition_id` | [UnitDefinition](core.md#unitdefinition) | 1 |
|
|
99
|
+
| [ArrangementVersion](core.md#arrangementversion) | `supersedes_id` | [ArrangementVersion](core.md#arrangementversion) | 0..1 |
|
|
100
|
+
| [FeeComponent](core.md#feecomponent) | `service_id` | [Service](core.md#service) | 1 |
|
|
101
|
+
| [FeeComponent](core.md#feecomponent) | `depends_on` | [FeeComponent](core.md#feecomponent) (Components or entitlements of the same version) | 0..* |
|
|
102
|
+
| [FeeComponent](core.md#feecomponent) | `rate_schedule_id` | [RateSchedule](core.md#rateschedule) | 0..1 |
|
|
103
|
+
| [FeeComponent](core.md#feecomponent) | `entitlement_id` | [Entitlement](core.md#entitlement) | 0..1 |
|
|
104
|
+
| [FeeComponent](core.md#feecomponent) | `weight_table_id` | [ComplexityWeightTable](core.md#complexityweighttable) | 0..1 |
|
|
105
|
+
| [Entitlement](core.md#entitlement) | `granted_by` | [FeeComponent](core.md#feecomponent) | 1 |
|
|
106
|
+
| [Commitment](core.md#commitment) | `component_ids` | [FeeComponent](core.md#feecomponent) | 0..* |
|
|
107
|
+
| [Commitment](core.md#commitment) | `service_id` | [Service](core.md#service) | 0..1 |
|
|
108
|
+
| [Adjustment](core.md#adjustment) | `applies_to` | [FeeComponent](core.md#feecomponent) | 0..* |
|
|
109
|
+
| [Adjustment](core.md#adjustment) | `component_id` | [FeeComponent](core.md#feecomponent) | 0..1 |
|
|
110
|
+
| [Adjustment](core.md#adjustment) | `outside_rate_schedule_id` | [RateSchedule](core.md#rateschedule) | 0..1 |
|
|
111
|
+
| [CapacityLimit](core.md#capacitylimit) | `overflow_replaces` | [CostComponent](core.md#costcomponent) | 0..* |
|
|
112
|
+
|
|
113
|
+
### Classes
|
|
114
|
+
|
|
115
|
+
| Class | Meaning |
|
|
116
|
+
|---|---|
|
|
117
|
+
| [Engagement](core.md#engagement) | An evaluated client-provider relationship: parties, services, effective-dated arrangement versions, and an optional delivery plan. |
|
|
118
|
+
| [Scenario](core.md#scenario) | A time-indexed set of assumptions that one or more arrangements are evaluated against. |
|
|
119
|
+
| [CostPolicy](core.md#costpolicy) | Mapping from cost category to margin layer, plus the transition-cost view. |
|
|
120
|
+
| [TolerancePolicy](core.md#tolerancepolicy) | Relative deviations treated as adverse when deriving who bears risk. |
|
|
121
|
+
| [PackRef](core.md#packref) | A domain pack the engagement declares, optionally pinned to a version. |
|
|
122
|
+
| [MoneyPolicy](core.md#moneypolicy) | Rounding mode, scale, and level for money amounts. |
|
|
123
|
+
| [Party](core.md#party) | A contract party: client, provider, or subcontractor. |
|
|
124
|
+
| [UnitDefinition](core.md#unitdefinition) | An unambiguous measurable unit of work, with its counting and acceptance rules. |
|
|
125
|
+
| [ComplexityWeightTable](core.md#complexityweighttable) | Conversion from raw units to weighted units by complexity band. |
|
|
126
|
+
| [Service](core.md#service) | A defined operational obligation, priced in one unit. |
|
|
127
|
+
| [ArrangementVersion](core.md#arrangementversion) | An effective-dated commercial configuration: fee components, entitlements, rate schedules, commitments, and adjustments. |
|
|
128
|
+
| [DeliveryPlan](core.md#deliveryplan) | How work is produced. Drives cost and capacity, not contractual fee. |
|
|
129
|
+
| [RiskAllocation](core.md#riskallocation) | An identified exposure and the party declared to bear it. |
|
|
130
|
+
| [Horizon](core.md#horizon) | The months a scenario covers. |
|
|
131
|
+
| [Assumption](core.md#assumption) | A scenario quantity. `value` is the TOTAL for `time_period`, not a per-month rate. |
|
|
132
|
+
| [DerivedQuantity](core.md#derivedquantity) | A quantity computed each month from other quantities, e.g. billable units after a counting rule. |
|
|
133
|
+
| [WeightBand](core.md#weightband) | One complexity band of a weight table and its weight. |
|
|
134
|
+
| [FeeComponent](core.md#feecomponent) | One charge computed by one calculation method. |
|
|
135
|
+
| [Entitlement](core.md#entitlement) | What a base fee or commitment purchases: an included quantity of a unit per period. |
|
|
136
|
+
| [RateSchedule](core.md#rateschedule) | Rates and tiers for one unit, with a tier method, tier scope, and accumulation period. |
|
|
137
|
+
| [Commitment](core.md#commitment) | A minimum spend, minimum volume, reserved capacity, or prepaid credit, tested over a period with a shortfall rule. |
|
|
138
|
+
| [Adjustment](core.md#adjustment) | A mechanism that modifies a named subtotal at a declared evaluation step: discount, rebate, collar, service credit, holdback, bonus, cap, or indexation. |
|
|
139
|
+
| [CapacityLimit](core.md#capacitylimit) | A limit on a quantity per period, with the cost of overflow when it is exceeded. |
|
|
140
|
+
| [ResourceRole](core.md#resourcerole) | A staffing role with its FTE, available hours, productive ratio, and safe utilization ceiling. |
|
|
141
|
+
| [ProductionStandard](core.md#productionstandard) | Effort per unit of output, converting demand quantities to demand hours. |
|
|
142
|
+
| [RoleRate](core.md#rolerate) | An hourly rate for one role. |
|
|
143
|
+
| [CostComponent](core.md#costcomponent) | A direct or allocated cost, classified into a margin layer by the cost policy. |
|
|
144
|
+
| [EffectivePeriod](core.md#effectiveperiod) | The date range in which a fee component or cost component applies. |
|
|
145
|
+
| [ResourceLine](core.md#resourceline) | Dedicated staffing priced per FTE-month. |
|
|
146
|
+
| [PaymentLine](core.md#paymentline) | One scheduled payment of a project fee. |
|
|
147
|
+
| [OutcomeTerms](core.md#outcometerms) | Terms for OUTCOME_ADJUSTMENT components (spec 4.1; report RULE-003, RULE-004). |
|
|
148
|
+
| [Rollover](core.md#rollover) | What happens to unused entitlement at the end of its period. |
|
|
149
|
+
| [Tier](core.md#tier) | One band of a rate schedule: lower bound, optional upper bound, and rate. |
|
|
150
|
+
| [CostTier](core.md#costtier) | One band of a tiered variable cost. |
|
|
151
|
+
| [IncurredLine](core.md#incurredline) | One month's incurred amount of a one-time cost. |
|
|
152
|
+
|
|
153
|
+
## Core vocabularies
|
|
154
|
+
|
|
155
|
+
| Vocabulary | Values |
|
|
156
|
+
|---|---|
|
|
157
|
+
| [AccumulationPeriod](core.md#accumulationperiod) | `MONTH`, `QUARTER`, `YEAR`, `CONTRACT_YEAR`, `TERM` |
|
|
158
|
+
| [AdjustmentType](core.md#adjustmenttype) | `DISCOUNT`, `REBATE`, `COLLAR`, `SLA_CREDIT`, `HOLDBACK`, `BONUS`, `CAP`, `INDEXATION` |
|
|
159
|
+
| [AggregationScope](core.md#aggregationscope) | `COMPONENT`, `SERVICE`, `ENGAGEMENT` |
|
|
160
|
+
| [AssumptionBasis](core.md#assumptionbasis) | `TOTAL`, `RATE` |
|
|
161
|
+
| [Avoidability](core.md#avoidability) | `AVOIDABLE`, `UNAVOIDABLE`, `UNKNOWN` |
|
|
162
|
+
| [BillingBasis](core.md#billingbasis) | `TIME`, `RESOURCE`, `CAPACITY`, `OUTPUT`, `USAGE`, `FIXED`, `COST`, `OUTCOME` |
|
|
163
|
+
| [BreachMode](core.md#breachmode) | `OVERFLOW_COST`, `BACKLOG`, `INFEASIBLE` |
|
|
164
|
+
| [CalculationMethod](core.md#calculationmethod) | `FIXED_RECURRING`, `TIME`, `DEDICATED_RESOURCE`, `UNIT_OUTPUT`, `WEIGHTED_UNIT_OUTPUT`, `ALLOWANCE_OVERAGE`, `FIXED_PROJECT`, `COST_PLUS`, `OUTCOME_ADJUSTMENT` |
|
|
165
|
+
| [ChargeCadence](core.md#chargecadence) | `ONE_TIME`, `MONTHLY`, `QUARTERLY`, `ANNUAL`, `EVENT`, `USAGE_TRIGGERED` |
|
|
166
|
+
| [ClassificationAuthority](core.md#classificationauthority) | `PROVIDER`, `CLIENT`, `JOINT` |
|
|
167
|
+
| [CommitmentKind](core.md#commitmentkind) | `MINIMUM_SPEND`, `MINIMUM_VOLUME`, `RESERVED_CAPACITY`, `PREPAID_CREDIT` |
|
|
168
|
+
| [CostBehavior](core.md#costbehavior) | `FIXED`, `VARIABLE`, `STEP`, `TIERED_VARIABLE`, `ONE_TIME` |
|
|
169
|
+
| [CostCategory](core.md#costcategory) | `DEDICATED_LABOR`, `POOLED_LABOR`, `DELIVERY_MANAGEMENT`, `QA_REWORK`, `AI_INFERENCE`, `PLATFORM_OPERATIONS`, `THIRD_PARTY`, `CLIENT_IMPLEMENTATION`, `REUSABLE_ENGINEERING`, `TRANSITION`, `ENGAGEMENT_OVERHEAD`, `IDLE_POOLED_CAPACITY`, `CORPORATE_OVERHEAD` |
|
|
170
|
+
| [CostPeriod](core.md#costperiod) | `MONTHLY`, `ANNUAL`, `TERM` |
|
|
171
|
+
| [DerivedRounding](core.md#derivedrounding) | `NONE`, `HALF_UP`, `DOWN`, `UP` |
|
|
172
|
+
| [Distribution](core.md#distribution) | `FLAT`, `PROFILE` |
|
|
173
|
+
| [EvidenceClass](core.md#evidenceclass) | `A_DIRECT`, `B_CORROBORATED`, `C_INFERENCE`, `D_PROPOSED` |
|
|
174
|
+
| [MarginLayer](core.md#marginlayer) | `DIRECT_DELIVERY`, `ENGAGEMENT_AVOIDABLE`, `PORTFOLIO_SHARED`, `CORPORATE_OVERHEAD` |
|
|
175
|
+
| [Origin](core.md#origin) | `OBSERVED`, `CONTRACTED`, `ESTIMATED`, `ILLUSTRATIVE`, `INTERNAL_POLICY` |
|
|
176
|
+
| [OutcomeDirection](core.md#outcomedirection) | `HIGHER_IS_BETTER`, `LOWER_IS_BETTER` |
|
|
177
|
+
| [OutcomeForm](core.md#outcomeform) | `SHARE`, `SUCCESS`, `PERCENT_OF_OUTCOME` |
|
|
178
|
+
| [PartyRole](core.md#partyrole) | `CLIENT`, `PROVIDER`, `SUBCONTRACTOR` |
|
|
179
|
+
| [Prevalence](core.md#prevalence) | `ESTABLISHED_COMMON`, `DOCUMENTED_SPECIALIZED`, `EMERGING`, `UNVERIFIED` |
|
|
180
|
+
| [ProrationPolicy](core.md#prorationpolicy) | `CALENDAR_DAYS`, `FULL_MONTH_FROM_NEXT`, `FULL_MONTH_FROM_CURRENT` |
|
|
181
|
+
| [Recognition](core.md#recognition) | `CUMULATIVE`, `PERIOD_END`, `PER_SEGMENT` |
|
|
182
|
+
| [RiskBearer](core.md#riskbearer) | `CLIENT`, `PROVIDER`, `SHARED`, `THIRD_PARTY`, `NONE_ADVERSE` |
|
|
183
|
+
| [RolloverPolicy](core.md#rolloverpolicy) | `NONE`, `NEXT_PERIOD`, `TERM` |
|
|
184
|
+
| [RoundingLevel](core.md#roundinglevel) | `LINE_ITEM`, `PERIOD_TOTAL` |
|
|
185
|
+
| [RoundingMode](core.md#roundingmode) | `HALF_UP`, `HALF_EVEN` |
|
|
186
|
+
| [Severity](core.md#severity) | `INFO`, `WARNING`, `APPROVAL_REQUIRED`, `ERROR` |
|
|
187
|
+
| [ShortfallRule](core.md#shortfallrule) | `PERIOD_END_TRUE_UP`, `PER_SEGMENT` |
|
|
188
|
+
| [TerminationRule](core.md#terminationrule) | `PRORATE`, `REMAINDER_DUE`, `WAIVED` |
|
|
189
|
+
| [TestedAgainst](core.md#testedagainst) | `GROSS`, `NET_OF_DISCOUNTS`, `NET_OF_CREDITS` |
|
|
190
|
+
| [ThresholdScope](core.md#thresholdscope) | `EXCESS_ONLY`, `ENTIRE_SUBTOTAL` |
|
|
191
|
+
| [TierMethod](core.md#tiermethod) | `MARGINAL`, `ALL_UNITS`, `GRADUATED_BLOCK` |
|
|
192
|
+
| [TierScope](core.md#tierscope) | `ALL_ELIGIBLE`, `EXCESS_ONLY` |
|
|
193
|
+
| [Topology](core.md#topology) | `DEDICATED`, `POOLED`, `HYBRID` |
|
|
194
|
+
| [TransitionView](core.md#transitionview) | `INCURRED`, `AMORTIZED` |
|
|
195
|
+
| [UnitKind](core.md#unitkind) | `COUNT`, `WEIGHTED`, `HOURS`, `FTE_MONTHS`, `METER` |
|
|
196
|
+
|
|
197
|
+
## Glossary
|
|
198
|
+
|
|
199
|
+
| Term | Definition |
|
|
200
|
+
|---|---|
|
|
201
|
+
| `contractual_fee` | Contractual consideration computed under the arrangement for a period. Not recognized revenue. |
|
|
202
|
+
| `gross_profit` | contractual_fee minus DIRECT_DELIVERY costs. |
|
|
203
|
+
| `contribution_profit` | gross_profit minus ENGAGEMENT_AVOIDABLE costs. Layers partition costs, so nothing is subtracted twice. |
|
|
204
|
+
| `margin` | (price - cost) / price. Not the same as markup, (price - cost) / cost. |
|
|
205
|
+
| `accumulation_period` | The period over which an allowance, minimum, tier counter, or capacity limit accumulates: MONTH, QUARTER, YEAR, CONTRACT_YEAR, TERM. |
|
|
206
|
+
| `recognition` | When an accumulated effect is charged: CUMULATIVE (the month the threshold is crossed), PERIOD_END (true-up in the final month), PER_SEGMENT (monthly only). |
|
|
207
|
+
| `margin_layer` | DIRECT_DELIVERY, ENGAGEMENT_AVOIDABLE, PORTFOLIO_SHARED, CORPORATE_OVERHEAD. A cost policy maps every cost category to exactly one layer. |
|
|
208
|
+
| `cost_policy` | Mapping from cost category to margin layer plus the transition-cost view. 'reference' is shipped and must be named explicitly. |
|
|
209
|
+
| `dominance` | Candidate X dominates Y when X is at least as good on every comparison metric and strictly better on one. |
|
|
210
|
+
| `derived_bearer` | Who absorbs a deviation from the base scenario: PROVIDER (contribution falls), CLIENT (unit price rises), SHARED, or NONE_ADVERSE. |
|
|
211
|
+
| `realization` | contractual_fee / standard_value, where standard_value is hours worked at the delivery plan's standard rate card. Below 1 is a write-down. |
|
|
212
|
+
| `outcome_fee` | Fee from an OUTCOME_ADJUSTMENT component, measured over its accumulation period and charged at period end: SHARE of improvement against a baseline, SUCCESS amount at a target, or PERCENT_OF_OUTCOME. Needs attribution, a cap, and recorded approval. |
|
|
213
|
+
| `price_floor` | (DIRECT_DELIVERY + ENGAGEMENT_AVOIDABLE costs + risk premium) / (1 - target margin). A decision formula, not a benchmark. |
|
|
214
|
+
| `evidence_class` | A_DIRECT, B_CORROBORATED, C_INFERENCE, D_PROPOSED. Independent of prevalence. |
|
|
215
|
+
| `origin` | Every assumption is OBSERVED, CONTRACTED, ESTIMATED, ILLUSTRATIVE, or INTERNAL_POLICY. |
|
|
216
|
+
|
|
217
|
+
## Using the Turtle file
|
|
218
|
+
|
|
219
|
+
Namespaces:
|
|
220
|
+
|
|
221
|
+
| Prefix | Namespace | Holds |
|
|
222
|
+
|---|---|---|
|
|
223
|
+
| `cm:` | `https://github.com/mfbaig35r/cometric/ontology/core#` | Core classes (`cm:FeeComponent`), their fields (`cm:FeeComponent.billing_basis`), and the terms used to describe packs (`cm:Rule`, `cm:evidenceClass`). |
|
|
224
|
+
| `cmv:` | `https://github.com/mfbaig35r/cometric/ontology/vocab#` | Core vocabularies (`cmv:BillingBasis`) and their values (`cmv:BillingBasis.OUTPUT`), and the glossary. |
|
|
225
|
+
| `pack-alsp:` | `https://github.com/mfbaig35r/cometric/ontology/pack/alsp#` | Concepts, schemes, overlays, rules, claims, and sources of the alsp pack. |
|
|
226
|
+
| `pack-base:` | `https://github.com/mfbaig35r/cometric/ontology/pack/base#` | Concepts, schemes, overlays, rules, claims, and sources of the base pack. |
|
|
227
|
+
| `pack-consulting:` | `https://github.com/mfbaig35r/cometric/ontology/pack/consulting#` | Concepts, schemes, overlays, rules, claims, and sources of the consulting pack. |
|
|
228
|
+
|
|
229
|
+
The IRIs are identifiers; they are not served as web pages.
|
|
230
|
+
|
|
231
|
+
Example: every pack concept that maps to the OUTPUT billing basis, with its evidence class.
|
|
232
|
+
|
|
233
|
+
```python
|
|
234
|
+
import rdflib
|
|
235
|
+
|
|
236
|
+
g = rdflib.Graph().parse("docs/ontology/cometric.ttl")
|
|
237
|
+
rows = g.query("""
|
|
238
|
+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
239
|
+
PREFIX cm: <https://github.com/mfbaig35r/cometric/ontology/core#>
|
|
240
|
+
PREFIX cmv: <https://github.com/mfbaig35r/cometric/ontology/vocab#>
|
|
241
|
+
SELECT ?id ?label ?evidence WHERE {
|
|
242
|
+
?c skos:notation ?id ; skos:prefLabel ?label ;
|
|
243
|
+
cm:billingBasis cmv:BillingBasis.OUTPUT ; cm:evidenceClass ?evidence .
|
|
244
|
+
} ORDER BY ?id
|
|
245
|
+
""")
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
The same knowledge is available at run time through the MCP server (`lookup_concept`, `list_vocabulary`, `describe_pack`, `list_applicable_evidence`) and the CLI (`cometric lookup`, `cometric packs`).
|