{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "name": "app-migration routing accuracy corpus",
  "version": "2.1.0",
  "purpose": "Routing-eval corpus for app-migration (adia-ui-factory plugin). Each phrase declares whether app-migration SHOULD be the routing target. Scored by the estate's TF-IDF routing-eval runner against the skill's description (heuristic token overlap).",
  "scoring_notes": "Heuristic signal, not ground truth. Treat misroutes as a prompt to tighten the skill description, never as a reason to keyword-stuff it. Real harness routing is LLM-driven.",
  "license": "internal",
  "scope": "app-migration routing \u2014 does this phrase activate app-migration (the consumer-app version/port/mode migration sweep), and does it correctly stay OUT of package-release (cutting the release / authoring the MIGRATION GUIDE), host-wiring (first-time wiring), and generic non-adia dependency bumps?",
  "phrases": [
    {
      "id": "migrate-version-01",
      "phrase": "migrate our app from @adia-ai/web-components 0.6 to 0.8",
      "expected": "app-migration",
      "expected_shape": "version-upgrade",
      "rationale": "Canonical 'migrate to v0.X' phrasing naming the exact package and span."
    },
    {
      "id": "migrate-version-02",
      "phrase": "upgrade @adia-ai/web-components to the latest version",
      "expected": "app-migration",
      "expected_shape": "version-upgrade",
      "rationale": "Verbatim 'upgrade @adia-ai/web-components' phrase from the skill description."
    },
    {
      "id": "migrate-version-03",
      "phrase": "bump adia-ui from v0.5.2 to v0.7.0 in our consumer app",
      "expected": "app-migration",
      "expected_shape": "version-upgrade",
      "rationale": "Version-bump-in-consumer-app framing, distinct from cutting the release itself."
    },
    {
      "id": "migrate-breaking-01",
      "phrase": "fix the breaking changes after upgrading @adia-ai/web-modules",
      "expected": "app-migration",
      "expected_shape": "breaking-changes-fix",
      "rationale": "Verbatim 'fix breaking changes' phrase from the skill description."
    },
    {
      "id": "migrate-breaking-02",
      "phrase": "our shell markup broke after the last adia-ui bump \u2014 sweep the deprecated attributes",
      "expected": "app-migration",
      "expected_shape": "breaking-changes-fix",
      "rationale": "Post-upgrade breakage + deprecated-attribute sweep is the skill's mechanical-sweep core."
    },
    {
      "id": "migrate-breaking-03",
      "phrase": "grep for legacy shell shapes and fix every call site after the version bump",
      "expected": "app-migration",
      "expected_shape": "breaking-changes-fix",
      "rationale": "Grep-audit-then-sweep is the skill's named 5-step procedure."
    },
    {
      "id": "migrate-port-01",
      "phrase": "port our app from @agent-ui-kit to adia-ui",
      "expected": "app-migration",
      "expected_shape": "port-foreign",
      "rationale": "Verbatim '@agent-ui-kit' foreign-code port named in the skill description."
    },
    {
      "id": "migrate-port-02",
      "phrase": "convert this legacy component library's markup to adia-ui primitives",
      "expected": "app-migration",
      "expected_shape": "port-foreign",
      "rationale": "Tag-rename-map / token-namespace-swap port-to-adia task shape."
    },
    {
      "id": "migrate-port-03",
      "phrase": "we're moving off a different design system's card components onto adia-ui components",
      "expected": "app-migration",
      "expected_shape": "port-foreign",
      "rationale": "Foreign-design-system port, same task shape as the @agent-ui-kit case with no package-version framing."
    },
    {
      "id": "migrate-mode-01",
      "phrase": "move this surface from SPA to SSR rendering",
      "expected": "app-migration",
      "expected_shape": "mode-change",
      "rationale": "Verbatim 'SPA\u2194SSR mode change' from the skill description."
    },
    {
      "id": "migrate-mode-02",
      "phrase": "convert our admin app from client-side rendering to server-side rendering",
      "expected": "app-migration",
      "expected_shape": "mode-change",
      "rationale": "Paraphrased SPA\u2192SSR mode-change without using the literal acronyms."
    },
    {
      "id": "migrate-mode-03",
      "phrase": "switch this page back from SSR to SPA mode",
      "expected": "app-migration",
      "expected_shape": "mode-change",
      "rationale": "Reverse-direction mode-change, same task shape."
    },
    {
      "id": "migrate-sweep-01",
      "phrase": "sweep the deprecated attribute names across the app after the upgrade",
      "expected": "app-migration",
      "expected_shape": "sweep-deprecated",
      "rationale": "Verbatim 'sweep deprecated attributes' phrase from the skill description."
    },
    {
      "id": "migrate-sweep-02",
      "phrase": "audit the codebase for legacy adia-ui patterns before the version bump lands",
      "expected": "app-migration",
      "expected_shape": "sweep-deprecated",
      "rationale": "Pre-bump legacy-pattern audit, the skill's Step 2 (grep audit) framing."
    },
    {
      "id": "migrate-adv-01",
      "phrase": "cut and publish the next @adia-ai release with this version bump",
      "expected": "package-release",
      "rationale": "Adversarial \u2014 'upgrade/bump' language describing the producer act of cutting a release, not a consumer app moving across versions.",
      "expected_alternative_raw": "package-release (forge plugin)"
    },
    {
      "id": "migrate-adv-02",
      "phrase": "author the MIGRATION GUIDE section for this breaking release",
      "expected": "package-release",
      "rationale": "Adversarial \u2014 authoring the guide is the producer-side release skill; app-migration only consumes the finished guide.",
      "expected_alternative_raw": "package-release (forge plugin)"
    },
    {
      "id": "migrate-adv-03",
      "phrase": "wire up the host for our very first adia-ui app \u2014 nothing to upgrade, this is brand new",
      "expected": "host-wiring",
      "rationale": "Adversarial \u2014 first-time host bootstrap/registration with no prior version or foreign codebase to move from; explicitly not a migration.",
      "expected_alternative_raw": "host-wiring (adia-ui-factory plugin)"
    },
    {
      "id": "migrate-adv-04",
      "phrase": "bump lodash and express to their latest versions in package.json",
      "expected": null,
      "rationale": "Adversarial \u2014 generic npm dependency bump with no @adia-ai package or adia-ui involvement; no AdiaUI skill should activate."
    },
    {
      "id": "migrate-adv-05",
      "phrase": "verify the app renders cleanly after the migration sweep finished",
      "expected": "surface-qa",
      "rationale": "Adversarial \u2014 the browser-gate verification step downstream of a migration is app-migration's own listed Verify target but the neighboring gate itself is owned by surface-qa, not re-entrant into app-migration.",
      "expected_alternative_raw": "surface-qa (adia-ui-factory plugin)"
    },
    {
      "id": "migrate-adv-06",
      "phrase": "scaffold a brand new adia-ui app from scratch",
      "expected": "project-scaffolding",
      "rationale": "Adversarial \u2014 new project layout/scaffolding has no prior version, foreign codebase, or rendering mode to move from; it's project-scaffolding's first-time structure task, not a migration.",
      "expected_alternative_raw": "project-scaffolding (adia-ui-factory plugin)"
    }
  ],
  "minimums_per_spec": {
    "trigger_phrases": 14,
    "adversarial_phrases": 6,
    "task_shapes_covered": "version-upgrade, breaking-changes-fix, port-foreign, mode-change, sweep-deprecated",
    "adversarial_fraction": "30%"
  },
  "evaluator_notes": {
    "current_state": "20 cases (14 trigger + 6 adversarial). Each of the 5 task shapes has 2-3 trigger cases; adv-01/adv-02 target the two producer-side 'upgrade' misroutes named in the skill's own NOT-for line (package-release).",
    "promotion_criteria": "Promote to a CI gate (warn \u2192 hard-fail) when F1 \u2265 0.85 on this corpus across 3+ consecutive runs without description edits.",
    "review_cadence": "Re-run on every app-migration description edit. Add 1-2 new cases per checkpoint reflecting newly-observed routing failure modes.",
    "known_limitations": "'upgrade' and 'migrate' are the two words this skill's description leans on hardest, and both also appear naturally in release-cutting language (adv-01) and MIGRATION GUIDE authoring (adv-02) \u2014 the heuristic TF-IDF scorer may not separate consumer-side sweep from producer-side cut without the package-direction context (target repo is a consumer app vs. the framework monorepo) that only an LLM router would use."
  }
}
