xlsx-input-code-output-canary
This skill prevents blind spreadsheet extraction. A workbook is not just a
table: it may contain input cells, formulas, named ranges, charts, stale cached
values, protection, or unsupported logic. The canary must prove the whole loop:
source manifest -> cache/hash check -> inventory -> classification -> code artifact -> output proof
Trigger
Use this before broad XLS/XLSX extraction, especially for llm-wiki issue #3 or
any corpus where spreadsheets are being treated as machine-readable high-yield
files.
Preconditions
- A user-approved issue plan authorizes this workflow.
- Raw workbook bytes are not committed. Online samples stay as URLs and hashes;
fetched bytes go only to an external local cache.
- Licenses are recorded before a source is used. GPL/EUPL/proprietary projects
remain reference-only unless explicitly approved.
- Formula cached values are evidence only. They are never accepted as verified
calculations.
Steps
- Validate the manifest.
uv run skills/xlsx-input-code-output-canary/resources/xlsx_canary.py manifest-check \
--manifest skills/xlsx-input-code-output-canary/resources/canary_manifest.json
The manifest must have exactly five simple and five complex workbooks, with
URL, license, byte count, sha256, purpose, and expected flags for each source.
- Run the offline self-test before online fetch.
uv run skills/xlsx-input-code-output-canary/resources/xlsx_canary.py self-test
The generated fixtures prove the basic data, calculation, and guarded paths
without network or raw committed workbooks.
- Fetch only when needed, into an external cache.
uv run skills/xlsx-input-code-output-canary/resources/xlsx_canary.py fetch \
--manifest skills/xlsx-input-code-output-canary/resources/canary_manifest.json \
--cache-dir ~/.cache/raw-to-knowledge-playbook/xlsx-canary
The helper refuses repo-local caches unless explicitly overridden for a
throwaway local run.
- Inventory each workbook.
uv run skills/xlsx-input-code-output-canary/resources/xlsx_canary.py inventory \
--workbook ~/.cache/raw-to-knowledge-playbook/xlsx-canary/S1-base-xlsx-base.xlsx \
--public-fixture-id S1-base-xlsx
Inventory records sheet names, formula cells and cached values, named ranges,
tables, merged ranges, charts, protection flags, parser versions, and sha256.
- Classify from inventory.
uv run skills/xlsx-input-code-output-canary/resources/xlsx_canary.py classify \
--inventory /path/to/inventory.json
Use only the closed classes: data, calculation, mixed, guarded,
unsupported.
For ACE wave 2 / issue #53, keep that original class and add the separate
ACE-facing workbook class from ace_classification_from_inventory():
data_workbook, calculation_workbook, report_workbook, or
excluded_workbook. Use classify --ace to emit those ACE fields from the
CLI. Do not use a workbook class as a route target.
- Require the triplet before promotion.
data: input schema/ranges -> parser or schema code -> normalized tables.
calculation: input cells/formula graph -> evaluator or ported code ->
recomputed output proof.
mixed: separate data and formula paths before output proof.
guarded or unsupported: explicit deferral artifact with reason.
- Apply the ACE #53 deferrals.
.xls, .xlsb, and .ods stay excluded_workbook until an approved
adapter issue lands with tests.
.xlsm macro presence and external links are inventory facts only; never
execute macros or trust linked content during ingestion.
- Protected workbooks route to explicit deferral unless a separate access
review authorizes metadata-only handling.
Verification
uv run skills/validate_skill.py --strict passes.
manifest-check passes for resources/canary_manifest.json.
self-test passes and proves data, calculation, and guarded paths.
- No raw
.xls, .xlsx, .xlsm, or .xlsb bytes are committed.
- Every canary source has URL, license note, byte count, and sha256.
- Formula workbooks are never marked verified from cached values alone.
- ACE #53 synthetic fixtures pass
uv run python scripts/validate_ace_wave2_spreadsheet_csv.py.
Cleanup
- Remove any temporary inventory/output files produced outside committed paths.
- Keep fetched workbooks in an external cache or delete them after the canary run.
- Do not add cache directories or raw workbook bytes to git.
Incident appendix
| Rule |
Why |
| No blind table dump |
Spreadsheet knowledge can be formula logic, not visible cells |
| Cached value is not proof |
Stale cached results can look authoritative while formulas are wrong |
| Cache-only raw files |
Committing third-party workbooks creates license and privacy residue |
| Closed classification vocabulary |
Agents otherwise invent reassuring statuses that do not gate scale-up |
| License before source use |
Fixture convenience must not override redistribution constraints |
1---2name: xlsx-input-code-output-canary3description: Classifies XLS/XLSX workbooks before extraction and requires a traceable input data or logic contract, code artifact, and verified output artifact for a ten-file canary. Use when spreadsheet files may contain formulas, named ranges, charts, cached values, protection, or mixed data and calculation logic.4license: CC-BY-4.05---67# xlsx-input-code-output-canary89This skill prevents blind spreadsheet extraction. A workbook is not just a10table: it may contain input cells, formulas, named ranges, charts, stale cached11values, protection, or unsupported logic. The canary must prove the whole loop:1213`source manifest -> cache/hash check -> inventory -> classification -> code artifact -> output proof`1415## Trigger16Use this before broad XLS/XLSX extraction, especially for llm-wiki issue #3 or17any corpus where spreadsheets are being treated as machine-readable high-yield18files.1920## Preconditions211. A user-approved issue plan authorizes this workflow.222. Raw workbook bytes are not committed. Online samples stay as URLs and hashes;23 fetched bytes go only to an external local cache.243. Licenses are recorded before a source is used. GPL/EUPL/proprietary projects25 remain reference-only unless explicitly approved.264. Formula cached values are evidence only. They are never accepted as verified27 calculations.2829## Steps301. **Validate the manifest.**31 ```bash32 uv run skills/xlsx-input-code-output-canary/resources/xlsx_canary.py manifest-check \33 --manifest skills/xlsx-input-code-output-canary/resources/canary_manifest.json34 ```35 The manifest must have exactly five simple and five complex workbooks, with36 URL, license, byte count, sha256, purpose, and expected flags for each source.372. **Run the offline self-test before online fetch.**38 ```bash39 uv run skills/xlsx-input-code-output-canary/resources/xlsx_canary.py self-test40 ```41 The generated fixtures prove the basic data, calculation, and guarded paths42 without network or raw committed workbooks.433. **Fetch only when needed, into an external cache.**44 ```bash45 uv run skills/xlsx-input-code-output-canary/resources/xlsx_canary.py fetch \46 --manifest skills/xlsx-input-code-output-canary/resources/canary_manifest.json \47 --cache-dir ~/.cache/raw-to-knowledge-playbook/xlsx-canary48 ```49 The helper refuses repo-local caches unless explicitly overridden for a50 throwaway local run.514. **Inventory each workbook.**52 ```bash53 uv run skills/xlsx-input-code-output-canary/resources/xlsx_canary.py inventory \54 --workbook ~/.cache/raw-to-knowledge-playbook/xlsx-canary/S1-base-xlsx-base.xlsx \55 --public-fixture-id S1-base-xlsx56 ```57 Inventory records sheet names, formula cells and cached values, named ranges,58 tables, merged ranges, charts, protection flags, parser versions, and sha256.595. **Classify from inventory.**60 ```bash61 uv run skills/xlsx-input-code-output-canary/resources/xlsx_canary.py classify \62 --inventory /path/to/inventory.json63 ```64 Use only the closed classes: `data`, `calculation`, `mixed`, `guarded`,65 `unsupported`.66 For ACE wave 2 / issue #53, keep that original class and add the separate67 ACE-facing workbook class from `ace_classification_from_inventory()`:68 `data_workbook`, `calculation_workbook`, `report_workbook`, or69 `excluded_workbook`. Use `classify --ace` to emit those ACE fields from the70 CLI. Do not use a workbook class as a route target.716. **Require the triplet before promotion.**72 - `data`: input schema/ranges -> parser or schema code -> normalized tables.73 - `calculation`: input cells/formula graph -> evaluator or ported code ->74 recomputed output proof.75 - `mixed`: separate data and formula paths before output proof.76 - `guarded` or `unsupported`: explicit deferral artifact with reason.777. **Apply the ACE #53 deferrals.**78 - `.xls`, `.xlsb`, and `.ods` stay `excluded_workbook` until an approved79 adapter issue lands with tests.80 - `.xlsm` macro presence and external links are inventory facts only; never81 execute macros or trust linked content during ingestion.82 - Protected workbooks route to explicit deferral unless a separate access83 review authorizes metadata-only handling.8485## Verification86- `uv run skills/validate_skill.py --strict` passes.87- `manifest-check` passes for `resources/canary_manifest.json`.88- `self-test` passes and proves data, calculation, and guarded paths.89- No raw `.xls`, `.xlsx`, `.xlsm`, or `.xlsb` bytes are committed.90- Every canary source has URL, license note, byte count, and sha256.91- Formula workbooks are never marked verified from cached values alone.92- ACE #53 synthetic fixtures pass93 `uv run python scripts/validate_ace_wave2_spreadsheet_csv.py`.9495## Cleanup96- Remove any temporary inventory/output files produced outside committed paths.97- Keep fetched workbooks in an external cache or delete them after the canary run.98- Do not add cache directories or raw workbook bytes to git.99100## Incident appendix101| Rule | Why |102|---|---|103| No blind table dump | Spreadsheet knowledge can be formula logic, not visible cells |104| Cached value is not proof | Stale cached results can look authoritative while formulas are wrong |105| Cache-only raw files | Committing third-party workbooks creates license and privacy residue |106| Closed classification vocabulary | Agents otherwise invent reassuring statuses that do not gate scale-up |107| License before source use | Fixture convenience must not override redistribution constraints |