| import type { Adapter } from "../types.js"; | ||
| export declare const cursorAdapter: Adapter; |
| function supports(manifest) { | ||
| return { | ||
| supported: manifest.targets.cursor === true, | ||
| issues: manifest.targets.cursor === true | ||
| ? [] | ||
| : [ | ||
| { | ||
| severity: "warning", | ||
| code: "cursor_target_disabled", | ||
| message: "Cursor output is disabled in the manifest targets.", | ||
| }, | ||
| ], | ||
| }; | ||
| } | ||
| function plan(_manifest, generationPlan) { | ||
| return generationPlan.files.filter((file) => file.target === "cursor"); | ||
| } | ||
| function describeProjectType(manifest) { | ||
| if (manifest.project.type === "web-app") | ||
| return "web application"; | ||
| if (manifest.project.type === "api-service") | ||
| return "API service"; | ||
| if (manifest.project.type === "full-stack") | ||
| return "full-stack application"; | ||
| if (manifest.project.type === "library") | ||
| return "library"; | ||
| if (manifest.project.type === "cli-tool") | ||
| return "CLI tool"; | ||
| if (manifest.project.type === "mobile") | ||
| return "mobile application"; | ||
| return "dashboard"; | ||
| } | ||
| function renderProjectContext(manifest) { | ||
| const lines = [ | ||
| `---`, | ||
| `description: Project context for ${manifest.project.name}`, | ||
| `alwaysApply: true`, | ||
| `---`, | ||
| ``, | ||
| `# Project Context`, | ||
| ``, | ||
| `This is the **${manifest.project.name}** ${manifest.project.framework} ${describeProjectType(manifest)} written in TypeScript.`, | ||
| ``, | ||
| `## Key Facts`, | ||
| ``, | ||
| `- **Framework:** ${manifest.project.framework}`, | ||
| `- **Project type:** ${describeProjectType(manifest)}`, | ||
| `- **Language:** TypeScript (strict mode)`, | ||
| ]; | ||
| if (manifest.conventions.accessibility) { | ||
| lines.push(`- **Accessibility:** required — use semantic HTML and ARIA attributes`); | ||
| } | ||
| if (manifest.conventions.responsive) { | ||
| lines.push(`- **Responsive:** required — support mobile, tablet, and desktop`); | ||
| } | ||
| if (manifest.conventions.authModel && manifest.conventions.authModel !== "none") { | ||
| lines.push(`- **Auth model:** ${manifest.conventions.authModel}`); | ||
| } | ||
| return lines.join("\n") + "\n"; | ||
| } | ||
| function renderCodingStyle(manifest) { | ||
| const lines = [ | ||
| `---`, | ||
| `description: Coding style rules for ${manifest.project.name}`, | ||
| `alwaysApply: false`, | ||
| `globs: src/**/*.{ts,tsx}`, | ||
| `---`, | ||
| ``, | ||
| `# Coding Style`, | ||
| ``, | ||
| ...manifest.instructions.codingStyle.map((rule) => `- ${rule}`), | ||
| ]; | ||
| return lines.join("\n") + "\n"; | ||
| } | ||
| function renderFramework(manifest) { | ||
| const fw = manifest.project.framework; | ||
| const frameworkGuidance = []; | ||
| switch (fw) { | ||
| case "nextjs": | ||
| frameworkGuidance.push("Use the App Router with server components by default. Only add `\"use client\"` when the component needs interactivity.", "Keep data fetching in server components or route handlers.", "Use `next/image` for optimized images and `next/link` for internal navigation."); | ||
| break; | ||
| case "vite-react": | ||
| frameworkGuidance.push("Use Vite conventions. Lazy-import route-level components for code splitting.", "Keep CSS modules or Tailwind utility classes co-located with components."); | ||
| break; | ||
| case "react": | ||
| frameworkGuidance.push("Prefer composition over inheritance. Lift state only when sibling components need it."); | ||
| break; | ||
| case "express": | ||
| case "fastify": | ||
| case "hono": | ||
| frameworkGuidance.push(`Use ${fw} idioms for handlers and middleware.`, "Keep controllers thin — delegate business logic to service functions.", "Validate all inputs at the handler boundary before passing data to services."); | ||
| break; | ||
| } | ||
| const globs = fw === "express" || fw === "fastify" || fw === "hono" | ||
| ? "src/**/*.ts" | ||
| : "src/**/*.{ts,tsx}"; | ||
| const lines = [ | ||
| `---`, | ||
| `description: ${fw} framework conventions`, | ||
| `alwaysApply: false`, | ||
| `globs: ${globs}`, | ||
| `---`, | ||
| ``, | ||
| `# ${fw.charAt(0).toUpperCase()}${fw.slice(1)} Conventions`, | ||
| ``, | ||
| ...frameworkGuidance.map((g) => `- ${g}`), | ||
| ]; | ||
| return lines.join("\n") + "\n"; | ||
| } | ||
| function renderCodeReview(manifest) { | ||
| const lines = [ | ||
| `---`, | ||
| `description: Code review rules for ${manifest.project.name}`, | ||
| `alwaysApply: false`, | ||
| `---`, | ||
| ``, | ||
| `# Code Review Rules`, | ||
| ``, | ||
| ...manifest.instructions.reviewRules.map((rule) => `- ${rule}`), | ||
| ]; | ||
| return lines.join("\n") + "\n"; | ||
| } | ||
| function renderRule(file, manifest) { | ||
| const ruleName = file.path.split("/").pop()?.replace(".mdc", "") ?? "rule"; | ||
| switch (ruleName) { | ||
| case "context": | ||
| return renderProjectContext(manifest); | ||
| case "coding-style": | ||
| return renderCodingStyle(manifest); | ||
| case "framework": | ||
| return renderFramework(manifest); | ||
| case "code-review": | ||
| return renderCodeReview(manifest); | ||
| default: | ||
| return `# ${ruleName}\n\nGenerated by agenv for ${manifest.project.name}.\n`; | ||
| } | ||
| } | ||
| function render(file, manifest) { | ||
| return { | ||
| path: file.path, | ||
| trustSensitive: file.trustSensitive, | ||
| content: renderRule(file, manifest), | ||
| }; | ||
| } | ||
| export const cursorAdapter = { | ||
| id: "cursor", | ||
| supports, | ||
| plan, | ||
| render, | ||
| }; | ||
| //# sourceMappingURL=index.js.map |
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/cursor/index.ts"],"names":[],"mappings":"AAIA,SAAS,QAAQ,CAAC,QAAkB;IAClC,OAAO;QACL,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,IAAI;QAC3C,MAAM,EACJ,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,IAAI;YAC9B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE;oBACE,QAAQ,EAAE,SAAS;oBACnB,IAAI,EAAE,wBAAwB;oBAC9B,OAAO,EAAE,oDAAoD;iBAC9D;aACF;KACR,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,SAAmB,EAAE,cAA8B;IAC/D,OAAO,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC;AACzE,CAAC;AAED,SAAS,mBAAmB,CAAC,QAAkB;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M,CAAC;IAC3E,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,SAAS;YACZ,OAAO,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QACxC,KAAK,cAAc;YACjB,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QACrC,KAAK,WAAW;YACd,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;QACnC,KAAK,aAAa;YAChB,OAAO,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QACpC;YACE,OAAO,KAAK,QAAQ,8BAA8B,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC;IACjF,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,IAAiB,EAAE,QAAkB;IACnD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,OAAO,EAAE,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,EAAE,EAAE,QAAQ;IACZ,QAAQ;IACR,IAAI;IACJ,MAAM;CACP,CAAC"} |
| import type { Adapter } from "../types.js"; | ||
| export declare const windsurfAdapter: Adapter; |
| function supports(manifest) { | ||
| return { | ||
| supported: manifest.targets.windsurf === true, | ||
| issues: manifest.targets.windsurf === true | ||
| ? [] | ||
| : [ | ||
| { | ||
| severity: "warning", | ||
| code: "windsurf_target_disabled", | ||
| message: "Windsurf output is disabled in the manifest targets.", | ||
| }, | ||
| ], | ||
| }; | ||
| } | ||
| function plan(_manifest, generationPlan) { | ||
| return generationPlan.files.filter((file) => file.target === "windsurf"); | ||
| } | ||
| function describeProjectType(manifest) { | ||
| if (manifest.project.type === "web-app") | ||
| return "web application"; | ||
| if (manifest.project.type === "api-service") | ||
| return "API service"; | ||
| if (manifest.project.type === "full-stack") | ||
| return "full-stack application"; | ||
| if (manifest.project.type === "library") | ||
| return "library"; | ||
| if (manifest.project.type === "cli-tool") | ||
| return "CLI tool"; | ||
| if (manifest.project.type === "mobile") | ||
| return "mobile application"; | ||
| return "dashboard"; | ||
| } | ||
| function renderProjectContext(manifest) { | ||
| const lines = [ | ||
| `---`, | ||
| `trigger: always_on`, | ||
| `---`, | ||
| ``, | ||
| `# Project Context`, | ||
| ``, | ||
| `This is the **${manifest.project.name}** ${manifest.project.framework} ${describeProjectType(manifest)} written in TypeScript.`, | ||
| ``, | ||
| `## Key Facts`, | ||
| ``, | ||
| `- **Framework:** ${manifest.project.framework}`, | ||
| `- **Project type:** ${describeProjectType(manifest)}`, | ||
| `- **Language:** TypeScript (strict mode)`, | ||
| ]; | ||
| if (manifest.conventions.accessibility) { | ||
| lines.push(`- **Accessibility:** required — use semantic HTML and ARIA attributes`); | ||
| } | ||
| if (manifest.conventions.responsive) { | ||
| lines.push(`- **Responsive:** required — support mobile, tablet, and desktop`); | ||
| } | ||
| if (manifest.conventions.authModel && manifest.conventions.authModel !== "none") { | ||
| lines.push(`- **Auth model:** ${manifest.conventions.authModel}`); | ||
| } | ||
| return lines.join("\n") + "\n"; | ||
| } | ||
| function renderCodingStyle(manifest) { | ||
| const globs = manifest.project.framework === "express" || | ||
| manifest.project.framework === "fastify" || | ||
| manifest.project.framework === "hono" | ||
| ? "src/**/*.ts" | ||
| : "src/**/*.{ts,tsx}"; | ||
| const lines = [ | ||
| `---`, | ||
| `trigger: glob`, | ||
| `globs: ${globs}`, | ||
| `---`, | ||
| ``, | ||
| `# Coding Style`, | ||
| ``, | ||
| ...manifest.instructions.codingStyle.map((rule) => `- ${rule}`), | ||
| ]; | ||
| return lines.join("\n") + "\n"; | ||
| } | ||
| function renderFramework(manifest) { | ||
| const fw = manifest.project.framework; | ||
| const frameworkGuidance = []; | ||
| switch (fw) { | ||
| case "nextjs": | ||
| frameworkGuidance.push("Use the App Router with server components by default. Only add `\"use client\"` for interactive components.", "Keep data fetching in server components or route handlers.", "Use `next/image` and `next/link` for images and navigation."); | ||
| break; | ||
| case "vite-react": | ||
| frameworkGuidance.push("Leverage Vite HMR. Lazy-import route-level components for code splitting.", "Co-locate styles with components using Tailwind or CSS modules."); | ||
| break; | ||
| case "react": | ||
| frameworkGuidance.push("Prefer composition over inheritance. Lift state only when sibling components need it."); | ||
| break; | ||
| case "express": | ||
| case "fastify": | ||
| case "hono": | ||
| frameworkGuidance.push(`Use ${fw} idioms for route handlers and middleware.`, "Keep controllers thin — delegate business logic to service functions.", "Validate all inputs at the handler boundary."); | ||
| break; | ||
| } | ||
| const globs = fw === "express" || fw === "fastify" || fw === "hono" ? "src/**/*.ts" : "src/**/*.{ts,tsx}"; | ||
| const lines = [ | ||
| `---`, | ||
| `trigger: glob`, | ||
| `globs: ${globs}`, | ||
| `---`, | ||
| ``, | ||
| `# ${fw.charAt(0).toUpperCase()}${fw.slice(1)} Conventions`, | ||
| ``, | ||
| ...frameworkGuidance.map((g) => `- ${g}`), | ||
| ]; | ||
| return lines.join("\n") + "\n"; | ||
| } | ||
| function renderCodeReview(manifest) { | ||
| const lines = [ | ||
| `---`, | ||
| `trigger: manual`, | ||
| `---`, | ||
| ``, | ||
| `# Code Review Rules`, | ||
| ``, | ||
| ...manifest.instructions.reviewRules.map((rule) => `- ${rule}`), | ||
| ]; | ||
| return lines.join("\n") + "\n"; | ||
| } | ||
| function renderRule(file, manifest) { | ||
| const ruleName = file.path.split("/").pop()?.replace(".md", "") ?? "rule"; | ||
| switch (ruleName) { | ||
| case "context": | ||
| return renderProjectContext(manifest); | ||
| case "coding-style": | ||
| return renderCodingStyle(manifest); | ||
| case "framework": | ||
| return renderFramework(manifest); | ||
| case "code-review": | ||
| return renderCodeReview(manifest); | ||
| default: | ||
| return `# ${ruleName}\n\nGenerated by agenv for ${manifest.project.name}.\n`; | ||
| } | ||
| } | ||
| function render(file, manifest) { | ||
| return { | ||
| path: file.path, | ||
| trustSensitive: file.trustSensitive, | ||
| content: renderRule(file, manifest), | ||
| }; | ||
| } | ||
| export const windsurfAdapter = { | ||
| id: "windsurf", | ||
| supports, | ||
| plan, | ||
| render, | ||
| }; | ||
| //# sourceMappingURL=index.js.map |
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/windsurf/index.ts"],"names":[],"mappings":"AAIA,SAAS,QAAQ,CAAC,QAAkB;IAClC,OAAO;QACL,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,QAAQ,KAAK,IAAI;QAC7C,MAAM,EACJ,QAAQ,CAAC,OAAO,CAAC,QAAQ,KAAK,IAAI;YAChC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE;oBACE,QAAQ,EAAE,SAAS;oBACnB,IAAI,EAAE,0BAA0B;oBAChC,OAAO,EAAE,sDAAsD;iBAChE;aACF;KACR,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,SAAmB,EAAE,cAA8B;IAC/D,OAAO,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC;AAC3E,CAAC;AAED,SAAS,mBAAmB,CAAC,QAAkB;IAC7C,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,iBAAiB,CAAC;IAClE,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,aAAa;QAAE,OAAO,aAAa,CAAC;IAClE,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO,wBAAwB,CAAC;IAC5E,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1D,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,UAAU,CAAC;IAC5D,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,QAAQ;QAAE,OAAO,oBAAoB,CAAC;IACpE,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAS,oBAAoB,CAAC,QAAk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Ac;QACnC,OAAO,EAAE,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAY;IACtC,EAAE,EAAE,UAAU;IACd,QAAQ;IACR,IAAI;IACJ,MAAM;CACP,CAAC"} |
| import type { Manifest } from "../../manifest/schema.js"; | ||
| import type { DiagnosticFinding } from "../types.js"; | ||
| export declare function checkMcpEnvVars(manifest: Manifest | undefined): DiagnosticFinding[]; | ||
| export declare function checkMcpConfigFormat(cwd: string, manifest: Manifest | undefined): Promise<DiagnosticFinding[]>; |
| import { readFile } from "node:fs/promises"; | ||
| import { join } from "node:path"; | ||
| import { getPresetById } from "../../mcp/presets.js"; | ||
| export function checkMcpEnvVars(manifest) { | ||
| if (!manifest) | ||
| return []; | ||
| if (!manifest.targets.mcp || manifest.generated.mcpPresets.length === 0) | ||
| return []; | ||
| const results = []; | ||
| for (const presetId of manifest.generated.mcpPresets) { | ||
| const preset = getPresetById(presetId); | ||
| if (!preset || Object.keys(preset.env).length === 0) | ||
| continue; | ||
| for (const key of Object.keys(preset.env)) { | ||
| const value = process.env[key]; | ||
| if (!value || value.trim() === "") { | ||
| results.push({ | ||
| severity: "warning", | ||
| code: "mcp_env_missing", | ||
| message: `MCP preset "${preset.name}" requires env var ${key} which is not set.`, | ||
| }); | ||
| } | ||
| } | ||
| } | ||
| return results; | ||
| } | ||
| export async function checkMcpConfigFormat(cwd, manifest) { | ||
| if (!manifest?.targets.mcp) | ||
| return []; | ||
| const results = []; | ||
| const mcpPath = join(cwd, ".mcp.json"); | ||
| let raw; | ||
| try { | ||
| raw = await readFile(mcpPath, "utf8"); | ||
| } | ||
| catch { | ||
| results.push({ | ||
| severity: "warning", | ||
| code: "mcp_config_missing", | ||
| message: ".mcp.json not found. Run `agenv generate` to create it.", | ||
| }); | ||
| return results; | ||
| } | ||
| let parsed; | ||
| try { | ||
| parsed = JSON.parse(raw); | ||
| } | ||
| catch { | ||
| results.push({ | ||
| severity: "error", | ||
| code: "mcp_config_invalid_json", | ||
| message: ".mcp.json contains invalid JSON.", | ||
| }); | ||
| return results; | ||
| } | ||
| if (typeof parsed !== "object" || parsed === null || !("mcpServers" in parsed)) { | ||
| results.push({ | ||
| severity: "error", | ||
| code: "mcp_config_missing_servers", | ||
| message: '.mcp.json is missing required "mcpServers" top-level key.', | ||
| }); | ||
| return results; | ||
| } | ||
| const servers = parsed["mcpServers"]; | ||
| if (typeof servers !== "object" || servers === null) { | ||
| results.push({ | ||
| severity: "error", | ||
| code: "mcp_config_invalid_servers", | ||
| message: '"mcpServers" must be an object.', | ||
| }); | ||
| return results; | ||
| } | ||
| for (const [serverId, serverConfig] of Object.entries(servers)) { | ||
| if (typeof serverConfig !== "object" || serverConfig === null) { | ||
| results.push({ | ||
| severity: "error", | ||
| code: "mcp_server_invalid", | ||
| message: `MCP server "${serverId}" config must be an object.`, | ||
| }); | ||
| continue; | ||
| } | ||
| if (!("command" in serverConfig)) { | ||
| results.push({ | ||
| severity: "error", | ||
| code: "mcp_server_missing_command", | ||
| message: `MCP server "${serverId}" is missing required "command" field.`, | ||
| }); | ||
| } | ||
| } | ||
| return results; | ||
| } | ||
| //# sourceMappingURL=mcp.js.map |
| {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../../src/doctor/checks/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,MAAM,UAAU,eAAe,CAAC,QAA8B;IAC5D,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IACzB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnF,MAAM,OAAO,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SAAS;QACX,CAAC;QACD,IAAI,CAAC,CAAC,SAAS,IAAI,YAAY,CAAC,EAAE,CAAC;YACjC,OAAO,CAAC,IAAI,CAAC;gBACX,QAAQ,EAAE,OAAO;gBACjB,IAAI,EAAE,4BAA4B;gBAClC,OAAO,EAAE,eAAe,QAAQ,wCAAwC;aACzE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"} |
| /** | ||
| * Structured error types for agenv. | ||
| * | ||
| * All user-facing errors should extend AgenvError so the CLI | ||
| * can render friendly messages and set correct exit codes. | ||
| */ | ||
| export declare class AgenvError extends Error { | ||
| readonly code: string; | ||
| constructor(code: string, message: string); | ||
| } | ||
| export declare class ManifestNotFoundError extends AgenvError { | ||
| constructor(path: string); | ||
| } | ||
| export declare class ManifestValidationError extends AgenvError { | ||
| readonly details: string[]; | ||
| constructor(details: string[]); | ||
| } | ||
| export declare class WriteConflictError extends AgenvError { | ||
| readonly filePath: string; | ||
| constructor(filePath: string); | ||
| } | ||
| export declare class InvalidOptionError extends AgenvError { | ||
| readonly option: string; | ||
| readonly allowed: readonly string[]; | ||
| constructor(option: string, value: string, allowed: readonly string[]); | ||
| } | ||
| export declare class BackupError extends AgenvError { | ||
| constructor(filePath: string, reason: string); | ||
| } | ||
| export declare function isAgenvError(error: unknown): error is AgenvError; |
| /** | ||
| * Structured error types for agenv. | ||
| * | ||
| * All user-facing errors should extend AgenvError so the CLI | ||
| * can render friendly messages and set correct exit codes. | ||
| */ | ||
| export class AgenvError extends Error { | ||
| code; | ||
| constructor(code, message) { | ||
| super(message); | ||
| this.name = "AgenvError"; | ||
| this.code = code; | ||
| } | ||
| } | ||
| export class ManifestNotFoundError extends AgenvError { | ||
| constructor(path) { | ||
| super("MANIFEST_NOT_FOUND", `No manifest found at ${path}. Run "agenv init" first.`); | ||
| this.name = "ManifestNotFoundError"; | ||
| } | ||
| } | ||
| export class ManifestValidationError extends AgenvError { | ||
| details; | ||
| constructor(details) { | ||
| super("MANIFEST_INVALID", `Manifest validation failed:\n${details.map((d) => ` - ${d}`).join("\n")}`); | ||
| this.name = "ManifestValidationError"; | ||
| this.details = details; | ||
| } | ||
| } | ||
| export class WriteConflictError extends AgenvError { | ||
| filePath; | ||
| constructor(filePath) { | ||
| super("WRITE_CONFLICT", `File "${filePath}" was modified outside agenv and cannot be safely overwritten. Use --force to overwrite.`); | ||
| this.name = "WriteConflictError"; | ||
| this.filePath = filePath; | ||
| } | ||
| } | ||
| export class InvalidOptionError extends AgenvError { | ||
| option; | ||
| allowed; | ||
| constructor(option, value, allowed) { | ||
| super("INVALID_OPTION", `Invalid value "${value}" for ${option}. Allowed: ${allowed.join(", ")}.`); | ||
| this.name = "InvalidOptionError"; | ||
| this.option = option; | ||
| this.allowed = allowed; | ||
| } | ||
| } | ||
| export class BackupError extends AgenvError { | ||
| constructor(filePath, reason) { | ||
| super("BACKUP_FAILED", `Failed to create backup of "${filePath}": ${reason}`); | ||
| this.name = "BackupError"; | ||
| } | ||
| } | ||
| export function isAgenvError(error) { | ||
| return error instanceof AgenvError; | ||
| } | ||
| //# sourceMappingURL=errors.js.map |
| {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,OAAO,UAAW,SAAQ,KAAK;IAC1B,IAAI,CAAS;IAEtB,YAAY,IAAY,EAAE,OAAe;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED,MAAM,OAAO,qBAAsB,SAAQ,UAAU;IACnD,YAAY,IAAY;QACtB,KAAK,CAAC,oBAAoB,EAAE,wBAAwB,IAAI,2BAA2B,CAAC,CAAC;QACrF,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AAED,MAAM,OAAO,uBAAwB,SAAQ,UAA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AC"} |
| export declare const CURRENT_SCHEMA_VERSION = "1"; | ||
| /** | ||
| * Apply any needed migrations to bring a raw manifest up to the current schema version. | ||
| * Returns the (possibly migrated) data. Throws if the version is unrecognized or | ||
| * newer than the current version. | ||
| */ | ||
| export declare function migrateManifest(data: unknown): Record<string, unknown>; |
| import { isRecord } from "../utils/json.js"; | ||
| import { ManifestValidationError } from "../errors.js"; | ||
| export const CURRENT_SCHEMA_VERSION = "1"; | ||
| /** | ||
| * Registry of schema migrations. Each migration transforms from one version to the next. | ||
| * Add new migrations here as the schema evolves. | ||
| * | ||
| * Example for a future v1 → v2 migration: | ||
| * | ||
| * { from: "1", to: "2", migrate: (data) => { ... return transformed; } } | ||
| */ | ||
| const MIGRATIONS = []; | ||
| function getSchemaVersion(data) { | ||
| if (isRecord(data) && typeof data["schemaVersion"] === "string") { | ||
| return data["schemaVersion"]; | ||
| } | ||
| return undefined; | ||
| } | ||
| /** | ||
| * Apply any needed migrations to bring a raw manifest up to the current schema version. | ||
| * Returns the (possibly migrated) data. Throws if the version is unrecognized or | ||
| * newer than the current version. | ||
| */ | ||
| export function migrateManifest(data) { | ||
| if (!isRecord(data)) { | ||
| throw new ManifestValidationError(["Manifest must be a JSON object."]); | ||
| } | ||
| const version = getSchemaVersion(data); | ||
| if (version === undefined) { | ||
| // No schemaVersion field — treat as current version | ||
| return { ...data, schemaVersion: CURRENT_SCHEMA_VERSION }; | ||
| } | ||
| if (version === CURRENT_SCHEMA_VERSION) { | ||
| return data; | ||
| } | ||
| // Check if the version is newer than what we support | ||
| const versionNum = Number(version); | ||
| const currentNum = Number(CURRENT_SCHEMA_VERSION); | ||
| if (!Number.isNaN(versionNum) && !Number.isNaN(currentNum) && versionNum > currentNum) { | ||
| throw new ManifestValidationError([ | ||
| `Manifest schema version "${version}" is newer than the supported version "${CURRENT_SCHEMA_VERSION}". Please upgrade agenv.`, | ||
| ]); | ||
| } | ||
| // Apply migrations in sequence | ||
| let current = { ...data }; | ||
| let currentVersion = version; | ||
| for (const migration of MIGRATIONS) { | ||
| if (migration.from === currentVersion) { | ||
| current = migration.migrate(current); | ||
| currentVersion = migration.to; | ||
| } | ||
| } | ||
| if (currentVersion !== CURRENT_SCHEMA_VERSION) { | ||
| throw new ManifestValidationError([ | ||
| `No migration path from schema version "${version}" to "${CURRENT_SCHEMA_VERSION}".`, | ||
| ]); | ||
| } | ||
| return current; | ||
| } | ||
| //# sourceMappingURL=migrate.js.map |
| {"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/manifest/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAQ1C;;;;;;;GAOG;AACH,MAAM,UAAU,GAAgB,EAAE,CAAC;AAEnC,SAAS,gBAAgB,CAAC,IAAa;IACrC,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,QAAQ,EAAE,CAAC;QAChE,OAAO,IAAI,CAAC,eAAe,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAAa;IAC3C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,uBAAuB,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAEvC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,oDAAoD;QACpD,OAAO,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,sBAAsB,EAAE,CAAC;IAC5D,CAAC;IAED,IAAI,OAAO,KAAK,sBAAsB,EAAE,CAAC;QACvC,OAAO,IAA+B,CAAC;IACzC,CAAC;IAED,qDAAqD;IACrD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;IAElD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,UAAU,GAAG,UAAU,EAAE,CAAC;QACtF,MAAM,IAAI,uBAAuB,CAAC;YAChC,4BAA4B,OAAO,0CAA0C,sBAAsB,0BAA0B;SAC9H,CAAC,CAAC;IACL,CAAC;IAED,+BAA+B;IAC/B,IAAI,OAAO,GAAG,EAAE,GAAI,IAAgC,EAAE,CAAC;IACvD,IAAI,cAAc,GAAG,OAAO,CAAC;IAE7B,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,SAAS,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;YACtC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACrC,cAAc,GAAG,SAAS,CAAC,EAAE,CAAC;QAChC,CAAC;IACH,CAAC;IAED,IAAI,cAAc,KAAK,sBAAsB,EAAE,CAAC;QAC9C,MAAM,IAAI,uBAAuB,CAAC;YAChC,0CAA0C,OAAO,SAAS,sBAAsB,IAAI;SACrF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"} |
| export type TrustLevel = "safe" | "review" | "dangerous"; | ||
| export type McpPresetCategory = "code" | "data" | "search" | "productivity" | "utility"; | ||
| export type McpPreset = { | ||
| id: string; | ||
| name: string; | ||
| description: string; | ||
| category: McpPresetCategory; | ||
| command: string; | ||
| args: string[]; | ||
| env: Record<string, string>; | ||
| trustLevel: TrustLevel; | ||
| }; | ||
| export declare const MCP_PRESETS: McpPreset[]; | ||
| export declare const VALID_PRESET_IDS: string[]; | ||
| export declare function getPresetById(id: string): McpPreset | undefined; | ||
| export declare function getPresetsByCategory(category: McpPresetCategory): McpPreset[]; | ||
| export declare function validatePresetIds(ids: string[]): { | ||
| valid: string[]; | ||
| invalid: string[]; | ||
| }; |
| export const MCP_PRESETS = [ | ||
| { | ||
| id: "github", | ||
| name: "GitHub", | ||
| description: "Read and write GitHub repos, issues, and pull requests.", | ||
| category: "code", | ||
| command: "npx", | ||
| args: ["-y", "@modelcontextprotocol/server-github"], | ||
| env: { | ||
| GITHUB_TOKEN: "${GITHUB_TOKEN}", | ||
| }, | ||
| trustLevel: "review", | ||
| }, | ||
| { | ||
| id: "filesystem", | ||
| name: "Filesystem", | ||
| description: "Read and write files on the local filesystem.", | ||
| category: "utility", | ||
| command: "npx", | ||
| args: ["-y", "@modelcontextprotocol/server-filesystem", "."], | ||
| env: {}, | ||
| trustLevel: "dangerous", | ||
| }, | ||
| { | ||
| id: "postgres", | ||
| name: "Postgres", | ||
| description: "Query and inspect a PostgreSQL database.", | ||
| category: "data", | ||
| command: "npx", | ||
| args: ["-y", "@modelcontextprotocol/server-postgres"], | ||
| env: { | ||
| POSTGRES_URL: "${POSTGRES_URL}", | ||
| }, | ||
| trustLevel: "review", | ||
| }, | ||
| { | ||
| id: "sqlite", | ||
| name: "SQLite", | ||
| description: "Query and inspect a local SQLite database.", | ||
| category: "data", | ||
| command: "npx", | ||
| args: ["-y", "@modelcontextprotocol/server-sqlite", "--db-path", "./local.db"], | ||
| env: {}, | ||
| trustLevel: "review", | ||
| }, | ||
| { | ||
| id: "brave-search", | ||
| name: "Brave Search", | ||
| description: "Perform web searches using the Brave Search API.", | ||
| category: "search", | ||
| command: "npx", | ||
| args: ["-y", "@modelcontextprotocol/server-brave-search"], | ||
| env: { | ||
| BRAVE_API_KEY: "${BRAVE_API_KEY}", | ||
| }, | ||
| trustLevel: "safe", | ||
| }, | ||
| { | ||
| id: "memory", | ||
| name: "Memory", | ||
| description: "Persistent key-value memory for cross-session context.", | ||
| category: "utility", | ||
| command: "npx", | ||
| args: ["-y", "@modelcontextprotocol/server-memory"], | ||
| env: {}, | ||
| trustLevel: "safe", | ||
| }, | ||
| { | ||
| id: "fetch", | ||
| name: "Fetch", | ||
| description: "Make HTTP requests to external URLs.", | ||
| category: "utility", | ||
| command: "npx", | ||
| args: ["-y", "@modelcontextprotocol/server-fetch"], | ||
| env: {}, | ||
| trustLevel: "review", | ||
| }, | ||
| { | ||
| id: "slack", | ||
| name: "Slack", | ||
| description: "Read and write Slack messages and channels.", | ||
| category: "productivity", | ||
| command: "npx", | ||
| args: ["-y", "@modelcontextprotocol/server-slack"], | ||
| env: { | ||
| SLACK_BOT_TOKEN: "${SLACK_BOT_TOKEN}", | ||
| SLACK_TEAM_ID: "${SLACK_TEAM_ID}", | ||
| }, | ||
| trustLevel: "review", | ||
| }, | ||
| { | ||
| id: "linear", | ||
| name: "Linear", | ||
| description: "Manage Linear issues, cycles, and projects.", | ||
| category: "productivity", | ||
| command: "npx", | ||
| args: ["-y", "@linear/mcp-server"], | ||
| env: { | ||
| LINEAR_API_KEY: "${LINEAR_API_KEY}", | ||
| }, | ||
| trustLevel: "review", | ||
| }, | ||
| { | ||
| id: "sentry", | ||
| name: "Sentry", | ||
| description: "Query Sentry errors, events, and project data.", | ||
| category: "code", | ||
| command: "npx", | ||
| args: ["-y", "@sentry/mcp-server"], | ||
| env: { | ||
| SENTRY_AUTH_TOKEN: "${SENTRY_AUTH_TOKEN}", | ||
| SENTRY_ORG: "${SENTRY_ORG}", | ||
| }, | ||
| trustLevel: "safe", | ||
| }, | ||
| { | ||
| id: "notion", | ||
| name: "Notion", | ||
| description: "Read and write Notion pages, databases, and blocks.", | ||
| category: "productivity", | ||
| command: "npx", | ||
| args: ["-y", "@notionhq/notion-mcp-server"], | ||
| env: { | ||
| NOTION_API_KEY: "${NOTION_API_KEY}", | ||
| }, | ||
| trustLevel: "safe", | ||
| }, | ||
| { | ||
| id: "stripe", | ||
| name: "Stripe", | ||
| description: "Manage Stripe customers, invoices, products, and payments.", | ||
| category: "productivity", | ||
| command: "npx", | ||
| args: ["-y", "@stripe/mcp-server", "--tools=all"], | ||
| env: { | ||
| STRIPE_SECRET_KEY: "${STRIPE_SECRET_KEY}", | ||
| }, | ||
| trustLevel: "review", | ||
| }, | ||
| { | ||
| id: "atlassian", | ||
| name: "Atlassian", | ||
| description: "Read and write Jira issues, Confluence pages, and project data.", | ||
| category: "productivity", | ||
| command: "npx", | ||
| args: ["-y", "@atlassian/mcp-server"], | ||
| env: { | ||
| ATLASSIAN_API_TOKEN: "${ATLASSIAN_API_TOKEN}", | ||
| ATLASSIAN_EMAIL: "${ATLASSIAN_EMAIL}", | ||
| ATLASSIAN_BASE_URL: "${ATLASSIAN_BASE_URL}", | ||
| }, | ||
| trustLevel: "review", | ||
| }, | ||
| { | ||
| id: "puppeteer", | ||
| name: "Puppeteer", | ||
| description: "Control a headless browser for scraping, screenshots, and automation.", | ||
| category: "utility", | ||
| command: "npx", | ||
| args: ["-y", "@modelcontextprotocol/server-puppeteer"], | ||
| env: {}, | ||
| trustLevel: "dangerous", | ||
| }, | ||
| { | ||
| id: "sequential-thinking", | ||
| name: "Sequential Thinking", | ||
| description: "Enable structured, multi-step reasoning for complex problem solving.", | ||
| category: "utility", | ||
| command: "npx", | ||
| args: ["-y", "@modelcontextprotocol/server-sequential-thinking"], | ||
| env: {}, | ||
| trustLevel: "safe", | ||
| }, | ||
| ]; | ||
| export const VALID_PRESET_IDS = MCP_PRESETS.map((p) => p.id); | ||
| export function getPresetById(id) { | ||
| return MCP_PRESETS.find((p) => p.id === id); | ||
| } | ||
| export function getPresetsByCategory(category) { | ||
| return MCP_PRESETS.filter((p) => p.category === category); | ||
| } | ||
| export function validatePresetIds(ids) { | ||
| const valid = ids.filter((id) => VALID_PRESET_IDS.includes(id)); | ||
| const invalid = ids.filter((id) => !VALID_PRESET_IDS.includes(id)); | ||
| return { valid, invalid }; | ||
| } | ||
| //# sourceMappingURL=presets.js.map |
| {"version":3,"file":"presets.js","sourceRoot":"","sources":["../../src/mcp/presets.ts"],"names":[],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AE,qBAAqB;QACzB,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,sEAAsE;QACnF,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,kDAAkD,CAAC;QAChE,GAAG,EAAE,EAAE;QACP,UAAU,EAAE,MAAM;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAE7D,MAAM,UAAU,aAAa,CAAC,EAAU;IACtC,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,QAA2B;IAC9D,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,GAAa;IAC7C,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IAChE,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IACnE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC5B,CAAC"} |
| export type PromptTemplateDefinition = { | ||
| title: string; | ||
| goal: string; | ||
| useWhen: string; | ||
| focusAreas: string[]; | ||
| deliverables: string[]; | ||
| }; | ||
| export type { ProjectType } from "../manifest/schema.js"; | ||
| import type { ProjectType } from "../manifest/schema.js"; | ||
| export declare function getPromptTemplateKeysForType(type: ProjectType): string[]; | ||
| export declare const PROMPT_TEMPLATE_DEFINITIONS: Record<string, PromptTemplateDefinition>; |
| import { getPromptPacksForType } from "../planner/output-map.js"; | ||
| export function getPromptTemplateKeysForType(type) { | ||
| return getPromptPacksForType(type); | ||
| } | ||
| export const PROMPT_TEMPLATE_DEFINITIONS = { | ||
| "build-page-shell": { | ||
| title: "Build Page Shell", | ||
| goal: "Create or refine a durable page shell with clear layout structure, route-level organization, and responsive behavior.", | ||
| useWhen: "Use this when a route needs the overall frame, header, navigation, spacing system, and page-level loading or empty states.", | ||
| focusAreas: [ | ||
| "Define the route-level structure and the main content regions before filling in detailed widgets.", | ||
| "Make navigation, titles, actions, and responsive breakpoints feel intentional instead of incidental.", | ||
| "Keep loading, empty, and error states visible at the page-shell level where they affect the whole experience.", | ||
| ], | ||
| deliverables: [ | ||
| "The page shell implementation and any supporting layout components.", | ||
| "A short summary of the structure decisions, responsive behavior, and state handling.", | ||
| "Any follow-up gaps or risks that still need product or design input.", | ||
| ], | ||
| }, | ||
| "build-data-table": { | ||
| title: "Build Data Table", | ||
| goal: "Implement a production-ready data table with clear columns, sorting, filtering, pagination, and state handling.", | ||
| useWhen: "Use this when a page needs dense data presentation, list management, or admin workflows driven by tabular data.", | ||
| focusAreas: [ | ||
| "Model the columns, row actions, empty states, and loading behavior around the real user task.", | ||
| "Keep filtering, sorting, and pagination predictable and easy to reason about.", | ||
| "Preserve accessibility, keyboard behavior, and legibility for dense information.", | ||
| ], | ||
| deliverables: [ | ||
| "The table implementation, helpers, and any state wiring required to support it.", | ||
| "A note describing how sorting, filtering, pagination, and row actions behave.", | ||
| "Tests or verification steps covering the most failure-prone table interactions.", | ||
| ], | ||
| }, | ||
| "build-filter-panel": { | ||
| title: "Build Filter Panel", | ||
| goal: "Build a filter panel or filter bar that makes narrowing results fast, understandable, and reversible.", | ||
| useWhen: "Use this when users need to refine lists, charts, dashboards, or search results with multiple controls.", | ||
| focusAreas: [ | ||
| "Choose controls that fit the data shape and are easy to reset or inspect at a glance.", | ||
| "Keep filter state synchronized with the page state, URL state, or request state as appropriate.", | ||
| "Make the active filter set visible so users understand why results changed.", | ||
| ], | ||
| deliverables: [ | ||
| "The filter UI and any associated state/query integration.", | ||
| "A summary of how filter state is initialized, applied, cleared, and persisted.", | ||
| "Verification that empty, loading, and no-match states remain understandable with filters applied.", | ||
| ], | ||
| }, | ||
| "build-kpi-cards": { | ||
| title: "Build KPI Cards", | ||
| goal: "Create KPI or summary cards that surface the most important metrics clearly and credibly.", | ||
| useWhen: "Use this when a page needs top-level metrics, health indicators, or summary snapshots before deeper detail.", | ||
| focusAreas: [ | ||
| "Prioritize the metrics, labels, trends, and comparisons that help users orient quickly.", | ||
| "Handle loading, stale data, missing values, and surprising values without visual confusion.", | ||
| "Keep the card hierarchy readable on both wide and narrow screens.", | ||
| ], | ||
| deliverables: [ | ||
| "The KPI card components and the data formatting needed to support them.", | ||
| "A short explanation of metric hierarchy, trend treatment, and fallback behavior.", | ||
| "Verification that cards remain legible and accurate across representative states.", | ||
| ], | ||
| }, | ||
| "build-chart-section": { | ||
| title: "Build Chart Section", | ||
| goal: "Implement a chart section that turns data into a readable story without sacrificing accuracy or usability.", | ||
| useWhen: "Use this when the page needs trends, comparisons, distributions, or time-series views supported by charts.", | ||
| focusAreas: [ | ||
| "Choose chart types, labels, legends, and supporting context that match the data question being answered.", | ||
| "Make edge cases explicit, including empty data, partial ranges, and suspicious outliers.", | ||
| "Pair the chart with surrounding copy or summary context so users can interpret it quickly.", | ||
| ], | ||
| deliverables: [ | ||
| "The chart section implementation with any data adapters or formatting helpers it needs.", | ||
| "A brief note explaining the chart choice, axis treatment, and edge-case handling.", | ||
| "Verification that the chart stays readable and accessible across screen sizes and states.", | ||
| ], | ||
| }, | ||
| "connect-api-resource": { | ||
| title: "Connect API Resource", | ||
| goal: "Wire a UI surface to an API resource with strong typing, state handling, and clear failure behavior.", | ||
| useWhen: "Use this when you need to fetch, mutate, cache, or normalize data from an API or backend resource.", | ||
| focusAreas: [ | ||
| "Keep request state explicit and typed, including loading, empty, success, stale, and error states.", | ||
| "Separate transport concerns from UI concerns so components stay easier to test and maintain.", | ||
| "Make retry behavior, optimistic updates, and error boundaries deliberate instead of accidental.", | ||
| ], | ||
| deliverables: [ | ||
| "The resource integration code plus the UI wiring that consumes it.", | ||
| "A summary of data flow, caching or invalidation behavior, and failure handling.", | ||
| "Tests or verification steps for the most important success and failure paths.", | ||
| ], | ||
| }, | ||
| "build-form-flow": { | ||
| title: "Build Form Flow", | ||
| goal: "Implement a form flow with clear validation, submission states, and user guidance from start to finish.", | ||
| useWhen: "Use this when the work involves data entry, editing, onboarding, configuration, or multi-step submission flows.", | ||
| focusAreas: [ | ||
| "Design the field structure, validation, and submission lifecycle around the real user journey.", | ||
| "Keep errors actionable and in-context, especially for async validation or server responses.", | ||
| "Ensure the form remains usable with keyboard navigation, screen readers, and narrow viewports.", | ||
| ], | ||
| deliverables: [ | ||
| "The form implementation, validation schema or rules, and submission handling.", | ||
| "A short summary of validation behavior, success handling, and failure recovery.", | ||
| "Verification that the form behaves correctly across happy path, invalid input, and submission failure cases.", | ||
| ], | ||
| }, | ||
| "handle-loading-empty-error-states": { | ||
| title: "Handle Loading, Empty, and Error States", | ||
| goal: "Design and implement resilient loading, empty, and error states so the experience stays understandable under real-world data conditions.", | ||
| useWhen: "Use this when a feature is functionally complete on the happy path but still feels fragile, confusing, or incomplete around asynchronous states and failures.", | ||
| focusAreas: [ | ||
| "Audit the user journey for loading, empty, partial, stale, retry, and failure states instead of only the success state.", | ||
| "Make fallback UI informative enough that users understand what happened and what they can do next.", | ||
| "Keep state handling consistent across page-level and component-level boundaries so the UI does not contradict itself.", | ||
| ], | ||
| deliverables: [ | ||
| "The UI and state-handling changes needed to cover loading, empty, and error scenarios properly.", | ||
| "A short summary of which edge states were added or improved and why.", | ||
| "Verification that the feature remains understandable across representative failure and no-data conditions.", | ||
| ], | ||
| }, | ||
| "enforce-accessibility-and-responsive-layout": { | ||
| title: "Enforce Accessibility and Responsive Layout", | ||
| goal: "Refine the implementation so accessibility, keyboard support, semantics, and responsive behavior are built into the feature rather than added as an afterthought.", | ||
| useWhen: "Use this when a UI surface is implemented but still needs a structured pass for accessibility quality, semantic clarity, and device responsiveness.", | ||
| focusAreas: [ | ||
| "Review headings, landmarks, labels, focus order, and keyboard interaction before treating the UI as complete.", | ||
| "Check how layout, density, spacing, and overflow behave across narrow, medium, and wide screens.", | ||
| "Prefer adjustments that improve both usability and maintainability instead of layering one-off fixes on top.", | ||
| ], | ||
| deliverables: [ | ||
| "The accessibility and responsive-layout improvements required for the feature.", | ||
| "A short note describing the key improvements and any remaining accessibility risks.", | ||
| "Verification steps covering keyboard behavior, semantics, and responsive layout expectations.", | ||
| ], | ||
| }, | ||
| "write-dashboard-tests": { | ||
| title: "Write Feature Tests", | ||
| goal: "Add focused automated tests that prove the implementation works across the most important user flows and failure paths.", | ||
| useWhen: "Use this when the implementation exists but confidence is still too dependent on manual checking or the happy path only.", | ||
| focusAreas: [ | ||
| "Choose the test level that best matches the behavior under risk instead of defaulting blindly to unit or integration tests.", | ||
| "Cover realistic user-visible outcomes, including loading, empty, error, validation, or permission-sensitive behavior where relevant.", | ||
| "Keep the tests readable enough that future contributors can understand what behavior is protected.", | ||
| ], | ||
| deliverables: [ | ||
| "Automated tests that protect the highest-risk behavior in the feature.", | ||
| "A brief summary of what the new tests cover and what they intentionally do not cover yet.", | ||
| "Notes on any remaining blind spots that still need manual verification or future coverage.", | ||
| ], | ||
| }, | ||
| "ui-builder": { | ||
| title: "UI Builder", | ||
| goal: "Design and implement cohesive UI structure that feels intentional, consistent, and maintainable.", | ||
| useWhen: "Use this when the task spans multiple components, layout decisions, or visual hierarchy choices.", | ||
| focusAreas: [ | ||
| "Work from page structure and information hierarchy down to component detail.", | ||
| "Reuse existing patterns or design-system primitives before inventing new ones.", | ||
| "Keep implementation readable so future UI changes do not require large rewrites.", | ||
| ], | ||
| deliverables: [ | ||
| "The relevant UI implementation and any shared components needed to support it.", | ||
| "A summary of the composition decisions and reused patterns.", | ||
| "Notes on any assumptions, tradeoffs, or visual follow-ups still needed.", | ||
| ], | ||
| }, | ||
| "data-integrator": { | ||
| title: "Data Integrator", | ||
| goal: "Connect application state, API resources, and presentation components into a stable user-facing flow.", | ||
| useWhen: "Use this when the work crosses fetch logic, transformation, UI binding, and state synchronization boundaries.", | ||
| focusAreas: [ | ||
| "Trace the data flow end to end before changing component behavior.", | ||
| "Keep transformation logic explicit so mismatches between backend data and UI state are easy to debug.", | ||
| "Make loading, error, and stale-data transitions predictable across the whole flow.", | ||
| ], | ||
| deliverables: [ | ||
| "The data integration changes across fetch, transform, and UI layers.", | ||
| "A short explanation of state boundaries and data ownership.", | ||
| "Verification steps that prove the integrated flow works across realistic scenarios.", | ||
| ], | ||
| }, | ||
| "table-specialist": { | ||
| title: "Table Specialist", | ||
| goal: "Refine tabular workflows for clarity, speed, and robustness in dense data experiences.", | ||
| useWhen: "Use this when the table is the main working surface and needs careful attention to interactions and edge cases.", | ||
| focusAreas: [ | ||
| "Optimize discoverability of sorting, filtering, row actions, and bulk actions.", | ||
| "Protect usability in dense states with long text, many columns, or mixed row states.", | ||
| "Keep implementation modular enough to evolve without turning the table into a monolith.", | ||
| ], | ||
| deliverables: [ | ||
| "Improvements to the table surface and its supporting interaction model.", | ||
| "A summary of the interaction model and the edge cases it now covers.", | ||
| "Verification that the table remains predictable under realistic heavy-use scenarios.", | ||
| ], | ||
| }, | ||
| "chart-specialist": { | ||
| title: "Chart Specialist", | ||
| goal: "Refine charts and surrounding data presentation so they are both analytically useful and easy to read.", | ||
| useWhen: "Use this when data visualization is central to the task and chart quality matters as much as raw implementation.", | ||
| focusAreas: [ | ||
| "Tune chart semantics, labels, legends, and supporting UI for the actual user question.", | ||
| "Avoid visual noise and misleading encodings when data is sparse, skewed, or incomplete.", | ||
| "Make sure the chart section still communicates the right story without hover interactions.", | ||
| ], | ||
| deliverables: [ | ||
| "The chart refinements and any supporting copy, formatting, or data-shaping changes.", | ||
| "A note describing why the chosen visualization is a fit for the data.", | ||
| "Verification that the visualization remains understandable across common edge cases.", | ||
| ], | ||
| }, | ||
| "form-builder": { | ||
| title: "Form Builder", | ||
| goal: "Build reliable forms that are easy to complete, validate, and recover from when something goes wrong.", | ||
| useWhen: "Use this when forms are the primary interaction surface and need thoughtful UX plus dependable implementation.", | ||
| focusAreas: [ | ||
| "Reduce ambiguity in labels, defaults, validation, and confirmation states.", | ||
| "Treat async submission and server-side validation as first-class concerns.", | ||
| "Keep forms composable so later edits do not require rewriting the entire flow.", | ||
| ], | ||
| deliverables: [ | ||
| "The form flow implementation and any supporting abstractions required to keep it maintainable.", | ||
| "A brief summary of validation, error handling, and success feedback decisions.", | ||
| "Verification steps covering both user-facing UX and implementation correctness.", | ||
| ], | ||
| }, | ||
| "qa-reviewer": { | ||
| title: "QA Reviewer", | ||
| goal: "Review an implementation for regressions, missing states, and quality gaps before it moves on.", | ||
| useWhen: "Use this when a feature is implemented and needs a structured pass for bugs, edge cases, and verification coverage.", | ||
| focusAreas: [ | ||
| "Look for behavior regressions, missing states, accessibility gaps, and weak error handling first.", | ||
| "Review the code path against realistic user flows, not just the happy path.", | ||
| "Call out concrete follow-up checks or tests when risk remains.", | ||
| ], | ||
| deliverables: [ | ||
| "A concise review summary ordered by the most important findings first.", | ||
| "Clear notes on missing tests, residual risks, or behavior that still needs manual verification.", | ||
| "If no issues are found, an explicit statement that the pass was clean plus any remaining blind spots.", | ||
| ], | ||
| }, | ||
| // --- Web-App Skills --- | ||
| "build-page-layout": { | ||
| title: "Build Page Layout", | ||
| goal: "Create a durable page layout with clear content regions, responsive breakpoints, and consistent navigation.", | ||
| useWhen: "Use this when a route needs structure, content areas, header/footer, and responsive behavior.", | ||
| focusAreas: [ | ||
| "Define the primary content regions and navigation areas before adding page-specific detail.", | ||
| "Make responsive breakpoints and spacing intentional rather than compensatory.", | ||
| "Ensure page-level loading, empty, and error states are handled at the layout boundary.", | ||
| ], | ||
| deliverables: [ | ||
| "The page layout implementation and any supporting layout components.", | ||
| "A short summary of the structure decisions, responsive behavior, and state handling.", | ||
| "Any follow-up gaps or risks that still need product or design input.", | ||
| ], | ||
| }, | ||
| "build-navigation": { | ||
| title: "Build Navigation", | ||
| goal: "Build navigation (sidebar, top bar, breadcrumbs) with active-state tracking and responsive collapse.", | ||
| useWhen: "Use this when the app needs primary and secondary navigation patterns.", | ||
| focusAreas: [ | ||
| "Make active states, route transitions, and nested navigation predictable and visually clear.", | ||
| "Handle mobile/responsive collapse without hiding critical navigation from users.", | ||
| "Keep navigation accessible with keyboard support and correct ARIA roles.", | ||
| ], | ||
| deliverables: [ | ||
| "The navigation implementation with active-state tracking and responsive behavior.", | ||
| "A short summary of the routing integration and state decisions.", | ||
| "Verification that keyboard navigation and screen reader semantics work correctly.", | ||
| ], | ||
| }, | ||
| "build-auth-flow": { | ||
| title: "Build Auth Flow", | ||
| goal: "Implement sign-in, sign-up, password reset, and session management flows.", | ||
| useWhen: "Use this when the app requires user authentication.", | ||
| focusAreas: [ | ||
| "Treat auth state as a first-class concern — make login, logout, and session expiry explicit.", | ||
| "Protect routes and data behind appropriate guards rather than relying on UI hiding.", | ||
| "Keep error messages informative for users but non-leaking about system internals.", | ||
| ], | ||
| deliverables: [ | ||
| "The auth flow implementation including sign-in, sign-up, and session handling.", | ||
| "A summary of token storage, session lifecycle, and route guard behavior.", | ||
| "Tests covering login success, invalid credentials, and session expiry scenarios.", | ||
| ], | ||
| }, | ||
| "build-state-management": { | ||
| title: "Build State Management", | ||
| goal: "Set up application state management with clear ownership boundaries.", | ||
| useWhen: "Use this when the app has shared state that crosses component boundaries.", | ||
| focusAreas: [ | ||
| "Establish clear boundaries between server state, UI state, and form state.", | ||
| "Avoid over-engineering — only lift state as high as necessary.", | ||
| "Document ownership and update patterns so future contributors understand the state model.", | ||
| ], | ||
| deliverables: [ | ||
| "The state management setup with clearly defined ownership boundaries.", | ||
| "A summary of what lives in global state vs. local component state.", | ||
| "Verification that state updates are predictable and side-effect-free.", | ||
| ], | ||
| }, | ||
| "build-api-integration": { | ||
| title: "Build API Integration", | ||
| goal: "Connect the frontend to API endpoints with typed responses, caching, and error handling.", | ||
| useWhen: "Use this when a feature needs to fetch or mutate remote data.", | ||
| focusAreas: [ | ||
| "Keep request state typed and explicit — loading, success, error, and stale states all matter.", | ||
| "Separate transport concerns from UI concerns so components stay testable.", | ||
| "Make retry, optimistic updates, and error recovery deliberate choices not accidental behavior.", | ||
| ], | ||
| deliverables: [ | ||
| "The API integration code and the UI wiring that consumes it.", | ||
| "A summary of data flow, caching or invalidation behavior, and failure handling.", | ||
| "Tests for the most important success and failure paths.", | ||
| ], | ||
| }, | ||
| "implement-routing": { | ||
| title: "Implement Routing", | ||
| goal: "Configure client-side routing with lazy loading, guards, and nested layouts.", | ||
| useWhen: "Use this when the app needs URL-driven navigation with route-level code splitting.", | ||
| focusAreas: [ | ||
| "Keep route definitions centralized and easy to reason about at a glance.", | ||
| "Apply lazy loading at route boundaries to reduce initial bundle size.", | ||
| "Protect authenticated routes with explicit guards rather than relying on UI hiding.", | ||
| ], | ||
| deliverables: [ | ||
| "The routing configuration with lazy loading and route guards in place.", | ||
| "A summary of the route tree, protected routes, and code-splitting strategy.", | ||
| "Verification that navigation, deep links, and protected routes behave correctly.", | ||
| ], | ||
| }, | ||
| "write-web-app-tests": { | ||
| title: "Write Web App Tests", | ||
| goal: "Write focused tests for user flows, component behavior, and integration with API boundaries.", | ||
| useWhen: "Use this when a feature needs automated test coverage.", | ||
| focusAreas: [ | ||
| "Choose test level based on the risk being protected — unit, integration, or end-to-end.", | ||
| "Cover user-visible behavior including loading, error, and edge-case states.", | ||
| "Keep tests readable enough for future contributors to understand what is protected.", | ||
| ], | ||
| deliverables: [ | ||
| "Automated tests protecting the highest-risk behavior in the feature.", | ||
| "A summary of what the tests cover and what is intentionally deferred.", | ||
| "Notes on remaining blind spots that still need manual verification.", | ||
| ], | ||
| }, | ||
| // --- API-Service Skills --- | ||
| "design-api-endpoints": { | ||
| title: "Design API Endpoints", | ||
| goal: "Design RESTful or GraphQL endpoints with clear resource naming, status codes, and response shapes.", | ||
| useWhen: "Use this when a new resource or capability needs an API surface.", | ||
| focusAreas: [ | ||
| "Model resources and actions around the consumer's mental model, not the database schema.", | ||
| "Use standard HTTP semantics for methods, idempotency, and status codes.", | ||
| "Define error shapes upfront so consumers can handle failures predictably.", | ||
| ], | ||
| deliverables: [ | ||
| "The endpoint design with resource names, HTTP methods, status codes, and response shapes.", | ||
| "A brief note on versioning strategy, pagination, and filtering conventions.", | ||
| "Any open questions about consumer requirements or backward-compatibility constraints.", | ||
| ], | ||
| }, | ||
| "build-request-validation": { | ||
| title: "Build Request Validation", | ||
| goal: "Implement schema-based request validation at the handler boundary.", | ||
| useWhen: "Use this when incoming requests need input validation before processing.", | ||
| focusAreas: [ | ||
| "Validate all external inputs at the handler boundary before passing them to service functions.", | ||
| "Return clear, structured validation errors that help consumers fix their requests.", | ||
| "Keep validation schemas as the single source of truth for request shape.", | ||
| ], | ||
| deliverables: [ | ||
| "The validation schema and handler-level integration.", | ||
| "A summary of validated fields, constraints, and error response format.", | ||
| "Tests verifying that invalid inputs are rejected with correct error shapes.", | ||
| ], | ||
| }, | ||
| "build-database-layer": { | ||
| title: "Build Database Layer", | ||
| goal: "Build data access with typed queries, migrations, and connection management.", | ||
| useWhen: "Use this when a feature needs database reads, writes, or schema changes.", | ||
| focusAreas: [ | ||
| "Keep database access behind typed repository or service functions — avoid raw queries in controllers.", | ||
| "Write migrations that are safe to run forward and easy to reason about when things go wrong.", | ||
| "Handle connection errors, timeouts, and transaction boundaries explicitly.", | ||
| ], | ||
| deliverables: [ | ||
| "The data access implementation and any schema migrations required.", | ||
| "A summary of the query patterns, transaction strategy, and migration approach.", | ||
| "Tests covering the most critical read and write paths.", | ||
| ], | ||
| }, | ||
| "build-auth-middleware": { | ||
| title: "Build Auth Middleware", | ||
| goal: "Implement authentication and authorization middleware with token validation.", | ||
| useWhen: "Use this when endpoints need to verify identity or check permissions.", | ||
| focusAreas: [ | ||
| "Validate tokens at the middleware boundary, not inside service functions.", | ||
| "Return standard 401 and 403 responses without leaking internal error details.", | ||
| "Make permission checks explicit and testable rather than buried in business logic.", | ||
| ], | ||
| deliverables: [ | ||
| "The authentication and authorization middleware with token validation.", | ||
| "A summary of the auth model, token format, and permission checking strategy.", | ||
| "Tests covering valid tokens, expired tokens, and unauthorized access scenarios.", | ||
| ], | ||
| }, | ||
| "build-error-handling": { | ||
| title: "Build Error Handling", | ||
| goal: "Build consistent error response shapes, status code mapping, and error logging.", | ||
| useWhen: "Use this when the service needs structured error handling across all endpoints.", | ||
| focusAreas: [ | ||
| "Establish a consistent error response shape used across all endpoints.", | ||
| "Map internal error types to appropriate HTTP status codes without leaking internals.", | ||
| "Log errors with enough context to diagnose production issues without exposing sensitive data.", | ||
| ], | ||
| deliverables: [ | ||
| "The error handling middleware and error type definitions.", | ||
| "A summary of error classification, status code mappings, and logging strategy.", | ||
| "Tests verifying error responses across common failure scenarios.", | ||
| ], | ||
| }, | ||
| "implement-logging": { | ||
| title: "Implement Logging", | ||
| goal: "Set up structured logging with request context, correlation IDs, and appropriate log levels.", | ||
| useWhen: "Use this when the service needs observable request/response logging.", | ||
| focusAreas: [ | ||
| "Attach correlation IDs to every request so logs can be traced across services.", | ||
| "Use structured log format (JSON) with consistent field names for tooling compatibility.", | ||
| "Set log levels appropriately — avoid logging sensitive data in any environment.", | ||
| ], | ||
| deliverables: [ | ||
| "The logging setup with structured output and request context propagation.", | ||
| "A summary of log levels used, fields logged, and correlation ID strategy.", | ||
| "Verification that logs are emitted correctly in local and deployed environments.", | ||
| ], | ||
| }, | ||
| "write-api-tests": { | ||
| title: "Write API Tests", | ||
| goal: "Write integration and unit tests for handlers, services, and middleware.", | ||
| useWhen: "Use this when API endpoints need automated test coverage.", | ||
| focusAreas: [ | ||
| "Test at the handler level for realistic coverage of the full request/response cycle.", | ||
| "Cover validation failures, auth errors, service errors, and edge-case inputs.", | ||
| "Keep tests isolated from external dependencies using mocks or test databases.", | ||
| ], | ||
| deliverables: [ | ||
| "Automated tests for the highest-risk handlers, services, and middleware.", | ||
| "A summary of what the test suite covers and what is still manual.", | ||
| "Notes on test isolation strategy and any required test infrastructure.", | ||
| ], | ||
| }, | ||
| "build-background-jobs": { | ||
| title: "Build Background Jobs", | ||
| goal: "Implement background job processing with retry semantics and failure handling.", | ||
| useWhen: "Use this when work needs to happen outside the request/response cycle.", | ||
| focusAreas: [ | ||
| "Make job definitions, retry policies, and failure handling explicit and observable.", | ||
| "Avoid tight coupling between the API layer and job processing internals.", | ||
| "Ensure jobs are idempotent so retries do not cause duplicate side effects.", | ||
| ], | ||
| deliverables: [ | ||
| "The job implementation with retry logic and failure handling.", | ||
| "A summary of the job queue setup, retry strategy, and observability approach.", | ||
| "Tests verifying retry behavior and failure scenarios.", | ||
| ], | ||
| }, | ||
| "configure-deployment": { | ||
| title: "Configure Deployment", | ||
| goal: "Set up deployment configuration (Dockerfile, CI, health checks, env management).", | ||
| useWhen: "Use this when the service needs deployment automation.", | ||
| focusAreas: [ | ||
| "Keep the Dockerfile minimal and production-safe — no dev dependencies or secrets in the image.", | ||
| "Set up health check endpoints that reflect real service readiness, not just process liveness.", | ||
| "Manage environment variables through the deployment environment, not hardcoded values.", | ||
| ], | ||
| deliverables: [ | ||
| "The Dockerfile, CI config, and health check implementation.", | ||
| "A summary of environment variable strategy, build steps, and health check behavior.", | ||
| "Verified that the container builds, starts, and passes health checks in a clean environment.", | ||
| ], | ||
| }, | ||
| "document-api": { | ||
| title: "Document API", | ||
| goal: "Generate or write API documentation with examples, authentication notes, and error catalogs.", | ||
| useWhen: "Use this when the API needs consumer-facing documentation.", | ||
| focusAreas: [ | ||
| "Document every public endpoint with request shape, response shape, and example payloads.", | ||
| "Include authentication requirements and error codes prominently so consumers can handle failures.", | ||
| "Keep documentation versioned and co-located with the code so it stays accurate.", | ||
| ], | ||
| deliverables: [ | ||
| "The API documentation covering endpoints, authentication, and error reference.", | ||
| "A summary of the documentation format and update workflow.", | ||
| "Notes on any undocumented edge cases or known gaps.", | ||
| ], | ||
| }, | ||
| // --- Web-App Agents --- | ||
| "state-architect": { | ||
| title: "State Architect", | ||
| goal: "Design and manage application state architecture including global, route, and component state.", | ||
| useWhen: "Use this when state ownership is unclear, contested, or causing bugs across components.", | ||
| focusAreas: [ | ||
| "Map state ownership clearly — what is global, what is route-scoped, what is local.", | ||
| "Design state transitions so they are predictable, testable, and easy to debug.", | ||
| "Identify and eliminate redundant state that creates synchronization problems.", | ||
| ], | ||
| deliverables: [ | ||
| "A state architecture design with clear ownership boundaries.", | ||
| "Any refactoring needed to align the current implementation with the design.", | ||
| "Documentation of state ownership decisions for future contributors.", | ||
| ], | ||
| }, | ||
| "api-integrator": { | ||
| title: "API Integrator", | ||
| goal: "Connect frontend components to API endpoints with proper error handling and loading states.", | ||
| useWhen: "Use this when the work involves connecting UI to remote data with reliability and type safety.", | ||
| focusAreas: [ | ||
| "Trace the data flow from fetch through transform to presentation before changing anything.", | ||
| "Keep request state typed and all async transitions explicit.", | ||
| "Make retry, caching, and invalidation decisions deliberate rather than default.", | ||
| ], | ||
| deliverables: [ | ||
| "The API integration layer and the UI components wired to it.", | ||
| "A summary of caching strategy, error handling, and loading state behavior.", | ||
| "Verification steps for the critical data-flow paths.", | ||
| ], | ||
| }, | ||
| "auth-specialist": { | ||
| title: "Auth Specialist", | ||
| goal: "Implement and review authentication and authorization flows across the application.", | ||
| useWhen: "Use this when auth flows need to be built or audited for correctness and security.", | ||
| focusAreas: [ | ||
| "Verify that token handling, session lifecycle, and logout flows are secure and complete.", | ||
| "Check that route guards protect all sensitive surfaces consistently.", | ||
| "Review for common auth pitfalls: token leakage, missing expiry handling, and insecure redirects.", | ||
| ], | ||
| deliverables: [ | ||
| "The auth implementation or audit findings, prioritized by risk.", | ||
| "A summary of the token strategy, session lifecycle, and guard coverage.", | ||
| "Tests or verification steps for the most critical auth paths.", | ||
| ], | ||
| }, | ||
| "test-writer": { | ||
| title: "Test Writer", | ||
| goal: "Write and maintain automated tests that protect critical user flows and edge cases.", | ||
| useWhen: "Use this when the implementation exists but test coverage is insufficient or fragile.", | ||
| focusAreas: [ | ||
| "Identify the highest-risk behavior and write tests that would catch regressions there first.", | ||
| "Cover realistic user-visible outcomes across happy path, error, and edge cases.", | ||
| "Keep tests maintainable — avoid brittle assertions that break on unrelated changes.", | ||
| ], | ||
| deliverables: [ | ||
| "Automated tests for the highest-risk behavior in the feature.", | ||
| "A summary of coverage decisions and known gaps.", | ||
| "Notes on test infrastructure or CI integration needed to run them reliably.", | ||
| ], | ||
| }, | ||
| // --- API-Service Agents --- | ||
| "api-designer": { | ||
| title: "API Designer", | ||
| goal: "Design API resources, endpoints, and contracts that are consistent and easy to consume.", | ||
| useWhen: "Use this when new API surfaces need to be designed or existing ones need to be reviewed for consistency.", | ||
| focusAreas: [ | ||
| "Apply consistent resource naming, HTTP semantics, and response shapes across all endpoints.", | ||
| "Design for the consumer's mental model rather than the implementation's convenience.", | ||
| "Make versioning, pagination, filtering, and error shapes explicit from the start.", | ||
| ], | ||
| deliverables: [ | ||
| "The API contract definition with resource shapes, endpoints, and error catalog.", | ||
| "A summary of design decisions and any tradeoffs made for backward compatibility.", | ||
| "Open questions that need consumer input before implementation.", | ||
| ], | ||
| }, | ||
| "data-layer-builder": { | ||
| title: "Data Layer Builder", | ||
| goal: "Build and optimize the data access layer including queries, migrations, and connection pooling.", | ||
| useWhen: "Use this when the data access layer needs to be built, optimized, or made type-safe.", | ||
| focusAreas: [ | ||
| "Keep data access behind typed abstractions that hide raw database details.", | ||
| "Write migrations with forward-and-backward safety in mind.", | ||
| "Profile query performance for any operation that touches large tables or complex joins.", | ||
| ], | ||
| deliverables: [ | ||
| "The data access implementation with typed queries and migrations.", | ||
| "A summary of the query patterns, index strategy, and migration approach.", | ||
| "Performance verification for the most critical read and write paths.", | ||
| ], | ||
| }, | ||
| "error-handler": { | ||
| title: "Error Handler", | ||
| goal: "Design and implement error handling strategies across the service.", | ||
| useWhen: "Use this when error handling is inconsistent, leaky, or missing across the service boundaries.", | ||
| focusAreas: [ | ||
| "Classify errors by type — validation, auth, not-found, internal — and map each to the right HTTP status.", | ||
| "Prevent internal error details from leaking in API responses.", | ||
| "Ensure errors are logged with enough context to diagnose production failures.", | ||
| ], | ||
| deliverables: [ | ||
| "The error handling implementation with consistent response shapes.", | ||
| "A summary of error classification, status code conventions, and logging strategy.", | ||
| "Tests verifying that each error class produces the correct response.", | ||
| ], | ||
| }, | ||
| "devops-reviewer": { | ||
| title: "DevOps Reviewer", | ||
| goal: "Review infrastructure, deployment config, and observability setups for production readiness.", | ||
| useWhen: "Use this when a service is approaching deployment and needs an infrastructure and observability review.", | ||
| focusAreas: [ | ||
| "Check that Dockerfiles, CI pipelines, and health checks reflect production requirements.", | ||
| "Verify that environment variable management, secrets handling, and logging are production-safe.", | ||
| "Look for missing alerting, monitoring hooks, or observability gaps that would make incidents hard to diagnose.", | ||
| ], | ||
| deliverables: [ | ||
| "A review summary of infrastructure, deployment, and observability findings prioritized by risk.", | ||
| "Concrete recommendations for any gaps found.", | ||
| "A checklist of items to verify before the next deployment.", | ||
| ], | ||
| }, | ||
| // --- Full-Stack Skills --- | ||
| "write-full-stack-tests": { | ||
| title: "Write Full-Stack Tests", | ||
| goal: "Write tests that cover both frontend behavior and backend API contracts end to end.", | ||
| useWhen: "Use this when a feature spans the frontend and backend and needs confident coverage across both layers.", | ||
| focusAreas: [ | ||
| "Test frontend components at the integration level against mocked or real API responses.", | ||
| "Test backend handlers for correct request validation, business logic, and error responses.", | ||
| "Add end-to-end tests for the most critical user flows when confidence requires it.", | ||
| ], | ||
| deliverables: [ | ||
| "Tests covering the highest-risk paths across both frontend and backend.", | ||
| "A summary of the layered test strategy and what each layer protects.", | ||
| "Notes on any gaps intentionally left for future coverage.", | ||
| ], | ||
| }, | ||
| // --- Library Skills --- | ||
| "design-public-api": { | ||
| title: "Design Public API", | ||
| goal: "Design a minimal, stable public API surface that is easy to use and hard to misuse.", | ||
| useWhen: "Use this when defining the exports, types, and contract of a library module.", | ||
| focusAreas: [ | ||
| "Expose only what consumers genuinely need — every extra export is a future maintenance burden.", | ||
| "Name exports after the consumer's intent, not the implementation detail.", | ||
| "Document breaking-change boundaries so semver decisions are straightforward.", | ||
| ], | ||
| deliverables: [ | ||
| "The public API surface definition including exported types, functions, and constants.", | ||
| "A short rationale for what was included, excluded, and why.", | ||
| "Notes on semver implications and backward-compatibility constraints.", | ||
| ], | ||
| }, | ||
| "write-library-tests": { | ||
| title: "Write Library Tests", | ||
| goal: "Write tests that protect the public API contract and the most critical internal logic.", | ||
| useWhen: "Use this when a library module needs confident automated coverage.", | ||
| focusAreas: [ | ||
| "Test the public API as a consumer would use it — not implementation internals.", | ||
| "Cover edge cases in input types, optional parameters, and error paths.", | ||
| "Keep tests independent of build tooling so they remain stable across bundler changes.", | ||
| ], | ||
| deliverables: [ | ||
| "Tests protecting the most important public API behaviors.", | ||
| "A summary of covered behaviors and known gaps.", | ||
| "Notes on test isolation and any required environment setup.", | ||
| ], | ||
| }, | ||
| "build-tree-shakeable-exports": { | ||
| title: "Build Tree-shakeable Exports", | ||
| goal: "Structure module exports so consumers only pay for what they import.", | ||
| useWhen: "Use this when the library has multiple entry points or exports that should be individually tree-shakeable.", | ||
| focusAreas: [ | ||
| "Use named exports and avoid side effects at module top level.", | ||
| "Define entry points in package.json exports map to match the tree-shaking boundary.", | ||
| "Verify with a bundle analysis tool that unused exports are eliminated.", | ||
| ], | ||
| deliverables: [ | ||
| "The refactored exports and updated package.json exports map.", | ||
| "A bundle analysis showing tree-shaking is working as intended.", | ||
| "Notes on any exports that cannot be tree-shaken and why.", | ||
| ], | ||
| }, | ||
| "generate-typedoc": { | ||
| title: "Generate TypeDoc", | ||
| goal: "Set up TypeDoc to generate accurate, navigable API documentation from JSDoc comments.", | ||
| useWhen: "Use this when the library needs generated API reference documentation.", | ||
| focusAreas: [ | ||
| "Ensure all public symbols have JSDoc comments that TypeDoc can render meaningfully.", | ||
| "Configure TypeDoc entry points and output to match the published package structure.", | ||
| "Add documentation generation to the build or CI workflow so it stays current.", | ||
| ], | ||
| deliverables: [ | ||
| "TypeDoc configuration and any JSDoc improvements needed for clean output.", | ||
| "Generated documentation verifying that all public symbols are documented.", | ||
| "CI or build integration keeping docs in sync with the codebase.", | ||
| ], | ||
| }, | ||
| "configure-build": { | ||
| title: "Configure Build", | ||
| goal: "Set up the bundler to produce clean, correctly typed build artifacts ready for publishing.", | ||
| useWhen: "Use this when the library build pipeline needs to be created or significantly improved.", | ||
| focusAreas: [ | ||
| "Produce both ESM and CJS outputs unless there is a clear reason not to.", | ||
| "Generate accurate `.d.ts` declaration files alongside each output format.", | ||
| "Keep sourcemaps and package.json exports map aligned with the output structure.", | ||
| ], | ||
| deliverables: [ | ||
| "The build configuration producing ESM, CJS, and type declarations.", | ||
| "A verification that the published package resolves correctly in both ESM and CJS consumers.", | ||
| "Notes on any intentional tradeoffs in the output format or target support.", | ||
| ], | ||
| }, | ||
| // --- CLI-Tool Skills --- | ||
| "design-commands": { | ||
| title: "Design Commands", | ||
| goal: "Design a CLI command surface that is intuitive, consistent, and self-documenting.", | ||
| useWhen: "Use this when defining or refactoring the CLI's command structure and UX.", | ||
| focusAreas: [ | ||
| "Model commands after user tasks, not internal code structure.", | ||
| "Use consistent naming conventions for commands, subcommands, flags, and args.", | ||
| "Make --help output informative enough that users rarely need to consult external docs.", | ||
| ], | ||
| deliverables: [ | ||
| "The CLI command design with names, flags, args, and help text.", | ||
| "A summary of UX decisions and deferred options.", | ||
| "Notes on backward-compatibility constraints if commands already exist.", | ||
| ], | ||
| }, | ||
| "build-arg-parsing": { | ||
| title: "Build Arg Parsing", | ||
| goal: "Implement argument parsing that handles flags, positional args, and validation cleanly.", | ||
| useWhen: "Use this when adding new commands or improving the reliability of existing argument handling.", | ||
| focusAreas: [ | ||
| "Validate inputs early and produce clear error messages for invalid or missing arguments.", | ||
| "Keep argument parsing logic separate from command business logic.", | ||
| "Use typed argument definitions so invalid inputs are caught at parse time, not runtime.", | ||
| ], | ||
| deliverables: [ | ||
| "The argument parsing implementation with typed definitions and validation.", | ||
| "Tests covering valid input, missing required args, and invalid flag values.", | ||
| "A short note on the parsing library choices and any constraints they impose.", | ||
| ], | ||
| }, | ||
| "implement-config-file": { | ||
| title: "Implement Config File", | ||
| goal: "Add support for a project-level config file that controls CLI behavior without flags.", | ||
| useWhen: "Use this when the CLI needs persistent or project-scoped configuration.", | ||
| focusAreas: [ | ||
| "Support standard config file locations (project root, home directory) with a clear priority order.", | ||
| "Validate config file contents on load and produce actionable errors for invalid values.", | ||
| "Keep the config schema versioned so future changes are backward-compatible.", | ||
| ], | ||
| deliverables: [ | ||
| "The config file loader, schema, and merge logic with flag overrides.", | ||
| "Tests verifying config loading, validation, and flag precedence.", | ||
| "Documentation of supported config keys and their default values.", | ||
| ], | ||
| }, | ||
| "write-cli-tests": { | ||
| title: "Write CLI Tests", | ||
| goal: "Write tests that exercise CLI commands programmatically without spawning subprocesses.", | ||
| useWhen: "Use this when CLI commands need automated coverage.", | ||
| focusAreas: [ | ||
| "Test command handlers as functions with injected dependencies rather than spawned processes.", | ||
| "Cover argument validation, happy paths, error paths, and edge-case inputs.", | ||
| "Keep tests fast and free of I/O side effects by mocking filesystem and network calls.", | ||
| ], | ||
| deliverables: [ | ||
| "Tests for the highest-risk CLI commands and argument paths.", | ||
| "A summary of the test strategy and mocking approach.", | ||
| "Notes on any commands that are harder to test and why.", | ||
| ], | ||
| }, | ||
| "configure-package-bin": { | ||
| title: "Configure Package Bin", | ||
| goal: "Set up package.json bin entries so the CLI is installable and runnable as expected.", | ||
| useWhen: "Use this when preparing the CLI for npm publishing or global installation.", | ||
| focusAreas: [ | ||
| "Ensure the bin script has a correct shebang and is executable.", | ||
| "Align bin name, package name, and command names so installation is predictable.", | ||
| "Test the installed CLI in a clean environment before publishing.", | ||
| ], | ||
| deliverables: [ | ||
| "The updated package.json bin config and bin entry script.", | ||
| "Verification that the CLI installs and runs correctly in a clean environment.", | ||
| "Notes on versioning, scoped package names, and any OS-specific concerns.", | ||
| ], | ||
| }, | ||
| // --- Mobile Skills --- | ||
| "build-screen-layout": { | ||
| title: "Build Screen Layout", | ||
| goal: "Create a screen layout with clear content regions, safe-area handling, and keyboard-aware behavior.", | ||
| useWhen: "Use this when a screen needs structured layout, safe area insets, and device-aware behavior.", | ||
| focusAreas: [ | ||
| "Handle safe area insets and notch layouts for both iOS and Android.", | ||
| "Make the layout keyboard-aware so inputs are not obscured when the keyboard opens.", | ||
| "Keep layout components focused so screens remain easy to compose and test.", | ||
| ], | ||
| deliverables: [ | ||
| "The screen layout implementation with safe-area and keyboard handling.", | ||
| "A short summary of the layout regions, scroll behavior, and device edge cases.", | ||
| "Verification on both iOS and Android form factors.", | ||
| ], | ||
| }, | ||
| "build-navigation-stack": { | ||
| title: "Build Navigation Stack", | ||
| goal: "Set up the navigation stack with typed routes, transitions, and deep-link support.", | ||
| useWhen: "Use this when the app needs screen-to-screen navigation with back behavior and deep links.", | ||
| focusAreas: [ | ||
| "Define a typed route tree so navigation calls are checked at compile time.", | ||
| "Handle back gestures and hardware back button consistently across platforms.", | ||
| "Set up deep-link handling for any routes that need to be reachable from external URLs.", | ||
| ], | ||
| deliverables: [ | ||
| "The navigation stack configuration with typed routes and deep-link support.", | ||
| "A summary of the route tree, transition behavior, and auth guard integration.", | ||
| "Verification that navigation, back behavior, and deep links work on both platforms.", | ||
| ], | ||
| }, | ||
| "write-mobile-tests": { | ||
| title: "Write Mobile Tests", | ||
| goal: "Write tests for mobile screens, components, and service integrations.", | ||
| useWhen: "Use this when mobile features need automated coverage.", | ||
| focusAreas: [ | ||
| "Test screens and components using React Native Testing Library for user-facing behavior.", | ||
| "Mock native modules and device APIs to keep tests fast and cross-platform.", | ||
| "Cover navigation, auth, and API integration paths that are most likely to regress.", | ||
| ], | ||
| deliverables: [ | ||
| "Tests protecting the most important screen behaviors and service integrations.", | ||
| "A summary of test coverage and mocking strategy.", | ||
| "Notes on any gaps that require device or emulator testing.", | ||
| ], | ||
| }, | ||
| // --- New Agents --- | ||
| "docs-writer": { | ||
| title: "Docs Writer", | ||
| goal: "Write and maintain technical documentation that is accurate, well-structured, and easy to navigate.", | ||
| useWhen: "Use this when a library or API needs consumer-facing documentation.", | ||
| focusAreas: [ | ||
| "Organize docs around the reader's use cases, not the implementation structure.", | ||
| "Keep code examples runnable and co-located with explanations.", | ||
| "Update docs as part of the same PR as the feature or API change.", | ||
| ], | ||
| deliverables: [ | ||
| "The documentation covering the public API, usage examples, and known limitations.", | ||
| "A summary of what was added, removed, or restructured.", | ||
| "Notes on any documentation gaps that still need input from product or design.", | ||
| ], | ||
| }, | ||
| "cli-designer": { | ||
| title: "CLI Designer", | ||
| goal: "Design CLI command surfaces that are intuitive, consistent, and aligned with user intent.", | ||
| useWhen: "Use this when the CLI needs new commands, a UX audit, or help text improvements.", | ||
| focusAreas: [ | ||
| "Model commands after user tasks, not internal code modules.", | ||
| "Apply consistent conventions for command names, flags, and argument shapes.", | ||
| "Make error messages and --help output actionable without requiring documentation.", | ||
| ], | ||
| deliverables: [ | ||
| "The CLI design decisions including command names, flags, and help text.", | ||
| "A summary of UX tradeoffs and deferred features.", | ||
| "Notes on backward-compatibility constraints for any existing commands.", | ||
| ], | ||
| }, | ||
| }; | ||
| //# sourceMappingURL=prompt-templates.js.map |
| {"version":3,"file":"prompt-templates.js","sourceRoot":"","sources":["../../src/render/prompt-templates.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,MAAM,UAAU,4BAA4B,CAAC,IAAiB;IAC5D,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,MAAM,2BAA2B,GAA6C;IACnF,kBAAkB,EAAE;QAClB,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,uHAAuH;QAC7H,OAAO,EAAE,4HAA4H;QACrI,UAAU,EAAE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C7D,6EAA6E;YAC7E,mFAAmF;SACpF;QACD,YAAY,EAAE;YACZ,yEAAyE;YACzE,kDAAkD;YAClD,wEAAwE;SACzE;KACF;CACF,CAAC"} |
@@ -19,14 +19,357 @@ import { formatJson } from "../../utils/json.js"; | ||
| } | ||
| function describeProjectType(manifest) { | ||
| if (manifest.project.type === "web-app") | ||
| return "web application"; | ||
| if (manifest.project.type === "api-service") | ||
| return "API service"; | ||
| if (manifest.project.type === "full-stack") | ||
| return "full-stack application"; | ||
| if (manifest.project.type === "library") | ||
| return "library"; | ||
| if (manifest.project.type === "cli-tool") | ||
| return "CLI tool"; | ||
| if (manifest.project.type === "mobile") | ||
| return "mobile application"; | ||
| return "dashboard"; | ||
| } | ||
| function renderReadme(manifest) { | ||
| const enabledTargets = Object.entries(manifest.targets) | ||
| .filter(([, enabled]) => enabled) | ||
| .map(([target]) => target); | ||
| const sections = [ | ||
| `# Claude Workspace`, | ||
| ``, | ||
| `## Project`, | ||
| ``, | ||
| `- **Name:** ${manifest.project.name}`, | ||
| `- **Type:** ${describeProjectType(manifest)}`, | ||
| `- **Framework:** ${manifest.project.framework}`, | ||
| `- **Language:** TypeScript`, | ||
| `- **Targets:** ${enabledTargets.join(", ")}`, | ||
| ``, | ||
| ]; | ||
| if (manifest.conventions.accessibility || manifest.conventions.responsive) { | ||
| sections.push(`## Conventions`, ``); | ||
| if (manifest.conventions.accessibility) { | ||
| sections.push(`- Accessibility is required. Use semantic HTML and ARIA attributes.`); | ||
| } | ||
| if (manifest.conventions.responsive) { | ||
| sections.push(`- Responsive layouts are required.`); | ||
| } | ||
| if (manifest.conventions.authModel && manifest.conventions.authModel !== "none") { | ||
| sections.push(`- Auth model: ${manifest.conventions.authModel}`); | ||
| } | ||
| sections.push(``); | ||
| } | ||
| sections.push(`## Coding Style`, ``, ...manifest.instructions.codingStyle.map((rule) => `- ${rule}`), ``, `## Review Rules`, ``, ...manifest.instructions.reviewRules.map((rule) => `- ${rule}`), ``); | ||
| if (manifest.generated.skills || manifest.generated.agents) { | ||
| sections.push(`## Workspace Structure`, ``); | ||
| if (manifest.generated.skills) { | ||
| sections.push(`- \`skills/\` — Reusable skill files for specialized implementation tasks.`); | ||
| } | ||
| if (manifest.generated.agents) { | ||
| sections.push(`- \`agents/\` — Agent definitions for delegated, role-based work.`); | ||
| } | ||
| sections.push(``); | ||
| } | ||
| return `${sections.join("\n")}\n`; | ||
| } | ||
| const SKILL_DESCRIPTIONS = { | ||
| "build-page-shell": { | ||
| goal: "Create or refine a page shell with layout structure, route-level organization, and responsive behavior.", | ||
| when: "a route needs the overall frame, header, navigation, and page-level loading/empty states.", | ||
| }, | ||
| "build-data-table": { | ||
| goal: "Build a data table with sorting, filtering, pagination, and accessible keyboard navigation.", | ||
| when: "the page needs a structured data grid with interactive column behavior.", | ||
| }, | ||
| "build-filter-panel": { | ||
| goal: "Build a filter panel that coordinates with data views and preserves state across navigation.", | ||
| when: "users need to narrow results by multiple criteria.", | ||
| }, | ||
| "build-kpi-cards": { | ||
| goal: "Build KPI cards that display metrics with loading, error, and empty states.", | ||
| when: "the page needs a quick summary of key metrics.", | ||
| }, | ||
| "build-chart-section": { | ||
| goal: "Build a chart section with proper data transformation, responsive sizing, and accessibility labels.", | ||
| when: "the page needs visual data representation.", | ||
| }, | ||
| "connect-api-resource": { | ||
| goal: "Connect a UI view to an API resource with proper loading, caching, error handling, and retry logic.", | ||
| when: "a component needs to fetch, display, and manage remote data.", | ||
| }, | ||
| "build-form-flow": { | ||
| goal: "Build a form with validation, error display, submission handling, and success/failure states.", | ||
| when: "users need to create or edit structured data.", | ||
| }, | ||
| "handle-loading-empty-error-states": { | ||
| goal: "Audit and implement loading, empty, partial, stale, retry, and failure states across the user journey.", | ||
| when: "a feature has async data and needs robust state handling.", | ||
| }, | ||
| "enforce-accessibility-and-responsive-layout": { | ||
| goal: "Audit and fix accessibility and responsive layout issues.", | ||
| when: "a feature needs to pass accessibility review or support multiple viewports.", | ||
| }, | ||
| "write-dashboard-tests": { | ||
| goal: "Write unit and integration tests for dashboard components and data flows.", | ||
| when: "a feature needs test coverage for interactions, data loading, and edge cases.", | ||
| }, | ||
| // --- Web-App Skills --- | ||
| "build-page-layout": { | ||
| goal: "Create a durable page layout with clear content regions, responsive breakpoints, and consistent navigation.", | ||
| when: "a route needs structure, content areas, header/footer, and responsive behavior.", | ||
| }, | ||
| "build-navigation": { | ||
| goal: "Build navigation (sidebar, top bar, breadcrumbs) with active-state tracking and responsive collapse.", | ||
| when: "the app needs primary and secondary navigation patterns.", | ||
| }, | ||
| "build-auth-flow": { | ||
| goal: "Implement sign-in, sign-up, password reset, and session management flows.", | ||
| when: "the app requires user authentication.", | ||
| }, | ||
| "build-state-management": { | ||
| goal: "Set up application state management with clear ownership boundaries.", | ||
| when: "the app has shared state that crosses component boundaries.", | ||
| }, | ||
| "build-api-integration": { | ||
| goal: "Connect the frontend to API endpoints with typed responses, caching, and error handling.", | ||
| when: "a feature needs to fetch or mutate remote data.", | ||
| }, | ||
| "implement-routing": { | ||
| goal: "Configure client-side routing with lazy loading, guards, and nested layouts.", | ||
| when: "the app needs URL-driven navigation with route-level code splitting.", | ||
| }, | ||
| "write-web-app-tests": { | ||
| goal: "Write focused tests for user flows, component behavior, and integration with API boundaries.", | ||
| when: "a feature needs automated test coverage.", | ||
| }, | ||
| // --- API-Service Skills --- | ||
| "design-api-endpoints": { | ||
| goal: "Design RESTful or GraphQL endpoints with clear resource naming, status codes, and response shapes.", | ||
| when: "a new resource or capability needs an API surface.", | ||
| }, | ||
| "build-request-validation": { | ||
| goal: "Implement schema-based request validation at the handler boundary.", | ||
| when: "incoming requests need input validation before processing.", | ||
| }, | ||
| "build-database-layer": { | ||
| goal: "Build data access with typed queries, migrations, and connection management.", | ||
| when: "a feature needs database reads, writes, or schema changes.", | ||
| }, | ||
| "build-auth-middleware": { | ||
| goal: "Implement authentication and authorization middleware with token validation.", | ||
| when: "endpoints need to verify identity or check permissions.", | ||
| }, | ||
| "build-error-handling": { | ||
| goal: "Build consistent error response shapes, status code mapping, and error logging.", | ||
| when: "the service needs structured error handling across all endpoints.", | ||
| }, | ||
| "implement-logging": { | ||
| goal: "Set up structured logging with request context, correlation IDs, and appropriate log levels.", | ||
| when: "the service needs observable request/response logging.", | ||
| }, | ||
| "write-api-tests": { | ||
| goal: "Write integration and unit tests for handlers, services, and middleware.", | ||
| when: "API endpoints need automated test coverage.", | ||
| }, | ||
| "build-background-jobs": { | ||
| goal: "Implement background job processing with retry semantics and failure handling.", | ||
| when: "work needs to happen outside the request/response cycle.", | ||
| }, | ||
| "configure-deployment": { | ||
| goal: "Set up deployment configuration (Dockerfile, CI, health checks, env management).", | ||
| when: "the service needs deployment automation.", | ||
| }, | ||
| "document-api": { | ||
| goal: "Generate or write API documentation with examples, authentication notes, and error catalogs.", | ||
| when: "the API needs consumer-facing documentation.", | ||
| }, | ||
| // --- Full-Stack Skills --- | ||
| "write-full-stack-tests": { | ||
| goal: "Write tests that cover both frontend behavior and backend API contracts end to end.", | ||
| when: "a feature spans the frontend and backend and needs confident coverage across both layers.", | ||
| }, | ||
| // --- Library Skills --- | ||
| "design-public-api": { | ||
| goal: "Design a minimal, stable public API surface that is easy to use and hard to misuse.", | ||
| when: "defining the exports, types, and contract of a library module.", | ||
| }, | ||
| "write-library-tests": { | ||
| goal: "Write tests that protect the public API contract and the most critical internal logic.", | ||
| when: "a library module needs confident automated coverage.", | ||
| }, | ||
| "build-tree-shakeable-exports": { | ||
| goal: "Structure module exports so consumers only pay for what they import.", | ||
| when: "the library has multiple entry points or exports that should be individually tree-shakeable.", | ||
| }, | ||
| "generate-typedoc": { | ||
| goal: "Set up TypeDoc to generate accurate, navigable API documentation from JSDoc comments.", | ||
| when: "the library needs generated API reference documentation.", | ||
| }, | ||
| "configure-build": { | ||
| goal: "Set up the bundler to produce clean, correctly typed build artifacts ready for publishing.", | ||
| when: "the library build pipeline needs to be created or significantly improved.", | ||
| }, | ||
| // --- CLI-Tool Skills --- | ||
| "design-commands": { | ||
| goal: "Design a CLI command surface that is intuitive, consistent, and self-documenting.", | ||
| when: "defining or refactoring the CLI command structure and UX.", | ||
| }, | ||
| "build-arg-parsing": { | ||
| goal: "Implement argument parsing that handles flags, positional args, and validation cleanly.", | ||
| when: "adding new commands or improving the reliability of existing argument handling.", | ||
| }, | ||
| "implement-config-file": { | ||
| goal: "Add support for a project-level config file that controls CLI behavior without flags.", | ||
| when: "the CLI needs persistent or project-scoped configuration.", | ||
| }, | ||
| "write-cli-tests": { | ||
| goal: "Write tests that exercise CLI commands programmatically without spawning subprocesses.", | ||
| when: "CLI commands need automated coverage.", | ||
| }, | ||
| "configure-package-bin": { | ||
| goal: "Set up package.json bin entries so the CLI is installable and runnable as expected.", | ||
| when: "preparing the CLI for npm publishing or global installation.", | ||
| }, | ||
| // --- Mobile Skills --- | ||
| "build-screen-layout": { | ||
| goal: "Create a screen layout with clear content regions, safe-area handling, and keyboard-aware behavior.", | ||
| when: "a screen needs structured layout, safe area insets, and device-aware behavior.", | ||
| }, | ||
| "build-navigation-stack": { | ||
| goal: "Set up the navigation stack with typed routes, transitions, and deep-link support.", | ||
| when: "the app needs screen-to-screen navigation with back behavior and deep links.", | ||
| }, | ||
| "write-mobile-tests": { | ||
| goal: "Write tests for mobile screens, components, and service integrations.", | ||
| when: "mobile features need automated coverage.", | ||
| }, | ||
| }; | ||
| const AGENT_DESCRIPTIONS = { | ||
| "ui-builder": { | ||
| role: "Build and refine UI components following the project's design system and conventions.", | ||
| focus: "Component structure, styling, responsive behavior, and accessibility.", | ||
| }, | ||
| "data-integrator": { | ||
| role: "Connect UI components to data sources with proper caching, error handling, and state management.", | ||
| focus: "API integration, data transformation, loading states, and cache invalidation.", | ||
| }, | ||
| "table-specialist": { | ||
| role: "Build and optimize data tables with sorting, filtering, pagination, and row interactions.", | ||
| focus: "Table performance, column configuration, virtualization, and keyboard navigation.", | ||
| }, | ||
| "chart-specialist": { | ||
| role: "Build charts and data visualizations with responsive sizing and accessible labels.", | ||
| focus: "Chart configuration, data transformation, tooltip behavior, and color accessibility.", | ||
| }, | ||
| "form-builder": { | ||
| role: "Build forms with schema-driven validation, error display, and multi-step flows.", | ||
| focus: "Validation rules, field dependencies, submission handling, and accessible error messaging.", | ||
| }, | ||
| "qa-reviewer": { | ||
| role: "Review code for correctness, accessibility, performance, and adherence to project conventions.", | ||
| focus: "Code review, test coverage gaps, edge-case identification, and documentation quality.", | ||
| }, | ||
| // --- Web-App Agents --- | ||
| "state-architect": { | ||
| role: "Design and manage application state architecture including global, route, and component state.", | ||
| focus: "State boundaries, data flow, caching strategy, and sync/async state transitions.", | ||
| }, | ||
| "api-integrator": { | ||
| role: "Connect frontend components to API endpoints with proper error handling and loading states.", | ||
| focus: "Data fetching patterns, response typing, cache invalidation, and offline resilience.", | ||
| }, | ||
| "auth-specialist": { | ||
| role: "Implement and review authentication and authorization flows across the application.", | ||
| focus: "Token management, session handling, route guards, and permission checks.", | ||
| }, | ||
| "test-writer": { | ||
| role: "Write and maintain automated tests that protect critical user flows and edge cases.", | ||
| focus: "Test strategy, coverage of failure paths, and integration with CI pipelines.", | ||
| }, | ||
| // --- API-Service Agents --- | ||
| "api-designer": { | ||
| role: "Design API resources, endpoints, and contracts that are consistent and easy to consume.", | ||
| focus: "Resource naming, HTTP semantics, versioning, pagination, and error shapes.", | ||
| }, | ||
| "data-layer-builder": { | ||
| role: "Build and optimize the data access layer including queries, migrations, and connection pooling.", | ||
| focus: "Query performance, schema design, type-safe data access, and migration safety.", | ||
| }, | ||
| "error-handler": { | ||
| role: "Design and implement error handling strategies across the service.", | ||
| focus: "Error classification, structured logging, user-facing vs internal errors, and retry policies.", | ||
| }, | ||
| "devops-reviewer": { | ||
| role: "Review infrastructure, deployment config, and observability setups for production readiness.", | ||
| focus: "Container config, health checks, logging, alerting, and environment management.", | ||
| }, | ||
| // --- Library / CLI / Mobile Agents --- | ||
| "docs-writer": { | ||
| role: "Write and maintain technical documentation including API references, guides, and examples.", | ||
| focus: "API docs, usage examples, changelog writing, and keeping docs in sync with code.", | ||
| }, | ||
| "cli-designer": { | ||
| role: "Design CLI command surfaces that are intuitive, consistent, and self-documenting.", | ||
| focus: "Command names, flag naming conventions, help text quality, and error messaging.", | ||
| }, | ||
| }; | ||
| const KNOWN_ACRONYMS = { qa: "QA", api: "API", ui: "UI" }; | ||
| function titleCase(token) { | ||
| return KNOWN_ACRONYMS[token.toLowerCase()] ?? `${token.charAt(0).toUpperCase()}${token.slice(1)}`; | ||
| } | ||
| function renderSkill(skillName, manifest) { | ||
| const desc = SKILL_DESCRIPTIONS[skillName]; | ||
| const title = skillName.split("-").map(titleCase).join(" "); | ||
| const sections = [ | ||
| `# ${title}`, | ||
| ``, | ||
| ...(desc | ||
| ? [`## Goal`, ``, desc.goal, ``, `## When to Use`, ``, `Use this skill when ${desc.when}`, ``] | ||
| : [`A reusable skill for ${manifest.project.name}.`, ``]), | ||
| `## Project Context`, | ||
| ``, | ||
| `- Framework: ${manifest.project.framework}`, | ||
| `- Project type: ${describeProjectType(manifest)}`, | ||
| ``, | ||
| `## Coding Style`, | ||
| ``, | ||
| ...manifest.instructions.codingStyle.map((rule) => `- ${rule}`), | ||
| ``, | ||
| ]; | ||
| return `${sections.join("\n")}\n`; | ||
| } | ||
| function renderAgent(agentName, manifest) { | ||
| const desc = AGENT_DESCRIPTIONS[agentName]; | ||
| const title = agentName.split("-").map(titleCase).join(" "); | ||
| const sections = [ | ||
| `# ${title}`, | ||
| ``, | ||
| ...(desc | ||
| ? [`## Role`, ``, desc.role, ``, `## Focus`, ``, desc.focus, ``] | ||
| : [`An agent for ${manifest.project.name}.`, ``]), | ||
| `## Project Context`, | ||
| ``, | ||
| `- Framework: ${manifest.project.framework}`, | ||
| `- Project type: ${describeProjectType(manifest)}`, | ||
| ``, | ||
| `## Review Rules`, | ||
| ``, | ||
| ...manifest.instructions.reviewRules.map((rule) => `- ${rule}`), | ||
| ``, | ||
| ]; | ||
| return `${sections.join("\n")}\n`; | ||
| } | ||
| function renderMarkdownForPath(file, manifest) { | ||
| if (file.path === ".claude/README.md") { | ||
| const projectLabel = manifest.project.type === "web-app" ? "web app" : "dashboard"; | ||
| return `# Claude Workspace\n\nGenerated by agenv.\n\nThis workspace is configured for a ${manifest.project.framework} ${projectLabel} project.\n`; | ||
| return renderReadme(manifest); | ||
| } | ||
| if (file.path.includes("/skills/")) { | ||
| const skillName = file.path.split("/").pop()?.replace(".md", "") ?? "skill"; | ||
| return `# ${skillName}\n\nGenerated skill scaffold for ${manifest.project.name}.\n`; | ||
| return renderSkill(skillName, manifest); | ||
| } | ||
| if (file.path.includes("/agents/")) { | ||
| const agentName = file.path.split("/").pop()?.replace(".md", "") ?? "agent"; | ||
| return `# ${agentName}\n\nGenerated agent scaffold for ${manifest.project.name}.\n`; | ||
| return renderAgent(agentName, manifest); | ||
| } | ||
@@ -33,0 +376,0 @@ return formatJson({ |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/claude/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,SAAS,QAAQ,CAAC,QAAkB;IAClC,OAAO;QACL,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM;QAClC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM;YAC7B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE;oBACE,QAAQ,EAAE,SAAS;oBACnB,IAAI,EAAE,wBAAwB;oBAC9B,OAAO,EAAE,oDAAoD;iBAC9D;aACF;KACN,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,SAAmB,EAAE,cAA8B;IAC/D,OAAO,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC;AACzE,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAiB,EAAE,QAAkB;IAClE,IAAI,IAAI,CAAC,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O,CAAC,IAAI;KAC/B,CAAC,CAAC;AACL,CAAC;AAED,SAAS,MAAM,CAAC,IAAiB,EAAE,QAAkB;IACnD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,OAAO,EAAE,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC;KAC/C,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,EAAE,EAAE,QAAQ;IACZ,QAAQ;IACR,IAAI;IACJ,MAAM;CACP,CAAC"} |
@@ -18,7 +18,99 @@ function supports(manifest) { | ||
| } | ||
| function describeProjectType(manifest) { | ||
| if (manifest.project.type === "web-app") | ||
| return "web application"; | ||
| if (manifest.project.type === "api-service") | ||
| return "API service"; | ||
| if (manifest.project.type === "full-stack") | ||
| return "full-stack application"; | ||
| if (manifest.project.type === "library") | ||
| return "library"; | ||
| if (manifest.project.type === "cli-tool") | ||
| return "CLI tool"; | ||
| if (manifest.project.type === "mobile") | ||
| return "mobile application"; | ||
| return "dashboard"; | ||
| } | ||
| function buildFrameworkSection(manifest) { | ||
| const lines = [`This is a ${manifest.project.framework} ${describeProjectType(manifest)} written in TypeScript.`]; | ||
| switch (manifest.project.framework) { | ||
| case "nextjs": | ||
| lines.push("Use the App Router and server components by default. Only add `\"use client\"` when the component needs interactivity or browser APIs.", "Keep data fetching in server components or route handlers. Avoid mixing client-side and server-side data loading in the same component.", "Use `next/image` for images and `next/link` for internal navigation."); | ||
| break; | ||
| case "vite-react": | ||
| lines.push("The project uses Vite with React. Leverage fast HMR during development.", "Keep route definitions centralized. Use lazy imports for route-level code splitting."); | ||
| break; | ||
| case "react": | ||
| lines.push("Follow standard React patterns: lift state only when siblings need it, prefer composition over inheritance, and keep components focused."); | ||
| break; | ||
| case "express": | ||
| case "fastify": | ||
| case "hono": | ||
| lines.push(`Use ${manifest.project.framework} middleware and route handlers. Keep controllers thin — delegate business logic to service functions.`, "Validate all request inputs at the handler boundary before passing to services."); | ||
| break; | ||
| } | ||
| return lines.join("\n"); | ||
| } | ||
| function buildConventionsSection(manifest) { | ||
| const rules = []; | ||
| if (manifest.conventions.accessibility) { | ||
| rules.push("All interactive elements must be keyboard-accessible with visible focus indicators. Use semantic HTML and ARIA attributes."); | ||
| } | ||
| if (manifest.conventions.responsive) { | ||
| rules.push("All layouts must be responsive. Test at mobile (375px), tablet (768px), and desktop (1280px) breakpoints."); | ||
| } | ||
| if (manifest.conventions.authModel && manifest.conventions.authModel !== "none") { | ||
| rules.push(`Auth model is ${manifest.conventions.authModel}. Always check authorization before rendering protected content or executing protected operations.`); | ||
| } | ||
| if (manifest.conventions.folderStructure) { | ||
| rules.push(`Folder structure: ${manifest.conventions.folderStructure}`); | ||
| } | ||
| if (manifest.project.type === "dashboard" && manifest.dashboard) { | ||
| rules.push(`Styling: ${manifest.dashboard.styling}. Components: ${manifest.dashboard.components}.`, `Data fetching: ${manifest.dashboard.dataFetching}. Tables: ${manifest.dashboard.tables}. Charts: ${manifest.dashboard.charts}.`, `Forms: ${manifest.dashboard.forms}. State management: ${manifest.dashboard.state}.`, `Testing stack: ${manifest.dashboard.testing.join(", ")}.`); | ||
| } | ||
| if (manifest.project.type === "api-service" && manifest.apiService) { | ||
| rules.push(`API style: ${manifest.apiService.apiStyle}. Validation: ${manifest.apiService.validation}. ORM: ${manifest.apiService.orm}.`, `Auth: ${manifest.apiService.auth}. Testing stack: ${manifest.apiService.testing.join(", ")}.`); | ||
| } | ||
| if (manifest.project.type === "web-app" && manifest.webApp) { | ||
| rules.push(`Styling: ${manifest.webApp.styling}. Components: ${manifest.webApp.components}.`, `State management: ${manifest.webApp.stateManagement}. Data fetching: ${manifest.webApp.dataFetching}.`, `Forms: ${manifest.webApp.forms}. Auth: ${manifest.webApp.auth}.`, `Testing stack: ${manifest.webApp.testing.join(", ")}.`); | ||
| } | ||
| if (manifest.project.type === "full-stack" && manifest.fullStack) { | ||
| rules.push(`API style: ${manifest.fullStack.apiStyle}. ORM: ${manifest.fullStack.orm}. Auth: ${manifest.fullStack.auth}.`, `Styling: ${manifest.fullStack.styling}. Components: ${manifest.fullStack.components}.`, `Testing stack: ${manifest.fullStack.testing.join(", ")}.`); | ||
| } | ||
| if (manifest.project.type === "library" && manifest.library) { | ||
| rules.push(`Bundler: ${manifest.library.bundler}. Publish target: ${manifest.library.publishTarget}.`, `Docs tool: ${manifest.library.docs}. Testing stack: ${manifest.library.testing.join(", ")}.`); | ||
| } | ||
| if (manifest.project.type === "cli-tool" && manifest.cliTool) { | ||
| rules.push(`Runtime: ${manifest.cliTool.runtime}. Arg parser: ${manifest.cliTool.argParser}.`, `Publish target: ${manifest.cliTool.publishTarget}. Testing stack: ${manifest.cliTool.testing.join(", ")}.`); | ||
| } | ||
| if (manifest.project.type === "mobile" && manifest.mobile) { | ||
| rules.push(`Framework: ${manifest.mobile.framework}. Styling: ${manifest.mobile.styling}.`, `Navigation: ${manifest.mobile.navigation}. Testing stack: ${manifest.mobile.testing.join(", ")}.`); | ||
| } | ||
| return rules.length > 0 ? rules.map((r) => `- ${r}`).join("\n") : "- Follow standard project conventions."; | ||
| } | ||
| function render(file, manifest) { | ||
| const sections = [ | ||
| `# AGENTS`, | ||
| ``, | ||
| `## Project Overview`, | ||
| ``, | ||
| buildFrameworkSection(manifest), | ||
| ``, | ||
| `## Conventions`, | ||
| ``, | ||
| buildConventionsSection(manifest), | ||
| ``, | ||
| `## Coding Style`, | ||
| ``, | ||
| ...manifest.instructions.codingStyle.map((rule) => `- ${rule}`), | ||
| ``, | ||
| `## Review Rules`, | ||
| ``, | ||
| ...manifest.instructions.reviewRules.map((rule) => `- ${rule}`), | ||
| ``, | ||
| ]; | ||
| return { | ||
| path: file.path, | ||
| trustSensitive: file.trustSensitive, | ||
| content: `# AGENTS\n\nGenerated by agenv.\n\n## Project\n\n- Name: ${manifest.project.name}\n- Framework: ${manifest.project.framework}\n\n## Coding Style\n\n${manifest.instructions.codingStyle.map((rule) => `- ${rule}`).join("\n")}\n\n## Review Rules\n\n${manifest.instructions.reviewRules.map((rule) => `- ${rule}`).join("\n")}\n`, | ||
| content: `${sections.join("\n")}\n`, | ||
| }; | ||
@@ -25,0 +117,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/codex/index.ts"],"names":[],"mappings":"AAIA,SAAS,QAAQ,CAAC,QAAkB;IAClC,OAAO;QACL,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK;QACjC,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK;YAC5B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC;gBACE;oBACE,QAAQ,EAAE,SAAS;oBACnB,IAAI,EAAE,uBAAuB;oBAC7B,OAAO,EAAE,mDAAmD;iBAC7D;aACF;KACN,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,SAAmB,EAAE,cAA8B;IAC/D,OAAO,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,MAAM,CAAC,IAAiB,EAAE,QAAkB;IACnD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,OAAO,EAAE,4DAA4D,QAAQ,CAAC,OAAO,CAAC,IAAI,kBAAkB,QAAQ,CAAC,OAAO,CAAC,SAAS,0BAA0B,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;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AE;QACF,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;QAC/D,EAAE;KACH,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,OAAO,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAY;IACnC,EAAE,EAAE,OAAO;IACX,QAAQ;IACR,IAAI;IACJ,MAAM;CACP,CAAC"} |
@@ -18,10 +18,75 @@ function supports(manifest) { | ||
| } | ||
| function describeProjectType(manifest) { | ||
| if (manifest.project.type === "web-app") | ||
| return "web application"; | ||
| if (manifest.project.type === "api-service") | ||
| return "API service"; | ||
| if (manifest.project.type === "full-stack") | ||
| return "full-stack application"; | ||
| if (manifest.project.type === "library") | ||
| return "library"; | ||
| if (manifest.project.type === "cli-tool") | ||
| return "CLI tool"; | ||
| if (manifest.project.type === "mobile") | ||
| return "mobile application"; | ||
| return "dashboard"; | ||
| } | ||
| function buildFrameworkGuidance(manifest) { | ||
| const lines = []; | ||
| switch (manifest.project.framework) { | ||
| case "nextjs": | ||
| lines.push("Use the App Router with server components by default. Only add `\"use client\"` when the component needs interactivity.", "Keep data fetching in server components or route handlers.", "Use `next/image` for optimized images and `next/link` for internal navigation."); | ||
| break; | ||
| case "vite-react": | ||
| lines.push("Use Vite conventions. Lazy-import route-level components for code splitting.", "Keep CSS modules or Tailwind utility classes co-located with components."); | ||
| break; | ||
| case "react": | ||
| lines.push("Prefer composition over inheritance. Lift state only when sibling components need it."); | ||
| break; | ||
| case "express": | ||
| case "fastify": | ||
| case "hono": | ||
| lines.push(`Use ${manifest.project.framework} idioms for handlers and middleware.`, "Keep controllers thin — delegate business logic to service functions.", "Validate all inputs at the handler boundary before passing data to services."); | ||
| break; | ||
| } | ||
| return lines; | ||
| } | ||
| function render(file, manifest) { | ||
| const projectLabel = manifest.project.type === "web-app" ? "web app" : "dashboard"; | ||
| const frameworkGuidance = buildFrameworkGuidance(manifest); | ||
| const conventionLines = []; | ||
| if (manifest.conventions.accessibility) { | ||
| conventionLines.push("All interactive elements must be keyboard-accessible with visible focus indicators."); | ||
| } | ||
| if (manifest.conventions.responsive) { | ||
| conventionLines.push("All layouts must be responsive across mobile, tablet, and desktop."); | ||
| } | ||
| if (manifest.conventions.authModel && manifest.conventions.authModel !== "none") { | ||
| conventionLines.push(`Auth model: ${manifest.conventions.authModel}. Check authorization before rendering or executing protected operations.`); | ||
| } | ||
| const sections = [ | ||
| `# Copilot Instructions`, | ||
| ``, | ||
| `## Project`, | ||
| ``, | ||
| `This is the ${manifest.project.name} ${manifest.project.framework} ${describeProjectType(manifest)}.`, | ||
| ``, | ||
| ...(frameworkGuidance.length > 0 | ||
| ? [`## Framework`, ``, ...frameworkGuidance.map((l) => `- ${l}`), ``] | ||
| : []), | ||
| `## Coding Style`, | ||
| ``, | ||
| ...manifest.instructions.codingStyle.map((rule) => `- ${rule}`), | ||
| ``, | ||
| `## Review Rules`, | ||
| ``, | ||
| ...manifest.instructions.reviewRules.map((rule) => `- ${rule}`), | ||
| ``, | ||
| ...(conventionLines.length > 0 | ||
| ? [`## Conventions`, ``, ...conventionLines.map((l) => `- ${l}`), ``] | ||
| : []), | ||
| ]; | ||
| return { | ||
| path: file.path, | ||
| trustSensitive: file.trustSensitive, | ||
| content: `# Copilot Instructions\n\nGenerated by agenv.\n\nUse the shared ${projectLabel} conventions for ${manifest.project.name}.\n\n${manifest.instructions.codingStyle | ||
| .map((rule) => `- ${rule}`) | ||
| .join("\n")}\n`, | ||
| content: `${sections.join("\n")}\n`, | ||
| }; | ||
@@ -28,0 +93,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/copilot/index.ts"],"names":[],"m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AAC,CAAC,cAAc,EAAE,EAAE,EAAE,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACrE,CAAC,CAAC,EAAE,CAAC;QACP,iBAAiB;QACjB,EAAE;QACF,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;QAC/D,EAAE;QACF,iBAAiB;QACjB,EAAE;QACF,GAAG,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;QAC/D,EAAE;QACF,GAAG,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC;YAC5B,CAAC,CAAC,CAAC,gBAAgB,EAAE,EAAE,EAAE,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACrE,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,OAAO,EAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAY;IACrC,EAAE,EAAE,SAAS;IACb,QAAQ;IACR,IAAI;IACJ,MAAM;CACP,CAAC"} |
| import { claudeAdapter } from "./claude/index.js"; | ||
| import { codexAdapter } from "./codex/index.js"; | ||
| import { copilotAdapter } from "./copilot/index.js"; | ||
| import { cursorAdapter } from "./cursor/index.js"; | ||
| import { mcpAdapter } from "./mcp/index.js"; | ||
| import { windsurfAdapter } from "./windsurf/index.js"; | ||
| export const ADAPTERS = [ | ||
@@ -10,2 +12,4 @@ codexAdapter, | ||
| mcpAdapter, | ||
| cursorAdapter, | ||
| windsurfAdapter, | ||
| ]; | ||
@@ -12,0 +16,0 @@ export function getAdapter(adapterId) { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,MAAM,CAAC,MAAM,QAAQ,GAAc;IACjC,YAAY;IACZ,cAAc;IACd,aAAa;IACb,UAAU;CACX,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,SAAoB;IAC7C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;IAEzE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,8BAA8B,SAAS,IAAI,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,MAAM,CAAC,MAAM,QAAQ,GAAc;IACjC,YAAY;IACZ,cAAc;IACd,aAAa;IACb,UAAU;IACV,aAAa;IACb,eAAe;CAChB,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,SAAoB;IAC7C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;IAEzE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,8BAA8B,SAAS,IAAI,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"} |
| import { formatJson } from "../../utils/json.js"; | ||
| import { getPresetById } from "../../mcp/presets.js"; | ||
| function supports(manifest) { | ||
@@ -25,3 +26,32 @@ return { | ||
| } | ||
| function buildMcpServers(presets) { | ||
| const servers = {}; | ||
| for (const preset of presets) { | ||
| const entry = { | ||
| command: preset.command, | ||
| args: preset.args, | ||
| ...(Object.keys(preset.env).length > 0 ? { env: preset.env } : {}), | ||
| }; | ||
| if (preset.trustLevel !== "safe") { | ||
| entry._trustLevel = preset.trustLevel; | ||
| entry._trustNote = | ||
| preset.trustLevel === "dangerous" | ||
| ? "This server can read/write the local filesystem or execute arbitrary actions. Review carefully before enabling." | ||
| : "This server has access to external services or credentials. Review env vars and permissions before enabling."; | ||
| } | ||
| servers[preset.id] = entry; | ||
| } | ||
| return servers; | ||
| } | ||
| function render(file, manifest) { | ||
| if (file.path === ".mcp.local.json") { | ||
| return { | ||
| path: file.path, | ||
| trustSensitive: file.trustSensitive, | ||
| content: formatJson({}), | ||
| }; | ||
| } | ||
| const resolvedPresets = manifest.generated.mcpPresets | ||
| .map((id) => getPresetById(id)) | ||
| .filter((p) => p !== undefined); | ||
| return { | ||
@@ -31,8 +61,3 @@ path: file.path, | ||
| content: formatJson({ | ||
| generatedBy: "agenv", | ||
| project: manifest.project.name, | ||
| presets: manifest.generated.mcpPresets, | ||
| env: { | ||
| EXAMPLE_API_KEY: "${EXAMPLE_API_KEY}", | ||
| }, | ||
| mcpServers: buildMcpServers(resolvedPresets), | ||
| }), | ||
@@ -39,0 +64,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/mcp/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,SAAS,QAAQ,CAAC,QAAkB;IAClC,OAAO;QACL,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG;QAC/B,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG;YAC1B,CAAC,CAAC;gBACE;oBACE,QAAQ,EAAE,SAAS;oBACnB,IAAI,EAAE,qBAAqB;oBAC3B,OAAO,EAAE,oEAAoE;iBAC9E;aACF;YACH,CAAC,CAAC;gBACE;oBACE,QAAQ,EAAE,SAAS;oBACnB,IAAI,EAAE,qBAAqB;oBAC3B,OAAO,EAAE,iDAAiD;iBAC3D;aACF;KACN,CAAC;AACJ,CAAC;AAED,SAAS,IAAI,CAAC,SAAmB,EAAE,cAA8B;IAC/D,OAAO,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,MAAM,CAAC,IAAiB,EAAE,QAAkB;IACnD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,OAAO,EAAE,UAAU,CAAC;YAClB,WAAW,EAAE,OAAO;YACpB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI;YAC9B,OAAO,EAAE,QAAQ,CAAC,SAAS,CAAC,UAAU;YACtC,GAAG,EAAE;gBACH,eAAe,EAAE,oBAAoB;aACtC;SACF,CAAC;KACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAY;IACjC,EAAE,EAAE,KA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AM,CAAC,UAAU,KAAK,MAAM,EAAE,CAAC;YACjC,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;YACtC,KAAK,CAAC,UAAU;gBACd,MAAM,CAAC,UAAU,KAAK,WAAW;oBAC/B,CAAC,CAAC,iHAAiH;oBACnH,CAAC,CAAC,8GAA8G,CAAC;QACvH,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;IAC7B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,MAAM,CAAC,IAAiB,EAAE,QAAkB;IACnD,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;QACpC,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC;SACxB,CAAC;IACJ,CAAC;IAED,MAAM,eAAe,GAAG,QAAQ,CAAC,SAAS,CAAC,UAAU;SAClD,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;SAC9B,MAAM,CAAC,CAAC,CAAC,EAAkB,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;IAElD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,OAAO,EAAE,UAAU,CAAC;YAClB,UAAU,EAAE,eAAe,CAAC,eAAe,CAAC;SAC7C,CAAC;KACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAY;IACjC,EAAE,EAAE,KAAK;IACT,QAAQ;IACR,IAAI;IACJ,MAAM;CACP,CAAC"} |
| import type { Manifest } from "../manifest/schema.js"; | ||
| import type { GenerationPlan, PlannedFile } from "../planner/build-plan.js"; | ||
| export type AdapterId = "codex" | "copilot" | "claude" | "mcp"; | ||
| export type AdapterId = "codex" | "copilot" | "claude" | "mcp" | "cursor" | "windsurf"; | ||
| export type SupportIssue = { | ||
@@ -5,0 +5,0 @@ severity: "warning" | "error"; |
@@ -9,2 +9,3 @@ import { Command } from "commander"; | ||
| dryRun?: boolean; | ||
| force?: boolean; | ||
| targets?: AdapterTarget[] | undefined; | ||
@@ -11,0 +12,0 @@ layers?: OutputLayer[] | undefined; |
@@ -32,3 +32,3 @@ import { summarizeRenderedDiff } from "../../fs/diff.js"; | ||
| ? await summarizeRenderedDiff(options.cwd, renderedFiles) | ||
| : await writeRenderedFiles(options.cwd, renderedFiles); | ||
| : await writeRenderedFiles(options.cwd, renderedFiles, { force: options.force }); | ||
| return { | ||
@@ -48,2 +48,3 @@ command: "generate", | ||
| .option("--json", "emit machine-readable output") | ||
| .option("--force", "overwrite files modified outside agenv") | ||
| .option("--targets <list>", "limit generation to selected targets") | ||
@@ -56,2 +57,3 @@ .option("--layer <list>", "limit generation to selected layers") | ||
| dryRun: Boolean(options.dryRun), | ||
| force: Boolean(options.force), | ||
| ...compactObject({ | ||
@@ -63,3 +65,6 @@ targets: parseTargets(options.targets), | ||
| }); | ||
| const text = formatTextBlock([ | ||
| const skippedCount = "skipped" in result.summary ? result.summary.skipped.length : result.summary.skip.length; | ||
| const skippedList = "skipped" in result.summary ? result.summary.skipped : result.summary.skip; | ||
| const backedUpCount = "backedUp" in result.summary ? result.summary.backedUp.length : 0; | ||
| const lines = [ | ||
| `Manifest: ${result.manifestPath}`, | ||
@@ -71,5 +76,25 @@ `Planned files: ${result.plan.files.length}`, | ||
| `Unchanged: ${result.summary.unchanged.length}`, | ||
| `Skipped: ${"skipped" in result.summary ? result.summary.skipped.length : result.summary.skip.length}`, | ||
| result.dryRun ? "Dry run only: files were not written." : "Files written successfully.", | ||
| ]); | ||
| `Skipped: ${skippedCount}`, | ||
| ]; | ||
| if (backedUpCount > 0) { | ||
| lines.push(`Backed up: ${backedUpCount}`); | ||
| } | ||
| if (skippedCount > 0 && !result.dryRun) { | ||
| lines.push(""); | ||
| lines.push("Skipped files (modified outside agenv):"); | ||
| for (const path of skippedList) { | ||
| lines.push(` ${path}`); | ||
| } | ||
| lines.push('Use --force to overwrite these files.'); | ||
| } | ||
| if (result.dryRun) { | ||
| lines.push("Dry run only: files were not written."); | ||
| } | ||
| else if (skippedCount > 0) { | ||
| lines.push("Files written with some files skipped (modified outside agenv)."); | ||
| } | ||
| else { | ||
| lines.push("Files written successfully."); | ||
| } | ||
| const text = formatTextBlock(lines); | ||
| process.stdout.write(formatCommandOutput(text, result, Boolean(options.json))); | ||
@@ -76,0 +101,0 @@ }); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAU7F,SAAS,YAAY,CAAC,KAAc;IAClC,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACtC,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAE,OAA2B,CAAC,CAAC,CAAC,SAAS,CAAC;AACvE,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACrC,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAE,MAAwB,CAAC,CAAC,CAAC,SAAS,CAAC;AACnE,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,MAAM,MAAM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,MAAM,CAAC,MAAM,EAAE,CAAC;YAClB,KAAK,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;QACtD,CAAC;aAAM,IAAI,YAAY,GAAG,CAAC,EAAE,CAAC;YAC5B,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;QAChF,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QAC5C,CAAC;QAED,MAAM,IAAI,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;QAEpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjF,CAAC,CAAC,CAAC;AACP,CAAC"} |
@@ -0,4 +1,6 @@ | ||
| import { InvalidOptionError } from "../../errors.js"; | ||
| import { inspectRepo } from "../../detect/repo-inspector.js"; | ||
| import { buildRecommendedManifest } from "../../manifest/defaults.js"; | ||
| import { saveManifest } from "../../manifest/save.js"; | ||
| import { frameworkSchema, setupDepthSchema, setupModeSchema, setupScopeSchema, promptModeSchema, } from "../../manifest/schema.js"; | ||
| import { buildGenerationPlan } from "../../planner/build-plan.js"; | ||
@@ -8,3 +10,3 @@ import { ADAPTER_TARGETS } from "../../planner/output-map.js"; | ||
| import { runInitFlow } from "../prompts/init-flow.js"; | ||
| const SUPPORTED_PROJECT_TYPES = ["dashboard", "web-app", "api-service"]; | ||
| const SUPPORTED_PROJECT_TYPES = ["dashboard", "web-app", "api-service", "full-stack", "library", "cli-tool", "mobile"]; | ||
| function buildTargetFlags(targets) { | ||
@@ -20,2 +22,4 @@ const selectedTargets = parseCommaList(targets); | ||
| mcp: selectedTargets.includes("mcp"), | ||
| cursor: selectedTargets.includes("cursor"), | ||
| windsurf: selectedTargets.includes("windsurf"), | ||
| }; | ||
@@ -29,6 +33,11 @@ } | ||
| if (!ADAPTER_TARGETS.includes(target)) { | ||
| throw new Error(`Unsupported target: ${target}`); | ||
| throw new InvalidOptionError("--targets", target, ADAPTER_TARGETS); | ||
| } | ||
| } | ||
| } | ||
| function validateOptionEnum(flag, value, schema) { | ||
| if (value !== undefined && !schema.options.includes(value)) { | ||
| throw new InvalidOptionError(flag, value, schema.options); | ||
| } | ||
| } | ||
| export function registerInitCommand(program) { | ||
@@ -50,2 +59,11 @@ program | ||
| const cwd = process.cwd(); | ||
| // Validate all CLI options early, before any I/O | ||
| validateTargets(options.targets); | ||
| if (options.framework !== undefined) { | ||
| validateOptionEnum("--framework", options.framework, frameworkSchema); | ||
| } | ||
| validateOptionEnum("--setup-depth", options.setupDepth, setupDepthSchema); | ||
| validateOptionEnum("--setup-mode", options.setupMode, setupModeSchema); | ||
| validateOptionEnum("--config-scope", options.configScope, setupScopeSchema); | ||
| validateOptionEnum("--prompts", options.prompts, promptModeSchema); | ||
| const inspection = await inspectRepo(cwd); | ||
@@ -56,5 +74,4 @@ let manifest; | ||
| if (!SUPPORTED_PROJECT_TYPES.includes(options.projectType)) { | ||
| throw new Error("Supported project types are 'dashboard', 'web-app', and 'api-service'."); | ||
| throw new InvalidOptionError("--project-type", options.projectType ?? "", SUPPORTED_PROJECT_TYPES); | ||
| } | ||
| validateTargets(options.targets); | ||
| manifest = buildRecommendedManifest({ | ||
@@ -61,0 +78,0 @@ name: inspection.projectName, |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAStD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,eA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C,QAAQ,CAAC,MAAM,EAAE;YACnC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC,CAAC,uBAAuB,YAAY,GAAG;SACpG,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG;YACd,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE;gBACR,IAAI,EAAE,mBAAmB;gBACzB,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM;aACzB;YACD,IAAI;YACJ,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;SAChC,CAAC;QAEF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC;AACP,CAAC"} |
| #!/usr/bin/env node | ||
| import { Command } from "commander"; | ||
| import { isAgenvError } from "../errors.js"; | ||
| import { registerDiffCommand } from "./commands/diff.js"; | ||
@@ -26,6 +27,11 @@ import { registerDoctorCommand } from "./commands/doctor.js"; | ||
| main().catch((error) => { | ||
| const message = error instanceof Error ? error.message : "Unknown error"; | ||
| console.error(message); | ||
| if (isAgenvError(error)) { | ||
| console.error(`[${error.code}] ${error.message}`); | ||
| } | ||
| else { | ||
| const message = error instanceof Error ? error.message : "Unknown error"; | ||
| console.error(message); | ||
| } | ||
| process.exitCode = 1; | ||
| }); | ||
| //# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CA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| import type { OutputAnswers } from "./sessions/output.js"; | ||
| import type { ProjectType } from "../../manifest/schema.js"; | ||
| export type InitFlowAnswers = { | ||
@@ -12,4 +13,6 @@ targets: { | ||
| mcp: boolean; | ||
| cursor: boolean; | ||
| windsurf: boolean; | ||
| }; | ||
| projectType: "dashboard" | "web-app" | "api-service"; | ||
| projectType: ProjectType; | ||
| setupDepth: "recommended" | "semi-custom" | "advanced"; | ||
@@ -16,0 +19,0 @@ framework: "react" | "nextjs" | "vite-react" | "express" | "fastify" | "hono"; |
@@ -16,3 +16,3 @@ import { runAuthPrompt } from "./sessions/auth.js"; | ||
| const setupDepth = await runSetupDepthPrompt(); | ||
| const isApi = projectType === "api-service"; | ||
| const isNonUi = projectType === "api-service" || projectType === "library" || projectType === "cli-tool"; | ||
| if (setupDepth === "recommended") { | ||
@@ -23,9 +23,9 @@ return { | ||
| setupDepth, | ||
| framework: isApi | ||
| framework: isNonUi | ||
| ? "express" | ||
| : (detectedFramework ?? "react"), | ||
| ui: isApi ? undefined : { styling: "tailwind", components: "shadcn-ui", charts: "recharts", forms: "react-hook-form-zod", tables: "tanstack-table" }, | ||
| data: isApi ? undefined : { dataFetching: "tanstack-query", state: "local-first" }, | ||
| authModel: isApi ? "custom" : (projectType === "dashboard" ? "rbac" : "custom"), | ||
| quality: { testing: isApi ? ["vitest"] : ["vitest", "rtl"], accessibility: !isApi, responsive: !isApi }, | ||
| ui: isNonUi ? undefined : { styling: "tailwind", components: "shadcn-ui", charts: "recharts", forms: "react-hook-form-zod", tables: "tanstack-table" }, | ||
| data: isNonUi ? undefined : { dataFetching: "tanstack-query", state: "local-first" }, | ||
| authModel: projectType === "dashboard" ? "rbac" : "custom", | ||
| quality: { testing: isNonUi ? ["vitest"] : ["vitest", "rtl"], accessibility: !isNonUi, responsive: !isNonUi }, | ||
| mcpPresets: [], | ||
@@ -37,4 +37,4 @@ output: { mode: "full", scope: "mixed", prompts: "master" }, | ||
| // UI and data prompts only apply to frontend project types | ||
| const ui = isApi ? undefined : await runUiPrompt(); | ||
| const data = isApi ? undefined : await runDataPrompt(); | ||
| const ui = isNonUi ? undefined : await runUiPrompt(); | ||
| const data = isNonUi ? undefined : await runDataPrompt(); | ||
| const authModel = await runAuthPrompt(); | ||
@@ -41,0 +41,0 @@ const quality = await runQualityPrompt(); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"init-flow.js","sourceRoot":"","sources":["../../../src/cli/prompts/init-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAmB/C,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,iBAA0B;IAC1D,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;IAEtD,MAAM,OAAO,GAAG,MAAM,cAAc,EAAE,CAAC;IACvC,MAAM,WAAW,GAAG,MAAM,oBAAoB,EAAE,CAAC;IACjD,MAAM,UAAU,GAAG,MAAM,mBAAmB,EAAE,CAAC;IAC/C,MAAM,KAAK,GAAG,WAAW,KAAK,aAAa,CAAC;IAE5C,IAAI,UAAU,KAAK,aAAa,EAAE,CAAC;QACjC,OAAO;YACL,OAAO;YACP,WAAW;YACX,UAAU;YACV,SAAS,EAAE,KAAK;gBACd,CA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EvE,2DAA2D;IAC3D,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,WAAW,EAAE,CAAC;IACrD,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,aAAa,EAAE,CAAC;IAEzD,MAAM,SAAS,GAAG,MAAM,aAAa,EAAE,CAAC;IACxC,MAAM,OAAO,GAAG,MAAM,gBAAgB,EAAE,CAAC;IACzC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAE/D,IAAI,MAAM,GAAkB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAChF,IAAI,UAAU,KAAK,UAAU,EAAE,CAAC;QAC9B,MAAM,GAAG,MAAM,eAAe,EAAE,CAAC;IACnC,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AAC3G,CAAC"} |
@@ -0,1 +1,2 @@ | ||
| import type { ProjectType } from "../../../manifest/schema.js"; | ||
| export declare const projectTypeSession: { | ||
@@ -6,2 +7,2 @@ id: string; | ||
| }; | ||
| export declare function runProjectTypePrompt(): Promise<"dashboard" | "web-app" | "api-service">; | ||
| export declare function runProjectTypePrompt(): Promise<ProjectType>; |
@@ -5,3 +5,3 @@ import { select } from "@inquirer/prompts"; | ||
| title: "Project Type", | ||
| prompt: "Confirm the project type. Current support includes dashboard, web-app, and api-service repositories.", | ||
| prompt: "Confirm the project type.", | ||
| }; | ||
@@ -15,2 +15,6 @@ export async function runProjectTypePrompt() { | ||
| { name: "API Service", value: "api-service" }, | ||
| { name: "Full-Stack App", value: "full-stack" }, | ||
| { name: "Library / Package", value: "library" }, | ||
| { name: "CLI Tool", value: "cli-tool" }, | ||
| { name: "Mobile App (Expo)", value: "mobile" }, | ||
| ], | ||
@@ -17,0 +21,0 @@ }); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"project-type.js","sourceRoot":"","sources":["../../../../src/cli/prompts/sessions/project-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,sGAAsG;CAC/G,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,OAAO,MAAM,CAAC;QACZ,OAAO,EAAE,+BAA+B;QACxC,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAoB,EAAE;YAClD,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAkB,EAAE;YAC9C,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAsB,EAAE;SACvD;KACF,CAAC,CAAC;AACL,CAAC"} | ||
| {"version":3,"file":"project-type.js","sourceRoot":"","sources":["../../../../src/cli/prompts/sessions/project-type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,2BAA2B;CACpC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,OAAO,MAAM,CAAC;QACZ,OAAO,EAAE,+BAA+B;QACxC,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAoB,EAAE;YAClD,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAkB,EAAE;YAC9C,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAsB,EAAE;YACtD,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,YAAqB,EAAE;YACxD,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,SAAkB,EAAE;YACxD,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAmB,EAAE;YAChD,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,QAAiB,EAAE;SACxD;KACF,CAAC,CAAC;AACL,CAAC"} |
@@ -0,1 +1,2 @@ | ||
| import { Separator } from "@inquirer/prompts"; | ||
| export declare const toolingSession: { | ||
@@ -6,2 +7,6 @@ id: string; | ||
| }; | ||
| export declare function buildToolingChoices(): Array<{ | ||
| name: string; | ||
| value: string; | ||
| } | Separator>; | ||
| export declare function runToolingPrompt(): Promise<string[]>; |
@@ -1,2 +0,3 @@ | ||
| import { checkbox } from "@inquirer/prompts"; | ||
| import { checkbox, Separator } from "@inquirer/prompts"; | ||
| import { MCP_PRESETS, getPresetById } from "../../../mcp/presets.js"; | ||
| export const toolingSession = { | ||
@@ -7,13 +8,55 @@ id: "tooling", | ||
| }; | ||
| const CATEGORY_ORDER = ["code", "data", "search", "productivity", "utility"]; | ||
| const CATEGORY_LABELS = { | ||
| code: "Code & Repos", | ||
| data: "Databases & Data", | ||
| search: "Search", | ||
| productivity: "Productivity", | ||
| utility: "Utilities", | ||
| }; | ||
| export function buildToolingChoices() { | ||
| const choices = []; | ||
| for (const category of CATEGORY_ORDER) { | ||
| const presetsInCategory = MCP_PRESETS.filter((p) => p.category === category); | ||
| if (presetsInCategory.length === 0) | ||
| continue; | ||
| choices.push(new Separator(`── ${CATEGORY_LABELS[category]} ──`)); | ||
| for (const preset of presetsInCategory) { | ||
| choices.push({ | ||
| name: `${preset.name} — ${preset.description}`, | ||
| value: preset.id, | ||
| }); | ||
| } | ||
| } | ||
| choices.push(new Separator("──────────────────────")); | ||
| choices.push({ name: "None", value: "__none__" }); | ||
| return choices; | ||
| } | ||
| export async function runToolingPrompt() { | ||
| return checkbox({ | ||
| const selected = await checkbox({ | ||
| message: "Include any MCP presets?", | ||
| choices: [ | ||
| { name: "Filesystem", value: "filesystem" }, | ||
| { name: "GitHub", value: "github" }, | ||
| { name: "Postgres", value: "postgres" }, | ||
| { name: "None", value: "__none__" }, | ||
| ], | ||
| }).then((selected) => selected.filter((s) => s !== "__none__")); | ||
| choices: buildToolingChoices(), | ||
| }); | ||
| const presetIds = selected.filter((s) => s !== "__none__"); | ||
| if (presetIds.length > 0) { | ||
| const envVarLines = []; | ||
| for (const id of presetIds) { | ||
| const preset = getPresetById(id); | ||
| if (!preset || Object.keys(preset.env).length === 0) | ||
| continue; | ||
| envVarLines.push(` ${preset.name}:`); | ||
| for (const key of Object.keys(preset.env)) { | ||
| envVarLines.push(` ${key}=`); | ||
| } | ||
| } | ||
| if (envVarLines.length > 0) { | ||
| console.log("\nRequired env vars for selected presets:"); | ||
| for (const line of envVarLines) { | ||
| console.log(line); | ||
| } | ||
| console.log("Add these to your .env.local or CI secrets before running the MCP server.\n"); | ||
| } | ||
| } | ||
| return presetIds; | ||
| } | ||
| //# sourceMappingURL=tooling.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"tooling.js","sourceRoot":"","sources":["../../../../src/cli/prompts/sessions/tooling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,EAAE,EAAE,SAAS;IACb,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,yEAAyE;CAClF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,QAAQ,CAAC;QACd,OAAO,EAAE,0BAA0B;QACnC,OAAO,EAAE;YACP,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;YAC3C,EAAE,IAAI,EAA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,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC1C,WAAW,CAAC,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;QACD,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;YACzD,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;gBAC/B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,6EAA6E,CAAC,CAAC;QAC7F,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"} |
@@ -11,2 +11,4 @@ export declare const toolsSession: { | ||
| mcp: boolean; | ||
| cursor: boolean; | ||
| windsurf: boolean; | ||
| }>; |
@@ -15,2 +15,4 @@ import { checkbox } from "@inquirer/prompts"; | ||
| { name: "MCP Servers", value: "mcp", checked: false }, | ||
| { name: "Cursor", value: "cursor", checked: false }, | ||
| { name: "Windsurf", value: "windsurf", checked: false }, | ||
| ], | ||
@@ -23,4 +25,6 @@ }); | ||
| mcp: selected.includes("mcp"), | ||
| cursor: selected.includes("cursor"), | ||
| windsurf: selected.includes("windsurf"), | ||
| }; | ||
| } | ||
| //# sourceMappingURL=tools.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../../src/cli/prompts/sessions/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE,iEAAiE;CAC1E,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,cAAc;IAMlC,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC;QAC9B,OAAO,EA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AE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,OAAgB,EAAE,OAAO,EAAE,IAAI,EAAE;YAChE,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,KAAc,EAAE,OAAO,EAAE,KAAK,EAAE;YAC9D,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAiB,EAAE,OAAO,EAAE,KAAK,EAAE;YAC5D,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAmB,EAAE,OAAO,EAAE,KAAK,EAAE;SACjE;KACF,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC;QACrC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACnC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;QACjC,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC7B,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACnC,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC;KACxC,CAAC;AACJ,CAAC"} |
@@ -6,2 +6,3 @@ import { inspectRepo } from "../detect/repo-inspector.js"; | ||
| import { runManifestChecks } from "./checks/manifest.js"; | ||
| import { checkMcpConfigFormat, checkMcpEnvVars } from "./checks/mcp.js"; | ||
| import { runPathChecks } from "./checks/paths.js"; | ||
@@ -38,2 +39,4 @@ import { runRepoMatchChecks } from "./checks/repo-match.js"; | ||
| ...runRepoMatchChecks(manifest, inspection), | ||
| ...checkMcpEnvVars(manifest), | ||
| ...(await checkMcpConfigFormat(cwd, manifest)), | ||
| ]; | ||
@@ -40,0 +43,0 @@ const result = partitionFindings(findings); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/doctor/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM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QAAQ,CAAC;QAC9B,GAAG,YAAY,CAAC,QAAQ,CAAC;QACzB,GAAG,CAAC,MAAM,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACvC,GAAG,kBAAkB,CAAC,QAAQ,EAAE,UAAU,CAAC;QAC3C,GAAG,eAAe,CAAC,QAAQ,CAAC;QAC5B,GAAG,CAAC,MAAM,oBAAoB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;KAC/C,CAAC;IAEF,MAAM,MAAM,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAE3C,IAAI,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC9E,OAAO;YACL,GAAG,MAAM;YACT,MAAM,EAAE,OAAO;SAChB,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"} |
+10
-1
@@ -1,1 +0,10 @@ | ||
| export declare function createBackup(_filePath: string): Promise<void>; | ||
| /** | ||
| * Create a timestamped backup of a file before overwriting. | ||
| * Backups are stored in `.agenv-backups/` mirroring the original directory structure. | ||
| * Returns the backup path, or undefined if the source file does not exist. | ||
| */ | ||
| export declare function createBackup(cwd: string, relativePath: string): Promise<string | undefined>; | ||
| /** | ||
| * Create backups for multiple files. Returns paths of created backups. | ||
| */ | ||
| export declare function createBackups(cwd: string, relativePaths: string[]): Promise<string[]>; |
+53
-2
@@ -1,4 +0,55 @@ | ||
| export async function createBackup(_filePath) { | ||
| throw new Error("Backup creation is not implemented yet."); | ||
| import { copyFile, mkdir, access } from "node:fs/promises"; | ||
| import { dirname, join, basename, extname } from "node:path"; | ||
| import { BackupError } from "../errors.js"; | ||
| const BACKUP_DIR = ".agenv-backups"; | ||
| async function fileExists(filePath) { | ||
| try { | ||
| await access(filePath); | ||
| return true; | ||
| } | ||
| catch { | ||
| return false; | ||
| } | ||
| } | ||
| function buildBackupPath(cwd, relativePath) { | ||
| const timestamp = new Date().toISOString().replace(/[:.]/g, "-"); | ||
| const ext = extname(relativePath); | ||
| const base = basename(relativePath, ext); | ||
| const dir = dirname(relativePath); | ||
| return join(cwd, BACKUP_DIR, dir, `${base}.${timestamp}${ext}`); | ||
| } | ||
| /** | ||
| * Create a timestamped backup of a file before overwriting. | ||
| * Backups are stored in `.agenv-backups/` mirroring the original directory structure. | ||
| * Returns the backup path, or undefined if the source file does not exist. | ||
| */ | ||
| export async function createBackup(cwd, relativePath) { | ||
| const sourcePath = join(cwd, relativePath); | ||
| if (!(await fileExists(sourcePath))) { | ||
| return undefined; | ||
| } | ||
| const backupPath = buildBackupPath(cwd, relativePath); | ||
| try { | ||
| await mkdir(dirname(backupPath), { recursive: true }); | ||
| await copyFile(sourcePath, backupPath); | ||
| } | ||
| catch (error) { | ||
| const reason = error instanceof Error ? error.message : "unknown error"; | ||
| throw new BackupError(relativePath, reason); | ||
| } | ||
| return backupPath; | ||
| } | ||
| /** | ||
| * Create backups for multiple files. Returns paths of created backups. | ||
| */ | ||
| export async function createBackups(cwd, relativePaths) { | ||
| const results = []; | ||
| for (const relativePath of relativePaths) { | ||
| const backupPath = await createBackup(cwd, relativePath); | ||
| if (backupPath !== undefined) { | ||
| results.push(backupPath); | ||
| } | ||
| } | ||
| return results; | ||
| } | ||
| //# sourceMappingURL=backups.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"backups.js","sourceRoot":"","sources":["../../src/fs/backups.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,SAAiB;IAClD,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;AAC7D,CAAC"} | ||
| {"version":3,"file":"backups.js","sourceRoot":"","sources":["../../src/fs/backups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,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M,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;QACxE,MAAM,IAAI,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,GAAW,EACX,aAAuB;IAEvB,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,MAAM,UAAU,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QACzD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"} |
@@ -7,3 +7,7 @@ import type { RenderedFile } from "../adapters/types.js"; | ||
| skipped: string[]; | ||
| backedUp: string[]; | ||
| }; | ||
| export declare function writeRenderedFiles(cwd: string, renderedFiles: RenderedFile[]): Promise<WriteSummary>; | ||
| export type WriteOptions = { | ||
| force?: boolean | undefined; | ||
| }; | ||
| export declare function writeRenderedFiles(cwd: string, renderedFiles: RenderedFile[], options?: WriteOptions): Promise<WriteSummary>; |
+11
-2
| import { mkdir, readFile, writeFile } from "node:fs/promises"; | ||
| import { dirname, join } from "node:path"; | ||
| import { canHaveGeneratedHeader, hasGeneratedHeader } from "./headers.js"; | ||
| import { createBackup } from "./backups.js"; | ||
| async function tryReadFile(filePath) { | ||
@@ -12,3 +13,3 @@ try { | ||
| } | ||
| export async function writeRenderedFiles(cwd, renderedFiles) { | ||
| export async function writeRenderedFiles(cwd, renderedFiles, options) { | ||
| const summary = { | ||
@@ -19,2 +20,3 @@ created: [], | ||
| skipped: [], | ||
| backedUp: [], | ||
| }; | ||
@@ -34,6 +36,13 @@ for (const renderedFile of renderedFiles) { | ||
| } | ||
| if (canHaveGeneratedHeader(renderedFile.path) && !hasGeneratedHeader(renderedFile.path, existingContent)) { | ||
| const isUserModified = canHaveGeneratedHeader(renderedFile.path) && | ||
| !hasGeneratedHeader(renderedFile.path, existingContent); | ||
| if (isUserModified && !options?.force) { | ||
| summary.skipped.push(renderedFile.path); | ||
| continue; | ||
| } | ||
| // Back up before overwriting | ||
| const backupPath = await createBackup(cwd, renderedFile.path); | ||
| if (backupPath !== undefined) { | ||
| summary.backedUp.push(renderedFile.path); | ||
| } | ||
| await mkdir(dirname(absolutePath), { recursive: true }); | ||
@@ -40,0 +49,0 @@ await writeFile(absolutePath, renderedFile.content, "utf8"); |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"write.js","sourceRoot":"","sources":["../../src/fs/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAS1E,KAAK,UAAU,WAAW,CAAC,QAAgB;IACzC,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,GAAW,EACX,aAA6B;IAE7B,MAAM,OAAO,GAAiB;QAC5B,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE;QACb,OAAO,EAAE,EAAE;KACZ,CAAC;IAEF,KAAK,M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AAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAC1C,SAAS;QACX,CAAC;QAED,MAAM,cAAc,GAClB,sBAAsB,CAAC,YAAY,CAAC,IAAI,CAAC;YACzC,CAAC,kBAAkB,CAAC,YAAY,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAE1D,IAAI,cAAc,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;YACtC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACxC,SAAS;QACX,CAAC;QAED,6BAA6B;QAC7B,MAAM,UAAU,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;QAC9D,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;QAED,MAAM,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACxD,MAAM,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5D,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"} |
+111
-22
@@ -19,10 +19,42 @@ import { manifestSchema, } from "./schema.js"; | ||
| } | ||
| if (projectType === "full-stack") { | ||
| return [ | ||
| "Use TypeScript strict mode across both frontend and backend.", | ||
| "Keep frontend and backend concerns clearly separated.", | ||
| "Validate all API inputs at the boundary with Zod or equivalent.", | ||
| "Handle loading, error, and empty states in UI components.", | ||
| ]; | ||
| } | ||
| if (projectType === "library") { | ||
| return [ | ||
| "Use TypeScript strict mode.", | ||
| "Design a minimal, stable public API surface.", | ||
| "Export named types alongside runtime values.", | ||
| "Avoid side-effects in module initialization.", | ||
| ]; | ||
| } | ||
| if (projectType === "cli-tool") { | ||
| return [ | ||
| "Use TypeScript strict mode.", | ||
| "Keep command handlers thin — delegate logic to services.", | ||
| "Provide clear, actionable error messages to the user.", | ||
| "Ensure all commands are testable without spawning a subprocess.", | ||
| ]; | ||
| } | ||
| if (projectType === "mobile") { | ||
| return [ | ||
| "Use TypeScript strict mode.", | ||
| "Keep screens focused — extract shared logic to hooks or services.", | ||
| "Handle loading, empty, and error states in every screen.", | ||
| "Test on both iOS and Android form factors.", | ||
| ]; | ||
| } | ||
| return [ | ||
| "Use TypeScript strict mode.", | ||
| "Handle loading, empty, error, and success states explicitly.", | ||
| "Prefer reusable dashboard sections over one-off page code.", | ||
| "Prefer reusable components and shared patterns over one-off page code.", | ||
| ]; | ||
| } | ||
| export function buildRecommendedManifest(options) { | ||
| const projectType = options.projectType ?? "dashboard"; | ||
| const projectType = options.projectType ?? "web-app"; | ||
| const projectTypeBlocks = projectType === "api-service" | ||
@@ -38,14 +70,64 @@ ? { | ||
| } | ||
| : { | ||
| dashboard: { | ||
| styling: "tailwind", | ||
| components: "shadcn-ui", | ||
| dataFetching: "tanstack-query", | ||
| tables: "tanstack-table", | ||
| charts: "recharts", | ||
| forms: "react-hook-form-zod", | ||
| testing: ["vitest", "rtl"], | ||
| state: "local-first", | ||
| }, | ||
| }; | ||
| : projectType === "web-app" | ||
| ? { | ||
| webApp: { | ||
| styling: "tailwind", | ||
| components: "shadcn-ui", | ||
| stateManagement: "local-first", | ||
| dataFetching: "tanstack-query", | ||
| forms: "react-hook-form-zod", | ||
| testing: ["vitest", "rtl"], | ||
| auth: "none", | ||
| }, | ||
| } | ||
| : projectType === "full-stack" | ||
| ? { | ||
| fullStack: { | ||
| styling: "tailwind", | ||
| components: "shadcn-ui", | ||
| apiStyle: "rest", | ||
| orm: "prisma", | ||
| auth: "none", | ||
| testing: ["vitest", "rtl", "supertest"], | ||
| }, | ||
| } | ||
| : projectType === "library" | ||
| ? { | ||
| library: { | ||
| bundler: "tsup", | ||
| testing: ["vitest"], | ||
| docs: "typedoc", | ||
| publishTarget: "npm", | ||
| }, | ||
| } | ||
| : projectType === "cli-tool" | ||
| ? { | ||
| cliTool: { | ||
| runtime: "node", | ||
| argParser: "commander", | ||
| testing: ["vitest"], | ||
| publishTarget: "npm", | ||
| }, | ||
| } | ||
| : projectType === "mobile" | ||
| ? { | ||
| mobile: { | ||
| framework: "expo", | ||
| styling: "nativewind", | ||
| navigation: "expo-router", | ||
| testing: ["jest", "rtl"], | ||
| }, | ||
| } | ||
| : { | ||
| dashboard: { | ||
| styling: "tailwind", | ||
| components: "shadcn-ui", | ||
| dataFetching: "tanstack-query", | ||
| tables: "tanstack-table", | ||
| charts: "recharts", | ||
| forms: "react-hook-form-zod", | ||
| testing: ["vitest", "rtl"], | ||
| state: "local-first", | ||
| }, | ||
| }; | ||
| return manifestSchema.parse({ | ||
@@ -70,2 +152,4 @@ schemaVersion: DEFAULT_SCHEMA_VERSION, | ||
| mcp: false, | ||
| cursor: false, | ||
| windsurf: false, | ||
| ...options.targets, | ||
@@ -75,4 +159,4 @@ }, | ||
| conventions: { | ||
| accessibility: projectType !== "api-service", | ||
| responsive: projectType !== "api-service", | ||
| accessibility: projectType === "dashboard" || projectType === "web-app" || projectType === "full-stack" || projectType === "mobile", | ||
| responsive: projectType === "dashboard" || projectType === "web-app" || projectType === "full-stack" || projectType === "mobile", | ||
| authModel: projectType === "dashboard" ? "rbac" : "custom", | ||
@@ -82,11 +166,16 @@ }, | ||
| codingStyle: buildCodingStyle(projectType), | ||
| reviewRules: projectType === "api-service" | ||
| reviewRules: projectType === "api-service" || projectType === "cli-tool" | ||
| ? [ | ||
| "Validate all request inputs at the handler level.", | ||
| "Do not expose internal error details in API responses.", | ||
| "Do not expose internal error details in responses.", | ||
| ] | ||
| : [ | ||
| "Prefer existing design-system components first.", | ||
| "Do not introduce new UI libraries without approval.", | ||
| ], | ||
| : projectType === "library" | ||
| ? [ | ||
| "Do not break the public API without a major version bump.", | ||
| "Every public symbol must have a JSDoc comment.", | ||
| ] | ||
| : [ | ||
| "Prefer existing design-system components first.", | ||
| "Do not introduce new UI libraries without approval.", | ||
| ], | ||
| }, | ||
@@ -93,0 +182,0 @@ generated: { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/manifest/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,GAIf,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAW1C,SAAS,gBAAgB,CAAC,WAAwB;IAChD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO;YACL,6BAA6B;YAC7B,8DAA8D;YAC9D,yEAAyE;SAC1E,CAAC;IACJ,CAAC;IAED,IAAI,WAAW,KAAK,aAAa,EAAE,CAAC;QAClC,OAAO;YACL,6BAA6B;YAC7B,6DAA6D;YAC7D,+DAA+D;YAC/D,6DAA6D;SAC9D,CAAC;IACJ,CAAC;IAED,OAAO;QACL,6BAA6B;QAC7B,8DAA8D;QAC9D,4DAA4D;KAC7D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAAmC;IAEnC,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,WAAW,CAAC;IAEvD,MAAM,iBAAiB,GACrB,WAAW,KAAK,aAAa;QAC3B,CAAC,CAAC;YACE,UAAU,EAAE;gBACV,QAAQ,EAAE,MAAM;gBAChB,UAAU,EAAE,KAAK;gBACjB,GAAG,EAAE,QAAQ;gBACb,OAAO,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;gBAChC,IAAI,EAAE,KAAK;aACZ;SACF;QACH,CAAC,CAAC;YACE,SAAS,EAAE;gBACT,OAAO,EAAE,UAAU;gBACnB,UAAU,EAAE,WAAW;gBACvB,YAAY,EAAE,gBAAgB;gBAC9B,MAAM,EAAE,gBAAgB;gBACxB,MAA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,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;SAC3D;QACD,YAAY,EAAE;YACZ,WAAW,EAAE,gBAAgB,CAAC,WAAW,CAAC;YAC1C,WAAW,EACT,WAAW,KAAK,aAAa,IAAI,WAAW,KAAK,UAAU;gBACzD,CAAC,CAAC;oBACE,mDAAmD;oBACnD,oDAAoD;iBACrD;gBACH,CAAC,CAAC,WAAW,KAAK,SAAS;oBACzB,CAAC,CAAC;wBACE,2DAA2D;wBAC3D,gDAAgD;qBACjD;oBACH,CAAC,CAAC;wBACE,iDAAiD;wBACjD,qDAAqD;qBACtD;SACV;QACD,SAAS,EAAE;YACT,OAAO,EAAE,QAAQ;YACjB,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,KAAK;YACb,UAAU,EAAE,EAAE;YACd,GAAG,OAAO,CAAC,SAAS;SACrB;KACF,CAAC,CAAC;AACL,CAAC"} |
| import { access } from "node:fs/promises"; | ||
| import { basename, join } from "node:path"; | ||
| import { ManifestNotFoundError, ManifestValidationError } from "../errors.js"; | ||
| import { readJsonFile } from "../utils/json.js"; | ||
| import { migrateManifest } from "./migrate.js"; | ||
| import { normalizeManifest } from "./normalize.js"; | ||
@@ -18,8 +20,27 @@ async function fileExists(filePath) { | ||
| if (!(await fileExists(sharedPath))) { | ||
| throw new Error(`No manifest found at ${sharedPath}`); | ||
| throw new ManifestNotFoundError(sharedPath); | ||
| } | ||
| const sharedInput = await readJsonFile(sharedPath); | ||
| const localInput = (await fileExists(localPath)) | ||
| ? await readJsonFile(localPath) | ||
| : undefined; | ||
| let sharedInput; | ||
| try { | ||
| sharedInput = await readJsonFile(sharedPath); | ||
| } | ||
| catch (error) { | ||
| const reason = error instanceof Error ? error.message : "unknown error"; | ||
| throw new ManifestValidationError([`Failed to parse ${sharedPath}: ${reason}`]); | ||
| } | ||
| // Migrate manifest to current schema version if needed | ||
| sharedInput = migrateManifest(sharedInput); | ||
| let localInput; | ||
| if (await fileExists(localPath)) { | ||
| try { | ||
| localInput = await readJsonFile(localPath); | ||
| } | ||
| catch (error) { | ||
| const reason = error instanceof Error ? error.message : "unknown error"; | ||
| throw new ManifestValidationError([`Failed to parse ${localPath}: ${reason}`]); | ||
| } | ||
| } | ||
| else { | ||
| localInput = undefined; | ||
| } | ||
| return { | ||
@@ -26,0 +47,0 @@ manifest: normalizeManifest(sharedInput, { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/manifest/load.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AASnD,KAAK,UAAU,UAAU,CAAC,QAAgB;IACxC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,GAAW,EACX,QAA0D;IAE1D,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,yBAAyB,CAAC,CAAC;IAEvD,IAAI,CAAC,CAAC,MAAM,UAAU,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,wBAAwB,UAAU,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,WAAW,GAAG,MAAM,YAAY,CAAU,UAAU,CAAC,CAAC;IAC5D,MAAM,UAAU,GAAG,CAAC,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC;QAC9C,CAAC,CAAC,MAAM,YA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CAAC,GAAG,CAAC;YACnD,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjE,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC;SACnE,CAAC;QACF,UAAU;QACV,SAAS,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;KAC5D,CAAC;AACJ,CAAC"} |
| import { buildRecommendedManifest } from "./defaults.js"; | ||
| import { localOverrideSchema, manifestSchema, } from "./schema.js"; | ||
| import { isRecord } from "../utils/json.js"; | ||
| import { validatePresetIds, VALID_PRESET_IDS } from "../mcp/presets.js"; | ||
| import { ManifestValidationError } from "../errors.js"; | ||
| function mergePlainObjects(base, override) { | ||
@@ -38,4 +40,12 @@ if (override === undefined) { | ||
| : mergePlainObjects(mergedShared, localOverrideSchema.parse(options.localOverride)); | ||
| return manifestSchema.parse(mergedWithLocal); | ||
| const parsed = manifestSchema.parse(mergedWithLocal); | ||
| const { invalid } = validatePresetIds(parsed.generated.mcpPresets); | ||
| if (invalid.length > 0) { | ||
| throw new ManifestValidationError([ | ||
| `Unknown MCP preset IDs: ${invalid.join(", ")}.`, | ||
| `Valid preset IDs are: ${VALID_PRESET_IDS.join(", ")}.`, | ||
| ]); | ||
| } | ||
| return parsed; | ||
| } | ||
| //# sourceMappingURL=normalize.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"normalize.js","sourceRoot":"","sources":["../../src/manifest/normalize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EACL,mBAAmB,EACnB,cAAc,GAGf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB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AAChB,CAAC"} |
@@ -14,2 +14,6 @@ import { z } from "zod"; | ||
| "api-service": "api-service"; | ||
| "full-stack": "full-stack"; | ||
| library: "library"; | ||
| "cli-tool": "cli-tool"; | ||
| mobile: "mobile"; | ||
| }>; | ||
@@ -46,2 +50,6 @@ export declare const setupDepthSchema: z.ZodEnum<{ | ||
| "api-service": "api-service"; | ||
| "full-stack": "full-stack"; | ||
| library: "library"; | ||
| "cli-tool": "cli-tool"; | ||
| mobile: "mobile"; | ||
| }>; | ||
@@ -81,2 +89,4 @@ framework: z.ZodEnum<{ | ||
| mcp: z.ZodBoolean; | ||
| cursor: z.ZodOptional<z.ZodBoolean>; | ||
| windsurf: z.ZodOptional<z.ZodBoolean>; | ||
| }, z.core.$strict>; | ||
@@ -149,2 +159,136 @@ dashboard: z.ZodOptional<z.ZodObject<{ | ||
| }, z.core.$strict>>; | ||
| webApp: z.ZodOptional<z.ZodObject<{ | ||
| styling: z.ZodEnum<{ | ||
| tailwind: "tailwind"; | ||
| custom: "custom"; | ||
| }>; | ||
| components: z.ZodEnum<{ | ||
| "shadcn-ui": "shadcn-ui"; | ||
| "custom-design-system": "custom-design-system"; | ||
| }>; | ||
| stateManagement: z.ZodEnum<{ | ||
| custom: "custom"; | ||
| "local-first": "local-first"; | ||
| zustand: "zustand"; | ||
| redux: "redux"; | ||
| }>; | ||
| dataFetching: z.ZodEnum<{ | ||
| custom: "custom"; | ||
| "tanstack-query": "tanstack-query"; | ||
| swr: "swr"; | ||
| }>; | ||
| forms: z.ZodEnum<{ | ||
| custom: "custom"; | ||
| "react-hook-form-zod": "react-hook-form-zod"; | ||
| }>; | ||
| testing: z.ZodArray<z.ZodEnum<{ | ||
| vitest: "vitest"; | ||
| rtl: "rtl"; | ||
| playwright: "playwright"; | ||
| }>>; | ||
| auth: z.ZodEnum<{ | ||
| none: "none"; | ||
| custom: "custom"; | ||
| jwt: "jwt"; | ||
| session: "session"; | ||
| clerk: "clerk"; | ||
| "next-auth": "next-auth"; | ||
| }>; | ||
| }, z.core.$strict>>; | ||
| fullStack: z.ZodOptional<z.ZodObject<{ | ||
| styling: z.ZodEnum<{ | ||
| tailwind: "tailwind"; | ||
| custom: "custom"; | ||
| }>; | ||
| components: z.ZodEnum<{ | ||
| "shadcn-ui": "shadcn-ui"; | ||
| "custom-design-system": "custom-design-system"; | ||
| }>; | ||
| apiStyle: z.ZodEnum<{ | ||
| rest: "rest"; | ||
| graphql: "graphql"; | ||
| trpc: "trpc"; | ||
| }>; | ||
| orm: z.ZodEnum<{ | ||
| none: "none"; | ||
| prisma: "prisma"; | ||
| drizzle: "drizzle"; | ||
| }>; | ||
| auth: z.ZodEnum<{ | ||
| none: "none"; | ||
| custom: "custom"; | ||
| jwt: "jwt"; | ||
| clerk: "clerk"; | ||
| "next-auth": "next-auth"; | ||
| }>; | ||
| testing: z.ZodArray<z.ZodEnum<{ | ||
| vitest: "vitest"; | ||
| rtl: "rtl"; | ||
| playwright: "playwright"; | ||
| supertest: "supertest"; | ||
| }>>; | ||
| }, z.core.$strict>>; | ||
| library: z.ZodOptional<z.ZodObject<{ | ||
| bundler: z.ZodEnum<{ | ||
| custom: "custom"; | ||
| tsup: "tsup"; | ||
| "vite-lib": "vite-lib"; | ||
| rollup: "rollup"; | ||
| }>; | ||
| testing: z.ZodArray<z.ZodEnum<{ | ||
| vitest: "vitest"; | ||
| rtl: "rtl"; | ||
| }>>; | ||
| docs: z.ZodEnum<{ | ||
| none: "none"; | ||
| typedoc: "typedoc"; | ||
| storybook: "storybook"; | ||
| }>; | ||
| publishTarget: z.ZodEnum<{ | ||
| npm: "npm"; | ||
| jsr: "jsr"; | ||
| private: "private"; | ||
| }>; | ||
| }, z.core.$strict>>; | ||
| cliTool: z.ZodOptional<z.ZodObject<{ | ||
| runtime: z.ZodEnum<{ | ||
| node: "node"; | ||
| bun: "bun"; | ||
| deno: "deno"; | ||
| }>; | ||
| argParser: z.ZodEnum<{ | ||
| custom: "custom"; | ||
| commander: "commander"; | ||
| yargs: "yargs"; | ||
| citty: "citty"; | ||
| }>; | ||
| testing: z.ZodArray<z.ZodEnum<{ | ||
| vitest: "vitest"; | ||
| }>>; | ||
| publishTarget: z.ZodEnum<{ | ||
| npm: "npm"; | ||
| jsr: "jsr"; | ||
| private: "private"; | ||
| }>; | ||
| }, z.core.$strict>>; | ||
| mobile: z.ZodOptional<z.ZodObject<{ | ||
| framework: z.ZodEnum<{ | ||
| expo: "expo"; | ||
| "react-native-cli": "react-native-cli"; | ||
| }>; | ||
| styling: z.ZodEnum<{ | ||
| custom: "custom"; | ||
| nativewind: "nativewind"; | ||
| stylesheet: "stylesheet"; | ||
| }>; | ||
| navigation: z.ZodEnum<{ | ||
| custom: "custom"; | ||
| "expo-router": "expo-router"; | ||
| "react-navigation": "react-navigation"; | ||
| }>; | ||
| testing: z.ZodArray<z.ZodEnum<{ | ||
| rtl: "rtl"; | ||
| jest: "jest"; | ||
| }>>; | ||
| }, z.core.$strict>>; | ||
| conventions: z.ZodObject<{ | ||
@@ -188,2 +332,4 @@ routing: z.ZodOptional<z.ZodString>; | ||
| mcp: z.ZodOptional<z.ZodBoolean>; | ||
| cursor: z.ZodOptional<z.ZodBoolean>; | ||
| windsurf: z.ZodOptional<z.ZodBoolean>; | ||
| }, z.core.$strict>>; | ||
@@ -190,0 +336,0 @@ generated: z.ZodOptional<z.ZodObject<{ |
| import { z } from "zod"; | ||
| export const frameworkSchema = z.enum(["react", "nextjs", "vite-react", "express", "fastify", "hono"]); | ||
| export const projectTypeSchema = z.enum(["dashboard", "web-app", "api-service"]); | ||
| export const projectTypeSchema = z.enum(["dashboard", "web-app", "api-service", "full-stack", "library", "cli-tool", "mobile"]); | ||
| export const setupDepthSchema = z.enum(["recommended", "semi-custom", "advanced"]); | ||
@@ -32,2 +32,4 @@ export const setupModeSchema = z.enum(["base", "skills", "agents", "full"]); | ||
| mcp: z.boolean(), | ||
| cursor: z.boolean().optional(), | ||
| windsurf: z.boolean().optional(), | ||
| }) | ||
@@ -58,2 +60,52 @@ .strict(), | ||
| .optional(), | ||
| webApp: z | ||
| .object({ | ||
| styling: z.enum(["tailwind", "custom"]), | ||
| components: z.enum(["shadcn-ui", "custom-design-system"]), | ||
| stateManagement: z.enum(["local-first", "zustand", "redux", "custom"]), | ||
| dataFetching: z.enum(["tanstack-query", "swr", "custom"]), | ||
| forms: z.enum(["react-hook-form-zod", "custom"]), | ||
| testing: z.array(z.enum(["vitest", "rtl", "playwright"])).min(1), | ||
| auth: z.enum(["clerk", "next-auth", "jwt", "session", "none", "custom"]), | ||
| }) | ||
| .strict() | ||
| .optional(), | ||
| fullStack: z | ||
| .object({ | ||
| styling: z.enum(["tailwind", "custom"]), | ||
| components: z.enum(["shadcn-ui", "custom-design-system"]), | ||
| apiStyle: z.enum(["rest", "trpc", "graphql"]), | ||
| orm: z.enum(["prisma", "drizzle", "none"]), | ||
| auth: z.enum(["clerk", "next-auth", "jwt", "none", "custom"]), | ||
| testing: z.array(z.enum(["vitest", "rtl", "playwright", "supertest"])).min(1), | ||
| }) | ||
| .strict() | ||
| .optional(), | ||
| library: z | ||
| .object({ | ||
| bundler: z.enum(["tsup", "vite-lib", "rollup", "custom"]), | ||
| testing: z.array(z.enum(["vitest", "rtl"])).min(1), | ||
| docs: z.enum(["typedoc", "storybook", "none"]), | ||
| publishTarget: z.enum(["npm", "jsr", "private"]), | ||
| }) | ||
| .strict() | ||
| .optional(), | ||
| cliTool: z | ||
| .object({ | ||
| runtime: z.enum(["node", "bun", "deno"]), | ||
| argParser: z.enum(["commander", "yargs", "citty", "custom"]), | ||
| testing: z.array(z.enum(["vitest"])).min(1), | ||
| publishTarget: z.enum(["npm", "jsr", "private"]), | ||
| }) | ||
| .strict() | ||
| .optional(), | ||
| mobile: z | ||
| .object({ | ||
| framework: z.enum(["expo", "react-native-cli"]), | ||
| styling: z.enum(["nativewind", "stylesheet", "custom"]), | ||
| navigation: z.enum(["expo-router", "react-navigation", "custom"]), | ||
| testing: z.array(z.enum(["jest", "rtl"])).min(1), | ||
| }) | ||
| .strict() | ||
| .optional(), | ||
| conventions: z | ||
@@ -96,2 +148,4 @@ .object({ | ||
| mcp: z.boolean().optional(), | ||
| cursor: z.boolean().optional(), | ||
| windsurf: z.boolean().optional(), | ||
| }) | ||
@@ -98,0 +152,0 @@ .strict() |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/manifest/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AACvG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;AACjF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC,CAAC;AACnF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAE9E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,CAAC;IACN,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,OAAO,EAAE,CAAC;SACP,MAAM,CAAC;QACN,I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AAE,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,KAAK,EAAE,gBAAgB,CAAC,QAAQ,EAAE;KACnC,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,EAAE;IACb,OAAO,EAAE,CAAC;SACP,MAAM,CAAC;QACN,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC3B,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC9B,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACjC,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,EAAE;IACb,SAAS,EAAE,CAAC;SACT,MAAM,CAAC;QACN,OAAO,EAAE,gBAAgB,CAAC,QAAQ,EAAE;QACpC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;KAC3C,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,EAAE;IACb,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzD,CAAC;KACD,MAAM,EAAE,CAAC"} |
@@ -1,3 +0,3 @@ | ||
| import type { Manifest } from "../manifest/schema.js"; | ||
| export declare const ADAPTER_TARGETS: readonly ["codex", "copilot", "claude", "mcp"]; | ||
| import type { Manifest, ProjectType } from "../manifest/schema.js"; | ||
| export declare const ADAPTER_TARGETS: readonly ["codex", "copilot", "claude", "mcp", "cursor", "windsurf"]; | ||
| export type AdapterTarget = (typeof ADAPTER_TARGETS)[number]; | ||
@@ -17,3 +17,6 @@ export type PlanTarget = AdapterTarget | "shared"; | ||
| }; | ||
| export declare function getSkillsForType(type: ProjectType): string[]; | ||
| export declare function getAgentsForType(type: ProjectType): string[]; | ||
| export declare function getPromptPacksForType(type: ProjectType): string[]; | ||
| export declare const PROMPT_PACKS: string[]; | ||
| export declare const OUTPUT_MAP: OutputMapEntry[]; |
+221
-45
@@ -1,40 +0,121 @@ | ||
| export const ADAPTER_TARGETS = ["codex", "copilot", "claude", "mcp"]; | ||
| const CLAUDE_SKILLS = [ | ||
| "build-page-shell", | ||
| "build-data-table", | ||
| "build-filter-panel", | ||
| "build-kpi-cards", | ||
| "build-chart-section", | ||
| "connect-api-resource", | ||
| "build-form-flow", | ||
| "handle-loading-empty-error-states", | ||
| "enforce-accessibility-and-responsive-layout", | ||
| "write-dashboard-tests", | ||
| ]; | ||
| const CLAUDE_AGENTS = [ | ||
| "ui-builder", | ||
| "data-integrator", | ||
| "table-specialist", | ||
| "chart-specialist", | ||
| "form-builder", | ||
| "qa-reviewer", | ||
| ]; | ||
| export const PROMPT_PACKS = [ | ||
| "build-page-shell", | ||
| "build-data-table", | ||
| "build-filter-panel", | ||
| "build-kpi-cards", | ||
| "build-chart-section", | ||
| "connect-api-resource", | ||
| "build-form-flow", | ||
| "handle-loading-empty-error-states", | ||
| "enforce-accessibility-and-responsive-layout", | ||
| "write-dashboard-tests", | ||
| "ui-builder", | ||
| "data-integrator", | ||
| "table-specialist", | ||
| "chart-specialist", | ||
| "form-builder", | ||
| "qa-reviewer", | ||
| ]; | ||
| export const ADAPTER_TARGETS = ["codex", "copilot", "claude", "mcp", "cursor", "windsurf"]; | ||
| const SKILLS_BY_TYPE = { | ||
| dashboard: [ | ||
| "build-page-shell", | ||
| "build-data-table", | ||
| "build-filter-panel", | ||
| "build-kpi-cards", | ||
| "build-chart-section", | ||
| "connect-api-resource", | ||
| "build-form-flow", | ||
| "handle-loading-empty-error-states", | ||
| "enforce-accessibility-and-responsive-layout", | ||
| "write-dashboard-tests", | ||
| ], | ||
| "web-app": [ | ||
| "build-page-layout", | ||
| "build-navigation", | ||
| "build-auth-flow", | ||
| "build-state-management", | ||
| "build-api-integration", | ||
| "implement-routing", | ||
| "write-web-app-tests", | ||
| ], | ||
| "api-service": [ | ||
| "design-api-endpoints", | ||
| "build-request-validation", | ||
| "build-database-layer", | ||
| "build-auth-middleware", | ||
| "build-error-handling", | ||
| "implement-logging", | ||
| "write-api-tests", | ||
| "build-background-jobs", | ||
| "configure-deployment", | ||
| "document-api", | ||
| ], | ||
| "full-stack": [ | ||
| "build-page-layout", | ||
| "build-auth-flow", | ||
| "build-api-integration", | ||
| "build-database-layer", | ||
| "build-form-flow", | ||
| "implement-routing", | ||
| "write-full-stack-tests", | ||
| ], | ||
| library: [ | ||
| "design-public-api", | ||
| "write-library-tests", | ||
| "build-tree-shakeable-exports", | ||
| "generate-typedoc", | ||
| "configure-build", | ||
| ], | ||
| "cli-tool": [ | ||
| "design-commands", | ||
| "build-arg-parsing", | ||
| "implement-config-file", | ||
| "write-cli-tests", | ||
| "configure-package-bin", | ||
| ], | ||
| mobile: [ | ||
| "build-screen-layout", | ||
| "build-navigation-stack", | ||
| "build-auth-flow", | ||
| "connect-api-resource", | ||
| "write-mobile-tests", | ||
| ], | ||
| }; | ||
| const AGENTS_BY_TYPE = { | ||
| dashboard: [ | ||
| "ui-builder", | ||
| "data-integrator", | ||
| "table-specialist", | ||
| "chart-specialist", | ||
| "form-builder", | ||
| "qa-reviewer", | ||
| ], | ||
| "web-app": [ | ||
| "state-architect", | ||
| "api-integrator", | ||
| "auth-specialist", | ||
| "test-writer", | ||
| ], | ||
| "api-service": [ | ||
| "api-designer", | ||
| "data-layer-builder", | ||
| "error-handler", | ||
| "devops-reviewer", | ||
| ], | ||
| "full-stack": [ | ||
| "ui-builder", | ||
| "api-designer", | ||
| "data-layer-builder", | ||
| "auth-specialist", | ||
| "test-writer", | ||
| ], | ||
| library: [ | ||
| "api-designer", | ||
| "test-writer", | ||
| "docs-writer", | ||
| ], | ||
| "cli-tool": [ | ||
| "cli-designer", | ||
| "test-writer", | ||
| ], | ||
| mobile: [ | ||
| "ui-builder", | ||
| "auth-specialist", | ||
| "test-writer", | ||
| ], | ||
| }; | ||
| export function getSkillsForType(type) { | ||
| return SKILLS_BY_TYPE[type]; | ||
| } | ||
| export function getAgentsForType(type) { | ||
| return AGENTS_BY_TYPE[type]; | ||
| } | ||
| export function getPromptPacksForType(type) { | ||
| return [...SKILLS_BY_TYPE[type], ...AGENTS_BY_TYPE[type]]; | ||
| } | ||
| // Backward-compat export: flat list used when project type is unknown (e.g. prompt index without type context) | ||
| export const PROMPT_PACKS = getPromptPacksForType("dashboard"); | ||
| export const OUTPUT_MAP = [ | ||
@@ -131,3 +212,6 @@ { | ||
| }, | ||
| ...CLAUDE_SKILLS.map((skillName) => ({ | ||
| ...Object.values(SKILLS_BY_TYPE) | ||
| .flat() | ||
| .filter((v, i, a) => a.indexOf(v) === i) | ||
| .map((skillName) => ({ | ||
| target: "claude", | ||
@@ -140,5 +224,10 @@ path: `.claude/skills/${skillName}.md`, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.targets.claude && manifest.generated.skills, | ||
| applies: (manifest) => manifest.targets.claude && | ||
| manifest.generated.skills && | ||
| getSkillsForType(manifest.project.type).includes(skillName), | ||
| })), | ||
| ...CLAUDE_AGENTS.map((agentName) => ({ | ||
| ...Object.values(AGENTS_BY_TYPE) | ||
| .flat() | ||
| .filter((v, i, a) => a.indexOf(v) === i) | ||
| .map((agentName) => ({ | ||
| target: "claude", | ||
@@ -151,3 +240,5 @@ path: `.claude/agents/${agentName}.md`, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.targets.claude && manifest.generated.agents, | ||
| applies: (manifest) => manifest.targets.claude && | ||
| manifest.generated.agents && | ||
| getAgentsForType(manifest.project.type).includes(agentName), | ||
| })), | ||
@@ -184,3 +275,87 @@ { | ||
| }, | ||
| ...PROMPT_PACKS.map((promptName) => ({ | ||
| { | ||
| target: "cursor", | ||
| path: ".cursor/rules/context.mdc", | ||
| layer: "base", | ||
| scope: "shared", | ||
| purpose: "Cursor project context rule", | ||
| generated: true, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.targets.cursor === true, | ||
| }, | ||
| { | ||
| target: "cursor", | ||
| path: ".cursor/rules/coding-style.mdc", | ||
| layer: "base", | ||
| scope: "shared", | ||
| purpose: "Cursor coding style rule", | ||
| generated: true, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.targets.cursor === true, | ||
| }, | ||
| { | ||
| target: "cursor", | ||
| path: ".cursor/rules/framework.mdc", | ||
| layer: "base", | ||
| scope: "shared", | ||
| purpose: "Cursor framework-specific rule", | ||
| generated: true, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.targets.cursor === true, | ||
| }, | ||
| { | ||
| target: "cursor", | ||
| path: ".cursor/rules/code-review.mdc", | ||
| layer: "base", | ||
| scope: "shared", | ||
| purpose: "Cursor code review rule", | ||
| generated: true, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.targets.cursor === true, | ||
| }, | ||
| { | ||
| target: "windsurf", | ||
| path: ".windsurf/rules/context.md", | ||
| layer: "base", | ||
| scope: "shared", | ||
| purpose: "Windsurf project context rule", | ||
| generated: true, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.targets.windsurf === true, | ||
| }, | ||
| { | ||
| target: "windsurf", | ||
| path: ".windsurf/rules/coding-style.md", | ||
| layer: "base", | ||
| scope: "shared", | ||
| purpose: "Windsurf coding style rule", | ||
| generated: true, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.targets.windsurf === true, | ||
| }, | ||
| { | ||
| target: "windsurf", | ||
| path: ".windsurf/rules/framework.md", | ||
| layer: "base", | ||
| scope: "shared", | ||
| purpose: "Windsurf framework-specific rule", | ||
| generated: true, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.targets.windsurf === true, | ||
| }, | ||
| { | ||
| target: "windsurf", | ||
| path: ".windsurf/rules/code-review.md", | ||
| layer: "base", | ||
| scope: "shared", | ||
| purpose: "Windsurf code review rule", | ||
| generated: true, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.targets.windsurf === true, | ||
| }, | ||
| ...Object.values(SKILLS_BY_TYPE) | ||
| .flat() | ||
| .concat(Object.values(AGENTS_BY_TYPE).flat()) | ||
| .filter((v, i, a) => a.indexOf(v) === i) | ||
| .map((promptName) => ({ | ||
| target: "shared", | ||
@@ -193,5 +368,6 @@ path: `docs/ai-prompts/${promptName}.md`, | ||
| trustSensitive: false, | ||
| applies: (manifest) => manifest.generated.prompts === "pack", | ||
| applies: (manifest) => manifest.generated.prompts === "pack" && | ||
| getPromptPacksForType(manifest.project.type).includes(promptName), | ||
| })), | ||
| ]; | ||
| //# sourceMappingURL=output-map.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"output-map.js","sourceRoot":"","sources":["../../src/planner/output-map.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAU,CAAC;AAkB9E,MAAM,aAAa,GAAG;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,oBAAoB;IACpB,iBAAiB;IACjB,qBAAqB;IACrB,sBAAsB;IACtB,iBAAiB;IACjB,mCAAmC;IACnC,6CAA6C;IAC7C,uBAAuB;CACxB,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,YAAY;IACZ,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,aAAa;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,kBAAkB;IAClB,kBAAkB;IAClB,oBAAoB;IACpB,iBAAiB;IACjB,qBAAqB;IACrB,sBAAsB;IACtB,iBAAiB;IACjB,mCAAmC;IACnC,6CAA6C;IAC7C,uBAAuB;IACvB,YAAY;IACZ,iBAAiB;IACjB,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;IACd,aAAa;CACd,CAAC;AAEF,MAAM,C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ACD,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;SAC7B,IAAI,EAAE;SACN,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,EAAE,CAAC;SAC5C,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SACvC,GAAG,CAAiB,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACpC,MAAM,EAAE,QAAQ;QAChB,IAAI,EAAE,mBAAmB,UAAU,KAAK;QACxC,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,gBAAgB,UAAU,EAAE;QACrC,SAAS,EAAE,IAAI;QACf,cAAc,EAAE,KAAK;QACrB,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CACpB,QAAQ,CAAC,SAAS,CAAC,OAAO,KAAK,MAAM;YACrC,qBAAqB,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;KACpE,CAAC,CAAC;CACN,CAAC"} |
+21
-251
| import { basename } from "node:path"; | ||
| import { formatJson } from "../utils/json.js"; | ||
| import { PROMPT_PACKS } from "../planner/output-map.js"; | ||
| const PROMPT_TEMPLATE_DEFINITIONS = { | ||
| "build-page-shell": { | ||
| title: "Build Page Shell", | ||
| goal: "Create or refine a durable page shell with clear layout structure, route-level organization, and responsive behavior.", | ||
| useWhen: "Use this when a route needs the overall frame, header, navigation, spacing system, and page-level loading or empty states.", | ||
| focusAreas: [ | ||
| "Define the route-level structure and the main content regions before filling in detailed widgets.", | ||
| "Make navigation, titles, actions, and responsive breakpoints feel intentional instead of incidental.", | ||
| "Keep loading, empty, and error states visible at the page-shell level where they affect the whole experience.", | ||
| ], | ||
| deliverables: [ | ||
| "The page shell implementation and any supporting layout components.", | ||
| "A short summary of the structure decisions, responsive behavior, and state handling.", | ||
| "Any follow-up gaps or risks that still need product or design input.", | ||
| ], | ||
| }, | ||
| "build-data-table": { | ||
| title: "Build Data Table", | ||
| goal: "Implement a production-ready data table with clear columns, sorting, filtering, pagination, and state handling.", | ||
| useWhen: "Use this when a page needs dense data presentation, list management, or admin workflows driven by tabular data.", | ||
| focusAreas: [ | ||
| "Model the columns, row actions, empty states, and loading behavior around the real user task.", | ||
| "Keep filtering, sorting, and pagination predictable and easy to reason about.", | ||
| "Preserve accessibility, keyboard behavior, and legibility for dense information.", | ||
| ], | ||
| deliverables: [ | ||
| "The table implementation, helpers, and any state wiring required to support it.", | ||
| "A note describing how sorting, filtering, pagination, and row actions behave.", | ||
| "Tests or verification steps covering the most failure-prone table interactions.", | ||
| ], | ||
| }, | ||
| "build-filter-panel": { | ||
| title: "Build Filter Panel", | ||
| goal: "Build a filter panel or filter bar that makes narrowing results fast, understandable, and reversible.", | ||
| useWhen: "Use this when users need to refine lists, charts, dashboards, or search results with multiple controls.", | ||
| focusAreas: [ | ||
| "Choose controls that fit the data shape and are easy to reset or inspect at a glance.", | ||
| "Keep filter state synchronized with the page state, URL state, or request state as appropriate.", | ||
| "Make the active filter set visible so users understand why results changed.", | ||
| ], | ||
| deliverables: [ | ||
| "The filter UI and any associated state/query integration.", | ||
| "A summary of how filter state is initialized, applied, cleared, and persisted.", | ||
| "Verification that empty, loading, and no-match states remain understandable with filters applied.", | ||
| ], | ||
| }, | ||
| "build-kpi-cards": { | ||
| title: "Build KPI Cards", | ||
| goal: "Create KPI or summary cards that surface the most important metrics clearly and credibly.", | ||
| useWhen: "Use this when a page needs top-level metrics, health indicators, or summary snapshots before deeper detail.", | ||
| focusAreas: [ | ||
| "Prioritize the metrics, labels, trends, and comparisons that help users orient quickly.", | ||
| "Handle loading, stale data, missing values, and surprising values without visual confusion.", | ||
| "Keep the card hierarchy readable on both wide and narrow screens.", | ||
| ], | ||
| deliverables: [ | ||
| "The KPI card components and the data formatting needed to support them.", | ||
| "A short explanation of metric hierarchy, trend treatment, and fallback behavior.", | ||
| "Verification that cards remain legible and accurate across representative states.", | ||
| ], | ||
| }, | ||
| "build-chart-section": { | ||
| title: "Build Chart Section", | ||
| goal: "Implement a chart section that turns data into a readable story without sacrificing accuracy or usability.", | ||
| useWhen: "Use this when the page needs trends, comparisons, distributions, or time-series views supported by charts.", | ||
| focusAreas: [ | ||
| "Choose chart types, labels, legends, and supporting context that match the data question being answered.", | ||
| "Make edge cases explicit, including empty data, partial ranges, and suspicious outliers.", | ||
| "Pair the chart with surrounding copy or summary context so users can interpret it quickly.", | ||
| ], | ||
| deliverables: [ | ||
| "The chart section implementation with any data adapters or formatting helpers it needs.", | ||
| "A brief note explaining the chart choice, axis treatment, and edge-case handling.", | ||
| "Verification that the chart stays readable and accessible across screen sizes and states.", | ||
| ], | ||
| }, | ||
| "connect-api-resource": { | ||
| title: "Connect API Resource", | ||
| goal: "Wire a UI surface to an API resource with strong typing, state handling, and clear failure behavior.", | ||
| useWhen: "Use this when you need to fetch, mutate, cache, or normalize data from an API or backend resource.", | ||
| focusAreas: [ | ||
| "Keep request state explicit and typed, including loading, empty, success, stale, and error states.", | ||
| "Separate transport concerns from UI concerns so components stay easier to test and maintain.", | ||
| "Make retry behavior, optimistic updates, and error boundaries deliberate instead of accidental.", | ||
| ], | ||
| deliverables: [ | ||
| "The resource integration code plus the UI wiring that consumes it.", | ||
| "A summary of data flow, caching or invalidation behavior, and failure handling.", | ||
| "Tests or verification steps for the most important success and failure paths.", | ||
| ], | ||
| }, | ||
| "build-form-flow": { | ||
| title: "Build Form Flow", | ||
| goal: "Implement a form flow with clear validation, submission states, and user guidance from start to finish.", | ||
| useWhen: "Use this when the work involves data entry, editing, onboarding, configuration, or multi-step submission flows.", | ||
| focusAreas: [ | ||
| "Design the field structure, validation, and submission lifecycle around the real user journey.", | ||
| "Keep errors actionable and in-context, especially for async validation or server responses.", | ||
| "Ensure the form remains usable with keyboard navigation, screen readers, and narrow viewports.", | ||
| ], | ||
| deliverables: [ | ||
| "The form implementation, validation schema or rules, and submission handling.", | ||
| "A short summary of validation behavior, success handling, and failure recovery.", | ||
| "Verification that the form behaves correctly across happy path, invalid input, and submission failure cases.", | ||
| ], | ||
| }, | ||
| "handle-loading-empty-error-states": { | ||
| title: "Handle Loading, Empty, and Error States", | ||
| goal: "Design and implement resilient loading, empty, and error states so the experience stays understandable under real-world data conditions.", | ||
| useWhen: "Use this when a feature is functionally complete on the happy path but still feels fragile, confusing, or incomplete around asynchronous states and failures.", | ||
| focusAreas: [ | ||
| "Audit the user journey for loading, empty, partial, stale, retry, and failure states instead of only the success state.", | ||
| "Make fallback UI informative enough that users understand what happened and what they can do next.", | ||
| "Keep state handling consistent across page-level and component-level boundaries so the UI does not contradict itself.", | ||
| ], | ||
| deliverables: [ | ||
| "The UI and state-handling changes needed to cover loading, empty, and error scenarios properly.", | ||
| "A short summary of which edge states were added or improved and why.", | ||
| "Verification that the feature remains understandable across representative failure and no-data conditions.", | ||
| ], | ||
| }, | ||
| "enforce-accessibility-and-responsive-layout": { | ||
| title: "Enforce Accessibility and Responsive Layout", | ||
| goal: "Refine the implementation so accessibility, keyboard support, semantics, and responsive behavior are built into the feature rather than added as an afterthought.", | ||
| useWhen: "Use this when a UI surface is implemented but still needs a structured pass for accessibility quality, semantic clarity, and device responsiveness.", | ||
| focusAreas: [ | ||
| "Review headings, landmarks, labels, focus order, and keyboard interaction before treating the UI as complete.", | ||
| "Check how layout, density, spacing, and overflow behave across narrow, medium, and wide screens.", | ||
| "Prefer adjustments that improve both usability and maintainability instead of layering one-off fixes on top.", | ||
| ], | ||
| deliverables: [ | ||
| "The accessibility and responsive-layout improvements required for the feature.", | ||
| "A short note describing the key improvements and any remaining accessibility risks.", | ||
| "Verification steps covering keyboard behavior, semantics, and responsive layout expectations.", | ||
| ], | ||
| }, | ||
| "write-dashboard-tests": { | ||
| title: "Write Feature Tests", | ||
| goal: "Add focused automated tests that prove the implementation works across the most important user flows and failure paths.", | ||
| useWhen: "Use this when the implementation exists but confidence is still too dependent on manual checking or the happy path only.", | ||
| focusAreas: [ | ||
| "Choose the test level that best matches the behavior under risk instead of defaulting blindly to unit or integration tests.", | ||
| "Cover realistic user-visible outcomes, including loading, empty, error, validation, or permission-sensitive behavior where relevant.", | ||
| "Keep the tests readable enough that future contributors can understand what behavior is protected.", | ||
| ], | ||
| deliverables: [ | ||
| "Automated tests that protect the highest-risk behavior in the feature.", | ||
| "A brief summary of what the new tests cover and what they intentionally do not cover yet.", | ||
| "Notes on any remaining blind spots that still need manual verification or future coverage.", | ||
| ], | ||
| }, | ||
| "ui-builder": { | ||
| title: "UI Builder", | ||
| goal: "Design and implement cohesive UI structure that feels intentional, consistent, and maintainable.", | ||
| useWhen: "Use this when the task spans multiple components, layout decisions, or visual hierarchy choices.", | ||
| focusAreas: [ | ||
| "Work from page structure and information hierarchy down to component detail.", | ||
| "Reuse existing patterns or design-system primitives before inventing new ones.", | ||
| "Keep implementation readable so future UI changes do not require large rewrites.", | ||
| ], | ||
| deliverables: [ | ||
| "The relevant UI implementation and any shared components needed to support it.", | ||
| "A summary of the composition decisions and reused patterns.", | ||
| "Notes on any assumptions, tradeoffs, or visual follow-ups still needed.", | ||
| ], | ||
| }, | ||
| "data-integrator": { | ||
| title: "Data Integrator", | ||
| goal: "Connect application state, API resources, and presentation components into a stable user-facing flow.", | ||
| useWhen: "Use this when the work crosses fetch logic, transformation, UI binding, and state synchronization boundaries.", | ||
| focusAreas: [ | ||
| "Trace the data flow end to end before changing component behavior.", | ||
| "Keep transformation logic explicit so mismatches between backend data and UI state are easy to debug.", | ||
| "Make loading, error, and stale-data transitions predictable across the whole flow.", | ||
| ], | ||
| deliverables: [ | ||
| "The data integration changes across fetch, transform, and UI layers.", | ||
| "A short explanation of state boundaries and data ownership.", | ||
| "Verification steps that prove the integrated flow works across realistic scenarios.", | ||
| ], | ||
| }, | ||
| "table-specialist": { | ||
| title: "Table Specialist", | ||
| goal: "Refine tabular workflows for clarity, speed, and robustness in dense data experiences.", | ||
| useWhen: "Use this when the table is the main working surface and needs careful attention to interactions and edge cases.", | ||
| focusAreas: [ | ||
| "Optimize discoverability of sorting, filtering, row actions, and bulk actions.", | ||
| "Protect usability in dense states with long text, many columns, or mixed row states.", | ||
| "Keep implementation modular enough to evolve without turning the table into a monolith.", | ||
| ], | ||
| deliverables: [ | ||
| "Improvements to the table surface and its supporting interaction model.", | ||
| "A summary of the interaction model and the edge cases it now covers.", | ||
| "Verification that the table remains predictable under realistic heavy-use scenarios.", | ||
| ], | ||
| }, | ||
| "chart-specialist": { | ||
| title: "Chart Specialist", | ||
| goal: "Refine charts and surrounding data presentation so they are both analytically useful and easy to read.", | ||
| useWhen: "Use this when data visualization is central to the task and chart quality matters as much as raw implementation.", | ||
| focusAreas: [ | ||
| "Tune chart semantics, labels, legends, and supporting UI for the actual user question.", | ||
| "Avoid visual noise and misleading encodings when data is sparse, skewed, or incomplete.", | ||
| "Make sure the chart section still communicates the right story without hover interactions.", | ||
| ], | ||
| deliverables: [ | ||
| "The chart refinements and any supporting copy, formatting, or data-shaping changes.", | ||
| "A note describing why the chosen visualization is a fit for the data.", | ||
| "Verification that the visualization remains understandable across common edge cases.", | ||
| ], | ||
| }, | ||
| "form-builder": { | ||
| title: "Form Builder", | ||
| goal: "Build reliable forms that are easy to complete, validate, and recover from when something goes wrong.", | ||
| useWhen: "Use this when forms are the primary interaction surface and need thoughtful UX plus dependable implementation.", | ||
| focusAreas: [ | ||
| "Reduce ambiguity in labels, defaults, validation, and confirmation states.", | ||
| "Treat async submission and server-side validation as first-class concerns.", | ||
| "Keep forms composable so later edits do not require rewriting the entire flow.", | ||
| ], | ||
| deliverables: [ | ||
| "The form flow implementation and any supporting abstractions required to keep it maintainable.", | ||
| "A brief summary of validation, error handling, and success feedback decisions.", | ||
| "Verification steps covering both user-facing UX and implementation correctness.", | ||
| ], | ||
| }, | ||
| "qa-reviewer": { | ||
| title: "QA Reviewer", | ||
| goal: "Review an implementation for regressions, missing states, and quality gaps before it moves on.", | ||
| useWhen: "Use this when a feature is implemented and needs a structured pass for bugs, edge cases, and verification coverage.", | ||
| focusAreas: [ | ||
| "Look for behavior regressions, missing states, accessibility gaps, and weak error handling first.", | ||
| "Review the code path against realistic user flows, not just the happy path.", | ||
| "Call out concrete follow-up checks or tests when risk remains.", | ||
| ], | ||
| deliverables: [ | ||
| "A concise review summary ordered by the most important findings first.", | ||
| "Clear notes on missing tests, residual risks, or behavior that still needs manual verification.", | ||
| "If no issues are found, an explicit statement that the pass was clean plus any remaining blind spots.", | ||
| ], | ||
| }, | ||
| }; | ||
| import { getPromptPacksForType } from "../planner/output-map.js"; | ||
| import { PROMPT_TEMPLATE_DEFINITIONS } from "./prompt-templates.js"; | ||
| import { getPresetById } from "../mcp/presets.js"; | ||
| function describeProjectType(manifest) { | ||
@@ -262,5 +22,2 @@ if (manifest.project.type === "web-app") | ||
| } | ||
| function formatBullets(items) { | ||
| return items.map((item) => `- ${item}`).join("\n"); | ||
| } | ||
| function buildProjectContext(manifest) { | ||
@@ -287,2 +44,5 @@ const enabledTargets = Object.entries(manifest.targets) | ||
| } | ||
| if (manifest.project.type === "web-app" && manifest.webApp) { | ||
| context.push(`Styling: ${manifest.webApp.styling}`, `Components: ${manifest.webApp.components}`, `State management: ${manifest.webApp.stateManagement}`, `Data fetching: ${manifest.webApp.dataFetching}`, `Forms: ${manifest.webApp.forms}`, `Auth: ${manifest.webApp.auth}`, `Testing: ${manifest.webApp.testing.join(", ")}`); | ||
| } | ||
| return context; | ||
@@ -353,3 +113,3 @@ } | ||
| ...(manifest.generated.prompts === "pack" | ||
| ? PROMPT_PACKS.map((promptName) => `${promptName}.md`) | ||
| ? getPromptPacksForType(manifest.project.type).map((promptName) => `${promptName}.md`) | ||
| : []), | ||
@@ -385,6 +145,16 @@ ]; | ||
| function renderEnvExample(manifest) { | ||
| const presetLines = manifest.generated.mcpPresets.length === 0 | ||
| ? ["EXAMPLE_API_KEY=replace-me"] | ||
| : manifest.generated.mcpPresets.map((preset) => `${preset.toUpperCase().replaceAll(/[^A-Z0-9]+/g, "_")}_TOKEN=replace-me`); | ||
| return `${presetLines.join("\n")}\n`; | ||
| if (manifest.generated.mcpPresets.length === 0) { | ||
| return "EXAMPLE_API_KEY=replace-me\n"; | ||
| } | ||
| const lines = []; | ||
| for (const presetId of manifest.generated.mcpPresets) { | ||
| const preset = getPresetById(presetId); | ||
| if (!preset || Object.keys(preset.env).length === 0) | ||
| continue; | ||
| for (const [key] of Object.entries(preset.env)) { | ||
| lines.push(`# ${preset.name} — ${preset.description}`); | ||
| lines.push(`${key}=`); | ||
| } | ||
| } | ||
| return lines.length > 0 ? `${lines.join("\n")}\n` : "# No environment variables required for the selected MCP presets.\n"; | ||
| } | ||
@@ -391,0 +161,0 @@ function renderLocalManifest() { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/render/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAWxD,MAAM,2BAA2B,GAA6C;IAC5E,kBAAkB,EAAE;QAClB,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,uHAAuH;QAC7H,OAAO,EAAE,4HAA4H;QACrI,UAAU,EAAE;YACV,mGAAmG;YACnG,sGAAsG;YACtG,+GAA+G;SAChH;QACD,YAAY,EAAE;YACZ,qEAAqE;YACrE,sFAAsF;YACtF,sEAAsE;SACvE;KACF;IACD,kBAAkB,EAAE;QAClB,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,iHAAiH;QACvH,OAAO,EAAE,iHAAiH;QAC1H,UAAU,EAAE;YACV,+FAA+F;YAC/F,+EAA+E;YAC/E,kFAAkF;SACnF;QACD,YAAY,EAAE;YACZ,iFAAiF;YACjF,+EAA+E;YAC/E,iFAAiF;SAClF;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AO,EAAE,UAAU,CAAC,QAAQ,CAAC;gBAC7B,cAAc,EAAE,IAAI,CAAC,cAAc;aACpC,CAAC;QACJ,KAAK,yBAAyB;YAC5B,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,mBAAmB,EAAE;gBAC9B,cAAc,EAAE,IAAI,CAAC,cAAc;aACpC,CAAC;QACJ,KAAK,yBAAyB;YAC5B,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,qBAAqB,CAAC,QAAQ,CAAC;gBACxC,cAAc,EAAE,IAAI,CAAC,cAAc;aACpC,CAAC;QACJ,KAAK,8BAA8B;YACjC,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,qBAAqB,CAAC,QAAQ,CAAC;gBACxC,cAAc,EAAE,IAAI,CAAC,cAAc;aACpC,CAAC;QACJ,KAAK,2BAA2B;YAC9B,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,iBAAiB,CAAC,QAAQ,CAAC;gBACpC,cAAc,EAAE,IAAI,CAAC,cAAc;aACpC,CAAC;QACJ,KAAK,cAAc;YACjB,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,gBAAgB,CAAC,QAAQ,CAAC;gBACnC,cAAc,EAAE,IAAI,CAAC,cAAc;aACpC,CAAC;QACJ;YACE,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC;gBAC7C,cAAc,EAAE,IAAI,CAAC,cAAc;aACpC,CAAC;IACN,CAAC;AACH,CAAC"} |
| export type TemplateDefinition = { | ||
| id: string; | ||
| name: string; | ||
| projectType: "dashboard" | "web-app" | "api-service"; | ||
| projectType: "dashboard" | "web-app" | "api-service" | "full-stack" | "library" | "cli-tool" | "mobile"; | ||
| framework: "react" | "nextjs" | "vite-react" | "express" | "fastify" | "hono"; | ||
@@ -6,0 +6,0 @@ setupDepth: "recommended" | "semi-custom"; |
@@ -65,3 +65,111 @@ export const TEMPLATE_REGISTRY = [ | ||
| }, | ||
| { | ||
| id: "web-app-vite-react-recommended", | ||
| name: "Web App Vite React Recommended", | ||
| projectType: "web-app", | ||
| framework: "vite-react", | ||
| setupDepth: "recommended", | ||
| defaultTargets: ["codex", "copilot", "claude"], | ||
| description: "Lean Vite React web app setup with shared AI workspace defaults.", | ||
| }, | ||
| { | ||
| id: "api-service-hono-recommended", | ||
| name: "API Service Hono Recommended", | ||
| projectType: "api-service", | ||
| framework: "hono", | ||
| setupDepth: "recommended", | ||
| defaultTargets: ["codex", "copilot", "claude"], | ||
| description: "Edge-first Hono API service setup with validation and testing defaults.", | ||
| }, | ||
| { | ||
| id: "api-service-express-semi-custom", | ||
| name: "API Service Express Semi-custom", | ||
| projectType: "api-service", | ||
| framework: "express", | ||
| setupDepth: "semi-custom", | ||
| defaultTargets: ["codex", "copilot", "claude", "mcp"], | ||
| description: "Configurable Express API service starter with broader tool selection.", | ||
| }, | ||
| { | ||
| id: "api-service-fastify-semi-custom", | ||
| name: "API Service Fastify Semi-custom", | ||
| projectType: "api-service", | ||
| framework: "fastify", | ||
| setupDepth: "semi-custom", | ||
| defaultTargets: ["codex", "copilot", "claude", "mcp"], | ||
| description: "Configurable Fastify API service starter with broader tool selection.", | ||
| }, | ||
| { | ||
| id: "full-stack-nextjs-recommended", | ||
| name: "Full-Stack Next.js Recommended", | ||
| projectType: "full-stack", | ||
| framework: "nextjs", | ||
| setupDepth: "recommended", | ||
| defaultTargets: ["codex", "copilot", "claude"], | ||
| description: "Opinionated full-stack Next.js setup with frontend and API route defaults.", | ||
| }, | ||
| { | ||
| id: "full-stack-nextjs-semi-custom", | ||
| name: "Full-Stack Next.js Semi-custom", | ||
| projectType: "full-stack", | ||
| framework: "nextjs", | ||
| setupDepth: "semi-custom", | ||
| defaultTargets: ["codex", "copilot", "claude", "mcp"], | ||
| description: "Configurable full-stack Next.js starter with broader tool selection.", | ||
| }, | ||
| { | ||
| id: "library-react-recommended", | ||
| name: "Library React Recommended", | ||
| projectType: "library", | ||
| framework: "react", | ||
| setupDepth: "recommended", | ||
| defaultTargets: ["codex", "copilot", "claude"], | ||
| description: "Opinionated React component library setup with tsup bundling and testing defaults.", | ||
| }, | ||
| { | ||
| id: "library-react-semi-custom", | ||
| name: "Library Semi-custom", | ||
| projectType: "library", | ||
| framework: "react", | ||
| setupDepth: "semi-custom", | ||
| defaultTargets: ["codex", "copilot", "claude", "mcp"], | ||
| description: "Configurable library starter with broader tool selection.", | ||
| }, | ||
| { | ||
| id: "cli-tool-node-recommended", | ||
| name: "CLI Tool Node Recommended", | ||
| projectType: "cli-tool", | ||
| framework: "express", | ||
| setupDepth: "recommended", | ||
| defaultTargets: ["codex", "copilot", "claude"], | ||
| description: "Opinionated Node.js CLI tool setup with arg parsing and testing defaults.", | ||
| }, | ||
| { | ||
| id: "cli-tool-node-semi-custom", | ||
| name: "CLI Tool Node Semi-custom", | ||
| projectType: "cli-tool", | ||
| framework: "express", | ||
| setupDepth: "semi-custom", | ||
| defaultTargets: ["codex", "copilot", "claude", "mcp"], | ||
| description: "Configurable Node.js CLI tool starter with broader tool selection.", | ||
| }, | ||
| { | ||
| id: "mobile-expo-recommended", | ||
| name: "Mobile Expo Recommended", | ||
| projectType: "mobile", | ||
| framework: "react", | ||
| setupDepth: "recommended", | ||
| defaultTargets: ["codex", "copilot", "claude"], | ||
| description: "Opinionated Expo/React Native mobile app setup with navigation and testing defaults.", | ||
| }, | ||
| { | ||
| id: "mobile-expo-semi-custom", | ||
| name: "Mobile Expo Semi-custom", | ||
| projectType: "mobile", | ||
| framework: "react", | ||
| setupDepth: "semi-custom", | ||
| defaultTargets: ["codex", "copilot", "claude", "mcp"], | ||
| description: "Configurable Expo/React Native mobile starter with broader tool selection.", | ||
| }, | ||
| ]; | ||
| //# sourceMappingURL=registry.js.map |
@@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CAAC;QACrD,WAAW,EAAE,oEAAoE;KAClF;IACD;QACE,EAAE,EAAE,iCAAiC;QACrC,IAAI,EAAE,iCAAiC;QACvC,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,aAAa;QACzB,cAAc,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;QAC9C,WAAW,EAAE,oFAAoF;KAClG;IACD;QACE,EAAE,EAAE,iCAAiC;QACrC,IAAI,EAAE,iCAAiC;QACvC,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,aAAa;QACzB,cAAc,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;QAC9C,WAAW,EAAE,0FAA0F;KACxG;CACF,CAAC"} | ||
| {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,MAAM,iBAAiB,GAAyB;IACrD;QACE,EAAE,EAAE,8BAA8B;QAClC,IAAI,EAAE,+BAA+B;QACrC,WAAW,EAAE,WAAW;QACxB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,aAAa;QACzB,cAAc,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;QAC9C,WAAW,EAAE,wEAAwE;KACtF;IACD;QACE,EAAE,EAAE,kCAAkC;QACtC,IAAI,EAAE,kCAAkC;QACxC,WAAW,EAAE,WAAW;QACxB,SAAS,EAAE,YAAY;QACvB,UAAU,EAAE,aAAa;QACzB,cAAc,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;QAC9C,WAAW,EAAE,oEAAoE;KAClF;IACD;QACE,EAAE,EAAE,6BAA6B;QACjC,IAAI,EAAE,6BAA6B;QACnC,WAAW,EAAE,WAAW;QACxB,SAAS,EAAE,OAAO;QAClB,UAAU,EAAE,aAAa;QACzB,cAAc,EAAE,CAAC,OAAO,EAAE,SAAS,E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AE,KAAK,CAAC;QACrD,WAAW,EAAE,4EAA4E;KAC1F;CACF,CAAC"} |
+11
-4
| { | ||
| "name": "agenv-cli", | ||
| "version": "1.0.0", | ||
| "description": "Bootstrap a portable, reviewable AI workspace for web development repositories.", | ||
| "version": "2.0.0", | ||
| "description": "Generate portable AI workspace configs for any web development project — one manifest for Copilot, Claude, Codex, and MCP.", | ||
| "keywords": [ | ||
@@ -14,6 +14,13 @@ "ai", | ||
| "claude", | ||
| "cursor", | ||
| "windsurf", | ||
| "workspace", | ||
| "dashboard", | ||
| "web-app", | ||
| "api-service", | ||
| "frontend", | ||
| "internal-tools" | ||
| "internal-tools", | ||
| "agents-md", | ||
| "claude-code", | ||
| "ai-rules", | ||
| "ai-config" | ||
| ], | ||
@@ -20,0 +27,0 @@ "repository": { |
+89
-76
| # agenv | ||
| `agenv` is an npm package for bootstrapping a portable, reviewable AI workspace for web development repositories. | ||
| [](https://www.npmjs.com/package/agenv-cli) | ||
| [](LICENSE) | ||
| It helps a team define one canonical AI workspace manifest and turn that into tool-specific outputs for supported coding assistants and MCP-compatible tooling. | ||
| Generate portable AI workspace configs for any web development project — one manifest for Copilot, Claude, Codex, MCP, Cursor, and Windsurf. | ||
| ## What It Does | ||
| Define one canonical `ai-workspace.json` manifest, then generate tool-specific configuration files for all six targets from a single source of truth. | ||
| - inspects a web development repo and infers useful setup hints | ||
| - creates or loads `ai-workspace.json` | ||
| - plans generated files for supported targets | ||
| - generates shared docs and tool-specific files | ||
| - supports Codex, Copilot, Claude, and MCP in the current MVP direction | ||
| - supports both `dashboard` and `web-app` as project types | ||
| ## Quick Start | ||
| ## Current Status | ||
| ```bash | ||
| # Install once: | ||
| npm install -g agenv-cli | ||
| This repo is no longer docs-only. It now includes: | ||
| # Then in any web project directory: | ||
| agenv init --yes | ||
| agenv generate | ||
| ``` | ||
| - a buildable TypeScript package scaffold | ||
| - a CLI entrypoint and command shells | ||
| - manifest schema, defaults, normalization, load, and save | ||
| - repo inspection and stack hints | ||
| - generation planning and warnings | ||
| - a first real `generate` and `diff` path | ||
| - unit and integration tests | ||
| That's it. `agenv` inspects your repo, creates `ai-workspace.json`, and generates tool-specific files for your enabled targets. | ||
| Still early: | ||
| ## What It Does | ||
| - interactive `init` is still shallow | ||
| - generated file content is functional but not fully polished | ||
| - `doctor` has structure but is not feature-complete yet | ||
| - the current MVP is still most optimized for dashboard and internal-tool workflows | ||
| 1. **Inspects** your repo — detects framework, package manager, existing AI config files | ||
| 2. **Creates** `ai-workspace.json` — a single manifest describing your AI workspace | ||
| 3. **Plans** which files to generate based on your targets and setup mode | ||
| 4. **Generates** shared docs, prompts, and tool-specific files (AGENTS.md, copilot-instructions, .claude/, .mcp.json) | ||
| ## Vision | ||
| Supports seven project types: `dashboard`, `web-app`, `api-service`, `full-stack`, `library`, `cli-tool`, and `mobile`. | ||
| Set up a portable, reviewable AI coding environment for web development in one command. | ||
| ## Install | ||
| ## Install and Use | ||
| ```bash | ||
| npx agenv-cli --help | ||
| ``` | ||
| ```bash | ||
| npm install -g agenv-cli | ||
@@ -50,62 +39,86 @@ agenv --help | ||
| Examples: | ||
| ## Commands | ||
| ```bash | ||
| agenv init --yes | ||
| agenv generate | ||
| ``` | ||
| | Command | Description | | ||
| |---|---| | ||
| | `agenv init` | Create `ai-workspace.json` from repo inspection + interactive prompts | | ||
| | `agenv init --yes` | Non-interactive mode with recommended defaults | | ||
| | `agenv generate` | Generate all planned files from the manifest | | ||
| | `agenv generate --dry-run` | Preview what would be generated without writing | | ||
| | `agenv generate --force` | Overwrite files modified outside agenv | | ||
| | `agenv diff` | Show what `generate` would change | | ||
| | `agenv doctor` | Validate manifest and repo compatibility | | ||
| | `agenv templates list` | List available starter templates | | ||
| ```bash | ||
| agenv diff | ||
| agenv templates-list | ||
| ## How It Works | ||
| ``` | ||
| agenv init → ai-workspace.json (your manifest) | ||
| agenv generate → AGENTS.md, .github/copilot-instructions.md, | ||
| .claude/*, .mcp.json, docs/ai-prompts/* | ||
| agenv diff → preview changes before writing | ||
| agenv doctor → validate everything is consistent | ||
| ``` | ||
| ## Start Here | ||
| Generated files include a header comment so agenv knows which files it manages. Files you edit by hand are protected from overwrite (unless you use `--force`). Backups are created in `.agenv-backups/` before any overwrite. | ||
| If you are new to the repo, read these in order: | ||
| ## Supported Targets | ||
| - contributor guide: [doc/getting-started.md](/Users/syoo/Documents/code/agenv-package/doc/getting-started.md) | ||
| - product requirements: [doc/prd.md](/Users/syoo/Documents/code/agenv-package/doc/prd.md) | ||
| - technical requirements: [doc/trd.md](/Users/syoo/Documents/code/agenv-package/doc/trd.md) | ||
| - CLI contract: [doc/cli-spec.md](/Users/syoo/Documents/code/agenv-package/doc/cli-spec.md) | ||
| - manifest contract: [doc/manifest-spec.md](/Users/syoo/Documents/code/agenv-package/doc/manifest-spec.md) | ||
| - output map: [doc/output-map.md](/Users/syoo/Documents/code/agenv-package/doc/output-map.md) | ||
| - adapter contract: [doc/adapter-contract.md](/Users/syoo/Documents/code/agenv-package/doc/adapter-contract.md) | ||
| - implementation plan: [doc/implementation-plan.md](/Users/syoo/Documents/code/agenv-package/doc/implementation-plan.md) | ||
| | Target | Output | | ||
| |---|---| | ||
| | `codex` | `AGENTS.md` | | ||
| | `copilot` | `.github/copilot-instructions.md` | | ||
| | `claude` | `.claude/README.md`, `.claude/skills/*.md`, `.claude/agents/*.md`, `.claude/settings.local.json` | | ||
| | `mcp` | `.mcp.json`, `.mcp.local.json` | | ||
| | `cursor` | `.cursor/rules/context.mdc`, `.cursor/rules/coding-style.mdc`, `.cursor/rules/review.mdc` | | ||
| | `windsurf` | `.windsurf/rules/context.md`, `.windsurf/rules/coding-style.md`, `.windsurf/rules/review.md` | | ||
| ## Development Commands | ||
| ## Project Types | ||
| | Type | Description | | ||
| |---|---| | ||
| | `dashboard` | Internal data/admin dashboard | | ||
| | `web-app` | Consumer-facing web application | | ||
| | `api-service` | Backend API service | | ||
| | `full-stack` | Combined frontend + backend (e.g. Next.js full-stack) | | ||
| | `library` | Reusable npm package or component library | | ||
| | `cli-tool` | Node.js command-line tool | | ||
| | `mobile` | React Native / Expo mobile app | | ||
| ## MCP Presets | ||
| Built-in presets with trust annotations: `filesystem`, `github`, `fetch`, `memory`, `postgres`, `sqlite`, `puppeteer`, `sequential-thinking`, `notion`, `stripe`, `atlassian`. | ||
| Select presets during `agenv init` or add them to `generated.mcpPresets` in your manifest. Non-safe presets include `_trustLevel` and `_trustNote` annotations in `.mcp.json`. | ||
| ## Documentation | ||
| | Doc | Purpose | | ||
| |---|---| | ||
| | [Getting Started](doc/getting-started.md) | Contributor onboarding | | ||
| | [Product Requirements](doc/prd.md) | Product goals and scope | | ||
| | [Technical Requirements](doc/trd.md) | Architecture and technical design | | ||
| | [CLI Spec](doc/cli-spec.md) | Command contract and flag reference | | ||
| | [Manifest Spec](doc/manifest-spec.md) | Manifest schema and field definitions | | ||
| | [Output Map](doc/output-map.md) | Which files are generated and when | | ||
| | [Adapter Contract](doc/adapter-contract.md) | How adapters work | | ||
| ## Contributing | ||
| See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, development commands, and PR guidelines. | ||
| ## Security | ||
| See [SECURITY.md](SECURITY.md) for the vulnerability reporting policy. | ||
| ```bash | ||
| npm install | ||
| npm run build | ||
| npm test | ||
| npm run typecheck | ||
| npm run build | ||
| node dist/cli/index.js --help | ||
| ``` | ||
| ## Package Shape | ||
| ## License | ||
| ```text | ||
| src/ | ||
| adapters/ | ||
| cli/ | ||
| detect/ | ||
| doctor/ | ||
| fs/ | ||
| manifest/ | ||
| planner/ | ||
| render/ | ||
| templates/ | ||
| utils/ | ||
| doc/ | ||
| tests/ | ||
| ``` | ||
| ## Best Next Step | ||
| The strongest near-term path is to keep improving the first usable slice: | ||
| 1. make generated files richer and less placeholder-like | ||
| 2. deepen `init --yes` and preview behavior | ||
| 3. expand `doctor` | ||
| 4. add more integration coverage around real CLI behavior | ||
| [MIT](LICENSE) |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
380210
93.04%183
12.96%5600
95.33%124
11.71%2
100%