dsh-office-kit 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/assets/skills/excel-live-control/SKILL.md +119 -152
  2. package/assets/skills/excel-live-control/domain_guidance/financial_models.md +42 -58
  3. package/assets/skills/excel-live-control/domain_guidance/healthcare.md +36 -42
  4. package/assets/skills/excel-live-control/domain_guidance/marketing_advertising.md +33 -34
  5. package/assets/skills/excel-live-control/domain_guidance/scientific_research.md +34 -36
  6. package/assets/skills/excel-live-control/references/office-automation.md +127 -153
  7. package/assets/skills/excel-live-control/references/read_only_qna.md +40 -45
  8. package/assets/skills/excel-live-control/style_guidelines.md +56 -64
  9. package/assets/skills/excel-live-control/workflows/create_workflows.md +40 -47
  10. package/assets/skills/excel-live-control/workflows/edit_workflows.md +37 -45
  11. package/assets/skills/office-documents/SKILL.md +24 -60
  12. package/assets/skills/office-documents/examples/end_to_end_smoke_test.md +5 -5
  13. package/assets/skills/office-documents/ooxml/comments.md +8 -8
  14. package/assets/skills/office-documents/ooxml/hyperlinks_and_fields.md +10 -10
  15. package/assets/skills/office-documents/ooxml/rels_and_content_types.md +7 -7
  16. package/assets/skills/office-documents/ooxml/tracked_changes.md +12 -12
  17. package/assets/skills/office-documents/references/docx-structure.md +11 -13
  18. package/assets/skills/office-documents/references/template-elicitation.md +11 -13
  19. package/assets/skills/office-documents/references/writing-quality.md +20 -20
  20. package/assets/skills/office-documents/tasks/accessibility_a11y.md +16 -22
  21. package/assets/skills/office-documents/tasks/captions_crossrefs.md +23 -26
  22. package/assets/skills/office-documents/tasks/clean_tracked_changes.md +17 -22
  23. package/assets/skills/office-documents/tasks/comments_manage.md +9 -11
  24. package/assets/skills/office-documents/tasks/compare_diff.md +10 -16
  25. package/assets/skills/office-documents/tasks/create_edit.md +14 -16
  26. package/assets/skills/office-documents/tasks/equations.md +17 -28
  27. package/assets/skills/office-documents/tasks/fields_update.md +14 -16
  28. package/assets/skills/office-documents/tasks/fixtures_edge_cases.md +19 -33
  29. package/assets/skills/office-documents/tasks/footnotes_endnotes.md +12 -14
  30. package/assets/skills/office-documents/tasks/forms_content_controls.md +16 -20
  31. package/assets/skills/office-documents/tasks/headings_numbering.md +17 -22
  32. package/assets/skills/office-documents/tasks/images_figures.md +15 -25
  33. package/assets/skills/office-documents/tasks/multi_doc_merge.md +13 -23
  34. package/assets/skills/office-documents/tasks/navigation_internal_links.md +18 -21
  35. package/assets/skills/office-documents/tasks/privacy_scrub_metadata.md +16 -22
  36. package/assets/skills/office-documents/tasks/protection_restrict_editing.md +19 -21
  37. package/assets/skills/office-documents/tasks/read_review.md +9 -20
  38. package/assets/skills/office-documents/tasks/redaction_anonymization.md +17 -18
  39. package/assets/skills/office-documents/tasks/sections_layout.md +16 -23
  40. package/assets/skills/office-documents/tasks/style_lint_normalize.md +18 -22
  41. package/assets/skills/office-documents/tasks/tables_spreadsheets.md +21 -31
  42. package/assets/skills/office-documents/tasks/templates_style_packs.md +17 -21
  43. package/assets/skills/office-documents/tasks/toc_workflow.md +10 -14
  44. package/assets/skills/office-documents/tasks/verify_render.md +11 -23
  45. package/assets/skills/office-documents/tasks/watermarks_background.md +11 -15
  46. package/assets/skills/office-documents/troubleshooting/libreoffice_headless.md +6 -6
  47. package/assets/skills/office-documents/troubleshooting/run_splitting.md +12 -12
  48. package/assets/skills/office-pdf/SKILL.md +36 -51
  49. package/assets/skills/office-pdf/references/form-fields.md +20 -20
  50. package/assets/skills/office-pdf/references/geometry.md +10 -10
  51. package/assets/skills/office-pdf/references/layout-quality.md +13 -13
  52. package/assets/skills/office-pdf/references/limits.md +12 -56
  53. package/assets/skills/office-pdf/tasks/annotations.md +5 -5
  54. package/assets/skills/office-pdf/tasks/create.md +6 -9
  55. package/assets/skills/office-pdf/tasks/edit-pages.md +14 -14
  56. package/assets/skills/office-pdf/tasks/forms.md +15 -15
  57. package/assets/skills/office-pdf/tasks/read.md +9 -9
  58. package/assets/skills/office-pdf/tasks/redact.md +18 -18
  59. package/assets/skills/office-pdf/tasks/stamp.md +10 -10
  60. package/assets/skills/office-presentations/SKILL.md +71 -91
  61. package/assets/skills/office-presentations/container_tools/render_slides.py +1 -1
  62. package/assets/skills/office-presentations/domain_guidance/finance.md +16 -16
  63. package/assets/skills/office-presentations/recipes/README.md +24 -35
  64. package/assets/skills/office-presentations/recipes/autolayout.md +12 -13
  65. package/assets/skills/office-presentations/recipes/connectors.md +11 -12
  66. package/assets/skills/office-presentations/recipes/images.md +11 -12
  67. package/assets/skills/office-presentations/recipes/master-and-layouts.md +18 -18
  68. package/assets/skills/office-presentations/recipes/native-charts.md +8 -8
  69. package/assets/skills/office-presentations/recipes/rich-text-runs.md +13 -13
  70. package/assets/skills/office-presentations/recipes/speaker-notes.md +7 -7
  71. package/assets/skills/office-presentations/recipes/tables.md +14 -14
  72. package/assets/skills/office-presentations/recipes/textbox-at-coordinate.md +9 -9
  73. package/assets/skills/office-presentations/recipes/theme-tokens.md +7 -8
  74. package/assets/skills/office-presentations/references/authoring-workflow.md +38 -43
  75. package/assets/skills/office-presentations/references/finalization.md +10 -12
  76. package/assets/skills/office-presentations/references/native-bullets.md +14 -18
  77. package/assets/skills/office-presentations/references/native-evidence.md +18 -32
  78. package/assets/skills/office-presentations/references/style-guidelines.md +27 -32
  79. package/assets/skills/office-presentations/references/templates.md +31 -60
  80. package/assets/skills/office-presentations/routing/google_slides.md +4 -4
  81. package/assets/skills/office-presentations/tasks/apply-annotations.md +17 -17
  82. package/assets/skills/office-presentations/tasks/charts-tables-notes.md +20 -23
  83. package/assets/skills/office-presentations/tasks/create-deck.md +19 -19
  84. package/assets/skills/office-presentations/tasks/edit-deck.md +14 -16
  85. package/assets/skills/office-presentations/tasks/inspect-and-verify.md +31 -34
  86. package/assets/skills/office-presentations/tasks/template-following.md +23 -28
  87. package/assets/skills/office-spreadsheets/SKILL.md +32 -39
  88. package/assets/skills/office-spreadsheets/recipes/charts.md +8 -26
  89. package/assets/skills/office-spreadsheets/recipes/conditional-formats.md +9 -26
  90. package/assets/skills/office-spreadsheets/recipes/data-tables.md +7 -23
  91. package/assets/skills/office-spreadsheets/recipes/named-ranges.md +8 -21
  92. package/assets/skills/office-spreadsheets/recipes/number-formats.md +7 -23
  93. package/assets/skills/office-spreadsheets/recipes/sparklines.md +7 -20
  94. package/assets/skills/office-spreadsheets/references/charts.md +15 -34
  95. package/assets/skills/office-spreadsheets/references/domain/financial-models.md +10 -25
  96. package/assets/skills/office-spreadsheets/references/domain/healthcare.md +8 -19
  97. package/assets/skills/office-spreadsheets/references/domain/marketing.md +8 -22
  98. package/assets/skills/office-spreadsheets/references/domain/research.md +8 -19
  99. package/assets/skills/office-spreadsheets/references/formula-patterns.md +20 -50
  100. package/assets/skills/office-spreadsheets/references/style-guidelines.md +19 -44
  101. package/assets/skills/office-spreadsheets/references/workbook-structure.md +12 -35
  102. package/assets/skills/office-spreadsheets/routing/google-sheets.md +11 -26
  103. package/assets/skills/office-spreadsheets/tasks/analyze-workbook.md +10 -25
  104. package/assets/skills/office-spreadsheets/tasks/annotations.md +12 -30
  105. package/assets/skills/office-spreadsheets/tasks/create-workbook.md +5 -5
  106. package/assets/skills/office-spreadsheets/tasks/diff-workbooks.md +2 -2
  107. package/assets/skills/office-spreadsheets/tasks/edit-workbook.md +5 -5
  108. package/assets/skills/office-spreadsheets/tasks/inspect-workbook.md +9 -9
  109. package/assets/skills/office-spreadsheets/tasks/recalc-and-check.md +10 -30
  110. package/assets/skills/shared/annotation-recipes.md +98 -120
  111. package/assets/skills/shared/common-workflow.md +70 -80
  112. package/dist/index.js +1 -1
  113. package/package.json +1 -1
