Skip to content

docs: spreadsheet styling standard (homemade -> pro spec) - #59

Merged
Ocean82 merged 2 commits into
mainfrom
docs/spreadsheet-styling-standard
Oct 16, 2026
Merged

Ocean82 merged 2 commits into
mainfrom
docs/spreadsheet-styling-standard

Conversation

@Ocean82

@Ocean82 Ocean82 commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Adds docs/spreadsheet-styling-standard.md — the house standard the chat AI follows when a user asks to style, clean up, or "make this look professional." This is the design spec that unblocks two deferred features:

  • Q1(b): the one-shot "professionalize my sheet" makeover (an execute_macro chaining existing style_recipe / format_cells / auto_fit tools).
  • Q4: the styling-skills catalog (new kind: 'recipe' capabilities whose trigger phrases map to these outcomes).

What's in it

  • Principles — the "homemade → pro" rubric: number formats aren't optional; header/data/total hierarchy; restraint (one accent, near-white background, don't border every cell, ≥10pt); layout/breathing room; live conditional formatting; color conventions; finance-model extras.
  • The makeover — a concrete ordered plan built only from tools that already exist, preview-first, value-safe (never changes a cell value), one undo entry.
  • Respect existing style — match-and-extend, never overwrite deliberate user formatting.
  • The Q4 catalog — trigger phrase → existing tool table, slotting into the unused kind: 'recipe' capability mechanism.
  • Explicit "what we do NOT adopt" and a build order.

Verified during authoring

Column-role inference already exists (sheetProfile.inferRole → ColumnRole), so no new inference helper is needed for the makeover — only a role→numberFormat mapping (included), with the amount-vs-currency ambiguity resolved via detectedPurpose.

Provenance / licensing

Written entirely in our own words — distilled industry spreadsheet-design conventions, no third-party text or code copied. The example material that informed it stays gitignored under temp/ and is not part of the repo, so nothing third-party is shared or committed.

Notes

Doc-only change — no code, no deploy impact. It's the spec for later work, not an implementation.

Summary by Sourcery

Establish the design specification for professional spreadsheet styling and the deferred makeover and recipe-catalog features.

Enhancements:

  • Define a house standard for professional spreadsheet styling, including visual hierarchy, number formats, layout, restraint, conditional formatting, and finance-model conventions.
  • Specify a preview-first, value-safe sheet makeover using existing formatting and layout capabilities, with totals isolated as an explicitly confirmed data-writing step.
  • Document how styling requests map to existing tools and future recipe capabilities, including precedence for broad makeover triggers and safeguards for existing user formatting.
  • Record implementation boundaries, licensing provenance, and the build order for the deferred makeover and styling-skills features.

Documentation:

  • Add a comprehensive spreadsheet styling standard covering professional design principles, makeover behavior, styling recipes, and deferred implementation guidance.

House styling standard the AI follows for style/cleanup/professionalize requests. Written in our own words (no third-party text/code copied); the source example material stays gitignored under temp/. Defines the spec for two deferred features: the one-shot professionalize-my-sheet makeover (an execute_macro chaining existing style_recipe/format_cells/auto_fit tools) and the Q4 styling-skills catalog (kind:recipe capabilities). Every rule maps to a tool that already exists. Records that column-role inference already exists (sheetProfile.inferRole) so no new inference helper is needed; includes the role->numberFormat mapping and the amount-vs-currency gap resolved via detectedPurpose.
Copilot AI balanced review requested due to automatic review settings October 16, 2026 08:07
@sourcery-ai

sourcery-ai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Adds a design-only spreadsheet styling standard that turns “make it look professional” into an implementable, existing-tool-based specification. It defines the visual rules, a preview-first value-safe makeover plan, preservation of existing styles, future recipe intents, and the build order for the deferred makeover and styling catalog features.

Sequence diagram for the planned professionalize-sheet makeover

