dsh-office-kit 0.4.2 → 0.4.4
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.
- package/assets/skills/excel-live-control/SKILL.md +119 -152
- package/assets/skills/excel-live-control/domain_guidance/financial_models.md +42 -58
- package/assets/skills/excel-live-control/domain_guidance/healthcare.md +36 -42
- package/assets/skills/excel-live-control/domain_guidance/marketing_advertising.md +33 -34
- package/assets/skills/excel-live-control/domain_guidance/scientific_research.md +34 -36
- package/assets/skills/excel-live-control/references/office-automation.md +127 -153
- package/assets/skills/excel-live-control/references/read_only_qna.md +40 -45
- package/assets/skills/excel-live-control/style_guidelines.md +56 -64
- package/assets/skills/excel-live-control/workflows/create_workflows.md +40 -47
- package/assets/skills/excel-live-control/workflows/edit_workflows.md +37 -45
- package/assets/skills/office-documents/SKILL.md +24 -60
- package/assets/skills/office-documents/examples/end_to_end_smoke_test.md +5 -5
- package/assets/skills/office-documents/ooxml/comments.md +8 -8
- package/assets/skills/office-documents/ooxml/hyperlinks_and_fields.md +10 -10
- package/assets/skills/office-documents/ooxml/rels_and_content_types.md +7 -7
- package/assets/skills/office-documents/ooxml/tracked_changes.md +12 -12
- package/assets/skills/office-documents/references/docx-structure.md +11 -13
- package/assets/skills/office-documents/references/template-elicitation.md +11 -13
- package/assets/skills/office-documents/references/writing-quality.md +20 -20
- package/assets/skills/office-documents/scripts/add_tracked_replacements.py +4 -3
- package/assets/skills/office-documents/scripts/docx_kit.py +68 -27
- package/assets/skills/office-documents/scripts/heading_audit.py +3 -4
- package/assets/skills/office-documents/scripts/internal_nav.py +3 -1
- package/assets/skills/office-documents/scripts/merge_docx_append.py +104 -0
- package/assets/skills/office-documents/scripts/table_geometry.py +13 -3
- package/assets/skills/office-documents/scripts/watermark_add.py +6 -5
- package/assets/skills/office-documents/scripts/watermark_audit_remove.py +6 -4
- package/assets/skills/office-documents/tasks/accessibility_a11y.md +16 -22
- package/assets/skills/office-documents/tasks/captions_crossrefs.md +23 -26
- package/assets/skills/office-documents/tasks/clean_tracked_changes.md +17 -22
- package/assets/skills/office-documents/tasks/comments_manage.md +9 -11
- package/assets/skills/office-documents/tasks/compare_diff.md +10 -16
- package/assets/skills/office-documents/tasks/create_edit.md +14 -16
- package/assets/skills/office-documents/tasks/equations.md +17 -28
- package/assets/skills/office-documents/tasks/fields_update.md +14 -16
- package/assets/skills/office-documents/tasks/fixtures_edge_cases.md +19 -33
- package/assets/skills/office-documents/tasks/footnotes_endnotes.md +12 -14
- package/assets/skills/office-documents/tasks/forms_content_controls.md +16 -20
- package/assets/skills/office-documents/tasks/headings_numbering.md +17 -22
- package/assets/skills/office-documents/tasks/images_figures.md +15 -25
- package/assets/skills/office-documents/tasks/multi_doc_merge.md +13 -23
- package/assets/skills/office-documents/tasks/navigation_internal_links.md +18 -21
- package/assets/skills/office-documents/tasks/privacy_scrub_metadata.md +16 -22
- package/assets/skills/office-documents/tasks/protection_restrict_editing.md +19 -21
- package/assets/skills/office-documents/tasks/read_review.md +9 -20
- package/assets/skills/office-documents/tasks/redaction_anonymization.md +17 -18
- package/assets/skills/office-documents/tasks/sections_layout.md +16 -23
- package/assets/skills/office-documents/tasks/style_lint_normalize.md +18 -22
- package/assets/skills/office-documents/tasks/tables_spreadsheets.md +21 -31
- package/assets/skills/office-documents/tasks/templates_style_packs.md +17 -21
- package/assets/skills/office-documents/tasks/toc_workflow.md +10 -14
- package/assets/skills/office-documents/tasks/verify_render.md +11 -23
- package/assets/skills/office-documents/tasks/watermarks_background.md +10 -14
- package/assets/skills/office-documents/troubleshooting/libreoffice_headless.md +6 -6
- package/assets/skills/office-documents/troubleshooting/run_splitting.md +12 -12
- package/assets/skills/office-pdf/SKILL.md +36 -51
- package/assets/skills/office-pdf/references/form-fields.md +20 -20
- package/assets/skills/office-pdf/references/geometry.md +10 -10
- package/assets/skills/office-pdf/references/layout-quality.md +13 -13
- package/assets/skills/office-pdf/references/limits.md +12 -56
- package/assets/skills/office-pdf/tasks/annotations.md +5 -5
- package/assets/skills/office-pdf/tasks/create.md +6 -9
- package/assets/skills/office-pdf/tasks/edit-pages.md +14 -14
- package/assets/skills/office-pdf/tasks/forms.md +15 -15
- package/assets/skills/office-pdf/tasks/read.md +9 -9
- package/assets/skills/office-pdf/tasks/redact.md +18 -18
- package/assets/skills/office-pdf/tasks/stamp.md +10 -10
- package/assets/skills/office-presentations/SKILL.md +71 -91
- package/assets/skills/office-presentations/container_tools/preview_render.py +4 -1
- package/assets/skills/office-presentations/container_tools/render_slides.py +1 -1
- package/assets/skills/office-presentations/domain_guidance/finance.md +16 -16
- package/assets/skills/office-presentations/recipes/README.md +24 -35
- package/assets/skills/office-presentations/recipes/autolayout.md +12 -13
- package/assets/skills/office-presentations/recipes/connectors.md +11 -12
- package/assets/skills/office-presentations/recipes/images.md +11 -12
- package/assets/skills/office-presentations/recipes/master-and-layouts.md +18 -18
- package/assets/skills/office-presentations/recipes/native-charts.md +8 -8
- package/assets/skills/office-presentations/recipes/rich-text-runs.md +13 -13
- package/assets/skills/office-presentations/recipes/speaker-notes.md +7 -7
- package/assets/skills/office-presentations/recipes/tables.md +14 -14
- package/assets/skills/office-presentations/recipes/textbox-at-coordinate.md +9 -9
- package/assets/skills/office-presentations/recipes/theme-tokens.md +7 -8
- package/assets/skills/office-presentations/references/authoring-workflow.md +38 -43
- package/assets/skills/office-presentations/references/finalization.md +10 -12
- package/assets/skills/office-presentations/references/native-bullets.md +14 -18
- package/assets/skills/office-presentations/references/native-evidence.md +18 -32
- package/assets/skills/office-presentations/references/style-guidelines.md +27 -32
- package/assets/skills/office-presentations/references/templates.md +31 -60
- package/assets/skills/office-presentations/routing/google_slides.md +4 -4
- package/assets/skills/office-presentations/tasks/apply-annotations.md +17 -17
- package/assets/skills/office-presentations/tasks/charts-tables-notes.md +20 -23
- package/assets/skills/office-presentations/tasks/create-deck.md +19 -19
- package/assets/skills/office-presentations/tasks/edit-deck.md +14 -16
- package/assets/skills/office-presentations/tasks/inspect-and-verify.md +31 -34
- package/assets/skills/office-presentations/tasks/template-following.md +23 -28
- package/assets/skills/office-spreadsheets/SKILL.md +32 -39
- package/assets/skills/office-spreadsheets/recipes/charts.md +8 -26
- package/assets/skills/office-spreadsheets/recipes/conditional-formats.md +9 -26
- package/assets/skills/office-spreadsheets/recipes/data-tables.md +7 -23
- package/assets/skills/office-spreadsheets/recipes/named-ranges.md +8 -21
- package/assets/skills/office-spreadsheets/recipes/number-formats.md +7 -23
- package/assets/skills/office-spreadsheets/recipes/sparklines.md +7 -20
- package/assets/skills/office-spreadsheets/references/charts.md +15 -34
- package/assets/skills/office-spreadsheets/references/domain/financial-models.md +10 -25
- package/assets/skills/office-spreadsheets/references/domain/healthcare.md +8 -19
- package/assets/skills/office-spreadsheets/references/domain/marketing.md +8 -22
- package/assets/skills/office-spreadsheets/references/domain/research.md +8 -19
- package/assets/skills/office-spreadsheets/references/formula-patterns.md +20 -50
- package/assets/skills/office-spreadsheets/references/style-guidelines.md +19 -44
- package/assets/skills/office-spreadsheets/references/workbook-structure.md +12 -35
- package/assets/skills/office-spreadsheets/routing/google-sheets.md +11 -26
- package/assets/skills/office-spreadsheets/tasks/analyze-workbook.md +10 -25
- package/assets/skills/office-spreadsheets/tasks/annotations.md +12 -30
- package/assets/skills/office-spreadsheets/tasks/create-workbook.md +5 -5
- package/assets/skills/office-spreadsheets/tasks/diff-workbooks.md +2 -2
- package/assets/skills/office-spreadsheets/tasks/edit-workbook.md +5 -5
- package/assets/skills/office-spreadsheets/tasks/inspect-workbook.md +9 -9
- package/assets/skills/office-spreadsheets/tasks/recalc-and-check.md +10 -30
- package/assets/skills/shared/annotation-recipes.md +98 -120
- package/assets/skills/shared/common-workflow.md +70 -80
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/python/office_cli.py +38 -4
|
@@ -1,59 +1,54 @@
|
|
|
1
1
|
# Answering questions about a workbook the user has open
|
|
2
2
|
|
|
3
|
-
Read-only
|
|
4
|
-
|
|
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,
|
|
9
|
-
|
|
10
|
-
- `read_range --formulas` for the cells that matter.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- `read_range --display` when the question is
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- Read the workbook's
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
|
25
|
-
the
|
|
26
|
-
2. **Trace the precedent chain** back
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
3. **Reconcile before asserting.** If a total
|
|
30
|
-
|
|
31
|
-
4. **Compute from
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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,
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
|
3
|
+
Style is subordinate to content and the user's file. Precedence, strongest first:
|
|
4
4
|
|
|
5
|
-
1. What the user asked for
|
|
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
|
|
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
|
|
12
|
-
|
|
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
|
|
18
|
-
Aptos.
|
|
19
|
-
|
|
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.
|
|
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
|
|
24
|
-
single spanning title,
|
|
25
|
-
- **Inputs vs calculations**:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- **Gridlines**: a clean output or dashboard
|
|
29
|
-
= $false`, a view setting, not a cell format) and uses
|
|
30
|
-
|
|
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
|
|
33
|
-
- **Column widths**:
|
|
34
|
-
|
|
35
|
-
- **Conditional formatting**: bounded to the data range, one or two rules
|
|
36
|
-
column, never
|
|
37
|
-
- **Freeze panes** are not
|
|
38
|
-
|
|
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
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
- Helper rows: italic, grouped under
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- **
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
- **
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- **
|
|
70
|
-
|
|
71
|
-
- **
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
|
|
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
|
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
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
|
|
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
|
|
5
|
+
## 1. Decide what is being created
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
Answer these before writing a cell:
|
|
9
8
|
|
|
10
|
-
- **Who reads it, and what decision does it support?** A
|
|
11
|
-
|
|
12
|
-
- **What are the outputs?** Name
|
|
13
|
-
|
|
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?**
|
|
17
|
-
|
|
18
|
-
- **What would make it wrong?**
|
|
19
|
-
|
|
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
|
|
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
|
-
-
|
|
27
|
-
|
|
28
|
-
- Outputs
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- Keep inputs
|
|
32
|
-
|
|
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
|
-
-
|
|
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
|
-
**
|
|
39
|
-
|
|
40
|
-
|
|
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
|
|
55
|
-
|
|
56
|
-
- Write
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
|
67
|
-
- `recalc`, then read the outputs
|
|
68
|
-
- `info`
|
|
69
|
-
- Report the ranges and
|
|
70
|
-
|
|
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
|
|
75
|
-
|
|
76
|
-
- Wrap long
|
|
77
|
-
-
|
|
78
|
-
|
|
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.
|
|
4
|
-
navigation
|
|
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
|
-
|
|
8
|
+
Cheap, and nothing below works without it:
|
|
10
9
|
|
|
11
|
-
1. `info` — workbook name
|
|
12
|
-
|
|
13
|
-
2. `read_range --formulas` over the block
|
|
14
|
-
|
|
15
|
-
3. `read_range --display` when
|
|
16
|
-
|
|
17
|
-
4. Read the labels
|
|
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
|
|
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
|
|
26
|
-
|
|
27
|
-
- **Do not add, remove, rename, reorder or split sheets
|
|
28
|
-
|
|
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
|
|
31
|
-
|
|
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
|
|
34
|
-
- **Extend, do not replace.**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- **
|
|
39
|
-
|
|
40
|
-
- **
|
|
41
|
-
|
|
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
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
|
68
|
-
- `recalc` after formulas, then re-read
|
|
69
|
-
- `info` if tables, charts or pivots were extended, to confirm
|
|
70
|
-
|
|
71
|
-
|
|
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.
|