@@ -1,59 +1,54 @@
1
1
  # Answering questions about a workbook the user has open
2
2
 
3
- Read-only work: no writes, no saves, no restyling. The deliverable is an answer with cell
4
- references the user can check, not a changed document.
3
+ Read-only: no writes, no saves, no restyling. Deliver an answer with cell references the
4
+ user can check, not a changed document.
5
5
 
6
6
  ## Reading
7
7
 
8
- - `info` first: which workbook, which sheets, which used ranges, tables, charts, pivots.
9
- That tells you where to look and whether the thing the user is asking about even exists.
10
- - `read_range --formulas` for the cells that matter. You almost always need both: the
11
- value tells you *what*, the formula tells you *why*. A number with no formula behind it
12
- is an input the user typed; a formula with no precedent is a number you cannot trust.
13
- - `read_range --display` when the question is about how something *reads* (`###`, a
14
- truncated label, a date that shows as a serial). Displayed text follows the number
15
- format; the value does not.
16
- - Read the workbook's own labels — row and column headers, period names, "Actual" vs
17
- "Forecast" markers, units — before interpreting a cell. `D14` is only meaningful when
18
- you know it is "Q3 advertising spend, USD".
19
- - The window may be ahead of the disk file. If `info` shows `saved: false`, the numbers
20
- you read are the user's unsaved state; say so if the answer would differ from the file.
8
+ - `info` first: which workbook, sheets, used ranges, tables, charts, pivots — and whether
9
+ the thing asked about exists.
10
+ - `read_range --formulas` for the cells that matter. The value says *what*; the formula
11
+ says *why*. A number with no formula is a typed input; a formula with no precedent is
12
+ untrustworthy.
13
+ - `read_range --display` when the question is how something *reads* (`###`, a truncated
14
+ label, a date shown as a serial): displayed text follows the number format, values do
15
+ not.
16
+ - Read the workbook's labels — headers, periods, "Actual" vs "Forecast", units — before
17
+ interpreting a cell. `D14` means nothing without "Q3 advertising spend, USD".
18
+ - The window may be ahead of the file. `info` showing `saved: false` means you are reading
19
+ the user's unsaved state; say so when the answer would differ.
21
20
 
