/**
 * Built-in workflow: `multi_perspective_review`
 *
 * Reviews a target (file, PR, design doc, plan — passed via args.target) from
 * several independent perspectives, then asks an adversarial judge to decide
 * what would actually break in practice. Useful for sanity-checking decisions
 * before they ship.
 *
 * Args:
 *   - target: what to review
 *   - lenses: optional array of { name, angle } to override default lenses
 *   - skipAdversarial: when true, skip the adversarial judge phase
 */
export declare const MULTI_PERSPECTIVE_REVIEW_SCRIPT = "export const meta = {\n  name: 'multi_perspective_review',\n  description: 'Review a target from N independent perspectives, then adversarially judge what would actually break.',\n  whenToUse: 'User wants a stress-test of a design, plan, PR, or proposal before committing to it.',\n  examplePrompts: [\n    { field: 'target', text: 'Stress-test this API redesign before we ship' },\n    { field: 'target', text: 'Review the migration plan from multiple angles' },\n  ],\n  i18n: {\n    zh: {\n      description: '\u4ECE\u591A\u4E2A\u72EC\u7ACB\u89C6\u89D2\u8BC4\u5BA1\u76EE\u6807\uFF0C\u5E76\u7531\u5BF9\u6297\u6027\u8BC4\u5BA1\u5224\u65AD\u5B9E\u9645\u4F1A\u51FA\u4EC0\u4E48\u95EE\u9898\u3002',\n      whenToUse: '\u7528\u6237\u60F3\u5728\u843D\u5730\u524D\u5BF9\u8BBE\u8BA1\u3001\u65B9\u6848\u3001PR \u6216\u63D0\u6848\u505A\u538B\u529B\u6D4B\u8BD5\u65F6\u3002',\n      examplePrompts: [\n        { field: 'target', text: '\u4E0A\u7EBF\u524D\u4ECE\u591A\u89D2\u5EA6\u538B\u529B\u6D4B\u8BD5\u8FD9\u4E2A API redesign' },\n        { field: 'target', text: '\u4ECE\u591A\u4E2A\u89C6\u89D2\u8BC4\u5BA1\u8FD9\u4EFD\u8FC1\u79FB\u65B9\u6848' },\n      ],\n    },\n  },\n  tags: ['review', 'planning', 'decision'],\n  estimatedAgents: { min: 5, max: 6 },\n  phases: [\n    { title: 'Lenses' },\n    { title: 'Adversarial' },\n    { title: 'Synthesize' },\n  ],\n}\n\nconst READ_ONLY_TOOLS = ['read_file', 'grep', 'find', 'list_dir']\n\nconst target = args && typeof args === 'object' && args.target\n  ? String(args.target)\n  : 'No explicit target was provided. Treat the currently focused file or recent context as the target.'\n\nconst skipAdversarial = Boolean(args && typeof args === 'object' && args.skipAdversarial)\n\nconst DEFAULT_LENSES = [\n  { name: 'User', angle: 'How a real user experiences this. Friction, confusion, surprise paths, accessibility.' },\n  { name: 'Operator', angle: 'How an on-call engineer experiences this in production. Failure modes, observability, rollback.' },\n  { name: 'Skeptic', angle: 'Hidden assumptions. What is being implied but not stated. What would break under load or weird input.' },\n  { name: 'Maintainer', angle: 'Six-month-later view. Clarity, naming, layering, ease of changing nearby code.' },\n]\n\nlet lenses = DEFAULT_LENSES\nif (args && typeof args === 'object' && Array.isArray(args.lenses) && args.lenses.length) {\n  lenses = args.lenses\n    .filter((l) => l && typeof l === 'object' && l.name && l.angle)\n    .map((l) => ({ name: String(l.name), angle: String(l.angle) }))\n  if (!lenses.length) lenses = DEFAULT_LENSES\n}\n\nphase('Lenses')\nconst lensViews = await parallel(\n  lenses.map((l) => () =>\n    agent(\n      'Review the following target through the ' + l.name + ' lens.\\n' +\n        'Lens focus: ' + l.angle + '\\n\\n' +\n        'TARGET:\\n' + target + '\\n\\n' +\n        'Return 3\u20137 concrete observations. Each entry: title (5\u201310 words), why-it-matters (1 sentence), risk (low/med/high).',\n      {\n        label: l.name + ' lens',\n        toolset: READ_ONLY_TOOLS,\n        schema: {\n          type: 'object',\n          properties: {\n            observations: {\n              type: 'array',\n              items: {\n                type: 'object',\n                properties: {\n                  title: { type: 'string' },\n                  why: { type: 'string' },\n                  risk: { type: 'string', enum: ['low', 'med', 'high'] },\n                },\n                required: ['title', 'why', 'risk'],\n              },\n            },\n          },\n          required: ['observations'],\n        },\n      },\n    ),\n  ),\n)\n\nconst valid = lensViews.filter(Boolean)\nconst allObs = valid.flatMap((v, i) =>\n  (v?.observations ?? []).map((o) => ({ lens: lenses[i].name, ...o })),\n)\n\nlet verdict = null\nif (!skipAdversarial) {\n  phase('Adversarial')\n  verdict = await agent(\n    'You are an adversarial judge. Given these multi-lens observations of a target, decide which would actually cause real harm if shipped as-is. ' +\n      'Default to realRisk=false unless an observation has clear, mechanism-level evidence. ' +\n      'Rate evidenceStrength as weak | moderate | strong.\\n\\n' +\n      JSON.stringify(allObs, null, 2),\n    {\n      label: 'adversarial verdict',\n      schema: {\n        type: 'object',\n        properties: {\n          verdicts: {\n            type: 'array',\n            items: {\n              type: 'object',\n              properties: {\n                title: { type: 'string' },\n                lens: { type: 'string' },\n                realRisk: { type: 'boolean' },\n                evidenceStrength: { type: 'string', enum: ['weak', 'moderate', 'strong'] },\n                reason: { type: 'string' },\n              },\n              required: ['title', 'lens', 'realRisk', 'evidenceStrength', 'reason'],\n            },\n          },\n        },\n        required: ['verdicts'],\n      },\n    },\n  )\n}\n\nphase('Synthesize')\nconst confirmed = (verdict?.verdicts ?? []).filter((v) => v.realRisk)\nconst goNoGo = skipAdversarial\n  ? (allObs.some((o) => o.risk === 'high') ? 'fix_first' : 'ship')\n  : confirmed.some((v) => v.evidenceStrength === 'strong')\n    ? 'fix_first'\n    : confirmed.length\n      ? 'fix_first'\n      : 'ship'\n\nreturn {\n  ok: true,\n  target,\n  lenses: lenses.map((l) => l.name),\n  skipAdversarial,\n  observationCount: allObs.length,\n  confirmedRiskCount: confirmed.length,\n  goNoGo,\n  topRisks: confirmed.slice(0, 10),\n  allVerdicts: verdict?.verdicts ?? [],\n}\n";
