mcpField
C
cawplan-support-metrics

cawplan-support-metrics

github.com/cawcutData & databases153 installsUpdated 1d ago
Repository

About cawplan-support-metrics

A controlled workflow skill for exporting Support Ops metrics to CawPlan, validating them, and importing approved data. It defines a narrow V1 metric contract and emphasizes dry-runs, reconciliation, and explicit approval before writes.

Key features

  1. 01Bundled Apps Script exporter workflow
  2. 02Source and product ID validation
  3. 03Dry-run totals before import
  4. 04Bounded canonical metric ingestion
  5. 05Post-import reconciliation
  6. 06Approval-gated additive corrections

Use cases

  1. 01Prepare a Support Ops metrics export
  2. 02Validate product mapping and export totals
  3. 03Import approved ticket-created metrics
  4. 04Reconcile imported data or plan a correction

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/cawcut/skill-cawplan --skill cawplan-support-metrics

After installing, type/cawplan-support-metricsin Claude Code to confirm it loaded.

Bundled filesassets/CawPlanSupportMetrics.gs

Details

From the project README

CawPlan Support Metrics

Use this skill for the controlled Support Ops -> CawPlan key-metrics workflow. It specializes the generic cawplan metrics commands with a fixed Support data contract.

Bootstrap

cawplan skill check

If authentication is missing, run cawplan auth login, show the printed URL to the user, and after they confirm approval run cawplan auth login --device-auth --complete. Do not request or embed an API key in Apps Script.

Bundled exporter

Use assets/CawPlanSupportMetrics.gs as the maintained exporter. Copy it into the bound Support Ops Apps Script project; do not regenerate an exporter from scratch.

Before the first export:

  1. Run cawplanSupportInspectSource() and review the logged person-sheet headers and resolved source columns.
  2. Set the exact CawPlan product unique_id values in CAWPLAN_SUPPORT_CONFIG.products.
  3. Copy the exact approved B, C, E, F, H, and I header text into CAWPLAN_SUPPORT_CONFIG.approvedHeaders.
  4. Set the inclusive startDate and endDate.
  5. Run cawplanSupportExportMetrics() and use the logged Drive file URL and SHA-256 for the dry-run.

The exporter is read-only for Sheets and creates only the requested JSON file in Drive. Modify its source mapping only after comparing it with the current dashboard and weekly-report definitions.

Supported workflow

Route the request to one of these modes:

  • Prepare exporter: inspect the supplied Apps Script or sheet layout, then configure or narrowly patch the bundled exporter. Never add direct CawPlan HTTP calls.
  • Validate / dry-run: validate the file, resolve and confirm product IDs, reject duplicate identities or unsupported vocabulary, and show totals without writing.
  • Import: only after the user has seen and approved the dry-run, upload canonical items in bounded batches through cawplan metrics ingest.
  • Reconcile: query the exact imported range and dimensions, check truncated, and compare CawPlan totals with the export.
  • Correct: never overwrite or delete a prior point. Preview an additive correction delta and write it only after explicit approval.

V1 contract boundary

The only ordinary V1 write is:

domain = cawplan_csm
metric = ticket_created
field  = value

Allowed base tags are product_line, channel, assignee, and source_system. dimensions.product must be a confirmed CawPlan product unique_id; workspace attribution is injected by the server and must not be supplied.

Zendesk status snapshots, Solved/Pending KPIs, Jira SPRT issues, weekly totals, percentages, and report artifacts are outside the V1 write contract. Analyze or export them if asked, but do not ingest them until the platform owner approves a new canonical metric contract.

Write safety

  • Treat validation, preview, and queries as read-only.
  • Do not ingest merely because a file was attached; the user must request the write and approve the dry-run.
  • Never ingest both assignee-level rows and their derived Total rows.
  • Never retry with regenerated timestamps or altered tags. Reconcile first; retry only the byte-equivalent canonical items when needed.
  • Stop on unknown columns, ambiguous products, unexpected tags, negative base values, partial source ranges, query truncation, or a totals mismatch.
  • Report every write with source checksum, range, item count, accepted count, and reconciliation result.

Comments

Markdown supported