22
21
  ## Answering
23
22
 
24
- 1. **Locate the output by its labels**, not by guesswork: find the row/column that names
25
- the metric and the period the user asked about, then read the intersection.
26
- 2. **Trace the precedent chain** back from the output to labelled assumptions or raw
27
- inputs. `read_range --formulas` on each step; stop at cells whose value is typed rather
28
- than computed. Reporting an intermediate total as the cause is the classic error.
29
- 3. **Reconcile before asserting.** If a total does not equal the sum of its parts, that is
30
- the finding — report the gap and the cells, do not average it away.
31
- 4. **Compute from the underlying values.** A cell showing `1.2` may hold `1.2345`; the
32
- answer to "what is the margin" uses the stored value, and if the requested precision
33
- needs the rounded number, say that you are using the displayed value.
34
- 5. **Rank drivers** by absolute contribution when the question is "why did it move".
35
- Report the top two or three with their cells and amounts, not a list of everything.
36
- 6. **Cite cells** in the reply: `` `Summary!D14` shows 1,234 units because `Build!F7:F12`
37
- sums to that ``. A claim without an address is not verifiable.
38
- 7. If two sheets disagree, say which one you believe and why (more recent period, source
39
- data rather than a copy, a formula chain rather than a paste), and do not "fix" either
40
- without being asked.
23
+ 1. **Locate the output by its labels**, not by guessing: find the metric's row/column and
24
+ the period, then read the intersection.
25
+ 2. **Trace the precedent chain** back to labelled assumptions or raw inputs. Use
26
+ `read_range --formulas` at each step; stop at typed cells. Reporting an intermediate
27
+ total as the cause is the classic error.
28
+ 3. **Reconcile before asserting.** If a total is not the sum of its parts, that is the
29
+ finding: report the gap and the cells; do not average it away.
30
+ 4. **Compute from underlying values.** A cell showing `1.2` may hold `1.2345`; use the
31
+ stored value, and say so if the requested precision forces the displayed one.
32
+ 5. **Rank drivers** by absolute contribution for "why did it move": the top two or three,
33
+ with cells and amounts, not everything.
34
+ 6. **Cite cells**: `` `Summary!D14` shows 1,234 units because `Build!F7:F12` sums to that ``.
35
+ A claim without an address is unverifiable.
36
+ 7. Sheets disagree: say which you believe and why (more recent period, source over copy,
37
+ formula chain over paste) and do not "fix" either unasked.
41
38
 
42
39
  ## Sensitive reviews
43
40
 