sequenceDiagram
    actor User
    participant Router
    participant execute_macro
    participant style_recipe
    participant format_cells
    participant auto_fit

    User->>Router: Request professionalize sheet
    Router->>execute_macro: Build preview-first makeover plan
    execute_macro->>style_recipe: Apply header
    execute_macro->>format_cells: Apply role-based numberFormat
    execute_macro->>style_recipe: Apply total_row when applicable
    execute_macro->>auto_fit: Fit column widths
    execute_macro->>format_cells: Apply one conditional emphasis
    execute_macro-->>User: Show full diff for confirmation
    User->>execute_macro: Confirm
    execute_macro-->>User: Apply as one undo entry
Loading

Flow diagram for role-based spreadsheet number formatting

flowchart LR
    Profile["buildSheetProfile"] --> Role["ColumnProfile.role"]
    Role --> Purpose["detectedPurpose"]
    Purpose --> Mapping["Role-to-numberFormat mapping"]
    Mapping --> Format["format_cells"]
    Format --> Values["Values unchanged"]
Loading

File-Level Changes

Change Details Files
Adds a buildable house standard for making spreadsheets look professional, covering visual hierarchy, number formats, restrained styling, layout, conditional formatting, color conventions, and finance-specific presentation.
  • Defines principles for headers, data, totals, formats, spacing, borders, colors, and finance models.
  • Maps the standard to existing formatting, recipe, layout, and macro tools.
  • Documents explicit exclusions and the intended implementation scope.
docs/spreadsheet-styling-standard.md
Specifies a preview-first, value-preserving whole-sheet makeover assembled from existing operations.
  • Defines an ordered plan for table detection, header styling, role-based number formats, totals, sizing, emphasis, and finance extras.
  • Requires skipping inapplicable steps, preserving cell values, avoiding duplicate totals, and producing one undo entry.
  • Requires reading existing styles and matching or extending deliberate user formatting instead of overwriting it.
docs/spreadsheet-styling-standard.md
Defines the future styling recipe catalog and implementation sequence for deferred features.
  • Maps common styling requests to existing recipes, format conditions, and layout tools.
  • Specifies routing precedence between whole-sheet and narrow styling intents.
  • Records that column-role inference already exists and documents the role, detected-purpose, and number-format mapping needed by the makeover.
docs/spreadsheet-styling-standard.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 10b6f585-3c3a-4c45-b879-b1950663b25f
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 9 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/spreadsheet-styling-standard.md" line_range="120" />
<code_context>
+and the user hasn't overridden these:
+
+- Zeros shown as `-` (dash), not `0`.
+- Negatives red and in parentheses: `(500)`, not `-500` (`accounting-neg`).
+- Units in the header: "Revenue ($mm)", not a bare "Revenue".
+- Totals sum the contiguous range directly above, with a border above the total.
</code_context>
<issue_to_address>
**Styling adds workbook data**

When the makeover applies or refreshes a totals row, `style_recipe: total_row` writes a Total label and SUM formulas or values, so the totals step changes cell contents despite the makeover’s value-safe boundary; users see new or changed workbook data after a styling request.

Keep the data-writing totals recipe out of the value-safe makeover, or change it to format existing totals without writing cell values.

Also at `docs/spreadsheet-styling-standard.md:149-150`, `docs/spreadsheet-styling-standard.md:161-163`.
</issue_to_address>

### Comment 2
<location path="docs/spreadsheet-styling-standard.md" line_range="164" />
<code_context>
+- Every step is a format/layout op — no data mutation, no row deletion. The
+  makeover must never change a cell VALUE (that keeps it safely reversible and
+  honest).
+- One `execute_macro` → one undo entry.
+
+---
</code_context>
<issue_to_address>
**Concurrent edits disappear on rollback**

When a user edits the workbook while a multi-step makeover is running and a later step fails or is cancelled, `executeMacro` can await between makeover steps, and a later failure or cancellation calls `rollbackGroup`; the shared-snapshot undo manager restores the entire workbook snapshot, erasing any user edits made after the makeover began.

