{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "name": "app-planning routing accuracy corpus",
  "version": "2.1.0",
  "purpose": "Routing-eval corpus for app-planning (adia-ui-factory plugin). Each phrase declares whether app-planning 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-planning routing \u2014 does this phrase activate app-planning (the cold-start classifier), or does a sibling factory skill / the forge plugin own it because the axes are already decided?",
  "phrases": [
    {
      "id": "orient-start-01",
      "phrase": "build an adia-ui app for internal claims review",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "Canonical 'build/start an adia-ui app' trigger phrase, verbatim from the description."
    },
    {
      "id": "orient-start-02",
      "phrase": "start a new adia-ui app for our support team, nothing exists yet",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "Greenfield start-mode: no mode/shape/shell decided."
    },
    {
      "id": "orient-mode-01",
      "phrase": "orient in this repo before we do anything else",
      "expected": "app-planning",
      "expected_shape": "orient",
      "rationale": "Verbatim 'orient in this repo' trigger phrase."
    },
    {
      "id": "orient-mode-02",
      "phrase": "help me get oriented \u2014 I don't know this codebase yet",
      "expected": "app-planning",
      "expected_shape": "orient",
      "rationale": "Existing-repo understanding-before-changing, the 'orient' mode row."
    },
    {
      "id": "orient-mode-03",
      "phrase": "is this app currently a rollup or a single-surface shape?",
      "expected": "app-planning",
      "expected_shape": "orient",
      "rationale": "Direct ask to classify axis 2 (project shape) on an existing repo."
    },
    {
      "id": "orient-mode-04",
      "phrase": "new engineer here \u2014 walk me through how this adia-ui app is put together",
      "expected": "app-planning",
      "expected_shape": "orient",
      "rationale": "Orient mode: understand an existing repo before changing it."
    },
    {
      "id": "orient-surface-undecided-01",
      "phrase": "add a surface for vendor onboarding \u2014 not sure yet what shell it needs",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "Verbatim 'add a surface' trigger phrase, paired with an explicitly open shell axis \u2014 the positive twin of the project-scaffolding collision adversarial below."
    },
    {
      "id": "orient-surface-undecided-02",
      "phrase": "we want to add a new surface to this app but haven't picked SPA or SSR",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "'Add a surface' with rendering mode (axis 1) explicitly undecided."
    },
    {
      "id": "orient-shell-undecided-01",
      "phrase": "what shell should this new admin dashboard use \u2014 sidebar+topbar or something simpler?",
      "expected": "app-planning",
      "expected_shape": "route",
      "rationale": "Shell axis (3) is the open question; orient classifies before handing to shell-selection."
    },
    {
      "id": "orient-shell-undecided-02",
      "phrase": "not sure if this needs admin-shell or just an embed \u2014 can you check the repo first?",
      "expected": "app-planning",
      "expected_shape": "route",
      "rationale": "Shell axis undecided, explicit ask to classify against repo signal before routing."
    },
    {
      "id": "orient-greenfield-brief-01",
      "phrase": "I have a rough one-paragraph brief for a new internal tool \u2014 where do I even start?",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "Greenfield brief, no axis decided \u2014 canonical start-mode cold start."
    },
    {
      "id": "orient-greenfield-brief-02",
      "phrase": "we're building a new product on adia-ui, help me figure out the right shape for it",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "New app, shape axis (2) explicitly unresolved."
    },
    {
      "id": "orient-mixed-signal-01",
      "phrase": "scope out this vague feature ask before you route it to the right skill",
      "expected": "app-planning",
      "expected_shape": "route",
      "rationale": "Explicit meta-ask for classification-before-routing \u2014 the router's own job description."
    },
    {
      "id": "orient-mixed-signal-02",
      "phrase": "figure out the rendering mode and shell for this new feature before building it",
      "expected": "app-planning",
      "expected_shape": "route",
      "rationale": "Axes 1 and 3 both explicitly unresolved for one task."
    },
    {
      "id": "orient-mixed-signal-03",
      "phrase": "we want to add a chat feature but I don't know if this app is SPA or SSR",
      "expected": "app-planning",
      "expected_shape": "route",
      "rationale": "Task is named (chat \u2192 llm-wiring) but the mode axis is unresolved \u2014 orient classifies first, per the task table's premise that mode/shape/shell gate the hand-off."
    },
    {
      "id": "orient-mixed-signal-04",
      "phrase": "what's the right approach for this \u2014 it's a greenfield ask and no shell has been chosen yet",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "Explicit 'no shell chosen' \u2014 axis 3 open on a greenfield ask."
    },
    {
      "id": "orient-kickoff-01",
      "phrase": "kick off orientation for this brief before we scaffold anything",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "Explicit request to run orientation ahead of project-scaffolding's scaffold step."
    },
    {
      "id": "orient-kickoff-02",
      "phrase": "help me plan a new adia-ui surface from this one-paragraph brief",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "Planning a new surface from a brief, no axes pre-decided."
    },
    {
      "id": "orient-shape-classify-01",
      "phrase": "classify this task before we decide who builds what",
      "expected": "app-planning",
      "expected_shape": "route",
      "rationale": "Direct ask for axis classification and hand-off, orient's core deliverable."
    },
    {
      "id": "orient-shape-classify-02",
      "phrase": "we need an internal ops tool but haven't decided if it should be server-rendered",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "Rendering mode (axis 1) is the explicitly open question on a new app."
    },
    {
      "id": "orient-generic-01",
      "phrase": "add an adia-ui surface to this repo \u2014 mode, shape, and shell are all still open questions",
      "expected": "app-planning",
      "expected_shape": "start",
      "rationale": "All three structural axes explicitly unresolved \u2014 the strongest possible orient signal."
    },
    {
      "id": "orient-adv-01",
      "phrase": "add a new billing surface to this rollup app under app/billing, matching the existing page-trio pages already there",
      "expected": "project-scaffolding",
      "rationale": "Adversarial \u2014 the 'add a surface' collision with project-scaffolding's own description. Here shape (rollup) and layout convention (page-trio) are already established by cited repo evidence, so it's execution, not classification: project-scaffolding scaffolds directly, no orient hand-off needed.",
      "expected_alternative_raw": "project-scaffolding (adia-ui-factory plugin)"
    },
    {
      "id": "orient-adv-02",
      "phrase": "add a new <rating-ui> primitive component to packages/web-components",
      "expected": "primitive-authoring",
      "rationale": "Adversarial \u2014 framework-monorepo primitive authoring. This is the misroute exit: work inside the @adia-ai framework itself routes to adia-ui-forge, not any factory skill.",
      "expected_alternative_raw": "primitive-authoring (adia-ui-forge plugin)"
    },
    {
      "id": "orient-adv-03",
      "phrase": "the Orientation Record already says SPA + admin-shell + rollup \u2014 now wire the data hydration for the new panel",
      "expected": "data-wiring",
      "rationale": "Adversarial \u2014 a task already mid-flight where the record exists. All four axes are already cited and settled; re-running orient would be redundant. Routes straight to the owning skill (data-wiring) per the existing record."
    },
    {
      "id": "orient-adv-04",
      "phrase": "wire the admin-shell sidebar and command palette for this dashboard",
      "expected": "shell-selection",
      "rationale": "Adversarial \u2014 shell axis is already decided (admin-shell named explicitly); the task is composing it, which is shell-selection' own territory, not a classification job."
    },
    {
      "id": "orient-adv-05",
      "phrase": "build a settings screen with a form, save button, and confirmation toast",
      "expected": "screen-composition",
      "rationale": "Adversarial \u2014 a concrete screen-composition ask with no mode/shape/shell ambiguity in view; screen-composition builds it directly from the catalog."
    },
    {
      "id": "orient-adv-06",
      "phrase": "explain how CSS grid works",
      "expected": null,
      "rationale": "Adversarial \u2014 generic front-end knowledge unrelated to adia-ui; no factory or forge skill should activate."
    }
  ],
  "minimums_per_spec": {
    "trigger_phrases": 21,
    "adversarial_phrases": 6,
    "task_shapes_covered": "start-mode, orient-mode, route-mode, axis-1-rendering-mode-undecided, axis-2-shape-undecided, axis-3-shell-undecided, mixed-signal-task-known-mode-unknown",
    "adversarial_fraction": "22%"
  },
  "evaluator_notes": {
    "current_state": "27 cases (21 trigger + 6 adversarial). Trigger cases span all three modes (orient/start/route) and surface each of the four classifier axes as the open question at least twice. Adversarials target the two sharpest real boundaries: the 'add a surface' phrase collision with project-scaffolding's description (classify-vs-execute), and the misroute exit to adia-ui-forge for framework-monorepo work.",
    "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-planning description edit. Add 1-2 new cases per checkpoint reflecting newly-observed routing failure modes.",
    "known_limitations": "The mode label (orient/start/route) on trigger cases is an evaluator convenience, not a hard boundary \u2014 several phrases plausibly fit two modes (e.g. a shell-only question could be 'route' or 'start' depending on whether a wider app is implied); the heuristic scorer only checks should_route_to_orient, not mode accuracy. The project-scaffolding 'add a surface' collision (orient-surface-undecided-01/02 vs orient-adv-01) is the single most ambiguous boundary in this corpus \u2014 real disambiguation needs file-path/repo-state context the heuristic scorer cannot see, which is exactly why the harness's cited-signal gate exists."
  }
}