44
- Clinical records, payroll and individual compensation, customer-level data: answer at the
45
- level the user asked for and no lower. Inspect structure, formats, dependency chains and
46
- formulas as evidence, and do not echo restricted values into the chat unless the user
47
- needs that exact figure to act. If the question cannot be answered without exposing
48
- personal data, say what you can answer instead.
41
+ Clinical records, payroll/compensation, customer-level data: answer at the level asked and
42
+ no lower. Inspect structure, formats, dependency chains and formulas as evidence; do not
43
+ echo restricted values unless the user needs that figure to act. If the question cannot be
44
+ answered without exposing personal data, say what you can answer instead.
49
45
 
50
46
  ## Limits
51
47
 
52
- - Do not equate the live window with the saved file, and do not present a read-only
53
- question as if you had verified the disk copy.
54
- - If a formula depends on external links, volatile functions (`NOW()`, `RAND()`) or a
55
- pivot cache that has not been refreshed, say the number is provisional.
56
- - If the workbook is protect-structured or the sheet is protected, reads still work;
57
- report the protection rather than working around it.
58
- - `#REF!`, `#DIV/0!` and friends in the cells are part of the answer, not noise: name the
59
- cell, the formula and what it broke.
48
+ - Do not equate the live window with the saved file, or present a read-only answer as
49
+ verified against disk.
50
+ - External links, volatile functions (`NOW()`, `RAND()`) or an unrefreshed pivot cache make
51
+ the number provisional; say so.
52
+ - Protected sheets: reads work; report the protection, do not work around it.
53
+ - `#REF!`, `#DIV/0!` and friends are part of the answer: name the cell, the formula and what
54
+ it broke.
@@ -1,87 +1,79 @@
1
1
  # Style guidelines for a live sheet
2
2
 
3
- Style is subordinate to content and to the user's own file. Precedence, strongest first:
3
+ Style is subordinate to content and the user's file. Precedence, strongest first:
4
4
 
5
- 1. What the user asked for, in this conversation.
5
+ 1. What the user asked for in this conversation.
6
6
  2. The workbook's existing conventions — fonts, colours, borders, tab colours, number
7
7
  formats. Match them; do not impose a house style on someone else's document.
8
- 3. The domain guidance for the kind of model (`domain_guidance/`).
8
+ 3. The domain guidance for the model (`domain_guidance/`).
9
9
  4. The defaults below.
10
10
 
11
- Look before you paint: `info` for tab colours and structure, `read_range` for the formats
12
- a neighbouring block already uses. Restyling a user's sheet because your defaults are
13
- tidier is a defect, not a service.
11
+ Look before you paint: `info` for tab colours and structure, `read_range` for neighbouring
12
+ formats. Restyling because your defaults are tidier is a defect, not a service.
14
13
 
15
14
  ## Defaults that are safe anywhere
16
15
 
17
- - **Font family**: one per workbook. If it has none, Helvetica Neue → Helvetica → Arial →
18
- Aptos. **Two sizes**: 10 pt body, 14 pt title, 16 pt ceiling. Never introduce a third
19
- family or a decorative size.
16
+ - **Font**: one family per workbook. If it has none, Helvetica Neue → Helvetica → Arial →
17
+ Aptos. Two sizes: 10 pt body, 14 pt title, 16 pt ceiling. Never a third family or a
18
+ decorative size.
20
19
  - **Alignment**: text left, numbers right, headers centred horizontally and middle
21
- vertically. Do not centre numbers to look neat; they lose their decimal alignment.
20
+ vertically. Never centre numbers — they lose decimal alignment.
22
21
  - **Headers**: bold, one rule under the last header row (`border: "outline"` on the header
23
- block, or a bottom border on the row). No merged cells in working headers — merge only a
24
- single spanning title, and prefer Center Across Selection for that.
25
- - **Inputs vs calculations**: an input cell the user is expected to type into gets a light
26
- fill (`#FFF2CC` amber) and a thin border; calculated cells keep a plain fill. If the
27
- whole block is inputs, one header note beats painting every cell.
28
- - **Gridlines**: a clean output or dashboard sheet hides them (`ActiveWindow.DisplayGridlines
29
- = $false`, a view setting, not a cell format) and uses thin structural borders instead.
30
- A working sheet keeps them.
22
+ block, or a bottom border on the row). No merged cells in working headers; merge only a
23
+ single spanning title, preferring Center Across Selection.
24
+ - **Inputs vs calculations**: cells the user types into get a light fill (`#FFF2CC` amber)
25
+ and thin border; calculated cells stay plain. If the whole block is inputs, one header
26
+ note beats painting every cell.
27
+ - **Gridlines**: a clean output or dashboard hides them
28
+ (`ActiveWindow.DisplayGridlines = $false`, a view setting, not a cell format) and uses
29
+ thin structural borders; a working sheet keeps them.
31
30
  - **Borders**: outline a block, hairline between header and body. No box around every cell,
