@papert-code/papert-code 0.3.95 → 0.3.96
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/README.md +13 -0
- package/dist/chunks/{chunk-Q5TJEKUL.js → chunk-HSYOWGEB.js} +1 -1
- package/dist/chunks/{chunk-KDPC3L34.js → chunk-IK4ISYCE.js} +4 -4
- package/dist/chunks/{chunk-JATIVKZP.js → chunk-KBPFDUTA.js} +55 -10
- package/dist/chunks/{chunk-DQ32BMUI.js → chunk-TNDQXJLA.js} +924 -335
- package/dist/chunks/{gemini-SUVKHYG5.js → gemini-MVJNXCFF.js} +3910 -1535
- package/dist/chunks/{openaiContentGenerator-P6VRBRRB.js → openaiContentGenerator-GTG5MK5E.js} +2 -2
- package/dist/chunks/{papertContentGenerator-E64QQV3K.js → papertContentGenerator-Q5TTXUE6.js} +3 -3
- package/dist/chunks/{server-N2U4FF55.js → server-6D3KYATG.js} +7 -1
- package/dist/cli.js +5 -4
- package/dist/sandbox-macos-permissive-proxied.sb +1 -1
- package/dist/sandbox-macos-restrictive-proxied.sb +1 -1
- package/dist/skills/algorithmic-art/SKILL.md +405 -0
- package/dist/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/dist/skills/algorithmic-art/templates/viewer.html +599 -0
- package/dist/skills/brand-guidelines/SKILL.md +73 -0
- package/dist/skills/canvas-design/SKILL.md +130 -0
- package/dist/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/dist/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/dist/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/dist/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/dist/skills/doc-coauthoring/SKILL.md +375 -0
- package/dist/skills/docx/SKILL.md +481 -0
- package/dist/skills/docx/scripts/__init__.py +1 -0
- package/dist/skills/docx/scripts/accept_changes.py +135 -0
- package/dist/skills/docx/scripts/comment.py +318 -0
- package/dist/skills/docx/scripts/office/helpers/__init__.py +0 -0
- package/dist/skills/docx/scripts/office/helpers/merge_runs.py +199 -0
- package/dist/skills/docx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/dist/skills/docx/scripts/office/pack.py +159 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/dist/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/dist/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/dist/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/dist/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/dist/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/dist/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/dist/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/dist/skills/docx/scripts/office/soffice.py +183 -0
- package/dist/skills/docx/scripts/office/unpack.py +132 -0
- package/dist/skills/docx/scripts/office/validate.py +111 -0
- package/dist/skills/docx/scripts/office/validators/__init__.py +15 -0
- package/dist/skills/docx/scripts/office/validators/base.py +847 -0
- package/dist/skills/docx/scripts/office/validators/docx.py +446 -0
- package/dist/skills/docx/scripts/office/validators/pptx.py +275 -0
- package/dist/skills/docx/scripts/office/validators/redlining.py +247 -0
- package/dist/skills/docx/scripts/templates/comments.xml +3 -0
- package/dist/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/dist/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/dist/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/dist/skills/docx/scripts/templates/people.xml +3 -0
- package/dist/skills/frontend-design/SKILL.md +42 -0
- package/dist/skills/internal-comms/SKILL.md +32 -0
- package/dist/skills/internal-comms/examples/3p-updates.md +47 -0
- package/dist/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/dist/skills/internal-comms/examples/faq-answers.md +30 -0
- package/dist/skills/internal-comms/examples/general-comms.md +16 -0
- package/dist/skills/mcp-builder/SKILL.md +236 -0
- package/dist/skills/mcp-builder/reference/evaluation.md +602 -0
- package/dist/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/dist/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/dist/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/dist/skills/mcp-builder/scripts/connections.py +151 -0
- package/dist/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/dist/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/dist/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/dist/skills/papert-code/SKILL.md +561 -0
- package/dist/skills/pdf/SKILL.md +314 -0
- package/dist/skills/pdf/forms.md +294 -0
- package/dist/skills/pdf/reference.md +612 -0
- package/dist/skills/pdf/scripts/check_bounding_boxes.py +65 -0
- package/dist/skills/pdf/scripts/check_fillable_fields.py +11 -0
- package/dist/skills/pdf/scripts/convert_pdf_to_images.py +33 -0
- package/dist/skills/pdf/scripts/create_validation_image.py +37 -0
- package/dist/skills/pdf/scripts/extract_form_field_info.py +122 -0
- package/dist/skills/pdf/scripts/extract_form_structure.py +115 -0
- package/dist/skills/pdf/scripts/fill_fillable_fields.py +98 -0
- package/dist/skills/pdf/scripts/fill_pdf_form_with_annotations.py +107 -0
- package/dist/skills/pptx/SKILL.md +232 -0
- package/dist/skills/pptx/editing.md +205 -0
- package/dist/skills/pptx/pptxgenjs.md +420 -0
- package/dist/skills/pptx/scripts/__init__.py +0 -0
- package/dist/skills/pptx/scripts/add_slide.py +195 -0
- package/dist/skills/pptx/scripts/clean.py +286 -0
- package/dist/skills/pptx/scripts/office/helpers/__init__.py +0 -0
- package/dist/skills/pptx/scripts/office/helpers/merge_runs.py +199 -0
- package/dist/skills/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/dist/skills/pptx/scripts/office/pack.py +159 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/dist/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/dist/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/dist/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/dist/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/dist/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/dist/skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/dist/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/dist/skills/pptx/scripts/office/soffice.py +183 -0
- package/dist/skills/pptx/scripts/office/unpack.py +132 -0
- package/dist/skills/pptx/scripts/office/validate.py +111 -0
- package/dist/skills/pptx/scripts/office/validators/__init__.py +15 -0
- package/dist/skills/pptx/scripts/office/validators/base.py +847 -0
- package/dist/skills/pptx/scripts/office/validators/docx.py +446 -0
- package/dist/skills/pptx/scripts/office/validators/pptx.py +275 -0
- package/dist/skills/pptx/scripts/office/validators/redlining.py +247 -0
- package/dist/skills/pptx/scripts/thumbnail.py +289 -0
- package/dist/skills/skill-creator/SKILL.md +357 -0
- package/dist/skills/skill-creator/references/output-patterns.md +82 -0
- package/dist/skills/skill-creator/references/workflows.md +28 -0
- package/dist/skills/skill-creator/scripts/init_skill.py +303 -0
- package/dist/skills/skill-creator/scripts/package_skill.py +110 -0
- package/dist/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/dist/skills/slack-gif-creator/SKILL.md +254 -0
- package/dist/skills/slack-gif-creator/core/easing.py +234 -0
- package/dist/skills/slack-gif-creator/core/frame_composer.py +176 -0
- package/dist/skills/slack-gif-creator/core/gif_builder.py +269 -0
- package/dist/skills/slack-gif-creator/core/validators.py +136 -0
- package/dist/skills/slack-gif-creator/requirements.txt +4 -0
- package/dist/skills/theme-factory/SKILL.md +59 -0
- package/dist/skills/theme-factory/theme-showcase.pdf +0 -0
- package/dist/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/dist/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/dist/skills/theme-factory/themes/desert-rose.md +19 -0
- package/dist/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/dist/skills/theme-factory/themes/golden-hour.md +19 -0
- package/dist/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/dist/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/dist/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/dist/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/dist/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/dist/skills/web-artifacts-builder/SKILL.md +74 -0
- package/dist/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/dist/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/dist/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/dist/skills/webapp-testing/SKILL.md +96 -0
- package/dist/skills/webapp-testing/examples/console_logging.py +35 -0
- package/dist/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/dist/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/dist/skills/webapp-testing/scripts/with_server.py +106 -0
- package/dist/skills/xlsx/SKILL.md +292 -0
- package/dist/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
- package/dist/skills/xlsx/scripts/office/helpers/merge_runs.py +199 -0
- package/dist/skills/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
- package/dist/skills/xlsx/scripts/office/pack.py +159 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/dist/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/dist/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/dist/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/dist/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/dist/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/dist/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/dist/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/dist/skills/xlsx/scripts/office/soffice.py +183 -0
- package/dist/skills/xlsx/scripts/office/unpack.py +132 -0
- package/dist/skills/xlsx/scripts/office/validate.py +111 -0
- package/dist/skills/xlsx/scripts/office/validators/__init__.py +15 -0
- package/dist/skills/xlsx/scripts/office/validators/base.py +847 -0
- package/dist/skills/xlsx/scripts/office/validators/docx.py +446 -0
- package/dist/skills/xlsx/scripts/office/validators/pptx.py +275 -0
- package/dist/skills/xlsx/scripts/office/validators/redlining.py +247 -0
- package/dist/skills/xlsx/scripts/recalc.py +184 -0
- package/package.json +5 -4
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Validator for PowerPoint presentation XML files against XSD schemas.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import re
|
|
6
|
+
|
|
7
|
+
from .base import BaseSchemaValidator
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PPTXSchemaValidator(BaseSchemaValidator):
|
|
11
|
+
|
|
12
|
+
PRESENTATIONML_NAMESPACE = (
|
|
13
|
+
"http://schemas.openxmlformats.org/presentationml/2006/main"
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
ELEMENT_RELATIONSHIP_TYPES = {
|
|
17
|
+
"sldid": "slide",
|
|
18
|
+
"sldmasterid": "slidemaster",
|
|
19
|
+
"notesmasterid": "notesmaster",
|
|
20
|
+
"sldlayoutid": "slidelayout",
|
|
21
|
+
"themeid": "theme",
|
|
22
|
+
"tablestyleid": "tablestyles",
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
def validate(self):
|
|
26
|
+
if not self.validate_xml():
|
|
27
|
+
return False
|
|
28
|
+
|
|
29
|
+
all_valid = True
|
|
30
|
+
if not self.validate_namespaces():
|
|
31
|
+
all_valid = False
|
|
32
|
+
|
|
33
|
+
if not self.validate_unique_ids():
|
|
34
|
+
all_valid = False
|
|
35
|
+
|
|
36
|
+
if not self.validate_uuid_ids():
|
|
37
|
+
all_valid = False
|
|
38
|
+
|
|
39
|
+
if not self.validate_file_references():
|
|
40
|
+
all_valid = False
|
|
41
|
+
|
|
42
|
+
if not self.validate_slide_layout_ids():
|
|
43
|
+
all_valid = False
|
|
44
|
+
|
|
45
|
+
if not self.validate_content_types():
|
|
46
|
+
all_valid = False
|
|
47
|
+
|
|
48
|
+
if not self.validate_against_xsd():
|
|
49
|
+
all_valid = False
|
|
50
|
+
|
|
51
|
+
if not self.validate_notes_slide_references():
|
|
52
|
+
all_valid = False
|
|
53
|
+
|
|
54
|
+
if not self.validate_all_relationship_ids():
|
|
55
|
+
all_valid = False
|
|
56
|
+
|
|
57
|
+
if not self.validate_no_duplicate_slide_layouts():
|
|
58
|
+
all_valid = False
|
|
59
|
+
|
|
60
|
+
return all_valid
|
|
61
|
+
|
|
62
|
+
def validate_uuid_ids(self):
|
|
63
|
+
import lxml.etree
|
|
64
|
+
|
|
65
|
+
errors = []
|
|
66
|
+
uuid_pattern = re.compile(
|
|
67
|
+
r"^[\{\(]?[0-9A-Fa-f]{8}-?[0-9A-Fa-f]{4}-?[0-9A-Fa-f]{4}-?[0-9A-Fa-f]{4}-?[0-9A-Fa-f]{12}[\}\)]?$"
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
for xml_file in self.xml_files:
|
|
71
|
+
try:
|
|
72
|
+
root = lxml.etree.parse(str(xml_file)).getroot()
|
|
73
|
+
|
|
74
|
+
for elem in root.iter():
|
|
75
|
+
for attr, value in elem.attrib.items():
|
|
76
|
+
attr_name = attr.split("}")[-1].lower()
|
|
77
|
+
if attr_name == "id" or attr_name.endswith("id"):
|
|
78
|
+
if self._looks_like_uuid(value):
|
|
79
|
+
if not uuid_pattern.match(value):
|
|
80
|
+
errors.append(
|
|
81
|
+
f" {xml_file.relative_to(self.unpacked_dir)}: "
|
|
82
|
+
f"Line {elem.sourceline}: ID '{value}' appears to be a UUID but contains invalid hex characters"
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
except (lxml.etree.XMLSyntaxError, Exception) as e:
|
|
86
|
+
errors.append(
|
|
87
|
+
f" {xml_file.relative_to(self.unpacked_dir)}: Error: {e}"
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
if errors:
|
|
91
|
+
print(f"FAILED - Found {len(errors)} UUID ID validation errors:")
|
|
92
|
+
for error in errors:
|
|
93
|
+
print(error)
|
|
94
|
+
return False
|
|
95
|
+
else:
|
|
96
|
+
if self.verbose:
|
|
97
|
+
print("PASSED - All UUID-like IDs contain valid hex values")
|
|
98
|
+
return True
|
|
99
|
+
|
|
100
|
+
def _looks_like_uuid(self, value):
|
|
101
|
+
clean_value = value.strip("{}()").replace("-", "")
|
|
102
|
+
return len(clean_value) == 32 and all(c.isalnum() for c in clean_value)
|
|
103
|
+
|
|
104
|
+
def validate_slide_layout_ids(self):
|
|
105
|
+
import lxml.etree
|
|
106
|
+
|
|
107
|
+
errors = []
|
|
108
|
+
|
|
109
|
+
slide_masters = list(self.unpacked_dir.glob("ppt/slideMasters/*.xml"))
|
|
110
|
+
|
|
111
|
+
if not slide_masters:
|
|
112
|
+
if self.verbose:
|
|
113
|
+
print("PASSED - No slide masters found")
|
|
114
|
+
return True
|
|
115
|
+
|
|
116
|
+
for slide_master in slide_masters:
|
|
117
|
+
try:
|
|
118
|
+
root = lxml.etree.parse(str(slide_master)).getroot()
|
|
119
|
+
|
|
120
|
+
rels_file = slide_master.parent / "_rels" / f"{slide_master.name}.rels"
|
|
121
|
+
|
|
122
|
+
if not rels_file.exists():
|
|
123
|
+
errors.append(
|
|
124
|
+
f" {slide_master.relative_to(self.unpacked_dir)}: "
|
|
125
|
+
f"Missing relationships file: {rels_file.relative_to(self.unpacked_dir)}"
|
|
126
|
+
)
|
|
127
|
+
continue
|
|
128
|
+
|
|
129
|
+
rels_root = lxml.etree.parse(str(rels_file)).getroot()
|
|
130
|
+
|
|
131
|
+
valid_layout_rids = set()
|
|
132
|
+
for rel in rels_root.findall(
|
|
133
|
+
f".//{{{self.PACKAGE_RELATIONSHIPS_NAMESPACE}}}Relationship"
|
|
134
|
+
):
|
|
135
|
+
rel_type = rel.get("Type", "")
|
|
136
|
+
if "slideLayout" in rel_type:
|
|
137
|
+
valid_layout_rids.add(rel.get("Id"))
|
|
138
|
+
|
|
139
|
+
for sld_layout_id in root.findall(
|
|
140
|
+
f".//{{{self.PRESENTATIONML_NAMESPACE}}}sldLayoutId"
|
|
141
|
+
):
|
|
142
|
+
r_id = sld_layout_id.get(
|
|
143
|
+
f"{{{self.OFFICE_RELATIONSHIPS_NAMESPACE}}}id"
|
|
144
|
+
)
|
|
145
|
+
layout_id = sld_layout_id.get("id")
|
|
146
|
+
|
|
147
|
+
if r_id and r_id not in valid_layout_rids:
|
|
148
|
+
errors.append(
|
|
149
|
+
f" {slide_master.relative_to(self.unpacked_dir)}: "
|
|
150
|
+
f"Line {sld_layout_id.sourceline}: sldLayoutId with id='{layout_id}' "
|
|
151
|
+
f"references r:id='{r_id}' which is not found in slide layout relationships"
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
except (lxml.etree.XMLSyntaxError, Exception) as e:
|
|
155
|
+
errors.append(
|
|
156
|
+
f" {slide_master.relative_to(self.unpacked_dir)}: Error: {e}"
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
if errors:
|
|
160
|
+
print(f"FAILED - Found {len(errors)} slide layout ID validation errors:")
|
|
161
|
+
for error in errors:
|
|
162
|
+
print(error)
|
|
163
|
+
print(
|
|
164
|
+
"Remove invalid references or add missing slide layouts to the relationships file."
|
|
165
|
+
)
|
|
166
|
+
return False
|
|
167
|
+
else:
|
|
168
|
+
if self.verbose:
|
|
169
|
+
print("PASSED - All slide layout IDs reference valid slide layouts")
|
|
170
|
+
return True
|
|
171
|
+
|
|
172
|
+
def validate_no_duplicate_slide_layouts(self):
|
|
173
|
+
import lxml.etree
|
|
174
|
+
|
|
175
|
+
errors = []
|
|
176
|
+
slide_rels_files = list(self.unpacked_dir.glob("ppt/slides/_rels/*.xml.rels"))
|
|
177
|
+
|
|
178
|
+
for rels_file in slide_rels_files:
|
|
179
|
+
try:
|
|
180
|
+
root = lxml.etree.parse(str(rels_file)).getroot()
|
|
181
|
+
|
|
182
|
+
layout_rels = [
|
|
183
|
+
rel
|
|
184
|
+
for rel in root.findall(
|
|
185
|
+
f".//{{{self.PACKAGE_RELATIONSHIPS_NAMESPACE}}}Relationship"
|
|
186
|
+
)
|
|
187
|
+
if "slideLayout" in rel.get("Type", "")
|
|
188
|
+
]
|
|
189
|
+
|
|
190
|
+
if len(layout_rels) > 1:
|
|
191
|
+
errors.append(
|
|
192
|
+
f" {rels_file.relative_to(self.unpacked_dir)}: has {len(layout_rels)} slideLayout references"
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
except Exception as e:
|
|
196
|
+
errors.append(
|
|
197
|
+
f" {rels_file.relative_to(self.unpacked_dir)}: Error: {e}"
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
if errors:
|
|
201
|
+
print("FAILED - Found slides with duplicate slideLayout references:")
|
|
202
|
+
for error in errors:
|
|
203
|
+
print(error)
|
|
204
|
+
return False
|
|
205
|
+
else:
|
|
206
|
+
if self.verbose:
|
|
207
|
+
print("PASSED - All slides have exactly one slideLayout reference")
|
|
208
|
+
return True
|
|
209
|
+
|
|
210
|
+
def validate_notes_slide_references(self):
|
|
211
|
+
import lxml.etree
|
|
212
|
+
|
|
213
|
+
errors = []
|
|
214
|
+
notes_slide_references = {}
|
|
215
|
+
|
|
216
|
+
slide_rels_files = list(self.unpacked_dir.glob("ppt/slides/_rels/*.xml.rels"))
|
|
217
|
+
|
|
218
|
+
if not slide_rels_files:
|
|
219
|
+
if self.verbose:
|
|
220
|
+
print("PASSED - No slide relationship files found")
|
|
221
|
+
return True
|
|
222
|
+
|
|
223
|
+
for rels_file in slide_rels_files:
|
|
224
|
+
try:
|
|
225
|
+
root = lxml.etree.parse(str(rels_file)).getroot()
|
|
226
|
+
|
|
227
|
+
for rel in root.findall(
|
|
228
|
+
f".//{{{self.PACKAGE_RELATIONSHIPS_NAMESPACE}}}Relationship"
|
|
229
|
+
):
|
|
230
|
+
rel_type = rel.get("Type", "")
|
|
231
|
+
if "notesSlide" in rel_type:
|
|
232
|
+
target = rel.get("Target", "")
|
|
233
|
+
if target:
|
|
234
|
+
normalized_target = target.replace("../", "")
|
|
235
|
+
|
|
236
|
+
slide_name = rels_file.stem.replace(
|
|
237
|
+
".xml", ""
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
if normalized_target not in notes_slide_references:
|
|
241
|
+
notes_slide_references[normalized_target] = []
|
|
242
|
+
notes_slide_references[normalized_target].append(
|
|
243
|
+
(slide_name, rels_file)
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
except (lxml.etree.XMLSyntaxError, Exception) as e:
|
|
247
|
+
errors.append(
|
|
248
|
+
f" {rels_file.relative_to(self.unpacked_dir)}: Error: {e}"
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
for target, references in notes_slide_references.items():
|
|
252
|
+
if len(references) > 1:
|
|
253
|
+
slide_names = [ref[0] for ref in references]
|
|
254
|
+
errors.append(
|
|
255
|
+
f" Notes slide '{target}' is referenced by multiple slides: {', '.join(slide_names)}"
|
|
256
|
+
)
|
|
257
|
+
for slide_name, rels_file in references:
|
|
258
|
+
errors.append(f" - {rels_file.relative_to(self.unpacked_dir)}")
|
|
259
|
+
|
|
260
|
+
if errors:
|
|
261
|
+
print(
|
|
262
|
+
f"FAILED - Found {len([e for e in errors if not e.startswith(' ')])} notes slide reference validation errors:"
|
|
263
|
+
)
|
|
264
|
+
for error in errors:
|
|
265
|
+
print(error)
|
|
266
|
+
print("Each slide may optionally have its own slide file.")
|
|
267
|
+
return False
|
|
268
|
+
else:
|
|
269
|
+
if self.verbose:
|
|
270
|
+
print("PASSED - All notes slide references are unique")
|
|
271
|
+
return True
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
if __name__ == "__main__":
|
|
275
|
+
raise RuntimeError("This module should not be run directly.")
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Validator for tracked changes in Word documents.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import subprocess
|
|
6
|
+
import tempfile
|
|
7
|
+
import zipfile
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RedliningValidator:
|
|
12
|
+
|
|
13
|
+
def __init__(self, unpacked_dir, original_docx, verbose=False, author="Claude"):
|
|
14
|
+
self.unpacked_dir = Path(unpacked_dir)
|
|
15
|
+
self.original_docx = Path(original_docx)
|
|
16
|
+
self.verbose = verbose
|
|
17
|
+
self.author = author
|
|
18
|
+
self.namespaces = {
|
|
19
|
+
"w": "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
def repair(self) -> int:
|
|
23
|
+
return 0
|
|
24
|
+
|
|
25
|
+
def validate(self):
|
|
26
|
+
modified_file = self.unpacked_dir / "word" / "document.xml"
|
|
27
|
+
if not modified_file.exists():
|
|
28
|
+
print(f"FAILED - Modified document.xml not found at {modified_file}")
|
|
29
|
+
return False
|
|
30
|
+
|
|
31
|
+
try:
|
|
32
|
+
import xml.etree.ElementTree as ET
|
|
33
|
+
|
|
34
|
+
tree = ET.parse(modified_file)
|
|
35
|
+
root = tree.getroot()
|
|
36
|
+
|
|
37
|
+
del_elements = root.findall(".//w:del", self.namespaces)
|
|
38
|
+
ins_elements = root.findall(".//w:ins", self.namespaces)
|
|
39
|
+
|
|
40
|
+
author_del_elements = [
|
|
41
|
+
elem
|
|
42
|
+
for elem in del_elements
|
|
43
|
+
if elem.get(f"{{{self.namespaces['w']}}}author") == self.author
|
|
44
|
+
]
|
|
45
|
+
author_ins_elements = [
|
|
46
|
+
elem
|
|
47
|
+
for elem in ins_elements
|
|
48
|
+
if elem.get(f"{{{self.namespaces['w']}}}author") == self.author
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
if not author_del_elements and not author_ins_elements:
|
|
52
|
+
if self.verbose:
|
|
53
|
+
print(f"PASSED - No tracked changes by {self.author} found.")
|
|
54
|
+
return True
|
|
55
|
+
|
|
56
|
+
except Exception:
|
|
57
|
+
pass
|
|
58
|
+
|
|
59
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
60
|
+
temp_path = Path(temp_dir)
|
|
61
|
+
|
|
62
|
+
try:
|
|
63
|
+
with zipfile.ZipFile(self.original_docx, "r") as zip_ref:
|
|
64
|
+
zip_ref.extractall(temp_path)
|
|
65
|
+
except Exception as e:
|
|
66
|
+
print(f"FAILED - Error unpacking original docx: {e}")
|
|
67
|
+
return False
|
|
68
|
+
|
|
69
|
+
original_file = temp_path / "word" / "document.xml"
|
|
70
|
+
if not original_file.exists():
|
|
71
|
+
print(
|
|
72
|
+
f"FAILED - Original document.xml not found in {self.original_docx}"
|
|
73
|
+
)
|
|
74
|
+
return False
|
|
75
|
+
|
|
76
|
+
try:
|
|
77
|
+
import xml.etree.ElementTree as ET
|
|
78
|
+
|
|
79
|
+
modified_tree = ET.parse(modified_file)
|
|
80
|
+
modified_root = modified_tree.getroot()
|
|
81
|
+
original_tree = ET.parse(original_file)
|
|
82
|
+
original_root = original_tree.getroot()
|
|
83
|
+
except ET.ParseError as e:
|
|
84
|
+
print(f"FAILED - Error parsing XML files: {e}")
|
|
85
|
+
return False
|
|
86
|
+
|
|
87
|
+
self._remove_author_tracked_changes(original_root)
|
|
88
|
+
self._remove_author_tracked_changes(modified_root)
|
|
89
|
+
|
|
90
|
+
modified_text = self._extract_text_content(modified_root)
|
|
91
|
+
original_text = self._extract_text_content(original_root)
|
|
92
|
+
|
|
93
|
+
if modified_text != original_text:
|
|
94
|
+
error_message = self._generate_detailed_diff(
|
|
95
|
+
original_text, modified_text
|
|
96
|
+
)
|
|
97
|
+
print(error_message)
|
|
98
|
+
return False
|
|
99
|
+
|
|
100
|
+
if self.verbose:
|
|
101
|
+
print(f"PASSED - All changes by {self.author} are properly tracked")
|
|
102
|
+
return True
|
|
103
|
+
|
|
104
|
+
def _generate_detailed_diff(self, original_text, modified_text):
|
|
105
|
+
error_parts = [
|
|
106
|
+
f"FAILED - Document text doesn't match after removing {self.author}'s tracked changes",
|
|
107
|
+
"",
|
|
108
|
+
"Likely causes:",
|
|
109
|
+
" 1. Modified text inside another author's <w:ins> or <w:del> tags",
|
|
110
|
+
" 2. Made edits without proper tracked changes",
|
|
111
|
+
" 3. Didn't nest <w:del> inside <w:ins> when deleting another's insertion",
|
|
112
|
+
"",
|
|
113
|
+
"For pre-redlined documents, use correct patterns:",
|
|
114
|
+
" - To reject another's INSERTION: Nest <w:del> inside their <w:ins>",
|
|
115
|
+
" - To restore another's DELETION: Add new <w:ins> AFTER their <w:del>",
|
|
116
|
+
"",
|
|
117
|
+
]
|
|
118
|
+
|
|
119
|
+
git_diff = self._get_git_word_diff(original_text, modified_text)
|
|
120
|
+
if git_diff:
|
|
121
|
+
error_parts.extend(["Differences:", "============", git_diff])
|
|
122
|
+
else:
|
|
123
|
+
error_parts.append("Unable to generate word diff (git not available)")
|
|
124
|
+
|
|
125
|
+
return "\n".join(error_parts)
|
|
126
|
+
|
|
127
|
+
def _get_git_word_diff(self, original_text, modified_text):
|
|
128
|
+
try:
|
|
129
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
130
|
+
temp_path = Path(temp_dir)
|
|
131
|
+
|
|
132
|
+
original_file = temp_path / "original.txt"
|
|
133
|
+
modified_file = temp_path / "modified.txt"
|
|
134
|
+
|
|
135
|
+
original_file.write_text(original_text, encoding="utf-8")
|
|
136
|
+
modified_file.write_text(modified_text, encoding="utf-8")
|
|
137
|
+
|
|
138
|
+
result = subprocess.run(
|
|
139
|
+
[
|
|
140
|
+
"git",
|
|
141
|
+
"diff",
|
|
142
|
+
"--word-diff=plain",
|
|
143
|
+
"--word-diff-regex=.",
|
|
144
|
+
"-U0",
|
|
145
|
+
"--no-index",
|
|
146
|
+
str(original_file),
|
|
147
|
+
str(modified_file),
|
|
148
|
+
],
|
|
149
|
+
capture_output=True,
|
|
150
|
+
text=True,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
if result.stdout.strip():
|
|
154
|
+
lines = result.stdout.split("\n")
|
|
155
|
+
content_lines = []
|
|
156
|
+
in_content = False
|
|
157
|
+
for line in lines:
|
|
158
|
+
if line.startswith("@@"):
|
|
159
|
+
in_content = True
|
|
160
|
+
continue
|
|
161
|
+
if in_content and line.strip():
|
|
162
|
+
content_lines.append(line)
|
|
163
|
+
|
|
164
|
+
if content_lines:
|
|
165
|
+
return "\n".join(content_lines)
|
|
166
|
+
|
|
167
|
+
result = subprocess.run(
|
|
168
|
+
[
|
|
169
|
+
"git",
|
|
170
|
+
"diff",
|
|
171
|
+
"--word-diff=plain",
|
|
172
|
+
"-U0",
|
|
173
|
+
"--no-index",
|
|
174
|
+
str(original_file),
|
|
175
|
+
str(modified_file),
|
|
176
|
+
],
|
|
177
|
+
capture_output=True,
|
|
178
|
+
text=True,
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
if result.stdout.strip():
|
|
182
|
+
lines = result.stdout.split("\n")
|
|
183
|
+
content_lines = []
|
|
184
|
+
in_content = False
|
|
185
|
+
for line in lines:
|
|
186
|
+
if line.startswith("@@"):
|
|
187
|
+
in_content = True
|
|
188
|
+
continue
|
|
189
|
+
if in_content and line.strip():
|
|
190
|
+
content_lines.append(line)
|
|
191
|
+
return "\n".join(content_lines)
|
|
192
|
+
|
|
193
|
+
except (subprocess.CalledProcessError, FileNotFoundError, Exception):
|
|
194
|
+
pass
|
|
195
|
+
|
|
196
|
+
return None
|
|
197
|
+
|
|
198
|
+
def _remove_author_tracked_changes(self, root):
|
|
199
|
+
ins_tag = f"{{{self.namespaces['w']}}}ins"
|
|
200
|
+
del_tag = f"{{{self.namespaces['w']}}}del"
|
|
201
|
+
author_attr = f"{{{self.namespaces['w']}}}author"
|
|
202
|
+
|
|
203
|
+
for parent in root.iter():
|
|
204
|
+
to_remove = []
|
|
205
|
+
for child in parent:
|
|
206
|
+
if child.tag == ins_tag and child.get(author_attr) == self.author:
|
|
207
|
+
to_remove.append(child)
|
|
208
|
+
for elem in to_remove:
|
|
209
|
+
parent.remove(elem)
|
|
210
|
+
|
|
211
|
+
deltext_tag = f"{{{self.namespaces['w']}}}delText"
|
|
212
|
+
t_tag = f"{{{self.namespaces['w']}}}t"
|
|
213
|
+
|
|
214
|
+
for parent in root.iter():
|
|
215
|
+
to_process = []
|
|
216
|
+
for child in parent:
|
|
217
|
+
if child.tag == del_tag and child.get(author_attr) == self.author:
|
|
218
|
+
to_process.append((child, list(parent).index(child)))
|
|
219
|
+
|
|
220
|
+
for del_elem, del_index in reversed(to_process):
|
|
221
|
+
for elem in del_elem.iter():
|
|
222
|
+
if elem.tag == deltext_tag:
|
|
223
|
+
elem.tag = t_tag
|
|
224
|
+
|
|
225
|
+
for child in reversed(list(del_elem)):
|
|
226
|
+
parent.insert(del_index, child)
|
|
227
|
+
parent.remove(del_elem)
|
|
228
|
+
|
|
229
|
+
def _extract_text_content(self, root):
|
|
230
|
+
p_tag = f"{{{self.namespaces['w']}}}p"
|
|
231
|
+
t_tag = f"{{{self.namespaces['w']}}}t"
|
|
232
|
+
|
|
233
|
+
paragraphs = []
|
|
234
|
+
for p_elem in root.findall(f".//{p_tag}"):
|
|
235
|
+
text_parts = []
|
|
236
|
+
for t_elem in p_elem.findall(f".//{t_tag}"):
|
|
237
|
+
if t_elem.text:
|
|
238
|
+
text_parts.append(t_elem.text)
|
|
239
|
+
paragraph_text = "".join(text_parts)
|
|
240
|
+
if paragraph_text:
|
|
241
|
+
paragraphs.append(paragraph_text)
|
|
242
|
+
|
|
243
|
+
return "\n".join(paragraphs)
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
if __name__ == "__main__":
|
|
247
|
+
raise RuntimeError("This module should not be run directly.")
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<?xml version="1.0" ?>
|
|
2
|
+
<w:comments xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16sdtfl="http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14">
|
|
3
|
+
</w:comments>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<?xml version="1.0" ?>
|
|
2
|
+
<w15:commentsEx xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16sdtfl="http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14">
|
|
3
|
+
</w15:commentsEx>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<?xml version="1.0" ?>
|
|
2
|
+
<w16cex:commentsExtensible xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16sdtfl="http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:cr="http://schemas.microsoft.com/office/comments/2020/reactions" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl cr w16du wp14">
|
|
3
|
+
</w16cex:commentsExtensible>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<?xml version="1.0" ?>
|
|
2
|
+
<w16cid:commentsIds xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:cx2="http://schemas.microsoft.com/office/drawing/2015/10/21/chartex" xmlns:cx3="http://schemas.microsoft.com/office/drawing/2016/5/9/chartex" xmlns:cx4="http://schemas.microsoft.com/office/drawing/2016/5/10/chartex" xmlns:cx5="http://schemas.microsoft.com/office/drawing/2016/5/11/chartex" xmlns:cx6="http://schemas.microsoft.com/office/drawing/2016/5/12/chartex" xmlns:cx7="http://schemas.microsoft.com/office/drawing/2016/5/13/chartex" xmlns:cx8="http://schemas.microsoft.com/office/drawing/2016/5/14/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:aink="http://schemas.microsoft.com/office/drawing/2016/ink" xmlns:am3d="http://schemas.microsoft.com/office/drawing/2017/model3d" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:oel="http://schemas.microsoft.com/office/2019/extlst" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16cex="http://schemas.microsoft.com/office/word/2018/wordml/cex" xmlns:w16cid="http://schemas.microsoft.com/office/word/2016/wordml/cid" xmlns:w16="http://schemas.microsoft.com/office/word/2018/wordml" xmlns:w16du="http://schemas.microsoft.com/office/word/2023/wordml/word16du" xmlns:w16sdtdh="http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" xmlns:w16sdtfl="http://schemas.microsoft.com/office/word/2024/wordml/sdtformatlock" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 w15 w16se w16cid w16 w16cex w16sdtdh w16sdtfl w16du wp14">
|
|
3
|
+
</w16cid:commentsIds>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
|
|
8
|
+
|
|
9
|
+
The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
|
|
10
|
+
|
|
11
|
+
## Design Thinking
|
|
12
|
+
|
|
13
|
+
Before coding, understand the context and commit to a BOLD aesthetic direction:
|
|
14
|
+
- **Purpose**: What problem does this interface solve? Who uses it?
|
|
15
|
+
- **Tone**: Pick an extreme: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
|
|
16
|
+
- **Constraints**: Technical requirements (framework, performance, accessibility).
|
|
17
|
+
- **Differentiation**: What makes this UNFORGETTABLE? What's the one thing someone will remember?
|
|
18
|
+
|
|
19
|
+
**CRITICAL**: Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
|
|
20
|
+
|
|
21
|
+
Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
|
|
22
|
+
- Production-grade and functional
|
|
23
|
+
- Visually striking and memorable
|
|
24
|
+
- Cohesive with a clear aesthetic point-of-view
|
|
25
|
+
- Meticulously refined in every detail
|
|
26
|
+
|
|
27
|
+
## Frontend Aesthetics Guidelines
|
|
28
|
+
|
|
29
|
+
Focus on:
|
|
30
|
+
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
|
|
31
|
+
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
32
|
+
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Use Motion library for React when available. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
|
|
33
|
+
- **Spatial Composition**: Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
|
|
34
|
+
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
|
|
35
|
+
|
|
36
|
+
NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
|
|
37
|
+
|
|
38
|
+
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
|
|
39
|
+
|
|
40
|
+
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
|
|
41
|
+
|
|
42
|
+
Remember: Papert-code is capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: internal-comms
|
|
3
|
+
description: A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Papert-code should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When to use this skill
|
|
8
|
+
To write internal communications, use this skill for:
|
|
9
|
+
- 3P updates (Progress, Plans, Problems)
|
|
10
|
+
- Company newsletters
|
|
11
|
+
- FAQ responses
|
|
12
|
+
- Status reports
|
|
13
|
+
- Leadership updates
|
|
14
|
+
- Project updates
|
|
15
|
+
- Incident reports
|
|
16
|
+
|
|
17
|
+
## How to use this skill
|
|
18
|
+
|
|
19
|
+
To write any internal communication:
|
|
20
|
+
|
|
21
|
+
1. **Identify the communication type** from the request
|
|
22
|
+
2. **Load the appropriate guideline file** from the `examples/` directory:
|
|
23
|
+
- `examples/3p-updates.md` - For Progress/Plans/Problems team updates
|
|
24
|
+
- `examples/company-newsletter.md` - For company-wide newsletters
|
|
25
|
+
- `examples/faq-answers.md` - For answering frequently asked questions
|
|
26
|
+
- `examples/general-comms.md` - For anything else that doesn't explicitly match one of the above
|
|
27
|
+
3. **Follow the specific instructions** in that file for formatting, tone, and content gathering
|
|
28
|
+
|
|
29
|
+
If the communication type doesn't match any existing guideline, ask for clarification or more context about the desired format.
|
|
30
|
+
|
|
31
|
+
## Keywords
|
|
32
|
+
3P updates, company newsletter, company comms, weekly update, faqs, common questions, updates, internal comms
|