#!/usr/bin/env node
import {
  typedEntries
} from "./chunk-T4EXUIBY.js";
import {
  DEFAULT_BRANDING
} from "./chunk-6OWHQ7HM.js";
import {
  init_esm_shims
} from "./chunk-DHET7RCE.js";

// src/cli/lib/__tests__/test-fixtures.ts
init_esm_shims();

// src/cli/lib/__tests__/helpers.ts
init_esm_shims();
import path from "path";
import { fileURLToPath } from "url";
import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
import { run } from "@oclif/core";
import { createJiti } from "jiti";
var __filename = fileURLToPath(import.meta.url);
var __dirname = path.dirname(__filename);
var CLI_ROOT = path.resolve(__dirname, "../../../..");
var CONFIG_EXPORTS_PATH = path.resolve(__dirname, "../../config-exports.ts");
var OUTPUT_STRINGS = {
  CONFIG_HEADER: `${DEFAULT_BRANDING.NAME} Configuration`,
  CONFIG_PATHS_HEADER: "Configuration File Paths",
  CONFIG_LAYERS_HEADER: "Configuration Layers:",
  CONFIG_PRECEDENCE: "Precedence: flag > env > project > global > default",
  SOURCE_LABEL: "Source:",
  MARKETPLACE_LABEL: "Marketplace:",
  AGENTS_SOURCE_LABEL: "Agents Source:",
  GLOBAL_LABEL: "Global:",
  PROJECT_LABEL: "Project:",
  // Setup/Init outputs
  INIT_HEADER: `${DEFAULT_BRANDING.NAME} Setup`,
  INIT_SUCCESS: `${DEFAULT_BRANDING.NAME} initialized successfully!`,
  LOADING_MATRIX: "Loading skills matrix...",
  LOADING_SKILLS: "Loading skills...",
  LOADING_AGENTS: "Loading agent partials...",
  // Plugin/installation outputs
  NO_PLUGIN_FOUND: "No plugin found",
  NO_INSTALLATION_FOUND: "No installation found",
  NO_PLUGIN_INSTALLATION: "No plugin installation found",
  NOT_INSTALLED: `${DEFAULT_BRANDING.NAME} is not installed`,
  UNINSTALL_HEADER: `${DEFAULT_BRANDING.NAME} Uninstall`,
  UNINSTALL_COMPLETE: `${DEFAULT_BRANDING.NAME} has been uninstalled`,
  EJECT_HEADER: `${DEFAULT_BRANDING.NAME} Eject`,
  // Doctor command outputs
  DOCTOR_HEADER: `${DEFAULT_BRANDING.NAME} Doctor`,
  // Error message patterns (lowercase for case-insensitive matching)
  ERROR_MISSING_ARG: "missing required arg",
  ERROR_UNEXPECTED_ARG: "unexpected argument",
  ERROR_UNKNOWN_FLAG: "unknown flag",
  ERROR_PARSE: "parse"
};
function buildSkillConfigs(skillIds, overrides) {
  return skillIds.map((id) => ({
    id,
    scope: overrides?.scope ?? "project",
    source: overrides?.source ?? "local"
  }));
}
function createMockSkill(id, category, overrides) {
  const segments = id.split("-");
  const defaultSlug = segments.length >= 3 ? segments.slice(2).join("-") : id;
  const defaultDisplayName = defaultSlug.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
  return {
    id,
    slug: defaultSlug,
    displayName: defaultDisplayName,
    description: `${id} skill`,
    category,
    tags: [],
    author: "@test",
    conflictsWith: [],
    isRecommended: false,
    requires: [],
    alternatives: [],
    discourages: [],
    compatibleWith: [],
    requiresSetup: [],
    providesSetupFor: [],
    path: `skills/${category}/${id}/`,
    ...overrides
  };
}
function createMockMatrix(skills, overrides) {
  const autoSlugToId = {};
  const autoIdToSlug = {};
  for (const [id, skill] of typedEntries(skills)) {
    if (skill.slug) {
      autoSlugToId[skill.slug] = id;
      autoIdToSlug[id] = skill.slug;
    }
  }
  return {
    version: "1.0.0",
    categories: {},
    skills,
    suggestedStacks: [],
    slugMap: { slugToId: autoSlugToId, idToSlug: autoIdToSlug },
    generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
    ...overrides
  };
}
function createMockCategory(id, displayName, overrides) {
  return {
    id,
    displayName,
    description: `${displayName} category`,
    domain: "web",
    exclusive: true,
    required: false,
    order: 0,
    ...overrides
  };
}
function createMockResolvedStack(id, name, overrides) {
  return {
    id,
    name,
    description: `${name} stack`,
    skills: {},
    allSkillIds: [],
    philosophy: "",
    ...overrides
  };
}