32
- no double lines, no thick decorative frames.
33
- - **Column widths**: set them once per block (`column_width` in `style_range`), not per
34
- cell. Widen for the formatted value, then check with `read_range --display` for `###`.
35
- - **Conditional formatting**: bounded to the data range, one or two rules. Never a whole
36
- column, never a rule that paints a user input cell.
37
- - **Freeze panes** are not a styling nicety; the tool cannot set them on a hidden window.
38
- If scrolling is the complaint, say so and let the user freeze the row.
31
+ no double or thick decorative frames.
32
+ - **Column widths**: once per block (`column_width` in `style_range`), not per cell; widen
33
+ for the formatted value, then check `###` with `read_range --display`.
34
+ - **Conditional formatting**: bounded to the data range, one or two rules; never a whole
35
+ column, never paint a user input cell.
36
+ - **Freeze panes** are a view setting, not styling. The tool cannot set them on a hidden
37
+ window; if scrolling is the complaint, say so and let the user freeze the row.
39
38
 
40
39
  ## Model layouts
41
40
 
42
- - Summary above detail, outputs before workings, assumptions grouped in one block rather
43
- than scattered. A reader should be able to look at the top-left and understand the sheet.
44
- - One blank row at the top of a new output sheet, the title in an unfilled cell on the
45
- left, a thin rule under it. No logo, no merged banner, no slogan.
46
- - Rows of commentary go to the right of the numbers, separated by one blank column; they
47
- never sit between a label and its value.
48
- - Helper rows: italic, grouped under the block they serve, collapsed if the workbook
49
- already uses grouping. Helper columns live outside the printed range or on a separate
50
- helper sheet.
51
- - A case or scenario selector is a visible label plus a validated cell: `Case Selected:`
52
- and the value on display. Do not hide the control in a defined name.
53
- - Section bands (a filled row spanning the table) get one outline around the whole
54
- section, not per row.
55
- - Dark header fill with white text, or plain text with a rule. Pick one per workbook.
41
+ - Summary above detail, outputs before workings, assumptions grouped in one block. The
42
+ top-left should explain the sheet.
43
+ - New output sheet: one blank row at the top, title in an unfilled left cell, thin rule
44
+ under it. No logo, merged banner or slogan.
45
+ - Commentary goes right of the numbers, separated by one blank column; never between a
46
+ label and its value.
47
+ - Helper rows: italic, grouped under their block, collapsed if the workbook already groups.
48
+ Helper columns outside the print range or on a separate helper sheet.
49
+ - Scenario selector: a visible label plus a validated cell (`Case Selected:` and the value);
50
+ never hidden in a defined name.
51
+ - Section bands: one outline around the whole section, not per row.
52
+ - Dark header fill with white text, or plain with a rule — one per workbook.
56
53
 
57
54
  ## Finance conventions
58
55
 
59
- These are long-standing reader expectations in financial models; a reviewer notices when
60
- they are violated.
61
-
62
- - **Colour encodes provenance.** Blue font for editable hard-coded inputs, black for
63
- formulas on the same sheet, green for links to another sheet, red for links to an
64
- external workbook. Results on an output view stay black or the brand dark colour.
65
- - **Number formats**: `#,##0` for amounts, `#,##0.00` for per-share and price data,
66
- `0.0%` for rates, `( )` for negatives and `-` for zero in accounting views
67
- (`#,##0;(#,##0);"-"`). Currency symbol on the first monetary row and on totals, not on
68
- every row.
69
- - **Indent formats** (` @` for text labels, `_(`-style spacing) map a hierarchy without
70
- empty columns.
71
- - **Totals** sit flush left in the label column, bold, with the rule above them. A total
72
- that is a hard number rather than a formula is a finding, not a style choice.
73
- - **Period labels** follow `mmm-yy`, `d-mmm`, `yyyy`, `Q#:YY`, `FY:YY` as the workbook
74
- already does. A date column has one format down its whole length.
75
- - **Actuals vs forecast**: the change of basis is visible — a divide, a different fill, or
76
- a label — and never inferred from a colour alone.
77
- - A model that needs a gutter between the row labels and the numbers gets columns A:B
78
- reserved for it. Do not retrofit a gutter onto a sheet that does not have one.
56
+ - **Colour = provenance**: blue font for hard-coded inputs, black for same-sheet formulas,
57
+ green for links to another sheet, red for links to an external workbook. Output views
58
+ stay black or brand dark.
59
+ - **Number formats**: `#,##0` amounts, `#,##0.00` per-share/price, `0.0%` rates,
60
+ `#,##0;(#,##0);"-"` for accounting (parentheses for negatives, dash for zero). Currency
61
+ symbol on the first monetary row and on totals, not every row.
62
+ - **Indent formats** (` @` for text labels, `_(`-style spacing) map hierarchy without empty
63
+ columns.
64
+ - **Totals** flush left in the label column, bold, rule above. A hard-number total instead
65
+ of a formula is a finding.
66
+ - **Period labels** follow `mmm-yy`, `d-mmm`, `yyyy`, `Q#:YY`, `FY:YY` as the workbook does;
67
+ one date format down a column.
68
+ - **Actuals vs forecast**: a visible change of basis (divide, fill, label), never colour
69
+ alone.
70
+ - A needed gutter between row labels and numbers gets columns A:B reserved; do not retrofit
71
+ one onto a sheet that lacks it.
79
72
 