Prevent concurrent workbook edits for the duration of the macro, or make rollback restore only the macro's own changes.
</issue_to_address>

### Comment 3
<location path="docs/spreadsheet-styling-standard.md" line_range="159" />
<code_context>
+7. **(Finance sheets only)** apply §1.7 extras.
+
+Boundaries:
+- Reuse `table_polish` where it already does banded-table styling rather than
+  hand-rolling bands.
+- Every step is a format/layout op — no data mutation, no row deletion. The
</code_context>
<issue_to_address>
**Makeover loses existing filters**

When the makeover uses `table_polish` on a sheet with existing filter conditions, `table_polish` replaces the active filter configuration with unconditioned filters for each table column. The macro undo snapshot covers only the workbook, so the user's existing filter conditions disappear and cannot be restored by the makeover's single undo entry.

Preserve existing filter conditions when applying table styling and include filter state in the macro's rollback and undo history.
</issue_to_address>

### Comment 4
<location path="docs/spreadsheet-styling-standard.md" line_range="150" />
<code_context>
+   date / count) from its values and apply the matching `numberFormat` via
+   `format_cells` on the column range. This is the highest-impact single step.
+4. **Totals** — `style_recipe: total_row` where a totals row exists or is wanted
+   (idempotent — must not stack a second total row).
+5. **Column widths** — `auto_fit` (or `set_column_width` with label-wider-than-
+   figure heuristics) so nothing is clipped or swimming in space.
</code_context>
<issue_to_address>
**Existing totals get counted twice**

When the sheet already has a hardcoded totals row, the existing recipe recognizes only a labeled totals row containing a formula; a hardcoded totals row is treated as data. `generateTableTotals` then appends another row whose SUM includes that existing total, so the displayed result double-counts the values.

Detect and exclude existing totals rows whether their totals are formulas or hardcoded values before generating another row.
</issue_to_address>

### Comment 5
<location path="docs/spreadsheet-styling-standard.md" line_range="58" />
<code_context>
+- Plain counts → `number-int`; measured quantities → `number` with a sensible
+  decimal count.
+- Infer the format from the column's role and content, not from the header word
+  alone (a column of `0.08`, `0.2` is almost certainly percent even if unlabeled).
+
+### 1.2 Hierarchy: headers, data, and totals must look different
</code_context>
<issue_to_address>
**Unlabeled ratios stay decimals**

When a generic-purpose sheet has a numeric ratio column without a percentage-related header, `inferRole` classifies dense numeric columns without percentage-like headers as `amount`, and the generic-purpose mapping formats them as `number`; ratios such as 0.08 therefore display as decimals instead of percentages.

Use the column values as well as header keywords to identify ratio columns as percentages before applying the role-to-format mapping.

Also at `docs/spreadsheet-styling-standard.md:59`, `docs/spreadsheet-styling-standard.md:230`, `docs/spreadsheet-styling-standard.md:237-240`, `docs/spreadsheet-styling-standard.md:242-243`.
</issue_to_address>

### Comment 6
<location path="docs/spreadsheet-styling-standard.md" line_range="234" />
<code_context>
+   column (`ColumnProfile.role`) alongside `dtype` and `detectedPurpose`
+   (`budget | invoice | inventory | sales | generic`). The makeover's step 3 maps
+   roles → formats:
+   - `date` → a date format
+   - `percentage` → `percent`
+   - `quantity` → `number-int`
</code_context>
<issue_to_address>
**Years display as dates**

When a column named `Year` contains numeric calendar years, `inferRole` classifies the column as `date`, and the role mapping applies a date format; values such as 2024 then display as Excel-serial dates instead of years.

Distinguish calendar-year columns from date columns in `inferRole` or the role-to-format mapping.
</issue_to_address>

### Comment 7
<location path="docs/spreadsheet-styling-standard.md" line_range="97" />
<code_context>
+
+When highlighting by rule (negatives red, numeric cells, values over a
+threshold), prefer a live `condition` on `format_cells` (`negative`, `is_number`,
+`gt`, etc.) so it keeps holding as the data changes — not a one-time fill painted
+onto whatever cells happen to match today.
+
</code_context>
<issue_to_address>
**Highlights become stale**

When cell values change after a condition-based format is applied, `format_cells` evaluates the condition once and writes ordinary cell formatting; it does not retain a live rule. Old matches stay highlighted and new matches are not highlighted, so users see stale conditional formatting.

Use a persistent conditional-formatting rule that reevaluates the condition when cell values change.

Also at `docs/spreadsheet-styling-standard.md:200-201`.
</issue_to_address>

### Comment 8
<location path="docs/spreadsheet-styling-standard.md" line_range="119" />
<code_context>
+When the sheet is clearly a financial model (P&L, budget, valuation, 3-statement)
+and the user hasn't overridden these:
+
+- Zeros shown as `-` (dash), not `0`.
+- Negatives red and in parentheses: `(500)`, not `-500` (`accounting-neg`).
+- Units in the header: "Revenue ($mm)", not a bare "Revenue".
</code_context>
<issue_to_address>
**Zero-as-dash has no format**

When the finance-style makeover applies the zero-display rule, the finance-only rule asks for zeros to display as a dash, but the documented number-format vocabulary has no zero-as-dash format and `format_cells` cannot define a custom one. Applying the listed formats leaves zeros displayed as zero, so the finance makeover cannot satisfy this rule using the claimed existing tools.

Add a zero-as-dash number format or mark this rule as requiring new formatting support.
</issue_to_address>

### Comment 9
<location path="docs/spreadsheet-styling-standard.md" line_range="162" />
<code_context>
+- Reuse `table_polish` where it already does banded-table styling rather than
+  hand-rolling bands.
+- Every step is a format/layout op — no data mutation, no row deletion. The
+  makeover must never change a cell VALUE (that keeps it safely reversible and
+  honest).
+- One `execute_macro` → one undo entry.
</code_context>
<issue_to_address>
**Makeover changes cell values**

When the makeover applies `total_row` because a totals row is missing or wanted, `style_recipe: total_row` writes a “Total” label and SUM formulas, so a makeover that includes this step changes workbook data despite the value-safe promise; users see new values and formulas.

Exclude `total_row` from the value-safe makeover or explicitly make its data writes a separately previewed and confirmed exception.
</issue_to_address>

Sourcery assessment

Approval pending. 9 findings to address first.

Blocking findings: docs/spreadsheet-styling-standard.md:120, docs/spreadsheet-styling-standard.md:164, docs/spreadsheet-styling-standard.md:159, docs/spreadsheet-styling-standard.md:150, docs/spreadsheet-styling-standard.md:58, and 4 more


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/spreadsheet-styling-standard.md
Comment thread docs/spreadsheet-styling-standard.md Outdated
- Every step is a format/layout op — no data mutation, no row deletion. The
makeover must never change a cell VALUE (that keeps it safely reversible and
honest).
- One `execute_macro` → one undo entry.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Concurrent edits disappear on rollback

When a user edits the workbook while a multi-step makeover is running and a later step fails or is cancelled, executeMacro can await between makeover steps, and a later failure or cancellation calls rollbackGroup; the shared-snapshot undo manager restores the entire workbook snapshot, erasing any user edits made after the makeover began.

Prevent concurrent workbook edits for the duration of the macro, or make rollback restore only the macro's own changes.

Prompt for AI agents
In `docs/spreadsheet-styling-standard.md` at line 164:

**Concurrent edits disappear on rollback**

When a user edits the workbook while a multi-step makeover is running and a later step fails or is cancelled, `executeMacro` can await between makeover steps, and a later failure or cancellation calls `rollbackGroup`; the shared-snapshot undo manager restores the entire workbook snapshot, erasing any user edits made after the makeover began.

