Skip to content

Add Excel design reconstruction skill 🤖🤖🤖 - #5077

Open
furukawa658 wants to merge 5 commits into
github:mainfrom
furukawa658:feat/excel-design-reconstruction
Open

furukawa658 wants to merge 5 commits into
github:mainfrom
furukawa658:feat/excel-design-reconstruction

Conversation

@furukawa658

Copy link
Copy Markdown
Contributor

Adds a reproducible workflow for converting layout-dependent Excel designs into traceable machine-readable tables. Includes mapping guidance, OOXML validation, a reconstruction script, and tests.

Validation:

  • 34 tests passed on openpyxl 3.1.4 and 3.1.5
  • npm run skill:validate: 430 skills valid
  • npm run build: passed

Business approval: Furukawa658

@furukawa658
furukawa658 requested review from a team as code owners October 14, 2026 12:15
Copilot AI balanced review requested due to automatic review settings October 14, 2026 12:15
@github-actions

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 5 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 2
Severity Rule File Line Match
ℹ️ skill-script-touched skills/excel-design-reconstruction/scripts/reconstruct.py 1 skills/excel-design-reconstruction/scripts/reconstruct.py
ℹ️ skill-script-touched skills/excel-design-reconstruction/tests/test_reconstruction.py 1 skills/excel-design-reconstruction/tests/test_reconstruction.py

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions github-actions Bot added new-submission PR adds at least one new contribution skills PR touches skills awaiting-automation merge-risk:high labels Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: 👀 Ready for review

Risk tier: merge-risk:high — Privileged execution, automation, or review-policy change
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access, including a maintainer with admin or maintain permission.

Why this tier
  • skills/excel-design-reconstruction/scripts/reconstruct.py is a high-risk path (automation, scripts, MCP config, hooks, or review policy)
  • skills/excel-design-reconstruction/tests/test_reconstruction.py is a high-risk path (automation, scripts, MCP config, hooks, or review policy)

Automated checks

Check Status Details
Line endings ✅ Passed Passed · logs
Spelling ✅ Passed Passed · logs
Generated README consistency ✅ Passed Passed · logs
Skill validation ✅ Passed Passed · logs
Skill lint (vally) ✅ Passed Passed · logs
Risk scan ✅ Passed Passed · logs
Contributor reputation ✅ Passed Passed · logs
Duplicate resource scan ✅ Passed Passed · logs
PR quality signal ⏭️ Skipped Skipped by its workflow · logs

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s); an approval from a maintainer with admin or maintain permission
  • The core-maintainers pool is not staffed yet; an approver with admin or maintain permission is required instead.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for a8b647c · gate run · This comment is maintained automatically — see submission gate docs.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Vally Lint Results

✅ All checks passed

Scope Checked
Skills 1
Agents 0
Total 1
Severity Count
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 0

Summary

Level Finding
ℹ️ ✅ excel-design-reconstruction (2/2 checks passed)
ℹ️ ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
ℹ️ ✓ spec-compliance: All spec checks passed.
ℹ️ ✓ [valid-refs] All file references across 1 skill(s) are valid.
ℹ️ ✓ valid-refs: All file references resolve to existing files within the skill directory.
ℹ️ 1 skill(s) linted, 1 passed
Full linter output
### Linting skills/excel-design-reconstruction
✅ excel-design-reconstruction (2/2 checks passed)
    ✓ [spec-compliance] All 1 skill(s) are spec-compliant.
        ✓ spec-compliance: All spec checks passed.
    ✓ [valid-refs] All file references across 1 skill(s) are valid.
        ✓ valid-refs: All file references resolve to existing files within the skill directory.

1 skill(s) linted, 1 passed

@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Oct 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Date extraction can alter stored values, and verification does not authenticate the complete workbook package.

5 open findings
What changed in this PR

Adds a deterministic skill for reconstructing layout-dependent Excel documents into traceable tables.

Knowledge uplift: High.

Changes:

  • Adds explicit mapping, approval, reconstruction, and verification workflows.
  • Adds OOXML safeguards and 34 focused tests.
  • Documents schemas, outputs, and dependencies.
File Description
skills/​excel-design-reconstruction/​SKILL.md Defines the reconstruction workflow.
skills/​excel-design-reconstruction/​scripts/​reconstruct.py Implements inspection, generation, and verification.
skills/​excel-design-reconstruction/​tests/​test_reconstruction.py Tests schemas, security controls, and tampering.
skills/​excel-design-reconstruction/​references/​mapping.md Documents mapping and output contracts.
skills/​excel-design-reconstruction/​requirements.txt Pins the supported openpyxl range.
docs/​README.skills.md Registers the new skill.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread skills/excel-design-reconstruction/scripts/reconstruct.py
Comment thread skills/excel-design-reconstruction/scripts/reconstruct.py Outdated
Comment thread skills/excel-design-reconstruction/scripts/reconstruct.py
Comment thread skills/excel-design-reconstruction/SKILL.md Outdated
Comment thread skills/excel-design-reconstruction/SKILL.md Outdated
Copilot AI balanced review requested due to automatic review settings October 14, 2026 14:09
@furukawa658

Copy link
Copy Markdown
Contributor Author