80
73
  ## Warning colour, used sparingly
81
74
 
82
75
  - Input that must be refreshed: amber fill (`#FFF2CC`), normal font.
83
- - Critical error or failed check: light red fill (`#FFC7CE`) plus bold red text
84
- (`#9C0006`).
85
- - Passing checks: neutral. A green wash over every PASS makes the one red row invisible.
86
- - Never encode a value only in colour — a reader with a monochrome printout, or a colour
87
- vision deficiency, must still see the meaning. Put the flag in a cell.
76
+ - Critical error or failed check: light red fill (`#FFC7CE`) plus bold red text (`#9C0006`).
77
+ - Passing checks: neutral. A green wash over every PASS hides the one red row.
78
+ - Never encode meaning in colour alone; put the flag in a cell so a monochrome printout or
79
+ colour-vision deficiency still reads it.
@@ -1,44 +1,39 @@
1
1
  # Creating content in a live workbook
2
2
 
3
- The user is watching, so the order you do things in is visible. Plan on paper first, then
4
- make a small number of writes.
3
+ The user sees every step. Plan on paper first, then write in a few batches.
5
4
 
6
- ## 1. Decide what is actually being created
5
+ ## 1. Decide what is being created
7
6
 
8
- Before you write a cell, you should be able to answer:
7
+ Answer these before writing a cell:
9
8
 
10
- - **Who reads it, and what decision does it support?** A one-page summary for a committee
11
- and a working model for an analyst are different sheets.
12
- - **What are the outputs?** Name them. Each output is a number with a label, a period and
13
- a unit.
14
- - **What are the inputs?** Name them, with their sources. Inputs nobody will update are
9
+ - **Who reads it, and what decision does it support?** A committee summary and an analyst's
10
+ working model are different sheets.
11
+ - **What are the outputs?** Name each one: a number with a label, a period and a unit.
12
+ - **What are the inputs?** Name them with their sources. Inputs nobody updates are
15
13
  decoration.
16
- - **What is calculated in between?** The steps between input and output are what a reviewer
17
- audits; if you cannot name them, the model is not designed yet.
18
- - **What would make it wrong?** A check or a reconciliation, even one line: totals tie,
19
- parts sum to the whole, cash ends at the right balance.
14
+ - **What is calculated in between?** A reviewer audits these steps; if you cannot name them,
15
+ the model is not designed yet.
16
+ - **What would make it wrong?** At least one check: totals tie, parts sum to the whole, cash
17
+ ends at the right balance.
20
18
 
21
- If the request leaves two of these open, ask one short question rather than guessing —
22
- a live edit is expensive to unpick.
19
+ If two are still open, ask one short question — a live edit is expensive to unpick.
23
20
 
24
21
  ## 2. Where it goes
25
22
 
26
- - Roles, not a fixed tab count: inputs, assumptions, calculations, outputs. A small sheet
27
- can carry several roles; a large model separates them.
28
- - Outputs at the left of the tab strip, workings in the middle, inputs at the right; a
29
- check/audit tab last if the model warrants one. Do not add a Checks tab to a simple
30
- sheet — a labelled verification row is enough.
31
- - Keep inputs next to the calculations they feed when the model is small; move them to a
32
- dedicated input sheet only when more than one sheet consumes them.
23
+ - Organise by role, not tab count: inputs, assumptions, calculations, outputs. Small sheets
24
+ merge roles; large models separate them.
25
+ - Outputs left of the tab strip, workings middle, inputs right; a check/audit tab last if
26
+ warranted.
27
+ - No separate Checks tab on a simple sheet — a labelled verification row is enough.
28
+ - Keep inputs beside their calculations; use a dedicated input sheet once several sheets
29
+ consume them.
33
30
  - Calculate once, link everywhere else. Two cells computing the same number is a future
34
31
  disagreement.
35
- - Insights (a short comment or a highlighted conclusion) go next to the result they
36
- explain, not in a separate "insights" area.
32
+ - Put insights next to the result they explain, never in a separate area.
37
33
 