Prevent concurrent workbook edits for the duration of the macro, or make rollback restore only the macro's own changes.

Fix in Cursor

Comment thread docs/spreadsheet-styling-standard.md Outdated
7. **(Finance sheets only)** apply §1.7 extras.

Boundaries:
- Reuse `table_polish` where it already does banded-table styling rather than

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Makeover loses existing filters

When the makeover uses table_polish on a sheet with existing filter conditions, table_polish replaces the active filter configuration with unconditioned filters for each table column. The macro undo snapshot covers only the workbook, so the user's existing filter conditions disappear and cannot be restored by the makeover's single undo entry.

Preserve existing filter conditions when applying table styling and include filter state in the macro's rollback and undo history.

Prompt for AI agents
In `docs/spreadsheet-styling-standard.md` at line 159:

**Makeover loses existing filters**

When the makeover uses `table_polish` on a sheet with existing filter conditions, `table_polish` replaces the active filter configuration with unconditioned filters for each table column. The macro undo snapshot covers only the workbook, so the user's existing filter conditions disappear and cannot be restored by the makeover's single undo entry.

Preserve existing filter conditions when applying table styling and include filter state in the macro's rollback and undo history.

Fix in Cursor

Comment thread docs/spreadsheet-styling-standard.md Outdated
date / count) from its values and apply the matching `numberFormat` via
`format_cells` on the column range. This is the highest-impact single step.
4. **Totals** — `style_recipe: total_row` where a totals row exists or is wanted
(idempotent — must not stack a second total row).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High · Existing totals get counted twice

When the sheet already has a hardcoded totals row, the existing recipe recognizes only a labeled totals row containing a formula; a hardcoded totals row is treated as data. generateTableTotals then appends another row whose SUM includes that existing total, so the displayed result double-counts the values.

Detect and exclude existing totals rows whether their totals are formulas or hardcoded values before generating another row.

Prompt for AI agents
In `docs/spreadsheet-styling-standard.md` at line 150:

**Existing totals get counted twice**

When the sheet already has a hardcoded totals row, the existing recipe recognizes only a labeled totals row containing a formula; a hardcoded totals row is treated as data. `generateTableTotals` then appends another row whose SUM includes that existing total, so the displayed result double-counts the values.

Detect and exclude existing totals rows whether their totals are formulas or hardcoded values before generating another row.

Fix in Cursor

- Plain counts → `number-int`; measured quantities → `number` with a sensible
decimal count.
- Infer the format from the column's role and content, not from the header word
alone (a column of `0.08`, `0.2` is almost certainly percent even if unlabeled).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Unlabeled ratios stay decimals

When a generic-purpose sheet has a numeric ratio column without a percentage-related header, inferRole classifies dense numeric columns without percentage-like headers as amount, and the generic-purpose mapping formats them as number; ratios such as 0.08 therefore display as decimals instead of percentages.

Use the column values as well as header keywords to identify ratio columns as percentages before applying the role-to-format mapping.

Also at docs/spreadsheet-styling-standard.md:59, docs/spreadsheet-styling-standard.md:230, docs/spreadsheet-styling-standard.md:237-240, docs/spreadsheet-styling-standard.md:242-243.

Prompt for AI agents
In `docs/spreadsheet-styling-standard.md` at line 58:

**Unlabeled ratios stay decimals**

When a generic-purpose sheet has a numeric ratio column without a percentage-related header, `inferRole` classifies dense numeric columns without percentage-like headers as `amount`, and the generic-purpose mapping formats them as `number`; ratios such as 0.08 therefore display as decimals instead of percentages.

Use the column values as well as header keywords to identify ratio columns as percentages before applying the role-to-format mapping.

Also at `docs/spreadsheet-styling-standard.md:59`, `docs/spreadsheet-styling-standard.md:230`, `docs/spreadsheet-styling-standard.md:237-240`, `docs/spreadsheet-styling-standard.md:242-243`.

Fix in Cursor

