Skip to content

[New Skill]: monitoring/funnel_monitor — deterministic funnel health evaluation against charter thresholds #317

Description

@mrmasa88

Skill ID

monitoring/funnel_monitor

Category

monitoring

What should this skill do?

Summary

  • A deterministic skill that evaluates a weekly funnel metrics snapshot — outreach sends, replies, bookings, landing-page sessions, downloads (all weekly counts), per-prospect stage states, and content-asset publication dates (for freshness rules) — against the thresholds an operator's business charter defines and against industry-doctrine benchmark values, returning findings. It applies the threshold rules derived from the charter to the snapshot.

  • The finding vocabulary has two severities and one third state:

  • Charter violation = error (blocking) — a breach of a constraint the operator set for themselves

  • Deviation from industry doctrine = warning (visible, non-blocking) — notice of drift from a benchmark

  • What cannot be computed honestly is not computed = insufficient_data (a refusal with a reason code) — no vanity ratios from immature data (e.g. "15% conversion" at n=20). The most opinionated behavior in this skill.

  • execute() is a pure function and performs no network calls. Identical input always returns identical output.

Motivation / use cases

  • A monitoring capability AO's agents will use in production. It is the first skill manufactured by AO's distillation pipeline (Skill Foundry) from requirement extraction onward, proposed as an AO-originated distillation.

  • Where the existing monitoring/token_limiter covers resource-side monitoring, this adds business-metric monitoring to the category.

  • Aimed at solo operators and small teams (coaches, course creators, consultants, e-commerce operators). When one person does the outreach, the production, and the delivery, that same person is also the only one watching the numbers — which means, in practice, nobody is. This makes that watching a machine's job.

  • First production deployment planned on a real company: the funnel and price ladder of OrbLabs (a due-diligence firm), run on a cadence. The operational ledger will be accumulated in a publishable form as the evidence base for future versions.

Ideal Inputs & Outputs

Proposed behavior

  • Input: weekly funnel metrics snapshot (JSON) + a charter parameter file (versioned YAML)
  • Parameter resolution: deterministic binding via a self-describing schema — each parameter carries applies_to / binds_to / schema_version, with support for an explicit unlimited literal. Shipping semantics alongside values prevents underdetermination at extraction and validation time.
  • Benchmarks: industry benchmark values are separated from code as versioned data files (benchmarks-as-data), placed under the bundle's kb/ with timestamps and sources, following the existing kb dataset conventions. Value updates land as ordinary data-revision PRs, versioned independently of logic changes.
  • Output: status envelope + findings[]. Each finding carries:
    • finding — an UPPER_SNAKE_CASE code from a closed set enumerated in the bundle (e.g. NO_BOOKING)
    • severity: error | warning, or state: insufficient_data
    • detail — the evaluated metric, threshold, and observed value
    • action — for error: blocked — requires operator override; for warning: none — surfaced for the operator
    • reason — on refusal, a reason code (e.g. required_granularity_unavailable, cohort_attribution_unavailable)
  • Fail-closed: runtime contract violations (unknown enums, missing fields, type mismatches, benchmark-file inconsistencies) fail with codes from a closed error registry (e.g. FUNNEL_MODE_REQUIRED, UNKNOWN_METRIC_KEY, NO_METRICS_PROVIDED, BENCHMARK_VERSION_MISSING). No default substitution, no improvised messages. Contract violations (errors) and honest non-computability (insufficient_data) are returned as distinct things.

Parameters (example)

schema_version: 2
floor_price:
  amount: 6000
  applies_to: [one_to_one]     # the value declares its own scope — this floor
                               # governs the 1:1 tier only, and does not reach
                               # the $349 self-paced product
capacity_limits:
  max_one_to_one_clients:
    value: 6
    binds_to: sum_of_one_to_one_capacities   # the value declares what it counts
tier_structure:
  - {name: Foundations of Everyday Leadership, price_usd: 349, capacity: unlimited}   # explicit literal; 0 is never a sentinel

Target runtime

Model agnostic (all supported adapters)

External APIs & env vars (if any)

v1 ship bar

  • The full three-state vocabulary (error / warning / insufficient_data with reason codes) implemented

  • Charter parameter file (self-describing schema) + kb/ benchmark data (timestamped, sourced)

  • Fully mocked bundle tests, covering fail-closed paths and per-reason-code fixtures

  • Complete documentation surface: catalog page (Version / Skill history / usage examples for all five providers) and extras sync

Constitution

  • Evaluate only — no data fetching, no side effects, no automated remediation

  • Deterministic, offline core — no network in execute(); identical input → identical output

  • Refuse rather than guess — what cannot be computed honestly returns insufficient_data with a reason code; no default substitution

  • Every finding explained — code, metric, threshold, and observed value always attached

  • Honest limits documented — what this skill does not do (data acquisition, causal inference, threshold optimization) is stated explicitly

Composition (not bundled)

  • monitoring/token_limiter — resource-side and business-metric monitoring are complementary; no runtime coupling

  • A pricing-validation sibling (separate proposal, planned) — shares the same charter parameter format; will be proposed in its own issue

  • This skill runs standalone and never calls other skills internally; chaining guidance stays in the docs

v2 (planned)

  • Benchmark data revisions driven by the OrbLabs operational ledger — threshold and false-positive tuning as data-only PRs

  • Broader funnel-mode / metric coverage, added where operation demonstrates demand

Testing

  • All tests fully mocked (CI never downloads)

  • Benchmark data shipped as fixtures

  • Fail-closed paths (unknown enum, missing field, type mismatch) explicitly covered

  • Full branch coverage of the two severities plus the third state (including per-reason-code insufficient_data fixtures)

Issuer

  • name: Masa / github: mrmasa88 / org: AO

Metadata

Metadata

Assignees

Labels

cat: monitoringRegistry skill category — monitoring (`skills/monitoring/`).core frameworkChanges to loader, env, config merge (skillware/core/config.py), base classes, or model adapters.documentationImprovements or additions to documentation.enhancementNew feature or request.examplesRunnable scripts under examples/, agent loops, or examples index.skill requestRequest for a new capability to be added to the registry.testingpytest, doc-drift guards, or CI test coverage.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions