cometric 0.1.0__tar.gz → 0.3.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.1.0/.hypothesis/constants/c0553da3badd1746 → cometric-0.3.0/.hypothesis/constants/052e28aa39cf014b +1 -1
- cometric-0.3.0/.hypothesis/constants/1a54c0e5b66b34fa +4 -0
- cometric-0.3.0/.hypothesis/constants/2616f13a910320c7 +4 -0
- cometric-0.3.0/.hypothesis/constants/284cdb085a69e559 +4 -0
- cometric-0.3.0/.hypothesis/constants/52563cc61b61afeb +4 -0
- cometric-0.3.0/.hypothesis/constants/8291cdcd8414a40b +4 -0
- cometric-0.3.0/.hypothesis/constants/8408e47180d8b9c1 +4 -0
- cometric-0.3.0/.hypothesis/constants/85a66397c5e4b867 +4 -0
- cometric-0.3.0/.hypothesis/constants/a402bbad3ba0ac69 +4 -0
- cometric-0.1.0/.hypothesis/constants/3d80302e16570458 → cometric-0.3.0/.hypothesis/constants/b428358d86c25f38 +1 -1
- cometric-0.3.0/.hypothesis/constants/e275ad1f9cb17aaf +4 -0
- cometric-0.3.0/.hypothesis/constants/ed391256aab33efd +4 -0
- cometric-0.3.0/CHANGELOG.md +63 -0
- {cometric-0.1.0 → cometric-0.3.0}/PKG-INFO +10 -5
- {cometric-0.1.0 → cometric-0.3.0}/README.md +9 -4
- cometric-0.3.0/docs/COMETRIC_SPEC_v0.3.md +1222 -0
- cometric-0.3.0/docs/PATTERNS.md +56 -0
- cometric-0.3.0/docs/RECONCILIATION.md +63 -0
- {cometric-0.1.0 → cometric-0.3.0}/docs/STATUS.md +3 -3
- {cometric-0.1.0 → cometric-0.3.0}/pyproject.toml +1 -1
- cometric-0.3.0/scripts/build_alsp.py +414 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/__init__.py +2 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/cli.py +55 -3
- cometric-0.3.0/src/cometric/core/api.py +1537 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/engine.py +522 -130
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/enums.py +11 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/issues.py +6 -2
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/models.py +45 -7
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/periods.py +23 -6
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/predicates.py +44 -5
- cometric-0.3.0/src/cometric/core/present.py +81 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/quantities.py +11 -2
- cometric-0.3.0/src/cometric/core/quickstart.py +174 -0
- cometric-0.3.0/src/cometric/core/schema.py +201 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/tiers.py +25 -12
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/validation.py +77 -4
- cometric-0.3.0/src/cometric/examples/pattern_partial_and_hours.json +169 -0
- cometric-0.3.0/src/cometric/examples/pattern_termination.json +297 -0
- cometric-0.3.0/src/cometric/examples/pattern_tiered_minimum.json +295 -0
- cometric-0.3.0/src/cometric/examples/pattern_transition_credit.json +310 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/mcp/server.py +123 -21
- cometric-0.3.0/src/cometric/packs/alsp/templates/tiered_units_annual_minimum.json +298 -0
- cometric-0.3.0/tests/test_engine_review_fixes.py +375 -0
- cometric-0.3.0/tests/test_llm_feedback.py +210 -0
- {cometric-0.1.0 → cometric-0.3.0}/tests/test_mcp.py +12 -0
- cometric-0.3.0/tests/test_patterns.py +46 -0
- {cometric-0.1.0 → cometric-0.3.0}/tests/test_pricing.py +32 -2
- {cometric-0.1.0 → cometric-0.3.0}/tests/test_properties.py +5 -1
- cometric-0.3.0/tests/test_reconcile.py +164 -0
- {cometric-0.1.0 → cometric-0.3.0}/tests/test_reproducibility_and_search.py +3 -1
- cometric-0.3.0/tests/test_search_and_context.py +171 -0
- cometric-0.3.0/tests/test_termination.py +142 -0
- {cometric-0.1.0 → cometric-0.3.0}/uv.lock +1 -1
- cometric-0.1.0/.hypothesis/constants/1b52f94ff1d6e987 +0 -4
- cometric-0.1.0/.hypothesis/constants/27de4e79debf7d27 +0 -4
- cometric-0.1.0/.hypothesis/constants/37d175425d95aff7 +0 -4
- cometric-0.1.0/.hypothesis/constants/409846769d39f76d +0 -4
- cometric-0.1.0/.hypothesis/constants/78ed34a18774f2d3 +0 -4
- cometric-0.1.0/.hypothesis/constants/dfa4cfacb990ae1e +0 -4
- cometric-0.1.0/.hypothesis/constants/e3a40f74a8e72704 +0 -4
- cometric-0.1.0/.hypothesis/constants/f96f4f1e759b7abf +0 -4
- cometric-0.1.0/CHANGELOG.md +0 -13
- cometric-0.1.0/src/cometric/core/api.py +0 -835
- cometric-0.1.0/src/cometric/core/schema.py +0 -97
- {cometric-0.1.0 → cometric-0.3.0}/.github/workflows/ci.yml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/.github/workflows/publish.yml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/.gitignore +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/.hypothesis/.gitignore +0 -0
- /cometric-0.1.0/.hypothesis/constants/4145014522d2ff1a → /cometric-0.3.0/.hypothesis/constants/02af8a95fc854af3 +0 -0
- /cometric-0.1.0/.hypothesis/constants/60b43c062745c280 → /cometric-0.3.0/.hypothesis/constants/0a08468b27ab0e2b +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/.hypothesis/constants/31846ac0f55db7cc +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/.hypothesis/constants/3570e270a2e92983 +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/.hypothesis/constants/3faf924fe60f71dc +0 -0
- /cometric-0.1.0/.hypothesis/constants/457af5fc346a4d40 → /cometric-0.3.0/.hypothesis/constants/52445b4e87bec631 +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/.hypothesis/constants/64a2c31fcab5443b +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/.hypothesis/constants/6ab7a80f708d05c3 +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/.hypothesis/constants/bddcf7e0e0af1f28 +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/.hypothesis/constants/da39a3ee5e6b4b0d +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/LICENSE +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/docs/ALSP_COMMERCIAL_ONTOLOGY_SPEC_v0.1.pdf +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/docs/COMETRIC_SPEC_v0.2.md +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/scripts/build_consulting.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/scripts/build_fixtures.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/__init__.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/fingerprint.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/ledger.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/money.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/packs.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/core/templates.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/examples/case_a.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/examples/case_b.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/examples/case_c.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/examples/case_d.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/examples/case_e.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/examples/case_f.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/examples/case_g.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/examples/case_h.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/examples/spec_example.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/mcp/__init__.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/mcp/__main__.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/concepts/provider_types.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/concepts/service_categories.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/concepts/unit_templates.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/coverage.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/evidence/claims.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/evidence/sources.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/overlays/levers.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/overlays/mechanisms.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/overlays/metrics.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/overlays/pricing_models.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/pack.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/alsp/rules/rules.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/automation_structures.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/billing_bases.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/cost_categories.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/dimensions.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/fee_components.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/layers.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/levers.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/mechanisms.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/metrics.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/negotiation_exchanges.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/offers.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/pricing_models.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/schema_map.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/selection_framework.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/concepts/selection_heuristics.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/coverage.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/evidence/claims.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/evidence/sources.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/excluded.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/pack.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/base/rules/rules.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/concepts/consulting_concepts.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/concepts/provider_types.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/concepts/service_categories.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/concepts/unit_templates.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/coverage.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/overlays/pricing_models.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/pack.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/rules/rules.yaml +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/templates/capped_tm.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/templates/fixed_fee_plus_success.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/templates/phased_fixed_fee.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/templates/retainer_hours_drawdown.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/packs/consulting/templates/role_based_tm.json +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/src/cometric/py.typed +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/tests/builders.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/tests/conftest.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/tests/test_casebook.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/tests/test_outcome_and_realization.py +0 -0
- {cometric-0.1.0 → cometric-0.3.0}/tests/test_packs_and_templates.py +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
# file: /home/runner/work/cometric/cometric/src/cometric/__init__.py
|
|
2
2
|
# hypothesis_version: 6.170.14
|
|
3
3
|
|
|
4
|
-
['0.0.0', 'ENGINE_VERSION', 'SCHEMA_VERSION', 'break_even', 'calculate_periods', 'cometric', 'compare_arrangements', 'derive_risk_exposure', 'describe_pack', 'describe_schema', 'explain_fee', 'get_template', 'list_packs', 'list_templates', 'list_vocabulary', 'lookup_concept', 'price_floor', 'search_structures', 'validate_engagement']
|
|
4
|
+
['0.0.0', 'ENGINE_VERSION', 'SCHEMA_VERSION', 'break_even', 'calculate_periods', 'cometric', 'compare_arrangements', 'derive_risk_exposure', 'describe_pack', 'describe_schema', 'explain_fee', 'get_template', 'list_packs', 'list_templates', 'list_vocabulary', 'lookup_concept', 'price_floor', 'reconcile', 'search_structures', 'validate_engagement']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/core/present.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
['.', '0', '^-?\\d+\\.\\d+$', 'base_client_price', 'capacity_utilization', 'client_downside', 'client_price', 'commitment_shortfall', 'contractual_fee', 'contribution_margin', 'contribution_profit', 'cost_per_unit', 'display', 'f', 'gross_margin', 'overage_fee', 'realization', 'relative_difference', 'target_margin', 'unit_contribution', 'unit_floor']
|
|
@@ -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', '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']
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# file: /home/runner/work/cometric/cometric/src/cometric/core/predicates.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
['*', ', ', '.', '<', '<=', '=', '==', '>', '>=', '\\[(\\*|\\d+)\\]', 'all', 'any', 'contains', 'eq', 'equals', 'exists', 'gt', 'gte', 'in', 'lt', 'lte', 'not', 'op', 'path', 'value']
|
|
@@ -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', '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', 'REBATE', 'REMAINDER_DUE', 'RESERVED_CAPACITY', 'RESOURCE', 'REUSABLE_ENGINEERING', 'SERVICE', 'SHARE', 'SHARED', 'SLA_CREDIT', 'STEP', 'SUBCONTRACTOR', 'SUCCESS', 'TERM', 'THIRD_PARTY', 'TIERED_VARIABLE', 'TIME', 'TRANSITION', 'UNAVOIDABLE', 'UNIT_OUTPUT', 'UNKNOWN', 'UNVERIFIED', '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/api.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
[10000, '...', '/', '/...', '/actuals', '/actuals/term', '/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', 'RISK_MISMATCH', 'RISK_PREMIUM_RANGE', 'SCENARIO_INFEASIBLE', 'SCHEMA', 'TARGET_MARGIN_RANGE', 'TERM', 'UNKNOWN_DRIVER', 'UNKNOWN_METRIC', 'WORST', '_doc', 'absolute', 'accumulation_period', 'actual', 'actuals', 'add', 'aggregation', 'allowances', 'approval_state', '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', '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', 'reason', 'reconcile', 'reconciled', 'record_type', 'reference', 'rejected', 'relative', 'relative_difference', 'results', 'risk', 'risk_exposure', 'risk_premium', 'rollover', '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_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/engine.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
[')', '+', ', ', '-', '/calculation_method', '/driver', '/outcome/metric', '/quantity_source', '/scenario/horizon', '0.3.0', ':', 'AMBIGUOUS_UNIT_PRICE', 'BACKLOG', 'CAPACITY_BREACH', 'DRIVER_REQUIRED', 'FTE', 'LEDGER_INVARIANT', 'METHOD_NOT_SUPPORTED', 'MISSING_ASSUMPTION', 'MIXED_UNITS_IN_PRICE', 'OVERFLOW_COST', 'SEGMENTED_MONTH', 'UNKNOWN_WEIGHT_TABLE', 'adjustments', 'allowance_consumed', 'allowance_granted', 'amortized', 'amount', 'amount_unrounded', 'arrangement_versions', 'backlog_end', 'by_category', 'cap', 'cap_use', 'capacity', 'capacity_utilization', 'category', 'collar', 'commitment_shortfall', 'commitments', 'component', 'components', 'contractual_fee', 'contribution_margin', 'contribution_profit', 'cost_components', 'cost_per_unit', 'costs_by_category', 'ctier', 'date', 'delivery_plan', 'demand', 'demand_hours', 'direct_delivery_cost', 'discount', 'driver_quantity', 'elig', 'engagement', 'fixed', 'formula', 'full_cost_profit', 'gross_margin', 'gross_profit', 'hours', 'id', 'incurred', 'incurred_adjustment', 'indexation', 'infeasible', 'kind', 'layer', 'layers', 'margin_note', 'min', 'minimum', 'minimum_charges', 'minimum_shortfall', 'months', 'months_not_run', 'months_run', 'ok', 'one-time fee', 'one_time', 'original_end_date', 'outcome', 'outcome_fee', 'overage', 'overage_fee', 'overflow', 'overflow_cost_rate', 'performance', 'period', 'periods', 'price', 'productive_hours', 'project_payment', 'quantity', 'rate', 'realization', 'rebate', 'ref', 'resource', 'safe_capacity_hours', 'scenario.', 'segment', 'served', 'stage', 'standard_value', 'step', 'term', 'termination', 'termination_fee', 'termination_rule', 'tier', 'time', 'trigger', 'unit', 'unit_contribution', 'version', 'weighted:', 'worked_hours', 'worked_hours_source', 'write_down', 'years']
|
|
@@ -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', '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/validation.py
|
|
2
|
+
# hypothesis_version: 6.170.14
|
|
3
|
+
|
|
4
|
+
['/', '/cost_policy', '/engagement', '/horizon', '/mapping', '/scenario', '/termination_date', '0.10', '2500000', '; ', '<required>', 'ADJUSTMENT_FIELDS', 'APPROVAL_REQUIRED', 'ATTRIBUTION_METHOD', 'ATTRIBUTION_REQUIRED', 'BASELINE_REQUIRED', 'CAP needs amount', 'COMMITMENT_SCOPE', 'CONTRACT_YEAR', 'COST_FIELDS', 'CURRENCY_MISMATCH', 'DANGLING_DEPENDENCY', 'DATE_ORDER', 'DEPENDENCY_CYCLE', 'DEPENDENCY_MISSING', 'DISCOUNT', 'DUPLICATE_ID', 'EMPTY_VERSION', 'ERROR', 'EXCESS_ONLY', 'FIELD_NOT_USED', 'HORIZON_OUTSIDE_TERM', 'INFO', 'METHOD_FIELDS', 'METHOD_NOT_SUPPORTED', 'OUTCOME_FEE_APPROVAL', 'RANGE', 'RECOGNITION_PERIOD', 'REQUIRED_FIELD', 'SCHEMA', 'TIER_CLIFF', 'TIER_INVALID', 'UNCAPPED_OUTCOME_FEE', 'UNIT_MISMATCH', 'UNKNOWN_COMPONENT', 'UNKNOWN_COST_POLICY', 'UNKNOWN_ENTITLEMENT', 'UNKNOWN_SERVICE', 'UNKNOWN_UNIT', 'UNKNOWN_VERSION', 'UNKNOWN_WEIGHT_TABLE', 'VERSION_OVERLAP', 'WARNING', 'accumulation_period', 'adjustments', 'amount', 'applies_to', 'approval_reference', 'approvals_required', 'arrangement_versions', 'attribution_method', 'attribution_percent', 'band_lower', 'band_lower_inclusive', 'band_upper_exclusive', 'baseline', 'billing_basis', 'calculation_method', 'cap_amount', 'cap_percent', 'capacity', 'category', 'charge_cadence', 'commitments', 'component_id', 'component_ids', 'components', 'cost_components', 'currency', 'delivery_plan', 'depends_on', 'driver', 'effective_from', 'engagement', 'entitlement_id', 'entitlements', 'errors', 'fixed_amount', 'granted_by', 'info', 'invalid', 'kind', 'loc', 'lower', 'lower_inclusive', 'mapping', 'msg', 'ok', 'outcome', 'overage_recognition', 'overflow_replaces', 'parties', 'payment_schedule', 'percent', 'proration_policy', 'provider_type', 'quantity_source', 'rate_schedule_id', 'rate_schedules', 'raw_unit', 'recognition', 'resources', 'role_rates', 'roles', 'service_category', 'service_id', 'services', 'share_percent', 'shortfall_rule', 'start_date', 'status', 'step_size', 'supersedes_id', 'target', 'threshold', 'threshold_scope', 'tier_method', 'tiers', 'trigger', 'type', 'unit', 'unit_definition_id', 'unit_definitions', 'upper_exclusive', 'valid', 'warnings', 'weight_table_id', 'weight_tables']
|
|
@@ -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', 'accumulation_period', 'application/json', 'approvals_required', 'areas', 'body', 'claims', 'code', 'cometric', 'cometric://glossary', 'concept', 'concept-scheme', 'contractual_fee', 'contribution_profit', 'cost_policy', 'coverage', 'derived_bearer', 'display', 'dominance', 'engagement', 'engine_version', 'error', 'errors', 'evidence_class', 'example', 'examples', 'glossary', 'gross_profit', 'headers', 'hint', 'http', 'http.response.body', 'http.response.start', 'id', 'info', 'invalid', 'issues', 'label', 'localhost', 'localhost:*', 'margin', 'margin_layer', 'message', 'method', 'name', 'origin', 'outcome_fee', 'overlays', 'pack', 'pack-template', 'packs', 'path', 'prevalence', 'price_floor', 'query', 'quickstart', 'realization', 'recognition', '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,63 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.3.0 (2026-11-05)
|
|
4
|
+
|
|
5
|
+
### Breaking changes
|
|
6
|
+
|
|
7
|
+
- A `DISCOUNT` or `REBATE` with a `threshold` now requires `threshold_scope` (`EXCESS_ONLY` or `ENTIRE_SUBTOTAL`). `DISCOUNT` previously ignored its threshold.
|
|
8
|
+
- `CAP`, `REBATE`, and threshold `DISCOUNT` require `accumulation_period`; it previously defaulted to `MONTH` silently.
|
|
9
|
+
- Effective client unit price, cost per unit, and unit contribution are null, with `AMBIGUOUS_UNIT_PRICE`, when several quantities are priced and `client_value_unit` is not set. Previously they used the first quantity.
|
|
10
|
+
- `search_structures` output is restructured: best results first with full figures; the frontier is parameter sets only at the default `summary` detail.
|
|
11
|
+
- `compare_arrangements` and `search_structures` default to `detail: summary` and `precision: display`; the MCP `calculate_periods` tool defaults to `precision: display`. Use `exact` for unrounded figures.
|
|
12
|
+
- `ENGINE_VERSION` is 0.3.0, so fingerprints of existing inputs change.
|
|
13
|
+
|
|
14
|
+
### Added and fixed
|
|
15
|
+
|
|
16
|
+
- Termination scenarios: `termination_date` on a scenario; `termination_rule` (PRORATE, REMAINDER_DUE, WAIVED) on minimum-spend commitments; `termination_fee` on an arrangement version; allowances expire, unamortized one-time costs are written off, and a `termination` block reports the cost of exiting early.
|
|
17
|
+
- ALSP template `tiered_units_annual_minimum` and five worked patterns with hand-computed figures (`docs/PATTERNS.md`).
|
|
18
|
+
- "Pending human review" defined in the spec: a label for the user's own approval process, not a workflow.
|
|
19
|
+
|
|
20
|
+
From an LLM-driven pricing analysis:
|
|
21
|
+
|
|
22
|
+
- Search: best results first, with full figures per scenario, objective values, constraint results, grid-edge flags (`BEST_AT_GRID_EDGE`), difference from the baseline (the engagement as given), downside per deviation, and fingerprints; `objective.tie_breakers`; `dry_run`; parameters that write several pointers with `set`, `scale`, or `add`.
|
|
23
|
+
- `detail` (summary, standard, full) and `precision` (display, exact) on search and compare, defaulting to summary and display; `precision` on calculate_periods (the MCP tool defaults to display). A typical search answer is about 14% of its full size.
|
|
24
|
+
- The server stays stateless: engagements are passed by reference as file paths; results reproduce from their fingerprints.
|
|
25
|
+
|
|
26
|
+
- Threshold discounts and rebates take a required `threshold_scope`: `EXCESS_ONLY` ("10% off charges above the minimum") or `ENTIRE_SUBTOTAL`. `DISCOUNT` previously ignored `threshold` entirely. `CAP`, `REBATE`, and threshold `DISCOUNT` now require `accumulation_period` (it silently defaulted to `MONTH`).
|
|
27
|
+
- Effective client unit price (and cost per unit, unit contribution) is null with an `AMBIGUOUS_UNIT_PRICE` warning when more than one quantity is priced and `client_value_unit` is not set; `client_value_unit` accepts `a+b` to sum commensurable units.
|
|
28
|
+
- Every calculation result has a `definitions` block: unit-price basis, quantity spreading, thresholds, allowance recognition, minimums.
|
|
29
|
+
- `quickstart` tool and resource with a runnable argument object for every tool; `describe_schema` covers candidates, constraints, reference paths, and actuals.
|
|
30
|
+
- No unstructured MCP errors: every tool returns a code, message, and hint. Candidates may be bare engagements; constraint leaves accept `{path, op, value}`; search specs are validated up front with field paths; clearer message for fractional counts.
|
|
31
|
+
|
|
32
|
+
## 0.2.0 (2026-11-05)
|
|
33
|
+
|
|
34
|
+
- `reconcile`: compare computed figures with recorded actuals by month and term, with a publishable summary that carries no amounts, dates, or names (API, CLI, MCP tool). Guide in `docs/RECONCILIATION.md`.
|
|
35
|
+
- Fix: ALL_UNITS cliff detection now reports bands across non-adjacent tiers, with an inclusive lower bound where a band starts at a tier edge. Found by property testing.
|
|
36
|
+
- MCP resource `cometric://packs/{pack}/templates/{id}`; CLI `templates --pack` and `template --pack`.
|
|
37
|
+
- `TIER_CLIFF` warnings: one per threshold with a `bands` list (lower, lower_inclusive, upper_exclusive), replacing the single `band` pair.
|
|
38
|
+
- Fixed from code review of `reconcile`: uncalculated costs are reported as not computed instead of zero (decided once in the shared calculation step); invalid actuals and tolerances return issues instead of raising; infeasible scenarios never report `reconciled`; unknown metrics are errors; the result has its own fingerprint over actuals and tolerances; month numbers count from the engagement start; repeated scans removed.
|
|
39
|
+
- Fixed from the full engine review (calculation changes, so `ENGINE_VERSION` moves to 0.2.0):
|
|
40
|
+
- `FULL_MONTH_FROM_CURRENT` and `FULL_MONTH_FROM_NEXT` now bill the whole month instead of prorating by component dates.
|
|
41
|
+
- A fixed project payment due in a month split between contract versions is no longer dropped.
|
|
42
|
+
- A horizon that starts after the engagement simulates from the engagement start, so allowances, tiers, minimums, caps, and outcome periods carry into it; year and term assumptions spread over the engagement's months.
|
|
43
|
+
- One-time fees are never prorated; quarterly and annual fees keep their declared totals and anchor at the component start.
|
|
44
|
+
- Collars reprice at the cumulative tier position.
|
|
45
|
+
- Indexation applies to period-end overage as well as cumulative overage, not to project payments or outcome fees, and contract years honor the start day.
|
|
46
|
+
- Term costs that start later keep their declared total.
|
|
47
|
+
- The incurred-view adjustment ignores portfolio and overhead costs.
|
|
48
|
+
- A performance trigger missing from the scenario is an error; the price floor reports missing costs as an issue.
|
|
49
|
+
- Components are evaluated in id order, so results never depend on list order.
|
|
50
|
+
- Rebates settled after the horizon raise `TRUE_UP_OUTSIDE_HORIZON`.
|
|
51
|
+
- Spec v0.3.
|
|
52
|
+
|
|
53
|
+
## 0.1.0 (2026-11-04)
|
|
54
|
+
|
|
55
|
+
First release.
|
|
56
|
+
|
|
57
|
+
- Core engine: deterministic decimal monthly calculation with the specified evaluation order (allowances, tiers, collars, discounts, minimums, performance adjustments, caps), accumulation periods, entitlement ledger with rollover, proration, exact allocation, margin-layer cost policies, capacity breach modes, and input fingerprints.
|
|
58
|
+
- Fee methods: fixed recurring, time, dedicated resource, unit output, weighted unit output, allowance plus overage, fixed project, and outcome adjustment (gain-share, success fee, percent of outcome).
|
|
59
|
+
- Realization against a standard rate card: standard value, realization, write-down, effective billing rate.
|
|
60
|
+
- Operations: validate, calculate, explain, compare (dominance), structure search (frontier), risk exposure, price floor, break-even, and commercial constraint checks.
|
|
61
|
+
- Packs (data only): `base`, `alsp`, and `consulting`, with evidence records and verification status.
|
|
62
|
+
- Interfaces: CLI and a read-only MCP server (stdio and stateless HTTP) with discovery tools, resources, and guided prompts.
|
|
63
|
+
- Casebook fixtures A to H.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cometric
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.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
|
|
@@ -51,10 +51,12 @@ It is built for any service relationship priced through a composite arrangement:
|
|
|
51
51
|
## Install
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
|
|
54
|
+
pip install "cometric[mcp]" # or: uv pip install "cometric[mcp]"
|
|
55
55
|
uv sync --all-extras # from a checkout
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
[](https://pypi.org/project/cometric/)
|
|
59
|
+
|
|
58
60
|
Python 3.11 or later.
|
|
59
61
|
|
|
60
62
|
## Quickstart
|
|
@@ -66,6 +68,9 @@ cometric explain src/cometric/examples/spec_example.json --period 2027-01
|
|
|
66
68
|
cometric break-even src/cometric/examples/case_b.json --driver contracts --scenario base --cost-policy reference
|
|
67
69
|
cometric floor src/cometric/examples/case_b.json --cost-policy reference --target-margin 0.20
|
|
68
70
|
cometric template base_plus_overage
|
|
71
|
+
cometric template phased_fixed_fee --pack consulting
|
|
72
|
+
cometric template tiered_units_annual_minimum --pack alsp
|
|
73
|
+
cometric reconcile engagement.json --scenarios actual-quantities.json --actuals actuals.json --cost-policy reference --summary-only
|
|
69
74
|
cometric lookup PM-023
|
|
70
75
|
```
|
|
71
76
|
|
|
@@ -81,7 +86,7 @@ print(result["term"]["contribution_margin"], result["input_fingerprint"])
|
|
|
81
86
|
|
|
82
87
|
## MCP server
|
|
83
88
|
|
|
84
|
-
Cometric ships a read-only, stateless MCP server:
|
|
89
|
+
Cometric ships a read-only, stateless MCP server: 19 tools (start with `quickstart`), schema and template discovery, resources for the glossary, schemas, concept schemes, rules, coverage, templates, and worked examples, and six guided prompts.
|
|
85
90
|
|
|
86
91
|
```bash
|
|
87
92
|
cometric mcp # stdio
|
|
@@ -92,7 +97,7 @@ cometric mcp --transport http --port 8765 # stateless streamable HTTP at PO
|
|
|
92
97
|
Claude Code:
|
|
93
98
|
|
|
94
99
|
```bash
|
|
95
|
-
claude mcp add cometric --
|
|
100
|
+
claude mcp add cometric -- uvx --from "cometric[mcp]" cometric mcp
|
|
96
101
|
```
|
|
97
102
|
|
|
98
103
|
The HTTP transport keeps no session state, answers `GET /mcp` with 405, keeps DNS-rebinding protection on (set `COMETRIC_ALLOWED_HOSTS` for your hostname), and checks a bearer token when `COMETRIC_MCP_TOKEN` is set.
|
|
@@ -130,7 +135,7 @@ uv run ruff check src tests scripts && uv run ruff format --check src tests scri
|
|
|
130
135
|
uv run python scripts/build_fixtures.py # regenerate casebook fixtures
|
|
131
136
|
```
|
|
132
137
|
|
|
133
|
-
The specification is
|
|
138
|
+
The specification is `docs/COMETRIC_SPEC_v0.3.md` (normative for 0.1.0). 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`.
|
|
134
139
|
|
|
135
140
|
## License
|
|
136
141
|
|
|
@@ -21,10 +21,12 @@ It is built for any service relationship priced through a composite arrangement:
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
|
|
24
|
+
pip install "cometric[mcp]" # or: uv pip install "cometric[mcp]"
|
|
25
25
|
uv sync --all-extras # from a checkout
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
[](https://pypi.org/project/cometric/)
|
|
29
|
+
|
|
28
30
|
Python 3.11 or later.
|
|
29
31
|
|
|
30
32
|
## Quickstart
|
|
@@ -36,6 +38,9 @@ cometric explain src/cometric/examples/spec_example.json --period 2027-01
|
|
|
36
38
|
cometric break-even src/cometric/examples/case_b.json --driver contracts --scenario base --cost-policy reference
|
|
37
39
|
cometric floor src/cometric/examples/case_b.json --cost-policy reference --target-margin 0.20
|
|
38
40
|
cometric template base_plus_overage
|
|
41
|
+
cometric template phased_fixed_fee --pack consulting
|
|
42
|
+
cometric template tiered_units_annual_minimum --pack alsp
|
|
43
|
+
cometric reconcile engagement.json --scenarios actual-quantities.json --actuals actuals.json --cost-policy reference --summary-only
|
|
39
44
|
cometric lookup PM-023
|
|
40
45
|
```
|
|
41
46
|
|
|
@@ -51,7 +56,7 @@ print(result["term"]["contribution_margin"], result["input_fingerprint"])
|
|
|
51
56
|
|
|
52
57
|
## MCP server
|
|
53
58
|
|
|
54
|
-
Cometric ships a read-only, stateless MCP server:
|
|
59
|
+
Cometric ships a read-only, stateless MCP server: 19 tools (start with `quickstart`), schema and template discovery, resources for the glossary, schemas, concept schemes, rules, coverage, templates, and worked examples, and six guided prompts.
|
|
55
60
|
|
|
56
61
|
```bash
|
|
57
62
|
cometric mcp # stdio
|
|
@@ -62,7 +67,7 @@ cometric mcp --transport http --port 8765 # stateless streamable HTTP at PO
|
|
|
62
67
|
Claude Code:
|
|
63
68
|
|
|
64
69
|
```bash
|
|
65
|
-
claude mcp add cometric --
|
|
70
|
+
claude mcp add cometric -- uvx --from "cometric[mcp]" cometric mcp
|
|
66
71
|
```
|
|
67
72
|
|
|
68
73
|
The HTTP transport keeps no session state, answers `GET /mcp` with 405, keeps DNS-rebinding protection on (set `COMETRIC_ALLOWED_HOSTS` for your hostname), and checks a bearer token when `COMETRIC_MCP_TOKEN` is set.
|
|
@@ -100,7 +105,7 @@ uv run ruff check src tests scripts && uv run ruff format --check src tests scri
|
|
|
100
105
|
uv run python scripts/build_fixtures.py # regenerate casebook fixtures
|
|
101
106
|
```
|
|
102
107
|
|
|
103
|
-
The specification is
|
|
108
|
+
The specification is `docs/COMETRIC_SPEC_v0.3.md` (normative for 0.1.0). 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`.
|
|
104
109
|
|
|
105
110
|
## License
|
|
106
111
|
|