38
- **Adding a tab is not an operation of this skill.** The tool writes into sheets that
39
- already exist. If the job needs a new sheet, ask the user to insert one (Right-click a tab
40
- → Insert), or use the file route in `../../office-spreadsheets/SKILL.md` and tell them to
41
- reopen. Do not repurpose an existing sheet as scratch space.
34
+ **This skill cannot add a tab** — it writes into existing sheets. Ask the user to insert one
35
+ (right-click a tab → Insert), or use the file route in `../../office-spreadsheets/SKILL.md`
36
+ and tell them to reopen. Never repurpose a sheet as scratch space.
42
37
 
43
38
  ## 3. Write it
44
39
 
@@ -51,28 +46,26 @@ recalc
51
46
  read_range --sheet "Inputs" --range B3:D9 --formulas
52
47
  ```
53
48
 
54
- - One `write_range` per block with its real shape. The array is rows × columns; do not pad
55
- with empty strings to make it rectangular — use `null` for a genuinely empty cell.
56
- - Write the labels and the units with the numbers. A block of bare numbers is not done.
57
- - Default formats in the write step, not afterwards: `number_format` in `style_range`
58
- applied to the whole block is one call and keeps every cell consistent.
59
- - Formulas as text starting with `=`, absolute where they must stay put (`$C$4`), relative
60
- where the fill should walk (`D5`). Test one cell before filling a column.
61
- - If the sheet already has content, check the used range first and write beside it, not
62
- over it.
49
+ - One `write_range` per block, in its real shape (rows × columns). No empty-string padding;
50
+ use `null` for an empty cell.
51
+ - Write labels and units with the numbers. Bare numbers are not done.
52
+ - Apply `number_format` in one `style_range` over the block, not cell by cell.
53
+ - Formulas start with `=`: absolute where fixed (`$C$4`), relative where the fill walks
54
+ (`D5`). Test one cell before filling.
55
+ - If the sheet has content, check the used range and write beside it, not over it.
63
56
 
64
57
  ## 4. Check it, then say what you did
65
58
 
66
- - `read_range --formulas` over everything you wrote; `errors` must be empty.
67
- - `recalc`, then read the outputs again — a formula that never calculated proves nothing.
68
- - `info` if you added tables or charts, to confirm they landed on the sheet you meant.
69
- - Report the ranges and the state of the document (unsaved, or saved where). See the
70
- Delivery section of `../SKILL.md`.
59
+ - `read_range --formulas` over everything written; `errors` must be empty.
60
+ - `recalc`, then re-read the outputs — an uncalculated formula proves nothing.
61
+ - `info` after adding tables or charts, to confirm the target sheet.
62
+ - Report the ranges and document state (unsaved, or saved where). See Delivery in
63
+ `../SKILL.md`.
71
64
 
72
65
  ## 5. Sizing and layout
73
66
 
74
- - Set column widths after the content exists, from the widest formatted value, then
75
- re-read with `--display` to catch `###`.
76
- - Wrap long text labels instead of widening a column to half the screen.
77
- - Helper calculations go in their own block or sheet, labelled, not buried between two
78
- output rows.
67
+ - Set widths after content, sized to the widest formatted value; check `###` with
68
+ `--display`.
69
+ - Wrap long labels instead of widening a column to half the screen.
70
+ - Give helper calculations their own labelled block or sheet, never a row buried between
71
+ outputs.
@@ -1,47 +1,41 @@
1
1
  # Editing a workbook the user already built
2
2
 
3
- The existing workbook is the reference. Its structure, formula style, formats, labels and
4
- navigation are what the user expects to keep seeing; your job is to make one change that
5
- looks like it was always there.
3
+ The existing workbook is the reference. Keep its structure, formula style, formats, labels
4
+ and navigation; make one change that looks native.
6
5
 
7
6
  ## Read the ground first
8
7
 
9
- Nothing below works without this step, and it is cheap:
8
+ Cheap, and nothing below works without it:
10
9
 
11
- 1. `info` — workbook name and path, `saved` flag (unsaved work in progress!), sheets,
12
- used ranges, tables, charts, pivots, protection.
13
- 2. `read_range --formulas` over the block you are about to touch **and its neighbours**.
14
- You need to know the pattern a formula follows before you extend it.
15
- 3. `read_range --display` when the change is formatting — it tells you the current number
16
- format's effect, not just the stored value.
17
- 4. Read the labels around the block: period, unit, actual/forecast. A number is only
18
- meaningful with its label, and your new row must match the surrounding convention.
10
+ 1. `info` — workbook name/path, `saved` flag (unsaved work!), sheets, used ranges, tables,
11
+ charts, pivots, protection.
12
+ 2. `read_range --formulas` over the target block **and its neighbours**. Know the formula
13
+ pattern before extending it.
14
+ 3. `read_range --display` when changing formatting: it shows the format's effect, not the
15
+ stored value.
16
+ 4. Read the surrounding labels: period, unit, actual/forecast. Match the convention.
19
17
 
