Skip to content

hashgraph-online/awesome-codex-plugins / plugins/boshu2/agentops/skills/research

research

Verified

Answer one cited question on code, history, claims or patterns. Use when: asked how it works, why it changed, if a claim or done/shipped report holds, or a pattern warrants a rule.

scripts/pattern-mining/validate-output.sh

View on GitHub
#!/usr/bin/env bash
set -euo pipefail

if [[ $# -ne 1 || ! -f "$1" ]]; then
  echo "usage: $0 <pattern-mining.json>" >&2
  exit 2
fi

if ! command -v jq >/dev/null 2>&1; then
  echo "pattern-mining validator requires jq, which is not on PATH" >&2
  exit 2
fi

# shape and cost are optional; a gate needs a promotion and a stated cost.
# Exemplar strings must differ; whether they are independent lineages is the
# author's claim, which this check cannot see.
jq -e '
  def text: type == "string" and length > 0;
  . as $result
  | .schema_version == "pattern-mining.v1"
  and (.outcome == "promote" or .outcome == "hypothesis")
  and (.exemplars
    | type == "array" and length > 0 and all(.[]; text)
    and ((unique | length) == length))
  and (.invariants | type == "array" and all(.[]; text))
  and (.variations | type == "array" and all(.[]; text))
  and (.incidental | type == "array" and all(.[]; text))
  and (.holdout | type == "object")
  and (.holdout.source | type == "string")
  and (.holdout.result == "pass" or .holdout.result == "fail" or .holdout.result == "inconclusive" or .holdout.result == "not-run")
  and (.back_application == "pass" or .back_application == "fail" or .back_application == "not-run")
  and ((has("cost") | not) or (.cost | text))
  and ((has("shape") | not)
    or ((.shape == "no-action" or .shape == "reference-line" or .shape == "template"
        or .shape == "helper" or .shape == "gate")
      and (.shape != "gate" or (.outcome == "promote" and (.cost | text)))))
  and (
    if .outcome == "promote" then
      (.exemplars | length >= 3)
      and (.invariants | length > 0)
      and (.holdout.source | text)
      and (($result.exemplars | index($result.holdout.source)) == null)
      and .holdout.result == "pass"
      and .back_application == "pass"
      and .route == "operationalize"
    else
      ((.exemplars | length) < 3 or .holdout.result != "pass" or .back_application != "pass")
      and .route == "no-action"
    end
  )
' "$1" >/dev/null || {
  echo "invalid pattern-mining.v1 artifact: $1" >&2
  exit 1
}

echo "valid pattern-mining.v1: $1"
add-product-e2e-evalpaperclipai/paperclipAdd or extend a Paperclip full-stack runner E2E workflow, fixture, matcher, or report evidence path for local or Daytona execution.Stars: 114kUpdated Claude CodeCodexVerifiedInstall
add-runner-evalpaperclipai/paperclipAdd or extend a Paperclip Runner protocol evaluation definition, roster, assertion, or report fixture with provenance and narrow validation.Stars: 114kUpdated Claude CodeCodexVerifiedInstall
diagnose-why-work-stoppedpaperclipai/paperclipCompatibility entry point for failed, stalled, looping, or over-recovered Paperclip work. Use fix-failed-paperclip-run for the full diagnosis, regression, repair, real verification, and green-PR workflow; honor an explicitly requested diagnosis-only scope.Stars: 114kUpdated Claude CodeCodexVerifiedInstall
fix-failed-paperclip-runpaperclipai/paperclipDiagnose and fix failed, stuck, slow, or incorrectly blocked Paperclip tasks and runs. Use with a task/run URL or failure report to trace the root cause, prove a regression red then green, check second-order effects, verify the real workflow, and deliver a PR with passing checks.Stars: 114kUpdated Claude CodeCodexVerifiedInstall