// src/cli/lib/__tests__/test-fixtures.ts
var SKILL_FIXTURES = {
  react: createMockSkill("web-framework-react", "web-framework", {
    description: "React framework for building user interfaces",
    tags: ["react", "web", "ui", "component"]
  }),
  zustand: createMockSkill("web-state-zustand", "web-client-state", {
    description: "Bear necessities state management",
    tags: ["state", "react", "zustand"]
  }),
  hono: createMockSkill("api-framework-hono", "api-api", {
    description: "Lightweight web framework for the edge",
    tags: ["api", "api", "edge", "serverless"]
  }),
  vitest: createMockSkill("web-testing-vitest", "web-testing", {
    description: "Next generation testing framework",
    tags: ["testing", "vitest", "unit"]
  }),
  vue: createMockSkill("web-framework-vue", "web-framework", {
    description: "Progressive JavaScript framework",
    tags: ["vue", "web", "reactive"]
  }),
  "auth-patterns": createMockSkill("api-security-auth-patterns", "api-security", {
    description: "Authentication and authorization patterns",
    tags: ["auth", "security", "jwt", "oauth"]
  }),
  drizzle: createMockSkill("api-database-drizzle", "api-database", {
    description: "TypeScript ORM for SQL databases",
    tags: ["database", "orm", "sql"]
  }),
  "anti-over-engineering": createMockSkill(
    "meta-methodology-anti-over-engineering",
    "shared-methodology",
    {
      description: "Surgical implementation, not architectural innovation",
      tags: ["methodology", "foundational"]
    }
  ),
  "scss-modules": createMockSkill("web-styling-scss-modules", "web-styling", {
    description: "CSS Modules with SCSS",
    tags: ["css", "scss", "modules"]
  })
};
function getTestSkill(name, overrides) {
  return { ...SKILL_FIXTURES[name], ...overrides };
}
var TEST_SKILLS = {
  react: createMockSkill("web-framework-react", "web-framework"),
  vue: createMockSkill("web-framework-vue", "web-framework"),
  zustand: createMockSkill("web-state-zustand", "web-client-state", {
    compatibleWith: ["web-framework-react"]
  }),
  pinia: createMockSkill("web-state-pinia", "web-client-state", {
    compatibleWith: ["web-framework-vue"]
  }),
  hono: createMockSkill("api-framework-hono", "api-api"),
  vitest: createMockSkill("web-testing-vitest", "web-testing"),
  "scss-modules": createMockSkill("web-styling-scss-modules", "web-styling"),
  drizzle: createMockSkill("api-database-drizzle", "api-database"),
  // Methodology skills (DEFAULT_PRESELECTED_SKILLS) — used by createComprehensiveMatrix
  "investigation-requirements": createMockSkill(
    "meta-methodology-investigation-requirements",
    "shared-methodology",
    { description: "Never speculate - read actual code first" }
  ),
  "anti-over-engineering": createMockSkill(
    "meta-methodology-anti-over-engineering",
    "shared-methodology",
    {
      description: "Surgical implementation, not architectural innovation"
    }
  ),
  "success-criteria": createMockSkill("meta-methodology-success-criteria", "shared-methodology", {
    description: "Explicit, measurable criteria defining done"
  }),
  "write-verification": createMockSkill(
    "meta-methodology-write-verification",
    "shared-methodology",
    {
      description: "Verify work was actually saved"
    }
  ),
  "improvement-protocol": createMockSkill(
    "meta-methodology-improvement-protocol",
    "shared-methodology",
    { description: "Evidence-based self-improvement" }
  ),
  "context-management": createMockSkill(
    "meta-methodology-context-management",
    "shared-methodology",
    {
      description: "Maintain project continuity across sessions"
    }
  )
};
var TEST_CATEGORIES = {
  framework: createMockCategory("web-framework", "Framework"),
  clientState: createMockCategory("web-client-state", "Client State"),
  styling: createMockCategory("web-styling", "Styling"),
  testing: createMockCategory("web-testing", "Testing"),
  api: createMockCategory("api-api", "Backend Framework"),
  database: createMockCategory("api-database", "Database"),
  methodology: createMockCategory("shared-methodology", "Methodology"),
  tooling: createMockCategory("shared-tooling", "Tooling")
};
var TEST_MATRICES = {
  empty: createMockMatrix({}),
  react: createMockMatrix({
    "web-framework-react": TEST_SKILLS.react
  }),
  reactAndZustand: createMockMatrix({
    "web-framework-react": TEST_SKILLS.react,
    "web-state-zustand": TEST_SKILLS.zustand
  }),
  reactAndHono: createMockMatrix({
    "web-framework-react": TEST_SKILLS.react,
    "api-framework-hono": TEST_SKILLS.hono
  }),
  reactAndScss: createMockMatrix({
    "web-framework-react": TEST_SKILLS.react,
    "web-styling-scss-modules": TEST_SKILLS["scss-modules"]
  }),
  reactScssAndHono: createMockMatrix({
    "web-framework-react": TEST_SKILLS.react,
    "web-styling-scss-modules": TEST_SKILLS["scss-modules"],
    "api-framework-hono": TEST_SKILLS.hono
  }),
  reactZustandAndHono: createMockMatrix({
    "web-framework-react": TEST_SKILLS.react,
    "web-state-zustand": TEST_SKILLS.zustand,
    "api-framework-hono": TEST_SKILLS.hono
  })
};

export {
  getTestSkill,
  TEST_SKILLS,
  TEST_CATEGORIES,
  TEST_MATRICES,
  buildSkillConfigs,
  createMockSkill,
  createMockMatrix,
  createMockCategory,
  createMockResolvedStack
};
//# sourceMappingURL=chunk-7FMEMXJ4.js.map