20
- If the target block holds values you cannot explain from the request, stop and ask. On a
21
- live document, "I thought it was empty" is how an analyst's afternoon disappears.
18
+ If the block holds values you cannot explain from the request, stop and ask.
22
19
 
23
20
  ## Rules of the edit
24
21
 
25
- - **Change the cells the request names, and the formulas those cells feed.** A changed
26
- input propagates on its own; do not hand-edit downstream totals.
27
- - **Do not add, remove, rename, reorder or split sheets/tabs** unless the request says so
28
- or the change genuinely cannot be expressed otherwise (a new output with no home).
22
+ - **Change the cells the request names and the formulas those cells feed.** A changed input
23
+ propagates; do not hand-edit downstream totals.
24
+ - **Do not add, remove, rename, reorder or split sheets** unless requested, or the change
25
+ cannot otherwise be expressed (a new output with no home).
29
26
  - **Preserve everything you did not create**: other sheets, formulas, named ranges,
30
- comments, protection, hidden or grouped rows, freeze panes (user-set), native tables and
31
- their structured references, pivot sources, shared formulas, filters, external links,
27
+ comments, protection, hidden/grouped rows, user freeze panes, native tables and their
28
+ structured references, pivot sources, shared formulas, filters, external links,
32
29
  `INDIRECT` routing, calculation settings.
33
- - **Never flatten formulas to values.** Not to "simplify", not to "fix" a display problem.
34
- - **Extend, do not replace.** When a row or column is added to a block that has a table,
35
- conditional format or chart on it, extend the object to cover the new cells instead of
36
- building a parallel object beside it. `ListObject.Resize` and the chart's
37
- `SetSourceData` are the tools.
38
- - **Small visual fixes stay local.** Widen the one column that clips. Do not autofit the
39
- sheet, do not restyle a header because it is not your default style.
40
- - **Match the existing formula conventions** — anchoring style, `SUMIFS` vs `SUMPRODUCT`,
41
- rounding, the workbook's error handling. A locally "better" formula that reads
42
- differently is a maintenance cost the user did not ask for.
43
- - **Pre-existing errors are not yours to fix.** Report them with the cell and the formula
44
- and ask. Silently repairing a `#REF!` can change a number the user relies on.
30
+ - **Never flatten formulas to values** — not to "simplify", not to "fix" a display problem.
31
+ - **Extend, do not replace.** A row or column added under a table, conditional format or
32
+ chart extends that object (`ListObject.Resize`, `SetSourceData`), never a parallel one.
33
+ - **Keep visual fixes local.** Widen the one clipped column. No sheet-wide autofit, no
34
+ restyle because it is not your default.
35
+ - **Match formula conventions**: anchoring style, `SUMIFS` vs `SUMPRODUCT`, rounding, error
36
+ handling. A "better" formula that reads differently costs maintenance.
37
+ - **Pre-existing errors are not yours to fix.** Report the cell, its formula and ask;
38
+ silently repairing `#REF!` can change a number the user relies on.
45
39
 
46
40
  ## Doing it
47
41
 
@@ -54,19 +48,17 @@ recalc
54
48
  read_range --sheet "Build" --range D5:G13 --formulas # prove it
55
49
  ```
56
50
 
57
- - Keep writes to the named rectangle; `--clear` only on a range whose previous contents
58
- you have read and can restore.
59
- - Style by copying the neighbouring block's codes: read a cell you want to match, mirror
60
- its `number_format`, and apply it to the new cells. Do not invent a new format for one
61
- row.
62
- - If a formula in the new cell must differ from the pattern (a different anchor, a
63
- one-off), say why in the reply — a reviewer will find it.
51
+ - Keep writes to the named rectangle. `--clear` only a range whose contents you have read
52
+ and can restore.
53
+ - Copy style codes from the neighbouring block: read a matching cell, mirror its
54
+ `number_format`, apply to the new cells. Do not invent a format for one row.
55
+ - A formula that must differ from the pattern (different anchor, one-off): say why in the
56
+ reply.
64
57
 
65
58
  ## When you are done
66
59
 
67
- - `read_range --formulas` over every cell you changed and its immediate neighbours.
68
- - `recalc` after formulas, then re-read the outputs that depend on them.
69
- - `info` if tables, charts or pivots were extended, to confirm the objects still exist and
70
- cover the new cells.
71
- - Report: sheet, exact ranges, cell counts, and what the document's saved state is. If the
72
- edit touched a formula graph, say which outputs were affected.
60
+ - `read_range --formulas` over every changed cell and its neighbours.
61
+ - `recalc` after formulas, then re-read dependents.
62
+ - `info` if tables, charts or pivots were extended, to confirm coverage of the new cells.
63
+ - Report sheet, exact ranges, cell counts and saved state. If the formula graph changed,
64
+ name the affected outputs.