Addressed the five Copilot review findings and added the English-language skill update in 4863262: canonical regenerated OOXML package comparison (excluding ZIP encoding/timestamps and core created/modified timestamps); raw numeric/date OOXML values retained; 16,384-column guard including row_key; single-quoted YAML description; unavailable skill references removed. The source workbook's text and approved headers remain unchanged.

Validation: 38 tests passed on openpyxl 3.1.4 and 3.1.5; all 430 skills passed validation; npm run build and git diff --check passed; the synthetic packet and English text/link checks passed. Independent review of the English instructions is still pending.

@github-actions github-actions Bot added awaiting-automation ready-for-review Submission passed intake validation and is ready for maintainer review and removed ready-for-review Submission passed intake validation and is ready for maintainer review awaiting-automation labels Oct 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread skills/excel-design-reconstruction/scripts/reconstruct.py
Comment thread skills/excel-design-reconstruction/scripts/reconstruct.py
Comment thread skills/excel-design-reconstruction/SKILL.md
Comment thread skills/excel-design-reconstruction/references/mapping.md Outdated
Copilot AI balanced review requested due to automatic review settings October 16, 2026 09:33
@furukawa658

Copy link
Copy Markdown
Contributor Author

Addressed all four Copilot review findings in 2a23476:

  • Added explicit Step 1 (inspect), Step 2 (mapping.json definition linking references/mapping.md), and Step 3 (fingerprint and approval) sections before Step 4 (build) in SKILL.md.
  • Updated references/mapping.md to say inspect the source workbook instead of inspect the source image.
  • Applied validate_text (Excel 32,767-character limit and disallowed control character check) to user-defined column names in prepare_tables and build_packet.
  • Recorded openpyxl_version in manifest.json during build and verified it before package comparison in verify_packet with a clear version mismatch error.

Validation: 40 unit tests pass, npm run skill:validate and npm run build pass with clean LF line endings.

/request-review

@github-actions github-actions Bot added awaiting-automation and removed ready-for-review Submission passed intake validation and is ready for maintainer review labels Oct 16, 2026
@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Oct 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Print-area parsing and nondeterministic formula serialization can prevent valid workbooks from completing reconstruction.

2 open findings
4 resolved since last review

🧠 Review effort: Balanced

Comment thread skills/excel-design-reconstruction/scripts/reconstruct.py Outdated
Comment thread skills/excel-design-reconstruction/scripts/reconstruct.py Outdated
Copilot AI balanced review requested due to automatic review settings October 16, 2026 09:57
@furukawa658

Copy link
Copy Markdown
Contributor Author

Addressed the 2 follow-up review comments in 36bfe3e:

  • Deterministically serialize array and data-table formulas from OOXML <f> elements and attributes while preserving kind: "formula" so object memory addresses never appear in the inventory.
  • Read print-area ranges directly from sheet._print_area.ranges instead of reparsing the string representation with MultiCellRange, supporting sheet names with spaces and disjoint print areas.

/request-review

@github-actions github-actions Bot added awaiting-automation ready-for-review Submission passed intake validation and is ready for maintainer review and removed ready-for-review Submission passed intake validation and is ready for maintainer review awaiting-automation labels Oct 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Merged-range expansion can bypass memory safeguards, and table-header validation and visibility assertions need correction.

1 open finding
2 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Medium severity Enforce Excel's 255-character table column name limit

skills/​excel-design-reconstruction/​scripts/​reconstruct.py:402

Excel table column names are limited to 255 characters, but validate_text permits 32,767. A 256-character header therefore passes validation and becomes a table-column name that Excel cannot preserve as approved. Regenerating the same package with openpyxl does not detect this incompatibility. Reject headers longer than 255 characters here so fingerprinting and building enforce the table-specific limit.

Medium severity Compare visibility flags explicitly against "True"

skills/​excel-design-reconstruction/​tests/​test_reconstruction.py:244

These inventory flags are strings, so both "True" and "False" satisfy assertTrue. The checks therefore pass even if hidden rows and columns are incorrectly reported as visible. Compare against "True" explicitly.

🧠 Review effort: Balanced

Comment on lines +188 to +192
def startElementNS(self, name, qname, attributes) -> None:
if name[1] == "c":
self.cell_count += 1
if self.cell_count > MAX_STORED_CELLS_PER_SHEET:
raise ValueError(f"sheet exceeds one million stored cells: {self.sheet_name}")
Copilot AI balanced review requested due to automatic review settings October 16, 2026 10:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

@furukawa658

Copy link
Copy Markdown
Contributor Author

Addressed the new merged-range expansion finding in a8b647c. The SAX preflight now computes the non-anchor cell allocation for every worksheet and enforces a cumulative workbook-wide limit before openpyxl loads the workbook. Regression tests cover the reported A1:Z1048576 range on an unselected worksheet and cumulative allocation across worksheets.

/request-review

@github-actions github-actions Bot added awaiting-automation ready-for-review Submission passed intake validation and is ready for maintainer review and removed ready-for-review Submission passed intake validation and is ready for maintainer review awaiting-automation labels Oct 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk:high new-submission PR adds at least one new contribution ready-for-review Submission passed intake validation and is ready for maintainer review skills PR touches skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants