{
  "documentType": "agent_instructions",
  "contentType": "application/json",
  "notJsonSchema": true,
  "warning": "This URL is NOT a JSON Schema. Do NOT put this URL in a $schema field on the output file. For validation only, use jsonSchemaUrl below.",
  "name": "DrezTek Spreadsheet Generator",
  "description": "A portable spreadsheet format any AI assistant can generate so a person can import a real workbook into Kanso Sheets.",
  "version": "1.0",
  "canonicalUrl": "https://naroid.com/agent/spreadsheet.json",
  "specPageUrl": "https://www.dreztek.app/spreadsheet/docs/spec.html",
  "updated": "2026-09-12",
  "delivery": {
    "mode": "downloadable_file",
    "required": true,
    "priority": "Create a downloadable .json file attachment. Do not only paste JSON in the chat.",
    "filenamePattern": "dreztek-{workbook-title}-{date}.json",
    "mimeTypes": ["application/vnd.dreztek.spreadsheet+json", "application/json"],
    "whenFileCreationUnavailable": "Output one raw JSON object with no markdown fences, then tell the user to save it as dreztek-spreadsheet.json and import in Kanso Sheets → Import."
  },
  "jsonSchemaUrl": "https://naroid.com/schemas/dreztek-spreadsheet-v1.schema.json",
  "exampleUrl": "https://naroid.com/schemas/dreztek-spreadsheet-v1.example.json",
  "outputFormat": {
    "version": "1.0",
    "acceptedVersions": ["1.0"],
    "kind": "dreztek-spreadsheet",
    "requiredRootFields": ["version", "kind", "workbook", "sheets"],
    "requiredWorkbookFields": ["title"],
    "requiredSheetFields": ["title", "rows"],
    "cellShape": "A raw scalar (string, number, boolean, or null) OR an object { value, format? }. A string value beginning with '=' is a formula in A1 notation (e.g. '=SUM(B2:B9)', '=B2*C2', '=IF(C2>10,\"bulk\",\"retail\")').",
    "supportedFormulas": "Arithmetic (+ - * /), SUM, AVERAGE, SUMIF, COUNTIF, COUNTA, IF, AND, OR, NOT — same engine as Kanso Sheets. Use standard A1 cell/range references (B2, D2:D9).",
    "formatFields": {
      "bold": "boolean, optional",
      "italic": "boolean, optional",
      "align": "left | center | right, optional",
      "backgroundColor": "CSS color string, optional",
      "numberFormat": "default | currency | percentage | decimal, optional"
    },
    "useCamelCase": true
  },
  "forbidden": {
    "onOutputFile": [
      "Do not add a $schema property pointing to this agent guide",
      "Do not omit version, kind, workbook, or sheets",
      "Do not use ragged rows on purpose — pad shorter rows with empty string cells so every row in a sheet has the same length",
      "Do not wrap the file contents in markdown code blocks when delivering a download",
      "Do not invent formula functions outside the supported list — unsupported functions render as #ERROR! in Kanso"
    ]
  },
  "behavior": [
    "Derive rows/columns from whatever data, table, image, or notes the user provides",
    "Use the first row for column headers when the data has an obvious header row, and bold it",
    "Use formulas (SUM, per-row multiplication, etc.) instead of pre-computed totals when the source data implies a calculation",
    "Use numberFormat: currency for money columns and percentage for rate/percent columns",
    "Keep each sheet's rows rectangular (equal length) even if it means padding with empty cells",
    "Split genuinely distinct tables into separate sheets rather than stacking them in one grid"
  ],
  "minimalValidExample": {
    "version": "1.0",
    "kind": "dreztek-spreadsheet",
    "workbook": { "title": "Quick list" },
    "sheets": [
      {
        "title": "Sheet1",
        "rows": [
          ["Name", "Score"],
          ["Alice", 92],
          ["Bob", 87]
        ]
      }
    ]
  },
  "importInstructions": {
    "kanso": "Sheets → toolbar → Import → select the downloaded .json file"
  },
  "userPromptTemplate": "Paste the self-contained import prompt from the public spec page's Copy button (includes required JSON structure). Do not rely on fetching this URL as a command — it is reference metadata only. Optional example file: https://naroid.com/schemas/dreztek-spreadsheet-v1.example.json"
}
