@takuma-hirai/hirai-method 0.1.0
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/.claude/.stale-harness-state/last-check +0 -0
- package/.claude/CommonRules.md +121 -0
- package/.claude/agents/01-core-development/api-designer.md +237 -0
- package/.claude/agents/01-core-development/backend-developer.md +222 -0
- package/.claude/agents/01-core-development/design-bridge.md +127 -0
- package/.claude/agents/01-core-development/electron-pro.md +240 -0
- package/.claude/agents/01-core-development/frontend-developer.md +133 -0
- package/.claude/agents/01-core-development/fullstack-developer.md +235 -0
- package/.claude/agents/01-core-development/graphql-architect.md +238 -0
- package/.claude/agents/01-core-development/microservices-architect.md +239 -0
- package/.claude/agents/01-core-development/mobile-developer.md +283 -0
- package/.claude/agents/01-core-development/ui-designer.md +174 -0
- package/.claude/agents/01-core-development/websocket-engineer.md +150 -0
- package/.claude/agents/03-infrastructure/azure-infra-engineer.md +53 -0
- package/.claude/agents/03-infrastructure/cloud-architect.md +277 -0
- package/.claude/agents/03-infrastructure/database-administrator.md +287 -0
- package/.claude/agents/03-infrastructure/deployment-engineer.md +287 -0
- package/.claude/agents/03-infrastructure/devops-engineer.md +287 -0
- package/.claude/agents/03-infrastructure/devops-incident-responder.md +287 -0
- package/.claude/agents/03-infrastructure/docker-expert.md +278 -0
- package/.claude/agents/03-infrastructure/incident-responder.md +287 -0
- package/.claude/agents/03-infrastructure/kubernetes-specialist.md +287 -0
- package/.claude/agents/03-infrastructure/network-engineer.md +287 -0
- package/.claude/agents/03-infrastructure/platform-engineer.md +287 -0
- package/.claude/agents/03-infrastructure/security-engineer.md +277 -0
- package/.claude/agents/03-infrastructure/sre-engineer.md +287 -0
- package/.claude/agents/03-infrastructure/terraform-engineer.md +287 -0
- package/.claude/agents/03-infrastructure/terragrunt-expert.md +307 -0
- package/.claude/agents/03-infrastructure/windows-infra-admin.md +52 -0
- package/.claude/agents/04-quality-security/accessibility-tester.md +277 -0
- package/.claude/agents/04-quality-security/ad-security-reviewer.md +56 -0
- package/.claude/agents/04-quality-security/ai-writing-auditor.md +77 -0
- package/.claude/agents/04-quality-security/architect-reviewer.md +287 -0
- package/.claude/agents/04-quality-security/chaos-engineer.md +277 -0
- package/.claude/agents/04-quality-security/code-reviewer.md +287 -0
- package/.claude/agents/04-quality-security/compliance-auditor.md +277 -0
- package/.claude/agents/04-quality-security/debugger.md +287 -0
- package/.claude/agents/04-quality-security/error-detective.md +287 -0
- package/.claude/agents/04-quality-security/penetration-tester.md +287 -0
- package/.claude/agents/04-quality-security/performance-engineer.md +287 -0
- package/.claude/agents/04-quality-security/powershell-security-hardening.md +54 -0
- package/.claude/agents/04-quality-security/qa-expert.md +287 -0
- package/.claude/agents/04-quality-security/security-auditor.md +287 -0
- package/.claude/agents/04-quality-security/test-automator.md +287 -0
- package/.claude/agents/04-quality-security/ui-ux-tester.md +234 -0
- package/.claude/agents/06-developer-experience/build-engineer.md +286 -0
- package/.claude/agents/06-developer-experience/cli-developer.md +286 -0
- package/.claude/agents/06-developer-experience/dependency-manager.md +286 -0
- package/.claude/agents/06-developer-experience/documentation-engineer.md +276 -0
- package/.claude/agents/06-developer-experience/dx-optimizer.md +286 -0
- package/.claude/agents/06-developer-experience/git-workflow-manager.md +286 -0
- package/.claude/agents/06-developer-experience/legacy-modernizer.md +286 -0
- package/.claude/agents/06-developer-experience/mcp-developer.md +275 -0
- package/.claude/agents/06-developer-experience/powershell-module-architect.md +58 -0
- package/.claude/agents/06-developer-experience/powershell-ui-architect.md +135 -0
- package/.claude/agents/06-developer-experience/readme-generator.md +238 -0
- package/.claude/agents/06-developer-experience/refactoring-specialist.md +286 -0
- package/.claude/agents/06-developer-experience/slack-expert.md +232 -0
- package/.claude/agents/06-developer-experience/tooling-engineer.md +286 -0
- package/.claude/agents/09-meta-orchestration/agent-installer.md +97 -0
- package/.claude/agents/09-meta-orchestration/agent-organizer.md +287 -0
- package/.claude/agents/09-meta-orchestration/codebase-orchestrator.md +249 -0
- package/.claude/agents/09-meta-orchestration/context-manager.md +287 -0
- package/.claude/agents/09-meta-orchestration/error-coordinator.md +287 -0
- package/.claude/agents/09-meta-orchestration/it-ops-orchestrator.md +60 -0
- package/.claude/agents/09-meta-orchestration/knowledge-synthesizer.md +287 -0
- package/.claude/agents/09-meta-orchestration/multi-agent-coordinator.md +287 -0
- package/.claude/agents/09-meta-orchestration/performance-monitor.md +287 -0
- package/.claude/agents/09-meta-orchestration/task-distributor.md +287 -0
- package/.claude/agents/09-meta-orchestration/workflow-orchestrator.md +287 -0
- package/.claude/agents/10-research-analysis/competitive-analyst.md +287 -0
- package/.claude/agents/10-research-analysis/data-researcher.md +287 -0
- package/.claude/agents/10-research-analysis/market-researcher.md +287 -0
- package/.claude/agents/10-research-analysis/project-idea-validator.md +269 -0
- package/.claude/agents/10-research-analysis/research-analyst.md +287 -0
- package/.claude/agents/10-research-analysis/scientific-literature-researcher.md +151 -0
- package/.claude/agents/10-research-analysis/search-specialist.md +287 -0
- package/.claude/agents/10-research-analysis/trend-analyst.md +287 -0
- package/.claude/archive/README.md +47 -0
- package/.claude/archive/agents/02-language-specialists/angular-architect.md +287 -0
- package/.claude/archive/agents/02-language-specialists/cpp-pro.md +277 -0
- package/.claude/archive/agents/02-language-specialists/csharp-developer.md +287 -0
- package/.claude/archive/agents/02-language-specialists/django-developer.md +287 -0
- package/.claude/archive/agents/02-language-specialists/dotnet-core-expert.md +287 -0
- package/.claude/archive/agents/02-language-specialists/dotnet-framework-4.8-expert.md +306 -0
- package/.claude/archive/agents/02-language-specialists/elixir-expert.md +311 -0
- package/.claude/archive/agents/02-language-specialists/expo-react-native-expert.md +268 -0
- package/.claude/archive/agents/02-language-specialists/fastapi-developer.md +287 -0
- package/.claude/archive/agents/02-language-specialists/flutter-expert.md +287 -0
- package/.claude/archive/agents/02-language-specialists/golang-pro.md +277 -0
- package/.claude/archive/agents/02-language-specialists/java-architect.md +287 -0
- package/.claude/archive/agents/02-language-specialists/javascript-pro.md +277 -0
- package/.claude/archive/agents/02-language-specialists/kotlin-specialist.md +287 -0
- package/.claude/archive/agents/02-language-specialists/laravel-specialist.md +287 -0
- package/.claude/archive/agents/02-language-specialists/nextjs-developer.md +287 -0
- package/.claude/archive/agents/02-language-specialists/node-specialist.md +124 -0
- package/.claude/archive/agents/02-language-specialists/php-pro.md +287 -0
- package/.claude/archive/agents/02-language-specialists/powershell-5.1-expert.md +59 -0
- package/.claude/archive/agents/02-language-specialists/powershell-7-expert.md +57 -0
- package/.claude/archive/agents/02-language-specialists/python-pro.md +277 -0
- package/.claude/archive/agents/02-language-specialists/rails-expert.md +358 -0
- package/.claude/archive/agents/02-language-specialists/react-specialist.md +287 -0
- package/.claude/archive/agents/02-language-specialists/rust-engineer.md +287 -0
- package/.claude/archive/agents/02-language-specialists/spring-boot-engineer.md +287 -0
- package/.claude/archive/agents/02-language-specialists/sql-pro.md +287 -0
- package/.claude/archive/agents/02-language-specialists/swift-expert.md +287 -0
- package/.claude/archive/agents/02-language-specialists/symfony-specialist.md +354 -0
- package/.claude/archive/agents/02-language-specialists/typescript-pro.md +277 -0
- package/.claude/archive/agents/02-language-specialists/vue-expert.md +287 -0
- package/.claude/archive/agents/05-data-ai/ai-engineer.md +287 -0
- package/.claude/archive/agents/05-data-ai/data-analyst.md +277 -0
- package/.claude/archive/agents/05-data-ai/data-engineer.md +287 -0
- package/.claude/archive/agents/05-data-ai/data-scientist.md +287 -0
- package/.claude/archive/agents/05-data-ai/database-optimizer.md +287 -0
- package/.claude/archive/agents/05-data-ai/llm-architect.md +287 -0
- package/.claude/archive/agents/05-data-ai/machine-learning-engineer.md +277 -0
- package/.claude/archive/agents/05-data-ai/ml-engineer.md +287 -0
- package/.claude/archive/agents/05-data-ai/mlops-engineer.md +287 -0
- package/.claude/archive/agents/05-data-ai/nlp-engineer.md +287 -0
- package/.claude/archive/agents/05-data-ai/postgres-pro.md +287 -0
- package/.claude/archive/agents/05-data-ai/prompt-engineer.md +287 -0
- package/.claude/archive/agents/05-data-ai/reinforcement-learning-engineer.md +277 -0
- package/.claude/archive/agents/07-specialized-domains/api-documenter.md +277 -0
- package/.claude/archive/agents/07-specialized-domains/blockchain-developer.md +287 -0
- package/.claude/archive/agents/07-specialized-domains/embedded-systems.md +287 -0
- package/.claude/archive/agents/07-specialized-domains/fintech-engineer.md +287 -0
- package/.claude/archive/agents/07-specialized-domains/game-developer.md +287 -0
- package/.claude/archive/agents/07-specialized-domains/healthcare-admin.md +199 -0
- package/.claude/archive/agents/07-specialized-domains/iot-engineer.md +287 -0
- package/.claude/archive/agents/07-specialized-domains/m365-admin.md +48 -0
- package/.claude/archive/agents/07-specialized-domains/mobile-app-developer.md +287 -0
- package/.claude/archive/agents/07-specialized-domains/payment-integration.md +287 -0
- package/.claude/archive/agents/07-specialized-domains/quant-analyst.md +287 -0
- package/.claude/archive/agents/07-specialized-domains/risk-manager.md +287 -0
- package/.claude/archive/agents/07-specialized-domains/seo-specialist.md +184 -0
- package/.claude/archive/agents/08-business-product/business-analyst.md +287 -0
- package/.claude/archive/agents/08-business-product/content-marketer.md +287 -0
- package/.claude/archive/agents/08-business-product/customer-success-manager.md +287 -0
- package/.claude/archive/agents/08-business-product/legal-advisor.md +287 -0
- package/.claude/archive/agents/08-business-product/license-engineer.md +295 -0
- package/.claude/archive/agents/08-business-product/product-manager.md +287 -0
- package/.claude/archive/agents/08-business-product/project-manager.md +287 -0
- package/.claude/archive/agents/08-business-product/sales-engineer.md +287 -0
- package/.claude/archive/agents/08-business-product/scrum-master.md +287 -0
- package/.claude/archive/agents/08-business-product/technical-writer.md +287 -0
- package/.claude/archive/agents/08-business-product/ux-researcher.md +287 -0
- package/.claude/archive/agents/08-business-product/wordpress-master.md +316 -0
- package/.claude/archive/skills/competitive-ads-extractor/SKILL.md +293 -0
- package/.claude/archive/skills/developer-growth-analysis/SKILL.md +322 -0
- package/.claude/archive/skills/document-docx/LICENSE.txt +30 -0
- package/.claude/archive/skills/document-docx/SKILL.md +197 -0
- package/.claude/archive/skills/document-docx/docx-js.md +350 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.claude/archive/skills/document-docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.claude/archive/skills/document-docx/ooxml/scripts/pack.py +159 -0
- package/.claude/archive/skills/document-docx/ooxml/scripts/unpack.py +29 -0
- package/.claude/archive/skills/document-docx/ooxml/scripts/validate.py +69 -0
- package/.claude/archive/skills/document-docx/ooxml/scripts/validation/__init__.py +15 -0
- package/.claude/archive/skills/document-docx/ooxml/scripts/validation/base.py +951 -0
- package/.claude/archive/skills/document-docx/ooxml/scripts/validation/docx.py +274 -0
- package/.claude/archive/skills/document-docx/ooxml/scripts/validation/pptx.py +315 -0
- package/.claude/archive/skills/document-docx/ooxml/scripts/validation/redlining.py +279 -0
- package/.claude/archive/skills/document-docx/ooxml.md +610 -0
- package/.claude/archive/skills/document-docx/scripts/__init__.py +1 -0
- package/.claude/archive/skills/document-docx/scripts/document.py +1276 -0
- package/.claude/archive/skills/document-docx/scripts/templates/comments.xml +3 -0
- package/.claude/archive/skills/document-docx/scripts/templates/commentsExtended.xml +3 -0
- package/.claude/archive/skills/document-docx/scripts/templates/commentsExtensible.xml +3 -0
- package/.claude/archive/skills/document-docx/scripts/templates/commentsIds.xml +3 -0
- package/.claude/archive/skills/document-docx/scripts/templates/people.xml +3 -0
- package/.claude/archive/skills/document-docx/scripts/utilities.py +374 -0
- package/.claude/archive/skills/document-pdf/LICENSE.txt +30 -0
- package/.claude/archive/skills/document-pdf/SKILL.md +294 -0
- package/.claude/archive/skills/document-pdf/forms.md +205 -0
- package/.claude/archive/skills/document-pdf/reference.md +612 -0
- package/.claude/archive/skills/document-pdf/scripts/check_bounding_boxes.py +70 -0
- package/.claude/archive/skills/document-pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/.claude/archive/skills/document-pdf/scripts/check_fillable_fields.py +12 -0
- package/.claude/archive/skills/document-pdf/scripts/convert_pdf_to_images.py +35 -0
- package/.claude/archive/skills/document-pdf/scripts/create_validation_image.py +41 -0
- package/.claude/archive/skills/document-pdf/scripts/extract_form_field_info.py +152 -0
- package/.claude/archive/skills/document-pdf/scripts/fill_fillable_fields.py +114 -0
- package/.claude/archive/skills/document-pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/.claude/archive/skills/document-pptx/LICENSE.txt +30 -0
- package/.claude/archive/skills/document-pptx/SKILL.md +484 -0
- package/.claude/archive/skills/document-pptx/html2pptx.md +625 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/.claude/archive/skills/document-pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/.claude/archive/skills/document-pptx/ooxml/scripts/pack.py +159 -0
- package/.claude/archive/skills/document-pptx/ooxml/scripts/unpack.py +29 -0
- package/.claude/archive/skills/document-pptx/ooxml/scripts/validate.py +69 -0
- package/.claude/archive/skills/document-pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/.claude/archive/skills/document-pptx/ooxml/scripts/validation/base.py +951 -0
- package/.claude/archive/skills/document-pptx/ooxml/scripts/validation/docx.py +274 -0
- package/.claude/archive/skills/document-pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/.claude/archive/skills/document-pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/.claude/archive/skills/document-pptx/ooxml.md +427 -0
- package/.claude/archive/skills/document-pptx/scripts/html2pptx.js +979 -0
- package/.claude/archive/skills/document-pptx/scripts/inventory.py +1020 -0
- package/.claude/archive/skills/document-pptx/scripts/rearrange.py +231 -0
- package/.claude/archive/skills/document-pptx/scripts/replace.py +385 -0
- package/.claude/archive/skills/document-pptx/scripts/thumbnail.py +450 -0
- package/.claude/archive/skills/document-xlsx/LICENSE.txt +30 -0
- package/.claude/archive/skills/document-xlsx/SKILL.md +289 -0
- package/.claude/archive/skills/document-xlsx/recalc.py +178 -0
- package/.claude/archive/skills/image-enhancer/SKILL.md +99 -0
- package/.claude/archive/skills/meeting-insights-analyzer/SKILL.md +327 -0
- package/.claude/archive/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/.claude/archive/skills/slack-gif-creator/SKILL.md +646 -0
- package/.claude/archive/skills/slack-gif-creator/core/color_palettes.py +302 -0
- package/.claude/archive/skills/slack-gif-creator/core/easing.py +230 -0
- package/.claude/archive/skills/slack-gif-creator/core/frame_composer.py +469 -0
- package/.claude/archive/skills/slack-gif-creator/core/gif_builder.py +246 -0
- package/.claude/archive/skills/slack-gif-creator/core/typography.py +357 -0
- package/.claude/archive/skills/slack-gif-creator/core/validators.py +264 -0
- package/.claude/archive/skills/slack-gif-creator/core/visual_effects.py +494 -0
- package/.claude/archive/skills/slack-gif-creator/requirements.txt +4 -0
- package/.claude/archive/skills/slack-gif-creator/templates/bounce.py +106 -0
- package/.claude/archive/skills/slack-gif-creator/templates/explode.py +331 -0
- package/.claude/archive/skills/slack-gif-creator/templates/fade.py +329 -0
- package/.claude/archive/skills/slack-gif-creator/templates/flip.py +291 -0
- package/.claude/archive/skills/slack-gif-creator/templates/kaleidoscope.py +211 -0
- package/.claude/archive/skills/slack-gif-creator/templates/morph.py +329 -0
- package/.claude/archive/skills/slack-gif-creator/templates/move.py +293 -0
- package/.claude/archive/skills/slack-gif-creator/templates/pulse.py +268 -0
- package/.claude/archive/skills/slack-gif-creator/templates/shake.py +127 -0
- package/.claude/archive/skills/slack-gif-creator/templates/slide.py +291 -0
- package/.claude/archive/skills/slack-gif-creator/templates/spin.py +269 -0
- package/.claude/archive/skills/slack-gif-creator/templates/wiggle.py +300 -0
- package/.claude/archive/skills/slack-gif-creator/templates/zoom.py +312 -0
- package/.claude/archive/skills/twitter-algorithm-optimizer/SKILL.md +327 -0
- package/.claude/archive/skills/video-downloader/SKILL.md +99 -0
- package/.claude/archive/skills/video-downloader/scripts/download_video.py +145 -0
- package/.claude/bash-whitelist-requests/2026-05-28-grep-find-rg.md +68 -0
- package/.claude/bash-whitelist-requests/2026-06-01-readonly-filters.md +76 -0
- package/.claude/bash-whitelist.txt +124 -0
- package/.claude/commands/agent-introspect.md +89 -0
- package/.claude/commands/apply-rules.md +363 -0
- package/.claude/commands/approve-design.md +219 -0
- package/.claude/commands/approve-org-money.md +267 -0
- package/.claude/commands/build.md +234 -0
- package/.claude/commands/commit.md +97 -0
- package/.claude/commands/context-fetch.md +113 -0
- package/.claude/commands/create-tool.md +496 -0
- package/.claude/commands/design-review.md +138 -0
- package/.claude/commands/design.md +807 -0
- package/.claude/commands/discharge-byproduct.md +208 -0
- package/.claude/commands/doc-review.md +165 -0
- package/.claude/commands/document-pair.md +76 -0
- package/.claude/commands/error-triage.md +435 -0
- package/.claude/commands/eval.md +70 -0
- package/.claude/commands/evolve.md +49 -0
- package/.claude/commands/finish-task.md +105 -0
- package/.claude/commands/gan-build.md +91 -0
- package/.claude/commands/gan-design.md +82 -0
- package/.claude/commands/gate-bypass.md +77 -0
- package/.claude/commands/gate-clear.md +45 -0
- package/.claude/commands/gate-status.md +46 -0
- package/.claude/commands/harness-audit.md +151 -0
- package/.claude/commands/hearing.md +138 -0
- package/.claude/commands/impact-check.md +486 -0
- package/.claude/commands/init-tasks.md +49 -0
- package/.claude/commands/instinct-export.md +47 -0
- package/.claude/commands/instinct-import.md +41 -0
- package/.claude/commands/instinct-status.md +43 -0
- package/.claude/commands/investigate.md +547 -0
- package/.claude/commands/learn.md +55 -0
- package/.claude/commands/lint-rules.md +400 -0
- package/.claude/commands/mode.md +58 -0
- package/.claude/commands/modify-feature.md +209 -0
- package/.claude/commands/module-review.md +149 -0
- package/.claude/commands/move-section.md +67 -0
- package/.claude/commands/new-draft.md +67 -0
- package/.claude/commands/new-feature.md +286 -0
- package/.claude/commands/new-task.md +156 -0
- package/.claude/commands/notification.md +107 -0
- package/.claude/commands/pm-start.md +119 -0
- package/.claude/commands/projects.md +32 -0
- package/.claude/commands/promote.md +43 -0
- package/.claude/commands/rasis-report.md +1323 -0
- package/.claude/commands/release-note.md +130 -0
- package/.claude/commands/reply-watch.md +149 -0
- package/.claude/commands/requirement.md +352 -0
- package/.claude/commands/resume-state.md +187 -0
- package/.claude/commands/reviewpr.md +118 -0
- package/.claude/commands/save-state.md +100 -0
- package/.claude/commands/sentry-pr.md +157 -0
- package/.claude/commands/start-task.md +87 -0
- package/.claude/commands/system-review.md +147 -0
- package/.claude/commands/task-bypass.md +70 -0
- package/.claude/commands/task-estimate.md +100 -0
- package/.claude/commands/template-apply.md +89 -0
- package/.claude/commands/test-design.md +116 -0
- package/.claude/commands/transfer-mismatch.md +317 -0
- package/.claude/commands/verify.md +51 -0
- package/.claude/evals/grader-loop-mode-autonomy.sh +165 -0
- package/.claude/evals/grader-system-reminder-attention.sh +99 -0
- package/.claude/evals/loop-mode-autonomy.md +121 -0
- package/.claude/evals/loop-mode-autonomy.results.template.md +133 -0
- package/.claude/evals/system-reminder-attention.md +123 -0
- package/.claude/evals/system-reminder-attention.results.template.md +93 -0
- package/.claude/evals/system-reminder-attention.runner.md +353 -0
- package/.claude/harness-config.local.yml +48 -0
- package/.claude/harness-config.yml +534 -0
- package/.claude/hooks/agent-marker-clear.sh +43 -0
- package/.claude/hooks/agent-marker-set.sh +40 -0
- package/.claude/hooks/agent-router-suggest.sh +123 -0
- package/.claude/hooks/autonomous-action-guard.sh +242 -0
- package/.claude/hooks/byproduct-discharge-guard.sh +128 -0
- package/.claude/hooks/check-md-mermaid.sh +144 -0
- package/.claude/hooks/check-required-env.sh +95 -0
- package/.claude/hooks/check-serena-mcp.sh +123 -0
- package/.claude/hooks/confidence-gate.sh +139 -0
- package/.claude/hooks/context-budget.sh +233 -0
- package/.claude/hooks/delegation-guard.sh +99 -0
- package/.claude/hooks/dispatcher-manifest.tsv +38 -0
- package/.claude/hooks/draft-flow-guard.sh +304 -0
- package/.claude/hooks/failure-loop-detect.sh +139 -0
- package/.claude/hooks/gateguard.sh +209 -0
- package/.claude/hooks/improvement-proposal.sh +112 -0
- package/.claude/hooks/init-tasks-on-start.sh +34 -0
- package/.claude/hooks/lib/bypass-logger.sh +82 -0
- package/.claude/hooks/lib/confidence-gate/bypass.sh +48 -0
- package/.claude/hooks/lib/confidence-gate/extract.sh +99 -0
- package/.claude/hooks/lib/confidence-gate/major-agent-filter.sh +59 -0
- package/.claude/hooks/lib/confidence-gate/messages.sh +53 -0
- package/.claude/hooks/lib/config-loader.sh +784 -0
- package/.claude/hooks/lib/delegation-guard/bash-whitelist.sh +323 -0
- package/.claude/hooks/lib/delegation-guard/git-deny.sh +188 -0
- package/.claude/hooks/lib/delegation-guard/protected-paths.sh +105 -0
- package/.claude/hooks/lib/delegation-guard/subagent-detect.sh +40 -0
- package/.claude/hooks/lib/dispatcher-core.sh +454 -0
- package/.claude/hooks/lib/improvement-proposal/aggregate.py +466 -0
- package/.claude/hooks/lib/improvement-proposal/cache.sh +78 -0
- package/.claude/hooks/lib/mode-loader.sh +80 -0
- package/.claude/hooks/lib/next-actions-parser.sh +153 -0
- package/.claude/hooks/lib/project-root.sh +60 -0
- package/.claude/hooks/list-md-plan-first-reminder.sh +143 -0
- package/.claude/hooks/loop-auto-progress-reminder.sh +108 -0
- package/.claude/hooks/loop-confirmation-detector.sh +241 -0
- package/.claude/hooks/mode-asana-prompt.sh +61 -0
- package/.claude/hooks/mode-enforce.sh +57 -0
- package/.claude/hooks/mode-session-start.sh +93 -0
- package/.claude/hooks/next-actions-surface.sh +136 -0
- package/.claude/hooks/notification-dispatcher.sh +9 -0
- package/.claude/hooks/notify.sh +27 -0
- package/.claude/hooks/parallel-subagent-reminder.sh +469 -0
- package/.claude/hooks/post-tool-use-dispatcher.sh +9 -0
- package/.claude/hooks/pre-tool-use-dispatcher.sh +9 -0
- package/.claude/hooks/reviewer-count-guard.sh +313 -0
- package/.claude/hooks/session-help-surface.sh +192 -0
- package/.claude/hooks/session-start-dispatcher.sh +9 -0
- package/.claude/hooks/session-start-wrapper.sh +156 -0
- package/.claude/hooks/stale-harness-detect.sh +422 -0
- package/.claude/hooks/stop-dispatcher.sh +9 -0
- package/.claude/hooks/stop.sh +25 -0
- package/.claude/hooks/subagent-stop-dispatcher.sh +9 -0
- package/.claude/hooks/task-rule-guard.sh +317 -0
- package/.claude/hooks/tests/run-tests.sh +23 -0
- package/.claude/hooks/tests/test-agent-marker-warn.sh +86 -0
- package/.claude/hooks/tests/test-check-required-env.sh +138 -0
- package/.claude/hooks/tests/test-confidence-gate.sh +170 -0
- package/.claude/hooks/tests/test-config-env-override.sh +220 -0
- package/.claude/hooks/tests/test-gate-disable.sh +118 -0
- package/.claude/hooks/tests/test-improvement-proposal.sh +284 -0
- package/.claude/hooks/tool-call-slip-detector.sh +188 -0
- package/.claude/hooks/user-prompt-submit-dispatcher.sh +9 -0
- package/.claude/hooks/why-x5-reminder.sh +45 -0
- package/.claude/hooks/why-x5-violation-detect.sh +152 -0
- package/.claude/hooks/workflow-guard.sh +263 -0
- package/.claude/mode.yml +28 -0
- package/.claude/project-rules/development-process.md +8 -0
- package/.claude/project-rules/git-workflow.md +8 -0
- package/.claude/project-rules/modes.md +8 -0
- package/.claude/project-rules/self-improvement.md +8 -0
- package/.claude/project-rules/task-management.md +8 -0
- package/.claude/project-rules/why-x5-output.md +8 -0
- package/.claude/project-rules/workflow.md +8 -0
- package/.claude/rules/development-process.md +293 -0
- package/.claude/rules/git-workflow.md +71 -0
- package/.claude/rules/modes.md +189 -0
- package/.claude/rules/self-improvement.md +76 -0
- package/.claude/rules/task-management.md +261 -0
- package/.claude/rules/why-x5-output.md +97 -0
- package/.claude/rules/workflow.md +157 -0
- package/.claude/rules-details/README.md +67 -0
- package/.claude/rules-details/development-process/confidence-gate.md +22 -0
- package/.claude/rules-details/development-process/cross-repo-write.md +35 -0
- package/.claude/rules-details/development-process/delegation-requirements.md +158 -0
- package/.claude/rules-details/development-process/harness-sync.md +21 -0
- package/.claude/rules-details/development-process/origin.md +13 -0
- package/.claude/rules-details/development-process/parallelization-origin.md +22 -0
- package/.claude/rules-details/development-process/research-reuse.md +22 -0
- package/.claude/rules-details/development-process/staging-strategy.md +47 -0
- package/.claude/rules-details/modes/artifacts.md +34 -0
- package/.claude/rules-details/modes/compliance-items.md +120 -0
- package/.claude/rules-details/modes/five-layer-enforcement.md +46 -0
- package/.claude/rules-details/modes/mode-hooks.md +51 -0
- package/.claude/rules-details/modes/origin.md +17 -0
- package/.claude/rules-details/self-improvement/l4-mechanics.md +36 -0
- package/.claude/rules-details/self-improvement/origin.md +8 -0
- package/.claude/rules-details/self-improvement/related-skills.md +35 -0
- package/.claude/rules-details/self-improvement/when-to-use-layers.md +39 -0
- package/.claude/rules-details/task-management/hook-enforcement.md +25 -0
- package/.claude/rules-details/task-management/mandatory-reading.md +20 -0
- package/.claude/rules-details/task-management/origin.md +12 -0
- package/.claude/rules-details/task-management/parking-lot.md +26 -0
- package/.claude/rules-details/task-management/plan-first.md +44 -0
- package/.claude/rules-details/task-management/six-articles.md +68 -0
- package/.claude/rules-details/task-management/task-migration.md +16 -0
- package/.claude/rules-details/task-management/ui-detection.md +11 -0
- package/.claude/rules-details/why-x5-output/examples.md +41 -0
- package/.claude/rules-details/why-x5-output/feedback-memory.md +14 -0
- package/.claude/rules-details/why-x5-output/origin.md +10 -0
- package/.claude/rules-details/why-x5-output/v1-v10-history.md +19 -0
- package/.claude/rules-details/workflow/10-stage.md +43 -0
- package/.claude/rules-details/workflow/14-stage.md +52 -0
- package/.claude/rules-details/workflow/byproduct-discharge.md +39 -0
- package/.claude/rules-details/workflow/draft-flow-guard.md +31 -0
- package/.claude/rules-details/workflow/fan-out.md +70 -0
- package/.claude/rules-details/workflow/mece-20.md +36 -0
- package/.claude/rules-details/workflow/origin.md +14 -0
- package/.claude/rules-details/workflow/refactoring.md +48 -0
- package/.claude/rules-details/workflow/related-skills.md +22 -0
- package/.claude/rules-details/workflow/reviewer-prompt.md +100 -0
- package/.claude/rules-details/workflow/session-persistence.md +46 -0
- package/.claude/rules-details/workflow/workflow-guard.md +36 -0
- package/.claude/scripts/__pycache__/harness-audit.cpython-313.pyc +0 -0
- package/.claude/scripts/agent-stocktake.py +421 -0
- package/.claude/scripts/check-md-mermaid.mjs +138 -0
- package/.claude/scripts/generate-settings.sh +0 -0
- package/.claude/scripts/harness-audit.py +1547 -0
- package/.claude/scripts/hc-config.sh +2265 -0
- package/.claude/scripts/init-tasks.sh +117 -0
- package/.claude/scripts/lib/enforcement-matrix-parse.sh +81 -0
- package/.claude/scripts/lib/hc-config-metadata.sh +190 -0
- package/.claude/scripts/lib/hc-config-web-server.js +1528 -0
- package/.claude/scripts/lib/hc-config-web-ui/app.js +1054 -0
- package/.claude/scripts/lib/hc-config-web-ui/index.html +130 -0
- package/.claude/scripts/lib/hc-config-web-ui/style.css +522 -0
- package/.claude/scripts/new-task-helper.sh +432 -0
- package/.claude/scripts/observe-repair.sh +437 -0
- package/.claude/scripts/observe-rotate.sh +311 -0
- package/.claude/scripts/statusline.sh +239 -0
- package/.claude/settings.generated.preview.json +211 -0
- package/.claude/settings.json +215 -0
- package/.claude/settings.local.example.json +20 -0
- package/.claude/settings.local.json +36 -0
- package/.claude/skills/agent-introspection-debugging/SKILL.md +123 -0
- package/.claude/skills/agent-router/README.md +137 -0
- package/.claude/skills/agent-router/SKILL.md +74 -0
- package/.claude/skills/agent-router/dispatch-table.yml +352 -0
- package/.claude/skills/agent-router/router.py +1086 -0
- package/.claude/skills/agent-router/samples/representative_prompts.txt +24 -0
- package/.claude/skills/agent-router/tests/__init__.py +0 -0
- package/.claude/skills/agent-router/tests/test_router.py +762 -0
- package/.claude/skills/artifacts-builder/LICENSE.txt +202 -0
- package/.claude/skills/artifacts-builder/SKILL.md +74 -0
- package/.claude/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/.claude/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
- package/.claude/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/.claude/skills/brand-guidelines/LICENSE.txt +202 -0
- package/.claude/skills/brand-guidelines/SKILL.md +73 -0
- package/.claude/skills/canvas-design/LICENSE.txt +202 -0
- package/.claude/skills/canvas-design/SKILL.md +130 -0
- package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/.claude/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/.claude/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/.claude/skills/changelog-generator/SKILL.md +104 -0
- package/.claude/skills/check-md-mermaid/SKILL.md +62 -0
- package/.claude/skills/connect/SKILL.md +156 -0
- package/.claude/skills/connect-apps/SKILL.md +80 -0
- package/.claude/skills/content-research-writer/SKILL.md +538 -0
- package/.claude/skills/continuous-agent-loop/SKILL.md +187 -0
- package/.claude/skills/continuous-learning-v2/SKILL.md +238 -0
- package/.claude/skills/continuous-learning-v2/config.json +35 -0
- package/.claude/skills/continuous-learning-v2/hooks/observe.sh +333 -0
- package/.claude/skills/continuous-learning-v2/instinct-cli.py +406 -0
- package/.claude/skills/domain-name-brainstormer/SKILL.md +212 -0
- package/.claude/skills/eval-harness/SKILL.md +100 -0
- package/.claude/skills/eval-harness/swe-bench/README.md +80 -0
- package/.claude/skills/eval-harness/swe-bench/config.yml +29 -0
- package/.claude/skills/eval-harness/swe-bench/docker/Dockerfile +25 -0
- package/.claude/skills/eval-harness/swe-bench/docker/docker-compose.yml +18 -0
- package/.claude/skills/eval-harness/swe-bench/results/dry-run-2026-05-04.json +137 -0
- package/.claude/skills/eval-harness/swe-bench/results/dry-run-comparison-2026-05-04.md +112 -0
- package/.claude/skills/eval-harness/swe-bench/results/dry-run-improved-2026-05-04.json +165 -0
- package/.claude/skills/eval-harness/swe-bench/results/raw/astropy__astropy-12907.patch +12 -0
- package/.claude/skills/eval-harness/swe-bench/results/raw/astropy__astropy-12907.txt +322 -0
- package/.claude/skills/eval-harness/swe-bench/results/raw/astropy__astropy-12907.whole-file.txt +322 -0
- package/.claude/skills/eval-harness/swe-bench/runner.py +845 -0
- package/.claude/skills/eval-harness/swe-bench/scoring.py +298 -0
- package/.claude/skills/eval-harness/swe-bench/tasks/fetch_tasks.py +81 -0
- package/.claude/skills/eval-harness/swe-bench/tasks/lite-50.json +702 -0
- package/.claude/skills/file-organizer/SKILL.md +433 -0
- package/.claude/skills/gan-style-harness/SKILL.md +111 -0
- package/.claude/skills/gateguard/.gateguard.yml +47 -0
- package/.claude/skills/gateguard/SKILL.md +99 -0
- package/.claude/skills/internal-comms/LICENSE.txt +202 -0
- package/.claude/skills/internal-comms/SKILL.md +32 -0
- package/.claude/skills/internal-comms/examples/3p-updates.md +47 -0
- package/.claude/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/.claude/skills/internal-comms/examples/faq-answers.md +30 -0
- package/.claude/skills/internal-comms/examples/general-comms.md +16 -0
- package/.claude/skills/invoice-organizer/SKILL.md +446 -0
- package/.claude/skills/karpathy-guidelines/SKILL.md +67 -0
- package/.claude/skills/langsmith-fetch/SKILL.md +485 -0
- package/.claude/skills/lead-research-assistant/SKILL.md +199 -0
- package/.claude/skills/mcp-builder/LICENSE.txt +202 -0
- package/.claude/skills/mcp-builder/SKILL.md +328 -0
- package/.claude/skills/mcp-builder/reference/evaluation.md +602 -0
- package/.claude/skills/mcp-builder/reference/mcp_best_practices.md +915 -0
- package/.claude/skills/mcp-builder/reference/node_mcp_server.md +916 -0
- package/.claude/skills/mcp-builder/reference/python_mcp_server.md +752 -0
- package/.claude/skills/mcp-builder/scripts/connections.py +151 -0
- package/.claude/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/.claude/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/.claude/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/.claude/skills/raffle-winner-picker/SKILL.md +159 -0
- package/.claude/skills/repo-map/README.md +125 -0
- package/.claude/skills/repo-map/SKILL.md +128 -0
- package/.claude/skills/repo-map/examples/sample-output.md +1194 -0
- package/.claude/skills/repo-map/repo-map.py +715 -0
- package/.claude/skills/salesforce-e2e-testing/SKILL.md +116 -0
- package/.claude/skills/salesforce-e2e-testing/catalog-template.md +161 -0
- package/.claude/skills/salesforce-e2e-testing/methodology.md +179 -0
- package/.claude/skills/salesforce-e2e-testing/observation-rules.md +280 -0
- package/.claude/skills/salesforce-e2e-testing/pattern-taxonomy.md +392 -0
- package/.claude/skills/salesforce-e2e-testing/procedure-template.md +376 -0
- package/.claude/skills/skill-creator/LICENSE.txt +202 -0
- package/.claude/skills/skill-creator/SKILL.md +209 -0
- package/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/.claude/skills/skill-share/SKILL.md +80 -0
- package/.claude/skills/tailored-resume-generator/SKILL.md +345 -0
- package/.claude/skills/template-skill/SKILL.md +6 -0
- package/.claude/skills/theme-factory/LICENSE.txt +202 -0
- package/.claude/skills/theme-factory/SKILL.md +59 -0
- package/.claude/skills/theme-factory/theme-showcase.pdf +0 -0
- package/.claude/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/.claude/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/.claude/skills/theme-factory/themes/desert-rose.md +19 -0
- package/.claude/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/.claude/skills/theme-factory/themes/golden-hour.md +19 -0
- package/.claude/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/.claude/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/.claude/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/.claude/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/.claude/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/.claude/skills/verification-loop/SKILL.md +129 -0
- package/.claude/skills/webapp-testing/LICENSE.txt +202 -0
- package/.claude/skills/webapp-testing/SKILL.md +96 -0
- package/.claude/skills/webapp-testing/examples/console_logging.py +35 -0
- package/.claude/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/.claude/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/.claude/skills/webapp-testing/scripts/with_server.py +106 -0
- package/.claude/templates/docs/draft/_DRAFT_TEMPLATE.md +162 -0
- package/.claude/templates/docs/draft/_TEST_DESIGN_TEMPLATE.md +76 -0
- package/.claude/templates/docs/tasks/_TASK_TEMPLATE.md +276 -0
- package/.claude/templates/docs/tasks/list.md +80 -0
- package/.claude/templates/docs/tasks/parking-lot.md +82 -0
- package/.claude/templates/settings.user-level.json.template +306 -0
- package/.claude/tests/SMOKE-CLASSIFICATION.md +199 -0
- package/.claude/tests/action-space-count-smoke.sh +130 -0
- package/.claude/tests/agent-router-suggest-wiring-smoke.sh +188 -0
- package/.claude/tests/audit-followups-smoke.sh +158 -0
- package/.claude/tests/autonomous-action-guard-relaxation-smoke.sh +479 -0
- package/.claude/tests/autonomous-action-guard-smoke.sh +187 -0
- package/.claude/tests/check-serena-mcp-smoke.sh +156 -0
- package/.claude/tests/common-rules-import-smoke.sh +209 -0
- package/.claude/tests/confidence-gate-smoke.sh +220 -0
- package/.claude/tests/config-feature-toggles-smoke.sh +389 -0
- package/.claude/tests/context-budget-smoke.sh +222 -0
- package/.claude/tests/custom-pm-commands-smoke.sh +93 -0
- package/.claude/tests/delegation-guard-code-smoke.sh +244 -0
- package/.claude/tests/delegation-guard-deny-layers-smoke.sh +356 -0
- package/.claude/tests/delegation-guard-readonly-filter-smoke.sh +205 -0
- package/.claude/tests/delegation-guard-search-whitelist-smoke.sh +152 -0
- package/.claude/tests/delegation-guard-segment-smoke.sh +109 -0
- package/.claude/tests/dispatcher-blocker-invariance-smoke.sh +700 -0
- package/.claude/tests/dispatcher-core-smoke.sh +452 -0
- package/.claude/tests/dispatcher-merge-matrix-smoke.sh +825 -0
- package/.claude/tests/dispatcher-success-stdout-smoke.sh +290 -0
- package/.claude/tests/draft-flow-guard-approved-dir-smoke.sh +234 -0
- package/.claude/tests/draft-flow-guard-smoke.sh +194 -0
- package/.claude/tests/dual-mode-portability-smoke.sh +131 -0
- package/.claude/tests/effective-hook-matrix-smoke.sh +261 -0
- package/.claude/tests/enforcement-mismatch-smoke.sh +263 -0
- package/.claude/tests/fixtures/cascade-sample.jsonl +9 -0
- package/.claude/tests/fixtures/next-actions/case-clean.md +14 -0
- package/.claude/tests/fixtures/next-actions/case-with-red.md +16 -0
- package/.claude/tests/fixtures/next-actions/case-with-yellow-only.md +14 -0
- package/.claude/tests/fixtures/normal-broken-scatter.jsonl +5 -0
- package/.claude/tests/fixtures/task-71/blocker-baseline.tsv +24 -0
- package/.claude/tests/fixtures/task-71/settings-inventory.tsv +37 -0
- package/.claude/tests/fixtures/transcript-50pct.jsonl +2 -0
- package/.claude/tests/fixtures/transcript-60pct.jsonl +2 -0
- package/.claude/tests/fixtures/transcript-80pct.jsonl +2 -0
- package/.claude/tests/fixtures/transcript-95pct.jsonl +2 -0
- package/.claude/tests/fixtures/workflow-guard/case-2-mid.json +21 -0
- package/.claude/tests/fixtures/workflow-guard/case-3-blocked.json +33 -0
- package/.claude/tests/fixtures/workflow-guard/case-4-clean.json +27 -0
- package/.claude/tests/fixtures/workflow-guard/case-8-modify.json +23 -0
- package/.claude/tests/fixtures/workflow-guard/inputs/case-1.json +1 -0
- package/.claude/tests/fixtures/workflow-guard/inputs/case-2.json +1 -0
- package/.claude/tests/fixtures/workflow-guard/inputs/case-3.json +1 -0
- package/.claude/tests/fixtures/workflow-guard/inputs/case-4.json +1 -0
- package/.claude/tests/fixtures/workflow-guard/inputs/case-5.json +1 -0
- package/.claude/tests/fixtures/workflow-guard/inputs/case-6.json +1 -0
- package/.claude/tests/fixtures/workflow-guard/inputs/case-7.json +1 -0
- package/.claude/tests/fixtures/workflow-guard/inputs/case-8.json +1 -0
- package/.claude/tests/gateguard-smoke.sh +213 -0
- package/.claude/tests/git-deny-mainline-policy-smoke.sh +222 -0
- package/.claude/tests/harness-audit-c-batch-smoke.sh +270 -0
- package/.claude/tests/harness-audit-compare-smoke.sh +186 -0
- package/.claude/tests/harness-audit-pipeline-health-smoke.sh +326 -0
- package/.claude/tests/harness-config-local-smoke.sh +232 -0
- package/.claude/tests/hc-config-git-policy-smoke.sh +241 -0
- package/.claude/tests/hc-config-key-parity-smoke.sh +149 -0
- package/.claude/tests/hc-config-migration-smoke.sh +251 -0
- package/.claude/tests/hc-config-script-smoke.sh +1106 -0
- package/.claude/tests/hc-config-tui-smoke.sh +801 -0
- package/.claude/tests/hc-config-web-ui-smoke.sh +3224 -0
- package/.claude/tests/hook-cwd-robustness-smoke.sh +206 -0
- package/.claude/tests/hook-frequency-tweaks-smoke.sh +312 -0
- package/.claude/tests/improvement-proposal-cache-smoke.sh +238 -0
- package/.claude/tests/install-sh-overwrite-all-smoke.sh +274 -0
- package/.claude/tests/install-sh-regen-settings-smoke.sh +301 -0
- package/.claude/tests/install-sh-sync-drift-smoke.sh +285 -0
- package/.claude/tests/layer-b-context-isolation-smoke.sh +392 -0
- package/.claude/tests/list-md-plan-first-reminder-smoke.sh +313 -0
- package/.claude/tests/loop-auto-progress-smoke.sh +372 -0
- package/.claude/tests/loop-confirmation-detector-smoke.sh +674 -0
- package/.claude/tests/new-task-batch-update-smoke.sh +664 -0
- package/.claude/tests/next-actions-hooks-smoke.sh +283 -0
- package/.claude/tests/npx-cli-smoke.sh +696 -0
- package/.claude/tests/observe-flock-smoke.sh +223 -0
- package/.claude/tests/observe-jq-parse-smoke.sh +250 -0
- package/.claude/tests/observe-repair-smoke.sh +475 -0
- package/.claude/tests/observe-rotate-smoke.sh +428 -0
- package/.claude/tests/observe-subagent-stop-smoke.sh +476 -0
- package/.claude/tests/parallel-subagent-reminder-smoke.sh +918 -0
- package/.claude/tests/project-root-smoke.sh +140 -0
- package/.claude/tests/project-rules-protection-smoke.sh +199 -0
- package/.claude/tests/review-required-min-count-smoke.sh +286 -0
- package/.claude/tests/reviewer-count-guard-smoke.sh +490 -0
- package/.claude/tests/rule-architecture-smoke.sh +418 -0
- package/.claude/tests/rule-change-draft-flow-guard-smoke.sh +343 -0
- package/.claude/tests/run-all-smokes.sh +340 -0
- package/.claude/tests/session-help-surface-smoke.sh +224 -0
- package/.claude/tests/session-start-parallel-smoke.sh +165 -0
- package/.claude/tests/sessionstart-budget-smoke.sh +185 -0
- package/.claude/tests/sessionstart-footprint-smoke.sh +258 -0
- package/.claude/tests/settings-dispatcher-baseline-smoke.sh +709 -0
- package/.claude/tests/settings-generation-feature-pruning-smoke.sh +196 -0
- package/.claude/tests/stale-harness-detect-smoke.sh +974 -0
- package/.claude/tests/statusline-smoke.sh +180 -0
- package/.claude/tests/task-rule-guard-smoke.sh +656 -0
- package/.claude/tests/tool-call-slip-detector-smoke.sh +101 -0
- package/.claude/tests/wave-precheck-template-smoke.sh +159 -0
- package/.claude/tests/why-x5-violation-detect-smoke.sh +157 -0
- package/.claude/tests/workflow-guard-smoke.sh +266 -0
- package/CLAUDE.md +75 -0
- package/LICENSE +21 -0
- package/README.md +790 -0
- package/bin/cli.js +395 -0
- package/docs/INVENTORY.md +163 -0
- package/install.sh +769 -0
- package/package.json +25 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Rearrange PowerPoint slides based on a sequence of indices.
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
python rearrange.py template.pptx output.pptx 0,34,34,50,52
|
|
7
|
+
|
|
8
|
+
This will create output.pptx using slides from template.pptx in the specified order.
|
|
9
|
+
Slides can be repeated (e.g., 34 appears twice).
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import argparse
|
|
13
|
+
import shutil
|
|
14
|
+
import sys
|
|
15
|
+
from copy import deepcopy
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
|
|
18
|
+
import six
|
|
19
|
+
from pptx import Presentation
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def main():
|
|
23
|
+
parser = argparse.ArgumentParser(
|
|
24
|
+
description="Rearrange PowerPoint slides based on a sequence of indices.",
|
|
25
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
26
|
+
epilog="""
|
|
27
|
+
Examples:
|
|
28
|
+
python rearrange.py template.pptx output.pptx 0,34,34,50,52
|
|
29
|
+
Creates output.pptx using slides 0, 34 (twice), 50, and 52 from template.pptx
|
|
30
|
+
|
|
31
|
+
python rearrange.py template.pptx output.pptx 5,3,1,2,4
|
|
32
|
+
Creates output.pptx with slides reordered as specified
|
|
33
|
+
|
|
34
|
+
Note: Slide indices are 0-based (first slide is 0, second is 1, etc.)
|
|
35
|
+
""",
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
parser.add_argument("template", help="Path to template PPTX file")
|
|
39
|
+
parser.add_argument("output", help="Path for output PPTX file")
|
|
40
|
+
parser.add_argument(
|
|
41
|
+
"sequence", help="Comma-separated sequence of slide indices (0-based)"
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
args = parser.parse_args()
|
|
45
|
+
|
|
46
|
+
# Parse the slide sequence
|
|
47
|
+
try:
|
|
48
|
+
slide_sequence = [int(x.strip()) for x in args.sequence.split(",")]
|
|
49
|
+
except ValueError:
|
|
50
|
+
print(
|
|
51
|
+
"Error: Invalid sequence format. Use comma-separated integers (e.g., 0,34,34,50,52)"
|
|
52
|
+
)
|
|
53
|
+
sys.exit(1)
|
|
54
|
+
|
|
55
|
+
# Check template exists
|
|
56
|
+
template_path = Path(args.template)
|
|
57
|
+
if not template_path.exists():
|
|
58
|
+
print(f"Error: Template file not found: {args.template}")
|
|
59
|
+
sys.exit(1)
|
|
60
|
+
|
|
61
|
+
# Create output directory if needed
|
|
62
|
+
output_path = Path(args.output)
|
|
63
|
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
64
|
+
|
|
65
|
+
try:
|
|
66
|
+
rearrange_presentation(template_path, output_path, slide_sequence)
|
|
67
|
+
except ValueError as e:
|
|
68
|
+
print(f"Error: {e}")
|
|
69
|
+
sys.exit(1)
|
|
70
|
+
except Exception as e:
|
|
71
|
+
print(f"Error processing presentation: {e}")
|
|
72
|
+
sys.exit(1)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def duplicate_slide(pres, index):
|
|
76
|
+
"""Duplicate a slide in the presentation."""
|
|
77
|
+
source = pres.slides[index]
|
|
78
|
+
|
|
79
|
+
# Use source's layout to preserve formatting
|
|
80
|
+
new_slide = pres.slides.add_slide(source.slide_layout)
|
|
81
|
+
|
|
82
|
+
# Collect all image and media relationships from the source slide
|
|
83
|
+
image_rels = {}
|
|
84
|
+
for rel_id, rel in six.iteritems(source.part.rels):
|
|
85
|
+
if "image" in rel.reltype or "media" in rel.reltype:
|
|
86
|
+
image_rels[rel_id] = rel
|
|
87
|
+
|
|
88
|
+
# CRITICAL: Clear placeholder shapes to avoid duplicates
|
|
89
|
+
for shape in new_slide.shapes:
|
|
90
|
+
sp = shape.element
|
|
91
|
+
sp.getparent().remove(sp)
|
|
92
|
+
|
|
93
|
+
# Copy all shapes from source
|
|
94
|
+
for shape in source.shapes:
|
|
95
|
+
el = shape.element
|
|
96
|
+
new_el = deepcopy(el)
|
|
97
|
+
new_slide.shapes._spTree.insert_element_before(new_el, "p:extLst")
|
|
98
|
+
|
|
99
|
+
# Handle picture shapes - need to update the blip reference
|
|
100
|
+
# Look for all blip elements (they can be in pic or other contexts)
|
|
101
|
+
# Using the element's own xpath method without namespaces argument
|
|
102
|
+
blips = new_el.xpath(".//a:blip[@r:embed]")
|
|
103
|
+
for blip in blips:
|
|
104
|
+
old_rId = blip.get(
|
|
105
|
+
"{http://schemas.openxmlformats.org/officeDocument/2006/relationships}embed"
|
|
106
|
+
)
|
|
107
|
+
if old_rId in image_rels:
|
|
108
|
+
# Create a new relationship in the destination slide for this image
|
|
109
|
+
old_rel = image_rels[old_rId]
|
|
110
|
+
# get_or_add returns the rId directly, or adds and returns new rId
|
|
111
|
+
new_rId = new_slide.part.rels.get_or_add(
|
|
112
|
+
old_rel.reltype, old_rel._target
|
|
113
|
+
)
|
|
114
|
+
# Update the blip's embed reference to use the new relationship ID
|
|
115
|
+
blip.set(
|
|
116
|
+
"{http://schemas.openxmlformats.org/officeDocument/2006/relationships}embed",
|
|
117
|
+
new_rId,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
# Copy any additional image/media relationships that might be referenced elsewhere
|
|
121
|
+
for rel_id, rel in image_rels.items():
|
|
122
|
+
try:
|
|
123
|
+
new_slide.part.rels.get_or_add(rel.reltype, rel._target)
|
|
124
|
+
except Exception:
|
|
125
|
+
pass # Relationship might already exist
|
|
126
|
+
|
|
127
|
+
return new_slide
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
def delete_slide(pres, index):
|
|
131
|
+
"""Delete a slide from the presentation."""
|
|
132
|
+
rId = pres.slides._sldIdLst[index].rId
|
|
133
|
+
pres.part.drop_rel(rId)
|
|
134
|
+
del pres.slides._sldIdLst[index]
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def reorder_slides(pres, slide_index, target_index):
|
|
138
|
+
"""Move a slide from one position to another."""
|
|
139
|
+
slides = pres.slides._sldIdLst
|
|
140
|
+
|
|
141
|
+
# Remove slide element from current position
|
|
142
|
+
slide_element = slides[slide_index]
|
|
143
|
+
slides.remove(slide_element)
|
|
144
|
+
|
|
145
|
+
# Insert at target position
|
|
146
|
+
slides.insert(target_index, slide_element)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
def rearrange_presentation(template_path, output_path, slide_sequence):
|
|
150
|
+
"""
|
|
151
|
+
Create a new presentation with slides from template in specified order.
|
|
152
|
+
|
|
153
|
+
Args:
|
|
154
|
+
template_path: Path to template PPTX file
|
|
155
|
+
output_path: Path for output PPTX file
|
|
156
|
+
slide_sequence: List of slide indices (0-based) to include
|
|
157
|
+
"""
|
|
158
|
+
# Copy template to preserve dimensions and theme
|
|
159
|
+
if template_path != output_path:
|
|
160
|
+
shutil.copy2(template_path, output_path)
|
|
161
|
+
prs = Presentation(output_path)
|
|
162
|
+
else:
|
|
163
|
+
prs = Presentation(template_path)
|
|
164
|
+
|
|
165
|
+
total_slides = len(prs.slides)
|
|
166
|
+
|
|
167
|
+
# Validate indices
|
|
168
|
+
for idx in slide_sequence:
|
|
169
|
+
if idx < 0 or idx >= total_slides:
|
|
170
|
+
raise ValueError(f"Slide index {idx} out of range (0-{total_slides - 1})")
|
|
171
|
+
|
|
172
|
+
# Track original slides and their duplicates
|
|
173
|
+
slide_map = [] # List of actual slide indices for final presentation
|
|
174
|
+
duplicated = {} # Track duplicates: original_idx -> [duplicate_indices]
|
|
175
|
+
|
|
176
|
+
# Step 1: DUPLICATE repeated slides
|
|
177
|
+
print(f"Processing {len(slide_sequence)} slides from template...")
|
|
178
|
+
for i, template_idx in enumerate(slide_sequence):
|
|
179
|
+
if template_idx in duplicated and duplicated[template_idx]:
|
|
180
|
+
# Already duplicated this slide, use the duplicate
|
|
181
|
+
slide_map.append(duplicated[template_idx].pop(0))
|
|
182
|
+
print(f" [{i}] Using duplicate of slide {template_idx}")
|
|
183
|
+
elif slide_sequence.count(template_idx) > 1 and template_idx not in duplicated:
|
|
184
|
+
# First occurrence of a repeated slide - create duplicates
|
|
185
|
+
slide_map.append(template_idx)
|
|
186
|
+
duplicates = []
|
|
187
|
+
count = slide_sequence.count(template_idx) - 1
|
|
188
|
+
print(
|
|
189
|
+
f" [{i}] Using original slide {template_idx}, creating {count} duplicate(s)"
|
|
190
|
+
)
|
|
191
|
+
for _ in range(count):
|
|
192
|
+
duplicate_slide(prs, template_idx)
|
|
193
|
+
duplicates.append(len(prs.slides) - 1)
|
|
194
|
+
duplicated[template_idx] = duplicates
|
|
195
|
+
else:
|
|
196
|
+
# Unique slide or first occurrence already handled, use original
|
|
197
|
+
slide_map.append(template_idx)
|
|
198
|
+
print(f" [{i}] Using original slide {template_idx}")
|
|
199
|
+
|
|
200
|
+
# Step 2: DELETE unwanted slides (work backwards)
|
|
201
|
+
slides_to_keep = set(slide_map)
|
|
202
|
+
print(f"\nDeleting {len(prs.slides) - len(slides_to_keep)} unused slides...")
|
|
203
|
+
for i in range(len(prs.slides) - 1, -1, -1):
|
|
204
|
+
if i not in slides_to_keep:
|
|
205
|
+
delete_slide(prs, i)
|
|
206
|
+
# Update slide_map indices after deletion
|
|
207
|
+
slide_map = [idx - 1 if idx > i else idx for idx in slide_map]
|
|
208
|
+
|
|
209
|
+
# Step 3: REORDER to final sequence
|
|
210
|
+
print(f"Reordering {len(slide_map)} slides to final sequence...")
|
|
211
|
+
for target_pos in range(len(slide_map)):
|
|
212
|
+
# Find which slide should be at target_pos
|
|
213
|
+
current_pos = slide_map[target_pos]
|
|
214
|
+
if current_pos != target_pos:
|
|
215
|
+
reorder_slides(prs, current_pos, target_pos)
|
|
216
|
+
# Update slide_map: the move shifts other slides
|
|
217
|
+
for i in range(len(slide_map)):
|
|
218
|
+
if slide_map[i] > current_pos and slide_map[i] <= target_pos:
|
|
219
|
+
slide_map[i] -= 1
|
|
220
|
+
elif slide_map[i] < current_pos and slide_map[i] >= target_pos:
|
|
221
|
+
slide_map[i] += 1
|
|
222
|
+
slide_map[target_pos] = target_pos
|
|
223
|
+
|
|
224
|
+
# Save the presentation
|
|
225
|
+
prs.save(output_path)
|
|
226
|
+
print(f"\nSaved rearranged presentation to: {output_path}")
|
|
227
|
+
print(f"Final presentation has {len(prs.slides)} slides")
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
if __name__ == "__main__":
|
|
231
|
+
main()
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Apply text replacements to PowerPoint presentation.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
python replace.py <input.pptx> <replacements.json> <output.pptx>
|
|
6
|
+
|
|
7
|
+
The replacements JSON should have the structure output by inventory.py.
|
|
8
|
+
ALL text shapes identified by inventory.py will have their text cleared
|
|
9
|
+
unless "paragraphs" is specified in the replacements for that shape.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import json
|
|
13
|
+
import sys
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
from typing import Any, Dict, List
|
|
16
|
+
|
|
17
|
+
from inventory import InventoryData, extract_text_inventory
|
|
18
|
+
from pptx import Presentation
|
|
19
|
+
from pptx.dml.color import RGBColor
|
|
20
|
+
from pptx.enum.dml import MSO_THEME_COLOR
|
|
21
|
+
from pptx.enum.text import PP_ALIGN
|
|
22
|
+
from pptx.oxml.xmlchemy import OxmlElement
|
|
23
|
+
from pptx.util import Pt
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def clear_paragraph_bullets(paragraph):
|
|
27
|
+
"""Clear bullet formatting from a paragraph."""
|
|
28
|
+
pPr = paragraph._element.get_or_add_pPr()
|
|
29
|
+
|
|
30
|
+
# Remove existing bullet elements
|
|
31
|
+
for child in list(pPr):
|
|
32
|
+
if (
|
|
33
|
+
child.tag.endswith("buChar")
|
|
34
|
+
or child.tag.endswith("buNone")
|
|
35
|
+
or child.tag.endswith("buAutoNum")
|
|
36
|
+
or child.tag.endswith("buFont")
|
|
37
|
+
):
|
|
38
|
+
pPr.remove(child)
|
|
39
|
+
|
|
40
|
+
return pPr
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def apply_paragraph_properties(paragraph, para_data: Dict[str, Any]):
|
|
44
|
+
"""Apply formatting properties to a paragraph."""
|
|
45
|
+
# Get the text but don't set it on paragraph directly yet
|
|
46
|
+
text = para_data.get("text", "")
|
|
47
|
+
|
|
48
|
+
# Get or create paragraph properties
|
|
49
|
+
pPr = clear_paragraph_bullets(paragraph)
|
|
50
|
+
|
|
51
|
+
# Handle bullet formatting
|
|
52
|
+
if para_data.get("bullet", False):
|
|
53
|
+
level = para_data.get("level", 0)
|
|
54
|
+
paragraph.level = level
|
|
55
|
+
|
|
56
|
+
# Calculate font-proportional indentation
|
|
57
|
+
font_size = para_data.get("font_size", 18.0)
|
|
58
|
+
level_indent_emu = int((font_size * (1.6 + level * 1.6)) * 12700)
|
|
59
|
+
hanging_indent_emu = int(-font_size * 0.8 * 12700)
|
|
60
|
+
|
|
61
|
+
# Set indentation
|
|
62
|
+
pPr.attrib["marL"] = str(level_indent_emu)
|
|
63
|
+
pPr.attrib["indent"] = str(hanging_indent_emu)
|
|
64
|
+
|
|
65
|
+
# Add bullet character
|
|
66
|
+
buChar = OxmlElement("a:buChar")
|
|
67
|
+
buChar.set("char", "•")
|
|
68
|
+
pPr.append(buChar)
|
|
69
|
+
|
|
70
|
+
# Default to left alignment for bullets if not specified
|
|
71
|
+
if "alignment" not in para_data:
|
|
72
|
+
paragraph.alignment = PP_ALIGN.LEFT
|
|
73
|
+
else:
|
|
74
|
+
# Remove indentation for non-bullet text
|
|
75
|
+
pPr.attrib["marL"] = "0"
|
|
76
|
+
pPr.attrib["indent"] = "0"
|
|
77
|
+
|
|
78
|
+
# Add buNone element
|
|
79
|
+
buNone = OxmlElement("a:buNone")
|
|
80
|
+
pPr.insert(0, buNone)
|
|
81
|
+
|
|
82
|
+
# Apply alignment
|
|
83
|
+
if "alignment" in para_data:
|
|
84
|
+
alignment_map = {
|
|
85
|
+
"LEFT": PP_ALIGN.LEFT,
|
|
86
|
+
"CENTER": PP_ALIGN.CENTER,
|
|
87
|
+
"RIGHT": PP_ALIGN.RIGHT,
|
|
88
|
+
"JUSTIFY": PP_ALIGN.JUSTIFY,
|
|
89
|
+
}
|
|
90
|
+
if para_data["alignment"] in alignment_map:
|
|
91
|
+
paragraph.alignment = alignment_map[para_data["alignment"]]
|
|
92
|
+
|
|
93
|
+
# Apply spacing
|
|
94
|
+
if "space_before" in para_data:
|
|
95
|
+
paragraph.space_before = Pt(para_data["space_before"])
|
|
96
|
+
if "space_after" in para_data:
|
|
97
|
+
paragraph.space_after = Pt(para_data["space_after"])
|
|
98
|
+
if "line_spacing" in para_data:
|
|
99
|
+
paragraph.line_spacing = Pt(para_data["line_spacing"])
|
|
100
|
+
|
|
101
|
+
# Apply run-level formatting
|
|
102
|
+
if not paragraph.runs:
|
|
103
|
+
run = paragraph.add_run()
|
|
104
|
+
run.text = text
|
|
105
|
+
else:
|
|
106
|
+
run = paragraph.runs[0]
|
|
107
|
+
run.text = text
|
|
108
|
+
|
|
109
|
+
# Apply font properties
|
|
110
|
+
apply_font_properties(run, para_data)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def apply_font_properties(run, para_data: Dict[str, Any]):
|
|
114
|
+
"""Apply font properties to a text run."""
|
|
115
|
+
if "bold" in para_data:
|
|
116
|
+
run.font.bold = para_data["bold"]
|
|
117
|
+
if "italic" in para_data:
|
|
118
|
+
run.font.italic = para_data["italic"]
|
|
119
|
+
if "underline" in para_data:
|
|
120
|
+
run.font.underline = para_data["underline"]
|
|
121
|
+
if "font_size" in para_data:
|
|
122
|
+
run.font.size = Pt(para_data["font_size"])
|
|
123
|
+
if "font_name" in para_data:
|
|
124
|
+
run.font.name = para_data["font_name"]
|
|
125
|
+
|
|
126
|
+
# Apply color - prefer RGB, fall back to theme_color
|
|
127
|
+
if "color" in para_data:
|
|
128
|
+
color_hex = para_data["color"].lstrip("#")
|
|
129
|
+
if len(color_hex) == 6:
|
|
130
|
+
r = int(color_hex[0:2], 16)
|
|
131
|
+
g = int(color_hex[2:4], 16)
|
|
132
|
+
b = int(color_hex[4:6], 16)
|
|
133
|
+
run.font.color.rgb = RGBColor(r, g, b)
|
|
134
|
+
elif "theme_color" in para_data:
|
|
135
|
+
# Get theme color by name (e.g., "DARK_1", "ACCENT_1")
|
|
136
|
+
theme_name = para_data["theme_color"]
|
|
137
|
+
try:
|
|
138
|
+
run.font.color.theme_color = getattr(MSO_THEME_COLOR, theme_name)
|
|
139
|
+
except AttributeError:
|
|
140
|
+
print(f" WARNING: Unknown theme color name '{theme_name}'")
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def detect_frame_overflow(inventory: InventoryData) -> Dict[str, Dict[str, float]]:
|
|
144
|
+
"""Detect text overflow in shapes (text exceeding shape bounds).
|
|
145
|
+
|
|
146
|
+
Returns dict of slide_key -> shape_key -> overflow_inches.
|
|
147
|
+
Only includes shapes that have text overflow.
|
|
148
|
+
"""
|
|
149
|
+
overflow_map = {}
|
|
150
|
+
|
|
151
|
+
for slide_key, shapes_dict in inventory.items():
|
|
152
|
+
for shape_key, shape_data in shapes_dict.items():
|
|
153
|
+
# Check for frame overflow (text exceeding shape bounds)
|
|
154
|
+
if shape_data.frame_overflow_bottom is not None:
|
|
155
|
+
if slide_key not in overflow_map:
|
|
156
|
+
overflow_map[slide_key] = {}
|
|
157
|
+
overflow_map[slide_key][shape_key] = shape_data.frame_overflow_bottom
|
|
158
|
+
|
|
159
|
+
return overflow_map
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
def validate_replacements(inventory: InventoryData, replacements: Dict) -> List[str]:
|
|
163
|
+
"""Validate that all shapes in replacements exist in inventory.
|
|
164
|
+
|
|
165
|
+
Returns list of error messages.
|
|
166
|
+
"""
|
|
167
|
+
errors = []
|
|
168
|
+
|
|
169
|
+
for slide_key, shapes_data in replacements.items():
|
|
170
|
+
if not slide_key.startswith("slide-"):
|
|
171
|
+
continue
|
|
172
|
+
|
|
173
|
+
# Check if slide exists
|
|
174
|
+
if slide_key not in inventory:
|
|
175
|
+
errors.append(f"Slide '{slide_key}' not found in inventory")
|
|
176
|
+
continue
|
|
177
|
+
|
|
178
|
+
# Check each shape
|
|
179
|
+
for shape_key in shapes_data.keys():
|
|
180
|
+
if shape_key not in inventory[slide_key]:
|
|
181
|
+
# Find shapes without replacements defined and show their content
|
|
182
|
+
unused_with_content = []
|
|
183
|
+
for k in inventory[slide_key].keys():
|
|
184
|
+
if k not in shapes_data:
|
|
185
|
+
shape_data = inventory[slide_key][k]
|
|
186
|
+
# Get text from paragraphs as preview
|
|
187
|
+
paragraphs = shape_data.paragraphs
|
|
188
|
+
if paragraphs and paragraphs[0].text:
|
|
189
|
+
first_text = paragraphs[0].text[:50]
|
|
190
|
+
if len(paragraphs[0].text) > 50:
|
|
191
|
+
first_text += "..."
|
|
192
|
+
unused_with_content.append(f"{k} ('{first_text}')")
|
|
193
|
+
else:
|
|
194
|
+
unused_with_content.append(k)
|
|
195
|
+
|
|
196
|
+
errors.append(
|
|
197
|
+
f"Shape '{shape_key}' not found on '{slide_key}'. "
|
|
198
|
+
f"Shapes without replacements: {', '.join(sorted(unused_with_content)) if unused_with_content else 'none'}"
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
return errors
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def check_duplicate_keys(pairs):
|
|
205
|
+
"""Check for duplicate keys when loading JSON."""
|
|
206
|
+
result = {}
|
|
207
|
+
for key, value in pairs:
|
|
208
|
+
if key in result:
|
|
209
|
+
raise ValueError(f"Duplicate key found in JSON: '{key}'")
|
|
210
|
+
result[key] = value
|
|
211
|
+
return result
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def apply_replacements(pptx_file: str, json_file: str, output_file: str):
|
|
215
|
+
"""Apply text replacements from JSON to PowerPoint presentation."""
|
|
216
|
+
|
|
217
|
+
# Load presentation
|
|
218
|
+
prs = Presentation(pptx_file)
|
|
219
|
+
|
|
220
|
+
# Get inventory of all text shapes (returns ShapeData objects)
|
|
221
|
+
# Pass prs to use same Presentation instance
|
|
222
|
+
inventory = extract_text_inventory(Path(pptx_file), prs)
|
|
223
|
+
|
|
224
|
+
# Detect text overflow in original presentation
|
|
225
|
+
original_overflow = detect_frame_overflow(inventory)
|
|
226
|
+
|
|
227
|
+
# Load replacement data with duplicate key detection
|
|
228
|
+
with open(json_file, "r") as f:
|
|
229
|
+
replacements = json.load(f, object_pairs_hook=check_duplicate_keys)
|
|
230
|
+
|
|
231
|
+
# Validate replacements
|
|
232
|
+
errors = validate_replacements(inventory, replacements)
|
|
233
|
+
if errors:
|
|
234
|
+
print("ERROR: Invalid shapes in replacement JSON:")
|
|
235
|
+
for error in errors:
|
|
236
|
+
print(f" - {error}")
|
|
237
|
+
print("\nPlease check the inventory and update your replacement JSON.")
|
|
238
|
+
print(
|
|
239
|
+
"You can regenerate the inventory with: python inventory.py <input.pptx> <output.json>"
|
|
240
|
+
)
|
|
241
|
+
raise ValueError(f"Found {len(errors)} validation error(s)")
|
|
242
|
+
|
|
243
|
+
# Track statistics
|
|
244
|
+
shapes_processed = 0
|
|
245
|
+
shapes_cleared = 0
|
|
246
|
+
shapes_replaced = 0
|
|
247
|
+
|
|
248
|
+
# Process each slide from inventory
|
|
249
|
+
for slide_key, shapes_dict in inventory.items():
|
|
250
|
+
if not slide_key.startswith("slide-"):
|
|
251
|
+
continue
|
|
252
|
+
|
|
253
|
+
slide_index = int(slide_key.split("-")[1])
|
|
254
|
+
|
|
255
|
+
if slide_index >= len(prs.slides):
|
|
256
|
+
print(f"Warning: Slide {slide_index} not found")
|
|
257
|
+
continue
|
|
258
|
+
|
|
259
|
+
# Process each shape from inventory
|
|
260
|
+
for shape_key, shape_data in shapes_dict.items():
|
|
261
|
+
shapes_processed += 1
|
|
262
|
+
|
|
263
|
+
# Get the shape directly from ShapeData
|
|
264
|
+
shape = shape_data.shape
|
|
265
|
+
if not shape:
|
|
266
|
+
print(f"Warning: {shape_key} has no shape reference")
|
|
267
|
+
continue
|
|
268
|
+
|
|
269
|
+
# ShapeData already validates text_frame in __init__
|
|
270
|
+
text_frame = shape.text_frame # type: ignore
|
|
271
|
+
|
|
272
|
+
text_frame.clear() # type: ignore
|
|
273
|
+
shapes_cleared += 1
|
|
274
|
+
|
|
275
|
+
# Check for replacement paragraphs
|
|
276
|
+
replacement_shape_data = replacements.get(slide_key, {}).get(shape_key, {})
|
|
277
|
+
if "paragraphs" not in replacement_shape_data:
|
|
278
|
+
continue
|
|
279
|
+
|
|
280
|
+
shapes_replaced += 1
|
|
281
|
+
|
|
282
|
+
# Add replacement paragraphs
|
|
283
|
+
for i, para_data in enumerate(replacement_shape_data["paragraphs"]):
|
|
284
|
+
if i == 0:
|
|
285
|
+
p = text_frame.paragraphs[0] # type: ignore
|
|
286
|
+
else:
|
|
287
|
+
p = text_frame.add_paragraph() # type: ignore
|
|
288
|
+
|
|
289
|
+
apply_paragraph_properties(p, para_data)
|
|
290
|
+
|
|
291
|
+
# Check for issues after replacements
|
|
292
|
+
# Save to a temporary file and reload to avoid modifying the presentation during inventory
|
|
293
|
+
# (extract_text_inventory accesses font.color which adds empty <a:solidFill/> elements)
|
|
294
|
+
import tempfile
|
|
295
|
+
|
|
296
|
+
with tempfile.NamedTemporaryFile(suffix=".pptx", delete=False) as tmp:
|
|
297
|
+
tmp_path = Path(tmp.name)
|
|
298
|
+
prs.save(str(tmp_path))
|
|
299
|
+
|
|
300
|
+
try:
|
|
301
|
+
updated_inventory = extract_text_inventory(tmp_path)
|
|
302
|
+
updated_overflow = detect_frame_overflow(updated_inventory)
|
|
303
|
+
finally:
|
|
304
|
+
tmp_path.unlink() # Clean up temp file
|
|
305
|
+
|
|
306
|
+
# Check if any text overflow got worse
|
|
307
|
+
overflow_errors = []
|
|
308
|
+
for slide_key, shape_overflows in updated_overflow.items():
|
|
309
|
+
for shape_key, new_overflow in shape_overflows.items():
|
|
310
|
+
# Get original overflow (0 if there was no overflow before)
|
|
311
|
+
original = original_overflow.get(slide_key, {}).get(shape_key, 0.0)
|
|
312
|
+
|
|
313
|
+
# Error if overflow increased
|
|
314
|
+
if new_overflow > original + 0.01: # Small tolerance for rounding
|
|
315
|
+
increase = new_overflow - original
|
|
316
|
+
overflow_errors.append(
|
|
317
|
+
f'{slide_key}/{shape_key}: overflow worsened by {increase:.2f}" '
|
|
318
|
+
f'(was {original:.2f}", now {new_overflow:.2f}")'
|
|
319
|
+
)
|
|
320
|
+
|
|
321
|
+
# Collect warnings from updated shapes
|
|
322
|
+
warnings = []
|
|
323
|
+
for slide_key, shapes_dict in updated_inventory.items():
|
|
324
|
+
for shape_key, shape_data in shapes_dict.items():
|
|
325
|
+
if shape_data.warnings:
|
|
326
|
+
for warning in shape_data.warnings:
|
|
327
|
+
warnings.append(f"{slide_key}/{shape_key}: {warning}")
|
|
328
|
+
|
|
329
|
+
# Fail if there are any issues
|
|
330
|
+
if overflow_errors or warnings:
|
|
331
|
+
print("\nERROR: Issues detected in replacement output:")
|
|
332
|
+
if overflow_errors:
|
|
333
|
+
print("\nText overflow worsened:")
|
|
334
|
+
for error in overflow_errors:
|
|
335
|
+
print(f" - {error}")
|
|
336
|
+
if warnings:
|
|
337
|
+
print("\nFormatting warnings:")
|
|
338
|
+
for warning in warnings:
|
|
339
|
+
print(f" - {warning}")
|
|
340
|
+
print("\nPlease fix these issues before saving.")
|
|
341
|
+
raise ValueError(
|
|
342
|
+
f"Found {len(overflow_errors)} overflow error(s) and {len(warnings)} warning(s)"
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
# Save the presentation
|
|
346
|
+
prs.save(output_file)
|
|
347
|
+
|
|
348
|
+
# Report results
|
|
349
|
+
print(f"Saved updated presentation to: {output_file}")
|
|
350
|
+
print(f"Processed {len(prs.slides)} slides")
|
|
351
|
+
print(f" - Shapes processed: {shapes_processed}")
|
|
352
|
+
print(f" - Shapes cleared: {shapes_cleared}")
|
|
353
|
+
print(f" - Shapes replaced: {shapes_replaced}")
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
def main():
|
|
357
|
+
"""Main entry point for command-line usage."""
|
|
358
|
+
if len(sys.argv) != 4:
|
|
359
|
+
print(__doc__)
|
|
360
|
+
sys.exit(1)
|
|
361
|
+
|
|
362
|
+
input_pptx = Path(sys.argv[1])
|
|
363
|
+
replacements_json = Path(sys.argv[2])
|
|
364
|
+
output_pptx = Path(sys.argv[3])
|
|
365
|
+
|
|
366
|
+
if not input_pptx.exists():
|
|
367
|
+
print(f"Error: Input file '{input_pptx}' not found")
|
|
368
|
+
sys.exit(1)
|
|
369
|
+
|
|
370
|
+
if not replacements_json.exists():
|
|
371
|
+
print(f"Error: Replacements JSON file '{replacements_json}' not found")
|
|
372
|
+
sys.exit(1)
|
|
373
|
+
|
|
374
|
+
try:
|
|
375
|
+
apply_replacements(str(input_pptx), str(replacements_json), str(output_pptx))
|
|
376
|
+
except Exception as e:
|
|
377
|
+
print(f"Error applying replacements: {e}")
|
|
378
|
+
import traceback
|
|
379
|
+
|
|
380
|
+
traceback.print_exc()
|
|
381
|
+
sys.exit(1)
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
if __name__ == "__main__":
|
|
385
|
+
main()
|