column (`ColumnProfile.role`) alongside `dtype` and `detectedPurpose`
(`budget | invoice | inventory | sales | generic`). The makeover's step 3 maps
roles → formats:
- `date` → a date format

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Years display as dates

When a column named Year contains numeric calendar years, inferRole classifies the column as date, and the role mapping applies a date format; values such as 2024 then display as Excel-serial dates instead of years.

Distinguish calendar-year columns from date columns in inferRole or the role-to-format mapping.

Prompt for AI agents
In `docs/spreadsheet-styling-standard.md` at line 234:

**Years display as dates**

When a column named `Year` contains numeric calendar years, `inferRole` classifies the column as `date`, and the role mapping applies a date format; values such as 2024 then display as Excel-serial dates instead of years.

Distinguish calendar-year columns from date columns in `inferRole` or the role-to-format mapping.

Fix in Cursor


When highlighting by rule (negatives red, numeric cells, values over a
threshold), prefer a live `condition` on `format_cells` (`negative`, `is_number`,
`gt`, etc.) so it keeps holding as the data changes — not a one-time fill painted

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Highlights become stale

When cell values change after a condition-based format is applied, format_cells evaluates the condition once and writes ordinary cell formatting; it does not retain a live rule. Old matches stay highlighted and new matches are not highlighted, so users see stale conditional formatting.

Use a persistent conditional-formatting rule that reevaluates the condition when cell values change.

Also at docs/spreadsheet-styling-standard.md:200-201.

Prompt for AI agents
In `docs/spreadsheet-styling-standard.md` at line 97:

**Highlights become stale**

When cell values change after a condition-based format is applied, `format_cells` evaluates the condition once and writes ordinary cell formatting; it does not retain a live rule. Old matches stay highlighted and new matches are not highlighted, so users see stale conditional formatting.

Use a persistent conditional-formatting rule that reevaluates the condition when cell values change.

Also at `docs/spreadsheet-styling-standard.md:200-201`.

Fix in Cursor

When the sheet is clearly a financial model (P&L, budget, valuation, 3-statement)
and the user hasn't overridden these:

- Zeros shown as `-` (dash), not `0`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Zero-as-dash has no format

When the finance-style makeover applies the zero-display rule, the finance-only rule asks for zeros to display as a dash, but the documented number-format vocabulary has no zero-as-dash format and format_cells cannot define a custom one. Applying the listed formats leaves zeros displayed as zero, so the finance makeover cannot satisfy this rule using the claimed existing tools.

Add a zero-as-dash number format or mark this rule as requiring new formatting support.

Prompt for AI agents
In `docs/spreadsheet-styling-standard.md` at line 119:

**Zero-as-dash has no format**

When the finance-style makeover applies the zero-display rule, the finance-only rule asks for zeros to display as a dash, but the documented number-format vocabulary has no zero-as-dash format and `format_cells` cannot define a custom one. Applying the listed formats leaves zeros displayed as zero, so the finance makeover cannot satisfy this rule using the claimed existing tools.

Add a zero-as-dash number format or mark this rule as requiring new formatting support.

Fix in Cursor

Comment thread docs/spreadsheet-styling-standard.md Outdated
The makeover was described as value-safe (never changes a cell value) while including style_recipe: total_row and table_polish, both of which WRITE cell contents (Total label + SUM formulas; table_polish calls generateTableTotals) and carry persistenceCaveat. Split the makeover into a value-safe formatting pass (header, number formats, widths, conditional emphasis) and a separate opt-in totals step that writes data, is preview-only, caveat-carrying, and never auto-applied. Banded-table look prefers format-only banding over table_polish unless the user wants its totals. Clarified the 1.7 totals line and added a Writes-data column to the Q4 catalog. Addresses a CodeRabbit finding.
@Ocean82
Ocean82 merged commit 0d013f1 into main Oct 16, 2026
5 checks passed
@Ocean82
Ocean82 deleted the docs/spreadsheet-styling-standard branch October 16, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants